Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
sequencelengths
0
101
negative_scores
sequencelengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Wraps an IDBRequest in a PersistencePromise, using the onsuccess / onerror handlers to resolve / reject the PersistencePromise as appropriate.
function wrapRequest(request){return new PersistencePromise(function(resolve,reject){request.onsuccess=function(event){var result=event.target.result;resolve(result);};request.onerror=function(event){reject(event.target.error);};});}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrapRequest(request) {\n return new __WEBPACK_IMPORTED_MODULE_2__persistence_promise__[\"a\" /* PersistencePromise */](function (resolve, reject) {\n request.onsuccess = function (event) {\n var result = event.target.result;\n resolve(result);\n };\n request.onerror = function (event) {\n reject(event.target.error);\n };\n });\n}", "function wrapRequest(request) {\n return new __WEBPACK_IMPORTED_MODULE_2__persistence_promise__[\"a\" /* PersistencePromise */](function (resolve, reject) {\n request.onsuccess = function (event) {\n var result = event.target.result;\n resolve(result);\n };\n request.onerror = function (event) {\n reject(event.target.error);\n };\n });\n}", "function wrapRequest(request) {\n return new __WEBPACK_IMPORTED_MODULE_2__persistence_promise__[\"a\" /* PersistencePromise */](function (resolve, reject) {\n request.onsuccess = function (event) {\n var result = event.target.result;\n resolve(result);\n };\n request.onerror = function (event) {\n reject(event.target.error);\n };\n });\n}", "function wrapRequest(request) {\r\n return new PersistencePromise(function (resolve, reject) {\r\n request.onsuccess = function (event) {\r\n var result = event.target.result;\r\n resolve(result);\r\n };\r\n request.onerror = function (event) {\r\n reject(event.target.error);\r\n };\r\n });\r\n}", "function wrapRequest(request) {\n return new PersistencePromise(function (resolve, reject) {\n request.onsuccess = function (event) {\n var result = event.target.result;\n resolve(result);\n };\n request.onerror = function (event) {\n reject(event.target.error);\n };\n });\n}", "function wrapRequest(request) {\n return new PersistencePromise(function (resolve, reject) {\n request.onsuccess = function (event) {\n var result = event.target.result;\n resolve(result);\n };\n request.onerror = function (event) {\n reject(event.target.error);\n };\n });\n}", "function wrapRequest(request) {\n return new PersistencePromise(function (resolve, reject) {\n request.onsuccess = function (event) {\n var result = event.target.result;\n resolve(result);\n };\n request.onerror = function (event) {\n reject(event.target.error);\n };\n });\n}", "function wrapRequest(request) {\n return new PersistencePromise(function (resolve, reject) {\n request.onsuccess = function (event) {\n var result = event.target.result;\n resolve(result);\n };\n\n request.onerror = function (event) {\n reject(event.target.error);\n };\n });\n}", "function wrapRequest(request) {\r\n return new PersistencePromise(function (resolve, reject) {\r\n request.onsuccess = function (event) {\r\n var result = event.target.result;\r\n resolve(result);\r\n };\r\n request.onerror = function (event) {\r\n var error = checkForAndReportiOSError(event.target.error);\r\n reject(error);\r\n };\r\n });\r\n}", "function wrapRequest(request) {\r\n return new PersistencePromise(function (resolve, reject) {\r\n request.onsuccess = function (event) {\r\n var result = event.target.result;\r\n resolve(result);\r\n };\r\n request.onerror = function (event) {\r\n var error = checkForAndReportiOSError(event.target.error);\r\n reject(error);\r\n };\r\n });\r\n}", "function wrapRequest(request) {\n return new PersistencePromise(function (resolve, reject) {\n request.onsuccess = function (event) {\n var result = event.target.result;\n resolve(result);\n };\n\n request.onerror = function (event) {\n var error = checkForAndReportiOSError(event.target.error);\n reject(error);\n };\n });\n } // Guard so we only report the error once.", "function persistenceFetch(persistenceManager) {\n function PersistenceFetchEvent(request) {\n Object.defineProperty(this, 'isReload', {\n value: false,\n enumerable: true\n });\n // clientId is not applicable to a non-ServiceWorker context\n Object.defineProperty(this, 'clientId', {\n value: null,\n enumerable: true\n });\n // client is not applicable to a non-ServiceWorker context\n Object.defineProperty(this, 'client', {\n value: null,\n enumerable: true\n });\n Object.defineProperty(this, 'request', {\n value: request,\n enumerable: true\n });\n Object.defineProperty(this, '_resolveCallback', {\n value: null,\n writable: true\n });\n Object.defineProperty(this, '_rejectCallback', {\n value: null,\n writable: true\n });\n };\n\n PersistenceFetchEvent.prototype.respondWith = function (any) {\n var self = this;\n if (any instanceof Promise) {\n any.then(function (response) {\n self._resolveCallback(response);\n }, function (err) {\n self._rejectCallback(err);\n });\n } else if (typeof (any) == 'function') {\n var response = any();\n self._resolveCallback(response);\n }\n };\n\n PersistenceFetchEvent.prototype._setPromiseCallbacks = function (resolveCallback, rejectCallback) {\n this._resolveCallback = resolveCallback;\n this._rejectCallback = rejectCallback;\n };\n\n return function (input, init) {\n var request;\n // input can either be a Request object or something\n // which can be passed to the Request constructor\n if (Request.prototype.isPrototypeOf(input) && !init) {\n request = input\n } else {\n request = new Request(input, init)\n }\n\n // check if it's an endpoint we care about\n return persistenceManager.getRegistration(request.url).then(function (registration) {\n if (registration != null) {\n // create a Fetch Event\n var fetchEvent = new PersistenceFetchEvent(request);\n var promise = _dispatchEvent(persistenceManager, 'fetch', fetchEvent);\n // if a promise is returned than a fetch listener(s) handled the event\n if (promise != null &&\n promise instanceof Promise) {\n return promise;\n }\n }\n // if the endpoint is not registered or the Fetch Event Listener\n // did not return a Promise then just do a regular browser fetch\n return persistenceManager.browserFetch(request);\n });\n };\n }", "function Request() {\n return {\n result: undefined,\n onsuccess: null,\n onerror: null,\n readyState: IDBRequest.LOADING\n // TODO compvare request interface\n };\n}", "function wrappedFetch() {\n\t var wrappedPromise = {};\n\t\n\t var promise = new PouchPromise(function (resolve, reject) {\n\t wrappedPromise.resolve = resolve;\n\t wrappedPromise.reject = reject;\n\t });\n\t\n\t var args = new Array(arguments.length);\n\t\n\t for (var i = 0; i < args.length; i++) {\n\t args[i] = arguments[i];\n\t }\n\t\n\t wrappedPromise.promise = promise;\n\t\n\t PouchPromise.resolve().then(function () {\n\t return fetch.apply(null, args);\n\t }).then(function (response) {\n\t wrappedPromise.resolve(response);\n\t }).catch(function (error) {\n\t wrappedPromise.reject(error);\n\t });\n\t\n\t return wrappedPromise;\n\t}", "function adaptStorePromise(defer) {\n\t\t\tdefer.promise.success = function (fn) {\n\t\t\t\tdefer.promise.then(fn, null);\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tdefer.promise.error = function (fn) {\n\t\t\t\tdefer.promise.then(null, fn);\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\treturn defer.promise;\n\t\t}", "function wrappedFetch() {\n var wrappedPromise = {};\n\n var promise = new PouchPromise(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n wrappedPromise.promise = promise;\n\n PouchPromise.resolve().then(function () {\n return fetch.apply(null, args);\n }).then(function (response) {\n wrappedPromise.resolve(response);\n }).catch(function (error) {\n wrappedPromise.reject(error);\n });\n\n return wrappedPromise;\n}", "function wrappedFetch() {\n var wrappedPromise = {};\n\n var promise = new PouchPromise$1(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n wrappedPromise.promise = promise;\n\n PouchPromise$1.resolve().then(function () {\n return fetch.apply(null, args);\n }).then(function (response) {\n wrappedPromise.resolve(response);\n })[\"catch\"](function (error) {\n wrappedPromise.reject(error);\n });\n\n return wrappedPromise;\n}", "function wrappedFetch() {\n var wrappedPromise = {};\n\n var promise = new PouchPromise$1(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n wrappedPromise.promise = promise;\n\n PouchPromise$1.resolve().then(function () {\n return fetch.apply(null, args);\n }).then(function (response) {\n wrappedPromise.resolve(response);\n }).catch(function (error) {\n wrappedPromise.reject(error);\n });\n\n return wrappedPromise;\n}", "function wrappedFetch() {\n var wrappedPromise = {};\n\n var promise = new PouchPromise$1(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n wrappedPromise.promise = promise;\n\n PouchPromise$1.resolve().then(function () {\n return fetch.apply(null, args);\n }).then(function (response) {\n wrappedPromise.resolve(response);\n }).catch(function (error) {\n wrappedPromise.reject(error);\n });\n\n return wrappedPromise;\n}", "thenWithState(onResolve = function(r) { return r }, onReject = function(e) { throw e }) { return new StatefulPromise(this.then(onResolve, onReject)); }", "promise({ payload, request }) {\n return request.create({ data: payload })\n }", "function defer() {\n var resolve, reject;\n var promise = new Promise(function() {\n resolve = arguments[0];\n reject = arguments[1];\n });\n return {\n resolve: resolve,\n reject: reject,\n promise: promise\n };\n }", "function wrapPromise(promise) {\n let status = \"pending\";\n let result;\n let suspender = promise.then(\n r => {\n status = \"success\";\n result = r;\n },\n e => {\n status = \"error\";\n result = e;\n }\n );\n console.log('fetch')\n return {\n read() {\n if (status === \"pending\") {\n throw suspender;\n } else if (status === \"error\") {\n throw result;\n } else if (status === \"success\") {\n return result;\n }\n }\n };\n }", "function asyncifyRequest (request)\n {\n return new Promise((res, rej) => {\n request.onsuccess = () => res(request.result);\n request.onerror = () => rej(request.error);\n });\n }", "function PromiseRequest() {\n\t superagent.Request.apply(this, arguments);\n\t }", "function PromiseRequest() {\n superagent.Request.apply(this, arguments);\n }", "function wrap (fn) {\n\n\t\treturn function wrapper () {\n\n\t\t\treturn new Promise((res, rej) => {\n\n\t\t\t\tif (!db) {\n\t\t\t\t\trej('Database not open.');\n\t\t\t\t}\n\n\t\t\t\tfn(res, rej, ...arguments);\n\n\t\t\t});\n\n\t\t};\n\n\t}", "sendRequest(request) {\n return new Promise(function (fulfill, reject) {\n var reqGuid = Guid.create();\n // If we are using sockets, we emit on the 'request' topic, and wrap\n // the request in an object withe guid and payload\n var reqObj = {\n guid: reqGuid.value,\n payload: request\n };\n\n // Set out the timeout\n var timeoutToken = setTimeout(function() {\n reject({\n guid: reqGuid.value,\n payload: {\n reason: 'Request timed out'\n }\n });\n }, TIMEOUT_DURATION);\n\n // Register the callback function\n this.requestCallbacks[reqGuid.value] = function(response) {\n if (timeoutToken) {\n clearTimeout(timeoutToken);\n timeoutToken = undefined;\n }\n\n if (response.success) {\n fulfill({\n guid: response.guid,\n payload: response.payload\n });\n }\n else {\n reject({\n guid: response.guid,\n payload: response.payload\n });\n }\n };\n\n if (this.socket) {\n this.socket.emit('request', reqObj);\n }\n else {\n console.error('Socket not ready');\n }\n\n }.bind(this));\n }", "function wrappedFetch() {\n var wrappedPromise = {};\n\n var promise = new Promise(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n wrappedPromise.promise = promise;\n\n Promise.resolve().then(function () {\n return fetch.apply(null, args);\n }).then(function (response) {\n wrappedPromise.resolve(response);\n }).catch(function (error) {\n wrappedPromise.reject(error);\n });\n\n return wrappedPromise;\n }", "function wrap(fn){\n\treturn Q().then(fn);\n}", "function deferredPromise() {\n let resolve;\n let reject;\n const promise = new Promise(function () {\n resolve = arguments[0];\n reject = arguments[1];\n });\n return {\n resolve,\n reject,\n promise\n };\n}", "function wrappedFetch() {\n var wrappedPromise = {};\n\n var promise = new index_es(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n wrappedPromise.promise = promise;\n\n index_es.resolve().then(function () {\n return fetch.apply(null, args);\n }).then(function (response) {\n wrappedPromise.resolve(response);\n }).catch(function (error) {\n wrappedPromise.reject(error);\n });\n\n return wrappedPromise;\n}", "function notifySuccess(request, result) {\n var event = {type: \"success\",\n target: request}; //TODO compvare event interface\n request.readyState = IDBRequest.DONE;\n request.result = result;\n if (typeof request.onsuccess == \"function\") {\n request.onsuccess(event);\n }\n}", "function defer() {\n var deferred = {};\n deferred.promise = new Promise(function(resolve, reject) {\n deferred.resolve = resolve;\n deferred.reject = reject;\n });\n return deferred;\n}", "function defer() {\n\t let resolve = null;\n\t let reject = null;\n\t const p = new Promise((res, rej) => [resolve, reject] = [res, rej]);\n\t return Object.assign(p, { resolve, reject });\n\t}", "function defer() {\n\t let resolve = null;\n\t let reject = null;\n\t const p = new Promise((res, rej) => [resolve, reject] = [res, rej]);\n\t return Object.assign(p, { resolve, reject });\n\t}", "async init() {\n var that = this;\n\n var promise = new Promise(function(resolve, reject) {\n\n var req = indexedDB.open(that.db_name, that.version);\n\n req.onupgradeneeded = function(event) {\n that.database = event.target.result;\n //run callback method in createTable to add a new object table\n that.upgrade();\n };\n\n req.onsuccess = function (event) {\n that.database = event.target.result;\n resolve();\n };\n\n req.onerror = function (error) {\n if (req.error.name === \"VersionError\") {\n //we can never be sure what version of the database the client is on\n //therefore in the event that we request an older version of the db than the client is on, we will need to update the js version request on runtime\n that.version++;\n\n //we need to initiate a steady increment of promise connections that either resolve or reject\n that.init()\n .then(function() {\n //bubble the result\n resolve();\n })\n .catch(function() {\n //bubble the result: DOESNT WORK?\n reject();\n });\n } else {\n console.error(error);\n }\n };\n });\n return promise;\n }", "then(onResolve = function(r) { return r }, onReject = function(e) { throw e }) { return this.wrapped.then(resolve => {\n\t\tif (resolve instanceof Try)\n\t\t\treturn resolve.match(s => onResolve(s), e => onReject(e));\n\t\telse\n\t\t\treturn onResolve(resolve);\n\t}, onReject) }", "function promisify(request) {\n return new Promise(function (resolve, reject) {\n request.onsuccess = function () {\n resolve(request.result);\n };\n request.onerror = function () {\n reject(request.error);\n };\n });\n}", "function promisify(request) {\n return new Promise(function (resolve, reject) {\n request.onsuccess = function () {\n resolve(request.result);\n };\n request.onerror = function () {\n reject(request.error);\n };\n });\n}", "function promisify(request) {\r\n return new Promise(function (resolve, reject) {\r\n request.onsuccess = function () {\r\n resolve(request.result);\r\n };\r\n request.onerror = function () {\r\n reject(request.error);\r\n };\r\n });\r\n}", "function promisify(request) {\r\n return new Promise(function (resolve, reject) {\r\n request.onsuccess = function () {\r\n resolve(request.result);\r\n };\r\n request.onerror = function () {\r\n reject(request.error);\r\n };\r\n });\r\n}", "function promisify(request) {\r\n return new Promise(function (resolve, reject) {\r\n request.onsuccess = function () {\r\n resolve(request.result);\r\n };\r\n request.onerror = function () {\r\n reject(request.error);\r\n };\r\n });\r\n}", "function createPromisefunction(event, item) {\r\n return function (resolve, reject) {\r\n // Message to set the storage\r\n var deferredHash = randomHash(),\r\n message = JSON.stringify({\r\n 'event': event,\r\n 'storageKey': storageKey,\r\n 'deferredHash': deferredHash,\r\n 'item': item\r\n });\r\n // Set the deferred object reference\r\n deferredObject[deferredHash] = {\r\n resolve: resolve,\r\n reject: reject\r\n };\r\n // Send the message and target URI\r\n //proxyWindowObject.postMessage(message, '*');\r\n if (usePostMessage) {\r\n // Post the message as JSON\r\n proxyWindowObject.postMessage(message, '*');\r\n } else {\r\n // postMessage not available so set hash\r\n if (iframe !== null) {\r\n // Cache bust messages with the same info\r\n cacheBust += 1;\r\n message.cacheBust = ((+new Date()) + cacheBust);\r\n hash = '#' + JSON.stringify(message);\r\n if (iframe.src) {\r\n iframe.src = proxyDomain + proxyPage + hash;\r\n } else if (iframe.contentWindow !== null && iframe.contentWindow.location !== null) {\r\n iframe.contentWindow.location = proxyDomain + proxyPage + hash;\r\n } else {\r\n iframe.setAttribute('src', proxyDomain + proxyPage + hash);\r\n }\r\n }\r\n }\r\n };\r\n }", "function promisify(request) {\n return new Promise(function (resolve, reject) {\n request.onsuccess = function () {\n resolve(request.result);\n };\n\n request.onerror = function () {\n reject(request.error);\n };\n });\n}", "function defer() {\n var resolve, reject, notify, promise;\n promise = new ExtendedPromise(executor);\n return {\n promise: promise,\n resolve: resolve,\n reject: reject,\n notify: notify\n };\n\n /**\n * The promise executor.\n * @param {function} res The function to call to resolve the promise.\n * @param {function} rej The function to call to reject the promise.\n * @param {function} noti The function to call to perform a notification.\n */\n function executor(res, rej, noti) {\n resolve = res;\n reject = rej;\n notify = noti;\n }\n }", "deferred() {\n const struct = {}\n struct.promise = new MyPromise((resolve, reject) => {\n struct.resolve = resolve\n struct.reject = reject\n })\n return struct\n }", "function getItemPromisified(queryInput){\n\n\treturn new Promise((resolve, reject) => {\n\n\t\tthis.client.getItem(queryInput, (err, data) => {\n\n\t\t\tif (err != null) {\n\n\t\t\t\treject (err);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresolve(data);\n\n\t\t\treturn;\n\n\t\t});\n\n\t});\n\n}", "function Promise() {\n var resolveCallbacks = [];\n var rejectCallbacks = [];\n var notifyCallbacks = [];\n var state = 'pending';\n var resolution;\n var rejection;\n\n var api = {\n /**\n * Attach resolution, rejection and notification handlers to the promise.\n *\n * @method then\n * @for Promise\n * @chainable\n * @param {Function} onResolve Executed when the promise is resolved.\n * If another promise is returned, the next promise in the chain is\n * attached to the returned promise. If a value is returned, the next\n * promise in the chain is resolved with the returned value immediately.\n * @param {Function} onReject Executed when the promise is rejected\n * @param {Function} onNotify Executed when the promise notified\n * @return {Promise}\n */\n then: function then(onResolve, onReject, onNotify) {\n var promise = new Promise();\n\n if ((state === 'pending' || state === 'resolved') && isFunction(onResolve)) {\n var resolveWrapper = function resolveWrapper(resolution) {\n var returnValue = onResolve(resolution);\n\n if (returnValue && isFunction(returnValue.then)) {\n returnValue.then(function (nextResolution) {\n promise.resolve(nextResolution);\n }, function (nextRejection) {\n promise.reject(nextRejection);\n });\n } else {\n promise.resolve(returnValue);\n }\n };\n\n if (state === 'resolved') {\n resolveWrapper(resolution);\n } else {\n resolveCallbacks.push(resolveWrapper);\n }\n }\n\n if (state === 'pending' || state === 'rejected') {\n var rejectionWrapper = function rejectionWrapper(rejectWith) {\n if (isFunction(onReject)) {\n onReject(rejectWith);\n } else {\n /*\n * Stop rejecting the promise chain once the rejection\n * has been handled.\n */\n promise.reject(rejectWith);\n }\n };\n\n if (state === 'rejected') {\n rejectionWrapper(rejection);\n } else {\n rejectCallbacks.push(rejectionWrapper);\n }\n }\n\n notifyCallbacks.push(function (notifyWith) {\n if (isFunction(onNotify)) {\n onNotify(notifyWith);\n }\n\n promise.notify(notifyWith);\n });\n\n return promise;\n },\n\n /**\n * Registers a rejection handler. Shorthand for `.then(_, onReject)`.\n *\n * @method catch\n * @for Promise\n * @chainable\n * @param onReject Executed when\n * the promise is rejected. Receives the rejection reason as argument.\n * @return {Promise}\n */\n 'catch': function _catch(onReject) {\n return api.then(null, onReject);\n },\n\n /**\n * Send a notification to the promise.\n *\n * @method notify\n * @for Promise\n * @param {*} notifyWith Notification value\n */\n notify: function notify(notifyWith) {\n notifyCallbacks.forEach(function (callback) {\n callback(notifyWith);\n });\n },\n\n /**\n * Rejects the promise.\n *\n * @method reject\n * @for Promise\n * @param {*} rejectWith Rejection reason. Will be passed on to the\n * rejection handlers\n */\n reject: function reject(rejectWith) {\n rejectCallbacks.forEach(function (callback) {\n callback(rejectWith);\n });\n\n state = 'rejected';\n rejection = rejectWith;\n },\n\n /**\n * Resolves the promise.\n *\n * @method resolve\n * @for Promise\n * @param {*} resolveWith This value is passed on to the resolution\n * handlers attached to the promise.\n */\n resolve: function resolve(resolveWith) {\n resolveCallbacks.forEach(function (callback) {\n callback(resolveWith);\n });\n\n state = 'resolved';\n resolution = resolveWith;\n }\n };\n\n return api;\n}", "function promisifyRequest(request) {\n return new Promise((resolve, reject) => {\n // @ts-ignore - file size hacks\n request.oncomplete = request.onsuccess = () => resolve(request.result);\n // @ts-ignore - file size hacks\n request.onabort = request.onerror = () => reject(request.error);\n });\n}", "function promisifyRequest(request) {\n return new Promise((resolve, reject) => {\n // @ts-ignore - file size hacks\n request.oncomplete = request.onsuccess = () => resolve(request.result);\n // @ts-ignore - file size hacks\n request.onabort = request.onerror = () => reject(request.error);\n });\n }", "function wrap(superagent, Promise) {\n\t /**\n\t * Request object similar to superagent.Request, but with end() returning\n\t * a promise.\n\t */\n\t function PromiseRequest() {\n\t superagent.Request.apply(this, arguments);\n\t }\n\n\t // Inherit form superagent.Request\n\t PromiseRequest.prototype = Object.create(superagent.Request.prototype);\n\n\t /** Send request and get a promise that `end` was emitted */\n\t PromiseRequest.prototype.end = function (cb) {\n\t var _end = superagent.Request.prototype.end;\n\t var self = this;\n\n\t return new Promise(function (accept, reject) {\n\t _end.call(self, function (err, response) {\n\t if (cb) {\n\t cb(err, response);\n\t }\n\n\t if (err) {\n\t err.response = response;\n\t reject(err);\n\t } else {\n\t accept(response);\n\t }\n\t });\n\t });\n\t };\n\n\t /** Provide a more promise-y interface */\n\t PromiseRequest.prototype.then = function (resolve, reject) {\n\t var _end = superagent.Request.prototype.end;\n\t var self = this;\n\n\t return new Promise(function (accept, reject) {\n\t _end.call(self, function (err, response) {\n\t if (err) {\n\t err.response = response;\n\t reject(err);\n\t } else {\n\t accept(response);\n\t }\n\t });\n\t }).then(resolve, reject);\n\t };\n\n\t /**\n\t * Request builder with same interface as superagent.\n\t * It is convenient to import this as `request` in place of superagent.\n\t */\n\t var request = function request(method, url) {\n\t return new PromiseRequest(method, url);\n\t };\n\n\t /** Helper for making an options request */\n\t request.options = function (url) {\n\t return request('OPTIONS', url);\n\t };\n\n\t /** Helper for making a head request */\n\t request.head = function (url, data) {\n\t var req = request('HEAD', url);\n\t if (data) {\n\t req.send(data);\n\t }\n\t return req;\n\t };\n\n\t /** Helper for making a get request */\n\t request.get = function (url, data) {\n\t var req = request('GET', url);\n\t if (data) {\n\t req.query(data);\n\t }\n\t return req;\n\t };\n\n\t /** Helper for making a post request */\n\t request.post = function (url, data) {\n\t var req = request('POST', url);\n\t if (data) {\n\t req.send(data);\n\t }\n\t return req;\n\t };\n\n\t /** Helper for making a put request */\n\t request.put = function (url, data) {\n\t var req = request('PUT', url);\n\t if (data) {\n\t req.send(data);\n\t }\n\t return req;\n\t };\n\n\t /** Helper for making a patch request */\n\t request.patch = function (url, data) {\n\t var req = request('PATCH', url);\n\t if (data) {\n\t req.send(data);\n\t }\n\t return req;\n\t };\n\n\t /** Helper for making a delete request */\n\t request.del = function (url) {\n\t return request('DELETE', url);\n\t };\n\n\t // Export the request builder\n\t return request;\n\t}", "recordDidSave(){\n return new Promise((accept, reject)=>accept());\n }", "function Q(value){// If the object is already a Promise, return it directly. This enables\n// the resolve function to both be used to created references from objects,\n// but to tolerably coerce non-promises to promises.\nif(value instanceof Promise){return value;}// assimilate thenables\nif(isPromiseAlike(value)){return coerce(value);}else{return fulfill(value);}}", "execute(request) {\n console.log(':: executed');\n console.log(request);\n // Return rejected promise if incorrect request was passed\n // Chain can broke here\n if(this.isRequestIncorrect(request)) {\n return new Promise((resolve, reject) => {\n reject();\n });\n }\n\n console.log('asdasdalkdakljdlkjdslkjdaslkjdsalkjdasljkdsa');\n\n // Fill all params up\n const endpoint = request.getEndpoint();\n const requestParams = request.getRequestParams();\n\n // We need resolve promise without any result, because we saving request chain\n if(request.type !== 'delete' && requestParams.method === 'POST' && !requestParams.body) {\n return new Promise((resolve, reject) => {\n resolve();\n });\n }\n\n // Doing requests\n return fetch(endpoint, requestParams).then(response => {\n // Check response statuses\n const error = this.throwErrorBy(response.status || 500);\n\n if(error) {\n throw error;\n }\n \n return response.text();\n\n }).then(response => {\n if(response) {\n response = JSON.parse(response);\n }\n\n if(request.onComplete) {\n request.onComplete(response);\n }\n\n return response;\n })\n .catch(error => {\n // Internal browser fetch errors. Throws, f.e., \n // when no connection or host is not exists.\n if(error instanceof TypeError) {\n throw new Error('Не удается подключиться к серверу');\n }\n\n throw error;\n });\n }", "_asyncWrapper(result) {\r\n if (typeof result === 'object' && 'then' in result) {\r\n return result;\r\n } else {\r\n return new Promise(function(resolve) {\r\n resolve(result);\r\n });\r\n }\r\n }", "promise({ payload, request }) {\n return request.update(payload)\n }", "function Deferred () {\n var res = null,\n rej = null,\n p = new Promise((a,b)=>(res = a, rej = b));\n p.resolve = res;\n p.reject = rej;\n return p;\n}", "insertAttachment(params, division_db, token) {\n // const self = this;\n // const deferred = Q.defer();\n // const sqlQuery = `use [${division_db}]; insert into dbo.caregiverAttachments(socialSecNum,descr,str_filename) values('${\n // params.socialSecNum\n // }','${params.descr}','${params.str_filename}')`;\n // self.db\n // .request()\n // .query(sqlQuery)\n // .then(result => {\n // deferred.resolve(result);\n // })\n // .catch(err => {\n // console.error(err);\n // deferred.reject(err);\n // });\n // return deferred.promise;\n\n const self = this;\n const deferred = Q.defer();\n var ps = new sql.PreparedStatement(self.db);\n ps.input('attachment', sql.Image);\n ps.input('socialSecNum', sql.VarChar);\n ps.input('descr', sql.VarChar);\n ps.prepare(\n `use [${division_db}]; INSERT INTO dbo.caregiverAttachments(socialSecNum,descr,attachment) VALUES (@socialSecNum, @descr, @attachment)`,\n function(err) {\n if (err) {\n console.error(err);\n deferred.reject(err);\n return;\n }\n // check err\n ps.execute(params, function(err, records) {\n // check err\n if (err) {\n console.error(err);\n deferred.reject(err);\n return;\n } else {\n deferred.resolve(records);\n }\n ps.unprepare(function(err) {\n if (err) {\n console.error(err);\n // deferred.reject(err);\n } else {\n }\n // check err\n // If no error, it's been inserted!\n });\n });\n }\n );\n\n return deferred.promise;\n }", "function xdrClient (request) {\n return new PromiseObj(function (resolve) {\n\n var xdr = new XDomainRequest(),\n handler = function (_ref) {\n var type = _ref.type;\n\n\n var status = 0;\n\n if (type === 'load') {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n resolve(request.respondWith(xdr.responseText, { status: status }));\n };\n\n request.abort = function () {\n return xdr.abort();\n };\n\n xdr.open(request.method, request.getUrl());\n xdr.timeout = 0;\n xdr.onload = handler;\n xdr.onerror = handler;\n xdr.ontimeout = handler;\n xdr.onprogress = function () {};\n xdr.send(request.getBody());\n });\n}", "function xdrClient (request) {\n return new PromiseObj(function (resolve) {\n\n var xdr = new XDomainRequest(),\n handler = function (_ref) {\n var type = _ref.type;\n\n\n var status = 0;\n\n if (type === 'load') {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n resolve(request.respondWith(xdr.responseText, { status: status }));\n };\n\n request.abort = function () {\n return xdr.abort();\n };\n\n xdr.open(request.method, request.getUrl());\n xdr.timeout = 0;\n xdr.onload = handler;\n xdr.onerror = handler;\n xdr.ontimeout = handler;\n xdr.onprogress = function () {};\n xdr.send(request.getBody());\n });\n}", "static defer() {\n\t\tlet resolve = null;\n\t\tlet reject = null;\n\n\t\tconst promise = new P((res, rej) => {\n\t\t\tresolve = res;\n\t\t\treject = rej;\n\t\t});\n\n\t\treturn { resolve, reject, promise };\n\t}", "function xdrClient (request) {\n return new PromiseObj(function (resolve) {\n\n var xdr = new XDomainRequest(), handler = function (ref) {\n var type = ref.type;\n\n\n var status = 0;\n\n if (type === 'load') {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n resolve(request.respondWith(xdr.responseText, {status: status}));\n };\n\n request.abort = function () { return xdr.abort(); };\n\n xdr.open(request.method, request.getUrl());\n\n if (request.timeout) {\n xdr.timeout = request.timeout;\n }\n\n xdr.onload = handler;\n xdr.onabort = handler;\n xdr.onerror = handler;\n xdr.ontimeout = handler;\n xdr.onprogress = function () {};\n xdr.send(request.getBody());\n });\n}", "function promisifyDBCall (obj) {\n return Q.Promise(function (resolve, reject) {\n obj.exec(function (error, result) {\n if (error) {\n return reject(error)\n } else {\n return resolve(result)\n }\n })\n })\n}", "function wrapPromise(p){\n\t\t\t\t\tp.terminate = kill;\n\t\t\t\t\tp.notify = notify;\n\n\t\t\t\t\tvar _catch = p.catch;\n\t\t\t\t\tp.catch = function(fn){\n\t\t\t\t\t\treturn wrapPromise(_catch.call(p, fn));\n\t\t\t\t\t}\n\t\t\t\t\tvar _then = p.then;\n\t\t\t\t\tp.then = function(res, err){\n\t\t\t\t\t\treturn wrapPromise(_then.call(p, res, err));\n\t\t\t\t\t}\n\t\t\t\t\treturn p;\n\t\t\t\t}", "function xdrClient (request) {\n return new PromiseObj(function (resolve) {\n\n var xdr = new XDomainRequest(), handler = function (ref) {\n var type = ref.type;\n\n\n var status = 0;\n\n if (type === 'load') {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n resolve(request.respondWith(xdr.responseText, {status: status}));\n };\n\n request.abort = function () { return xdr.abort(); };\n\n xdr.open(request.method, request.getUrl());\n\n if (request.timeout) {\n xdr.timeout = request.timeout;\n }\n\n xdr.onload = handler;\n xdr.onabort = handler;\n xdr.onerror = handler;\n xdr.ontimeout = handler;\n xdr.onprogress = function () {};\n xdr.send(request.getBody());\n });\n}", "function xdrClient (request) {\n return new PromiseObj(function (resolve) {\n\n var xdr = new XDomainRequest(), handler = function (ref) {\n var type = ref.type;\n\n\n var status = 0;\n\n if (type === 'load') {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n resolve(request.respondWith(xdr.responseText, {status: status}));\n };\n\n request.abort = function () { return xdr.abort(); };\n\n xdr.open(request.method, request.getUrl());\n\n if (request.timeout) {\n xdr.timeout = request.timeout;\n }\n\n xdr.onload = handler;\n xdr.onabort = handler;\n xdr.onerror = handler;\n xdr.ontimeout = handler;\n xdr.onprogress = function () {};\n xdr.send(request.getBody());\n });\n}", "function xdrClient (request) {\n return new PromiseObj(function (resolve) {\n\n var xdr = new XDomainRequest(), handler = function (ref) {\n var type = ref.type;\n\n\n var status = 0;\n\n if (type === 'load') {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n resolve(request.respondWith(xdr.responseText, {status: status}));\n };\n\n request.abort = function () { return xdr.abort(); };\n\n xdr.open(request.method, request.getUrl());\n\n if (request.timeout) {\n xdr.timeout = request.timeout;\n }\n\n xdr.onload = handler;\n xdr.onabort = handler;\n xdr.onerror = handler;\n xdr.ontimeout = handler;\n xdr.onprogress = function () {};\n xdr.send(request.getBody());\n });\n}", "function xdrClient (request) {\n return new PromiseObj(function (resolve) {\n\n var xdr = new XDomainRequest(), handler = function (ref) {\n var type = ref.type;\n\n\n var status = 0;\n\n if (type === 'load') {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n resolve(request.respondWith(xdr.responseText, {status: status}));\n };\n\n request.abort = function () { return xdr.abort(); };\n\n xdr.open(request.method, request.getUrl());\n\n if (request.timeout) {\n xdr.timeout = request.timeout;\n }\n\n xdr.onload = handler;\n xdr.onabort = handler;\n xdr.onerror = handler;\n xdr.ontimeout = handler;\n xdr.onprogress = function () {};\n xdr.send(request.getBody());\n });\n}", "function xdrClient (request) {\n return new PromiseObj(function (resolve) {\n\n var xdr = new XDomainRequest(), handler = function (ref) {\n var type = ref.type;\n\n\n var status = 0;\n\n if (type === 'load') {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n resolve(request.respondWith(xdr.responseText, {status: status}));\n };\n\n request.abort = function () { return xdr.abort(); };\n\n xdr.open(request.method, request.getUrl());\n\n if (request.timeout) {\n xdr.timeout = request.timeout;\n }\n\n xdr.onload = handler;\n xdr.onabort = handler;\n xdr.onerror = handler;\n xdr.ontimeout = handler;\n xdr.onprogress = function () {};\n xdr.send(request.getBody());\n });\n}", "function xdrClient (request) {\n return new PromiseObj(function (resolve) {\n\n var xdr = new XDomainRequest(), handler = function (ref) {\n var type = ref.type;\n\n\n var status = 0;\n\n if (type === 'load') {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n resolve(request.respondWith(xdr.responseText, {status: status}));\n };\n\n request.abort = function () { return xdr.abort(); };\n\n xdr.open(request.method, request.getUrl());\n\n if (request.timeout) {\n xdr.timeout = request.timeout;\n }\n\n xdr.onload = handler;\n xdr.onabort = handler;\n xdr.onerror = handler;\n xdr.ontimeout = handler;\n xdr.onprogress = function () {};\n xdr.send(request.getBody());\n });\n}", "function xdrClient (request) {\n return new PromiseObj(function (resolve) {\n\n var xdr = new XDomainRequest(), handler = function (ref) {\n var type = ref.type;\n\n\n var status = 0;\n\n if (type === 'load') {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n resolve(request.respondWith(xdr.responseText, {status: status}));\n };\n\n request.abort = function () { return xdr.abort(); };\n\n xdr.open(request.method, request.getUrl());\n\n if (request.timeout) {\n xdr.timeout = request.timeout;\n }\n\n xdr.onload = handler;\n xdr.onabort = handler;\n xdr.onerror = handler;\n xdr.ontimeout = handler;\n xdr.onprogress = function () {};\n xdr.send(request.getBody());\n });\n}", "function xdrClient (request) {\n return new PromiseObj(function (resolve) {\n\n var xdr = new XDomainRequest(), handler = function (ref) {\n var type = ref.type;\n\n\n var status = 0;\n\n if (type === 'load') {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n resolve(request.respondWith(xdr.responseText, {status: status}));\n };\n\n request.abort = function () { return xdr.abort(); };\n\n xdr.open(request.method, request.getUrl());\n\n if (request.timeout) {\n xdr.timeout = request.timeout;\n }\n\n xdr.onload = handler;\n xdr.onabort = handler;\n xdr.onerror = handler;\n xdr.ontimeout = handler;\n xdr.onprogress = function () {};\n xdr.send(request.getBody());\n });\n}", "async function getPromise(query) {\n return new Promise(async function(resolve) {\n let result = await pool.query(query);\n try {\n await resolve(result);\n } catch (err) {\n throw new Error(err);\n }\n }).catch(err => {\n throw new Error(err);\n });\n}", "function openRequestDatabase() {\r\n var indexedDBOpenRequest = indexedDB.open('request_storage');\r\n\r\n indexedDBOpenRequest.onerror = (error) => {\r\n console.log(\"[SW] ERROR: An error occurred and the IDB database could not be made.\");\r\n }\r\n\r\n indexedDBOpenRequest.onupgradeneeded = () => {\r\n // Executes if the database needs to update.\r\n indexedDBOpenRequest.result.createObjectStore('post_requests', {\r\n autoIncrement: true, keyPath: 'id'\r\n });\r\n }\r\n\r\n indexedDBOpenRequest.onsuccess = () => {\r\n POST_db = indexedDBOpenRequest.result;\r\n }\r\n}", "static resolve(f) { return new StatefulPromise(Promise.resolve(f)) }", "function makePromiseRequest(request, route, arg) {\n var args = [route];\n var i = 1;\n // the number of arguments depends on the type of the request (only for POST and PUT)\n if (arg !== undefined) {\n args[1] = arg\n i++;\n }\n return new Promise(resolve => {\n args[i] = (err, req, res, result) => {\n resolve(result);\n };\n request.apply(client, args);\n });\n}", "getLevelDBData(key) {\n let self = this; // because we are returning a promise we will need this to be able to reference 'this' inside the Promise constructor\n return new Promise(function(resolve, reject) {\n self.db.get(key, (err, value) => {\n if (err) {\n reject(500);\n } else {\n resolve(value);\n }\n });\n });\n }", "then(resolve, reject) {\n return this._deferred.promise.then(resolve, reject);\n }", "function _createRequestFacade(request, loadEndCallback) {\n var loaded = 0;\n var total = 0;\n var responseHeaders = {};\n var status = 0;\n var response = null;\n var error = null;\n\n function _getCurrentProgress() {\n // posiiton and totalSize are aliases for FF\n // found here: http://www.opensource.apple.com/source/WebCore/WebCore-1298/xml/XMLHttpRequestProgressEvent.h\n return {\n loaded: loaded,\n total: total,\n position: loaded,\n totalSize: total\n };\n }\n\n return {\n url: request.url,\n origin: request.origin,\n requestHeaders: request.headers,\n data: request.data,\n getResponse: function getResponse() {\n return {\n loaded: loaded,\n total: total,\n headers: responseHeaders,\n status: status,\n response: response,\n error: error\n };\n },\n sendHeaders: function sendHeaders(_responseHeaders_) {\n responseHeaders = mapValues(_responseHeaders_, function (value) {\n if (!Array.isArray(value)) {\n return value.split(',').map(function (header) {\n return header.trim();\n });\n } else {\n return value;\n }\n });\n\n return new Promise(function (resolve) {\n if (request.async) {\n queuedRandomAsync(function () {\n request.onheaders(responseHeaders);\n\n resolve();\n });\n } else {\n request.onheaders(responseHeaders);\n\n resolve();\n }\n });\n },\n sendProgress: function sendProgress(_loaded_) {\n loaded = _loaded_;\n\n return new Promise(function (resolve) {\n if (request.async) {\n queuedRandomAsync(function () {\n request.onprogress(_getCurrentProgress());\n\n resolve();\n });\n } else {\n request.onprogress(_getCurrentProgress());\n\n resolve();\n }\n });\n },\n sendResponse: function sendResponse(_status_, _response_) {\n status = _status_;\n response = _response_ + '';\n\n return new Promise(function (resolve) {\n if (request.async) {\n queuedRandomAsync(function () {\n request.onresponse(status, response);\n\n resolve();\n });\n } else {\n request.onresponse(status, response);\n\n resolve();\n }\n }).then(loadEndCallback);\n },\n sendError: function sendError(_error_) {\n error = _error_;\n\n return new Promise(function (resolve) {\n if (request.async) {\n queuedRandomAsync(function () {\n request.onerror(error, _getCurrentProgress());\n\n resolve();\n });\n } else {\n request.onerror(error, _getCurrentProgress());\n\n resolve();\n }\n }).then(loadEndCallback);\n }\n };\n}", "query(query){\n return (onSuccess,onFail) => {\n this.connect(() => {\n new sql.Request().query(query)\n .then((recordset) => {\n onSuccess(recordset);\n sql.close()\n })\n .catch((error) => {\n console.error('I fucked up',error);\n //lol like that ever happens\n if(onFail){\n onFail()\n }\n sql.close();\n });\n });\n }\n }", "function defer () {\n let _resolve\n let _reject\n\n const p = new Promise((resolve, reject) => {\n _resolve = resolve\n _reject = reject\n })\n\n p.resolve = _resolve\n p.reject = _reject\n\n return p\n}", "function wrapPromise(promise) {\n let status = \"pending\";\n let result;\n let suspender = promise.then(\n res => {\n status = \"success\";\n result = res;\n },\n error => {\n status = \"error\";\n result = error;\n }\n );\n return {\n read() {\n if (status === \"pending\") {\n throw suspender;\n } else if (status === \"error\") {\n throw result;\n } else if (status === \"success\") {\n return result;\n }\n }\n };\n}", "function xdrClient (request) {\n\t return new PromiseObj(function (resolve) {\n\t var xdr = new XDomainRequest(),\n\t handler = function handler(_ref) {\n\t var type = _ref.type;\n\t var status = 0;\n\n\t if (type === 'load') {\n\t status = 200;\n\t } else if (type === 'error') {\n\t status = 500;\n\t }\n\n\t resolve(request.respondWith(xdr.responseText, {\n\t status: status\n\t }));\n\t };\n\n\t request.abort = function () {\n\t return xdr.abort();\n\t };\n\n\t xdr.open(request.method, request.getUrl());\n\n\t if (request.timeout) {\n\t xdr.timeout = request.timeout;\n\t }\n\n\t xdr.onload = handler;\n\t xdr.onabort = handler;\n\t xdr.onerror = handler;\n\t xdr.ontimeout = handler;\n\n\t xdr.onprogress = function () {};\n\n\t xdr.send(request.getBody());\n\t });\n\t}", "async store({ request, response }) {}", "function coerce(promise){var deferred=defer();Q.nextTick(function(){try{promise.then(deferred.resolve,deferred.reject,deferred.notify);}catch(exception){deferred.reject(exception);}});return deferred.promise;}", "function prepare(deferred) {\n\t\tdeferred.resolve();\n\t\treturn deferred.promise;\n\t}", "run(sqlRequest, sqlParams) {\n return new Promise(function (resolve, reject) {\n let statement = DB.db.prepare(sqlRequest)\n statement.run(sqlParams, function (err) {\n if (this.changes === 1) {\n resolve(this.lastID)\n } else if (this.changes === 0) {\n reject(\n new DaoError(404, \"Entity not found\")\n )\n } else {\n reject(\n new DaoError(500, \"Internal server error\")\n )\n }\n })\n })\n }", "function defer() {\n var res, rej;\n var promise = new Promise((resolve, reject) => {\n res = resolve;\n rej = reject;\n });\n \n promise.resolve = res;\n promise.reject = rej;\n return promise;\n}", "function PromiseDelegate() {\n var _this = this;\n this._promise = new Promise(function (resolve, reject) {\n _this._resolve = resolve;\n _this._reject = reject;\n });\n }", "function wrapPromise(promise) {\n let status = \"pending\";\n let result;\n let suspender = promise.then(\n (r) => {\n status = \"success\";\n result = r;\n },\n (e) => {\n status = \"error\";\n result = e;\n }\n );\n return {\n read() {\n if (status === \"pending\") {\n throw suspender;\n } else if (status === \"error\") {\n throw result;\n } else if (status === \"success\") {\n return result;\n }\n },\n };\n}", "function PromiseDelegate() {\r\n var _this = this;\r\n this.promise = new Promise(function (resolve, reject) {\r\n _this._resolve = resolve;\r\n _this._reject = reject;\r\n });\r\n }", "function xdrClient(request) {\n return new PromiseObj(function (resolve) {\n var xdr = new XDomainRequest(),\n handler = function handler(ref) {\n var type = ref.type;\n var status = 0;\n\n if (type === 'load') {\n status = 200;\n } else if (type === 'error') {\n status = 500;\n }\n\n resolve(request.respondWith(xdr.responseText, {\n status: status\n }));\n };\n\n request.abort = function () {\n return xdr.abort();\n };\n\n xdr.open(request.method, request.getUrl());\n\n if (request.timeout) {\n xdr.timeout = request.timeout;\n }\n\n xdr.onload = handler;\n xdr.onabort = handler;\n xdr.onerror = handler;\n xdr.ontimeout = handler;\n\n xdr.onprogress = function () {};\n\n xdr.send(request.getBody());\n });\n}", "function wrap(func) {\n return _.wrap(func, function(_func) {\n var args = Array.prototype.slice.call(arguments, 1);\n return Q()\n .then(function() {\n return _func.apply(null, args);\n });\n });\n}", "_makeRequest(hash) {\n const method = hash.method || hash.type || 'GET';\n const requestData = { method, type: method, url: hash.url };\n if (isJSONStringifyable(method, hash)) {\n hash.data = JSON.stringify(hash.data);\n }\n pendingRequestCount = pendingRequestCount + 1;\n const jqXHR = (0, _ajax.default)(hash.url, hash);\n const promise = new _promise.default((resolve, reject) => {\n jqXHR.done((payload, textStatus, jqXHR) => {\n const response = this.handleResponse(jqXHR.status, (0, _parseResponseHeaders.default)(jqXHR.getAllResponseHeaders()), payload, requestData);\n if ((0, _errors.isAjaxError)(response)) {\n const rejectionParam = {\n payload,\n textStatus,\n jqXHR,\n response\n };\n Ember.run.join(null, reject, rejectionParam);\n } else {\n const resolutionParam = {\n payload,\n textStatus,\n jqXHR,\n response\n };\n Ember.run.join(null, resolve, resolutionParam);\n }\n }).fail((jqXHR, textStatus, errorThrown) => {\n Ember.runInDebug(function () {\n const message = `The server returned an empty string for ${requestData.type} ${requestData.url}, which cannot be parsed into a valid JSON. Return either null or {}.`;\n const validJSONString = !(textStatus === 'parsererror' && jqXHR.responseText === '');\n (true && Ember.warn(message, validJSONString, {\n id: 'ds.adapter.returned-empty-string-as-JSON'\n }));\n });\n const payload = this.parseErrorResponse(jqXHR.responseText) || errorThrown;\n let response;\n if (textStatus === 'timeout') {\n response = new _errors.TimeoutError();\n } else if (textStatus === 'abort') {\n response = new _errors.AbortError();\n } else {\n response = this.handleResponse(jqXHR.status, (0, _parseResponseHeaders.default)(jqXHR.getAllResponseHeaders()), payload, requestData);\n }\n const rejectionParam = {\n payload,\n textStatus,\n jqXHR,\n errorThrown,\n response\n };\n Ember.run.join(null, reject, rejectionParam);\n }).always(() => {\n pendingRequestCount = pendingRequestCount - 1;\n });\n }, `ember-ajax: ${hash.type} ${hash.url}`);\n promise.xhr = jqXHR;\n return promise;\n }", "function PromiseDelegate() {\n var _this = this;\n this.promise = new Promise(function (resolve, reject) {\n _this._resolve = resolve;\n _this._reject = reject;\n });\n }", "function promisify(original) {\n return function promise_wrap() {\n const args = Array.prototype.slice.call(arguments);\n return new Promise((resolve, reject) => {\n original.apply(this, args.concat((err, value) => {\n if (err) return reject(err);\n resolve(value);\n }));\n });\n };\n}", "function deferred() {\n var def = {};\n def.promise = new Promise(function (resolve, reject) {\n def.resolve = resolve;\n def.reject = reject;\n });\n return def;\n}", "_startRequest() {\n if (this._timeoutID !== undefined)\n clearTimeout(this._timeoutID);\n \n this._makeRequest()\n .then(({ request }) => {\n if (!this.isStarted)\n return;\n \n let delay = this._defaultTimeout;\n \n // Read ResponseHeader\n let cacheControl = request.getResponseHeader('Cache-Control');\n if (cacheControl !== null) {\n let maxAges = /(^|,)max-age=([0-9]+)($|,)/.exec(cacheControl);\n if (maxAges !== null &&\n maxAges[2] > 0)\n delay = Math.round(maxAges[2]*1000);\n }\n \n this.trigger('success:request', { request });\n \n if (delay !== undefined)\n this._planRequest({ delay });\n }, ({ request } = {}) => {\n if (!this.isStarted)\n return;\n \n if (request === undefined)\n return;\n \n this.trigger('error:request', { request });\n \n if (this._timeoutOnError !== undefined)\n this._planRequest({ delay: this._timeoutOnError });\n });\n }", "function asyncifyTransaction (tx)\n {\n return new Promise((res, rej) => {\n tx.oncomplete = () => res();\n tx.onerror = () => rej(tx.error);\n tx.onabort = () => rej(tx.error);\n });\n }" ]
[ "0.7094169", "0.7094169", "0.7094169", "0.70420825", "0.70091957", "0.70091957", "0.70091957", "0.694663", "0.69094634", "0.69094634", "0.6599156", "0.5721129", "0.55928385", "0.5543858", "0.5541489", "0.5522081", "0.5433046", "0.54326516", "0.54326516", "0.54237807", "0.52598494", "0.5197145", "0.5123668", "0.5116072", "0.51014066", "0.5099056", "0.5078385", "0.5044891", "0.50320315", "0.49591526", "0.4939558", "0.49275792", "0.49269882", "0.49177277", "0.49064642", "0.49064642", "0.48988217", "0.48922217", "0.48735687", "0.48735687", "0.48631874", "0.48631874", "0.48631874", "0.4851021", "0.48422894", "0.48365265", "0.48126167", "0.47808993", "0.47407824", "0.4729667", "0.47036836", "0.46978307", "0.46872133", "0.46774852", "0.4672702", "0.46696785", "0.46597445", "0.46590424", "0.4651386", "0.46481183", "0.46481183", "0.46426558", "0.46356636", "0.4616742", "0.46144193", "0.46118683", "0.46118683", "0.46118683", "0.46118683", "0.46118683", "0.46118683", "0.46118683", "0.46118683", "0.4609331", "0.46031702", "0.45969316", "0.45957002", "0.45862633", "0.45773137", "0.4574131", "0.45703185", "0.45699978", "0.4564394", "0.45575663", "0.45571253", "0.4555473", "0.45513684", "0.45340544", "0.4526918", "0.45122856", "0.4512073", "0.45092213", "0.4507849", "0.4492549", "0.44912183", "0.44842482", "0.44749454", "0.44564873", "0.4450215", "0.44487554" ]
0.749298
0
Helper to get a typed SimpleDbStore for the mutations object store.
function mutationsStore(txn){return SimpleDb.getStore(txn,DbMutationBatch.store);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n }", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\n return getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\r\n}", "function mutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\r\n}", "function mutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\r\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, DbMutationQueue.store);\n}", "function documentMutationsStore(txn){return SimpleDb.getStore(txn,DbDocumentMutation.store);}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n }", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n}", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n}", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n }", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n}", "function mutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"c\" /* DbMutationBatch */].store);\n}", "function mutationQueuesStore(txn){return SimpleDb.getStore(txn,DbMutationQueue.store);}", "function documentMutationsStore(txn) {\n return getStore(txn, DbDocumentMutation.store);\n}", "function mutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"k\" /* DbMutationBatch */].store);\n}", "function mutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"k\" /* DbMutationBatch */].store);\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"d\" /* DbMutationQueue */].store);\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"i\" /* DbMutationQueue */].store);\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"i\" /* DbMutationQueue */].store);\n}", "function documentMutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"b\" /* DbDocumentMutation */].store);\n}", "function documentMutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"j\" /* DbDocumentMutation */].store);\n}", "function documentMutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"j\" /* DbDocumentMutation */].store);\n}", "get store() {\n\t\tif (store === null) { store = require('./stores'); }\n\t\treturn store;\n\t}", "static get store() {\n if (!this._store) {\n this._store = {};\n }\n return this._store;\n }", "function getStore() {\n if (store == undefined) {\n store = createStore(options.dbName || 'sentry-offline', options.storeName || 'queue');\n }\n\n return store;\n }", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function getStore() {\r\n if (!store){\r\n store = new FileStore(fileStoreOptions);\r\n } \r\n return store;\r\n}", "function globalTargetStore(txn){return SimpleDb.getStore(txn,DbTargetGlobal.store);}", "function getStore$1(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function createStore(options) {\n return new _Store.Store(options);\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getMetadataStore() {\n\n var metadataStore = metadata.createMetadataStore();\n\n // convenience method for registering model types with the store\n // these model types contain extensions to the type definitions from metadata.js\n var registerType = metadataStore.registerEntityTypeCtor.bind(metadataStore);\n\n registerType('User', UserModelService.model);\n\n return metadataStore;\n \n }", "function getMetadataStore() {\n\n var metadataStore = metadata.createMetadataStore();\n\n // convenience method for registering model types with the store\n // these model types contain extensions to the type definitions from metadata.js\n var registerType = metadataStore.registerEntityTypeCtor.bind(metadataStore);\n\n registerType('User', UserModelService.model);\n\n return metadataStore;\n \n }", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n }", "static get store() {\n\t\tif(!Profile.__store) {\n\t\t\tProfile.__store = new Database(\"profiles\");\n\t\t}\n\t\treturn Profile.__store;\n\t}", "function globalTargetStore(txn) {\n return getStore$1(txn, DbTargetGlobal.store);\n}", "function getStore(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return getStore$1(txn, DbTarget.store);\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function documentChangesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\r\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function getStore() {\n return LocalDBManager.getStore('wavemaker', 'offlineChangeLog');\n }", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"g\" /* DbRemoteDocument */].store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n }", "function documentTargetStore(txn) {\n return getStore$1(txn, DbTargetDocument.store);\n}", "function getStores() {\n return [MainStore];\n}", "get store() {\n return this._store;\n }", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "static makeStore(settings){\n var initialSettings = _.assign({\n jwt: \"jwt_token\",\n csrf: \"csrf_token\",\n apiUrl: \"http://www.example.com\"\n }, settings);\n \n return configureStore({\n settings: Immutable.fromJS(initialSettings)\n });\n }", "function documentTargetStore(txn){return SimpleDb.getStore(txn,DbTargetDocument.store);}", "function getStore(useLocal) {\n return useLocal ? localStorage : sessionStorage;\n }", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"j\" /* DbTargetGlobal */].store);\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n }", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"f\" /* DbTargetGlobal */].store);\n}", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"f\" /* DbTargetGlobal */].store);\n}", "function targetsStore(txn){return SimpleDb.getStore(txn,DbTarget.store);}", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"e\" /* DbRemoteDocument */].store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"e\" /* DbRemoteDocument */].store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "get store() {\n throw new Error('Implement in subclass');\n }" ]
[ "0.7262566", "0.7254679", "0.7254679", "0.7241354", "0.7234136", "0.7188179", "0.7188179", "0.7188179", "0.69904435", "0.6979045", "0.6959792", "0.6956837", "0.6956837", "0.6919272", "0.6883476", "0.6883476", "0.6883476", "0.686031", "0.686031", "0.6852942", "0.6832839", "0.6832839", "0.6832839", "0.6819749", "0.6801934", "0.6798069", "0.6789412", "0.6780822", "0.6780822", "0.64078194", "0.6400819", "0.6400819", "0.6360188", "0.6357048", "0.6357048", "0.6247048", "0.622297", "0.60944545", "0.59605175", "0.59605175", "0.5924406", "0.5909657", "0.5909657", "0.5909657", "0.59093124", "0.59009546", "0.5872464", "0.58600074", "0.58432055", "0.58419377", "0.58419377", "0.58347976", "0.58296317", "0.58296317", "0.5798774", "0.5798774", "0.57979244", "0.5728082", "0.57271904", "0.572466", "0.56985617", "0.56985617", "0.56914675", "0.5683281", "0.5683281", "0.5668023", "0.5664702", "0.56550574", "0.5633731", "0.5629935", "0.5625047", "0.56153685", "0.5611492", "0.56077164", "0.5602615", "0.5602615", "0.5602615", "0.56024", "0.56024", "0.56007475", "0.5577357", "0.55557364", "0.5548187", "0.5548187", "0.5548187", "0.5548184", "0.5539972", "0.5539972", "0.5522305", "0.55037606", "0.55037606", "0.55037606", "0.55037266", "0.54969877", "0.5470067", "0.5470067", "0.54640806", "0.5459154", "0.5459154", "0.54557866" ]
0.7238545
4
Helper to get a typed SimpleDbStore for the mutationQueues object store.
function documentMutationsStore(txn){return SimpleDb.getStore(txn,DbDocumentMutation.store);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n }", "function mutationQueuesStore(txn){return SimpleDb.getStore(txn,DbMutationQueue.store);}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"d\" /* DbMutationQueue */].store);\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"i\" /* DbMutationQueue */].store);\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"i\" /* DbMutationQueue */].store);\n}", "function mutationsStore(txn){return SimpleDb.getStore(txn,DbMutationBatch.store);}", "function getStore() {\n if (store == undefined) {\n store = createStore(options.dbName || 'sentry-offline', options.storeName || 'queue');\n }\n\n return store;\n }", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n }", "function mutationsStore(txn) {\n return getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\r\n}", "function mutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\r\n}", "function mutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\r\n}", "function mutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"k\" /* DbMutationBatch */].store);\n}", "function mutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"k\" /* DbMutationBatch */].store);\n}", "function mutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"c\" /* DbMutationBatch */].store);\n}", "get store() {\n\t\tif (store === null) { store = require('./stores'); }\n\t\treturn store;\n\t}", "static get store() {\n if (!this._store) {\n this._store = {};\n }\n return this._store;\n }", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n }", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n}", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n}", "function documentMutationsStore(txn) {\n return getStore(txn, DbDocumentMutation.store);\n}", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n}", "function getStore() {\n return LocalDBManager.getStore('wavemaker', 'offlineChangeLog');\n }", "function globalTargetStore(txn){return SimpleDb.getStore(txn,DbTargetGlobal.store);}", "function getStores() {\n return [MainStore];\n}", "function targetsStore(txn){return SimpleDb.getStore(txn,DbTarget.store);}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function createStore(options) {\n return new _Store.Store(options);\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function documentMutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"b\" /* DbDocumentMutation */].store);\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function documentMutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"j\" /* DbDocumentMutation */].store);\n}", "function documentMutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"j\" /* DbDocumentMutation */].store);\n}", "function targetsStore(txn) {\n return getStore$1(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n }", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "getStore() {\n return this.localDBManagementService.getStore('wavemaker', 'offlineChangeLog');\n }", "get store() {\n return this._store;\n }", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function documentTargetStore(txn){return SimpleDb.getStore(txn,DbTargetDocument.store);}", "function getStore(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n }", "function getStore() {\r\n if (!store){\r\n store = new FileStore(fileStoreOptions);\r\n } \r\n return store;\r\n}", "function getStore$1(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "static get store() {\n\t\tif(!Profile.__store) {\n\t\t\tProfile.__store = new Database(\"profiles\");\n\t\t}\n\t\treturn Profile.__store;\n\t}", "function globalTargetStore(txn) {\n return getStore$1(txn, DbTargetGlobal.store);\n}", "store() {\n return (this._store);\n }", "get store() {\n throw new Error('Implement in subclass');\n }", "get store() {\n throw new Error('Implement in subclass');\n }", "get msgStore() {\n\t\treturn this.server.msgStore;\n\t}", "createStore() {\n return {\n update: (_ref) => {\n let { id, msg, fields } = _ref;\n\n if (msg === \"added\" || msg === \"changed\") {\n this.set(id, fields);\n }\n },\n };\n }", "function createStore() {\n store.setItem('songs', JSON.stringify([]))\n}", "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"h\" /* DbTarget */].store);\n}", "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"g\" /* DbTarget */].store);\n}", "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"g\" /* DbTarget */].store);\n}", "static makeStore(settings){\n var initialSettings = _.assign({\n jwt: \"jwt_token\",\n csrf: \"csrf_token\",\n apiUrl: \"http://www.example.com\"\n }, settings);\n \n return configureStore({\n settings: Immutable.fromJS(initialSettings)\n });\n }", "function remoteDocumentsStore(txn){return SimpleDb.getStore(txn,DbRemoteDocument.store);}", "function documentTargetStore(txn) {\n return getStore$1(txn, DbTargetDocument.store);\n}", "function documentChangesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\r\n}", "static getStoreForComponent(componentName, id) {\n return new LocalStorageStore([componentName, id].join('-'), 'localStorage');\n }", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"j\" /* DbTargetGlobal */].store);\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function getStore(useLocal) {\n return useLocal ? localStorage : sessionStorage;\n }", "createObjectStore(storeSchema, migrationFactory) {\n const storeSchemas = [storeSchema];\n CreateObjectStore(this.indexedDB, this.dbConfig.name, this.dbConfig.version, storeSchemas, migrationFactory);\n }", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"g\" /* DbRemoteDocument */].store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function configureStore() {\n let store = createStore(\n Reducers\n )\n return store;\n}", "static getStores(props) {\n return [HeaderStore, UserStore]\n }" ]
[ "0.7988988", "0.7953138", "0.79106045", "0.790254", "0.790254", "0.7896655", "0.7845955", "0.7845955", "0.7845955", "0.75671995", "0.7545005", "0.7545005", "0.6665019", "0.648099", "0.6426391", "0.6396744", "0.63719195", "0.63719195", "0.63608813", "0.634689", "0.634689", "0.634689", "0.6032723", "0.6032723", "0.60065293", "0.5952459", "0.59053135", "0.5892942", "0.5888182", "0.5888182", "0.5888182", "0.5873192", "0.5873192", "0.5861396", "0.5850279", "0.57372046", "0.5666608", "0.5572161", "0.55491203", "0.55346775", "0.55338067", "0.5515792", "0.5512816", "0.5512816", "0.5502406", "0.54968214", "0.54968214", "0.5486895", "0.5486895", "0.5462838", "0.5459745", "0.5459745", "0.5450101", "0.5421866", "0.5412081", "0.5412081", "0.5407", "0.5407", "0.5407", "0.5400065", "0.5400065", "0.5400065", "0.5389065", "0.5382812", "0.5378759", "0.5360797", "0.5310495", "0.53041095", "0.529406", "0.52645963", "0.52437776", "0.5220426", "0.52182066", "0.52106255", "0.52106255", "0.52055097", "0.5202077", "0.5186662", "0.51717335", "0.5171585", "0.5171585", "0.51617426", "0.5147664", "0.51450485", "0.51408553", "0.51345897", "0.51168615", "0.51168615", "0.51093376", "0.5107411", "0.5098801", "0.50983804", "0.50907964", "0.50907964", "0.5086538", "0.5086538", "0.5086538", "0.5084755", "0.5073533", "0.5068125" ]
0.62911105
22
Helper to get a typed SimpleDbStore for the mutationQueues object store.
function mutationQueuesStore(txn){return SimpleDb.getStore(txn,DbMutationQueue.store);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n }", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"d\" /* DbMutationQueue */].store);\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"i\" /* DbMutationQueue */].store);\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"i\" /* DbMutationQueue */].store);\n}", "function mutationsStore(txn){return SimpleDb.getStore(txn,DbMutationBatch.store);}", "function getStore() {\n if (store == undefined) {\n store = createStore(options.dbName || 'sentry-offline', options.storeName || 'queue');\n }\n\n return store;\n }", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n }", "function mutationsStore(txn) {\n return getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\r\n}", "function mutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\r\n}", "function mutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\r\n}", "function documentMutationsStore(txn){return SimpleDb.getStore(txn,DbDocumentMutation.store);}", "function mutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"k\" /* DbMutationBatch */].store);\n}", "function mutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"k\" /* DbMutationBatch */].store);\n}", "function mutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"c\" /* DbMutationBatch */].store);\n}", "get store() {\n\t\tif (store === null) { store = require('./stores'); }\n\t\treturn store;\n\t}", "static get store() {\n if (!this._store) {\n this._store = {};\n }\n return this._store;\n }", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n }", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n}", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n}", "function documentMutationsStore(txn) {\n return getStore(txn, DbDocumentMutation.store);\n}", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n}", "function getStore() {\n return LocalDBManager.getStore('wavemaker', 'offlineChangeLog');\n }", "function globalTargetStore(txn){return SimpleDb.getStore(txn,DbTargetGlobal.store);}", "function getStores() {\n return [MainStore];\n}", "function targetsStore(txn){return SimpleDb.getStore(txn,DbTarget.store);}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function createStore(options) {\n return new _Store.Store(options);\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function documentMutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"b\" /* DbDocumentMutation */].store);\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function documentMutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"j\" /* DbDocumentMutation */].store);\n}", "function documentMutationsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"j\" /* DbDocumentMutation */].store);\n}", "function targetsStore(txn) {\n return getStore$1(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n }", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "getStore() {\n return this.localDBManagementService.getStore('wavemaker', 'offlineChangeLog');\n }", "get store() {\n return this._store;\n }", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function documentTargetStore(txn){return SimpleDb.getStore(txn,DbTargetDocument.store);}", "function getStore(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n }", "function getStore() {\r\n if (!store){\r\n store = new FileStore(fileStoreOptions);\r\n } \r\n return store;\r\n}", "function getStore$1(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "static get store() {\n\t\tif(!Profile.__store) {\n\t\t\tProfile.__store = new Database(\"profiles\");\n\t\t}\n\t\treturn Profile.__store;\n\t}", "function globalTargetStore(txn) {\n return getStore$1(txn, DbTargetGlobal.store);\n}", "store() {\n return (this._store);\n }", "get store() {\n throw new Error('Implement in subclass');\n }", "get store() {\n throw new Error('Implement in subclass');\n }", "get msgStore() {\n\t\treturn this.server.msgStore;\n\t}", "createStore() {\n return {\n update: (_ref) => {\n let { id, msg, fields } = _ref;\n\n if (msg === \"added\" || msg === \"changed\") {\n this.set(id, fields);\n }\n },\n };\n }", "function createStore() {\n store.setItem('songs', JSON.stringify([]))\n}", "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"h\" /* DbTarget */].store);\n}", "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"g\" /* DbTarget */].store);\n}", "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"g\" /* DbTarget */].store);\n}", "static makeStore(settings){\n var initialSettings = _.assign({\n jwt: \"jwt_token\",\n csrf: \"csrf_token\",\n apiUrl: \"http://www.example.com\"\n }, settings);\n \n return configureStore({\n settings: Immutable.fromJS(initialSettings)\n });\n }", "function remoteDocumentsStore(txn){return SimpleDb.getStore(txn,DbRemoteDocument.store);}", "function documentTargetStore(txn) {\n return getStore$1(txn, DbTargetDocument.store);\n}", "function documentChangesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\r\n}", "static getStoreForComponent(componentName, id) {\n return new LocalStorageStore([componentName, id].join('-'), 'localStorage');\n }", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"j\" /* DbTargetGlobal */].store);\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function getStore(useLocal) {\n return useLocal ? localStorage : sessionStorage;\n }", "createObjectStore(storeSchema, migrationFactory) {\n const storeSchemas = [storeSchema];\n CreateObjectStore(this.indexedDB, this.dbConfig.name, this.dbConfig.version, storeSchemas, migrationFactory);\n }", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"g\" /* DbRemoteDocument */].store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function configureStore() {\n let store = createStore(\n Reducers\n )\n return store;\n}", "static getStores(props) {\n return [HeaderStore, UserStore]\n }" ]
[ "0.7988988", "0.79106045", "0.790254", "0.790254", "0.7896655", "0.7845955", "0.7845955", "0.7845955", "0.75671995", "0.7545005", "0.7545005", "0.6665019", "0.648099", "0.6426391", "0.6396744", "0.63719195", "0.63719195", "0.63608813", "0.634689", "0.634689", "0.634689", "0.62911105", "0.6032723", "0.6032723", "0.60065293", "0.5952459", "0.59053135", "0.5892942", "0.5888182", "0.5888182", "0.5888182", "0.5873192", "0.5873192", "0.5861396", "0.5850279", "0.57372046", "0.5666608", "0.5572161", "0.55491203", "0.55346775", "0.55338067", "0.5515792", "0.5512816", "0.5512816", "0.5502406", "0.54968214", "0.54968214", "0.5486895", "0.5486895", "0.5462838", "0.5459745", "0.5459745", "0.5450101", "0.5421866", "0.5412081", "0.5412081", "0.5407", "0.5407", "0.5407", "0.5400065", "0.5400065", "0.5400065", "0.5389065", "0.5382812", "0.5378759", "0.5360797", "0.5310495", "0.53041095", "0.529406", "0.52645963", "0.52437776", "0.5220426", "0.52182066", "0.52106255", "0.52106255", "0.52055097", "0.5202077", "0.5186662", "0.51717335", "0.5171585", "0.5171585", "0.51617426", "0.5147664", "0.51450485", "0.51408553", "0.51345897", "0.51168615", "0.51168615", "0.51093376", "0.5107411", "0.5098801", "0.50983804", "0.50907964", "0.50907964", "0.5086538", "0.5086538", "0.5086538", "0.5084755", "0.5073533", "0.5068125" ]
0.7953138
1
Helper to get a typed SimpleDbStore for the queries object store.
function targetsStore(txn){return SimpleDb.getStore(txn,DbTarget.store);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "query(store, type, query) {\n return this.findQuery(store, type, query);\n }", "function getStore$1(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "function getStore() {\n if (store == undefined) {\n store = createStore(options.dbName || 'sentry-offline', options.storeName || 'queue');\n }\n\n return store;\n }", "function getStore(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, DbMutationQueue.store);\n}", "function globalTargetStore(txn){return SimpleDb.getStore(txn,DbTargetGlobal.store);}", "function documentTargetStore(txn){return SimpleDb.getStore(txn,DbTargetDocument.store);}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getObjectStore(store_name, mode) {\n var tx = db.transaction(store_name, mode);\n return tx.objectStore(store_name);\n}", "function createStore(options) {\n return new _Store.Store(options);\n}", "function makeSimpleStore(baseConnection) {\n baseConnection.constructor = makeSimpleStore;\n var behavior = Object.create(baseConnection);\n\n // this stores data like:\n // queries: {[queryKey]: {queryKey, query, recordIds}}\n // records\n return canReflect.assignMap(behavior, {\n getRecordFromParams: function(record) {\n \tvar id = canReflect.getIdentity(record, this.queryLogic.schema);\n \treturn this.getRecord(id);\n },\n\n log: function(){\n\t\t\tthis._log = true;\n\t\t},\n\n getSets: function(){\n\t\t\treturn this.getQueries();\n\t\t},\n\t\tgetQueries: function(){\n\t\t\treturn Promise.resolve(this.getQueriesSync());\n\t\t},\n\t\tgetQueriesSync: function(){\n\t\t\treturn this.getQueryDataSync().map(function(queryData){\n\t\t\t\treturn queryData.query;\n\t\t\t});\n\t\t},\n\n getListData: function(query){\n \tquery = query || {};\n \tvar listData = this.getListDataSync(query);\n \tif(listData) {\n \t\treturn Promise.resolve(listData);\n \t}\n \treturn Promise.reject({\n \t\ttitle: \"no data\",\n \t\tstatus: \"404\",\n \t\tdetail: \"No data available for this query.\\nAvailable queries: \"+\n \t\t\tJSON.stringify(this.getQueriesSync())\n \t});\n },\n\t\tgetPaginatedListDataSync: function(superSetQueryData) {\n\t\t\tvar records = this.getAllRecords();\n\t\t\tvar queryWithoutPagination = this.queryLogic.removePagination(superSetQueryData.query);\n\t\t\tvar matchingSuperRecordsNoPagination = this.queryLogic.filterMembersAndGetCount(queryWithoutPagination, {}, records);\n\t\t\tvar startIndex = indexOf(matchingSuperRecordsNoPagination.data, superSetQueryData.startIdentity, this.queryLogic);\n\t\t\tvar matchingSuperRecords = matchingSuperRecordsNoPagination.data.slice(startIndex, startIndex+ this.queryLogic.count(superSetQueryData.query));\n\t\t\treturn {\n\t\t\t\tcount: matchingSuperRecordsNoPagination.data.length,\n\t\t\t\tdata: matchingSuperRecords\n\t\t\t};\n\t\t},\n getListDataSync: function(query){\n\t\t\tvar queryData = this.getQueryDataSync(),\n\t\t\t\tsuperSetQueryData,\n\t\t\t\tisPaginated = this.queryLogic.isPaginated(query);\n\n\t\t\tfor(var i = 0; i < queryData.length; i++) {\n \t\tvar checkSet = queryData[i].query;\n \t\tif( this.queryLogic.isSubset(query, checkSet) ) {\n\t\t\t\t\tsuperSetQueryData = queryData[i];\n \t\t}\n \t}\n\t\t\tvar records = this.getAllRecords();\n\n\t\t\tif(isPaginated && this.queryLogic.isPaginated(superSetQueryData.query) ) {\n\t\t\t\tvar result = this.getPaginatedListDataSync(superSetQueryData);\n\t\t\t\treturn this.queryLogic.filterMembersAndGetCount(query, superSetQueryData.query, result.data);\n\t\t\t}\n\n var matching = this.queryLogic.filterMembersAndGetCount(query, {}, records);\n if(matching && matching.count) {\n return matching;\n }\n // now check if we have a query for it\n \tif(superSetQueryData) {\n\t\t\t\treturn {count: 0, data: []};\n\t\t\t}\n },\n\n updateListData: function(data, query){\n\t\t\tvar queryData = this.getQueryDataSync();\n \tquery = query || {};\n var clonedData = canReflect.serialize(data);\n \tvar records = getItems(clonedData);\n\t\t\t// Update or create all records\n\t\t\tthis.updateRecordsSync(records);\n\t\t\tvar isPaginated = this.queryLogic.isPaginated(query);\n\t\t\tvar identity = records.length ? canReflect.getIdentity(records[0], this.queryLogic.schema) : undefined;\n\t\t\tif(isPaginated) {\n\t\t\t\t// we are going to merge with some paginated set\n\t\t\t\tfor(var i = 0; i < queryData.length; i++) {\n\t \t\tvar checkSet = queryData[i].query;\n\t\t\t\t\tvar union = this.queryLogic.union(checkSet, query);\n\t\t\t\t\tif( this.queryLogic.isDefinedAndHasMembers(union) ) {\n\t\t\t\t\t\tvar siblingRecords = this.getPaginatedListDataSync(queryData[i]);\n\t\t\t\t\t\tvar res = this.queryLogic.unionMembers(checkSet, query, siblingRecords.data, records );\n\t\t\t\t\t\tidentity = canReflect.getIdentity(res[0], this.queryLogic.schema);\n\t\t\t\t\t\tqueryData[i] = {\n\t\t\t\t\t\t\tquery: union,\n\t\t\t\t\t\t\tstartIdentity: identity\n\t\t\t\t\t\t};\n\t\t\t\t\t\tthis.updateQueryDataSync(queryData);\n\t\t\t\t\t\treturn Promise.resolve();\n\t\t\t\t\t}\n\t \t}\n\n\t\t\t\tqueryData.push({\n\t\t\t\t\tquery: query,\n\t\t\t\t\tstartIdentity: identity\n\t\t\t\t});\n\t\t\t\tthis.updateQueryDataSync(queryData);\n\t\t\t\treturn Promise.resolve();\n\t\t\t}\n\n // we need to remove everything that would have matched this query before, but that's not in data\n // but what if it's in another set -> we remove it\n var allRecords = this.getAllRecords();\n var curretMatching = this.queryLogic.filterMembers(query, allRecords);\n if(curretMatching.length) {\n var toBeDeleted = new Map();\n curretMatching.forEach(function(record){\n toBeDeleted.set( canReflect.getIdentity(record, this.queryLogic.schema), record );\n }, this);\n\n // remove what's in records\n records.forEach(function(record){\n toBeDeleted.delete( canReflect.getIdentity(record, this.queryLogic.schema) );\n }, this);\n\n this.destroyRecords( canReflect.toArray(toBeDeleted) );\n }\n\n // the queries that are not consumed by query\n var allQueries = this.getQueryDataSync();\n var notSubsets = allQueries.filter(function(existingQueryData){\n return !this.queryLogic.isSubset(existingQueryData.query, query);\n }, this),\n superSets = notSubsets.filter(function(existingQueryData){\n return this.queryLogic.isSubset(query, existingQueryData.query);\n }, this);\n\n\t\t\t// would need to note the first record ... so we can do a query w/o pagination\n\t\t\t//\n\n // if there are sets that are parents of query\n if(superSets.length) {\n this.updateQueryDataSync(notSubsets);\n } else {\n this.updateQueryDataSync(notSubsets.concat([{\n\t\t\t\t\tquery: query,\n\t\t\t\t\tstartIdentity:identity\n\t\t\t\t}]));\n }\n\n \t// setData.push({query: query, items: data});\n \treturn Promise.resolve();\n },\n\n getData: function(params){\n \tvar id = canReflect.getIdentity(params, canReflect.getSchema( this.queryLogic ) );\n \tvar res = this.getRecord(id);\n \tif(res){\n \t\treturn Promise.resolve( res );\n \t} else {\n \t\treturn Promise.reject({\n \t\t\ttitle: \"no data\",\n \t\t\tstatus: \"404\",\n \t\t\tdetail: \"No record with matching identity (\"+id+\").\"\n \t\t});\n \t}\n },\n createData: function(record){\n\t\t\tthis.updateRecordsSync([record]);\n\n\t\t\treturn Promise.resolve(canReflect.assignMap({}, this.getRecordFromParams(record) ));\n\t\t},\n\n\t\tupdateData: function(record){\n\n\t\t\tif(this.errorOnMissingRecord && !this.getRecordFromParams(record)) {\n\t\t\t\tvar id = canReflect.getIdentity(record, this.queryLogic.schema);\n\t\t\t\treturn Promise.reject({\n\t\t\t\t\ttitle: \"no data\",\n\t\t\t\t\tstatus: \"404\",\n\t\t\t\t\tdetail: \"No record with matching identity (\"+id+\").\"\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.updateRecordsSync([record]);\n\n\t\t\treturn Promise.resolve(canReflect.assignMap({},this.getRecordFromParams(record) ));\n\t\t},\n\n\t\tdestroyData: function(record){\n\t\t\tvar id = canReflect.getIdentity(record, this.queryLogic.schema),\n\t\t\t\tsavedRecord = this.getRecordFromParams(record);\n\n\t\t\tif(this.errorOnMissingRecord && !savedRecord) {\n\n\t\t\t\treturn Promise.reject({\n\t\t\t\t\ttitle: \"no data\",\n\t\t\t\t\tstatus: \"404\",\n\t\t\t\t\tdetail: \"No record with matching identity (\"+id+\").\"\n\t\t\t\t});\n\t\t\t}\n this.destroyRecords([record]);\n\t\t\treturn Promise.resolve(canReflect.assignMap({},savedRecord || record));\n\t\t}\n });\n}", "get store() {\n\t\tif (store === null) { store = require('./stores'); }\n\t\treturn store;\n\t}", "function mutationQueuesStore(txn){return SimpleDb.getStore(txn,DbMutationQueue.store);}", "function remoteDocumentsStore(txn){return SimpleDb.getStore(txn,DbRemoteDocument.store);}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function getStores() {\n return [MainStore];\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n }", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function mutationsStore(txn){return SimpleDb.getStore(txn,DbMutationBatch.store);}", "static get store() {\n if (!this._store) {\n this._store = {};\n }\n return this._store;\n }", "function documentTargetStore(txn) {\n return getStore$1(txn, DbTargetDocument.store);\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function mutationsStore(txn) {\n return getStore(txn, DbMutationBatch.store);\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"g\" /* DbRemoteDocument */].store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getMetadataStore() {\n\n var metadataStore = metadata.createMetadataStore();\n\n // convenience method for registering model types with the store\n // these model types contain extensions to the type definitions from metadata.js\n var registerType = metadataStore.registerEntityTypeCtor.bind(metadataStore);\n\n registerType('User', UserModelService.model);\n\n return metadataStore;\n \n }", "function getMetadataStore() {\n\n var metadataStore = metadata.createMetadataStore();\n\n // convenience method for registering model types with the store\n // these model types contain extensions to the type definitions from metadata.js\n var registerType = metadataStore.registerEntityTypeCtor.bind(metadataStore);\n\n registerType('User', UserModelService.model);\n\n return metadataStore;\n \n }", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n}", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n }", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function mutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\r\n}", "function mutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\r\n}", "function mutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n }", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n }", "function documentMutationsStore(txn){return SimpleDb.getStore(txn,DbDocumentMutation.store);}", "function mutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationBatch.store);\n}", "static get store() {\n\t\tif(!Profile.__store) {\n\t\t\tProfile.__store = new Database(\"profiles\");\n\t\t}\n\t\treturn Profile.__store;\n\t}", "createObjectStore(storeSchema, migrationFactory) {\n const storeSchemas = [storeSchema];\n CreateObjectStore(this.indexedDB, this.dbConfig.name, this.dbConfig.version, storeSchemas, migrationFactory);\n }", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function globalTargetStore(txn) {\n return getStore$1(txn, DbTargetGlobal.store);\n}", "query(store, type, query) {\n\t\tif (type.proto()._isRPC) {\n\t\t\treturn this.queryRPC(store, type, query);\n\t\t} else {\n\t\t\treturn this._super(...arguments);\n\t\t}\n\t}", "function mutationQueuesStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"d\" /* DbMutationQueue */].store);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n }", "function mutationQueuesStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"i\" /* DbMutationQueue */].store);\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_5__indexeddb_schema__[\"i\" /* DbMutationQueue */].store);\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"e\" /* DbRemoteDocument */].store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"e\" /* DbRemoteDocument */].store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "query(store, type, query) {\n let url = this.buildURL(type.modelName, null, null, 'query', query);\n return this.ajax(url, 'GET');\n }", "createQuery(types) {\n const maybeExistingQuery = this.getQuery(types);\n if (maybeExistingQuery) {\n return maybeExistingQuery;\n }\n const query = new Query(types);\n this._addQuery(query);\n return query;\n }", "function targetsStore(txn) {\n return getStore$1(txn, DbTarget.store);\n}", "function documentChangesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\r\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(DbRemoteDocument.store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "query(store, type, query) {\n let { backend, id } = query;\n return this.ajax(this._url(backend, id), 'GET', { data: { list: true } }).then(resp => {\n resp.id = id;\n resp.backend = backend;\n return resp;\n });\n }", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function getStoreIndexedDB (openDB, objectStore, indexName) {\r\n let db = {};\r\n db.result = openDB.result;\r\n db.tx = db.result.transaction(objectStore, \"readwrite\");\r\n db.store = db.tx.objectStore(objectStore);\r\n //db.index = db.store.index(indexName);\r\n\r\n return db;\r\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function documentMutationsStore(txn) {\n return getStore(txn, DbDocumentMutation.store);\n}", "function getStore() {\r\n if (!store){\r\n store = new FileStore(fileStoreOptions);\r\n } \r\n return store;\r\n}", "static getStores(props) {\n return [HeaderStore, UserStore]\n }", "function Store(type, config){\n if ( ! (this instanceof Store)) {\n return new Store(type, config);\n }\n this.type = type || 'memory';\n\n // Prepare the driver.\n this.driver = new drivers[this.type](config);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "getUserStore(name){\n var users = Object.keys(this.store);\n\n // if this user doesn't have a store,\n // create one\n if(users.indexOf(name) === -1){\n this.store[name] = {};\n }\n\n return this.store[name];\n }", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"j\" /* DbTargetGlobal */].store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n }", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function CollectionStoreOf(classOf) {\n return class extends CollectionStore {\n constructor(data) {\n super(data, classOf);\n }\n };\n}", "function CollectionStoreOf(classOf) {\n return class extends CollectionStore {\n constructor(data) {\n super(data, classOf);\n }\n };\n}" ]
[ "0.6100532", "0.60333943", "0.59863836", "0.587447", "0.5815213", "0.5795527", "0.5773469", "0.5770243", "0.57691234", "0.57525134", "0.57441217", "0.57433414", "0.57347363", "0.57143736", "0.57027566", "0.57013625", "0.57013625", "0.5697619", "0.5697619", "0.56926125", "0.56926125", "0.5687441", "0.5687441", "0.5687441", "0.5674738", "0.56700045", "0.56503713", "0.55905914", "0.55905914", "0.5577381", "0.5577381", "0.5577381", "0.5543272", "0.5538469", "0.552795", "0.5523536", "0.55005777", "0.55005777", "0.54959357", "0.54959357", "0.54959357", "0.54921573", "0.547699", "0.54741776", "0.54741776", "0.5470789", "0.5470789", "0.5470058", "0.5470058", "0.5457594", "0.5456389", "0.54506075", "0.54506075", "0.54506075", "0.54432863", "0.54432863", "0.54432863", "0.5435727", "0.5431092", "0.5430606", "0.54296845", "0.54217505", "0.54111373", "0.5409514", "0.53921443", "0.5380849", "0.53770727", "0.537323", "0.53703266", "0.53703266", "0.53334576", "0.53334576", "0.53194314", "0.5311081", "0.5300855", "0.5292423", "0.52857137", "0.52857137", "0.52517956", "0.5248675", "0.5244132", "0.52376634", "0.52335757", "0.52335757", "0.5230086", "0.52266884", "0.5225648", "0.521577", "0.51896304", "0.518904", "0.5178609", "0.5178609", "0.5178609", "0.517693", "0.5160481", "0.51569146", "0.51569146", "0.51569146", "0.51531106", "0.51531106" ]
0.53117037
73
Helper to get a typed SimpleDbStore for the target globals object store.
function globalTargetStore(txn){return SimpleDb.getStore(txn,DbTargetGlobal.store);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn) {\n return getStore$1(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n }", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"j\" /* DbTargetGlobal */].store);\n}", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"f\" /* DbTargetGlobal */].store);\n}", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"f\" /* DbTargetGlobal */].store);\n}", "function getObjectStore(store_name, mode) {\n var tx = db.transaction(store_name, mode);\n return tx.objectStore(store_name);\n}", "function documentTargetStore(txn){return SimpleDb.getStore(txn,DbTargetDocument.store);}", "function documentTargetStore(txn) {\n return getStore$1(txn, DbTargetDocument.store);\n}", "get store() {\n\t\tif (store === null) { store = require('./stores'); }\n\t\treturn store;\n\t}", "function getStore() {\n if (store == undefined) {\n store = createStore(options.dbName || 'sentry-offline', options.storeName || 'queue');\n }\n\n return store;\n }", "function getStore$1(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "static get store() {\n if (!this._store) {\n this._store = {};\n }\n return this._store;\n }", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function getStore(useLocal) {\n return useLocal ? localStorage : sessionStorage;\n }", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function getStore(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function remoteDocumentsStore(txn){return SimpleDb.getStore(txn,DbRemoteDocument.store);}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function targetsStore(txn) {\n return getStore$1(txn, DbTarget.store);\n}", "static get store() {\n\t\tif(!Profile.__store) {\n\t\t\tProfile.__store = new Database(\"profiles\");\n\t\t}\n\t\treturn Profile.__store;\n\t}", "function getStores() {\n return [MainStore];\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n }", "function targetsStore(txn){return SimpleDb.getStore(txn,DbTarget.store);}", "function getCategorieStoreSingleton(){\n return Ext.StoreMgr.lookup('categorieStore') || Ext.create('BM.store.CategorieStore');\n}", "function getStoreIndexedDB (openDB, objectStore, indexName) {\r\n let db = {};\r\n db.result = openDB.result;\r\n db.tx = db.result.transaction(objectStore, \"readwrite\");\r\n db.store = db.tx.objectStore(objectStore);\r\n //db.index = db.store.index(indexName);\r\n\r\n return db;\r\n}", "function documentTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"h\" /* DbTargetDocument */].store);\n}", "function documentTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"h\" /* DbTargetDocument */].store);\n}", "function documentTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"i\" /* DbTargetDocument */].store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, DbMutationQueue.store);\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "static get projectStores() {\n return {\n calendarManagerStore : {},\n\n resourceStore : {\n dataName : 'resources'\n },\n\n eventStore : {\n dataName : 'events'\n },\n\n dependencyStore : {\n dataName : 'dependencies'\n },\n\n assignmentStore : {\n dataName : 'assignments'\n }\n };\n }", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function getStore() {\r\n if (!store){\r\n store = new FileStore(fileStoreOptions);\r\n } \r\n return store;\r\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function mutationQueuesStore(txn){return SimpleDb.getStore(txn,DbMutationQueue.store);}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function createObjectStore(database) {\n var objectStore = database.createObjectStore(window.GLOBALS.OBJECT_STORE_NAME, {\n autoIncrement: false,\n keyPath: 'id'\n });\n }", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"g\" /* DbRemoteDocument */].store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n }", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "getUserStore(name){\n var users = Object.keys(this.store);\n\n // if this user doesn't have a store,\n // create one\n if(users.indexOf(name) === -1){\n this.store[name] = {};\n }\n\n return this.store[name];\n }", "static makeStore(settings){\n var initialSettings = _.assign({\n jwt: \"jwt_token\",\n csrf: \"csrf_token\",\n apiUrl: \"http://www.example.com\"\n }, settings);\n \n return configureStore({\n settings: Immutable.fromJS(initialSettings)\n });\n }", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n }", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "static getDb (): any {\n return getDbInstance()\n }", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n }", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"e\" /* DbRemoteDocument */].store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"e\" /* DbRemoteDocument */].store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function initDB(){\n const db = new Localbase(\"TracerDB\");\n return db\n}", "function createStore(options) {\n return new _Store.Store(options);\n}", "function DbDummy() {\n var dbStore = {};\n this.get = function(storeName, dbId) {\n return nl.q(function(resolve, reject) {\n var key = nl.fmt2('{}.{}', storeName, dbId);\n if (!(key in dbStore)) {\n resolve(undefined);\n return;\n }\n resolve(dbStore[key]);\n });\n };\n\n this.put = function(storeName, value, dbId) {\n return nl.q(function(resolve, reject) {\n var key = nl.fmt2('{}.{}', storeName, dbId);\n dbStore[key] = value;\n resolve(true);\n });\n };\n\n this.clear = function() {\n return nl.q(function(resolve, reject) {\n dbStore = {};\n resolve(true);\n });\n };\n }", "function db_wrapper(idb) {\n\t\tObject.defineProperty(this, \"_db\", {\n\t\t\tconfigurable: false,\n\t\t\tenumerable: false,\n\t\t\twritable: false,\n\t\t\tvalue: idb,\n\t\t});\n\n\t\tstores.forEach(function (store) {\n\t\t\tObject.defineProperty(this, store, {\n\t\t\t\tconfigurable: false,\n\t\t\t\tenumerable: true,\n\t\t\t\twritable: false,\n\t\t\t\tvalue: new store_wrapper(store, idb),\n\t\t\t});\n\t\t}, this);\n\t}", "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"h\" /* DbTarget */].store);\n}", "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"g\" /* DbTarget */].store);\n}", "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"g\" /* DbTarget */].store);\n}", "function setStore(store) {\n var mock = new Mock(store);\n\n Storage.__Rewire__('Connection', mock);\n\n return mock;\n}", "createObjectStore(storeSchema, migrationFactory) {\n const storeSchemas = [storeSchema];\n CreateObjectStore(this.indexedDB, this.dbConfig.name, this.dbConfig.version, storeSchemas, migrationFactory);\n }", "function mutationsStore(txn){return SimpleDb.getStore(txn,DbMutationBatch.store);}", "static getStores(props) {\n return [HeaderStore, UserStore]\n }", "static getStoredObjectById(dbService, storename, id) {\n const store = getStore(storename)(dbService);\n return store.get(id);\n }", "function documentMutationsStore(txn){return SimpleDb.getStore(txn,DbDocumentMutation.store);}", "function getIdb() {\n if (!idb) {\n idb = new IndexDBWrapper('key-value-store', 1, function(db) {\n db.createObjectStore(KEY_VALUE_STORE_NAME);\n });\n }\n return idb;\n}", "function getIdb() {\n if (!idb) {\n idb = new IndexDBWrapper('key-value-store', 1, function(db) {\n db.createObjectStore(KEY_VALUE_STORE_NAME);\n });\n }\n return idb;\n}", "function documentChangesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\r\n}", "function getStore() {\n return LocalDBManager.getStore('wavemaker', 'offlineChangeLog');\n }", "function getMetadataStore() {\n\n var metadataStore = metadata.createMetadataStore();\n\n // convenience method for registering model types with the store\n // these model types contain extensions to the type definitions from metadata.js\n var registerType = metadataStore.registerEntityTypeCtor.bind(metadataStore);\n\n registerType('User', UserModelService.model);\n\n return metadataStore;\n \n }", "function getMetadataStore() {\n\n var metadataStore = metadata.createMetadataStore();\n\n // convenience method for registering model types with the store\n // these model types contain extensions to the type definitions from metadata.js\n var registerType = metadataStore.registerEntityTypeCtor.bind(metadataStore);\n\n registerType('User', UserModelService.model);\n\n return metadataStore;\n \n }", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function Store () {\n return sessionStorage;\n}", "static get projectStores() {\n return {\n resourceStore: {\n dataName: 'resources'\n },\n eventStore: {\n dataName: 'events',\n listeners: {\n change: 'onInternalEventStoreChange',\n clearchanges: 'onEventClearChanges',\n beforecommit: 'onEventBeforeCommit',\n commit: 'onEventCommit',\n exception: 'onEventException',\n idchange: 'onEventIdChange',\n beforeLoad: 'applyStartEndParameters'\n }\n },\n assignmentStore: {\n dataName: 'assignments',\n listeners: {\n change: 'onAssignmentChange',\n // In EventSelection.js\n beforeRemove: {\n fn: 'onAssignmentBeforeRemove',\n // We must go last in case an app vetoes a remove\n // by returning false from a handler.\n prio: -1000\n }\n }\n },\n dependencyStore: {\n dataName: 'dependencies'\n },\n calendarManagerStore: {}\n };\n }", "function getDb() {\n return db;\n }", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}" ]
[ "0.69850075", "0.69850075", "0.6980083", "0.6976426", "0.6976426", "0.6976426", "0.69383746", "0.68707025", "0.65998733", "0.6578231", "0.6578231", "0.63839406", "0.6356714", "0.6229351", "0.62149465", "0.61830366", "0.6102292", "0.6063662", "0.59995806", "0.5984562", "0.5961303", "0.5961303", "0.5950984", "0.5950752", "0.5950752", "0.5950752", "0.59210205", "0.5910786", "0.59092164", "0.59092164", "0.59053344", "0.5902762", "0.5902762", "0.5885388", "0.5880109", "0.58591956", "0.58330846", "0.58311194", "0.5726174", "0.5716439", "0.5714735", "0.5714735", "0.56506073", "0.56505144", "0.56505144", "0.56280124", "0.56177217", "0.56177217", "0.56177217", "0.5614754", "0.56121755", "0.5603224", "0.5602451", "0.5602451", "0.5602451", "0.55776733", "0.557653", "0.557653", "0.55571723", "0.5543896", "0.55396223", "0.55234313", "0.5518835", "0.5455194", "0.5454742", "0.5428569", "0.5428569", "0.5428569", "0.5415822", "0.5415822", "0.5399802", "0.53768027", "0.5366834", "0.5366834", "0.5357562", "0.53573835", "0.53564733", "0.5345536", "0.53429806", "0.53280884", "0.53198683", "0.53198683", "0.5284679", "0.5273103", "0.5263957", "0.5262542", "0.52564555", "0.52490646", "0.5236772", "0.5236772", "0.52236396", "0.52066946", "0.51995295", "0.51995295", "0.51924324", "0.51924324", "0.518748", "0.5187262", "0.5159131", "0.51545024" ]
0.72722685
0
Helper to get a typed SimpleDbStore for the document target object store.
function documentTargetStore(txn){return SimpleDb.getStore(txn,DbTargetDocument.store);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function documentTargetStore(txn) {\n return getStore$1(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n }", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"h\" /* DbTargetDocument */].store);\n}", "function documentTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"h\" /* DbTargetDocument */].store);\n}", "function documentTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"i\" /* DbTargetDocument */].store);\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn){return SimpleDb.getStore(txn,DbTargetGlobal.store);}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n }", "function globalTargetStore(txn) {\n return getStore$1(txn, DbTargetGlobal.store);\n}", "function targetsStore(txn) {\n return getStore$1(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function remoteDocumentsStore(txn){return SimpleDb.getStore(txn,DbRemoteDocument.store);}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n }", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"g\" /* DbRemoteDocument */].store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"j\" /* DbTargetGlobal */].store);\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n }", "function targetsStore(txn){return SimpleDb.getStore(txn,DbTarget.store);}", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"f\" /* DbTargetGlobal */].store);\n}", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"f\" /* DbTargetGlobal */].store);\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"e\" /* DbRemoteDocument */].store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"e\" /* DbRemoteDocument */].store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(DbRemoteDocument.store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "function getStore$1(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "get store() {\n\t\tif (store === null) { store = require('./stores'); }\n\t\treturn store;\n\t}", "function getObjectStore(store_name, mode) {\n var tx = db.transaction(store_name, mode);\n return tx.objectStore(store_name);\n}", "function getStore() {\n if (store == undefined) {\n store = createStore(options.dbName || 'sentry-offline', options.storeName || 'queue');\n }\n\n return store;\n }", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"g\" /* DbTarget */].store);\n}", "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"g\" /* DbTarget */].store);\n}", "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"h\" /* DbTarget */].store);\n}", "function getStore() {\r\n if (!store){\r\n store = new FileStore(fileStoreOptions);\r\n } \r\n return store;\r\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function documentChangesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\r\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "createObjectStore(storeSchema, migrationFactory) {\n const storeSchemas = [storeSchema];\n CreateObjectStore(this.indexedDB, this.dbConfig.name, this.dbConfig.version, storeSchemas, migrationFactory);\n }", "static get store() {\n if (!this._store) {\n this._store = {};\n }\n return this._store;\n }", "function createStore(options) {\n return new _Store.Store(options);\n}", "function getStoreIndexedDB (openDB, objectStore, indexName) {\r\n let db = {};\r\n db.result = openDB.result;\r\n db.tx = db.result.transaction(objectStore, \"readwrite\");\r\n db.store = db.tx.objectStore(objectStore);\r\n //db.index = db.store.index(indexName);\r\n\r\n return db;\r\n}", "function documentMutationsStore(txn) {\n return getStore(txn, DbDocumentMutation.store);\n}", "function documentMutationsStore(txn){return SimpleDb.getStore(txn,DbDocumentMutation.store);}", "function getStore(useLocal) {\n return useLocal ? localStorage : sessionStorage;\n }", "function getMetadataStore() {\n\n var metadataStore = metadata.createMetadataStore();\n\n // convenience method for registering model types with the store\n // these model types contain extensions to the type definitions from metadata.js\n var registerType = metadataStore.registerEntityTypeCtor.bind(metadataStore);\n\n registerType('User', UserModelService.model);\n\n return metadataStore;\n \n }", "function getMetadataStore() {\n\n var metadataStore = metadata.createMetadataStore();\n\n // convenience method for registering model types with the store\n // these model types contain extensions to the type definitions from metadata.js\n var registerType = metadataStore.registerEntityTypeCtor.bind(metadataStore);\n\n registerType('User', UserModelService.model);\n\n return metadataStore;\n \n }", "get store() {\n return this._store;\n }", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n}", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n}", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function documentMutationsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\r\n}", "function mutationQueuesStore(txn) {\n return getStore(txn, DbMutationQueue.store);\n}", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n}", "function documentMutationsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbDocumentMutation.store);\n }", "function createObjectStore(database) {\n var objectStore = database.createObjectStore(window.GLOBALS.OBJECT_STORE_NAME, {\n autoIncrement: false,\n keyPath: 'id'\n });\n }", "get store() {\n return this.entityServicesElements.store;\n }", "function getStores() {\n return [MainStore];\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n }", "function CollectionStoreOf(classOf) {\n return class extends CollectionStore {\n constructor(data) {\n super(data, classOf);\n }\n };\n}", "function CollectionStoreOf(classOf) {\n return class extends CollectionStore {\n constructor(data) {\n super(data, classOf);\n }\n };\n}", "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "function setStore(store) {\n var mock = new Mock(store);\n\n Storage.__Rewire__('Connection', mock);\n\n return mock;\n}", "get store() {\n throw new Error('Implement in subclass');\n }", "get store() {\n throw new Error('Implement in subclass');\n }", "function getStore() {\n return LocalDBManager.getStore('wavemaker', 'offlineChangeLog');\n }", "static get store() {\n\t\tif(!Profile.__store) {\n\t\t\tProfile.__store = new Database(\"profiles\");\n\t\t}\n\t\treturn Profile.__store;\n\t}", "function mutationQueuesStore(txn){return SimpleDb.getStore(txn,DbMutationQueue.store);}", "getUserStore(name){\n var users = Object.keys(this.store);\n\n // if this user doesn't have a store,\n // create one\n if(users.indexOf(name) === -1){\n this.store[name] = {};\n }\n\n return this.store[name];\n }" ]
[ "0.76761186", "0.75246686", "0.75246686", "0.75097156", "0.7476392", "0.7468964", "0.7468964", "0.7468964", "0.71240205", "0.71240205", "0.70817405", "0.67005974", "0.67005974", "0.6679762", "0.66677654", "0.6663487", "0.6663487", "0.6663487", "0.6607927", "0.6536626", "0.64700055", "0.64479935", "0.64479935", "0.6434177", "0.6433877", "0.641788", "0.6411687", "0.6397436", "0.6397436", "0.6397436", "0.6351145", "0.6351145", "0.6351145", "0.63497436", "0.63497436", "0.6319931", "0.63021594", "0.6289436", "0.6287775", "0.6281365", "0.6281365", "0.62661886", "0.62661886", "0.62250197", "0.6179684", "0.6156059", "0.6148885", "0.6143796", "0.60443836", "0.6022843", "0.60210675", "0.6015844", "0.6015844", "0.6014227", "0.6014227", "0.6006756", "0.6006756", "0.6001192", "0.57571024", "0.5733257", "0.5733257", "0.5732197", "0.5707975", "0.5573196", "0.5516466", "0.55090463", "0.5496342", "0.54803014", "0.54607576", "0.5389785", "0.5358677", "0.5358677", "0.535056", "0.5338863", "0.5338863", "0.5336455", "0.5336455", "0.5336455", "0.530463", "0.53033334", "0.53016466", "0.5299828", "0.52487427", "0.5214392", "0.51802796", "0.51802796", "0.5170656", "0.5170656", "0.5170656", "0.51573634", "0.513981", "0.513981", "0.51281965", "0.51272374", "0.51174885", "0.51174885", "0.5113141", "0.50965655", "0.50814044", "0.5071693" ]
0.7612641
1
Helper to get a typed SimpleDbStore for the remoteDocuments object store.
function remoteDocumentsStore(txn){return SimpleDb.getStore(txn,DbRemoteDocument.store);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n }", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"g\" /* DbRemoteDocument */].store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(DbRemoteDocument.store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"e\" /* DbRemoteDocument */].store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"e\" /* DbRemoteDocument */].store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function documentTargetStore(txn){return SimpleDb.getStore(txn,DbTargetDocument.store);}", "function documentTargetStore(txn) {\n return getStore$1(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "function getObjectStore(store_name, mode) {\n var tx = db.transaction(store_name, mode);\n return tx.objectStore(store_name);\n}", "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n }", "function getStore() {\n if (store == undefined) {\n store = createStore(options.dbName || 'sentry-offline', options.storeName || 'queue');\n }\n\n return store;\n }", "function getStore() {\r\n if (!store){\r\n store = new FileStore(fileStoreOptions);\r\n } \r\n return store;\r\n}", "function globalTargetStore(txn){return SimpleDb.getStore(txn,DbTargetGlobal.store);}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "get store() {\n\t\tif (store === null) { store = require('./stores'); }\n\t\treturn store;\n\t}", "function documentChangesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\r\n}", "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "function getStore$1(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "function documentTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"h\" /* DbTargetDocument */].store);\n}", "function documentTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"h\" /* DbTargetDocument */].store);\n}", "createObjectStore(storeSchema, migrationFactory) {\n const storeSchemas = [storeSchema];\n CreateObjectStore(this.indexedDB, this.dbConfig.name, this.dbConfig.version, storeSchemas, migrationFactory);\n }", "function createStore(options) {\n return new _Store.Store(options);\n}", "function documentTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"i\" /* DbTargetDocument */].store);\n}", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "static get store() {\n if (!this._store) {\n this._store = {};\n }\n return this._store;\n }", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(useLocal) {\n return useLocal ? localStorage : sessionStorage;\n }", "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n }", "function globalTargetStore(txn) {\n return getStore$1(txn, DbTargetGlobal.store);\n}", "function targetsStore(txn){return SimpleDb.getStore(txn,DbTarget.store);}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "get store() {\n return this.client.store;\n }", "get store() {\n return this.client.store;\n }", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\n return getStore$1(txn, DbTarget.store);\n}", "function getMetadataStore() {\n\n var metadataStore = metadata.createMetadataStore();\n\n // convenience method for registering model types with the store\n // these model types contain extensions to the type definitions from metadata.js\n var registerType = metadataStore.registerEntityTypeCtor.bind(metadataStore);\n\n registerType('User', UserModelService.model);\n\n return metadataStore;\n \n }", "function getMetadataStore() {\n\n var metadataStore = metadata.createMetadataStore();\n\n // convenience method for registering model types with the store\n // these model types contain extensions to the type definitions from metadata.js\n var registerType = metadataStore.registerEntityTypeCtor.bind(metadataStore);\n\n registerType('User', UserModelService.model);\n\n return metadataStore;\n \n }", "get store() {\n return this._store;\n }", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "function setStore(store) {\n var mock = new Mock(store);\n\n Storage.__Rewire__('Connection', mock);\n\n return mock;\n}", "function getStore() {\n return LocalDBManager.getStore('wavemaker', 'offlineChangeLog');\n }", "function createObjectStore(database) {\n var objectStore = database.createObjectStore(window.GLOBALS.OBJECT_STORE_NAME, {\n autoIncrement: false,\n keyPath: 'id'\n });\n }", "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n }", "getUserStore(name){\n var users = Object.keys(this.store);\n\n // if this user doesn't have a store,\n // create one\n if(users.indexOf(name) === -1){\n this.store[name] = {};\n }\n\n return this.store[name];\n }", "function getStores() {\n return [MainStore];\n}", "function getStoreIndexedDB (openDB, objectStore, indexName) {\r\n let db = {};\r\n db.result = openDB.result;\r\n db.tx = db.result.transaction(objectStore, \"readwrite\");\r\n db.store = db.tx.objectStore(objectStore);\r\n //db.index = db.store.index(indexName);\r\n\r\n return db;\r\n}", "function createLocalStoreSchema(db) {\n\t db.createObjectStore(LOCAL_STORE, {keyPath: '_id'})\n\t .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n\t }", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"j\" /* DbTargetGlobal */].store);\n}", "static get store() {\n\t\tif(!Profile.__store) {\n\t\t\tProfile.__store = new Database(\"profiles\");\n\t\t}\n\t\treturn Profile.__store;\n\t}", "function createLocalStoreSchema(db) {\n db.createObjectStore(LOCAL_STORE, {keyPath: '_id'})\n .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n }", "function createLocalStoreSchema(db) {\n db.createObjectStore(LOCAL_STORE, {keyPath: '_id'})\n .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n }", "function createLocalStoreSchema(db) {\n db.createObjectStore(LOCAL_STORE, {keyPath: '_id'})\n .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n }", "function createLocalStoreSchema(db) {\n db.createObjectStore(LOCAL_STORE, {keyPath: '_id'})\n .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n }", "function createLocalStoreSchema(db) {\n db.createObjectStore(LOCAL_STORE, {keyPath: '_id'})\n .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n }", "function createLocalStoreSchema(db) {\n db.createObjectStore(LOCAL_STORE, {keyPath: '_id'})\n .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n }", "function createLocalStoreSchema(db) {\n db.createObjectStore(LOCAL_STORE, {keyPath: '_id'})\n .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n }", "function createLocalStoreSchema(db) {\n db.createObjectStore(LOCAL_STORE, {keyPath: '_id'})\n .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n }", "function createLocalStoreSchema(db) {\n db.createObjectStore(LOCAL_STORE, {keyPath: '_id'})\n .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n }", "function createLocalStoreSchema(db) {\n db.createObjectStore(LOCAL_STORE, {keyPath: '_id'})\n .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n }", "function createLocalStoreSchema(db) {\n db.createObjectStore(LOCAL_STORE, {keyPath: '_id'})\n .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n }", "function createLocalStoreSchema(db) {\n db.createObjectStore(LOCAL_STORE, {keyPath: '_id'})\n .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true});\n }", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"f\" /* DbTargetGlobal */].store);\n}", "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"f\" /* DbTargetGlobal */].store);\n}", "static getStoredObjectById(dbService, storename, id) {\n const store = getStore(storename)(dbService);\n return store.get(id);\n }", "get store() {\n throw new Error('Implement in subclass');\n }", "get store() {\n throw new Error('Implement in subclass');\n }", "get store() {\n return this.entityServicesElements.store;\n }", "async function newImgStore() {\n const client = await mongo.connect(MONGO_URL);\n const db = client.db(DB_NAME);\n return new ImgStore(client, db);\n}", "store() {\n return (this._store);\n }", "function documentMutationsStore(txn){return SimpleDb.getStore(txn,DbDocumentMutation.store);}", "_storage() {\n return getStorage(get(this, '_storageType'));\n }", "storageType() {\n return this.engine || this._storageType() || \"local\";\n }", "function clientMetadataStore(txn) {\n return txn.store(DbClientMetadata.store);\n}", "function clientMetadataStore(txn) {\n return txn.store(DbClientMetadata.store);\n}" ]
[ "0.7420841", "0.7420841", "0.73864543", "0.7382824", "0.7382824", "0.7382824", "0.73813045", "0.712501", "0.7060696", "0.695434", "0.695434", "0.64717996", "0.6201942", "0.6130535", "0.6130535", "0.6085094", "0.6085094", "0.6085094", "0.60642767", "0.6031356", "0.59799445", "0.5940025", "0.5920801", "0.58886766", "0.587886", "0.587886", "0.5868685", "0.58607024", "0.58450305", "0.56918406", "0.5666121", "0.56643736", "0.56643736", "0.5642659", "0.5642659", "0.5642659", "0.56385505", "0.56385505", "0.56306547", "0.5589382", "0.5584746", "0.55839086", "0.55659753", "0.55344164", "0.55309486", "0.5505208", "0.54639167", "0.54420906", "0.54313475", "0.53702325", "0.53702325", "0.53698283", "0.53698283", "0.5348846", "0.5348846", "0.5346198", "0.5346198", "0.5324801", "0.5317028", "0.5317028", "0.5309153", "0.5286991", "0.5285591", "0.5285591", "0.5285591", "0.5276508", "0.5239052", "0.52329874", "0.52089345", "0.52000433", "0.5195527", "0.51861185", "0.5180229", "0.5150697", "0.5148796", "0.5139364", "0.5095085", "0.5095085", "0.5095085", "0.5095085", "0.5095085", "0.5095085", "0.5095085", "0.5095085", "0.5095085", "0.5095085", "0.5095085", "0.5094871", "0.5094871", "0.5092166", "0.5037721", "0.5037721", "0.5015283", "0.49879485", "0.49857828", "0.49325475", "0.4911042", "0.48780677", "0.48468223", "0.48468223" ]
0.75756115
0
A helper function for figuring out what kind of query has been stored.
function isDocumentQuery(dbQuery){return dbQuery.documents!==undefined;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function queryType(sql) {\n var ast = sqliteParser(sql)\n if (!(ast && ast.statement)) return null\n if (ast.statement.length !== 1) return null // only one SQL statement per SQL object\n return ast.statement[0].variant.toLowerCase()\n}", "get queryInputType() { return this._type; }", "function collect_query_info() {\n let query = {};\n\n let name = get_name_input();\n if (name !== null && name !== \"\") {\n query['sdn_name'] = name;\n }\n\n let type = get_type_select()\n if (type !== empty_type_field) {\n query['sdn_type'] = type;\n }\n\n let program = get_program_select()\n if (program !== empty_program_field) {\n query['program'] = program;\n }\n\n $.each(get_search_row_ids(), (index, row_id) => {\n let select = get_row_select(row_id);\n let input = get_row_input(row_id);\n if (select != empty_select && input !== null && input !== \"\") {\n query[select] = input;\n }\n });\n\n query.size = 50;\n query.from = 0;\n\n window.lastQuery = query;\n\n if (!$.isEmptyObject(query)) {\n return query;\n }\n else {\n return null;\n }\n}", "getQueryMap(schema) {\n const queryMap = {};\n // get object containing all root queries defined in the schema\n const queryTypeFields = schema._queryType._fields;\n \n // if queryTypeFields is a function, invoke it to get object with queries\n const queriesObj =\n typeof queryTypeFields === \"function\"\n ? queryTypeFields()\n : queryTypeFields;\n for (const query in queriesObj) {\n // get name of GraphQL type returned by query\n // if ofType --> this is collection, else not collection\n let returnedType;\n if (queriesObj[query].type.ofType) {\n returnedType = [];\n returnedType.push(queriesObj[query].type.ofType.name);\n }\n if (queriesObj[query].type.name) {\n returnedType = queriesObj[query].type.name;\n }\n queryMap[query] = returnedType;\n }\n return queryMap;\n }", "getQuery(types) {\n const key = buildTypeKey(types);\n if (this._queries[key]) {\n return this._queries[key];\n }\n return null;\n }", "function getCurrentWoqlQueryObject(query, settings){\n\tvar qval;\n if(!query) query = settings.query;\n\tswitch(query){\n\t\tcase 'Show_All_Schema_Elements':\n\t\t\tqval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start)\n .elementMetadata();\n\t\tbreak;\n\t\tcase 'Show_All_Classes':\n\t\t\tqval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start)\n .classMetadata();\n\t\tbreak;\n\t\tcase 'Show_All_Data':\n\t\t\tqval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start)\n .getEverything();\n\t\tbreak;\n\t\tcase 'Show_All_Documents':\n\t\t\tqval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start)\n .getAllDocuments();\n\t\tbreak;\n case 'Show_All_Document_classes':\n qval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start)\n .documentMetadata();\n break;\n case 'Show_Document_Classes':\n qval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start).and(\n TerminusClient.WOQL.quad(\"v:Element\", \"rdf:type\", \"owl:Class\", \"db:schema\"),\n TerminusClient.WOQL.abstract(\"v:Element\"),\n TerminusClient.WOQL.sub(\"v:Element\", \"tcs:Document\"),\n TerminusClient.WOQL.opt().quad(\"v:Element\", \"rdfs:label\", \"v:Label\", \"db:schema\"),\n TerminusClient.WOQL.opt().quad(\"v:Element\", \"rdfs:comment\", \"v:Comment\", \"db:schema\"));\n break;\n case 'Show_All_Properties':\n qval = TerminusClient.WOQL.limit(settings.pageLength)\n .start(settings.start)\n .propertyMetadata();\n break;\n\t\tdefault:\n\t\t\tconsole.log('Invalid query ' + query + ' passed in WOQLTextboxGenerator');\n\t\tbreak;\n\t}\n\treturn qval;\n}", "function whatType(thing) {\n return typeof (thing);\n}", "function collect_query_info() {\n let query = {};\n\n let all_fields = get_all_fields_input();\n if (all_fields !== null && all_fields !== '') {\n query['all_fields'] = all_fields;\n }\n\n let name = get_name_input();\n if (name !== null && name !== '') {\n query['all_display_names'] = name;\n }\n\n let type = get_type_select()\n if (type !== EMPTY_TYPE) {\n query['party_sub_type'] = type;\n }\n\n let program = get_program_select()\n if (program != '') {\n query['programs'] = program;\n }\n\n $.each(get_search_row_ids(), (index, row_id) => {\n let [select, input] = get_row(row_id);\n if (select != EMPTY_SELECT && input !== null && input !== \"\") {\n query[select] = input;\n }\n });\n console.log(query);\n return query;\n}", "query(store, type, query) {\n return this.findQuery(store, type, query);\n }", "function switchResult(queryType, callback) {\n switch (queryType) {\n case \"category\":\n callback(null, map.get(\"categoriesCollection\"));\n break;\n case \"services\":\n callback(null, map.get(\"servicesCollection\"));\n break;\n case \"hooks\":\n callback(null, map.get(\"hooksCollection\")); \n break;\n case \"loggers\":\n callback(null, map.get(\"loggerCollection\"));\n break;\n case \"notification\":\n callback(null, map.get(\"notificationProtocolsCollection\"));\n break;\n case \"notificationconfiguration\":\n callback(null, map.get(\"notificationConfigurationsCollection\"));\n break;\n default:\n callback(null, { \"Error\": \"kindly check for required parameters.\" });\n }\n}", "function getQType(q) {\n var type = {};\n if (/:$/.test(q)) {\n type.what = 'N';\n if (/\\[\\]:$/.test(q)) {\n type.what = 'A';\n }\n q = q.replace(/(\\[\\])?:$/, '');\n } else {\n type.what = 'E';\n }\n type.q = q;\n return type;\n }", "function get_db_type(db_name) {\n\tif (typeof db_name === 'string') {\n\t\tif (db_name.indexOf('db-') === 0) {\n\t\t\tconst pos = db_name.lastIndexOf('-');\n\t\t\treturn db_name.substring(pos + 1);\n\t\t}\n\t}\n\treturn 'unknown';\n}", "getFixedQuery() {}", "getQuery(input) {\n let inputArray = input.split(' ');\n\n if (inputArray[0] === 'how') return 'count';\n else if (inputArray[0] === 'what') return 'details';\n }", "function doingIntrospectionQuery(graphQLParams) {\n return typeof graphQLParams != undefined && graphQLParams.operationName == 'IntrospectionQuery';\n}", "function TQueries() {}", "function TQueries() {}", "function TQueries() {}", "function TQueries(){}", "getQuery() {\n return this._query ? this._query.toString() : undefined;\n }", "getQuery() {\n return this._query ? this._query.toString() : undefined;\n }", "function TQuery() {}", "function TQuery() {}", "function TQuery() {}", "function TQueries() { }", "function TQueries() { }", "function getIntrospectionQuery(options) {\n var descriptions = !(options && options.descriptions === false);\n return \"\\n query IntrospectionQuery {\\n __schema {\\n queryType { name }\\n mutationType { name }\\n subscriptionType { name }\\n types {\\n ...FullType\\n }\\n directives {\\n name\\n \".concat(descriptions ? 'description' : '', \"\\n locations\\n args {\\n ...InputValue\\n }\\n }\\n }\\n }\\n\\n fragment FullType on __Type {\\n kind\\n name\\n \").concat(descriptions ? 'description' : '', \"\\n fields(includeDeprecated: true) {\\n name\\n \").concat(descriptions ? 'description' : '', \"\\n args {\\n ...InputValue\\n }\\n type {\\n ...TypeRef\\n }\\n isDeprecated\\n deprecationReason\\n }\\n inputFields {\\n ...InputValue\\n }\\n interfaces {\\n ...TypeRef\\n }\\n enumValues(includeDeprecated: true) {\\n name\\n \").concat(descriptions ? 'description' : '', \"\\n isDeprecated\\n deprecationReason\\n }\\n possibleTypes {\\n ...TypeRef\\n }\\n }\\n\\n fragment InputValue on __InputValue {\\n name\\n \").concat(descriptions ? 'description' : '', \"\\n type { ...TypeRef }\\n defaultValue\\n }\\n\\n fragment TypeRef on __Type {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n }\\n }\\n }\\n }\\n }\\n }\\n }\\n }\\n \");\n}", "function parsequery(query) {\n query = query.substring(1, query.length);\n var queryArr = query.split('=');\n if(queryArr[0] == \"venue_id\") {\n return { type: \"venue\", id: queryArr[1] };\n } else if(queryArr[0] == \"event_id\") {\n return { type: \"event\", id: queryArr[1] };\n } else {\n return null;\n }\n}", "function whatDatatype(arg){\n return typeof(arg);\n}", "function TQuery() { }", "function TQuery() { }", "function getTypeInfo(schema, tokenState) {\n var info = {\n schema: schema,\n type: null,\n parentType: null,\n inputType: null,\n directiveDef: null,\n fieldDef: null,\n argDef: null,\n argDefs: null,\n objectFieldDefs: null\n };\n (0, _forEachState[\"default\"])(tokenState, function (state) {\n switch (state.kind) {\n case 'Query':\n case 'ShortQuery':\n info.type = schema.getQueryType();\n break;\n\n case 'Mutation':\n info.type = schema.getMutationType();\n break;\n\n case 'Subscription':\n info.type = schema.getSubscriptionType();\n break;\n\n case 'InlineFragment':\n case 'FragmentDefinition':\n if (state.type) {\n info.type = schema.getType(state.type);\n }\n\n break;\n\n case 'Field':\n case 'AliasedField':\n info.fieldDef = info.type && state.name ? getFieldDef(schema, info.parentType, state.name) : null;\n info.type = info.fieldDef && info.fieldDef.type;\n break;\n\n case 'SelectionSet':\n info.parentType = (0, _graphql.getNamedType)(info.type);\n break;\n\n case 'Directive':\n info.directiveDef = state.name && schema.getDirective(state.name);\n break;\n\n case 'Arguments':\n var parentDef = state.prevState.kind === 'Field' ? info.fieldDef : state.prevState.kind === 'Directive' ? info.directiveDef : state.prevState.kind === 'AliasedField' ? state.prevState.name && getFieldDef(schema, info.parentType, state.prevState.name) : null;\n info.argDefs = parentDef && parentDef.args;\n break;\n\n case 'Argument':\n info.argDef = null;\n\n if (info.argDefs) {\n for (var i = 0; i < info.argDefs.length; i++) {\n if (info.argDefs[i].name === state.name) {\n info.argDef = info.argDefs[i];\n break;\n }\n }\n }\n\n info.inputType = info.argDef && info.argDef.type;\n break;\n\n case 'EnumValue':\n var enumType = (0, _graphql.getNamedType)(info.inputType);\n info.enumValue = enumType instanceof _graphql.GraphQLEnumType ? find(enumType.getValues(), function (val) {\n return val.value === state.name;\n }) : null;\n break;\n\n case 'ListValue':\n var nullableType = (0, _graphql.getNullableType)(info.inputType);\n info.inputType = nullableType instanceof _graphql.GraphQLList ? nullableType.ofType : null;\n break;\n\n case 'ObjectValue':\n var objectType = (0, _graphql.getNamedType)(info.inputType);\n info.objectFieldDefs = objectType instanceof _graphql.GraphQLInputObjectType ? objectType.getFields() : null;\n break;\n\n case 'ObjectField':\n var objectField = state.name && info.objectFieldDefs ? info.objectFieldDefs[state.name] : null;\n info.inputType = objectField && objectField.type;\n break;\n\n case 'NamedType':\n info.type = schema.getType(state.name);\n break;\n }\n });\n return info;\n} // Gets the field definition given a type and field name", "query(store, type, query) {\n let { backend, id } = query;\n return this.ajax(this._url(backend, id), 'GET', { data: { list: true } }).then(resp => {\n resp.id = id;\n resp.backend = backend;\n return resp;\n });\n }", "query(store, type, query) {\n let url = this.buildURL(type.modelName, null, null, 'query', query);\n return this.ajax(url, 'GET');\n }", "function TQuery(){}", "function isDocumentQuery(dbQuery) {\r\n return dbQuery.documents !== undefined;\r\n}", "function isDocumentQuery(dbQuery) {\r\n return dbQuery.documents !== undefined;\r\n}", "function isDocumentQuery(dbQuery) {\r\n return dbQuery.documents !== undefined;\r\n}", "function isDocumentQuery(dbQuery) {\n return dbQuery.documents !== undefined;\n}", "function isDocumentQuery(dbQuery) {\n return dbQuery.documents !== undefined;\n}", "function isDocumentQuery(dbQuery) {\n return dbQuery.documents !== undefined;\n}", "function isDocumentQuery(dbQuery) {\n return dbQuery.documents !== undefined;\n}", "function isDocumentQuery(dbQuery) {\n return dbQuery.documents !== undefined;\n}", "function isDocumentQuery(dbQuery) {\n return dbQuery.documents !== undefined;\n}", "function isDocumentQuery(dbQuery) {\n return dbQuery.documents !== undefined;\n}", "function isDocumentQuery(dbQuery) {\n return dbQuery.documents !== undefined;\n}", "query(store, type, query) {\n\t\tif (type.proto()._isRPC) {\n\t\t\treturn this.queryRPC(store, type, query);\n\t\t} else {\n\t\t\treturn this._super(...arguments);\n\t\t}\n\t}", "checkExistingQuery () {\n\t\t// we match on a New Relic object ID and object type, in which case we add a new stack trace as needed\n\t\treturn {\n\t\t\tquery: {\n\t\t\t\tobjectId: this.attributes.objectId,\n\t\t\t\tobjectType: this.attributes.objectType,\n\t\t\t\tdeactivated: false\n\t\t\t},\n\t\t\thint: Indexes.byObjectId\n\t\t}\n\t}", "function LQueries(){}", "function LQueries() {}", "function LQueries() {}", "function LQueries() {}", "function checkQuery( itcb ) {\n if( args.query ) {\n\n // map form mapped fields back to schema fields\n if( args.query.editorName ) {\n args.query['editor.name'] = args.query.editorName;\n delete args.query.editorName;\n }\n if( args.query.editorInitials ) {\n args.query['editor.initials'] = args.query.editorInitials;\n delete args.query.editorInitials;\n }\n\n // there are other properties that can also filter \"timestamp\"\n if( args.query.$or && Array.isArray( args.query.$or ) ) {\n // rename \"quarterColumn\" property to \"timestamp\"\n args.query.$or.forEach( function( or ) {\n if( or.quarterColumn ) {\n or.timestamp = or.quarterColumn;\n delete or.quarterColumn;\n }\n } );\n // also apply original \"timestamp\" to \"$or\"\n if( args.query.timestamp ) {\n args.query.$or.push( {timestamp: args.query.timestamp} );\n delete args.query.timestamp;\n }\n }\n\n /**\n * [MOJ-11908]\n * Whenever a regex filter against the activity's content is queried, we intercept it.\n * This makes it possible to search the content for the so-called \"badges\" (bootstrap-labels),\n * which are rendered, if specific properties of an activity are set to true/false, or to\n * specific values (mainly ENUMs)\n * E.g. activity.phContinuousMed = true renders a badge with the abbreviation \"DM\" (in german),\n * which means \"DauerMedikament\".\n *\n * Since the user sees these patches within the content, he assumes, that one may search for the\n * label's content. In the example, this would be \"DM\".\n * So we have to be able to filter the properties in the database accordingly,\n * although the activity.content has NO knowledge of the \"DM\".\n *\n * Here, this is done by analyzing the query sent by the user,\n * and search for these abbreviations. If found, the query is altered on-the-fly,\n * to include a search for the requested parameters.\n */\n if( args.query.content && args.query.content.$regex ) {\n let CONTINUOUS_MEDICATION = i18n( 'InCaseMojit.activity_schema.CONTINUOUS_MEDICATION' ),\n SAMPLE_MEDICATION = i18n( 'InCaseMojit.activity_schema.SAMPLE_MEDICATION' ),\n ACUTE_DOK = i18n( 'InCaseMojit.activity_schema.diagnose_type.ACUTE_DOK' ),\n ACUTE_INVALIDATING = i18n( 'InCaseMojit.activity_schema.diagnose_type.ACUTE_INVALIDATING' ),\n CONT_DIAGNOSES = i18n( 'InCaseMojit.activity_schema.diagnose_type.CONT_DIAGNOSES' ),\n CONT_DIAGNOSES_DOK = i18n( 'InCaseMojit.activity_schema.diagnose_type.CONT_DIAGNOSES_DOK' ),\n CONT_DIAGNOSES_INVALIDATING = i18n( 'InCaseMojit.activity_schema.diagnose_type.CONT_DIAGNOSES_INVALIDATING' ),\n A_CONT_DIAGNOSES = i18n( 'InCaseMojit.activity_schema.diagnose_type.A_CONT_DIAGNOSES' ),\n A_CONT_DIAGNOSES_DOK = i18n( 'InCaseMojit.activity_schema.diagnose_type.A_CONT_DIAGNOSES_DOK' ),\n A_CONT_DIAGNOSES_INVALIDATING = i18n( 'InCaseMojit.activity_schema.diagnose_type.A_CONT_DIAGNOSES_INVALIDATING' ),\n EXPENSES = i18n( 'InCaseMojit.casefile_detail.group.EXPENSES' ),\n\n /**\n * An activity may provide multiple parameters, which are set to true/false,\n * or a given set of parameters. Depending on this state, a badge (bootstrap-label)\n * is displayed in the content, which shows an abbreviation, according to this state.\n * So the user sees this label, and tries to search for it, by typing the abbreviation.\n *\n * This array defines an object for each searchable property (which has a corresponding badge).\n * {\n * searchTag : abbreviation displayed in the label,\n * searchCondition: database parameters to be searched for\n * }\n * @type {Array}\n */\n propertiesToSearchFor = [\n {\n searchTag: CONTINUOUS_MEDICATION,\n searchCondition: {phContinuousMed: true}\n },\n {\n searchTag: SAMPLE_MEDICATION,\n searchCondition: {phSampleMed: true}\n },\n {\n searchTag: ACUTE_DOK,\n searchCondition: {\n diagnosisType: 'ACUTE',\n diagnosisTreatmentRelevance: 'DOKUMENTATIV'\n }\n },\n {\n searchTag: ACUTE_INVALIDATING,\n searchCondition: {\n diagnosisType: 'ACUTE',\n diagnosisTreatmentRelevance: 'INVALIDATING'\n }\n },\n {\n searchTag: CONT_DIAGNOSES,\n searchCondition: {\n diagnosisType: 'CONTINUOUS',\n diagnosisTreatmentRelevance: 'TREATMENT_RELEVANT'\n }\n },\n {\n searchTag: CONT_DIAGNOSES_DOK,\n searchCondition: {\n diagnosisType: 'CONTINUOUS',\n diagnosisTreatmentRelevance: 'DOKUMENTATIV'\n }\n },\n {\n searchTag: CONT_DIAGNOSES_INVALIDATING,\n searchCondition: {\n diagnosisType: 'CONTINUOUS',\n diagnosisTreatmentRelevance: 'INVALIDATING'\n }\n },\n {\n searchTag: A_CONT_DIAGNOSES,\n searchCondition: {\n diagnosisType: 'ANAMNESTIC',\n diagnosisTreatmentRelevance: 'TREATMENT_RELEVANT'\n }\n },\n {\n searchTag: A_CONT_DIAGNOSES_DOK,\n searchCondition: {\n diagnosisType: 'ANAMNESTIC',\n diagnosisTreatmentRelevance: 'DOKUMENTATIV'\n }\n },\n {\n searchTag: A_CONT_DIAGNOSES_INVALIDATING,\n searchCondition: {\n diagnosisType: 'ANAMNESTIC',\n diagnosisTreatmentRelevance: 'INVALIDATING'\n }\n },\n {\n searchTag: EXPENSES,\n searchCondition: {\n $and: [\n {costType: {$exists: true}},\n {costType: {$type: \"string\"}},\n {costType: {$ne: \"\"}}\n ]\n }\n },\n {\n searchTag: 'email',\n searchCondition: {savedEmails: {$exists: true}}\n\n }\n\n ],\n\n // extract the query's regex source\n queryRegexSource = (args.query.content.$regex.source || ''),\n queryRegexFlags = (args.query.content.$regex.flags || 'i');\n\n /**\n * We start, by examining the search query (which is actually a regex itself), for the occurrence of\n * the searchTags of the properties. So we filter out all occurrences, for which we have to\n * take care about. Notice: the query may additionally be limited to the beginning\n * or the end of the string, \"^\" or \"$\", respectively.\n * Examples for this regex:\n * - \"DM\", \"^DM\", \"DM$\": single occurrences\n * To search all continuous medications (DM).\n * - \"DM ExampleMedication\", \"DM ExampleMedication\", \"^DM ExampleMedication$\"\n * To search for all continuous medications (DM), and additionally those of type \"ExampleMedication\".\n * - \"DM MM\", \"^DM MM\", \"DM MM$\": multiple occurrences\n * To search for all continuous (DM) and sample medications (MM). Should generally not happen.\n */\n propertiesToSearchFor = propertiesToSearchFor\n .filter( propertyToSearch => {\n // Create multiple RegExp from the property's search tag, and match each\n // against the query. Each RegExp covers the cases explained above.\n let // watch out, the searchTag itself is escaped for regex characters\n // => this requires us to double-escape all regex-characters in our search tag,\n // to obtain a match on those (e.g. search for \"DD.d\", query is \"DD\\.d\", so we create a regex with \"DD\\\\\\.d\")\n escapedSearchTag = Y.doccirrus.commonutils.$regexEscape( Y.doccirrus.commonutils.$regexEscape( propertyToSearch.searchTag ) ),\n // get a collection of all tests to run on the user's query regex\n regexTests = [\n // match the occurrence of the searchTag at the beginning of the query\n new RegExp( \"^\\\\^?\" + escapedSearchTag + \"\\\\s\", \"gi\" ),\n\n // match the occurrence of the searchTag in the middle of the query\n new RegExp( \"\\\\s\" + escapedSearchTag + \"(\\\\s)\", \"gi\" ), // the capture group is intended here!\n\n // match the occurrence of the searchTag at the end of the query\n new RegExp( \"\\\\s\" + escapedSearchTag + \"\\\\$?$\", \"gi\" ),\n\n // match the occurrence of the searchTag as the only content of the query\n new RegExp( \"^\\\\^?\" + escapedSearchTag + \"\\\\$?$\", \"gi\" )\n ],\n tagFound = false,\n tagFoundCallback = ( match, spaceCaptureGroup ) => {\n /**\n * If yes, this function is invoked.\n * Here, we remove the occurrence of the tag from the regex string,\n * and mark the tag as found.\n * E.g.:\n * \"DD Test-Diagnosis XYZ\" => \"Test-Diagnosis XYZ\"\n *\n * NOTICE:\n * We explicitly proceed with other regex tests from the array,\n * to catch multiple occurrences of the same tag in the different positions,\n * and to properly remove these occurrences.\n * This may be caused by the user entering the tag twice,\n * e.g. \"DM test medication DM\", and him still expecting a result.\n * @type {boolean}\n */\n tagFound = true;\n\n /**\n * Replace every tag by an empty string, with one exception:\n * In case of a positioning of the tag within the string,\n * we have to keep a space, to avoid merging words.\n */\n return (typeof spaceCaptureGroup === \"string\") ? spaceCaptureGroup : '';\n };\n\n for( let regexTest of regexTests ) { //eslint-disable-line no-unused-vars\n // see, if there is a match of the query's regex source with the test regex\n queryRegexSource = queryRegexSource.replace( regexTest, tagFoundCallback );\n }\n\n // if no tag of this type was found, exclude the tag from further treatment\n return tagFound;\n } );\n\n /**\n * Now, that we have all relevant properties, and that we have cleaned the query's regex source\n * from these properties, we may map the matching properties into the query as new conditions ($and).\n */\n if( propertiesToSearchFor.length > 0 ) {\n\n // Create the new search Regex for the content, which has been cleaned from all matched tags.\n args.query.content.$regex = new RegExp( queryRegexSource, queryRegexFlags );\n\n // Ensure, that there is an $and defined ...\n if( !args.query.$and ) {\n args.query.$and = [];\n }\n // ... and that it is an array.\n if( Array.isArray( args.query.$and ) ) {\n // move the former \"content\"-query out of the original query, and into the $and.\n args.query.$and.push( {content: args.query.content} );\n delete args.query.content;\n\n // finally, map the all search conditions into the $and\n propertiesToSearchFor.map( propertyToSearch => args.query.$and.push( propertyToSearch.searchCondition ) );\n }\n }\n }\n\n }\n if( caseFileDoctorSelectFilter ) {\n args.query = {$and: [caseFileDoctorSelectFilter, args.query]};\n }\n itcb( null );\n }", "function gotAQuery( searchFormType, basicType, advancedType ) {\n var gotone = false;\n var value;\n \n if( searchFormType == basicType ) {\n value = $( \".basicField\" ).val();\n if( value && value.match(/\\S/) ) {\n gotone = true;\n }\n } else if( searchFormType == advancedType ) {\n $( \".advField\" ).each( function() {\n value = $( this ).val();\n if( value && value.match(/\\S/) ) {\n gotone = true;\n }\n } );\n }\n \n return( gotone );\n}", "function whatsTheTypeOf(input) {\n return typeof input ; //returns the type information as a string\n}", "checkExistingQuery () {\n\t\treturn null;\n\t}", "function LQueries() { }", "function LQueries() { }", "function getOperationRootType(schema, operation) {\n if (operation.operation === 'query') {\n var queryType = schema.getQueryType();\n\n if (!queryType) {\n throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"]('Schema does not define the required query root type.', operation);\n }\n\n return queryType;\n }\n\n if (operation.operation === 'mutation') {\n var mutationType = schema.getMutationType();\n\n if (!mutationType) {\n throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"]('Schema is not configured for mutations.', operation);\n }\n\n return mutationType;\n }\n\n if (operation.operation === 'subscription') {\n var subscriptionType = schema.getSubscriptionType();\n\n if (!subscriptionType) {\n throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"]('Schema is not configured for subscriptions.', operation);\n }\n\n return subscriptionType;\n }\n\n throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"]('Can only have query, mutation and subscription operations.', operation);\n}", "function getOperationRootType(schema, operation) {\n if (operation.operation === 'query') {\n var queryType = schema.getQueryType();\n\n if (!queryType) {\n throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"]('Schema does not define the required query root type.', operation);\n }\n\n return queryType;\n }\n\n if (operation.operation === 'mutation') {\n var mutationType = schema.getMutationType();\n\n if (!mutationType) {\n throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"]('Schema is not configured for mutations.', operation);\n }\n\n return mutationType;\n }\n\n if (operation.operation === 'subscription') {\n var subscriptionType = schema.getSubscriptionType();\n\n if (!subscriptionType) {\n throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"]('Schema is not configured for subscriptions.', operation);\n }\n\n return subscriptionType;\n }\n\n throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"]('Can only have query, mutation and subscription operations.', operation);\n}", "function LQuery() {}", "function LQuery() {}", "function LQuery() {}", "function getOperationRootType(schema, operation) {\n if (operation.operation === 'query') {\n var queryType = schema.getQueryType();\n\n if (!queryType) {\n throw new _GraphQLError.GraphQLError('Schema does not define the required query root type.', operation);\n }\n\n return queryType;\n }\n\n if (operation.operation === 'mutation') {\n var mutationType = schema.getMutationType();\n\n if (!mutationType) {\n throw new _GraphQLError.GraphQLError('Schema is not configured for mutations.', operation);\n }\n\n return mutationType;\n }\n\n if (operation.operation === 'subscription') {\n var subscriptionType = schema.getSubscriptionType();\n\n if (!subscriptionType) {\n throw new _GraphQLError.GraphQLError('Schema is not configured for subscriptions.', operation);\n }\n\n return subscriptionType;\n }\n\n throw new _GraphQLError.GraphQLError('Can only have query, mutation and subscription operations.', operation);\n}", "function getOperationRootType(schema, operation) {\n if (operation.operation === 'query') {\n var queryType = schema.getQueryType();\n\n if (!queryType) {\n throw new _GraphQLError.GraphQLError('Schema does not define the required query root type.', operation);\n }\n\n return queryType;\n }\n\n if (operation.operation === 'mutation') {\n var mutationType = schema.getMutationType();\n\n if (!mutationType) {\n throw new _GraphQLError.GraphQLError('Schema is not configured for mutations.', operation);\n }\n\n return mutationType;\n }\n\n if (operation.operation === 'subscription') {\n var subscriptionType = schema.getSubscriptionType();\n\n if (!subscriptionType) {\n throw new _GraphQLError.GraphQLError('Schema is not configured for subscriptions.', operation);\n }\n\n return subscriptionType;\n }\n\n throw new _GraphQLError.GraphQLError('Can only have query, mutation and subscription operations.', operation);\n}", "function LQuery() { }", "function LQuery() { }", "getQuery(queryType) {\n // let inDevMode = atom.inDevMode();\n let query = this.queryCache.get(queryType);\n if (query) { return Promise.resolve(query); }\n\n let promise = this.promisesForQueries.get(queryType);\n if (promise) { return promise; }\n\n promise = new Promise((resolve, reject) => {\n this.getLanguage().then((language) => {\n // let timeTag = `${this.scopeName} ${queryType} load time`;\n try {\n // if (inDevMode) { console.time(timeTag); }\n query = language.query(this[queryType]);\n\n // if (inDevMode) { console.timeEnd(timeTag); }\n this.queryCache.set(queryType, query);\n resolve(query);\n } catch (error) {\n // if (inDevMode) { console.timeEnd(timeTag); }\n reject(error);\n }\n });\n }).finally(() => {\n this.promisesForQueries.delete(queryType);\n });\n\n this.promisesForQueries.set(queryType, promise);\n return promise;\n }", "function isDocumentQuery(dbQuery) {\n return dbQuery.documents !== undefined;\n }", "function get_current_media_query() {\n\n if (!body.hasClass(\"yp-responsive-device-mode\")) {\n return 'desktop';\n } else {\n var w = iframe.width();\n var format = $(\".media-control\").attr(\"data-code\");\n return '(' + format + ':' + w + 'px)';\n }\n\n }", "function LQuery(){}", "function getOperationRootType(schema, operation) {\n switch (operation.operation) {\n case 'query':\n var queryType = schema.getQueryType();\n\n if (!queryType) {\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"]('Schema does not define the required query root type.', operation);\n }\n\n return queryType;\n\n case 'mutation':\n var mutationType = schema.getMutationType();\n\n if (!mutationType) {\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"]('Schema is not configured for mutations.', operation);\n }\n\n return mutationType;\n\n case 'subscription':\n var subscriptionType = schema.getSubscriptionType();\n\n if (!subscriptionType) {\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"]('Schema is not configured for subscriptions.', operation);\n }\n\n return subscriptionType;\n\n default:\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"]('Can only have query, mutation and subscription operations.', operation);\n }\n}", "function getQuery() {\n queryString = document.getElementById(\"query-input\").value;\n if (queryString != \"\")\n {\n saveQuery();\n displayQuery();\n }\n else\n {\n frontend.noInput();\n }\n}", "function whatType(val) {\n const result = typeof val\n return result\n}", "getType(): string {\n return RelayModernRecord.getType(this._record);\n }", "function getCurrentSize() {\n var matched = void 0;\n\n for (var i = 0; i < queries.length; i++) {\n var query = queries[i];\n\n if (matchMedia(query.value).matches) {\n matched = query;\n }\n }\n\n if ((typeof matched === 'undefined' ? 'undefined' : _typeof(matched)) === 'object') {\n return matched.name;\n }\n return matched;\n }", "queryRecord(_store, _type, query = {}, options = {}) {\n let preview = get(options, 'adapterOptions.preview');\n if (!query.html_path && !preview) {\n throw new Error('html_path is a required argument');\n }\n\n let url;\n if (preview) {\n let { identifier, token } = query;\n identifier = encodeURIComponent(identifier);\n token = encodeURIComponent(token);\n url = `${this.buildURL()}page_preview?identifier=${identifier}&token=${token}`;\n } else {\n url = `${this.buildURL('page')}find/?html_path=${query.html_path}`;\n }\n\n return this.ajax(url);\n }", "function getQuery(){\n\t\treturn this.query;\n\t}", "function getType(sessions) {\n return sessions.length && sessions[0].type.toLowerCase();\n}", "_getQuery(){\n let builder = this.builder;\n if( !builder ){\n throw new Error('query.builder cannot be undefined/null/false');\n }\n if( !Array.isArray(builder) ){\n throw new Error('query.builder should be an Array');\n }\n if( builder.length == 0 ){\n throw new Error('query.builder should be an Array with at least one element');\n }\n if( builder.length == 1 ){\n builder = builder[0];\n }\n if( !builder ){\n throw new Error('query.builder contained an invalid element');\n }\n switch( typeof builder ){\n case 'string':\n return [builder];\n case 'function':\n let args = builder();\n if( !args ){\n throw new Error('query builder function must return an Array of query args');\n }\n if( !Array.isArray(args) ){\n args = [args];\n }\n return args;\n case 'object':\n if( Array.isArray(builder) ){\n return builder;\n }\n default:\n throw new Error('query builder must be either an Array of args or a function that returns an Array of args');\n }\n }", "function getQueries(req, res, next) {\n var query = req.query;\n req.clientQueries = {\n sort: parseSort(query[queries.sort]),\n page: parsePaginate(query[queries.page]),\n search: query[queries.search],\n filters: parseFilters(query)\n };\n next();\n}", "function getQuery() {\n return currentPathQuery.split('?')[1];\n }", "parseQuery(query) {\r\n let finalQuery;\r\n if (typeof query === \"string\") {\r\n finalQuery = { Querytext: query };\r\n }\r\n else if (query.toSearchQuery) {\r\n finalQuery = query.toSearchQuery();\r\n }\r\n else {\r\n finalQuery = query;\r\n }\r\n return finalQuery;\r\n }", "function getType() {\n if (result.Koopprijs && !result.Huurprijs) {\n return 'koop';\n } else {\n return 'huur';\n }\n }", "function q(req){\n\treturn qs.parse(url.parse(req.url).query);\n}", "function e3_typeof(input){\n return console.log(typeof input);\n }", "function checkQuestionType(question) {\n const toRender = question.questionType;\n return toRender;\n}", "query(e, detailed) {\n const event = 'query';\n if (!e || !('query' in e)) {\n throw new TypeError(errors.redirectParams(event));\n }\n let q = e.query;\n let special, prepared;\n if (typeof q === 'string') {\n const qSmall = q.toLowerCase();\n const verbs = ['begin', 'commit', 'rollback', 'savepoint', 'release'];\n for (let i = 0; i < verbs.length; i++) {\n if (qSmall.indexOf(verbs[i]) === 0) {\n special = true;\n break;\n }\n }\n } else {\n if (typeof q === 'object' && ('name' in q || 'text' in q)) {\n // Either a Prepared Statement or a Parameterized Query;\n prepared = true;\n const msg = [];\n if ('name' in q) {\n msg.push(cct.query('name=') + '\"' + cct.value(q.name) + '\"');\n }\n if ('text' in q) {\n msg.push(cct.query('text=') + '\"' + cct.value(q.text) + '\"');\n }\n if (Array.isArray(q.values) && q.values.length) {\n msg.push(cct.query('values=') + cct.value(toJson(q.values)));\n }\n q = msg.join(', ');\n }\n }\n let qText = q;\n if (!prepared) {\n qText = special ? cct.special(q) : cct.query(q);\n }\n const d = (detailed === undefined) ? monitor.detailed : !!detailed;\n if (d && e.ctx) {\n // task/transaction details are to be reported;\n const sTag = getTagName(e), prefix = e.ctx.isTX ? 'tx' : 'task';\n if (sTag) {\n qText = cct.tx(prefix + '(') + cct.value(sTag) + cct.tx('): ') + qText;\n } else {\n qText = cct.tx(prefix + ': ') + qText;\n }\n }\n print(e, event, qText);\n if (e.params) {\n let p = e.params;\n if (typeof p !== 'string') {\n p = toJson(p);\n }\n print(e, event, timeGap + cct.paramTitle('params: ') + cct.value(p), true);\n }\n }", "get isCallbackQuery(): boolean {\n return !!this.callbackQuery && typeof this.callbackQuery === 'object';\n }", "function parseOperationType(lexer) {\n\t var operationToken = expect(lexer, _lexer.TokenKind.NAME);\n\t switch (operationToken.value) {\n\t case 'query':\n\t return 'query';\n\t case 'mutation':\n\t return 'mutation';\n\t case 'subscription':\n\t return 'subscription';\n\t }\n\n\t throw unexpected(lexer, operationToken);\n\t}", "query(name) {\n if (typeof(this.queries[name]) != 'undefined') {\n return Modernizr.mq(this.queries[name]);\n }\n return false;\n }", "function qs(t){return(qs=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}", "function findQuery(node) {\n let str = '';\n switch(node.type) {\n case 'CallExpression':\n str = callExpressionQuery(node); \n break;\n\n case 'MemberExpression':\n str = memberExpressionQuery(node);\n break;\n\n default:\n console.log('findQuery => ', node.type);\n break;\n\n }\n\n return str;\n\n}", "function determineServingType() {\n for (var i = 0; i < gees.assets.databases.length; i++) {\n var grabTargetPath = '/' + geeTargetPath;\n var databaseTargetPath = gees.assets.databases[i].target_path;\n var databaseType = gees.assets.databases[i].projection;\n if (grabTargetPath == databaseTargetPath) {\n isServing = databaseType;\n }\n }\n}", "get isQuery()\n\t{\n\t\texchWebService.commonAbFunctions.logInfo(\"exchangeAbFolderDirectory: get isQuery\");\n\t\tif (this._searchQuery) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "_getRequestType(key) {\n let table = {\n 0: \"Page View\",\n 20: \"Download Click\",\n 21: \"Anchor Click\",\n 22: \"javascript: Click\",\n 23: \"mailto: Click\",\n 24: \"Exit Click\",\n 25: \"Right-Click\",\n 26: \"Form Submit - GET\",\n 27: \"Form Submit - POST\",\n 28: \"Form Button Click - Input\",\n 29: \"Form Button Click - Button\",\n 30: \"Image Map Click\"\n };\n return table[key] || key;\n }", "function typeOfMessage(inMessage)\n{\n let result=\"\"\n if(inMessage.author.bot)\n {\n result=\"bot\"\n }\n else if(inMessage.content.toUpperCase().startsWith(\"HTTP\"))\n {\n result=\"link\"\n }\n else if(inMessage.content.startsWith(\"!\"))\n {\n result=\"command\"\n }\n else\n {\n result=\"search\"\n }\n return result\n}", "function parseQuery() {\n var searchUnparsed = document.location.search;\n if (searchUnparsed.includes(\"&\")) {\n searchParamsArr = searchUnparsed.split(\"&\");\n let query = searchParamsArr[0].split(\"=\");\n let type = searchParamsArr[1].split(\"=\");\n if (type[1] === \"name\") {\n searchByName(query[1]);\n } else if (type[1] === \"genre\") {\n let queryArr = query[1].split(\"+\");\n searchByGenre(queryArr[0], queryArr[1].split(\",\"));\n } else if (type[1] === \"esrb\") {\n searchByEsrb(query[1]);\n } else {\n // Show no results availble\n }\n }\n}", "function detectType(dataType) {\n return typeof dataType;\n}", "function isSanitized(query) {\r\n return query.trim().substring(0, 6).toLowerCase() == \"select\";\r\n}" ]
[ "0.65475506", "0.6108017", "0.58830816", "0.56711864", "0.56190723", "0.5608354", "0.55026174", "0.549569", "0.54744995", "0.544487", "0.5414351", "0.5402262", "0.53715384", "0.53588694", "0.5346877", "0.5302521", "0.5302521", "0.5302521", "0.5278363", "0.52398473", "0.52398473", "0.52017736", "0.52017736", "0.52017736", "0.5197467", "0.5197467", "0.51904744", "0.5164645", "0.51365525", "0.51203865", "0.51203865", "0.5118592", "0.511162", "0.51056564", "0.50885123", "0.5084911", "0.5084911", "0.5084911", "0.5066998", "0.5066998", "0.5066998", "0.5066998", "0.5066998", "0.5066998", "0.5066998", "0.5053095", "0.50505877", "0.50276995", "0.50252765", "0.50193286", "0.50193286", "0.50193286", "0.49799925", "0.49706757", "0.49665385", "0.4966148", "0.4961304", "0.4961304", "0.49502087", "0.49502087", "0.49498904", "0.49498904", "0.49498904", "0.49428916", "0.49428916", "0.4940572", "0.4940572", "0.49270886", "0.49248323", "0.49183944", "0.49070612", "0.49054945", "0.48860654", "0.48789933", "0.4873138", "0.48617783", "0.48505184", "0.4847904", "0.48416084", "0.48396602", "0.48343927", "0.4821128", "0.48110402", "0.4806318", "0.47994128", "0.4792982", "0.47848883", "0.47784644", "0.47757524", "0.4770095", "0.4768005", "0.47636124", "0.4755906", "0.47524247", "0.47516572", "0.4751185", "0.4749543", "0.4746051", "0.47248405", "0.47214687" ]
0.53748435
12
Builds a CredentialsProvider depending on the type of the credentials passed in.
function makeCredentialsProvider(credentials){if(!credentials){return new EmptyCredentialsProvider();}switch(credentials.type){case'gapi':return new FirstPartyCredentialsProvider(credentials.client,credentials.sessionIndex||'0');case'provider':return credentials.client;default:throw new index_esm_FirestoreError(Code.INVALID_ARGUMENT,'makeCredentialsProvider failed due to invalid credential type');}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeCredentialsProvider(credentials) {\n if (!credentials) {\n return new EmptyCredentialsProvider();\n }\n switch (credentials.type) {\n case 'google-auth':\n return new GoogleCredentialsProvider(credentials.client);\n case 'gapi':\n return new FirstPartyCredentialsProvider(credentials.client, credentials.sessionIndex || '0');\n case 'provider':\n return credentials.client;\n default:\n throw new __WEBPACK_IMPORTED_MODULE_2__util_error__[\"b\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_2__util_error__[\"a\" /* Code */].INVALID_ARGUMENT, 'makeCredentialsProvider failed due to invalid credential type');\n }\n}", "function makeCredentialsProvider(credentials) {\n if (!credentials) {\n return new EmptyCredentialsProvider();\n }\n switch (credentials.type) {\n case 'google-auth':\n return new GoogleCredentialsProvider(credentials.client);\n case 'gapi':\n return new FirstPartyCredentialsProvider(credentials.client, credentials.sessionIndex || '0');\n case 'provider':\n return credentials.client;\n default:\n throw new __WEBPACK_IMPORTED_MODULE_2__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_2__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, 'makeCredentialsProvider failed due to invalid credential type');\n }\n}", "function makeCredentialsProvider(credentials) {\n if (!credentials) {\n return new EmptyCredentialsProvider();\n }\n switch (credentials.type) {\n case 'gapi':\n return new FirstPartyCredentialsProvider(credentials.client, credentials.sessionIndex || '0');\n case 'provider':\n return credentials.client;\n default:\n throw new __WEBPACK_IMPORTED_MODULE_2__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_2__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, 'makeCredentialsProvider failed due to invalid credential type');\n }\n}", "function makeCredentialsProvider(credentials) {\n if (!credentials) {\n return new EmptyCredentialsProvider();\n }\n switch (credentials.type) {\n case 'gapi':\n return new FirstPartyCredentialsProvider(credentials.client, credentials.sessionIndex || '0');\n case 'provider':\n return credentials.client;\n default:\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'makeCredentialsProvider failed due to invalid credential type');\n }\n}", "function makeCredentialsProvider(credentials) {\n if (!credentials) {\n return new EmptyCredentialsProvider();\n }\n switch (credentials.type) {\n case 'gapi':\n return new FirstPartyCredentialsProvider(credentials.client, credentials.sessionIndex || '0');\n case 'provider':\n return credentials.client;\n default:\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'makeCredentialsProvider failed due to invalid credential type');\n }\n}", "function makeCredentialsProvider(credentials) {\n if (!credentials) {\n return new EmptyCredentialsProvider();\n }\n switch (credentials.type) {\n case 'gapi':\n return new FirstPartyCredentialsProvider(credentials.client, credentials.sessionIndex || '0');\n case 'provider':\n return credentials.client;\n default:\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'makeCredentialsProvider failed due to invalid credential type');\n }\n}", "function makeCredentialsProvider(credentials) {\n if (!credentials) {\n return new EmptyCredentialsProvider();\n }\n\n switch (credentials.type) {\n case 'gapi':\n var client = credentials.client; // Make sure this really is a Gapi client.\n\n assert(!!(typeof client === 'object' && client !== null && client['auth'] && client['auth']['getAuthHeaderValueForFirstParty']), 'unexpected gapi interface');\n return new FirstPartyCredentialsProvider(client, credentials.sessionIndex || '0');\n\n case 'provider':\n return credentials.client;\n\n default:\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'makeCredentialsProvider failed due to invalid credential type');\n }\n }", "function makeCredentialsProvider(credentials) {\n if (!credentials) {\n return new EmptyCredentialsProvider();\n }\n\n switch (credentials.type) {\n case 'gapi':\n var client = credentials.client; // Make sure this is a Gapi client.\n\n assert(!!(typeof client === 'object' && client !== null && client['auth'] && client['auth']['getAuthHeaderValueForFirstParty']), 'unexpected gapi interface');\n return new FirstPartyCredentialsProvider(client, credentials.sessionIndex || '0');\n\n case 'provider':\n return credentials.client;\n\n default:\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'makeCredentialsProvider failed due to invalid credential type');\n }\n}", "function makeCredentialsProvider(credentials) {\r\n if (!credentials) {\r\n return new EmptyCredentialsProvider();\r\n }\r\n switch (credentials.type) {\r\n case 'gapi':\r\n var client = credentials.client;\r\n // Make sure this is a Gapi client.\r\n assert(!!(typeof client === 'object' &&\r\n client !== null &&\r\n client['auth'] &&\r\n client['auth']['getAuthHeaderValueForFirstParty']), 'unexpected gapi interface');\r\n return new FirstPartyCredentialsProvider(client, credentials.sessionIndex || '0');\r\n case 'provider':\r\n return credentials.client;\r\n default:\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'makeCredentialsProvider failed due to invalid credential type');\r\n }\r\n}", "function makeCredentialsProvider(credentials) {\r\n if (!credentials) {\r\n return new EmptyCredentialsProvider();\r\n }\r\n switch (credentials.type) {\r\n case 'gapi':\r\n var client = credentials.client;\r\n // Make sure this really is a Gapi client.\r\n assert(!!(typeof client === 'object' &&\r\n client !== null &&\r\n client['auth'] &&\r\n client['auth']['getAuthHeaderValueForFirstParty']), 'unexpected gapi interface');\r\n return new FirstPartyCredentialsProvider(client, credentials.sessionIndex || '0');\r\n case 'provider':\r\n return credentials.client;\r\n default:\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'makeCredentialsProvider failed due to invalid credential type');\r\n }\r\n}", "function makeCredentialsProvider(credentials) {\r\n if (!credentials) {\r\n return new EmptyCredentialsProvider();\r\n }\r\n switch (credentials.type) {\r\n case 'gapi':\r\n var client = credentials.client;\r\n // Make sure this really is a Gapi client.\r\n assert(!!(typeof client === 'object' &&\r\n client !== null &&\r\n client['auth'] &&\r\n client['auth']['getAuthHeaderValueForFirstParty']), 'unexpected gapi interface');\r\n return new FirstPartyCredentialsProvider(client, credentials.sessionIndex || '0');\r\n case 'provider':\r\n return credentials.client;\r\n default:\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'makeCredentialsProvider failed due to invalid credential type');\r\n }\r\n}", "makeTokenProviderInstance(providerConfig) {\n if (!providerConfig || !providerConfig.driver) {\n throw new utils_1.Exception('Invalid auth config, missing \"tokenProvider\" or \"tokenProvider.driver\" property');\n }\n switch (providerConfig.driver) {\n case 'database':\n return this.makeTokenDatabaseProvider(providerConfig);\n case 'redis':\n return this.makeTokenRedisProvider(providerConfig);\n default:\n throw new utils_1.Exception(`Invalid token provider \"${providerConfig.driver}\"`);\n }\n }", "makeUserProviderInstance(mapping, providerConfig) {\n if (!providerConfig || !providerConfig.driver) {\n throw new utils_1.Exception('Invalid auth config, missing \"provider\" or \"provider.driver\" property');\n }\n switch (providerConfig.driver) {\n case 'lucid':\n return this.makeLucidProvider(providerConfig);\n case 'database':\n return this.makeDatabaseProvider(providerConfig);\n default:\n return this.makeExtendedProvider(mapping, providerConfig);\n }\n }", "static createFromGoogleCredential(googleCredentials) {\n return CallCredentials.createFromMetadataGenerator((options, callback) => {\n let getHeaders;\n if (isCurrentOauth2Client(googleCredentials)) {\n getHeaders = googleCredentials.getRequestHeaders(options.service_url);\n }\n else {\n getHeaders = new Promise((resolve, reject) => {\n googleCredentials.getRequestMetadata(options.service_url, (err, headers) => {\n if (err) {\n reject(err);\n return;\n }\n if (!headers) {\n reject(new Error('Headers not set by metadata plugin'));\n return;\n }\n resolve(headers);\n });\n });\n }\n getHeaders.then((headers) => {\n const metadata = new metadata_1.Metadata();\n for (const key of Object.keys(headers)) {\n metadata.add(key, headers[key]);\n }\n callback(null, metadata);\n }, (err) => {\n callback(err);\n });\n });\n }", "createCredential() {\n return new Credential(this);\n }", "static _create(providerId, pendingToken) {\r\n return new SAMLAuthCredential(providerId, pendingToken);\r\n }", "static _create(providerId, pendingToken) {\r\n return new SAMLAuthCredential(providerId, pendingToken);\r\n }", "function defaultProvider(init = {}) {\n const { profile = process.env[credential_provider_ini_1.ENV_PROFILE] } = init;\n const providerChain = profile\n ? credential_provider_ini_1.fromIni(init)\n : property_provider_1.chain(credential_provider_env_1.fromEnv(), credential_provider_ini_1.fromIni(init), credential_provider_process_1.fromProcess(init), remoteProvider(init));\n return property_provider_1.memoize(providerChain, credentials => credentials.expiration !== undefined &&\n credentials.expiration - getEpochTs() < 300, credentials => credentials.expiration !== undefined);\n}", "function createInjector(defType) {\n var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var additionalProviders = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var name = arguments.length > 3 ? arguments[3] : undefined;\n var injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n\n injector._resolveInjectorDefTypes();\n\n return injector;\n }", "function createInjector(defType) {\n var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var additionalProviders = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var name = arguments.length > 3 ? arguments[3] : undefined;\n var injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n\n injector._resolveInjectorDefTypes();\n\n return injector;\n}", "static createFromMetadataGenerator(metadataGenerator) {\n return new SingleCallCredentials(metadataGenerator);\n }", "create (store, config) {\n var providers = this.values(),\n cfg;\n for (var i=0; i<providers.length; ++i) {\n cfg = providers[i].prototype.init(config);\n if (cfg) return new providers[i](store, cfg);\n }\n }", "function _chooseProviderAndType(sources, providers) {\n\t for (var i = 0; i < sources.length; i++) {\n\t var source = sources[i];\n\t var chosenProvider = providers.choose(source);\n\t if (chosenProvider) {\n\t return { type: source.type, provider: chosenProvider.providerToCheck };\n\t }\n\t }\n\t\n\t return null;\n\t }", "function CredentialOperation() {\n if(!(this instanceof CredentialOperation)) {\n return new CredentialOperation();\n }\n}", "function providerToFactory(provider, ngModuleType, providers) {\n var factory = undefined;\n if (isTypeProvider(provider)) {\n return injectableDefOrInjectorDefFactory(resolveForwardRef(provider));\n }\n else {\n if (isValueProvider(provider)) {\n factory = function () { return resolveForwardRef(provider.useValue); };\n }\n else if (isExistingProvider(provider)) {\n factory = function () { return inject(resolveForwardRef(provider.useExisting)); };\n }\n else if (isFactoryProvider(provider)) {\n factory = function () { return provider.useFactory.apply(provider, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])(injectArgs(provider.deps || []))); };\n }\n else {\n var classRef_1 = resolveForwardRef(provider &&\n (provider.useClass || provider.provide));\n if (!classRef_1) {\n var ngModuleDetail = '';\n if (ngModuleType && providers) {\n var providerDetail = providers.map(function (v) { return v == provider ? '?' + provider + '?' : '...'; });\n ngModuleDetail =\n \" - only instances of Provider and Type are allowed, got: [\" + providerDetail.join(', ') + \"]\";\n }\n throw new Error(\"Invalid provider for the NgModule '\" + stringify(ngModuleType) + \"'\" + ngModuleDetail);\n }\n if (hasDeps(provider)) {\n factory = function () { return new ((classRef_1).bind.apply((classRef_1), Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])([void 0], injectArgs(provider.deps))))(); };\n }\n else {\n return injectableDefOrInjectorDefFactory(classRef_1);\n }\n }\n }\n return factory;\n}", "function providerToFactory(provider, ngModuleType, providers) {\n var factory = undefined;\n if (isTypeProvider(provider)) {\n return injectableDefOrInjectorDefFactory(resolveForwardRef(provider));\n }\n else {\n if (isValueProvider(provider)) {\n factory = function () { return resolveForwardRef(provider.useValue); };\n }\n else if (isExistingProvider(provider)) {\n factory = function () { return inject(resolveForwardRef(provider.useExisting)); };\n }\n else if (isFactoryProvider(provider)) {\n factory = function () { return provider.useFactory.apply(provider, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])(injectArgs(provider.deps || []))); };\n }\n else {\n var classRef_1 = resolveForwardRef(provider &&\n (provider.useClass || provider.provide));\n if (!classRef_1) {\n var ngModuleDetail = '';\n if (ngModuleType && providers) {\n var providerDetail = providers.map(function (v) { return v == provider ? '?' + provider + '?' : '...'; });\n ngModuleDetail =\n \" - only instances of Provider and Type are allowed, got: [\" + providerDetail.join(', ') + \"]\";\n }\n throw new Error(\"Invalid provider for the NgModule '\" + stringify(ngModuleType) + \"'\" + ngModuleDetail);\n }\n if (hasDeps(provider)) {\n factory = function () { return new ((classRef_1).bind.apply((classRef_1), Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])([void 0], injectArgs(provider.deps))))(); };\n }\n else {\n return injectableDefOrInjectorDefFactory(classRef_1);\n }\n }\n }\n return factory;\n}", "function defaultProvider(init) {\n if (init === void 0) { init = {}; }\n var _a = init.profile, profile = _a === void 0 ? process.env[ENV_PROFILE] : _a;\n var providerChain = profile\n ? fromIni(init)\n : chain(fromEnv(), fromIni(init), fromProcess(init), remoteProvider(init));\n return memoize(providerChain, function (credentials) { return credentials.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000; }, function (credentials) { return credentials.expiration !== undefined; });\n}", "async function initPrivateGit(credentials) {\n await execa_1.default('git', [\n 'config',\n '--global',\n 'credential.helper',\n `store --file ${path_1.join(os_1.homedir(), '.git-credentials')}`,\n ]);\n await fs_extra_1.writeFile(path_1.join(os_1.homedir(), '.git-credentials'), credentials);\n}", "_credential(params) {\r\n _assert(params.idToken || params.accessToken, \"argument-error\" /* ARGUMENT_ERROR */);\r\n // For OAuthCredential, sign in method is same as providerId.\r\n return OAuthCredential._fromParams(Object.assign(Object.assign({}, params), { providerId: this.providerId, signInMethod: this.providerId }));\r\n }", "_credential(params) {\r\n _assert(params.idToken || params.accessToken, \"argument-error\" /* ARGUMENT_ERROR */);\r\n // For OAuthCredential, sign in method is same as providerId.\r\n return OAuthCredential._fromParams(Object.assign(Object.assign({}, params), { providerId: this.providerId, signInMethod: this.providerId }));\r\n }", "initializeProvider(providerParameters) {\n this._baseProviderParams = providerParameters\n const { type, rpcUrl, chainId, ticker, nickname, host } = this.getProviderConfig()\n let finalType = type || host\n if (!SUPPORTED_NETWORK_TYPES[finalType]) {\n finalType = RPC\n }\n this._configureProvider({ type: finalType, rpcUrl: rpcUrl || host, chainId, ticker, nickname })\n this.lookupNetwork()\n return this._providerProxy\n }", "function providerToFactory(provider, ngModuleType, providers) {\n var factory = undefined;\n\n if (isTypeProvider(provider)) {\n var unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n } else {\n if (isValueProvider(provider)) {\n factory = function factory() {\n return resolveForwardRef(provider.useValue);\n };\n } else if (isFactoryProvider(provider)) {\n factory = function factory() {\n return provider.useFactory.apply(provider, _toConsumableArray(injectArgs(provider.deps || [])));\n };\n } else if (isExistingProvider(provider)) {\n factory = function factory() {\n return ɵɵinject(resolveForwardRef(provider.useExisting));\n };\n } else {\n var classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n\n if (hasDeps(provider)) {\n factory = function factory() {\n return _construct(classRef, _toConsumableArray(injectArgs(provider.deps)));\n };\n } else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n\n return factory;\n }", "function providerToFactory(provider,ngModuleType,providers){var factory=undefined;if(isTypeProvider(provider)){return injectableDefOrInjectorDefFactory(resolveForwardRef(provider));}else{if(isValueProvider(provider)){factory=function factory(){return resolveForwardRef(provider.useValue);};}else if(isExistingProvider(provider)){factory=function factory(){return inject(resolveForwardRef(provider.useExisting));};}else if(isFactoryProvider(provider)){factory=function factory(){return provider.useFactory.apply(provider,Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])(injectArgs(provider.deps||[])));};}else{var classRef_1=resolveForwardRef(provider&&(provider.useClass||provider.provide));if(!classRef_1){var ngModuleDetail='';if(ngModuleType&&providers){var providerDetail=providers.map(function(v){return v==provider?'?'+provider+'?':'...';});ngModuleDetail=\" - only instances of Provider and Type are allowed, got: [\"+providerDetail.join(', ')+\"]\";}throw new Error(\"Invalid provider for the NgModule '\"+stringify(ngModuleType)+\"'\"+ngModuleDetail);}if(hasDeps(provider)){factory=function factory(){return new(classRef_1.bind.apply(classRef_1,Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])([void 0],injectArgs(provider.deps))))();};}else{return injectableDefOrInjectorDefFactory(classRef_1);}}}return factory;}", "static ecr(repositories, opts) {\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_pipelines_EcrDockerCredentialOptions(opts);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationError\") {\n Error.captureStackTrace(error, this.ecr);\n }\n throw error;\n }\n return new EcrDockerCredential(repositories, opts ?? {});\n }", "function providerToFactory(provider, ngModuleType, providers) {\n var factory = undefined;\n\n if (isTypeProvider(provider)) {\n var unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n } else {\n if (isValueProvider(provider)) {\n factory = function factory() {\n return resolveForwardRef(provider.useValue);\n };\n } else if (isFactoryProvider(provider)) {\n factory = function factory() {\n return provider.useFactory.apply(provider, Object(C_Users_Abid_Loqmen_Desktop_NGforce_thesis_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(injectArgs(provider.deps || [])));\n };\n } else if (isExistingProvider(provider)) {\n factory = function factory() {\n return ɵɵinject(resolveForwardRef(provider.useExisting));\n };\n } else {\n var classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n\n if (hasDeps(provider)) {\n factory = function factory() {\n return Object(C_Users_Abid_Loqmen_Desktop_NGforce_thesis_node_modules_babel_runtime_helpers_esm_construct__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(classRef, Object(C_Users_Abid_Loqmen_Desktop_NGforce_thesis_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(injectArgs(provider.deps)));\n };\n } else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n\n return factory;\n}", "getProviderForType(type) {\n const factory = this.typeToProviderFactoryMap[type];\n return factory ? factory() : undefined;\n }", "function providerToFactory(provider, ngModuleType, providers) {\n let factory = undefined;\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n }\n else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n }\n else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n }\n else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n }\n else {\n const classRef = resolveForwardRef(provider &&\n (provider.useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new (classRef)(...injectArgs(provider.deps));\n }\n else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}", "function providerToFactory(provider, ngModuleType, providers) {\n let factory = undefined;\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n }\n else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n }\n else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n }\n else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n }\n else {\n const classRef = resolveForwardRef(provider &&\n (provider.useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new (classRef)(...injectArgs(provider.deps));\n }\n else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}", "function providerToFactory(provider, ngModuleType, providers) {\n let factory = undefined;\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n }\n else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n }\n else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n }\n else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n }\n else {\n const classRef = resolveForwardRef(provider &&\n (provider.useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new (classRef)(...injectArgs(provider.deps));\n }\n else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}", "function providerToFactory(provider, ngModuleType, providers) {\n let factory = undefined;\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n }\n else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n }\n else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n }\n else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n }\n else {\n const classRef = resolveForwardRef(provider &&\n (provider.useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new (classRef)(...injectArgs(provider.deps));\n }\n else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}", "function providerToFactory(provider, ngModuleType, providers) {\n let factory = undefined;\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n }\n else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n }\n else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n }\n else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n }\n else {\n const classRef = resolveForwardRef(provider &&\n (provider.useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new (classRef)(...injectArgs(provider.deps));\n }\n else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}", "function providerToFactory(provider, ngModuleType, providers) {\n let factory = undefined;\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n }\n else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n }\n else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n }\n else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n }\n else {\n const classRef = resolveForwardRef(provider &&\n (provider.useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new (classRef)(...injectArgs(provider.deps));\n }\n else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}", "function getCredentialsContext (hostname /*eg. www.github.com*/, cb) {\n sys.log(\"attempting to find credentials for:\" + hostname)\n //check if credentials already exist\n hostname_cred = creds[hostname]\n\n if (hostname_cred){\n sys.log('found creds already existing')\n cb(null, crypto.createCredentials({\n key: fs.readFileSync(hostname_cred.key),\n cert: fs.readFileSync(hostname_cred.cert),\n ca: fs.readFileSync('ca.crt')\n }).context)\n }\n else{\n genCredentials(hostname, cb)\n }\n\n}", "static credential(accessToken) {\r\n return OAuthCredential._fromParams({\r\n providerId: GithubAuthProvider.PROVIDER_ID,\r\n signInMethod: GithubAuthProvider.GITHUB_SIGN_IN_METHOD,\r\n accessToken\r\n });\r\n }", "static credential(accessToken) {\r\n return OAuthCredential._fromParams({\r\n providerId: GithubAuthProvider.PROVIDER_ID,\r\n signInMethod: GithubAuthProvider.GITHUB_SIGN_IN_METHOD,\r\n accessToken\r\n });\r\n }", "function challengeBasedAuthenticationPolicy(credential) {\n const tokenCache = new coreHttp.ExpiringAccessTokenCache();\n const challengeCache = new AuthenticationChallengeCache();\n return {\n create: (nextPolicy, options) => {\n return new ChallengeBasedAuthenticationPolicy(nextPolicy, options, credential, tokenCache, challengeCache);\n },\n };\n}", "function providerToFactory(provider, ngModuleType, providers) {\n var factory = undefined;\n if (isTypeProvider(provider)) {\n return injectableDefOrInjectorDefFactory(resolveForwardRef(provider));\n }\n else {\n if (isValueProvider(provider)) {\n factory = function () { return resolveForwardRef(provider.useValue); };\n }\n else if (isExistingProvider(provider)) {\n factory = function () { return ɵɵinject(resolveForwardRef(provider.useExisting)); };\n }\n else if (isFactoryProvider(provider)) {\n factory = function () { return provider.useFactory.apply(provider, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])(injectArgs(provider.deps || []))); };\n }\n else {\n var classRef_1 = resolveForwardRef(provider &&\n (provider.useClass || provider.provide));\n if (!classRef_1) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = function () { return new ((classRef_1).bind.apply((classRef_1), Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])([void 0], injectArgs(provider.deps))))(); };\n }\n else {\n return injectableDefOrInjectorDefFactory(classRef_1);\n }\n }\n }\n return factory;\n}", "function Credentials(name, pass) {\n this.name = name\n this.pass = pass\n}", "function Credentials (name, pass) {\n this.name = name\n this.pass = pass\n}", "function Credentials (name, pass) {\n this.name = name\n this.pass = pass\n}", "function Credentials (name, pass) {\n this.name = name\n this.pass = pass\n}", "function Credentials (name, pass) {\n this.name = name\n this.pass = pass\n}", "function Credentials (name, pass) {\n this.name = name\n this.pass = pass\n}", "function TeamCloudContext(credentials, $host, options) {\n var _this = this;\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if ($host === undefined) {\n throw new Error(\"'$host' cannot be null\");\n }\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n if (!options.userAgent) {\n var defaultUserAgent = coreHttp.getDefaultUserAgentValue();\n options.userAgent = packageName + \"/\" + packageVersion + \" \" + defaultUserAgent;\n }\n if (!options.credentialScopes) {\n options.credentialScopes = [\"openid\"];\n }\n _this = _super.call(this, credentials, options) || this;\n _this.requestContentType = \"application/json; charset=utf-8\";\n _this.baseUri = options.endpoint || \"{$host}\";\n // Parameter assignments\n _this.$host = $host;\n return _this;\n }", "static credential(idToken, accessToken) {\r\n return OAuthCredential._fromParams({\r\n providerId: GoogleAuthProvider.PROVIDER_ID,\r\n signInMethod: GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD,\r\n idToken,\r\n accessToken\r\n });\r\n }", "static credential(idToken, accessToken) {\r\n return OAuthCredential._fromParams({\r\n providerId: GoogleAuthProvider.PROVIDER_ID,\r\n signInMethod: GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD,\r\n idToken,\r\n accessToken\r\n });\r\n }", "static builder() {\n return new InstancePrincipalsAuthenticationDetailsProviderBuilder();\n }", "function createInjector(defType, parent, additionalProviders) {\n if (parent === void 0) { parent = null; }\n if (additionalProviders === void 0) { additionalProviders = null; }\n parent = parent || getNullInjector();\n return new R3Injector(defType, additionalProviders, parent);\n}", "function createInjector(defType, parent, additionalProviders) {\n if (parent === void 0) { parent = null; }\n if (additionalProviders === void 0) { additionalProviders = null; }\n parent = parent || getNullInjector();\n return new R3Injector(defType, additionalProviders, parent);\n}", "function createInjector(defType, parent, additionalProviders) {\n if (parent === void 0) {\n parent = null;\n }\n if (additionalProviders === void 0) {\n additionalProviders = null;\n }\n parent = parent || getNullInjector();\n return new R3Injector(defType, additionalProviders, parent);\n}", "function Credentials(name, pass) {\n this.name = name;\n this.pass = pass;\n}", "buildCognitoCreds(idTokenJwt) {\n let url = 'cognito-idp.' + _REGION.toLowerCase() + '.amazonaws.com/' + _USER_POOL_ID;\n // if (environment.cognito_idp_endpoint) {\n // url = environment.cognito_idp_endpoint + '/' + _USER_POOL_ID;\n // }\n let logins = {};\n logins[url] = idTokenJwt;\n let params = {\n IdentityPoolId: _IDENTITY_POOL_ID, /* required */\n Logins: logins\n };\n let serviceConfigs = {};\n // if (environment.cognito_identity_endpoint) {\n // serviceConfigs.endpoint = environment.cognito_identity_endpoint;\n // }\n let creds = new AWS.CognitoIdentityCredentials(params, serviceConfigs);\n //AWS.config.cognitoidentityserviceprovider\n this.setCognitoCreds(creds);\n //console.log(\"in build cognito creds: \"+JSON.stringify(this.cognitoCreds))\n return creds;\n }", "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n }", "async obtainCredentials(accountId, mode) {\n var _a;\n // First try 'current' credentials\n const defaultAccountId = (_a = (await this.defaultAccount())) === null || _a === void 0 ? void 0 : _a.accountId;\n if (defaultAccountId === accountId) {\n return this.defaultCredentials();\n }\n // Then try the plugins\n const pluginCreds = await this.plugins.fetchCredentialsFor(accountId, mode);\n if (pluginCreds) {\n return pluginCreds;\n }\n // No luck, format a useful error message\n const error = [`Need to perform AWS calls for account ${accountId}`];\n error.push(defaultAccountId ? `but the current credentials are for ${defaultAccountId}` : 'but no credentials have been configured');\n if (this.plugins.availablePluginNames.length > 0) {\n error.push(`and none of these plugins found any: ${this.plugins.availablePluginNames.join(', ')}`);\n }\n throw new Error(`${error.join(', ')}.`);\n }", "function buildAndAuthorizeService (callback) {\n // Imports the Google APIs client library\n const google = require('googleapis');\n\n // Acquires credentials\n google.auth.getApplicationDefault((err, authClient) => {\n if (err) {\n callback(err);\n return;\n }\n\n if (authClient.createScopedRequired && authClient.createScopedRequired()) {\n authClient = authClient.createScoped([\n 'https://www.googleapis.com/auth/cloud-platform'\n ]);\n }\n\n // Instantiates an authorized client\n const cloudkms = google.cloudkms({\n version: 'v1',\n auth: authClient\n });\n\n callback(null, cloudkms);\n });\n }", "makeGuardInstance(mapping, mappingConfig, provider, ctx) {\n if (!mappingConfig || !mappingConfig.driver) {\n throw new utils_1.Exception('Invalid auth config, missing \"driver\" property');\n }\n switch (mappingConfig.driver) {\n case 'session':\n return this.makeSessionGuard(mapping, mappingConfig, provider, ctx);\n case 'oat':\n return this.makeOatGuard(mapping, mappingConfig, provider, ctx);\n case 'basic':\n return this.makeBasicAuthGuard(mapping, mappingConfig, provider, ctx);\n default:\n return this.makeExtendedGuard(mapping, mappingConfig, provider, ctx);\n }\n }", "function parseProviderAuth(auth, options) {\n if (!auth) return null;\n var parts = auth.split(':');\n return _.merge({\n clientID: parts[0],\n clientSecret: parts[1]\n }, options);\n}", "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}", "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}", "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}", "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}", "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}", "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}", "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}", "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}", "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}", "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}", "function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}", "function createInjector(defType, parent, additionalProviders, name) {\n if (parent === void 0) { parent = null; }\n if (additionalProviders === void 0) { additionalProviders = null; }\n parent = parent || getNullInjector();\n return new R3Injector(defType, additionalProviders, parent, name);\n}", "function createTokenCycler(credential, scopes, tokenCyclerOptions) {\n let refreshWorker = null;\n let token = null;\n const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);\n /**\n * This little holder defines several predicates that we use to construct\n * the rules of refreshing the token.\n */\n const cycler = {\n /**\n * Produces true if a refresh job is currently in progress.\n */\n get isRefreshing() {\n return refreshWorker !== null;\n },\n /**\n * Produces true if the cycler SHOULD refresh (we are within the refresh\n * window and not already refreshing)\n */\n get shouldRefresh() {\n var _a;\n return (!cycler.isRefreshing &&\n ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());\n },\n /**\n * Produces true if the cycler MUST refresh (null or nearly-expired\n * token).\n */\n get mustRefresh() {\n return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());\n },\n };\n /**\n * Starts a refresh job or returns the existing job if one is already\n * running.\n */\n function refresh(getTokenOptions) {\n var _a;\n if (!cycler.isRefreshing) {\n // We bind `scopes` here to avoid passing it around a lot\n const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);\n // Take advantage of promise chaining to insert an assignment to `token`\n // before the refresh can be considered done.\n refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, \n // If we don't have a token, then we should timeout immediately\n (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())\n .then((_token) => {\n refreshWorker = null;\n token = _token;\n return token;\n })\n .catch((reason) => {\n // We also should reset the refresher if we enter a failed state. All\n // existing awaiters will throw, but subsequent requests will start a\n // new retry chain.\n refreshWorker = null;\n token = null;\n throw reason;\n });\n }\n return refreshWorker;\n }\n return async (tokenOptions) => {\n //\n // Simple rules:\n // - If we MUST refresh, then return the refresh task, blocking\n // the pipeline until a token is available.\n // - If we SHOULD refresh, then run refresh but don't return it\n // (we can still use the cached token).\n // - Return the token, since it's fine if we didn't return in\n // step 1.\n //\n if (cycler.mustRefresh)\n return refresh(tokenOptions);\n if (cycler.shouldRefresh) {\n refresh(tokenOptions);\n }\n return token;\n };\n}", "function createTokenCycler(credential, scopes, tokenCyclerOptions) {\n let refreshWorker = null;\n let token = null;\n const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);\n /**\n * This little holder defines several predicates that we use to construct\n * the rules of refreshing the token.\n */\n const cycler = {\n /**\n * Produces true if a refresh job is currently in progress.\n */\n get isRefreshing() {\n return refreshWorker !== null;\n },\n /**\n * Produces true if the cycler SHOULD refresh (we are within the refresh\n * window and not already refreshing)\n */\n get shouldRefresh() {\n var _a;\n return (!cycler.isRefreshing &&\n ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());\n },\n /**\n * Produces true if the cycler MUST refresh (null or nearly-expired\n * token).\n */\n get mustRefresh() {\n return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());\n },\n };\n /**\n * Starts a refresh job or returns the existing job if one is already\n * running.\n */\n function refresh(getTokenOptions) {\n var _a;\n if (!cycler.isRefreshing) {\n // We bind `scopes` here to avoid passing it around a lot\n const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);\n // Take advantage of promise chaining to insert an assignment to `token`\n // before the refresh can be considered done.\n refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, \n // If we don't have a token, then we should timeout immediately\n (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())\n .then((_token) => {\n refreshWorker = null;\n token = _token;\n return token;\n })\n .catch((reason) => {\n // We also should reset the refresher if we enter a failed state. All\n // existing awaiters will throw, but subsequent requests will start a\n // new retry chain.\n refreshWorker = null;\n token = null;\n throw reason;\n });\n }\n return refreshWorker;\n }\n return async (tokenOptions) => {\n //\n // Simple rules:\n // - If we MUST refresh, then return the refresh task, blocking\n // the pipeline until a token is available.\n // - If we SHOULD refresh, then run refresh but don't return it\n // (we can still use the cached token).\n // - Return the token, since it's fine if we didn't return in\n // step 1.\n //\n if (cycler.mustRefresh)\n return refresh(tokenOptions);\n if (cycler.shouldRefresh) {\n refresh(tokenOptions);\n }\n return token;\n };\n}", "function createTokenCycler(credential, scopes, tokenCyclerOptions) {\n let refreshWorker = null;\n let token = null;\n const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);\n /**\n * This little holder defines several predicates that we use to construct\n * the rules of refreshing the token.\n */\n const cycler = {\n /**\n * Produces true if a refresh job is currently in progress.\n */\n get isRefreshing() {\n return refreshWorker !== null;\n },\n /**\n * Produces true if the cycler SHOULD refresh (we are within the refresh\n * window and not already refreshing)\n */\n get shouldRefresh() {\n var _a;\n return (!cycler.isRefreshing &&\n ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());\n },\n /**\n * Produces true if the cycler MUST refresh (null or nearly-expired\n * token).\n */\n get mustRefresh() {\n return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());\n },\n };\n /**\n * Starts a refresh job or returns the existing job if one is already\n * running.\n */\n function refresh(getTokenOptions) {\n var _a;\n if (!cycler.isRefreshing) {\n // We bind `scopes` here to avoid passing it around a lot\n const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);\n // Take advantage of promise chaining to insert an assignment to `token`\n // before the refresh can be considered done.\n refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, \n // If we don't have a token, then we should timeout immediately\n (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())\n .then((_token) => {\n refreshWorker = null;\n token = _token;\n return token;\n })\n .catch((reason) => {\n // We also should reset the refresher if we enter a failed state. All\n // existing awaiters will throw, but subsequent requests will start a\n // new retry chain.\n refreshWorker = null;\n token = null;\n throw reason;\n });\n }\n return refreshWorker;\n }\n return async (tokenOptions) => {\n //\n // Simple rules:\n // - If we MUST refresh, then return the refresh task, blocking\n // the pipeline until a token is available.\n // - If we SHOULD refresh, then run refresh but don't return it\n // (we can still use the cached token).\n // - Return the token, since it's fine if we didn't return in\n // step 1.\n //\n if (cycler.mustRefresh)\n return refresh(tokenOptions);\n if (cycler.shouldRefresh) {\n refresh(tokenOptions);\n }\n return token;\n };\n}", "function createTokenCycler(credential, scopes, tokenCyclerOptions) {\n let refreshWorker = null;\n let token = null;\n const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);\n /**\n * This little holder defines several predicates that we use to construct\n * the rules of refreshing the token.\n */\n const cycler = {\n /**\n * Produces true if a refresh job is currently in progress.\n */\n get isRefreshing() {\n return refreshWorker !== null;\n },\n /**\n * Produces true if the cycler SHOULD refresh (we are within the refresh\n * window and not already refreshing)\n */\n get shouldRefresh() {\n var _a;\n return (!cycler.isRefreshing &&\n ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());\n },\n /**\n * Produces true if the cycler MUST refresh (null or nearly-expired\n * token).\n */\n get mustRefresh() {\n return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());\n },\n };\n /**\n * Starts a refresh job or returns the existing job if one is already\n * running.\n */\n function refresh(getTokenOptions) {\n var _a;\n if (!cycler.isRefreshing) {\n // We bind `scopes` here to avoid passing it around a lot\n const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);\n // Take advantage of promise chaining to insert an assignment to `token`\n // before the refresh can be considered done.\n refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, \n // If we don't have a token, then we should timeout immediately\n (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())\n .then((_token) => {\n refreshWorker = null;\n token = _token;\n return token;\n })\n .catch((reason) => {\n // We also should reset the refresher if we enter a failed state. All\n // existing awaiters will throw, but subsequent requests will start a\n // new retry chain.\n refreshWorker = null;\n token = null;\n throw reason;\n });\n }\n return refreshWorker;\n }\n return async (tokenOptions) => {\n //\n // Simple rules:\n // - If we MUST refresh, then return the refresh task, blocking\n // the pipeline until a token is available.\n // - If we SHOULD refresh, then run refresh but don't return it\n // (we can still use the cached token).\n // - Return the token, since it's fine if we didn't return in\n // step 1.\n //\n if (cycler.mustRefresh)\n return refresh(tokenOptions);\n if (cycler.shouldRefresh) {\n refresh(tokenOptions);\n }\n return token;\n };\n}", "function createTokenCycler(credential, scopes, tokenCyclerOptions) {\n let refreshWorker = null;\n let token = null;\n const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);\n /**\n * This little holder defines several predicates that we use to construct\n * the rules of refreshing the token.\n */\n const cycler = {\n /**\n * Produces true if a refresh job is currently in progress.\n */\n get isRefreshing() {\n return refreshWorker !== null;\n },\n /**\n * Produces true if the cycler SHOULD refresh (we are within the refresh\n * window and not already refreshing)\n */\n get shouldRefresh() {\n var _a;\n return (!cycler.isRefreshing &&\n ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());\n },\n /**\n * Produces true if the cycler MUST refresh (null or nearly-expired\n * token).\n */\n get mustRefresh() {\n return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());\n },\n };\n /**\n * Starts a refresh job or returns the existing job if one is already\n * running.\n */\n function refresh(getTokenOptions) {\n var _a;\n if (!cycler.isRefreshing) {\n // We bind `scopes` here to avoid passing it around a lot\n const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);\n // Take advantage of promise chaining to insert an assignment to `token`\n // before the refresh can be considered done.\n refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, \n // If we don't have a token, then we should timeout immediately\n (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())\n .then((_token) => {\n refreshWorker = null;\n token = _token;\n return token;\n })\n .catch((reason) => {\n // We also should reset the refresher if we enter a failed state. All\n // existing awaiters will throw, but subsequent requests will start a\n // new retry chain.\n refreshWorker = null;\n token = null;\n throw reason;\n });\n }\n return refreshWorker;\n }\n return async (tokenOptions) => {\n //\n // Simple rules:\n // - If we MUST refresh, then return the refresh task, blocking\n // the pipeline until a token is available.\n // - If we SHOULD refresh, then run refresh but don't return it\n // (we can still use the cached token).\n // - Return the token, since it's fine if we didn't return in\n // step 1.\n //\n if (cycler.mustRefresh)\n return refresh(tokenOptions);\n if (cycler.shouldRefresh) {\n refresh(tokenOptions);\n }\n return token;\n };\n}", "get(token, resolving = [], wantPromise = false, wantLazy = false) {\n var resolvingMsg = '';\n var provider;\n var instance;\n var injector = this;\n\n if (token === null || token === undefined) {\n resolvingMsg = constructResolvingMessage(resolving, token);\n throw new Error(`Invalid token \"${token}\" requested!${resolvingMsg}`);\n }\n\n // Special case, return itself.\n if (token === Injector) {\n if (wantPromise) {\n return Promise.resolve(this);\n }\n\n return this;\n }\n\n // TODO(vojta): optimize - no child injector for locals?\n if (wantLazy) {\n return function createLazyInstance() {\n var lazyInjector = injector;\n\n if (arguments.length) {\n var locals = [];\n var args = arguments;\n\n for (var i = 0; i < args.length; i += 2) {\n locals.push((function(ii) {\n var fn = function createLocalInstance() {\n return args[ii + 1];\n };\n\n annotate(fn, new ProvideAnnotation(args[ii]));\n\n return fn;\n })(i));\n }\n\n lazyInjector = injector.createChild(locals);\n }\n\n return lazyInjector.get(token, resolving, wantPromise, false);\n };\n }\n\n // Check if there is a cached instance already.\n if (this._cache.has(token)) {\n instance = this._cache.get(token);\n provider = this._providers.get(token);\n\n if (provider.isPromise && !wantPromise) {\n resolvingMsg = constructResolvingMessage(resolving, token);\n throw new Error(`Cannot instantiate ${toString(token)} synchronously. It is provided as a promise!${resolvingMsg}`);\n }\n\n if (!provider.isPromise && wantPromise) {\n return Promise.resolve(instance);\n }\n\n return instance;\n }\n\n provider = this._providers.get(token);\n\n // No provider defined (overridden), use the default provider (token).\n if (!provider && isFunction(token) && !this._hasProviderFor(token)) {\n provider = createProviderFromFnOrClass(token, readAnnotations(token));\n return this._instantiateDefaultProvider(provider, token, resolving, wantPromise, wantLazy);\n }\n\n if (!provider) {\n if (!this._parent) {\n resolvingMsg = constructResolvingMessage(resolving, token);\n throw new Error(`No provider for ${toString(token)}!${resolvingMsg}`);\n }\n\n return this._parent.get(token, resolving, wantPromise, wantLazy);\n }\n\n if (resolving.indexOf(token) !== -1) {\n resolvingMsg = constructResolvingMessage(resolving, token);\n throw new Error(`Cannot instantiate cyclic dependency!${resolvingMsg}`);\n }\n\n resolving.push(token);\n\n // TODO(vojta): handle these cases:\n // 1/\n // - requested as promise (delayed)\n // - requested again as promise (before the previous gets resolved) -> cache the promise\n // 2/\n // - requested as promise (delayed)\n // - requested again sync (before the previous gets resolved)\n // -> error, but let it go inside to throw where exactly is the async provider\n var delayingInstantiation = wantPromise && provider.params.some((param) => !param.isPromise);\n var args = provider.params.map((param) => {\n\n if (delayingInstantiation) {\n return this.get(param.token, resolving, true, param.isLazy);\n }\n\n return this.get(param.token, resolving, param.isPromise, param.isLazy);\n });\n\n // Delaying the instantiation - return a promise.\n if (delayingInstantiation) {\n var delayedResolving = resolving.slice(); // clone\n\n resolving.pop();\n\n // Once all dependencies (promises) are resolved, instantiate.\n return Promise.all(args).then(function(args) {\n try {\n instance = provider.create(args);\n } catch (e) {\n resolvingMsg = constructResolvingMessage(delayedResolving);\n var originalMsg = 'ORIGINAL ERROR: ' + e.message;\n e.message = `Error during instantiation of ${toString(token)}!${resolvingMsg}\\n${originalMsg}`;\n throw e;\n }\n\n if (!hasAnnotation(provider.provider, TransientScopeAnnotation)) {\n injector._cache.set(token, instance);\n }\n\n // TODO(vojta): if a provider returns a promise (but is not declared as @ProvidePromise),\n // here the value will get unwrapped (because it is returned from a promise callback) and\n // the actual value will be injected. This is probably not desired behavior. Maybe we could\n // get rid off the @ProvidePromise and just check the returned value, whether it is\n // a promise or not.\n return instance;\n });\n }\n\n try {\n instance = provider.create(args);\n } catch (e) {\n resolvingMsg = constructResolvingMessage(resolving);\n var originalMsg = 'ORIGINAL ERROR: ' + e.message;\n e.message = `Error during instantiation of ${toString(token)}!${resolvingMsg}\\n${originalMsg}`;\n throw e;\n }\n\n if (!hasAnnotation(provider.provider, TransientScopeAnnotation)) {\n this._cache.set(token, instance);\n }\n\n if (!wantPromise && provider.isPromise) {\n resolvingMsg = constructResolvingMessage(resolving);\n\n throw new Error(`Cannot instantiate ${toString(token)} synchronously. It is provided as a promise!${resolvingMsg}`);\n }\n\n if (wantPromise && !provider.isPromise) {\n instance = Promise.resolve(instance);\n }\n\n resolving.pop();\n\n return instance;\n }", "create(args, resolving, token) {\n var context = Object.create(this.provider.prototype);\n var constructor = this._createConstructor(0, context, args);\n var returnedValue;\n\n try {\n returnedValue = constructor();\n } catch (e) {\n var resolvingMsg = constructResolvingMessage(resolving);\n var originalMsg = 'ORIGINAL ERROR: ' + e.message;\n e.message = `Error during instantiation of ${toString(token)}!${resolvingMsg}\\n${originalMsg}`;\n throw e;\n }\n\n if (!isFunction(returnedValue) && !isObject(returnedValue)) {\n return context;\n }\n\n return returnedValue;\n }", "function createInjector(defType, parent = null, additionalProviders = null, name) {\n const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector._resolveInjectorDefTypes();\n return injector;\n}", "function createInjector(defType, parent = null, additionalProviders = null, name) {\n const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector._resolveInjectorDefTypes();\n return injector;\n}", "function createInjector(defType, parent = null, additionalProviders = null, name) {\n const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector._resolveInjectorDefTypes();\n return injector;\n}", "function createInjector(defType, parent = null, additionalProviders = null, name) {\n const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector._resolveInjectorDefTypes();\n return injector;\n}", "function createInjector(defType, parent = null, additionalProviders = null, name) {\n const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector._resolveInjectorDefTypes();\n return injector;\n}", "function createInjector(defType, parent = null, additionalProviders = null, name) {\n const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector._resolveInjectorDefTypes();\n return injector;\n}", "function authorize(credentials, callback) {\n\tconst { client_secret, client_id, redirect_uris } = credentials.install;\n\tconst oAuth2Client = new google.auth.OAuth2(\n\t\tclient_id,\n\t\tclient_secret,\n\t\tredirect_uris[0],\n\t);\n\n\t// Check if we have previously stored a token.\n\tfs.readFile(TOKEN_PATH, (err, token) => {\n\t\tif (err) return getNewToken(oAuth2Client, callback);\n\t\toAuth2Client.setCredentials(JSON.parse(token));\n\t\tcallback(oAuth2Client);\n\t});\n}", "createPipeline(credential) {\n const isAnonymousCreds = credential instanceof AnonymousCredential;\n const policyFactoryLength = 3 + (isAnonymousCreds ? 0 : 1); // [deserializationPolicy, BatchHeaderFilterPolicyFactory, (Optional)Credential, BatchRequestAssemblePolicyFactory]\n const factories = new Array(policyFactoryLength);\n factories[0] = coreHttp.deserializationPolicy(); // Default deserializationPolicy is provided by protocol layer\n factories[1] = new BatchHeaderFilterPolicyFactory(); // Use batch header filter policy to exclude unnecessary headers\n if (!isAnonymousCreds) {\n factories[2] = coreHttp.isTokenCredential(credential)\n ? attachCredential(coreHttp.bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes), credential)\n : credential;\n }\n factories[policyFactoryLength - 1] = new BatchRequestAssemblePolicyFactory(this); // Use batch assemble policy to assemble request and intercept request from going to wire\n return new Pipeline(factories, {});\n }", "createPipeline(credential) {\n const isAnonymousCreds = credential instanceof AnonymousCredential;\n const policyFactoryLength = 3 + (isAnonymousCreds ? 0 : 1); // [deserializationPolicy, BatchHeaderFilterPolicyFactory, (Optional)Credential, BatchRequestAssemblePolicyFactory]\n const factories = new Array(policyFactoryLength);\n factories[0] = coreHttp.deserializationPolicy(); // Default deserializationPolicy is provided by protocol layer\n factories[1] = new BatchHeaderFilterPolicyFactory(); // Use batch header filter policy to exclude unnecessary headers\n if (!isAnonymousCreds) {\n factories[2] = coreHttp.isTokenCredential(credential)\n ? attachCredential(coreHttp.bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes), credential)\n : credential;\n }\n factories[policyFactoryLength - 1] = new BatchRequestAssemblePolicyFactory(this); // Use batch assemble policy to assemble request and intercept request from going to wire\n return new Pipeline(factories, {});\n }", "function makeAuth(type) {\n return type === 'basic'\n ? 'Basic ' + btoa(appKey + ':' + appSecret)\n : 'Kinvey ' + localStorage.getItem('authtoken');\n }", "function defineInjector(options) {\n return {\n factory: options.factory, providers: options.providers || [], imports: options.imports || [],\n };\n}", "function defineInjector(options) {\n return {\n factory: options.factory, providers: options.providers || [], imports: options.imports || [],\n };\n}", "function defineInjector(options) {\n return {\n factory: options.factory, providers: options.providers || [], imports: options.imports || [],\n };\n}", "function determineCIProvider() {\n // By far the coolest env. variable from all those listed at\n // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables\n if (objectUtils_1.getEnvironmentVariable('HAS_JOSH_K_SEAL_OF_APPROVAL')) {\n return new TravisProvider_1.default();\n }\n else if (objectUtils_1.getEnvironmentVariable('CIRCLECI')) {\n return new CircleProvider_1.default();\n }\n else if (objectUtils_1.getEnvironmentVariable('GITHUB_ACTION')) {\n return new GithubActionsProvider_1.default();\n }\n // TODO: Add vsts and gitlab CI\n return null;\n}" ]
[ "0.7694981", "0.7694119", "0.75377667", "0.74954623", "0.74954623", "0.74954623", "0.74113137", "0.73126507", "0.7267975", "0.7267494", "0.7267494", "0.5322675", "0.53139275", "0.4993688", "0.49795586", "0.48332006", "0.48332006", "0.47852653", "0.46350285", "0.46337956", "0.46211898", "0.4547626", "0.45400655", "0.4521665", "0.4468227", "0.4468227", "0.44281644", "0.43873963", "0.4378104", "0.4378104", "0.43683562", "0.4346005", "0.43243483", "0.4318781", "0.4303164", "0.4293243", "0.4291471", "0.4291471", "0.4291471", "0.4291471", "0.4291471", "0.4291471", "0.42861667", "0.4275481", "0.4275481", "0.4273582", "0.42556378", "0.4250306", "0.42388517", "0.42388517", "0.42388517", "0.42388517", "0.42388517", "0.4220923", "0.42116466", "0.42116466", "0.42073518", "0.41879588", "0.41879588", "0.41514772", "0.41501257", "0.41278404", "0.41203815", "0.41085356", "0.4092181", "0.40854418", "0.40849245", "0.4077371", "0.4077371", "0.4077371", "0.4077371", "0.4077371", "0.4077371", "0.4077371", "0.4077371", "0.4077371", "0.4077371", "0.40713564", "0.40665576", "0.4027694", "0.4027694", "0.4027694", "0.4027694", "0.4027694", "0.40234098", "0.401449", "0.40004945", "0.40004945", "0.40004945", "0.40004945", "0.40004945", "0.40004945", "0.39911243", "0.39783248", "0.39783248", "0.39677987", "0.3967223", "0.3967223", "0.3967223", "0.39581773" ]
0.6814537
11
Copyright 2017 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
function isPartialObserver(obj){return implementsAnyMethods$1(obj,['next','error','complete']);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function me(e,t,a,s){var n,i=arguments.length,r=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(n=e[d])&&(r=(i<3?n(r):i>3?n(t,a,r):n(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r\n/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */}", "constructor() {\n this.authToken = null;\n this.dataSourceIdMap = {};\n this.scopeMap = {};\n this.dataSourceIdMap[\"com.google.step_count.delta\"] = \"derived:com.google.step_count.delta:com.google.android.gms:estimated_steps\";\n this.dataSourceIdMap[\"com.google.calories.expended\"] = \"derived:com.google.calories.expended:com.google.android.gms:merge_calories_expended\";\n this.dataSourceIdMap[\"com.google.distance.delta\"] = \"derived:com.google.distance.delta:com.google.android.gms:merge_distance_delta\";\n this.dataSourceIdMap[\"com.google.heart_rate.bpm\"] = \"derived:com.google.heart_rate.bpm:com.google.android.gms:merge_heart_rate_bpm\";\n this.dataSourceIdMap[\"com.google.weight\"] = \"derived:com.google.weight:com.google.android.gms:merge_weight\";\n this.dataSourceIdMap[\"com.google.blood_pressure\"] = \"derived:com.google.blood_pressure:com.google.android.gms:merged\";\n\n this.scopeMap[\"com.google.heart_rate.bpm\"] = \"https://www.googleapis.com/auth/fitness.body.read https://www.googleapis.com/auth/fitness.body.write\";\n this.scopeMap[\"com.google.weight\"] = \"https://www.googleapis.com/auth/fitness.body.read https://www.googleapis.com/auth/fitness.body.write\";\n this.scopeMap[\"com.google.blood_pressure\"] = \"https://www.googleapis.com/auth/fitness.blood_pressure.read https://www.googleapis.com/auth/fitness.blood_pressure.write\";\n\n }", "private internal function m248() {}", "private public function m246() {}", "googleLogin() { }", "function t(e,t,a,s){var i,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(r=(n<3?i(r):n>3?i(t,a,r):i(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "function gn() {\n if (!pe.Lt().ia) throw new c(h.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "static get scopes() {\n return ['https://www.googleapis.com/auth/cloud-platform'];\n }", "static get scopes() {\n return ['https://www.googleapis.com/auth/cloud-platform'];\n }", "function defGoogle(frame) {\n\n var googlePolicy = (function() {\n\n var google = {};\n\n function drawBeforeAdvice(f, self, args) {\n var result = [ args[0] ];\n for (var i = 1; i < args.length; i++) {\n result.push(copyJson(args[i]));\n }\n return result;\n }\n\n function opaqueNodeAdvice(f, self, args) {\n return [ opaqueNode(args[0]) ];\n }\n\n ////////////////////////////////////////////////////////////////////////\n // gViz integration\n\n google.visualization = {};\n\n /** @constructor */\n google.visualization.DataTable = function(opt_data, opt_version) {};\n google.visualization.DataTable.__super__ = Object;\n google.visualization.DataTable.prototype.getNumberOfRows = function() {};\n google.visualization.DataTable.prototype.getNumberOfColumns = function() {};\n google.visualization.DataTable.prototype.clone = function() {};\n google.visualization.DataTable.prototype.getColumnId = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnIndex = function(columnId) {};\n google.visualization.DataTable.prototype.getColumnLabel = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnPattern = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnRole = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnType = function(columnIndex) {};\n google.visualization.DataTable.prototype.getValue = function(rowIndex, columnIndex) {};\n google.visualization.DataTable.prototype.getFormattedValue = function(rowIndex, columnIndex) {};\n google.visualization.DataTable.prototype.getProperty = function(rowIndex, columnIndex, property) {};\n google.visualization.DataTable.prototype.getProperties = function(rowIndex, columnIndex) {};\n google.visualization.DataTable.prototype.getTableProperties = function() {};\n google.visualization.DataTable.prototype.getTableProperty = function(property) {};\n google.visualization.DataTable.prototype.setTableProperties = function(properties) {};\n google.visualization.DataTable.prototype.setTableProperty = function(property, value) {};\n google.visualization.DataTable.prototype.setValue = function(rowIndex, columnIndex, value) {};\n google.visualization.DataTable.prototype.setFormattedValue = function(rowIndex, columnIndex, formattedValue) {};\n google.visualization.DataTable.prototype.setProperties = function(rowIndex, columnIndex, properties) {};\n google.visualization.DataTable.prototype.setProperty = function(rowIndex, columnIndex, property, value) {};\n google.visualization.DataTable.prototype.setCell = function(rowIndex, columnIndex, opt_value, opt_formattedValue, opt_properties) {};\n google.visualization.DataTable.prototype.setRowProperties = function(rowIndex, properties) {};\n google.visualization.DataTable.prototype.setRowProperty = function(rowIndex, property, value) {};\n google.visualization.DataTable.prototype.getRowProperty = function(rowIndex, property) {};\n google.visualization.DataTable.prototype.getRowProperties = function(rowIndex) {};\n google.visualization.DataTable.prototype.setColumnLabel = function(columnIndex, newLabel) {};\n google.visualization.DataTable.prototype.setColumnProperties = function(columnIndex, properties) {};\n google.visualization.DataTable.prototype.setColumnProperty = function(columnIndex, property, value) {};\n google.visualization.DataTable.prototype.getColumnProperty = function(columnIndex, property) {};\n google.visualization.DataTable.prototype.getColumnProperties = function(columnIndex) {};\n google.visualization.DataTable.prototype.insertColumn = function(atColIndex, type, opt_label, opt_id) {};\n google.visualization.DataTable.prototype.addColumn = function(type, opt_label, opt_id) {};\n google.visualization.DataTable.prototype.insertRows = function(atRowIndex, numOrArray) {};\n google.visualization.DataTable.prototype.addRows = function(numOrArray) {};\n google.visualization.DataTable.prototype.addRow = function(opt_cellArray) {};\n google.visualization.DataTable.prototype.getColumnRange = function(columnIndex) {};\n google.visualization.DataTable.prototype.getSortedRows = function(sortColumns) {};\n google.visualization.DataTable.prototype.sort = function(sortColumns) {};\n google.visualization.DataTable.prototype.getDistinctValues = function(column) {};\n google.visualization.DataTable.prototype.getFilteredRows = function(columnFilters) {};\n google.visualization.DataTable.prototype.removeRows = function(fromRowIndex, numRows) {};\n google.visualization.DataTable.prototype.removeRow = function(rowIndex) {};\n google.visualization.DataTable.prototype.removeColumns = function(fromColIndex, numCols) {};\n google.visualization.DataTable.prototype.removeColumn = function(colIndex) {};\n\n /** @return {string} JSON representation. */\n google.visualization.DataTable.prototype.toJSON = function() {\n return copyJson(this.toJSON());\n };\n google.visualization.DataTable.prototype.toJSON.__subst__ = true;\n\n google.visualization.arrayToDataTable = function(arr) {};\n\n /** @constructor */\n google.visualization.AreaChart = function(container) {};\n google.visualization.AreaChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.AreaChart.__super__ = Object;\n google.visualization.AreaChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.AreaChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.AreaChart.prototype.clearChart = function() {};\n // google.visualization.AreaChart.prototype.getSelection = function() {};\n // google.visualization.AreaChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.BarChart = function(container) {};\n google.visualization.BarChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.BarChart.__super__ = Object;\n google.visualization.BarChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.BarChart.prototype.clearChart = function() {};\n // google.visualization.BarChart.prototype.getSelection = function() {};\n // google.visualization.BarChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.BubbleChart = function(container) {};\n google.visualization.BubbleChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.BubbleChart.__super__ = Object;\n google.visualization.BubbleChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.BubbleChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.BubbleChart.prototype.clearChart = function() {};\n // google.visualization.BubbleChart.prototype.getSelection = function() {};\n // google.visualization.BubbleChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.CandlestickChart = function(container) {};\n google.visualization.CandlestickChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.CandlestickChart.__super__ = Object;\n google.visualization.CandlestickChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.CandlestickChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.CandlestickChart.prototype.clearChart = function() {};\n // google.visualization.CandlestickChart.prototype.getSelection = function() {};\n // google.visualization.CandlestickChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.ColumnChart = function(container) {};\n google.visualization.ColumnChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.ColumnChart.__super__ = Object;\n google.visualization.ColumnChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.ColumnChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.ColumnChart.prototype.clearChart = function() {};\n // google.visualization.ColumnChart.prototype.getSelection = function() {};\n // google.visualization.ColumnChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.ComboChart = function(container) {};\n google.visualization.ComboChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.ComboChart.__super__ = Object;\n google.visualization.ComboChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.ComboChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.ComboChart.prototype.clearChart = function() {};\n // google.visualization.ComboChart.prototype.getSelection = function() {};\n // google.visualization.ComboChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.Gauge = function(container) {};\n google.visualization.Gauge.__before__ = [ opaqueNodeAdvice ];\n google.visualization.Gauge.__super__ = Object;\n google.visualization.Gauge.prototype.draw = function(dataTable, opt_options) {};\n google.visualization.Gauge.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.Gauge.prototype.clearChart = function() {};\n\n /** @constructor */\n google.visualization.GeoChart = function(container) {};\n google.visualization.GeoChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.GeoChart.__super__ = Object;\n // google.visualization.GeoChart.mapExists = function(userOptions) {};\n google.visualization.GeoChart.prototype.clearChart = function() {};\n google.visualization.GeoChart.prototype.draw = function(dataTable, userOptions, opt_state) {};\n google.visualization.GeoChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n // google.visualization.GeoChart.prototype.getSelection = function() {};\n // google.visualization.GeoChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.LineChart = function(container) {};\n google.visualization.LineChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.LineChart.__super__ = Object;\n google.visualization.LineChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.LineChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.LineChart.prototype.clearChart = function() {};\n // google.visualization.LineChart.prototype.getSelection = function() {};\n // google.visualization.LineChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.PieChart = function(container) {};\n google.visualization.PieChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.PieChart.__super__ = Object;\n google.visualization.PieChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.PieChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.PieChart.prototype.clearChart = function() {};\n // google.visualization.PieChart.prototype.getSelection = function() {};\n // google.visualization.PieChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.ScatterChart = function(container) {};\n google.visualization.ScatterChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.ScatterChart.__super__ = Object;\n google.visualization.ScatterChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.ScatterChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.ScatterChart.prototype.clearChart = function() {};\n // google.visualization.ScatterChart.prototype.getSelection = function() {};\n // google.visualization.ScatterChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.SteppedAreaChart = function(container) {};\n google.visualization.SteppedAreaChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.SteppedAreaChart.__super__ = Object;\n google.visualization.SteppedAreaChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.SteppedAreaChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.SteppedAreaChart.prototype.clearChart = function() {};\n // google.visualization.SteppedAreaChart.prototype.getSelection = function() {};\n // google.visualization.SteppedAreaChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.Table = function(container) {};\n google.visualization.Table.__before__ = [ opaqueNodeAdvice ];\n google.visualization.Table.__super__ = Object;\n google.visualization.Table.prototype.draw = function(dataTable, opt_options) {};\n google.visualization.Table.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.Table.prototype.clearChart = function() {};\n // google.visualization.Table.prototype.getSortInfo = function() {};\n // google.visualization.Table.prototype.getSelection = function() {};\n // google.visualization.Table.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.TreeMap = function(container) {};\n google.visualization.TreeMap.__before__ = [ opaqueNodeAdvice ];\n google.visualization.TreeMap.__super__ = Object;\n google.visualization.TreeMap.prototype.draw = function(dataTable, opt_options) {};\n google.visualization.TreeMap.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.TreeMap.prototype.clearChart = function() {};\n // google.visualization.TreeMap.prototype.getSelection = function() {};\n // google.visualization.TreeMap.prototype.setSelection = function(selection) {};\n\n ////////////////////////////////////////////////////////////////////////\n // OnePick integration\n\n google.picker = {};\n\n google.picker.DocsUploadView = function() {};\n google.picker.DocsUploadView.__super__ = Object;\n google.picker.DocsUploadView.prototype.setIncludeFolders = function(boolean) {};\n\n google.picker.View = function() {};\n google.picker.View.__super__ = Object;\n google.picker.View.prototype.getId = function() {};\n google.picker.View.prototype.setMimeTypes = function() {};\n google.picker.View.prototype.setQuery = function() {};\n\n google.picker.DocsView = function() {};\n google.picker.DocsView.__super__ = ['google', 'picker', 'View'];\n google.picker.DocsView.prototype.setIncludeFolders = function() {};\n google.picker.DocsView.prototype.setMode = function() {};\n google.picker.DocsView.prototype.setOwnedByMe = function() {};\n google.picker.DocsView.prototype.setStarred = function() {};\n\n google.picker.DocsViewMode = {};\n google.picker.DocsViewMode.GRID = 1;\n google.picker.DocsViewMode.LIST = 1;\n\n google.picker.Feature = {};\n google.picker.Feature.MINE_ONLY = 1;\n google.picker.Feature.MULTISELECT_ENABLED = 1;\n google.picker.Feature.NAV_HIDDEN = 1;\n google.picker.Feature.SIMPLE_UPLOAD_ENABLED = 1;\n\n google.picker.ImageSearchView = function() {};\n google.picker.ImageSearchView.__super__ = ['google', 'picker', 'View'];\n google.picker.ImageSearchView.prototype.setLicense = function() {};\n google.picker.ImageSearchView.prototype.setSite = function() {};\n google.picker.ImageSearchView.prototype.setSize = function() {};\n\n google.picker.ImageSearchView.License = {};\n google.picker.ImageSearchView.License.NONE = 1;\n google.picker.ImageSearchView.License.COMMERCIAL_REUSE = 1;\n google.picker.ImageSearchView.License.COMMERCIAL_REUSE_WITH_MODIFICATION = 1;\n google.picker.ImageSearchView.License.REUSE = 1;\n google.picker.ImageSearchView.License.REUSE_WITH_MODIFICATION = 1;\n\n google.picker.ImageSearchView.Size = {};\n google.picker.ImageSearchView.Size.SIZE_QSVGA = 1;\n google.picker.ImageSearchView.Size.SIZE_VGA = 1;\n google.picker.ImageSearchView.Size.SIZE_SVGA = 1;\n google.picker.ImageSearchView.Size.SIZE_XGA = 1;\n google.picker.ImageSearchView.Size.SIZE_WXGA = 1;\n google.picker.ImageSearchView.Size.SIZE_WXGA2 = 1;\n google.picker.ImageSearchView.Size.SIZE_2MP = 1;\n google.picker.ImageSearchView.Size.SIZE_4MP = 1;\n google.picker.ImageSearchView.Size.SIZE_6MP = 1;\n google.picker.ImageSearchView.Size.SIZE_8MP = 1;\n google.picker.ImageSearchView.Size.SIZE_10MP = 1;\n google.picker.ImageSearchView.Size.SIZE_12MP = 1;\n google.picker.ImageSearchView.Size.SIZE_15MP = 1;\n google.picker.ImageSearchView.Size.SIZE_20MP = 1;\n google.picker.ImageSearchView.Size.SIZE_40MP = 1;\n google.picker.ImageSearchView.Size.SIZE_70MP = 1;\n google.picker.ImageSearchView.Size.SIZE_140MP = 1;\n\n google.picker.MapsView = function() {};\n google.picker.MapsView.__super__ = ['google', 'picker', 'View'];\n google.picker.MapsView.prototype.setCenter = function() {};\n google.picker.MapsView.prototype.setZoom = function() {};\n\n google.picker.PhotoAlbumsView = function() {};\n google.picker.PhotoAlbumsView.__super__ = ['google', 'picker', 'View'];\n\n google.picker.PhotosView = function() {};\n google.picker.PhotosView.__super__ = ['google', 'picker', 'View'];\n google.picker.PhotosView.prototype.setType = function() {};\n\n google.picker.PhotosView.Type = {};\n google.picker.PhotosView.Type.FEATURED = 1;\n google.picker.PhotosView.Type.UPLOADED = 1;\n\n var SECRET = {};\n\n google.picker.Picker = function() {\n if (arguments[0] !== SECRET) { throw new TypeError(); }\n this.v = arguments[1];\n };\n google.picker.Picker.__super__ = Object;\n google.picker.Picker.__subst__ = true;\n google.picker.Picker.prototype.isVisible = function() {\n return this.v.isVisible();\n };\n google.picker.Picker.prototype.setCallback = function(c) {\n this.v.setCallback(c);\n };\n google.picker.Picker.prototype.setRelayUrl = function(u) {\n this.v.setRelayUrl(u);\n };\n google.picker.Picker.prototype.setVisible = function(b) {\n this.v.setVisible(b);\n };\n\n/*\n google.picker.PickerBuilder = function() {};\n google.picker.PickerBuilder.__super__ = Object;\n google.picker.PickerBuilder.prototype.addView = function() {};\n google.picker.PickerBuilder.prototype.addViewGroup = function() {};\n google.picker.PickerBuilder.prototype.build = function() {};\n google.picker.PickerBuilder.prototype.disableFeature = function() {};\n google.picker.PickerBuilder.prototype.enableFeature = function() {};\n google.picker.PickerBuilder.prototype.getRelayUrl = function() {};\n google.picker.PickerBuilder.prototype.getTitle = function() {};\n google.picker.PickerBuilder.prototype.hideTitleBar = function() {};\n google.picker.PickerBuilder.prototype.isFeatureEnabled = function() {};\n google.picker.PickerBuilder.prototype.setAppId = function() {};\n google.picker.PickerBuilder.prototype.setAuthUser = function() {};\n google.picker.PickerBuilder.prototype.setCallback = function() {};\n google.picker.PickerBuilder.prototype.setDocument = function() {};\n google.picker.PickerBuilder.prototype.setLocale = function() {};\n google.picker.PickerBuilder.prototype.setRelayUrl = function() {};\n google.picker.PickerBuilder.prototype.setSelectableMimeTypes = function() {};\n google.picker.PickerBuilder.prototype.setSize = function() {};\n google.picker.PickerBuilder.prototype.setTitle = function() {}; // TODO: Add \"trusted path\" annotation\n google.picker.PickerBuilder.prototype.setUploadToAlbumId = function() {};\n google.picker.PickerBuilder.prototype.toUri = function() {};\n*/\n\n google.picker.PickerBuilder = function() {\n this.v = new window.google.picker.PickerBuilder();\n };\n google.picker.PickerBuilder.__subst__ = true;\n google.picker.PickerBuilder.__super__ = Object;\n google.picker.PickerBuilder.prototype.addView = function() {\n this.v.addView.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.addViewGroup = function() {\n this.v.addViewGroup.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.disableFeature = function() {\n this.v.disableFeature.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.enableFeature = function() {\n this.v.enableFeature.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.getRelayUrl = function() {\n this.v.getRelayUrl.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.getTitle = function() {\n this.v.getTitle.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.hideTitleBar = function() {\n this.v.hideTitleBar.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.isFeatureEnabled = function() {\n this.v.isFeatureEnabled.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setAppId = function() {\n this.v.setAppId.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setAuthUser = function() {\n this.v.setAuthUser.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setCallback = function() {\n this.v.setCallback.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setDocument = function() {\n this.v.setDocument.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setLocale = function() {\n this.v.setLocale.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setRelayUrl = function() {\n this.v.setRelayUrl.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setSelectableMimeTypes = function() {\n this.v.setSelectableMimeTypes.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setSize = function() {\n this.v.setSize.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setTitle = function() {\n this.v.setTitle.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setUploadToAlbumId = function() {\n this.v.setUploadToAlbumId.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.toUri = function() {\n this.v.toUri.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.build = function() {\n return new google.picker.Picker(SECRET, this.v.build.apply(this.v, arguments));\n }; \n\n google.picker.ResourceId = {};\n google.picker.ResourceId.generate = function() {};\n\n google.picker.VideoSearchView = function() {};\n google.picker.VideoSearchView.__super__ = ['google', 'picker', 'View'];\n google.picker.VideoSearchView.prototype.setSite = function() {};\n\n google.picker.VideoSearchView.YOUTUBE = 1;\n\n google.picker.ViewGroup = function() {};\n google.picker.ViewGroup.__super__ = Object;\n google.picker.ViewGroup.prototype.addLabel = function() {};\n google.picker.ViewGroup.prototype.addView = function() {};\n google.picker.ViewGroup.prototype.addViewGroup = function() {};\n\n google.picker.ViewId = {};\n google.picker.ViewId.DOCS = 1;\n google.picker.ViewId.DOCS_IMAGES = 1;\n google.picker.ViewId.DOCS_IMAGES_AND_VIDEOS = 1;\n google.picker.ViewId.DOCS_VIDEOS = 1;\n google.picker.ViewId.DOCUMENTS = 1;\n google.picker.ViewId.FOLDERS = 1;\n google.picker.ViewId.FORMS = 1;\n google.picker.ViewId.IMAGE_SEARCH = 1;\n google.picker.ViewId.PDFS = 1;\n google.picker.ViewId.PHOTO_ALBUMS = 1;\n google.picker.ViewId.PHOTO_UPLOAD = 1;\n google.picker.ViewId.PHOTOS = 1;\n google.picker.ViewId.PRESENTATIONS = 1;\n google.picker.ViewId.RECENTLY_PICKED = 1;\n google.picker.ViewId.SPREADSHEETS = 1;\n google.picker.ViewId.VIDEO_SEARCH = 1;\n google.picker.ViewId.WEBCAM = 1;\n google.picker.ViewId.YOUTUBE = 1;\n\n google.picker.WebCamView = function() {};\n google.picker.WebCamView.__super__ = ['google', 'picker', 'View'];\n\n google.picker.WebCamViewType = {};\n google.picker.WebCamViewType.STANDARD = 1;\n google.picker.WebCamViewType.VIDEOS = 1;\n\n google.picker.Action = {};\n google.picker.Action.CANCEL = 1;\n google.picker.Action.PICKED = 1;\n\n google.picker.Audience = {};\n google.picker.Audience.OWNER_ONLY = 1;\n google.picker.Audience.LIMITED = 1;\n google.picker.Audience.ALL_PERSONAL_CIRCLES = 1;\n google.picker.Audience.EXTENDED_CIRCLES = 1;\n google.picker.Audience.DOMAIN_PUBLIC = 1;\n google.picker.Audience.PUBLIC = 1;\n\n google.picker.Document = {};\n google.picker.Document.ADDRESS_LINES = 1;\n google.picker.Document.AUDIENCE = 1;\n google.picker.Document.DESCRIPTION = 1;\n google.picker.Document.DURATION = 1;\n google.picker.Document.EMBEDDABLE_URL = 1;\n google.picker.Document.ICON_URL = 1;\n google.picker.Document.ID = 1;\n google.picker.Document.IS_NEW = 1;\n google.picker.Document.LAST_EDITED_UTC = 1;\n google.picker.Document.LATITUDE = 1;\n google.picker.Document.LONGITUDE = 1;\n google.picker.Document.MIME_TYPE = 1;\n google.picker.Document.NAME = 1;\n google.picker.Document.NUM_CHILDREN = 1;\n google.picker.Document.PARENT_ID = 1;\n google.picker.Document.PHONE_NUMBERS = 1;\n google.picker.Document.SERVICE_ID = 1;\n google.picker.Document.THUMBNAILS = 1;\n google.picker.Document.TYPE = 1;\n google.picker.Document.URL = 1;\n\n google.picker.Response = {};\n google.picker.Response.ACTION = 1;\n google.picker.Response.DOCUMENTS = 1;\n google.picker.Response.PARENTS = 1;\n google.picker.Response.VIEW = 1;\n\n google.picker.ServiceId = {};\n google.picker.ServiceId.DOCS = 1;\n google.picker.ServiceId.MAPS = 1;\n google.picker.ServiceId.PHOTOS = 1;\n google.picker.ServiceId.SEARCH_API = 1;\n google.picker.ServiceId.URL = 1;\n google.picker.ServiceId.YOUTUBE = 1;\n\n google.picker.Thumbnail = {};\n google.picker.Thumbnail.HEIGHT = 1;\n google.picker.Thumbnail.WIDTH = 1;\n google.picker.Thumbnail.URL = 1;\n\n google.picker.Type = {};\n google.picker.Type.ALBUM = 1;\n google.picker.Type.DOCUMENT = 1;\n google.picker.Type.PHOTO = 1;\n google.picker.Type.URL = 1;\n google.picker.Type.VIDEO = 1;\n\n ////////////////////////////////////////////////////////////////////////\n\n google.setOnLoadCallback = function(olc) {\n throw 'Cannot set onLoadCallback once modules loaded';\n }\n google.setOnLoadCallback.__subst__ = true;\n\n return google;\n })();\n\n function copyJson(o) {\n if (!o) { return undefined; }\n return JSON.parse(JSON.stringify(o, function(key, value) {\n return /__$/.test(key) ? void 0 : value;\n }));\n }\n\n function opaqueNode(guestNode) {\n var d = guestNode.ownerDocument.createElement('div');\n frame.imports.tameNodeAsForeign___(d);\n guestNode.appendChild(d);\n return d;\n }\n\n function forallkeys(obj, cb) {\n for (var k in obj) {\n if (!/.*__$/.test(k)) {\n cb(k);\n }\n }\n }\n\n function targ(obj, policy) {\n return policy.__subst__ ? policy : obj;\n }\n\n ////////////////////////////////////////////////////////////////////////\n \n function grantRead(o, k) {\n if (o[k + '__grantRead__']) { return; }\n console.log(' + grantRead');\n caja.grantRead(o, k);\n o[k + '__grantRead__'] = true;\n }\n\n function grantMethod(o, k) {\n if (o[k + '__grantMethod__']) { return; }\n caja.grantMethod(o, k);\n console.log(' + grantMethod');\n o[k + '__grantMethod__'] = true;\n }\n\n function markFunction(o) {\n if (o.__markFunction__) { return o; }\n var r = caja.markFunction(o);\n console.log(' + markFunction');\n o.__markFunction__ = true;\n return r;\n }\n\n function markCtor(o, sup) {\n if (o.__markCtor__) { return o; }\n var r = caja.markCtor(o, sup);\n console.log(' + markCtor');\n o.__markCtor__ = true;\n return r;\n }\n\n function adviseFunctionBefore(o, advices) {\n if (o.__adviseFunctionBefore__) { return o; }\n for (var i = 0; i < advices.length; i++) {\n caja.adviseFunctionBefore(o, advices[i]);\n }\n console.log(' + adviseFunctionBefore');\n return o;\n }\n\n ////////////////////////////////////////////////////////////////////////\n\n function defCtor(path, obj, policy) {\n console.log(path + ' defCtor');\n forallkeys(policy, function(name) {\n if (!obj[name]) {\n console.log(path + '.' + name + ' skip');\n return;\n }\n console.log(path + '.' + name + ' grant static');\n grantRead(obj, name);\n if (typeof policy[name] === 'function') {\n markFunction(obj[name]);\n }\n });\n forallkeys(policy.prototype, function(name) {\n if (!obj.prototype[name]) {\n console.log(path + '.prototype.' + name + ' skip');\n return;\n }\n console.log(path + '.prototype.' + name + ' grant instance');\n if (typeof policy.prototype[name] === 'function') {\n if (policy.prototype[name].__before__) {\n adviseFunctionBefore(obj.prototype[name], policy.prototype[name].__before__);\n }\n grantMethod(obj.prototype, name);\n } else {\n grantRead(obj.prototype, name);\n }\n });\n var sup;\n if (policy.__super__ === Object) {\n sup = Object;\n } else {\n sup = window;\n for (var i = 0; i < policy.__super__.length; i++) {\n sup = sup[policy.__super__[i]];\n }\n }\n\n if (obj.__before__) {\n adviseFunctionBefore(obj, obj.__before__);\n }\n\n return markCtor(obj, sup);\n }\n\n function defFcn(path, obj, policy) {\n console.log(path + ' defFcn');\n if (obj.__before__) {\n adviseFunctionBefore(obj, obj.__before__);\n }\n return markFunction(obj);\n }\n\n function defObj(path, obj, policy) {\n console.log(path + ' defObj');\n var r = {};\n forallkeys(policy, function(name) {\n var sub_obj = obj[name];\n if (!sub_obj) {\n console.log(path + '.' + name + ' skip');\n return;\n }\n var sub_policy = policy[name];\n var sub_path = path + '.' + name;\n var t_sub_policy = typeof sub_policy;\n if (t_sub_policy === 'function') {\n if (sub_policy.__super__) {\n r[name] = defCtor(sub_path, targ(sub_obj, sub_policy), sub_policy);\n } else {\n r[name] = defFcn(sub_path, targ(sub_obj, sub_policy), sub_policy);\n }\n } else if (t_sub_policy === 'object'){\n r[name] = defObj(sub_path, targ(sub_obj, sub_policy), sub_policy);\n } else {\n console.log(path + '.' + name + ' grant static');\n r[name] = targ(sub_obj, sub_policy);\n grantRead(r, name);\n }\n });\n return caja.markReadOnlyRecord(r);\n }\n\n ////////////////////////////////////////////////////////////////////////\n\n return defObj('google', window['google'], googlePolicy);\n}", "static getClassName() {\n return 'AdminGoogleSecurityContainer';\n }", "function e(t,e,r,o){var i,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,o);else for(var n=t.length-1;n>=0;n--)(i=t[n])&&(a=(s<3?i(a):s>3?i(e,r,a):i(e,r))||a);return s>3&&a&&Object.defineProperty(e,r,a),a\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "_getPageMetadata() {\n return undefined;\n }", "function emptyByteString(){return PlatformSupport.getPlatform().emptyByteString;}/**\r\n * Copyright 2017 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */// TODO(mcg): Change to a string enum once we've upgraded to typescript 2.4.", "isGMOnly() {\n return false\n }", "function Xi(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.o || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "get Android() {}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\n if(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\n b.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n \"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n 255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n \"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):a.src&&\"IMAGE\"==c&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\n if(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\n b.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n \"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n 255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n \"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):\"IMAGE\"==c&&a.src&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\nif(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\nb.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n\"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):\"IMAGE\"==c&&a.src&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\nif(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\nb.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n\"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):\"IMAGE\"==c&&a.src&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function assertBase64Available(){if(!PlatformSupport.getPlatform().base64Available){throw new index_esm_FirestoreError(Code.UNIMPLEMENTED,'Blobs are unavailable in Firestore in this environment.');}}", "function assertUint8ArrayAvailable(){if(typeof Uint8Array==='undefined'){throw new index_esm_FirestoreError(Code.UNIMPLEMENTED,'Uint8Arrays are not available in this environment.');}}", "static get scopes() {\n return [\n 'https://www.googleapis.com/auth/cloud-platform',\n ];\n }", "function WebIdUtils () {\n}", "function getGoogle(n) {\n\n}", "function dc(t) {\n for (var e, n, r, i = [], o = 1; o < arguments.length; o++) i[o - 1] = arguments[o];\n t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_0__[\"getModularInstance\"])(t);\n var s = {\n includeMetadataChanges: !1\n }, a = 0;\n \"object\" != typeof i[a] || ea(i[a]) || (s = i[a], a++);\n var c, h, f, l = {\n includeMetadataChanges: s.includeMetadataChanges\n };\n if (ea(i[a])) {\n var d = i[a];\n i[a] = null === (e = d.next) || void 0 === e ? void 0 : e.bind(d), i[a + 1] = null === (n = d.error) || void 0 === n ? void 0 : n.bind(d), \n i[a + 2] = null === (r = d.complete) || void 0 === r ? void 0 : r.bind(d);\n }\n if (t instanceof Wu) h = Ku(t.firestore, ia), f = zt(t._key.path), c = {\n next: function(e) {\n i[a] && i[a](yc(h, t, e));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }; else {\n var p = Ku(t, Hu);\n h = Ku(p.firestore, ia), f = p._query;\n var y = new fc(h);\n c = {\n next: function(t) {\n i[a] && i[a](new Qa(h, y, p, t));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }, Ha(t._query);\n }\n return function(t, e, n, r) {\n var i = this, o = new lu(r), s = new gs(e, o, n);\n return t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ds, [ 4 /*yield*/ , Su(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n })), function() {\n o.Wo(), t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ps, [ 4 /*yield*/ , Su(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n }));\n };\n }(oa(h), f, l, c);\n}", "function i(t){\"use strict\";var a=this,n=e;a.s=t,a._c=\"s_m\",n.s_c_in||(n.s_c_il=[],n.s_c_in=0),a._il=n.s_c_il,a._in=n.s_c_in,a._il[a._in]=a,n.s_c_in++,a.version=\"1.0\";var i,o,r,s=\"pending\",c=\"resolved\",d=\"rejected\",l=\"timeout\",u=!1,p={},m=[],g=[],f=0,b=!1,h=function(){var e={};e.requiredVarList=[\"supplementalDataID\",\"timestamp\",\"dynamicVariablePrefix\",\"visitorID\",\"marketingCloudVisitorID\",\"analyticsVisitorID\",\"audienceManagerLocationHint\",\"authState\",\"fid\",\"vmk\",\"visitorMigrationKey\",\"visitorMigrationServer\",\"visitorMigrationServerSecure\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"fpCookieDomainPeriods\",\"cookieLifetime\",\"pageName\",\"pageURL\",\"referrer\",\"contextData\",\"currencyCode\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\",\"retrieveLightProfiles\",\"deleteLightProfiles\",\"retrieveLightData\"],e.accountVarList=e.requiredVarList.concat([\"purchaseID\",\"variableProvider\",\"channel\",\"server\",\"pageType\",\"transactionID\",\"campaign\",\"state\",\"zip\",\"events\",\"events2\",\"products\",\"audienceManagerBlob\",\"tnt\"]),e.lightRequiredVarList=[\"timestamp\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"cookieLifetime\",\"contextData\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\"],e.lightVarList=e.lightRequiredVarList.slice(0),e.accountConfigList=[\"account\",\"allAccounts\",\"debugTracking\",\"visitor\",\"visitorOptedOut\",\"trackOffline\",\"offlineLimit\",\"offlineThrottleDelay\",\"offlineFilename\",\"usePlugins\",\"doPlugins\",\"configURL\",\"visitorSampling\",\"visitorSamplingGroup\",\"linkObject\",\"clickObject\",\"linkURL\",\"linkName\",\"linkType\",\"trackDownloadLinks\",\"trackExternalLinks\",\"trackClickMap\",\"trackInlineStats\",\"linkLeaveQueryString\",\"linkTrackVars\",\"linkTrackEvents\",\"linkDownloadFileTypes\",\"linkExternalFilters\",\"linkInternalFilters\",\"useForcedLinkTracking\",\"forcedLinkTrackingTimeout\",\"trackingServer\",\"trackingServerSecure\",\"ssl\",\"abort\",\"mobile\",\"dc\",\"lightTrackVars\",\"maxDelay\",\"expectSupplementalData\",\"usePostbacks\",\"AudienceManagement\"];for(var t=0;250>=t;t++)76>t&&(e.accountVarList.push(\"prop\"+t),e.lightVarList.push(\"prop\"+t)),e.accountVarList.push(\"eVar\"+t),e.lightVarList.push(\"eVar\"+t),6>t&&e.accountVarList.push(\"hier\"+t),4>t&&e.accountVarList.push(\"list\"+t);var a=[\"pe\",\"pev1\",\"pev2\",\"pev3\",\"latitude\",\"longitude\",\"resolution\",\"colorDepth\",\"javascriptVersion\",\"javaEnabled\",\"cookiesEnabled\",\"browserWidth\",\"browserHeight\",\"connectionType\",\"homepage\",\"pageURLRest\"];return e.accountVarList=e.accountVarList.concat(a),e.requiredVarList=e.requiredVarList.concat(a),e}();a.newCall=!1,a.newCallVariableOverrides=null,a.hitCount=0,a.timeout=1e3,a.currentHit=null,a.backup=function(e,t,a){var n,i,o,r;for(t=t||{},n=0;2>n;n++)for(i=n>0?h.accountConfigList:h.accountVarList,o=0;o<i.length;o++)r=i[o],t[r]=e[r],a||t[r]||(t[\"!\"+r]=1);return t},a.restore=function(e,t,a){var n,i,o,r,s,c,d=!0;for(n=0;2>n;n++)for(i=n>0?h.accountConfigList:h.accountVarList,o=0;o<i.length;o++)if(r=i[o],s=e[r],s||e[\"!\"+r]){if(!a&&(\"contextData\"==r||\"retrieveLightData\"==r)&&t[r])for(c in t[r])s[c]||(s[c]=t[r][c]);t[r]=s}return d},a.createHitMeta=function(e,t){var n,i=a.s,o=[],r=[];return t=t||{},n={id:e,delay:!1,restorePoint:f,status:c,promise:Promise.resolve(),backup:{s:{},sSet:{},variableOverrides:{}},values:{s:{},variableOverrides:{}},timeout:!1},o=a.replacePromises(i,n.values.s),r=a.replacePromises(t,n.values.variableOverrides),n.backup.s=a.backup(i),n.backup.sSet=a.backup(i,null,!0),n.backup.variableOverrides=t,(o&&o.length>0||r&&r.length>0)&&(n.delay=!0,n.status=s,n.promise=Promise.all([Promise.all(o),Promise.all(r)]).then(function(){n.delay=!1,n.status=c,n.timeout&&clearTimeout(n.timeout)}),a.timeout&&(n.timeout=setTimeout(function(){n.delay=!1,n.status=l,n.timeout&&clearTimeout(n.timeout),a.sendPendingHits()},a.timeout))),n},a.replacePromises=function(e,t){var a,n,i,o,r,l,u=[];t=t||{},o=function(e,t){return function(a){t[e].value=a,t[e].status=c}},r=function(e,t){return function(a){t[e].status=d,t[e].exception=a}},l=function(e,t,a){var n=e[t];n instanceof Promise?(a[t]=a[t]||{},\"contextData\"===t||\"retrieveLightData\"===t?e[t]={}:e[t]=\"\",a[t].status=s,u.push(n.then(o(t,a))[\"catch\"](r(t,a)))):\"object\"==typeof n&&null!==n&&n.promise instanceof Promise&&(a[t]=a[t]||{},\"contextData\"===t||\"retrieveLightData\"===t?e[t]={}:e[t]=\"\",n.hasOwnProperty(\"unresolved\")&&(a[t].value=n.unresolved),a[t].status=s,u.push(n.promise.then(o(t,a))[\"catch\"](r(t,a))))};for(a in e)if(e.hasOwnProperty(a))if(i=e[a],\"contextData\"===a||\"retrieveLightData\"===a)if(i instanceof Promise||\"object\"==typeof i&&null!==i&&i.promise instanceof Promise)l(e,a,t);else{t[a]={isGroup:!0};for(n in i)i.hasOwnProperty(n)&&l(i,n,t[a])}else l(e,a,t);return u},a.metaToObject=function(e){var t,n,i,o,r=(a.s,{});if(e)for(t in e)if(e.hasOwnProperty(t))if(i=e[t],\"contextData\"!==t&&\"retrieveLightData\"!==t||!i.isGroup)i.value&&i.status===c&&(r[t]=i.value);else{r[t]={};for(n in i)i.hasOwnProperty(n)&&(o=i[n],o.value&&o.status===c&&(r[t][n]=o.value))}return r},a.getMeta=function(e){return e&&m[e]?m[e]:m},a.forceReady=function(){u=!0,a.sendPendingHits()},i=t.isReadyToTrack,t.isReadyToTrack=function(){return!!(!a.newCall&&i()&&g&&g.length>0&&(u||m[g[0]]&&!m[g[0]].delay))},o=t.callbackWhenReadyToTrack,t.callbackWhenReadyToTrack=function(e,n,i){var r,s;return n!==t.track?o(e,n,i):void(a.newCall&&(r=a.hitCount++,g.push(r),s=a.createHitMeta(r,a.newCallVariableOverrides),m[r]=s,b||(b=setInterval(a.sendPendingHits,100)),s.promise.then(function(){a.sendPendingHits()})))},r=t.t,t.t=t.track=function(e,t,n){n||(a.newCall=!0,a.newCallVariableOverrides=e),r(e,t),n||(a.newCall=!1,a.newCallVariableOverrides=null,a.sendPendingHits())},a.sendPendingHits=function(){for(var e,t,n,i,o,r=a.s;r.isReadyToTrack();){for(e=m[g[0]],a.currentHit=e,i={},o={},a.trigger(\"hitBeforeSend\",e),o.marketingCloudVisitorID=r.marketingCloudVisitorID,o.visitorOptedOut=r.visitorOptedOut,o.analyticsVisitorID=r.analyticsVisitorID,o.audienceManagerLocationHint=r.audienceManagerLocationHint,o.audienceManagerBlob=r.audienceManagerBlob,a.restore(e.backup.s,r),t=e.restorePoint;t<g[0];t++)n=a.metaToObject(m[t].values.s),delete n.referrer,delete n.resolution,delete n.colorDepth,delete n.javascriptVersion,delete n.javaEnabled,delete n.cookiesEnabled,delete n.browserWidth,delete n.browserHeight,delete n.connectionType,delete n.homepage,a.restore(n,o);a.restore(e.backup.sSet,o),a.restore(a.metaToObject(e.values.s),o),a.restore(e.backup.variableOverrides,i),a.restore(a.metaToObject(e.values.variableOverrides),i),r.track(i,o,!0),f=g.shift(),a.trigger(\"hitAfterSend\",e),a.currentHit=null}b&&g.length<1&&(clearInterval(b),b=!1)},i()||o(a,function(){a.sendPendingHits()},[]),a.on=function(e,t){p[e]||(p[e]=[]),p[e].push(t)},a.trigger=function(e,t){var a,n,i,o=!1;if(p[e])for(a=0,n=p[e].length;n>a;a++){i=p[e][a];try{i(t),o=!0}catch(e){}}else o=!0;return o},a._s=function(){a.trigger(\"_s\")},a._d=function(){return a.trigger(\"_d\"),0},a._g=function(){a.trigger(\"_g\")},a._t=function(){a.trigger(\"_t\")}}", "static get apiEndpoint() {\n return 'securitycenter.googleapis.com';\n }", "transient final protected internal function m174() {}", "function xi(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "function sdk(){\n}", "function getGamerAd () {\n //google publisher tag\n window.googletag = window.googletag || {};\n window.googletag.cmd = window.googletag.cmd || [];\n window.googletag.cmd.push(function () {\n window.googletag.pubads().setTargeting('permutive', 'gaming');\n googletag.enableServices();\n console.log( `3) pubads called with segment data `)// check\n });\n}", "function start() {\n // console.log(typeof String(getKey('google')))\n // 2. Initialize the JavaScript client library.\n gapi.client.init({\n 'apiKey': \"AIzaSyABljrxKqX_RRid-9DZMq9aHGm65tuXSSk\"\n }).then(function () {\n // 3. Initialize and make the API request.\n gapi.client.request({\n 'path': `${defineRequest()}`,\n })\n }).then(function (response) {\n }, function (reason) {\n console.log(reason);\n console.log('Error: ' + reason.result.error.message);\n });\n }", "static get servicePath() {\n return 'securitycenter.googleapis.com';\n }", "function trackInAnalytics(version) {\n // Create the random UUID from 30 random hex numbers gets them into the format xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx (with y being 8, 9, a, or b).\n var uuid = \"\";\n for (var i = 0; i < 30; i++) {\n uuid += parseInt(Math.random() * 16).toString(16);\n }\n uuid = uuid.substr(0, 8) + \"-\" + uuid.substr(8, 4) + \"-4\" + uuid.substr(12, 3) + \"-\" + parseInt(Math.random() * 4 + 8).toString(16) + uuid.substr(15, 3) + \"-\" + uuid.substr(18, 12);\n\n var url = \"http://www.google-analytics.com/collect?v=1&t=event&tid=UA-74705456-1&cid=\" + uuid + \"&ds=adwordsscript&an=qstracker&av=\"\n + version\n + \"&ec=AdWords%20Scripts&ea=Script%20Execution&el=QS%20Tracker%20v\" + version;\n UrlFetchApp.fetch(url);\n}", "static get servicePath() {\n return 'logging.googleapis.com';\n }", "function Pi(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "static get scopes() {\n return ['https://www.googleapis.com/auth/cloud-platform'];\n }", "function errorGoogle() {\r\n\t\twindow.alert('Your API is NOT Valid. Please check again');\r\n}", "static final private internal function m106() {}", "transient private internal function m185() {}", "function AppMeasurement_Module_ActivityMap(h){function q(){var a=f.pageYOffset+(f.innerHeight||0);a&&a>+g&&(g=a)}function r(){if(e.scrollReachSelector){var a=h.d.querySelector&&h.d.querySelector(e.scrollReachSelector);a?(g=a.scrollTop||0,a.addEventListener(\"scroll\",function(){var d;(d=a&&a.scrollTop+a.clientHeight||0)>g&&(g=d)})):0<w--&&setTimeout(r,1E3)}}function l(a,d){var c,b,n;if(a&&d&&(c=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<c.length&&(b=c[n++]);)if(-1<a.indexOf(b))return null;p=1;return a}\nfunction s(a,d,c,b,e){var f,k;if(a.dataset&&(k=a.dataset[d]))f=k;else if(a.getAttribute)if(k=a.getAttribute(\"data-\"+c))f=k;else if(k=a.getAttribute(c))f=k;if(!f&&h.useForcedLinkTracking&&e){var g;a=a.onclick?\"\"+a.onclick:\"\";varValue=\"\";if(b&&a&&(d=a.indexOf(b),0<=d)){for(d+=b.length;d<a.length;)if(c=a.charAt(d++),0<=\"'\\\"\".indexOf(c)){g=c;break}for(k=!1;d<a.length&&g;){c=a.charAt(d);if(!k&&c===g)break;\"\\\\\"===c?k=!0:(varValue+=c,k=!1);d++}}(g=varValue)&&(h.w[b]=g)}return f||e&&h.w[b]}function t(a,d,\nc){var b;return(b=e[d](a,c))&&(p?(p=0,b):l(m(b),e[d+\"Exclusions\"]))}function u(a,d,c){var b;if(a&&!(1===(b=a.nodeType)&&(b=a.nodeName)&&(b=b.toUpperCase())&&x[b])&&(1===a.nodeType&&(b=a.nodeValue)&&(d[d.length]=b),c.a||c.t||c.s||!a.getAttribute||((b=a.getAttribute(\"alt\"))?c.a=b:(b=a.getAttribute(\"title\"))?c.t=b:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(b=a.getAttribute(\"src\")||a.src)&&(c.s=b)),(b=a.childNodes)&&b.length))for(a=0;a<b.length;a++)u(b[a],d,c)}function m(a){if(null==a||void 0==a)return a;\ntry{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=h;var f=window;f.s_c_in||(f.s_c_il=[],f.s_c_in=0);e._il=f.s_c_il;e._in=f.s_c_in;e._il[e._in]=e;f.s_c_in++;\ne._c=\"s_m\";var g=0,v,w=60;e.c={};var p=0,x={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,c,b=h.contextData,e=h.linkObject;(a=h.pageName||h.pageURL)&&(d=t(e,\"link\",h.linkName))&&(c=t(e,\"region\"))&&(b[\"a.activitymap.page\"]=a.substring(0,255),b[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,b[\"a.activitymap.region\"]=127<c.length?c.substring(0,127):c,0<g&&(b[\"a.activitymap.xy\"]=10*Math.floor(g/10)),b[\"a.activitymap.pageIDType\"]=h.pageName?1:0)};e.e=function(){e.trackScrollReach&&\n!v&&(e.scrollReachSelector?r():(q(),f.addEventListener&&f.addEventListener(\"scroll\",q,!1)),v=!0)};e.link=function(a,d){var c;if(d)c=l(m(d),e.linkExclusions);else if((c=a)&&!(c=s(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var b,f;(f=l(m(a.innerText||a.textContent),e.linkExclusions))||(u(a,b=[],c={a:void 0,t:void 0,s:void 0}),(f=l(m(b.join(\"\"))))||(f=l(m(c.a?c.a:c.t?c.t:c.s?c.s:void 0)))||!(b=(b=a.tagName)&&b.toUpperCase?b.toUpperCase():\"\")||(\"INPUT\"==b||\"SUBMIT\"==b&&a.value?f=l(m(a.value)):\"IMAGE\"==\nb&&a.src&&(f=l(m(a.src)))));c=f}return c};e.region=function(a){for(var d,c=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=s(a,c,c,c))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "get service() {\n return this.canvas.__jsonld.service; // eslint-disable-line no-underscore-dangle\n }", "function fc(t) {\n for (var e, n, r, i = [], o = 1; o < arguments.length; o++) i[o - 1] = arguments[o];\n t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_0__[\"getModularInstance\"])(t);\n var s = {\n includeMetadataChanges: !1\n }, a = 0;\n \"object\" != typeof i[a] || Zu(i[a]) || (s = i[a], a++);\n var c, h, f, l = {\n includeMetadataChanges: s.includeMetadataChanges\n };\n if (Zu(i[a])) {\n var d = i[a];\n i[a] = null === (e = d.next) || void 0 === e ? void 0 : e.bind(d), i[a + 1] = null === (n = d.error) || void 0 === n ? void 0 : n.bind(d), \n i[a + 2] = null === (r = d.complete) || void 0 === r ? void 0 : r.bind(d);\n }\n if (t instanceof Qu) h = Bu(t.firestore, na), f = Qt(t._key.path), c = {\n next: function(e) {\n i[a] && i[a](dc(h, t, e));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }; else {\n var p = Bu(t, zu);\n h = Bu(p.firestore, na), f = p._query;\n var y = new cc(h);\n c = {\n next: function(t) {\n i[a] && i[a](new Ka(h, y, p, t));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }, za(t._query);\n }\n return function(t, e, n, r) {\n var i = this, o = new fu(r), s = new ms(e, o, n);\n return t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ls, [ 4 /*yield*/ , Tu(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n })), function() {\n o.Wo(), t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ds, [ 4 /*yield*/ , Tu(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n }));\n };\n }(ra(h), f, l, c);\n}", "transient private protected internal function m182() {}", "function onYouTubeApiLoad() {\n // This API key is intended for use only in this lesson.\n // See http://goo.gl/PdPA1 to get a key for your own applications.\n gapi.client.setApiKey('AIzaSyBgAgZFXgrB_osmxLAYqTW3DAQOYKno3zI');\n\n \n}", "function SigV4Utils() { }", "function ga4(){\n try {\n return window.gtag.apply(window.gtag, arguments);\n } catch (e) {\n console.error('Could not track event. Fine if this is a test.', e, Array.from(arguments));\n }\n}", "function a(t){\"use strict\";var n=this,i=e;n.s=t,n._c=\"s_m\",i.s_c_in||(i.s_c_il=[],i.s_c_in=0),n._il=i.s_c_il,n._in=i.s_c_in,n._il[n._in]=n,i.s_c_in++,n.version=\"1.0\";var a,r,o,s=\"pending\",c=\"resolved\",u=\"rejected\",l=\"timeout\",d=!1,f={},p=[],g=[],h=0,m=!1,v=function(){var e={};e.requiredVarList=[\"supplementalDataID\",\"timestamp\",\"dynamicVariablePrefix\",\"visitorID\",\"marketingCloudVisitorID\",\"analyticsVisitorID\",\"audienceManagerLocationHint\",\"authState\",\"fid\",\"vmk\",\"visitorMigrationKey\",\"visitorMigrationServer\",\"visitorMigrationServerSecure\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"fpCookieDomainPeriods\",\"cookieLifetime\",\"pageName\",\"pageURL\",\"referrer\",\"contextData\",\"currencyCode\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\",\"retrieveLightProfiles\",\"deleteLightProfiles\",\"retrieveLightData\"],e.accountVarList=e.requiredVarList.concat([\"purchaseID\",\"variableProvider\",\"channel\",\"server\",\"pageType\",\"transactionID\",\"campaign\",\"state\",\"zip\",\"events\",\"events2\",\"products\",\"audienceManagerBlob\",\"tnt\"]),e.lightRequiredVarList=[\"timestamp\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"cookieLifetime\",\"contextData\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\"],e.lightVarList=e.lightRequiredVarList.slice(0),e.accountConfigList=[\"account\",\"allAccounts\",\"debugTracking\",\"visitor\",\"visitorOptedOut\",\"trackOffline\",\"offlineLimit\",\"offlineThrottleDelay\",\"offlineFilename\",\"usePlugins\",\"doPlugins\",\"configURL\",\"visitorSampling\",\"visitorSamplingGroup\",\"linkObject\",\"clickObject\",\"linkURL\",\"linkName\",\"linkType\",\"trackDownloadLinks\",\"trackExternalLinks\",\"trackClickMap\",\"trackInlineStats\",\"linkLeaveQueryString\",\"linkTrackVars\",\"linkTrackEvents\",\"linkDownloadFileTypes\",\"linkExternalFilters\",\"linkInternalFilters\",\"useForcedLinkTracking\",\"forcedLinkTrackingTimeout\",\"trackingServer\",\"trackingServerSecure\",\"ssl\",\"abort\",\"mobile\",\"dc\",\"lightTrackVars\",\"maxDelay\",\"expectSupplementalData\",\"usePostbacks\",\"AudienceManagement\"];for(var t=0;250>=t;t++)76>t&&(e.accountVarList.push(\"prop\"+t),e.lightVarList.push(\"prop\"+t)),e.accountVarList.push(\"eVar\"+t),e.lightVarList.push(\"eVar\"+t),6>t&&e.accountVarList.push(\"hier\"+t),4>t&&e.accountVarList.push(\"list\"+t);var n=[\"pe\",\"pev1\",\"pev2\",\"pev3\",\"latitude\",\"longitude\",\"resolution\",\"colorDepth\",\"javascriptVersion\",\"javaEnabled\",\"cookiesEnabled\",\"browserWidth\",\"browserHeight\",\"connectionType\",\"homepage\",\"pageURLRest\"];return e.accountVarList=e.accountVarList.concat(n),e.requiredVarList=e.requiredVarList.concat(n),e}(),b=!1;n.newHit=!1,n.newHitVariableOverrides=null,n.hitCount=0,n.timeout=1e3,n.currentHit=null,n.backup=function(e,t,n){var i,a,r,o;for(t=t||{},i=0;2>i;i++)for(a=i>0?v.accountConfigList:v.accountVarList,r=0;r<a.length;r++)o=a[r],t[o]=e[o],n||t[o]||(t[\"!\"+o]=1);return t},n.restore=function(e,t,n){var i,a,r,o,s,c,u=!0;for(i=0;2>i;i++)for(a=i>0?v.accountConfigList:v.accountVarList,r=0;r<a.length;r++)if(o=a[r],s=e[o],s||e[\"!\"+o]){if(!n&&(\"contextData\"==o||\"retrieveLightData\"==o)&&t[o])for(c in t[o])s[c]||(s[c]=t[o][c]);t[o]=s}return u},n.createHitMeta=function(e,t){var i,a=n.s,r=[],o=[];return b&&console.log(a.account+\" - createHitMeta\"),t=t||{},i={id:e,delay:!1,restorePoint:h,status:c,promise:Promise.resolve(),backup:{s:{},sSet:{},variableOverrides:{}},values:{s:{},variableOverrides:{}},timeout:!1},r=n.replacePromises(a,i.values.s),o=n.replacePromises(t,i.values.variableOverrides),i.backup.s=n.backup(a),i.backup.sSet=n.backup(a,null,!0),i.backup.variableOverrides=t,(r&&r.length>0||o&&o.length>0)&&(i.delay=!0,i.status=s,i.promise=Promise.all([Promise.all(r),Promise.all(o)]).then(function(){i.delay=!1,i.status=c,i.timeout&&clearTimeout(i.timeout)}),n.timeout&&(i.timeout=setTimeout(function(){i.delay=!1,i.status=l,i.timeout&&clearTimeout(i.timeout),n.sendPendingHits()},n.timeout))),i},n.replacePromises=function(e,t){var n,i,a,r,o,l,d=[];t=t||{},r=function(e,t){return function(n){t[e].value=n,t[e].status=c}},o=function(e,t){return function(n){t[e].status=u,t[e].exception=n}},l=function(e,t,n){var i=e[t];i instanceof Promise?(n[t]=n[t]||{},e[t]=\"contextData\"===t||\"retrieveLightData\"===t?{}:\"\",n[t].status=s,d.push(i.then(r(t,n))[\"catch\"](o(t,n)))):\"object\"==typeof i&&null!==i&&i.promise instanceof Promise&&(n[t]=n[t]||{},e[t]=\"contextData\"===t||\"retrieveLightData\"===t?{}:\"\",i.hasOwnProperty(\"unresolved\")&&(n[t].value=i.unresolved),n[t].status=s,d.push(i.promise.then(r(t,n))[\"catch\"](o(t,n))))};for(n in e)if(e.hasOwnProperty(n))if(a=e[n],\"contextData\"===n||\"retrieveLightData\"===n)if(a instanceof Promise||\"object\"==typeof a&&null!==a&&a.promise instanceof Promise)l(e,n,t);else{t[n]={isGroup:!0};for(i in a)a.hasOwnProperty(i)&&l(a,i,t[n])}else l(e,n,t);return d},n.metaToObject=function(e){var t,i,a,r,o=(n.s,{});if(e)for(t in e)if(e.hasOwnProperty(t))if(a=e[t],\"contextData\"!==t&&\"retrieveLightData\"!==t||!a.isGroup)a.value&&a.status===c&&(o[t]=a.value);else{o[t]={};for(i in a)a.hasOwnProperty(i)&&(r=a[i],r.value&&r.status===c&&(o[t][i]=r.value))}return o},n.getMeta=function(e){return e&&p[e]?p[e]:p},n.forceReady=function(){d=!0,n.sendPendingHits()},a=t.isReadyToTrack,t.isReadyToTrack=function(){if(!n.newHit&&a()&&g&&g.length>0&&(d||p[g[0]]&&!p[g[0]].delay))return b&&console.log(t.account+\" - isReadyToTrack - true\"),!0;if(b&&(console.log(t.account+\" - isReadyToTrack - false\"),console.log(t.account+\" - isReadyToTrack - isReadyToTrack(original) - \"+a()),!a()))try{throw Error(\"Debugging Call stack\")}catch(e){console.log(t.account+\" - isReadyToTrack - \"+e.stack)}return!1},r=t.callbackWhenReadyToTrack,t.callbackWhenReadyToTrack=function(e,i,a){var o,s;return b&&console.log(t.account+\" - callbackWhenReadyToTrack\"),i!==t.track?r(e,i,a):void(n.newHit&&(o=n.hitCount++,g.push(o),s=n.createHitMeta(o,n.newHitVariableOverrides),p[o]=s,m||(m=setInterval(n.sendPendingHits,100)),s.promise.then(function(){n.sendPendingHits()})))},o=t.t,t.t=t.track=function(e,i,a){b&&console.log(t.account+\" - track\"),a||(n.newHit=!0,n.newHitVariableOverrides=e),o(e,i),a||(n.newHit=!1,n.newHitVariableOverrides=null,n.sendPendingHits())},n.sendPendingHits=function(){var e,t,i,a,r,o=n.s;for(b&&console.log(o.account+\" - sendPendingHits\");o.isReadyToTrack();){for(e=p[g[0]],n.currentHit=e,a={},r={},n.trigger(\"hitBeforeSend\",e),r.marketingCloudVisitorID=o.marketingCloudVisitorID,r.visitorOptedOut=o.visitorOptedOut,r.analyticsVisitorID=o.analyticsVisitorID,r.audienceManagerLocationHint=o.audienceManagerLocationHint,r.audienceManagerBlob=o.audienceManagerBlob,b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.s,o),t=e.restorePoint;t<g[0];t++)i=n.metaToObject(p[t].values.s),delete i.referrer,delete i.resolution,delete i.colorDepth,delete i.javascriptVersion,delete i.javaEnabled,delete i.cookiesEnabled,delete i.browserWidth,delete i.browserHeight,delete i.connectionType,delete i.homepage,n.restore(i,r);b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.sSet,r),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(n.metaToObject(e.values.s),r),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.variableOverrides,a),n.restore(n.metaToObject(e.values.variableOverrides),a),o.track(a,r,!0),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),h=g.shift(),n.trigger(\"hitAfterSend\",e),n.currentHit=null}m&&g.length<1&&(clearInterval(m),m=!1)},b&&console.log(t.account+\" - INITIAL isReadyToTrack - \"+a()),a()||r(n,function(){if(b)try{throw Error(\"Debugging Call stack\")}catch(e){console.log(t.account+\" - callbackWhenReadyToTrack - \"+e.stack)}n.sendPendingHits()},[]),n.on=function(e,t){f[e]||(f[e]=[]),f[e].push(t)},n.trigger=function(e,t){var n,i,a,r=!1;if(f[e])for(n=0,i=f[e].length;i>n;n++){a=f[e][n];try{a(t),r=!0}catch(o){}}else r=!0;return r},n._s=function(){n.trigger(\"_s\")},n._d=function(){return n.trigger(\"_d\"),0},n._g=function(){n.trigger(\"_g\")},n._t=function(){n.trigger(\"_t\")}}", "function t(e, r, i) {\n this.name = e, this.version = r, this.Un = i, \n // NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the\n // bug we're checking for should exist in iOS >= 12.2 and < 13, but for\n // whatever reason it's much harder to hit after 12.2 so we only proactively\n // log on 12.2.\n 12.2 === t.Qn(Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"getUA\"])()) && A(\"Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.\");\n }", "function googleApiClientReady() {\n loadAPIClientInterfaces();\n /*console.log(\"Getting ready\");\n gapi.auth.init(function() {\n window.setTimeout(checkAuth, 1);\n });*/\n}", "function M() {\n if (\"undefined\" == typeof atob) throw new P(R.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "supportsPlatform() {\n return true;\n }", "function version(){ return \"0.13.0\" }", "function getClientVersion() { return '0.14.4'; }", "get api() {\n return google;\n }", "function googleAPIError() {\n alert('Fail to connect to Google API.');\n}", "async function main() {\n try {\n const oAuth2Client = await getAuthenticatedClient();\n // Make a simple request to the Google Plus API using our pre-authenticated client. The `request()` method\n // takes an AxiosRequestConfig object. Visit https://github.com/axios/axios#request-config.\n // const url = 'https://www.googleapis.com/plus/v1/people?query=pizza';\n\n console.log(oAuth2Client);\n var call_creds = grpc.credentials.createFromGoogleCredential(oAuth2Client);\n var combined_creds = grpc.credentials.combineChannelCredentials(ssl_creds, call_creds);\n var stub = new authProto.Greeter('greeter.googleapis.com', combined_credentials);\n const res = await oAuth2Client.request({scope})\n console.log(res.data);\n } catch (e) {\n console.error(e);\n }\n process.exit();\n}", "function Ci(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "function initGAPI() {\r\n if (!app.google.api.length) {\r\n jQuery(\".az-gg-login-btn\").remove();\r\n return;\r\n }\r\n gapi.load(\"auth2\", function () {\r\n gapi.auth2.init({\r\n client_id: app.google.api\r\n })\r\n .then(function (response) {\r\n // console.log('Google API Success');\r\n app.google.hasValidApi = true;\r\n // console.log(response);\r\n })\r\n .catch(function (error) {\r\n console.log('Google API Error');\r\n app.google.hasValidApi = false;\r\n // console.log(error);\r\n });\r\n });\r\n}", "static get scopes() {\n return [\n 'https://www.googleapis.com/auth/cloud-platform',\n 'https://www.googleapis.com/auth/cloud-platform.read-only',\n 'https://www.googleapis.com/auth/logging.admin',\n 'https://www.googleapis.com/auth/logging.read',\n 'https://www.googleapis.com/auth/logging.write',\n ];\n }", "function DWRUtil() { }", "onGoogleLogin(response) {\n console.log(response);\n }", "function embedhtml5(gd, mb) {\n function hd() {\n function F(a) {\n return (\"\" + a).toLowerCase()\n }\n\n function Ha(a, d) {\n if (!a)return a;\n var b = 0, f = 0, g, n = a.length, k;\n for (g = 0; g < n; g++)if (k = a.charCodeAt(g), 32 >= k)b++; else break;\n for (g = n - 1; 0 < g; g--)if (k = a.charCodeAt(g), 32 >= k)f++; else break;\n void 0 === d && (g = a.charAt(b), k = a.charAt(n - f - 1), (\"'\" == g && \"'\" == k || '\"' == g && '\"' == k) && 3 == a.split(g).length && (b++, f++));\n return a = a.slice(b, n - f)\n }\n\n function pa(a) {\n return 0 <= _[368].indexOf(String(a).toLowerCase())\n }\n\n function ga(a, d) {\n return _[523] == d ? Number(a) : _[67] == d ? pa(a) : _[13] == d ? null == a ? null : String(a) : a\n }\n\n function sa(a) {\n return Number(a).toFixed(6)\n }\n\n function ha(a, d, b, f) {\n a.__defineGetter__(d, b);\n void 0 !== f && a.__defineSetter__(d, f)\n }\n\n function va(a, d, b) {\n var f = \"_\" + d;\n a[f] = b;\n a.__defineGetter__(d, function () {\n return a[f]\n });\n a.__defineSetter__(d, function (d) {\n d = ga(d, typeof b);\n d != a[f] && (a[f] = d, a.haschanged = !0)\n })\n }\n\n function Aa(a) {\n a && a.preventDefault()\n }\n\n function R(a, d, b, f) {\n a && a.addEventListener(d, b, f)\n }\n\n function ba(a, d, b, f) {\n a && a.removeEventListener(d, b, f)\n }\n\n function Ja(a) {\n var d = aa.createElement(1 == a ? \"img\" : 2 == a ? _[486] : \"div\");\n d && 1 == a && \"off\" != Tc && (d.crossOrigin = Tc);\n return d\n }\n\n function gc(a) {\n return function () {\n return a.apply(a, arguments)\n }\n }\n\n function id(a) {\n return a.split(\"<\").join(\"&lt;\").split(\">\").join(\"&gt;\")\n }\n\n function ca(a, d) {\n var b = \"(\" + (a >> 16 & 255) + \",\" + (a >> 8 & 255) + \",\" + (a & 255);\n void 0 === d && (d = 1 - (a >> 24 & 255) / 255);\n return (1 > d ? \"rgba\" + b + \",\" + d : \"rgb\" + b) + \")\"\n }\n\n function Ed(a) {\n return a.split(\"[\").join(\"<\").split(\"<<\").join(\"[\").split(\"]\").join(\">\").split(\">>\").join(\"]\")\n }\n\n function nc(a, d) {\n a = Number(a);\n for (d = Number(d); 0 > a;)a += 360;\n for (; 360 < a;)a -= 360;\n var b = Math.abs(d - a), f = Math.abs(d - (a - 360)), g = Math.abs(d - (a + 360));\n f < b && f < g ? a -= 360 : g < b && g < f && (a += 360);\n return a\n }\n\n function Gc(a) {\n if (a) {\n var d = a.indexOf(\"?\");\n 0 <= d && (a = a.slice(0, d));\n d = a.indexOf(\"#\");\n 0 <= d && (a = a.slice(0, d))\n }\n return a\n }\n\n function Vd(a) {\n a = Gc(a);\n var d = a.lastIndexOf(\"/\"), b = a.lastIndexOf(\"\\\\\");\n b > d && (d = b);\n return a.slice(d + 1)\n }\n\n function Uc(a, d) {\n var b = String(a).charCodeAt(0);\n return 48 <= b && 57 >= b ? (la(3, d + _[154]), !1) : !0\n }\n\n function gd(a, d) {\n for (var b = \"\", f = 0, g = 1, n = 0, k = 0; 1 == g && 0 == f;) {\n var e, w = a.indexOf(\"*\", n), b = \"\";\n 0 > w ? (w = a.length, f = 1) : (b = a.indexOf(\"*\", w + 1), 0 > b && (b = a.length), e = b - (w + 1), b = a.substr(w + 1, e));\n e = w - n;\n 0 < e && d.substr(k, f ? void 0 : e) != a.substr(n, e) && (g = 0);\n n = w + 1;\n \"\" != b && (k = d.indexOf(b, k), 0 > k && (g = 0))\n }\n return !!g\n }\n\n function oc(a, d, b, f) {\n for (; 32 >= a.charCodeAt(d);)d++;\n for (; 32 >= a.charCodeAt(b - 1);)b--;\n var g = a.charCodeAt(d);\n if (37 == g)a = U(a.slice(d + 1, b), f); else if (103 == g && \"get(\" == a.slice(d, d + 4)) {\n for (d += 4; 32 >= a.charCodeAt(d);)d++;\n for (b = a.lastIndexOf(\")\"); 32 >= a.charCodeAt(b - 1);)b--;\n a = U(a.slice(d, b), f)\n } else 99 == g && \"calc(\" == a.slice(d, d + 5) ? a = U(a.slice(d, b), f) : (f = a.charCodeAt(d), 39 != f && 34 != f || f != a.charCodeAt(b - 1) || (d++, b--), a = a.slice(d, b));\n return a\n }\n\n function Vc(a) {\n var d = [];\n if (null == a || void 0 == a)return d;\n var b, f = 0, g, n, k = 0;\n a = F(a);\n g = a.length;\n for (b = 0; b < g; b++)n = a.charCodeAt(b), 40 == n ? k++ : 41 == n ? k-- : 46 == n && 0 == k && (d.push(a.slice(f, b)), f = b + 1);\n d.push(a.slice(f));\n return d\n }\n\n function Ka(a, d) {\n a = F(a);\n var b, f, g, n;\n g = Yb[a];\n null != g && void 0 !== g && \"\" != g && Zb(g, null, d);\n n = Yb.getArray();\n f = n.length;\n for (b = 0; b < f; b++)if (g = n[b])g = g[a], null != g && void 0 !== g && \"\" != g && Zb(g, null, d)\n }\n\n function I(a, d, b, f, g) {\n if (d && _[13] == typeof d) {\n var n = d.slice(0, 4);\n \"get:\" == n ? d = U(d.slice(4)) : \"calc\" == n && 58 == d.charCodeAt(4) && (d = da.calc(null, d.slice(5)))\n }\n var n = null, k, e = Vc(a);\n k = e.length;\n if (1 == k && f && (n = e[0], void 0 !== f[n])) {\n f[n] = _[67] == typeof f[n] ? pa(d) : d;\n return\n }\n var w = m, n = null;\n 1 < k && (n = e[k - 1]);\n for (a = 0; a < k; a++) {\n var x = e[a], v = a == k - 1, r = null, y = x.indexOf(\"[\");\n 0 < y && (r = oc(x, y + 1, x.length - 1, f), x = x.slice(0, y));\n y = !1;\n if (void 0 === w[x]) {\n if (b)break;\n v || (null == r ? w[x] = new Fb : (w[x] = new bb(Fb), y = !0))\n } else y = !0;\n if (y && 0 == v && w[x] && 1 == w[x].isArray && null != r)if (v = null, w = w[x], v = b ? w.getItem(r) : w.createItem(r)) {\n if (a == k - 2 && \"name\" == n) {\n d = F(d);\n r != d && (null == d || \"null\" == d || \"\" == d ? w.removeItem(r) : w.renameItem(r, d));\n break\n }\n w = v;\n continue\n } else break;\n if (v)w[x] = 1 == g ? d : ga(d, typeof w[x]); else if (w = w[x], null == w)break\n }\n }\n\n function Wd(a) {\n if (a && \"null\" != a) {\n if (_[13] == typeof a) {\n var d = a.split(\"&\"), b = d.length, f;\n a = {};\n for (f = 0; f < b; f++) {\n var g = d[f].split(\"=\");\n a[g[0]] = g[1]\n }\n }\n for (var n in a)\"xml\" != n && I(n, a[n])\n }\n }\n\n function U(a, d, b) {\n if (a && \"calc(\" == (\"\" + a).slice(0, 5))return da.calc(null, a.slice(5, a.lastIndexOf(\")\")));\n var f, g, n = Vc(a);\n f = n.length;\n if (1 == f && _[307] == n[0])return d ? d._type + \"[\" + d.name + \"]\" : \"\";\n if (1 == f && d && (g = n[0], d.hasOwnProperty(g)))return d[g];\n var k = m;\n for (a = 0; a < f; a++) {\n g = n[a];\n var e = a == f - 1, w = null, x = g.indexOf(\"[\");\n 0 < x && (w = oc(g, x + 1, g.length - 1, d), g = g.slice(0, x));\n if (k && void 0 !== k[g]) {\n if (null != w && (x = k[g]) && x.isArray)if (g = x.getItem(w)) {\n if (e)return g;\n k = g;\n continue\n } else break;\n if (e)return k[g];\n k = k[g]\n } else break\n }\n return !0 === b ? void 0 : null\n }\n\n function Zb(a, d, b) {\n da.callaction(a, d, b)\n }\n\n function hd(a, d, b) {\n Zb(a, d ? U(d) : null, b ? pa(b) : null)\n }\n\n function la(a, d) {\n !jd && (0 < a || m.debugmode) && (d = [\"DEBUG\", \"INFO\", _[458], \"ERROR\", _[367]][a] + \": \" + d, V.log(d), 2 < a && m.showerrors && setTimeout(function () {\n try {\n V.showlog(!0)\n } catch (a) {\n }\n }, 500))\n }\n\n function Ea(a, d) {\n if (!jd) {\n a = \"\" + a;\n var E = 0 < F(a).indexOf(\"load\");\n a = id(a).split(\"[br]\").join(\"<br/>\");\n var f = xa.createItem(_[424]), g = xa.createItem(_[425]);\n f.sprite || (f.create(), V.controllayer.appendChild(f.sprite));\n g.sprite || (g.create(), V.controllayer.appendChild(g.sprite));\n var n;\n f.loaded = !0;\n f.align = _[66];\n f.width = \"100%\";\n f.height = \"100%\";\n f.alpha = .5;\n f.keep = !0;\n n = f.sprite.style;\n n.backgroundColor = _[26];\n n.zIndex = 99999998;\n E && (g.visible = !1);\n g.loaded = !0;\n g.align = _[136];\n g.y = 0;\n g.width = \"105%\";\n var k = b.ie || b.android ? -2 : 2;\n g.height = k + 46 / X;\n g.keep = !0;\n n = g.sprite.style;\n n.backgroundColor = _[26];\n n.color = _[40];\n n.fontFamily = b.realDesktop && !b.ie ? _[55] : _[38];\n n.fontSize = \"12px\";\n n.margin = \"-2px\";\n n.border = _[239];\n d || (d = _[291]);\n g.sprite.innerHTML = _[166] + d + \"<br/>\" + a + _[298];\n n.zIndex = 99999999;\n n[pc] = _[203];\n g.jsplugin = {\n onresize: function (a, d) {\n var b = g.sprite.childNodes[0].clientHeight;\n g.height = k + Math.max(46, b) / X;\n 0 >= b && (g.imageheight = 1)\n }\n };\n f.updatepos();\n g.updatepos();\n E && setTimeout(function () {\n try {\n g.visible = !0\n } catch (a) {\n }\n }, 500)\n }\n }\n\n function ve() {\n Xa.removeelements(!0);\n Xd.stop();\n Pa.unregister();\n Oa.unload();\n V.remove()\n }\n\n function we() {\n this.caller = this.args = this.cmd = null;\n this.breakable = !1\n }\n\n function Gb(a, d, b) {\n if (null == a || \"\" == a)return null;\n for (var f = 0, g = 0, n = 0, k = 0, e = 0, w = 0, x = 0, v = 0, r = \"\", r = 0; ;)\n if (r = a.charCodeAt(e), 0 < r && 32 >= r)\n e++;\n else\n break;\n\n //sohow_base64\n for (var y = [], g = a.length, f = e; f < g; f++)\n if (r = a.charCodeAt(f), 0 == v && 0 == x && 40 == r)\n n++;\n else if (0 == v && 0 == x && 41 == r) {\n if (k++, n == k) {\n w = f + 1;\n r = a.slice(e, w);\n y.push(r);\n for (e = w; ;)if (r = a.charCodeAt(e), 0 < r && 32 >= r)e++; else break;\n r = a.charCodeAt(e);\n if (59 != r) {\n w = g;\n break\n }\n for (e++; ;)if (r = a.charCodeAt(e), 59 == r || 0 < r && 32 >= r)e++; else break;\n f = e\n }\n }\n else\n 34 == r ? 0 == x ? x = 1 : 1 == x && (x = 0) : 39 == r ? 0 == x ? x = 2 : 2 == x && (x = 0) : 91 == r && 0 == x ? v++ : 93 == r && 0 == x && v--;\n\n\n w != g && (r = a.slice(e, g), 0 < r.length && y.push(r));\n a = null;\n g = y.length;\n for (f = 0; f < g; f++) {\n r = y[f];\n x = r.indexOf(\"[\");\n k = r.indexOf(\"]\");\n n = r.indexOf(\"(\");\n 0 < x && 0 < k && n > x && n < k && (n = r.indexOf(\"(\", k));\n e = k = null;\n 0 < n ? (k = r.slice(0, n), e = Ha(r.slice(n + 1, r.lastIndexOf(\")\")), !1), 0 >= e.length && (e = null)) : (k = r, e = null);\n k = Ha(k);\n w = [];\n if (null != e) {\n var l, v = e.length, n = 0, u = -1, h = -1, c = x = 0, r = null;\n for (l = 0; l < v; l++)\n r = e.charCodeAt(l),\n 0 == x && 40 == r ? n++ : 0 == x && 41 == r ? n-- : 34 == r ? 1 == x && 0 <= u ? (u = -1, x = 0) : 0 == x && (u = l, x = 1) : 39 == r && (2 == x && 0 <= h ? (h = -1, x = 0) : 0 == x && (h = l, x = 2)),\n 44 == r && 0 == n && 0 == x && (r = Ha(e.slice(c, l)), (r != \"data:image/png;base64\") && (w.push(r),c = l + 1));\n\n 0 == n && (r = Ha(e.slice(c, l)), w.push(r))\n }\n null == a && (a = []);\n n = new we;\n n.cmd = b ? k : F(k);\n n.args = w;\n n.caller = d;\n a.push(n)\n }\n return a\n }\n\n function Hb() {\n this.z = this.y = this.x = 0\n }\n\n function Ma() {\n var a = _[111] !== typeof Float32Array ? new Float32Array(16) : Array(16);\n a[0] = a[5] = a[10] = a[15] = 1;\n a[1] = a[2] = a[3] = a[4] = a[6] = a[7] = a[8] = a[9] = a[11] = a[12] = a[13] = a[14] = 0;\n return a\n }\n\n function xe(a, d, b, f, g, n, k, e, w, x, v, r, y, l, u, h, c) {\n a[0] = d;\n a[1] = b;\n a[2] = f;\n a[3] = g;\n a[4] = n;\n a[5] = k;\n a[6] = e;\n a[7] = w;\n a[8] = x;\n a[9] = v;\n a[10] = r;\n a[11] = y;\n a[12] = l;\n a[13] = u;\n a[14] = h;\n a[15] = c\n }\n\n function Hc(a, d, b, f, g, n, k, e, w, x) {\n a[0] = d;\n a[1] = b;\n a[2] = f;\n a[3] = 0;\n a[4] = g;\n a[5] = n;\n a[6] = k;\n a[7] = 0;\n a[8] = e;\n a[9] = w;\n a[10] = x;\n a[11] = 0;\n a[12] = 0;\n a[13] = 0;\n a[14] = 0;\n a[15] = 1\n }\n\n function kd(a, d) {\n a[0] = d[0];\n a[1] = d[1];\n a[2] = d[2];\n a[3] = d[3];\n a[4] = d[4];\n a[5] = d[5];\n a[6] = d[6];\n a[7] = d[7];\n a[8] = d[8];\n a[9] = d[9];\n a[10] = d[10];\n a[11] = d[11];\n a[12] = d[12];\n a[13] = d[13];\n a[14] = d[14];\n a[15] = d[15]\n }\n\n function Ic(a, d) {\n var b = d[0], f = d[1], g = d[2], n = d[3], k = d[4], e = d[5], w = d[6], x = d[7], v = d[8], r = d[9], y = d[10], l = d[11], u = d[12], h = d[13], c = d[14], m = d[15], D = a[0], z = a[1], q = a[2], J = a[3];\n a[0] = D * b + z * k + q * v + J * u;\n a[1] = D * f + z * e + q * r + J * h;\n a[2] = D * g + z * w + q * y + J * c;\n a[3] = D * n + z * x + q * l + J * m;\n D = a[4];\n z = a[5];\n q = a[6];\n J = a[7];\n a[4] = D * b + z * k + q * v + J * u;\n a[5] = D * f + z * e + q * r + J * h;\n a[6] = D * g + z * w + q * y + J * c;\n a[7] = D * n + z * x + q * l + J * m;\n D = a[8];\n z = a[9];\n q = a[10];\n J = a[11];\n a[8] = D * b + z * k + q * v + J * u;\n a[9] = D * f + z * e + q * r + J * h;\n a[10] = D * g + z * w + q * y + J * c;\n a[11] = D * n + z * x + q * l + J * m;\n D = a[12];\n z = a[13];\n q = a[14];\n J = a[15];\n a[12] = D * b + z * k + q * v + J * u;\n a[13] = D * f + z * e + q * r + J * h;\n a[14] = D * g + z * w + q * y + J * c;\n a[15] = D * n + z * x + q * l + J * m\n }\n\n function ef(a, d) {\n var b = a[0], f = a[1], g = a[2], n = a[3], k = a[4], e = a[5], w = a[6], x = a[7], v = a[8], r = a[9], y = a[10], l = a[11], u = a[12], h = a[13], c = a[14], m = a[15], D = d[0], z = d[1], q = d[2], J = d[3], C = d[4], Q = d[5], A = d[6], H = d[7], qa = d[8], ea = d[9], Ca = d[10], S = d[11], p = d[12], B = d[13], t = d[14], G = d[15];\n a[0] = D * b + z * k + q * v + J * u;\n a[1] = D * f + z * e + q * r + J * h;\n a[2] = D * g + z * w + q * y + J * c;\n a[3] = D * n + z * x + q * l + J * m;\n a[4] = C * b + Q * k + A * v + H * u;\n a[5] = C * f + Q * e + A * r + H * h;\n a[6] = C * g + Q * w + A * y + H * c;\n a[7] = C * n + Q * x + A * l + H * m;\n a[8] = qa * b + ea * k + Ca * v + S * u;\n a[9] = qa * f + ea * e + Ca * r + S * h;\n a[10] = qa * g + ea * w + Ca * y + S * c;\n a[11] = qa * n + ea * x + Ca * l + S * m;\n a[12] = p * b + B * k + t * v + G * u;\n a[13] = p * f + B * e + t * r + G * h;\n a[14] = p * g + B * w + t * y + G * c;\n a[15] = p * n + B * x + t * l + G * m\n }\n\n function ye(a, d, b, f) {\n xe(a, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, d, b, f, 1)\n }\n\n function Yd(a, d, b, f) {\n var g, n, k;\n g = b * Y;\n b = Math.cos(g);\n n = Math.sin(g);\n g = -(d - 90) * Y;\n d = Math.cos(g);\n k = Math.sin(g);\n g = -f * Y;\n f = Math.cos(g);\n g = Math.sin(g);\n Hc(a, d * f - k * n * g, d * g + k * n * f, -k * b, -b * g, b * f, n, k * f + d * n * g, k * g - d * n * f, d * b)\n }\n\n function Zd(a, d) {\n var b = d[0], f = d[1], g = d[2], n = d[4], k = d[5], e = d[6], w = d[8], x = d[9], v = d[10], r = 1 / (b * k * v + f * e * w + n * x * g - w * k * g - n * f * v - x * e * b);\n Hc(a, (k * v - x * e) * r, (-f * v + x * g) * r, (f * e - k * g) * r, (-n * v + w * e) * r, (b * v - w * g) * r, (-b * e + n * g) * r, (n * x - w * k) * r, (-b * x + w * f) * r, (b * k - n * f) * r)\n }\n\n function nb(a, d) {\n var b = d.x, f = d.y, g = d.z;\n d.x = b * a[0] + f * a[4] + g * a[8];\n d.y = b * a[1] + f * a[5] + g * a[9];\n d.z = b * a[2] + f * a[6] + g * a[10]\n }\n\n function Fd(a, d) {\n var b = d[0], f = d[1], g = d[2];\n d[0] = b * a[0] + f * a[4] + g * a[8];\n d[1] = b * a[1] + f * a[5] + g * a[9];\n d[2] = b * a[2] + f * a[6] + g * a[10]\n }\n\n function Jc(a) {\n \"\" != a.loader.src && (a.loader = Ja(1), a.loader.kobject = a)\n }\n\n function hc(a) {\n return b.fractionalscaling ? Math.round(a * (b.pixelratio + 1E-7)) / b.pixelratio : Math.round(a)\n }\n\n function Ib(a, d, b, f) {\n a = (\"\" + a).split(b);\n f = f ? f : [0, 0, 0, 0];\n b = a.length;\n 4 == b ? (f[0] = a[0] * d + .5 | 0, f[1] = a[1] * d + .5 | 0, f[2] = a[2] * d + .5 | 0, f[3] = a[3] * d + .5 | 0) : 3 == b ? (f[0] = a[0] * d + .5 | 0, f[1] = f[3] = a[1] * d + .5 | 0, f[2] = a[2] * d + .5 | 0) : 2 == b ? (f[0] = f[2] = a[0] * d + .5 | 0, f[1] = f[3] = a[1] * d + .5 | 0) : f[0] = f[1] = f[2] = f[3] = a[0] * d + .5 | 0;\n return f\n }\n\n function Gd(a) {\n var d = a && a._poly;\n d && (d.setAttribute(\"fill\", !0 === a.polyline ? \"none\" : ca(a.fillcolor, a.fillalpha)), d.setAttribute(_[510], ca(a.bordercolor, a.borderalpha)), d.setAttribute(_[312], a.borderwidth * X))\n }\n\n function ze(a) {\n var d = p.r_rmatrix, b = p.r_zoom, f = p.r_zoff, g = .5 * Qa, n = .5 * ya + p.r_yoff, k = p._stereographic ? 10 - f : 1 - f * (1 - Math.min(p.fisheye * p.fisheye, 1)), e = a._poly;\n if (!e) {\n var w = V.svglayer;\n w || (w = document.createElementNS(_[77], \"svg\"), w.setAttribute(_[49], \"100%\"), w.setAttribute(_[28], \"100%\"), w.style.position = _[0], w.style.left = 0, w.style.top = 0, w.style.display = ja.stereo ? \"none\" : \"\", V.svglayer = w, V.hotspotlayer.appendChild(w));\n e = document.createElementNS(_[77], pa(a.polyline) ? _[121] : _[444]);\n w.appendChild(e);\n e.kobject = a;\n a._poly = e;\n Gd(a);\n e.style.opacity = Number(a._alpha) * (a.keep ? 1 : qc);\n a._assignEvents(e);\n setTimeout(function () {\n a.loading = !1;\n a.loaded = !0;\n da.callaction(a.onloaded, a)\n }, 7)\n }\n var w = a.point.getArray(), x = w.length, v = [];\n if (1 < x && a._visible && 0 == ja.stereo) {\n var r, y, l, u = new Hb, h = new Hb, c;\n y = w[x - 1];\n l = (180 - Number(y.ath)) * Y;\n y = Number(y.atv) * Y;\n u.x = 1E3 * Math.cos(y) * Math.cos(l);\n u.z = 1E3 * Math.cos(y) * Math.sin(l);\n u.y = 1E3 * Math.sin(y);\n nb(d, u);\n for (r = 0; r < x; r++)y = w[r], l = (180 - Number(y.ath)) * Y, y = Number(y.atv) * Y, h.x = 1E3 * Math.cos(y) * Math.cos(l), h.z = 1E3 * Math.cos(y) * Math.sin(l), h.y = 1E3 * Math.sin(y), nb(d, h), h.z >= k ? (u.z >= k || (c = (k - u.z) / (h.z - u.z), y = b / (k + f), l = (u.x + (h.x - u.x) * c) * y + g, y = (u.y + (h.y - u.y) * c) * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))), y = b / (h.z + f), l = h.x * y + g, y = h.y * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))) : u.z >= k && (c = (k - h.z) / (u.z - h.z), y = b / (k + f), l = (h.x + (u.x - h.x) * c) * y + g, y = (h.y + (u.y - h.y) * c) * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))), u.x = h.x, u.y = h.y, u.z = h.z;\n 0 == a.polyline && 2 < v.length && v.push(v[0]);\n e.style.pointerEvents = a._enabled ? _[264] : \"none\";\n e.style.cursor = a._handcursor ? _[18] : _[5];\n e.style.visibility = a._visible ? _[12] : _[6]\n }\n e.setAttribute(_[506], v.join(\" \"))\n }\n\n function Ae(a, d) {\n if (a && d) {\n var b = a.zorder, f = d.zorder;\n if (b < f)return -1;\n if (b > f)return 1\n }\n return 0\n }\n\n function ob(a, d) {\n if (Wc) {\n var E = Ua.getArray();\n E.sort(Ae);\n var f = E.length, g;\n for (g = 0; g < f; g++) {\n var n = E[g];\n n && (n.index = g)\n }\n Wc = !1\n }\n var E = Ua.getArray(), f = E.length, k;\n g = p.r_rmatrix;\n var n = Qa, e = ya, w = X, x = .5 * n, v = .5 * e, r = p.r_zoom, y = p.r_hlookat, l = p.r_vlookat, u = p.r_vlookatA, h = p.r_yoff, c = p.r_zoff, m = p._camroll;\n k = p._stereographic;\n var D;\n D = 1 * (1 + c / 1E3);\n var z = 50;\n 0 < c && (k ? z -= c : (z = 20 - c, -125 > z && (z = -125)));\n var q = 0, J = 0;\n k = 0;\n void 0 !== d && (k = d, f = k + 1);\n var C = ic, Q = b.realDesktop && 250 > r ? 1.5 : 0, A = ub;\n ub = !1;\n var H = Be, qa = Ce;\n H[1] = x;\n H[5] = $d;\n H[9] = sa(y);\n H[15] = C + \",\" + C + \",\" + C;\n for (var ea = ib, Ca = new Hb, S = (\"\" + ja.hotspotrenderer).toLowerCase(), S = b.webgl && _[30] == S && \"both\" != S || ja.stereo, Z = null; k < f; k++) {\n var B = E[k];\n if (B && (Z = B.sprite))if (Z = Z.style, S)\"none\" != Z.display && (Z.display = \"none\"); else {\n B._GL_onDestroy && (B._GL_onDestroy(), B.GL = null);\n if (A = !0, B.sprite)A = Number(B._alpha) * (B.keep ? 1 : qc), Z.opacity = A, B._poly && (B._poly.style.opacity = A);\n A = a || B.poschanged || B.forceupdate;\n if (null == B._url && 0 < B.point.count && A)ze(B), B.poschanged = !1; else if (B._visible && B.loaded && A) {\n B.poschanged = !1;\n A = Number(B._flying);\n q = (1 - A) * Number(B._ath);\n J = (1 - A) * Number(B._atv);\n 0 < A && (q += A * nc(y, B._ath), J += A * nc(l, B._atv));\n var t = !1, G = (180 - q) * Y, Ba = J * Y;\n Ca.x = 1E3 * Math.cos(Ba) * Math.cos(G);\n Ca.z = 1E3 * Math.cos(Ba) * Math.sin(G);\n Ca.y = 1E3 * Math.sin(Ba);\n nb(g, Ca);\n var P = !1, Fa = Ca.x, wa = Ca.y, G = Ca.z;\n if (G >= z - c)var ta = r / (G + c), Fa = Fa * ta, wa = wa * ta + h, P = 8E3 > Math.abs(Fa) && 8E3 > Math.abs(wa), Fa = Fa + x, wa = wa + v;\n if (B._distorted) {\n Z.pointerEvents = 50 <= G + c && B._enabled ? \"auto\" : \"none\";\n t = !0;\n G = (Ba = B._scale) ? B._scale : 1;\n B._hszscale = G;\n 1 == B.scaleflying && (G = G * (1 - A) + G / (r / (e / 2)) * D * A);\n B._scale = 1;\n B.updatepluginpos();\n B._scale = Ba;\n var W = B.pixelwidth, F = B.pixelheight, Da = Ba = 1;\n B._use_css_scale && (Ba = W / B.imagewidth, Da = F / B.imageheight);\n var L = .5 * -F, Va = String(B._edge), Fa = wa = 0, O = B._oxpix, $b = B._oypix, wa = wa + .5 * -W / Ba, Fa = Fa + L / Da;\n 0 <= Va.indexOf(\"left\") ? wa += +W / 2 / Ba : 0 <= Va.indexOf(_[3]) && (wa += -W / 2 / Ba);\n 0 <= Va.indexOf(\"top\") ? Fa += +F / 2 / Da : 0 <= Va.indexOf(_[2]) && (Fa += -F / 2 / Da);\n F = -500;\n W = B._deepscale;\n Va = B._depth;\n isNaN(Va) && (Va = 1E3);\n L = 1;\n 0 == (Va | 0) ? (F = 0, W = 1) : L = 1E3 / Va;\n 2 == Nb && (W *= 15);\n W /= 1 + A + Q;\n if (b.firefox || 6 < b.iosversion && .1 > B.scale)W = 10 / (1 + A);\n 0 < c && (W = 1);\n G = G * W * L;\n F *= W;\n O = O * W * L;\n $b = $b * W * L;\n if (0 < c || b.firefox)t = P;\n P = W * L * C / 2;\n P = _[274] + P * B.tx + \"px,\" + P * B.ty + \"px,\" + -P * B.tz + \"px) \";\n H[3] = sa(v + h * (1 - A));\n H[7] = sa(-(u * (1 - A) + l * A));\n H[11] = P + _[125] + sa(-q);\n H[13] = sa(J);\n H[17] = F;\n H[19] = sa(B._rotate + A * m);\n H[21] = O;\n H[23] = $b;\n B.inverserotation ? (H[25] = \"Y(\" + sa(B.ry), H[27] = \"X(\" + sa(B.rx), H[29] = \"Z(\" + sa(-B.rz)) : (H[25] = \"Z(\" + sa(B.rz), H[27] = \"X(\" + sa(-B.rx), H[29] = \"Y(\" + sa(-B.ry));\n H[31] = G * Ba;\n H[33] = G * Da;\n H[35] = wa;\n H[37] = Fa;\n Z[ea] = H.join(\"\")\n } else if (G >= z && (G = 1, P)) {\n if (B.zoom || B.distorted)G *= Number(2 * (1 - A) * ta + A * X) / X;\n B.updatepluginpos();\n W = B.pixelwidth;\n F = B.pixelheight;\n Da = Ba = 1;\n B._use_css_scale && (Ba = W / B.imagewidth, Da = F / B.imageheight);\n q = Fa;\n J = wa;\n 0 == B.accuracy && (q = Math.round(q), J = Math.round(J));\n Va = String(B._edge);\n Fa = wa = 0;\n O = B._oxpix * G;\n $b = B._oypix * G;\n 0 <= Va.indexOf(\"left\") ? wa += +W / 2 / Ba : 0 <= Va.indexOf(_[3]) && (wa += -W / 2 / Ba);\n 0 <= Va.indexOf(\"top\") ? Fa += +F / 2 / Da : 0 <= Va.indexOf(_[2]) && (Fa += -F / 2 / Da);\n P = 2 * G * (Math.max(W, F) * B._scale + Math.max(O, $b));\n if (0 < q + P || 0 < J + P || q - P < n || J - P < e)B._use_css_scale ? G *= w : (W *= w, F *= w, wa *= w, Fa *= w), t = -(W / Ba) / 2, P = -(F / Da) / 2, B._istextfield && 0 == B.accuracy && (q |= 0, J |= 0, t |= 0, P |= 0, O |= 0, $b |= 0, wa |= 0, Fa |= 0), qa[1] = sa(q), qa[3] = sa(J), qa[5] = sa(t), qa[7] = sa(P), qa[9] = sa(B._rotate - m * (1 - A)), qa[11] = O, qa[13] = $b, qa[15] = G * Ba, qa[17] = G * Da, qa[19] = sa(wa), qa[21] = sa(Fa), A = qa.join(\"\"), A = Kc && 2 > Nb && .5 < Number(B.zorder2) ? _[325] + (999999999E3 + B._zdeep) + \"px) \" + A : _[263] + A, Z[ib] = A, t = !0\n }\n 0 == B.forceupdate && (A = t ? \"\" : \"none\", A != Z.display && (Z.display = A));\n B.forceupdate = !1\n }\n }\n }\n }\n\n function De(a, d, E, f) {\n function g() {\n var c = Ja(), C = c.style;\n C.marginTop = C.marginBottom = l[17] * p + \"px\";\n C.height = \"1px\";\n C.backgroundColor = ca(l[18]);\n \"none\" != l[19] && (C.borderBottom = _[350] + ca(l[19]));\n D.appendChild(c)\n }\n\n function n(c) {\n var C = c.changedTouches;\n return (C && 0 < C.length ? C[0] : c).pageY\n }\n\n function k(C, a, d) {\n var Q = Ja(), A = Q.style;\n A.padding = l[20] * p + \"px\";\n A.border = l[21] + _[23] + ca(l[22]);\n A.borderRadius = l[23] * p + \"px\";\n A.marginTop = l[24] * p + \"px\";\n A.marginBottom = l[24] * p + \"px\";\n b.androidstock && (A[_[76]] = _[36]);\n Pa.touch && R(Q, b.browser.events.touchstart, function (C) {\n function A(C) {\n C = n(C) - H;\n if (h > ya) {\n var a = v + C | 0;\n a < ya - h - 10 ? a = ya - h - 10 : 10 < a && (a = 10);\n c.style.top = a + \"px\"\n }\n 15 < Math.abs(C) && (Q.onmouseout(), r = !0)\n }\n\n function t() {\n ba(L, qa, A, !0);\n ba(L, g, t, !0);\n if (0 == r)Q.onclick()\n }\n\n Aa(C);\n C.stopPropagation();\n if (d && a) {\n Q.onmouseover();\n var H = n(C), v = parseInt(c.style.top) | 0, r = !1, qa = b.browser.events.touchmove, g = b.browser.events.touchend;\n R(L, qa, A, !0);\n R(L, g, t, !0)\n }\n }, !0);\n d && a ? (A.cursor = _[18], Q.onmousedown = function (c) {\n c.stopPropagation()\n }, Q.onmouseover = function () {\n A = this.style;\n A.background = ca(l[25]);\n A.border = l[21] + _[23] + ca(l[26]);\n A.color = ca(l[27])\n }, Q.onmouseout = function () {\n A = this.style;\n A.background = \"none\";\n A.border = l[21] + _[23] + ca(l[22]);\n A.color = ca(l[4])\n }, Q.oncontextmenu = function (c) {\n Aa(c);\n c.stopPropagation();\n Q.onclick()\n }, Q.onclick = function (C) {\n f ? (A = c.style, A.opacity = 1, A.transition = _[98], A.opacity = 0, setTimeout(E, 300)) : E();\n da.callaction(d)\n }) : (0 == a && (A.color = ca(l[5])), A.cursor = _[5]);\n var H = Ja();\n H.style.marginLeft = l[28] * p + \"px\";\n H.style.marginRight = l[29] * p + \"px\";\n H.innerHTML = C;\n Q.appendChild(H);\n D.appendChild(Q);\n return H\n }\n\n function e() {\n function c() {\n return .4 > Math.random() ? \" \" : _[139]\n }\n\n var C = k(\"About\" + c() + \"the\" + c() + _[46] + c() + _[414] + c() + _[385], !0, function () {\n da.openurl(_[220])\n });\n try {\n (new MutationObserver(function (c) {\n c = L.getComputedStyle(C);\n 9 > Math.min(parseInt(c.width) | 0, parseInt(c.height) | 0) && (m = {}, Ea(_[97]))\n })).observe(C, {attributes: !1, childList: !0, characterData: !0, subtree: !0})\n } catch (a) {\n }\n }\n\n function w() {\n k(V.fullscreen ? y.exitfs : y.enterfs, !0, function () {\n m.fullscreen = !m.fullscreen\n })\n }\n\n function x() {\n var c = b.android, C = b.infoString, C = C.split(_[431]).join(\"\");\n k((qa ? \"\" : _[128] + m.version + _[240] + m.build + _[261]) + (c ? _[481] : \"\") + C + Oa.infoString + (c ? _[443] : \"\"), !0, null)\n }\n\n function v() {\n Na && Na[2] && k(Na[2], !0, function () {\n da.openurl(Na[3])\n })\n }\n\n function r() {\n var C = c.getBoundingClientRect(), b = C.width, C = C.height, Q = d;\n if (0 < b && 0 < C) {\n h = C;\n f && (a -= b >> 1, a + b > Qa && (a = Qa - b - 10), 10 > a && (a = 10));\n for (; a + b > Qa;)a -= b / 2;\n 0 > a && (a = 0);\n d + C > ya && (d = f ? ya - C - 10 : d - C);\n 0 > d && (f ? d = ya - C >> 1 : Q > ya / 2 ? (d = Q - C, 0 > d && (d = 4)) : (d = Q, d + C > ya && (d = ya - 4 - C)));\n u = c.style;\n u.left = (a | 0) + \"px\";\n u.top = (d | 0) + \"px\";\n f && (u.transition = _[98], u.opacity = 1)\n } else 10 > ++B && setTimeout(r, 32)\n }\n\n var y = m.contextmenu;\n if (f && 0 == y.touch)return null;\n var l = null;\n y.customstyle && (_[109] == b.browser.domain || 0 == b.realDesktop || b.realDesktop && 0 != (Ya & 16)) && (l = F(y.customstyle).split(\"|\"), 30 != l.length && (l = null));\n null == l && (l = (b.mac ? \"default|14|default|0xFFFFFF|0x000000|0xBBBBBB|0|0|5|2|2|8|0x66000000|0|0|1|4|5|0xEEEEEE|none|1|0|0|0|3|0xEEEEEE|0|0|20|12\" : b.desktop ? \"default|default|150%|0xFFFFFF|0x000000|0xBBBBBB|1|0xBBBBBB|0|2|2|8|0x66000000|0|0|2|2|5|0xE0E0E0|none|4|0|0|0|3|0xEEEEEE|0|0|18|12\" : \"Helvetica|16|default|0x55000000|0xFFFFFF|0x555555|1|0xFFFFFF|8|0|0|8|0x44000000|0|0|4|4|6|0x555555|none|4|0|0|0|3|0xEEEEEE|0|0|12|12\").split(\"|\"));\n var u = null, h = 0, c = Ja();\n c.onselectstart = _[266];\n b.desktop && b.chrome && (c.style.opacity = .999);\n if (b.linux || b.android)l[1] = 12;\n u = c.style;\n u.position = _[0];\n u.zIndex = 99999999999;\n var p = 1;\n b.androidstock ? p = b.pixelratio : b.chrome && 40 > b.chromeversion && (u[ib] = _[20]);\n _[5] != l[0] ? u.fontFamily = l[0] : b.ios ? (u.fontFamily = _[38], u.fontWeight = _[484], _[5] == l[1] && (l[1] = 14)) : u.font = \"menu\";\n _[5] != l[1] && (u.fontSize = l[1] * p * (b.android ? 1.2 : 1) + \"px\");\n _[5] != l[2] && (u.lineHeight = l[2]);\n u.background = ca(l[3]);\n u.color = ca(l[4]);\n u.border = l[6] + _[23] + ca(l[7]);\n u.borderRadius = l[8] * p + \"px\";\n u.minWidth = \"150px\";\n u.textAlign = \"left\";\n u[pc] = l[9] + \"px \" + l[10] + \"px \" + l[11] + \"px \" + ca(l[12]);\n var D = Ja(), u = D.style;\n u.border = l[13] + _[23] + ca(l[14]);\n u.paddingTop = l[15] * p + \"px\";\n u.paddingBottom = l[16] * p + \"px\";\n Pa.touch && R(D, b.browser.events.touchstart, function (c) {\n Aa(c);\n c.stopPropagation()\n }, !1);\n c.appendChild(D);\n var z = y.item.getArray(), q, J, C = 0, Q, A = z.length, H, qa = 0 != (Ya & 16), ea = qa, Ca = qa, S = !1, Z = !1;\n for (H = 0; H < A; H++)if (q = z[H])if (J = q.caption)J = Ed(unescape(J)), q.separator && 0 < C && g(), Q = F(J), _[46] == Q ? 0 == ea && (ea = !0, e(), C++) : Na && _[430] == Q ? 0 == Ca && (Ca = !0, v(), C++) : _[110] == Q ? (S = !0, b.fullscreensupport && (w(), C++)) : _[334] == Q ? (Z = !0, x(), C++) : (Q = q.visible && (!q.showif || da.calc(null, q.showif))) ? (k(J, q.enabled, q.onclick), C++) : 0 == Q && q.separator && 0 < C && D.removeChild(D.lastChild);\n Na && 0 == Ca && (0 < C && (g(), C = 0), v());\n 0 == ea && (0 < C && g(), e(), C++);\n 0 == S && 1 == y.fullscreen && b.fullscreensupport && (w(), C++);\n 0 == Z && 1 == y.versioninfo && (0 < C && g(), x(), C++);\n if (0 == C)return null;\n u = c.style;\n u.left = _[122];\n u.top = \"10px\";\n var B = 0;\n f && (u.opacity = 0);\n setTimeout(r, 16);\n return c\n }\n\n function qf() {\n function a(a, d, b) {\n a.__defineGetter__(d, b)\n }\n\n m = new Fb;\n m.set = I;\n m.get = U;\n m.call = Zb;\n m.trace = la;\n m[\"true\"] = !0;\n m[_[31]] = !1;\n m.strict = !1;\n m.version = _[432];\n m.build = _[348];\n m.buildversion = m.version;\n m.debugmode = !1;\n m.tweentypes = ac;\n m.basedir = _[349];\n m.showtext = function () {\n };\n m.bgcolor = 0;\n m[rc[0]] = m[rc[1]] = !0;\n m.haveexternalinterface = !0;\n m.havenetworkaccess = !0;\n m.device = b;\n m.browser = b.browser;\n m._have_top_access = b.topAccess;\n m._isrealdesktop = b.realDesktop;\n m.iosversion = b.iosversion;\n m.isphone = b.iphone;\n m.ispad = b.ipad;\n m.isandroid = b.android;\n m.ishtml5 = !0;\n m.isflash = !1;\n m.ismobile = b.mobile;\n m.istablet = b.tablet;\n m.isdesktop = b.desktop;\n m.istouchdevice = b.touchdevice;\n m.isgesturedevice = b.gesturedevice;\n a(m, _[351], function () {\n return bc / X\n });\n a(m, _[326], function () {\n return vb / X\n });\n ha(m, _[352], function () {\n return X\n }, function (a) {\n a = Number(a);\n isNaN(a) && (a = 1);\n 1E-4 < Math.abs(a - X) && (X = a, V.onResize(null, !0))\n });\n pb = m.area = new rf;\n m.wheeldelta = 0;\n m.wheeldelta_raw = Number.NaN;\n m.wheeldelta_touchscale = 0;\n m.keycode = 0;\n m.idletime = .5;\n m.__defineGetter__(_[397], Ta);\n m.__defineGetter__(_[500], Math.random);\n ha(m, _[110], function () {\n return V.fullscreen\n }, function (a) {\n V.setFullscreen(pa(a))\n });\n ha(m, _[389], function () {\n return ra.swfpath\n }, function (a) {\n ra.swfpath = a\n });\n m.hlookat_moveforce = 0;\n m.vlookat_moveforce = 0;\n m.fov_moveforce = 0;\n m.multireslevel = 0;\n m.lockmultireslevel = \"-1\";\n m.downloadlockedlevel = !1;\n O = m.mouse = {};\n O.down = !1;\n O.up = !1;\n O.moved = !1;\n O.downx = 0;\n O.downy = 0;\n O.x = 0;\n O.y = 0;\n a(O, _[495], function () {\n return O.x + pb.pixelx\n });\n a(O, _[493], function () {\n return O.y + pb.pixely\n });\n a(O, \"dd\", function () {\n var a = O.x - O.downx, d = O.y - O.downy;\n return Math.sqrt(a * a + d * d)\n });\n p = m.view = new sf;\n m.screentosphere = p.screentosphere;\n m.spheretoscreen = p.spheretoscreen;\n m.loadFile = ra.loadfile;\n m.decodeLicense = ra.decodeLicense;\n m.haveLicense = gc(function (a) {\n var d = !1, b = Ya;\n switch (a.toLowerCase().charCodeAt(0)) {\n case 107:\n d = 0 != (b & 1);\n break;\n case 109:\n d = 0 != (b & 128);\n break;\n case 98:\n d = 0 != (b & 16)\n }\n return d\n });\n m.parsepath = m.parsePath = ra.parsePath;\n m.contextmenu = new tf;\n ia = m.control = new uf;\n ae = m.cursors = new vf;\n N = m.image = {};\n xa = m.plugin = new bb(Ob);\n m.layer = xa;\n Ua = m.hotspot = new bb(wf);\n Yb = m.events = new bb(null, !0);\n Yb.dispatch = Ka;\n ja = m.display = {\n currentfps: 60,\n r_ft: 16,\n FRM: 0,\n _framebufferscale: 1,\n mipmapping: \"auto\",\n loadwhilemoving: b.realDesktop ? \"true\" : \"auto\",\n _stereo: !1,\n stereooverlap: 0,\n hotspotrenderer: \"auto\",\n hardwarelimit: b.realDesktop && b.safari && \"6\" > b.safariversion ? 2E3 : b.realDesktop && !b.webgl ? 2560 : b.iphone && b.retina && !b.iphone5 ? 800 : b.iphone && !b.retina ? 600 : b.ipod && b.retina ? 640 : b.mobile || b.tablet ? 1024 : 4096\n };\n ha(ja, _[491], function () {\n return ja._stereo\n }, function (a) {\n a = pa(a);\n ja._stereo != a && (ja._stereo = a, V.svglayer && (V.svglayer.style.display = a ? \"none\" : \"\"))\n });\n ha(ja, _[383], function () {\n var a = ja.FRM | 0;\n return 0 == a ? \"auto\" : \"\" + a\n }, function (a) {\n a |= 0;\n 0 > a && (a = 0);\n ja.FRM = a\n });\n ha(ja, _[231], function () {\n return ja._framebufferscale\n }, function (a) {\n a = Number(a);\n if (isNaN(a) || 0 == a)a = 1;\n ja._framebufferscale = a;\n pb.haschanged = !0;\n V.resizeCheck(!0)\n });\n m.memory = {maxmem: b.realDesktop ? Math.min(Math.max(150, 48 * screen.availWidth * screen.availHeight >> 20), 400) : b.ios && 7.1 > b.iosversion || b.iphone && !b.iphone5 ? 40 : 50};\n m.network = {retrycount: 2};\n sc = m.progress = {};\n sc.progress = 0;\n Ra = new Ob;\n Ra.name = \"STAGE\";\n Za = new Ob;\n Za.name = _[480];\n xa.alpha = 1;\n Ua.alpha = 1;\n Ua.visible = !0;\n ha(xa, _[12], function () {\n return \"none\" != V.pluginlayer.style.display\n }, function (a) {\n V.pluginlayer.style.display = pa(a) ? \"\" : \"none\"\n });\n m.xml = {};\n m.xml.url = \"\";\n m.xml.content = null;\n m.xml.scene = null;\n var d = m.security = {};\n ha(d, \"cors\", function () {\n return Tc\n }, function (a) {\n Tc = a\n });\n za = m.autorotate = {};\n za.enabled = !1;\n za.waittime = 1.5;\n za.accel = 1;\n za.speed = 10;\n za.horizon = 0;\n za.tofov = null;\n za.currentmovingspeed = 0;\n m.math = function () {\n function a(d) {\n return function (a, b) {\n void 0 === b ? I(a, Math[d](n(a))) : I(a, Math[d](n(b)))\n }\n }\n\n var d = {}, b = _[157].split(\" \"), n = function (a) {\n var d = U(a);\n return Number(null !== d ? d : a)\n }, k;\n for (k in b) {\n var e = b[k];\n d[e] = a(e)\n }\n d.pi = Ga;\n d.atan2 = function (a, d, b) {\n I(a, Math.atan2(n(d), n(b)))\n };\n d.min = function () {\n var a = arguments, d = a.length, b = 3 > d ? 0 : 1, r = n(a[b]);\n for (b++; b < d; b++)r = Math.min(r, n(a[b]));\n I(a[0], r)\n };\n d.max = function () {\n var a = arguments, d = a.length, b = 3 > d ? 0 : 1, r = n(a[b]);\n for (b++; b < d; b++)r = Math.max(r, n(a[b]));\n I(a[0], r)\n };\n d.pow = da.pow;\n return d\n }();\n m.action = new bb;\n m.scene = new bb;\n m.data = new bb;\n m.addlayer = m.addplugin = function (a) {\n if (!Uc(a, _[204] + a + \")\"))return null;\n a = xa.createItem(a);\n if (!a)return null;\n null == a.sprite && (a._dyn = !0, a.create(), null == a._parent && V.pluginlayer.appendChild(a.sprite));\n return a\n };\n m.removelayer = m.removeplugin = function (a, d) {\n var b = xa.getItem(a);\n if (b) {\n if (pa(d)) {\n var n = b._childs;\n if (n)for (; 0 < n.length;)m.removeplugin(n[0].name, !0)\n }\n b.visible = !1;\n b.parent = null;\n b.sprite && V.pluginlayer.removeChild(b.sprite);\n b.destroy();\n xa.removeItem(a)\n }\n };\n m.addhotspot = function (a) {\n if (!Uc(a, _[321] + a + \")\"))return null;\n a = Ua.createItem(a);\n if (!a)return null;\n null == a.sprite && (a._dyn = !0, a.create(), V.hotspotlayer.appendChild(a.sprite));\n ld = !0;\n return a\n };\n m.removehotspot = function (a) {\n var d = Ua.getItem(a);\n if (d) {\n d.visible = !1;\n d.parent = null;\n if (d.sprite) {\n try {\n V.hotspotlayer.removeChild(d.sprite)\n } catch (b) {\n }\n if (d._poly) {\n try {\n V.svglayer.removeChild(d._poly)\n } catch (n) {\n }\n d._poly.kobject = null;\n d._poly = null\n }\n }\n d.destroy();\n Ua.removeItem(a)\n }\n }\n }\n\n function xf() {\n var a = p.haschanged, d = !1;\n jc++;\n ja.frame = jc;\n Oa.fps();\n var m = V.resizeCheck(), f = da.processAnimations(), a = a | p.haschanged;\n if (b.webgl || !b.ios || b.ios && 5 <= b.iosversion)f = !1;\n f |= ld;\n ld = !1;\n f && (p._hlookat += ((jc & 1) - .5) / (1 + p.r_zoom), a = !0);\n a |= Xa.handleloading();\n 0 == da.blocked && (a |= Pa.handleFrictions(), Xa.checkautorotate(p.haschanged) && (a = d = !0));\n p.continuousupdates && (a = d = !0);\n a || m ? (Oa.startFrame(), Xa.updateview(d, !0), Oa.finishFrame()) : (p.haschanged && p.updateView(), ob(!1));\n Xa.updateplugins(m);\n b.desktop && Xa.checkHovering()\n }\n\n var Jb = this;\n try {\n !Object.prototype.__defineGetter__ && Object.defineProperty({}, \"x\", {\n get: function () {\n return !0\n }\n }).x && (Object.defineProperty(Object.prototype, _[233], {\n enumerable: !1,\n configurable: !0,\n value: function (a, d) {\n Object.defineProperty(this, a, {get: d, enumerable: !0, configurable: !0})\n }\n }), Object.defineProperty(Object.prototype, _[234], {\n enumerable: !1,\n configurable: !0,\n value: function (a, d) {\n Object.defineProperty(this, a, {set: d, enumerable: !0, configurable: !0})\n }\n }))\n } catch (Bf) {\n }\n\n var jb = navigator, aa = document, L = window, Ga = Math.PI, Y = Ga / 180, tc = Number.NaN, md = 0, Ta = L.performance && L.performance.now ? function () {\n return L.performance.now() - md\n } : function () {\n return (new Date).getTime() - md\n }, md = Ta(), Xc = String.fromCharCode, m = null, bc = 0, vb = 0, Qa = 0, ya = 0, X = 1, Yc = 1, uc = 0, pb = null, za = null, ia = null, ae = null, ja = null, Yb = null, sc = null, Ua = null, N = null, O = null, xa = null, p = null, Ra = null, Za = null, jc = 0, nd = 60, Ya = 14, od = null, rc = [_[362], _[489]], Na = null, Tc = \"\", vc = null, ld = !1, kc = 0, Kc = !0, b = {\n runDetection: function (a) {\n function d() {\n var a = screen.width, c = screen.height, C = b.topAccess ? top : L, d = C.innerWidth, Q = C.innerHeight, C = C.orientation | 0, A = a / (c + 1), h = d / (Q + 1);\n if (1 < A && 1 > h || 1 > A && 1 < h)A = a, a = c, c = A;\n v.width = a;\n v.height = c;\n v.orientation = C;\n b.window = {width: d, height: Q};\n a /= d;\n return b.pagescale = a\n }\n\n function m(a, c) {\n for (var C = [\"ms\", \"Moz\", _[494], \"O\"], d = 0; 5 > d; d++) {\n var b = 0 < d ? C[d - 1] + a.slice(0, 1).toUpperCase() + a.slice(1) : a;\n if (void 0 !== t.style[b])return b\n }\n return null\n }\n\n var f = \"multires flash html5 html mobile tablet desktop ie edge webkit ios iosversion iphone ipod ipad retina hidpi android androidstock blackberry touchdevice gesturedevice fullscreensupport windows mac linux air standalone silk\".split(\" \"), g, n, k, e, w = aa.documentElement, x = a.mobilescale;\n isNaN(x) && (x = .5);\n n = f.length;\n for (g = 0; g < n; g++)k = f[g], b[k] = !1;\n b.html5 = b.html = !0;\n b.iosversion = 0;\n b.css3d = !1;\n b.webgl = !1;\n b.topAccess = !1;\n b.simulator = !1;\n b.multiressupport = !1;\n b.panovideosupport = !1;\n var v = b.screen = {};\n try {\n top && top.document && (b.topAccess = !0)\n } catch (r) {\n }\n var y = jb.platform, f = F(y), l = jb.userAgent, u = F(l), h = n = \"\";\n 0 <= f.indexOf(\"win\") ? b.windows = !0 : 0 <= f.indexOf(\"mac\") ? b.mac = !0 : 0 <= f.indexOf(\"linux\") && (b.linux = !0);\n var c = L.devicePixelRatio, p = 2 <= c;\n g = 1;\n var D = 0 <= f.indexOf(\"ipod\"), z = 0 <= f.indexOf(_[41]), q = 0 <= f.indexOf(\"ipad\"), J = z || D || q;\n e = u.indexOf(\"silk/\");\n var C = 0 <= u.indexOf(_[469]) || 0 <= u.indexOf(_[145]), Q = 0 > e && !C && 0 <= u.indexOf(_[464]), A = k = !1, H = !1, qa = l.indexOf(_[147]), ea = L.chrome && !C, Ca = l.indexOf(_[460]), S = !1, Z = (J || Q || e) && (b.windows || b.mac);\n C && (qa = Ca = -1);\n var f = !1, B = 0;\n Yc = d();\n if (J) {\n if (b.ios = !0, n = y, e = l.indexOf(\"OS \"), 0 < e && (e += 3, B = l.slice(e, l.indexOf(\" \", e)).split(\"_\").join(\".\"), n += _[457] + B, b.iosversion = parseFloat(B), \"6.0\" <= B && (z && !p || D && p) && (b._iOS6_canvas_bug = !0)), k = z || D, A = q, B = Math.max(screen.width, screen.height), b.iphone = z || D, b.iphone5 = z && 500 < B, b.ip6p = z && 735 < B, b.ipod = D, b.ipad = q, b.retina = p, z || D)g *= x\n } else if (Q)if (e = l.indexOf(_[454]), B = parseFloat(l.slice(e + 8)), b.android = !0, b.linux = !1, b.androidversion = B, n = l.slice(e, l.indexOf(\";\", e)), k = 0 < u.indexOf(_[44]), ea && 0 < u.indexOf(_[275]) && (k = 480 > Math.min(screen.width, screen.height)), A = !k, B = l.indexOf(\")\"), 5 < B && (e = l.slice(0, B).lastIndexOf(\";\"), 5 < e && (p = l.indexOf(_[511], e), 0 < p && (B = p), n += \" (\" + l.slice(e + 2, B) + \")\")), 0 < Ca && isNaN(c) && (c = Yc), A && 1 < c) {\n if (b.hidpi = !0, g = c, 0 <= qa || 0 < Ca)b.hidpi = !1, g = 1\n } else k && (b.hidpi = 1 < c, g = c * x, .5 > g && (g = .5), 0 <= qa || 0 < Ca || Z) && (b.hidpi = !1, g = x); else {\n if (0 <= u.indexOf(_[345]) || 0 <= u.indexOf(_[344]) || 0 <= u.indexOf(\"bb10\"))S = !0, b.blackberry = !0, n = _[336], f = !0;\n 0 <= e ? (S = !0, b.silk = !0, n = _[297] + parseFloat(u.slice(e + 5)).toFixed(2), H = !1, k = 0 <= u.indexOf(_[44]), A = !k, f = !0) : 0 <= u.indexOf(\"ipad\") || 0 <= u.indexOf(_[41]) ? H = S = !0 : 0 <= u.indexOf(_[138]) ? (A = !0, n += _[513]) : 0 <= u.indexOf(_[44]) ? (k = !0, n += _[518], g = x) : H = !0\n }\n D = jb.vendor && 0 <= jb.vendor.indexOf(\"Apple\");\n z = L.opera;\n p = !1;\n H && (n = _[285]);\n e = l.indexOf(_[451]);\n 0 < e && (D || z || Q) && (e += 8, B = l.slice(e, l.indexOf(\" \", e)), D ? (b.safari = !0, b.safariversion = B, h = _[520]) : (Q && (h = _[238], f = !0), z && (b.opera = !0, b.operaversion = B, h = \"Opera\")), h += \" \" + B);\n J && (e = l.indexOf(_[521]), 0 < e && (b.safari = !0, e += 6, B = parseFloat(l.slice(e, l.indexOf(\" \", e))), b.crios = B, h = _[449] + B.toFixed(1)));\n e = qa;\n if (0 <= e || ea)B = parseFloat(l.slice(e + 7)), b.chrome = !0, b.chromeversion = B, h = _[147] + (isNaN(B) ? \"\" : \" \" + B.toFixed(1)), e = u.indexOf(\"opr/\"), 0 < e && (h = _[517] + parseFloat(l.slice(e + 4)).toFixed(1) + _[378]), Q && 28 > B && (f = !0), Q && 1 < c && 20 > B && !Z && (b.hidpi = !0, g = c, k && (g *= x)); else if (e = Ca, 0 > e && (e = l.indexOf(_[514])), 0 <= e && (B = parseFloat(l.slice(1 + l.indexOf(\"/\", e))), b.firefox = !0, b.firefoxversion = B, h = _[434] + (isNaN(B) ? \"\" : B.toFixed(1)), Q && 35 > B && (f = !0)), e = l.indexOf(\"MSIE \"), p = 0 <= e || C)H = b.ie = !0, A = !1, h = _[224], 0 < u.indexOf(_[436]) || 0 < u.indexOf(_[289]) ? (k = !0, H = !1, h = _[445] + h, g = x) : 0 < u.indexOf(\"arm;\") && 1 < jb.msMaxTouchPoints && (A = !0, H = !1, h = _[447] + h, f = !0, g = 1), 0 <= e ? (B = l.slice(e + 4, l.indexOf(\";\", e)), b.ieversion = parseFloat(B), h += B) : (e = l.indexOf(\"rv:\"), 0 <= e ? (B = parseFloat(l.slice(e + 3)), !isNaN(B) && 10 <= B && 100 > B && (b.ieversion = B, h += \" \" + B.toFixed(1))) : (e = u.indexOf(_[145]), 0 <= e && (h = _[260], b.edge = !0, Kc = !1, B = parseFloat(l.slice(e + 6)), isNaN(B) || (b.ieversion = B, h += \" \" + (B + 8).toFixed(5))))), n = h, h = \"\";\n b.android && (b.androidstock = !(b.chrome || b.firefox || b.opera));\n 0 == b.ie && 0 < (e = u.indexOf(_[448])) && (B = parseFloat(u.slice(e + 7)), !isNaN(B) && 0 < B && (b.webkit = !0, b.webkitversion = B));\n b.pixelratio = isNaN(c) ? 1 : c;\n b.fractionalscaling = 0 != b.pixelratio % 1;\n var c = {}, t = Ja();\n c.find = m;\n c.prefix = p ? \"ms\" : b.firefox ? \"moz\" : b.safari || b.chrome || b.androidstock ? _[70] : \"\";\n c.perspective = m(_[335]);\n c.transform = m(_[387]);\n c.backgroundsize = m(_[256]);\n c.boxshadow = m(_[388]);\n c.boxshadow_style = _[252] == c.boxshadow ? _[212] : _[292] == c.boxshadow ? _[249] : _[342];\n Q && \"4.0\" > b.androidversion && (c.perspective = null);\n c.perspective && (b.css3d = !0, _[217] == c.perspective && L.matchMedia && (u = L.matchMedia(_[195]))) && (b.css3d = 1 == u.matches);\n t = null;\n b.webgl = function () {\n var a = null;\n try {\n for (var c = Ja(2), C = 0; 4 > C && !(a = c.getContext([_[30], _[83], _[116], _[112]][C])); C++);\n } catch (d) {\n }\n return null != a\n }();\n u = {};\n u.useragent = l;\n u.platform = y;\n u.domain = null;\n u.location = L.location.href;\n y = u.events = {};\n u.css = c;\n if (J || Q || void 0 !== w.ontouchstart || S)b.touchdevice = !0, b.gesturedevice = !0;\n J = 0;\n (jb.msPointerEnabled || jb.pointerEnabled) && b.ie && (Q = jb.msMaxTouchPoints || jb.maxTouchPoints, jb.msPointerEnabled && (J = 2), jb.pointerEnabled && (J = 1), b.touchdevice = 0 < Q, b.gesturedevice = 1 < Q);\n y.touchstart = [_[343], _[331], _[290]][J];\n y.touchmove = [_[115], _[330], _[283]][J];\n y.touchend = [_[118], _[390], _[328]][J];\n y.touchcancel = [_[327], _[280], _[236]][J];\n y.gesturestart = [_[300], _[96], _[96]][J];\n y.gesturechange = [_[276], _[91], _[91]][J];\n y.gestureend = [_[355], _[99], _[99]][J];\n y.pointerover = [_[8], _[8], _[34]][J];\n y.pointerout = [_[9], _[9], _[35]][J];\n b.pointerEvents = b.opera || b.ie && 11 > b.ieversion ? !1 : !0;\n h && (n += \" - \" + h);\n b.realDesktop = H;\n h = a.vars ? F(a.vars.simulatedevice) : null;\n _[392] == h && (0 <= l.indexOf(_[146]) || 0 <= l.indexOf(\"iPod\") ? h = _[41] : 0 <= l.indexOf(\"iPad\") && (h = \"ipad\"));\n b.touchdeviceNS = b.touchdevice;\n l = _[41] == h ? 1 : \"ipad\" == h ? 2 : 0;\n 0 < l && (b.simulator = !0, b.crios = 0, n += \" - \" + (1 == l ? _[146] : \"iPad\") + _[356], g = l * x, k = 1 == l, A = 2 == l, H = !1, b.ios = !0, b.iphone = k, b.ipad = A, b.touchdevice = !0, b.gesturedevice = !0);\n b.browser = u;\n b.infoString = n;\n a = F(a.fakedevice);\n _[44] == a ? (k = !0, A = H = !1) : _[138] == a ? (A = !0, k = H = !1) : _[465] == a && (H = !0, k = A = !1);\n b.mobile = k;\n b.tablet = A;\n b.desktop = H;\n b.normal = A || H;\n b.touch = b.gesturedevice;\n b.mouse = H;\n b.getViewportScale = d;\n X = g;\n 0 == b.simulator && 0 != aa.fullscreenEnabled && 0 != aa.mozFullScreenEnabled && 0 != aa.webkitFullScreenEnabled && 0 != aa.webkitFullscreenEnabled && 0 != aa.msFullscreenEnabled && (a = [_[223], _[201], _[194], _[191], _[209]], x = -1, g = null, n = _[228], w[a[0]] ? (g = \"\", x = 0) : w[a[1]] ? (g = \"moz\", x = 1) : w[a[2]] ? (g = _[70], x = 2) : w[a[3]] ? (g = _[70], x = 3) : w[a[4]] && (g = \"MS\", n = _[229], x = 4), 0 <= x && 0 == f && (b.fullscreensupport = !0, y.fullscreenchange = g + n, y.requestfullscreen = a[x]));\n b.buildList();\n delete b.runDetection\n }, buildList: function () {\n var a, d = \"|all\";\n for (a in b)a == F(a) && b[a] && (d += \"|\" + a);\n b.haveList = d + \"|\"\n }, checkSupport: function (a) {\n a = F(a).split(\"no-\").join(\"!\").split(\".or.\").join(\"|\").split(\".and.\").join(\"+\").split(\"|\");\n var d, m, f = a.length;\n for (d = 0; d < f; d++) {\n var g = a[d].split(\"+\"), n = !1;\n for (m = 0; m < g.length; m++) {\n var n = g[m], k = !1;\n 33 == n.charCodeAt(0) && (n = n.slice(1), k = !0);\n if (0 == n.indexOf(\"ios\") && b.ios)if (3 == n.length || b.iosversion >= parseFloat(n.slice(3)))if (k) {\n n = !1;\n break\n } else n = !0; else if (k)n = !0; else {\n n = !1;\n break\n } else if (0 <= b.haveList.indexOf(\"|\" + n + \"|\"))if (k) {\n n = !1;\n break\n } else n = !0; else if (k)n = !0; else {\n n = !1;\n break\n }\n }\n if (n)return !0\n }\n return !1\n }\n }, cb = 0, Kb = 0, Hd = 0, Nb = 0, Lc = 0, be = 0, jd = !1, ib = null, Id = null, pd = null, Zc = null, pc = null, ce = !1, Lb = 0, Fb = function () {\n var a = this;\n a._type = \"base\";\n a.registerattribute = function (d, b, f, g) {\n d = F(d);\n f && g ? (a.hasOwnProperty(d) && (b = ga(a[d], typeof b)), a.__defineGetter__(d, g), a.__defineSetter__(d, f), f(b)) : a.hasOwnProperty(d) ? a[d] = ga(a[d], typeof b) : a[d] = b\n };\n a.createobject = function (d) {\n d = F(d);\n try {\n return a.hasOwnProperty(d) ? a[d] : a[d] = new Fb\n } catch (b) {\n }\n return null\n };\n a.removeobject = a.removeattribute = function (d) {\n d = F(d);\n try {\n a[d] = null, delete a[d]\n } catch (b) {\n }\n };\n a.createarray = function (d) {\n d = F(d);\n return a[d] && a[d].isArray ? a[d] : a[d] = new bb(Fb)\n };\n a.removearray = function (d) {\n d = F(d);\n a[d] && a[d].isArray && (a[d] = null, delete a[d])\n };\n a.getattributes = function () {\n var d = [], b = [\"index\", _[438]], f;\n for (f in a)_[11] != typeof a[f] && -1 == b.indexOf(f) && \"_\" != f.charAt(0) && d.push(f);\n return d\n }\n }, bb = function (a, d) {\n var b = [], f = {};\n this.isArray = !0;\n this.isDynArray = 1 == d;\n this.__defineGetter__(\"count\", function () {\n return b.length\n });\n this.__defineSetter__(\"count\", function (a) {\n 0 == a ? (b = [], f = {}) : b.length = a\n });\n this.createItem = function (d, n) {\n var k = -1, e = null, k = String(d).charCodeAt(0);\n if (48 <= k && 57 >= k) {\n if (n)return null;\n k = parseInt(d, 10);\n e = b[k];\n if (null == e || void 0 == e)e = null != a ? new a : {}, e.name = \"n\" + k, e.index = k, b[k] = e, f[e.name] = e\n } else if (d = F(d), e = f[d], null == e || void 0 == e)e = n ? n : null != a ? new a : {}, k = b.push(e) - 1, e.index = k, e.name = d, b[k] = e, f[d] = e;\n return e\n };\n this.getItem = function (a) {\n var d = -1, d = String(a).charCodeAt(0);\n 48 <= d && 57 >= d ? (d = parseInt(a, 10), a = b[d]) : a = f[F(a)];\n return a\n };\n this.getArray = function () {\n return b\n };\n this.renameItem = function (a, d) {\n var k = -1, k = String(a).charCodeAt(0);\n 48 <= k && 57 >= k ? (k = parseInt(a, 10), k = b[k]) : k = f[F(a)];\n k && (delete f[k.name], d = F(d), k.name = d, f[d] = k)\n };\n this.removearrayitem = this.removeItem = function (a) {\n var d = -1, d = null;\n a = String(a);\n d = String(a).charCodeAt(0);\n 48 <= d && 57 >= d ? (d = parseInt(a, 10), d = b[d]) : d = f[F(a)];\n if (d) {\n f[d.name] = null;\n delete f[d.name];\n b.splice(d.index, 1);\n var k;\n k = b.length;\n for (a = d.index; a < k; a++)b[a].index--\n }\n return d\n };\n this.sortby = function (a, d) {\n var f, e, w = !1 === d ? -1 : 1;\n e = b.length;\n if (1 < e)for (b.sort(function (d, b) {\n var r = d[a], e = b[a];\n return void 0 === r && void 0 !== e ? +w : void 0 !== r && void 0 === e || r < e ? -w : r > e ? +w : 0\n }), f = 0; f < e; f++)b[f].index = f\n }\n }, ra = {};\n (function () {\n function a(a) {\n for (var d = w, b = [], e, g, h, c, f, n = a.length, k = 0, q = 0; k < n;)e = d.indexOf(a.charAt(k++)), g = d.indexOf(a.charAt(k++)), c = d.indexOf(a.charAt(k++)), f = d.indexOf(a.charAt(k++)), e = e << 2 | g >> 4, g = (g & 15) << 4 | c >> 2, h = (c & 3) << 6 | f, b[q++] = e, 64 != c && (b[q++] = g), 64 != f && (b[q++] = h);\n return b\n }\n\n function d(a, d) {\n var b, e, g, h = [];\n h.length = 256;\n if (80 == d || 82 == d) {\n e = 15;\n var c = _[89];\n 82 == d && od && (e = 127, c = od);\n b = a[65] & 7;\n for (g = 0; 128 > g; g++)h[2 * g] = a[g], h[2 * g + 1] = String(c).charCodeAt(g & e);\n e = a.length - 128 - b;\n b += 128\n } else if (71 == d) {\n b = a[4];\n e = (a[b] ^ b) & 15 | ((a[2 + b] ^ b) >> 2 & 63) << 4 | ((a[1 + b] ^ b) >> 1 & 63) << 10 | ((a[3 + b] ^ b) & 63) << 16;\n for (g = 0; 256 > g; g++)h[g] = a[g] ^ a[256 + e + b + 2 * g];\n b = 256\n }\n x.srand(h, 256);\n return x.flip(a, b, e)\n }\n\n function p(a, d, b) {\n if (null == a)return null;\n a = \"\" + a;\n 1 == d && m.basedir && 0 > a.indexOf(\"://\") && 0 != a.indexOf(\"/\") && _[74] != a.slice(0, 5) && (a = m.basedir + a);\n a = a.split(\"\\\\\").join(\"/\");\n null == e.firstxmlpath && (e.firstxmlpath = \"\");\n null == e.currentxmlpath && (e.currentxmlpath = \"\");\n null == e.swfpath && (e.swfpath = \"\");\n null == e.htmlpath && (e.htmlpath = \"\");\n for (d = a.indexOf(\"%\"); 0 <= d;) {\n var g = a.indexOf(\"%\", d + 1);\n if (g > d) {\n var f = a.slice(d + 1, g), h = null;\n if (36 == f.charCodeAt(0)) {\n if (f = U(f.slice(1)), null != f) {\n f = \"\" + f;\n a = 47 == f.charCodeAt(0) || 0 < f.indexOf(\"://\") ? f + a.slice(g + 1) : a.slice(0, d) + f + a.slice(g + 1);\n d = a.indexOf(\"%\");\n continue\n }\n } else switch (f) {\n case _[437]:\n h = 1 == b ? \"\" : e.firstxmlpath;\n break;\n case _[361]:\n h = e.currentxmlpath;\n break;\n case _[475]:\n h = 1 == b ? \"\" : e.swfpath;\n break;\n case _[422]:\n h = 1 == b ? \"\" : e.htmlpath;\n break;\n case _[473]:\n h = 1 == b ? \"\" : m.basedir\n }\n null != h ? (g++, \"/\" == a.charAt(g) && g++, a = h + a.slice(g), d = a.indexOf(\"%\")) : d = a.indexOf(\"%\", d + 1)\n } else d = -1\n }\n return a\n }\n\n function f(b, e, f) {\n var l, n;\n 0 <= (l = e.indexOf(_[333])) ? (n = e.indexOf(_[309])) > l && (e = e.slice(l + 11, n), l = e.indexOf(_[393]), 0 <= l && (e = e.slice(l + 9, -3))) : f && 0 <= (l = e.indexOf('\"[[KENC')) && (n = e.lastIndexOf(']]\"')) > l && (e = e.slice(l + 3, n));\n var h;\n n = null;\n h = e.slice(0, 8);\n l = e.slice(8);\n f = !0 === f && Ya & 64 || !f && Ya & 32;\n if (\"KENC\" != h.slice(0, 4))return f ? (b && Ea(b + _[32]), null) : e;\n var c = !1, k = e = 0, k = 0, w = !1;\n e = String(h).charCodeAt(4);\n if (80 == e || 82 == e || 71 == e)if (k = String(h).charCodeAt(5), 85 == k && (k = String(h).charCodeAt(6), w = 90 == k, 66 == k || w))c = !0;\n if (!c)return b && la(3, b + _[170]), null;\n if (f && 80 == e)return b && Ea(b + _[32]), null;\n b = null;\n if (w) {\n b = e;\n n = String.fromCharCode;\n h = 1;\n f = l.length;\n var m = e = null, q = k = c = w = 0, x = 0, C = 0, Q = 0;\n try {\n n.apply(null, (new Uint8Array(4)).subarray(2))\n } catch (A) {\n h = 0\n }\n n = h ? Uint8Array : Array;\n for (e = new n(4 * f / 5); w < f;)k = l.charCodeAt(w++) - 35, q = l.charCodeAt(w++) - 35, x = l.charCodeAt(w++) - 35, C = l.charCodeAt(w++) - 35, Q = l.charCodeAt(w++) - 35, 56 < k && k--, 56 < q && q--, 56 < x && x--, 56 < C && C--, 56 < Q && Q--, Q += 85 * (85 * (85 * (85 * k + q) + x) + C), e[c++] = Q >> 24 & 255, e[c++] = Q >> 16 & 255, e[c++] = Q >> 8 & 255, e[c++] = Q & 255;\n e = d(e, b);\n m = new n(e[2] << 16 | e[1] << 8 | e[0]);\n f = 8 + (e[6] << 16 | e[5] << 8 | e[4]);\n w = 8;\n for (c = 0; w < f;) {\n k = e[w++];\n q = k >> 4;\n for (x = q + 240; 255 === x; q += x = e[w++]);\n for (C = w + q; w < C;)m[c++] = e[w++];\n if (w === f)break;\n Q = c - (e[w++] | e[w++] << 8);\n q = k & 15;\n for (x = q + 240; 255 === x; q += x = e[w++]);\n for (C = c + q + 4; c < C;)m[c++] = m[Q++]\n }\n e.length = 0;\n n = l = g(m)\n } else b = a(l), b = d(b, e), null != b && (n = g(b));\n return n\n }\n\n function g(a) {\n for (var d = \"\", b = 0, e = 0, g = 0, h = 0, c = a.length; b < c;)e = a[b], 128 > e ? (0 < e && (d += Xc(e)), b++) : 191 < e && 224 > e ? (g = a[b + 1], d += Xc((e & 31) << 6 | g & 63), b += 2) : (g = a[b + 1], h = a[b + 2], e = (e & 15) << 12 | (g & 63) << 6 | h & 63, 65279 != e && (d += Xc(e)), b += 3);\n return d\n }\n\n function n(a, d, b) {\n void 0 !== d ? d(a, b) : Ea(a + _[80] + b + \")\")\n }\n\n function k(a, d, g, f, k) {\n if (0 == e.DMcheck(a))n(a, k, _[227]); else {\n var h = null, c = !1;\n if (b.ie && \"\" == aa.domain)try {\n h = new ActiveXObject(_[218]), c = !0\n } catch (w) {\n h = null\n }\n null == h && (h = new XMLHttpRequest);\n void 0 !== h.overrideMimeType && d && h.overrideMimeType(d);\n h.onreadystatechange = function () {\n if (4 == h.readyState) {\n var d = h.status, b = h.responseText;\n if (0 == d && b || 200 == d || 304 == d)if (g) {\n var e = null, e = c ? (new DOMParser).parseFromString(b, _[25]) : h.responseXML;\n f(a, e, d)\n } else f(a, b); else n(a, k, h.status)\n }\n };\n try {\n h.open(\"GET\", a, !0), h.send(null)\n } catch (m) {\n n(a, k, m)\n }\n }\n }\n\n var e = ra, w = _[183], w = w + (F(w) + _[273]);\n e.firstxmlpath = null;\n e.currentxmlpath = null;\n e.swfpath = null;\n e.htmlpath = null;\n e.parsePath = p;\n e.DMcheck = function (a) {\n var d;\n if (Ya & 256 && (d = aa.domain) && vc) {\n a = a.toLowerCase();\n var b = a.indexOf(\"://\");\n if (0 < b) {\n var b = b + 3, e = a.indexOf(\"/\", b);\n if (0 < e)return a = a.slice(b, e), b = a.indexOf(\":\"), 1 < b && (a = a.slice(0, b)), a == d\n } else return d == vc\n }\n return !0\n };\n var x = new function () {\n var a, d, b;\n this.srand = function (e, g) {\n var h, c, f, n, k = [];\n k.length = 256;\n for (h = 0; 256 > h; h++)k[h] = h;\n for (c = h = 0; 256 > h; h++)c = c + k[h] + e[h % g] & 255, n = k[h], k[h] = k[c], k[c] = n;\n for (f = c = h = 0; 256 > f; f++)h = h + 1 & 255, c = c + k[h] & 255, n = k[h], k[h] = k[c], k[c] = n;\n a = k;\n d = h;\n b = c\n };\n this.flip = function (e, g, h) {\n var c = [], f, n;\n c.length = h;\n var k = a, q = d, w = b;\n for (f = 0; f < h; f++, g++)q = q + 1 & 255, w = w + k[q] & 255, c[f] = e[g] ^ a[k[q] + k[w] & 255], n = k[q], k[q] = k[w], k[w] = n;\n d = q;\n b = w;\n return c\n }\n };\n e.loadimage = function (a, d, b) {\n var e = Ja(1);\n e.addEventListener(\"load\", function () {\n d && d(e)\n });\n e.addEventListener(_[48], function () {\n b && b(null, !1)\n }, !1);\n e.addEventListener(\"abort\", function () {\n b && b(null, !0)\n }, !1);\n e.src = a;\n return e\n };\n e.loadfile = function (a, d, b) {\n e.loadfile2(a, null, d, b)\n };\n e.loadxml = function (a, d, b) {\n e.loadfile2(a, _[25], d, b, !0)\n };\n e.loadfile2 = function (a, d, b, e, g) {\n g = !0 === g;\n var h = {errmsg: !0};\n h.rqurl = a;\n a = p(a);\n h.url = a;\n k(a, d, g, function (a, n, k) {\n !0 === g ? b(n, k) : (n = f(a, n, _[92] == d), h.data = n, null != n ? b && b(h) : e && e(h))\n }, g ? e : function (d, b) {\n e && e(h);\n h.errmsg && la(3, a + _[80] + b + \")\")\n })\n };\n e.resolvecontentencryption = f;\n e.b64u8 = function (d) {\n return g(a(d))\n };\n e.decodeLicense = function (a) {\n return null\n }\n })();\n\n var T = {};\n (function () {\n function a(d) {\n var b, e, g = d.childNodes, f;\n e = g.length;\n for (b = 0; b < e; b++)if (f = g.item(b))switch (f.nodeType) {\n case 1:\n a(f);\n break;\n case 8:\n d.removeChild(f), b--, e--\n }\n }\n\n function d(a, d) {\n var b, e, g = a.childNodes, f = -1;\n e = g.length;\n if (1 <= e)for (b = 0; b < e; b++)if (F(g[b].nodeName) == d) {\n f = b;\n break\n }\n return 0 <= f ? g[f] : null\n }\n\n function p(d, e, g, f, n) {\n var k, u, h, c = null, K = null, D, z;\n z = 0;\n var q, J = d.length, C = new XMLSerializer, Q = !1;\n f || (Q = !0, f = [], n = [], m.xml.parsetime = Ta());\n for (var A = 0; A < J; A++)if ((k = d[A]) && k.nodeName && \"#text\" != k.nodeName && (u = k.nodeName, u = F(u), _[129] != u)) {\n u = null == e && _[46] == u ? null : e ? e + \".\" + u : u;\n if (h = k.attributes)if (h.devices && 0 == b.checkSupport(h.devices.value))continue; else if (h[\"if\"] && 0 == da.calc(null, h[\"if\"].value))continue;\n q = (K = h && h.name ? h.name.value : null) ? !0 : !1;\n if (g) {\n if (_[462] == u && g & 16)continue;\n if ((_[29] == u || \"layer\" == u) && g & 4)continue;\n if (_[1] == u && g & 128)continue;\n if (_[75] == u && g & 65536)continue;\n if (g & 64 && K)if (_[29] == u || \"layer\" == u) {\n if ((c = xa.getItem(K)) && c._pCD && c.keep)continue\n } else if (_[1] == u && (c = Ua.getItem(K)) && c._pCD && c.keep)continue\n }\n if (u)if (q) {\n if (_[14] == u || \"data\" == u || \"scene\" == u) {\n a(k);\n q = null;\n if ((_[14] == u || \"data\" == u) && k.childNodes && 1 <= k.childNodes.length)for (c = 0; c < k.childNodes.length; c++)if (4 == k.childNodes[c].nodeType) {\n q = k.childNodes[c].nodeValue;\n break\n }\n null == q && (q = C.serializeToString(k), q = q.slice(q.indexOf(\">\") + 1, q.lastIndexOf(\"</\")), _[14] == u && (q = q.split(_[497]).join('\"').split(_[499]).join(\"'\").split(_[139]).join(String.fromCharCode(160)).split(\"&amp;\").join(\"&\")));\n I(u + \"[\" + K + _[61], q);\n if (h) {\n var H;\n q = h.length;\n for (H = 0; H < q; H++)if (D = h[H], c = F(D.nodeName), D = D.value, \"name\" != c) {\n z = c.indexOf(\".\");\n if (0 < z)if (b.checkSupport(c.slice(z + 1)))c = c.slice(0, z); else continue;\n z = u + \"[\" + K + \"].\" + F(c);\n I(z, D)\n }\n }\n continue\n }\n u = u + \"[\" + K + \"]\";\n if (!Uc(K, u))continue;\n I(u + \".name\", K)\n } else(K = U(u)) && K.isArray && !K.isDynArray && (K = \"n\" + String(K.count), u = u + \"[\" + K + \"]\", I(u + \".name\", K));\n if (h) {\n var qa = \"view\" == u, c = u ? U(u) : null, K = null;\n q = h.length;\n c && (c._lateBinding && (K = c._lateBinding), (D = h.style) && (D = D.value) && null == K && (c.style = D, n.push(u), K = c._lateBinding = {}));\n for (H = 0; H < q; H++) {\n D = h[H];\n c = F(D.nodeName);\n D = D.value;\n var ea = u ? u + \".\" : \"\";\n if (\"name\" != c && \"style\" != c) {\n z = c.indexOf(\".\");\n if (0 < z)if (b.checkSupport(c.slice(z + 1)))c = c.slice(0, z).toLowerCase(); else continue;\n z = ea + c;\n K ? K[c] = D : !D || _[13] != typeof D || \"get:\" != D.slice(0, 4) && \"calc:\" != D.slice(0, 5) ? (I(z, D), qa && I(\"xml.\" + z, D)) : (f.push(z), f.push(D))\n }\n }\n }\n k.childNodes && 0 < k.childNodes.length && p(k.childNodes, u, g, f, n)\n }\n if (Q) {\n J = f.length;\n for (A = 0; A < J; A += 2)I(f[A], f[A + 1]);\n J = n.length;\n for (A = 0; A < J; A++)if (u = n[A], da.assignstyle(u, null), c = U(u))if (K = c._lateBinding)da.copyattributes(c, K), c._lateBinding = null;\n m.xml.parsetime = Ta() - m.xml.parsetime\n }\n }\n\n function f(a, d) {\n var b = null, e, g;\n g = a.length;\n for (e = 0; e < g; e++)if (b = a[e], !b || !b.nodeName || _[14] != F(b.nodeName)) {\n var k = b.attributes;\n if (k) {\n var n, h = k.length, c;\n for (n = 0; n < h; n++) {\n var m = k[n];\n c = F(m.nodeName);\n var p = c.indexOf(\".\");\n 0 < p && (c = c.slice(0, p));\n if (_[435] == c) {\n c = m.value;\n var p = c.split(\"|\"), z, q;\n q = p.length;\n for (z = 0; z < q; z++)c = p[z], \"\" != c && 0 > c.indexOf(\"://\") && 47 != c.charCodeAt(0) && (p[z] = d + c);\n m.value = p.join(\"|\")\n } else if (p = c.indexOf(\"url\"), 0 == p || 0 < p && p == c.length - 3)if (c = m.value)p = c.indexOf(\":\"), 47 == c.charCodeAt(0) || 0 < p && (\"//\" == c.substr(p + 1, 2) || 0 <= _[94].indexOf(c.substr(0, p + 1))) || (c = d + c), m.value = c\n }\n }\n b.childNodes && 0 < b.childNodes.length && f(b.childNodes, d)\n }\n }\n\n function g(a, d) {\n var b = Gc(d), e = b.lastIndexOf(\"/\"), g = b.lastIndexOf(\"\\\\\");\n g > e && (e = g);\n 0 < e && (b = b.slice(0, e + 1), f(a, b))\n }\n\n function n(a, b) {\n var e = d(a, _[374]);\n if (e) {\n var g = \"\", f, k;\n k = e.childNodes.length;\n for (f = 0; f < k; f++)g += e.childNodes[f].nodeValue;\n if (e = ra.resolvecontentencryption(b, g))return (e = (new DOMParser).parseFromString(e, _[25])) && e.documentElement && _[22] == e.documentElement.nodeName ? (la(3, b + _[21]), null) : e;\n Ea(b + _[32]);\n return null\n }\n return Ya & 32 ? (Ea(b + _[32]), null) : a\n }\n\n function k(a, d) {\n var b, e;\n switch (a.nodeType) {\n case 1:\n var g = T.xmlDoc.createElement(a.nodeName);\n if (a.attributes && 0 < a.attributes.length)for (b = 0, e = a.attributes.length; b < e;)g.setAttribute(a.attributes[b].nodeName, a.getAttribute(a.attributes[b++].nodeName));\n if (d && a.childNodes && 0 < a.childNodes.length)for (b = 0, e = a.childNodes.length; b < e;)g.appendChild(k(a.childNodes[b++], d));\n return g;\n case 3:\n case 4:\n case 8:\n return T.xmlDoc.createTextNode(a.nodeValue)\n }\n }\n\n function e(a, d) {\n var f, r, m;\n if (null != T.xmlIncludeNode) {\n m = Gc(a.url);\n if ((r = a.responseXML) && r.documentElement && _[22] == r.documentElement.nodeName) {\n Ea(m + _[21]);\n return\n }\n r = n(r, a.url);\n if (null == r)return;\n g(r.childNodes, m);\n f = r.childNodes;\n var l = T.xmlIncludeNode.parentNode;\n if (null != l.parentNode) {\n var u = 0;\n m = f.length;\n if (1 < m)for (r = 0; r < m; r++)if (_[46] == F(f[r].nodeName)) {\n u = r;\n break\n }\n r = null;\n r = void 0 === T.xmlDoc.importNode ? k(f[u], !0) : T.xmlDoc.importNode(f[u], !0);\n l.insertBefore(r, T.xmlIncludeNode);\n l.removeChild(T.xmlIncludeNode)\n } else T.xmlDoc = r;\n T.xmlAllNodes = [];\n T.addNodes(T.xmlDoc.childNodes);\n T.xmlIncludeNode = null\n }\n l = !1;\n m = T.xmlAllNodes.length;\n for (r = 0; r < m; r++)if (f = T.xmlAllNodes[r], u = null, null != f.nodeName) {\n u = F(f.nodeName);\n if (_[129] == u) {\n var u = f.attributes, h, c = u.length, p = !1;\n for (h = 0; h < c; h++) {\n var D = u[h];\n _[483] == D.nodeName ? 0 == b.checkSupport(D.value) && (p = !0) : \"if\" == D.nodeName && 0 == da.calc(null, D.value) && (p = !0)\n }\n if (0 == p)for (h = 0; h < c; h++)if (D = u[h], \"url\" == F(D.nodeName)) {\n l = !0;\n p = D.value;\n D = p.indexOf(\":\");\n 0 < D && 0 <= _[94].indexOf(p.substr(0, D + 1)) && (p = da.calc(null, p.substr(D + 1)));\n T.xmlIncludeNode = f;\n var z = ra.parsePath(p);\n z ? ra.loadxml(z, function (a, c) {\n a ? e({url: z, responseXML: a}, d) : Ea(z + \" - \" + (200 == c ? _[208] : _[184]))\n }) : d()\n }\n }\n if (l)break\n }\n 0 == l && d()\n }\n\n T.resolvexmlencryption = n;\n T.resolvexmlincludes = function (a, d) {\n var b = a.childNodes;\n T.xmlDoc = a;\n T.xmlAllNodes = [];\n T.addNodes(b);\n g(b, m.xml.url);\n T.xmlIncludeNode = null;\n e(null, d)\n };\n T.parsexml = p;\n T.xmlDoc = null;\n T.xmlAllNodes = null;\n T.xmlIncludeNode = null;\n T.addNodes = function (a) {\n var d, b, e;\n e = a.length;\n for (b = 0; b < e; b++)(d = a[b]) && d.nodeName && _[14] != F(d.nodeName) && (T.xmlAllNodes.push(d), d.childNodes && 0 < d.childNodes.length && T.addNodes(d.childNodes))\n };\n T.findxmlnode = d\n })();\n\n var ac = {};\n (function () {\n var a = ac;\n a.linear = function (a, b, f) {\n return f * a + b\n };\n a.easeinquad = function (a, b, f) {\n return f * a * a + b\n };\n a.easeoutquad = function (a, b, f) {\n return -f * a * (a - 2) + b\n };\n a[_[5]] = a.easeoutquad;\n a.easeinoutquad = function (a, b, f) {\n return (1 > (a /= .5) ? f / 2 * a * a : -f / 2 * (--a * (a - 2) - 1)) + b\n };\n a.easeinback = function (a, b, f) {\n return f * a * a * (2.70158 * a - 1.70158) + b\n };\n a.easeoutback = function (a, b, f) {\n return f * (--a * a * (2.70158 * a + 1.70158) + 1) + b\n };\n a.easeinoutback = function (a, b, f) {\n var g = 1.70158;\n return 1 > (a *= 2) ? f / 2 * a * a * (((g *= 1.525) + 1) * a - g) + b : f / 2 * ((a -= 2) * a * (((g *= 1.525) + 1) * a + g) + 2) + b\n };\n a.easeincubic = function (a, b, f) {\n return f * a * a * a + b\n };\n a.easeoutcubic = function (a, b, f) {\n return f * (--a * a * a + 1) + b\n };\n a.easeinquart = function (a, b, f) {\n return f * a * a * a * a + b\n };\n a.easeoutquart = function (a, b, f) {\n return -f * ((a = a / 1 - 1) * a * a * a - 1) + b\n };\n a.easeinquint = function (a, b, f) {\n return f * a * a * a * a * a + b\n };\n a.easeoutquint = function (a, b, f) {\n return f * ((a = a / 1 - 1) * a * a * a * a + 1) + b\n };\n a.easeinsine = function (a, b, f) {\n return -f * Math.cos(Ga / 2 * a) + f + b\n };\n a.easeoutsine = function (a, b, f) {\n return f * Math.sin(Ga / 2 * a) + b\n };\n a.easeinexpo = function (a, b, f) {\n return 0 == a ? b : f * Math.pow(2, 10 * (a - 1)) + b - .001 * f\n };\n a.easeoutexpo = function (a, b, f) {\n return 1 == a ? b + f : 1.001 * f * (-Math.pow(2, -10 * a) + 1) + b\n };\n a.easeincirc = function (a, b, f) {\n return -f * (Math.sqrt(1 - a * a) - 1) + b\n };\n a.easeoutcirc = function (a, b, f) {\n return f * Math.sqrt(1 - (a = a / 1 - 1) * a) + b\n };\n a.easeoutbounce = function (a, b, f) {\n return a < 1 / 2.75 ? 7.5625 * f * a * a + b : a < 2 / 2.75 ? f * (7.5625 * (a -= 1.5 / 2.75) * a + .75) + b : a < 2.5 / 2.75 ? f * (7.5625 * (a -= 2.25 / 2.75) * a + .9375) + b : f * (7.5625 * (a -= 2.625 / 2.75) * a + .984375) + b\n };\n a.easeinbounce = function (b, m, f) {\n return f - a.easeoutbounce(1 - b, 0, f) + m\n };\n a.getTweenfu = function (b) {\n b = F(b);\n \"\" == b || \"null\" == b ? b = _[56] : void 0 === a[b] && (b = _[56]);\n return a[b]\n }\n })();\n\n var da = {};\n (function () {\n function a(a, b, c) {\n var d, h = a.length;\n c = 1 != c;\n for (d = 0; d < h; d++) {\n var e = \"\" + a[d], g = e.toLowerCase();\n c && \"null\" == g ? a[d] = null : 41 == e.charCodeAt(e.length - 1) && (g = g.slice(0, 4), \"get(\" == g ? a[d] = U(Ha(e.slice(4, e.length - 1)), b) : \"calc\" == g && 40 == e.charCodeAt(4) && (a[d] = U(e, b)))\n }\n }\n\n function b(a, c) {\n var d, e, h, g = 0, f = 0, k = 0;\n h = \"\";\n d = 0;\n for (e = a.length; d < e;) {\n h = a.charCodeAt(d);\n if (!(32 >= h))if (34 == h)0 == k ? k = 1 : 1 == k && (k = 0); else if (39 == h)0 == k ? k = 2 : 2 == k && (k = 0); else if (0 == k)if (91 == h)0 == f && (f = d + 1), g++; else if (93 == h && 0 < g && (g--, 0 == g)) {\n if (h = oc(a, f, d, c))a = a.slice(0, f) + h + a.slice(d), d = f + h.length + 1, e = a.length;\n f = 0\n }\n d++\n }\n return a\n }\n\n function E(a, b) {\n var c = \"\", d, h, e, g, f;\n e = a.length;\n f = b.length;\n for (h = 0; h < e; h++)d = a.charAt(h), \"%\" == d ? (h++, d = a.charCodeAt(h) - 48, 0 <= d && 9 >= d ? (h + 1 < e && (g = a.charCodeAt(h + 1) - 48, 0 <= g && 9 >= g && (h++, d = 10 * d + g)), c = d < f ? c + (\"\" + b[d]) : c + \"null\") : c = -11 == d ? c + \"%\" : c + (\"%\" + a.charAt(h))) : c += d;\n return c\n }\n\n function f(a, b, c, d) {\n c = Array.prototype.slice.call(c);\n c.splice(0, 0, a);\n b = E(b, c);\n h.callaction(b, d, !0)\n }\n\n function g(a, b, c) {\n var krpano = m;\n var caller = c;\n var args = b;\n var resolve = y;\n var actions = h;\n try {\n eval(a, c)\n } catch (d) {\n la(3, b[0] + \" - \" + d)\n }\n }\n\n function n(a) {\n var b = c, d = b.length, h;\n for (h = 0; h < d; h++)if (b[h].id == a) {\n b.splice(h, 1);\n break\n }\n }\n\n function k(a) {\n var b = a.length;\n if (2 == b || 3 == b) {\n var c = U(a[b - 2], h.actioncaller), d = U(a[b - 1], h.actioncaller);\n null == c && (c = a[b - 2]);\n null == d && (d = a[b - 1]);\n return [a[0], parseFloat(c), parseFloat(d)]\n }\n return null\n }\n\n function e(a, b, c) {\n var d = 1 == b.length ? U(b[0], c) : b[1], d = 0 == a ? escape(d) : unescape(d);\n I(b[0], d, !1, c, !0)\n }\n\n function w(a) {\n if (1 == a.length)return a[0];\n var b, c = null, d = null, h = null, c = !1;\n for (b = 0; b < a.length; b++)if (c = \"\" + a[b], 0 < c.length && 0 <= _[442].indexOf(c)) {\n if (0 == b || b >= a.length - 1)throw _[33];\n d = a[b - 1];\n h = a[b + 1];\n switch (c) {\n case \"===\":\n case \"==\":\n c = d == h;\n break;\n case \"!==\":\n case \"!=\":\n c = d != h;\n break;\n case \"<\":\n c = d < h;\n break;\n case \"<=\":\n c = d <= h;\n break;\n case \">\":\n c = d > h;\n break;\n case \">=\":\n c = d >= h;\n break;\n default:\n throw _[33];\n }\n a.splice(b - 1, 3, c);\n b -= 2\n }\n if (1 == a.length)return a[0];\n for (b = 0; b < a.length; b++)if (c = a[b], \"&&\" == c || \"||\" == c) {\n if (0 == b || b >= a.length - 1)throw _[33];\n d = a[b - 1];\n h = a[b + 1];\n c = \"&&\" == c ? d && h : d || h;\n a.splice(b - 1, 3, c);\n b -= 2\n }\n if (5 == a.length && \"?\" == a[1] && \":\" == a[3])return a[0] ? a[2] : a[4];\n if (1 < a.length)throw _[33];\n return a[0]\n }\n\n function x(a) {\n var b = void 0, b = F(a), c = b.charCodeAt(0), d, e = 0, g = !1;\n 64 == c && (g = !0, a = a.slice(1), b = b.slice(1), c = b.charCodeAt(0));\n if (39 == c || 34 == c)return Ha(a);\n if (33 == c || 43 == c || 45 == c)e = c, a = a.slice(1), b = b.slice(1), c = b.charCodeAt(0);\n d = b.charCodeAt(b.length - 1);\n 40 == c && 41 == d ? b = v(a.slice(1, -1)) : 37 == d ? b = a : (b = \"null\" != b ? U(a, h.actioncaller, !0) : null, void 0 === b ? (c = Number(a), isNaN(c) || isNaN(parseFloat(a)) ? g && (b = a) : b = c) : _[13] == typeof b && (a = F(b), \"true\" == a ? b = !0 : _[31] == a ? b = !1 : \"null\" == a ? b = null : (a = Number(b), isNaN(a) || (b = a))));\n 33 == e ? b = !b : 45 == e && (b = -b);\n return b\n }\n\n function v(a) {\n var b;\n if (\"\" == a || null === a)return a;\n try {\n var c, d = a.length, h = 0, e = 0, g = !1, f = !1, k = 0, n = 0, t = 0, G = !1, q = [], l = 0, r = 0;\n for (c = 0; c < d; c++)if (r = a.charCodeAt(c), 0 == G && 32 >= r)0 < e && (q[l++] = a.substr(h, e), e = 0), g = !1; else if (0 == G && (61 == r || 33 == r && 61 == a.charCodeAt(c + 1) || 62 == r || 60 == r))0 == g && (0 < e ? (q[l++] = a.substr(h, e), e = 0) : 0 == l && 0 == m.strict && (q[l++] = \"\"), g = !0, f = !1, h = c), e++; else if (0 != G || 43 != r && 45 != r && 42 != r && 47 != r && 94 != r && 63 != r && 58 != r) {\n if (0 == t)if (91 == r)k++, G = !0; else if (93 == r)k--, 0 == k && 0 == n && (G = !1); else if (40 == r)n++, G = !0; else if (41 == r)n--, 0 == n && 0 == k && (G = !1); else {\n if (39 == r || 34 == r)t = r, G = !0\n } else r == t && (t = 0, 0 == k && 0 == n && (G = !1));\n if (g || f)0 < e && (q[l++] = a.substr(h, e), e = 0), f = g = !1, h = c;\n 0 == e && (h = c);\n e++\n } else 0 < e && (q[l++] = a.substr(h, e)), g = !1, f = !0, h = c, e = 1;\n 0 < e && (q[l++] = a.substr(h, e));\n 2 == l && g && 0 == m.strict && (q[l++] = \"\");\n if (0 == m.strict) {\n var u = q.length;\n if (!(3 > u)) {\n var p, v;\n for (p = 1; p < u - 1; p++)if (v = q[p], \"==\" == v || \"!=\" == v) {\n q[p - 1] = \"@\" + q[p - 1];\n v = q[p + 1];\n if (\"+\" == v || \"-\" == v)for (p++, v = q[p + 1]; \"+\" == v || \"-\" == v;)p++, v = q[p + 1];\n q[p + 1] = \"@\" + v\n }\n }\n }\n var J = q.length, z, y, D;\n if (1 == J)q[0] = x(q[0]); else for (z = 0; z < J; z++)if (y = q[z], !(0 <= \"<=>=!===+-*/^||&&?:\".indexOf(y))) {\n switch (y) {\n case \"AND\":\n D = \"&&\";\n break;\n case \"OR\":\n D = \"||\";\n break;\n case \"GT\":\n D = \">\";\n break;\n case \"GE\":\n D = \">=\";\n break;\n case \"LT\":\n D = \"<\";\n break;\n case \"LE\":\n D = \"<=\";\n break;\n case \"EQ\":\n D = \"==\";\n break;\n case \"LSHT\":\n D = \"<<\";\n break;\n case \"RSHT\":\n D = \">>\";\n break;\n case \"BAND\":\n D = \"~&\";\n break;\n case \"BOR\":\n D = \"~|\";\n break;\n default:\n D = x(y)\n }\n q[z] = D\n }\n var F = q.length;\n if (!(2 > F)) {\n var E, K;\n c = null;\n for (E = 0; E < q.length; E++)if (c = q[E], \"+\" == c || \"-\" == c)if (0 == E || 0 <= \".<.<<.<=.==.===.=>.>.>>.!=.!==.+.-.*./.^.&&.||.?.:.~|.~&.\".indexOf(\".\" + q[E - 1] + \".\")) {\n K = 45 == c.charCodeAt(0) ? -1 : 1;\n F = 1;\n for (c = \"\" + q[E + F]; \"+\" == c || \"-\" == c;)K *= 45 == c.charCodeAt(0) ? -1 : 1, F++, c = \"\" + q[E + F];\n c && 40 == c.charCodeAt(0) && (c = x(c));\n c = c && 37 == c.charCodeAt(c.length - 1) ? parseFloat(c) * K + \"%\" : Number(c) * K;\n q.splice(E, 1 + F, c);\n --E\n }\n for (E = 1; E < q.length - 1; E++)c = q[E], \"*\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) * Number(q[E + 1])), E -= 3) : \"/\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) / Number(q[E + 1])), E -= 3) : \"^\" == c ? (q.splice(E - 1, 3, Math.pow(Number(q[E - 1]), Number(q[E + 1]))), E -= 3) : \"<<\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) << Number(q[E + 1])), E -= 3) : \">>\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) >> Number(q[E + 1])), E -= 3) : \"~&\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) & Number(q[E + 1])), E -= 3) : \"~|\" == c && (q.splice(E - 1, 3, Number(q[E - 1]) | Number(q[E + 1])), E -= 3);\n for (E = 1; E < q.length - 1; E++)c = q[E], \"+\" == c ? (q.splice(E - 1, 3, q[E - 1] + q[E + 1]), E -= 3) : \"-\" == c && (q.splice(E - 1, 3, Number(q[E - 1]) - Number(q[E + 1])), E -= 3)\n }\n b = w(q)\n } catch (L) {\n la(3, L + \": \" + a)\n }\n return b\n }\n\n function r(a) {\n var b = a.position;\n 1 == a.motionmode ? (b *= a.Tmax, b <= a.T1 ? b *= a.accelspeed / 2 * b : b > a.T1 && b <= a.T1 + a.T2 ? b = a.S1 + (b - a.T1) * a.Vmax : (b -= a.T1 + a.T2, b = a.Vmax * b + a.breakspeed / 2 * b * b + a.S1 + a.S2), b = 0 != a.Smax ? b / a.Smax : 1) : 2 == a.motionmode && (b = a.tweenfu(b, 0, 1));\n p.hlookat = a.startH + b * (a.destH - a.startH);\n p.vlookat = a.startV + b * (a.destV - a.startV);\n p.fov = a.startF + b * (a.destF - a.startF)\n }\n\n function y(a, b) {\n var c = U(a, b);\n null == c && (c = a);\n return c\n }\n\n function l(a) {\n var b = a.waitfor;\n \"load\" == b ? Xa.isLoading() && (a.position = 0) : _[73] == b && Xa.isBlending() && (a.position = 0)\n }\n\n function u(a) {\n var b = a.varname, c = parseFloat(a.startval), d = parseFloat(a.endval), e = null != a.startval ? 0 < String(a.startval).indexOf(\"%\") : !1, g = null != a.endval ? 0 < String(a.endval).indexOf(\"%\") : !1;\n g ? e || (c = 0) : e && 0 == d && (g = !0);\n var e = 0, e = a.position, f = a.tweenmap;\n 0 <= b.indexOf(_[47], b.lastIndexOf(\".\") + 1) ? (c = parseInt(a.startval), d = parseInt(a.endval), 1 <= e ? e = d : (e = f(e, 0, 1), e = Math.min(Math.max((c >> 24) + e * ((d >> 24) - (c >> 24)), 0), 255) << 24 | Math.min(Math.max((c >> 16 & 255) + e * ((d >> 16 & 255) - (c >> 16 & 255)), 0), 255) << 16 | Math.min(Math.max((c >> 8 & 255) + e * ((d >> 8 & 255) - (c >> 8 & 255)), 0), 255) << 8 | Math.min(Math.max((c & 255) + e * ((d & 255) - (c & 255)), 0), 255))) : e = 1 <= e ? d : f(e, c, d - c);\n I(b, g ? e + \"%\" : e, !0, a.actioncaller);\n null != a.updatefu && h.callaction(a.updatefu, a.actioncaller)\n }\n\n var h = da;\n h.busy = !1;\n h.blocked = !1;\n h.queue = [];\n h.actioncaller = null;\n var c = [], K = [], D = null, z = 0, q = function () {\n this.id = null;\n this.blocking = !1;\n this.position = this.maxruntime = this.starttime = 0;\n this.updatefu = this.actioncaller = this.donecall = this.process = null\n };\n h.copyattributes = function (a, b) {\n for (var c in b) {\n var d = F(c);\n if (\"name\" != d && \"index\" != d && \"_type\" != d) {\n var e = b[c];\n if (_[11] !== typeof e) {\n if (e && _[13] == typeof e) {\n var h = e.slice(0, 4);\n \"get:\" == h ? e = U(e.slice(4)) : \"calc\" == h && 58 == e.charCodeAt(4) && (e = v(e.slice(5)))\n }\n a[d] = _[67] == typeof a[d] ? pa(e) : e\n }\n }\n }\n };\n h.assignstyle = function (a, b) {\n var c = U(a);\n if (c && (null == b && (b = c.style), b)) {\n c.style = b;\n var d = b.split(\"|\"), e, g;\n g = d.length;\n for (e = 0; e < g; e++) {\n var f = U(_[515] + d[e] + \"]\");\n f ? h.copyattributes(c, f) : la(3, a + _[198] + d[e])\n }\n }\n };\n h.isblocked = function () {\n if (h.blocked) {\n var a = D;\n if (a)D = null, h.stopall(), \"break\" != F(a) && h.callaction(a), h.processactions(); else return !0\n }\n return !1\n };\n h.actions_autorun = function (a, b) {\n var c = m.action.getArray(), d = [], e, g, f = null;\n g = c.length;\n for (e = 0; e < g; e++)(f = c[e]) && f.autorun == a && !f._arDone && (f._arDone = !0, d.push(f));\n g = d.length;\n if (0 < g) {\n c = \"\";\n for (e = 0; e < g; e++)f = d[e], c += _[452] + f.name + \");\";\n h.callaction(c, null, b);\n h.processactions()\n }\n };\n h.callwith = function (a, b) {\n var c = U(a, h.actioncaller);\n if (c) {\n var d = c._type;\n _[29] != d && _[1] != d || h.callaction(b, c)\n }\n };\n\n //sohow_base64\n h.callaction = function (a, b, c) {\n if (a && \"null\" != a && \"\" != a) {\n var d = typeof a;\n if (_[11] === d)\n a();\n else if (_[144] !== d && (a = Gb(a, b))) {\n var d = a.length, e = 0 < h.queue.length, g = !1;\n for (b = 0; b < d; b++) {\n var f = a[b];\n _[314] == f.cmd && (g = !0);\n f.breakable = g;\n 1 == c ? h.queue.splice(b, 0, f) : h.queue.push(f)\n }\n 0 == e && h.processactions()\n }\n }\n };\n var J = !1;\n h.processactions = function () {\n if (!J) {\n J = !0;\n for (var b = null, c = null, d = null, e = null, f = 0, q = h.queue; null != q && 0 < q.length;) {\n if (h.busy || h.blocked) {\n J = !1;\n return\n }\n f++;\n if (1E5 < f) {\n la(2, _[89]);\n q.length = 0;\n break\n }\n b = q.shift();\n c = String(b.cmd);\n d = b.args;\n b = b.caller;\n h.actioncaller = b;\n if (!(b && b._busyonloaded && b._destroyed) && \"//\" != c.slice(0, 2))if (\"call\" == c && (c = F(d.shift())), a(d, b, \"set\" == c), void 0 !== h[c])h[c].apply(h[c], d); else if (b && void 0 !== b[c])e = b[c], _[11] === typeof e ? e.apply(e, d) : h.callaction(b[c], b, !0); else {\n if (_[14] == c || \"call\" == c)c = F(d.shift());\n e = null;\n if (null != (e = U(c))) {\n var k = typeof e;\n _[11] === k ? e.apply(e, d) : _[144] === k ? la(2, _[87] + id(c)) : _[13] === typeof e && (d.splice(0, 0, c), e = E(e, d), h.callaction(e, b, !0))\n } else if (k = U(_[453] + c + \"]\")) {\n if (e = k.content)d.splice(0, 0, c), _[372] === F(k.type) ? g(e, d, b) : (e = E(e, d), h.callaction(e, b, !0))\n } else la(2, _[87] + id(c))\n }\n }\n h.blocked || (D = null);\n h.actioncaller = null;\n J = !1\n }\n };\n h.processAnimations = function (a) {\n var b = !1, d = c, e = d.length, g, f = Ta();\n a = 1 == a;\n for (g = 0; g < e; g++) {\n var q = d[g];\n if (q) {\n var k = 0 < q.maxruntime ? (f - q.starttime) / 1E3 / q.maxruntime : 1;\n isNaN(k) && (k = 1);\n 1 < k && (k = 1);\n q.position = k;\n null != q.process && (b = !0, q.process(q), k = q.position);\n if (1 <= k || a)d.splice(g, 1), e--, g--, q.blocking ? (h.blocked = !1, h.processactions()) : q.donecall && 0 == a && h.callaction(q.donecall, q.actioncaller)\n }\n }\n h.blocked && (b = !1);\n return b\n };\n h.fromcharcode = function () {\n var a = arguments;\n 2 == a.length && I(a[0], String.fromCharCode(y(a[1], h.actioncaller)), !1, h.actioncaller)\n };\n h.stopmovements = function () {\n Pa.stopFrictions(4)\n };\n h.stopall = function () {\n var a, b, d = h.queue;\n b = d.length;\n for (a = 0; a < b; a++) {\n var e = d[a];\n e && e.breakable && (e.cmd = \"//\")\n }\n c = [];\n h.blocked = !1\n };\n h.breakall = function () {\n h.processAnimations(!0)\n };\n h.oninterrupt = function (a) {\n D = a\n };\n h.delayedcall = function () {\n var a = arguments, b = a.length, d = 0;\n 3 == b && (d++, b--);\n 2 == b && (b = new q, b.maxruntime = Number(a[d]), b.donecall = a[d + 1], b.starttime = Ta(), b.actioncaller = h.actioncaller, b.id = 0 < d ? \"ID\" + F(a[0]) : \"DC\" + ++z, n(b.id), c.push(b))\n };\n h.stopdelayedcall = function (a) {\n n(\"ID\" + F(a))\n };\n h.set = function () {\n var a = arguments;\n 2 == a.length && I(a[0], a[1], !1, h.actioncaller)\n };\n h.copy = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = U(a[1], h.actioncaller);\n I(a[0], void 0 === b ? null : b, !1, h.actioncaller)\n }\n };\n h.push = function () {\n var a = arguments;\n 1 == a.length && K.push(U(a[0], h.actioncaller))\n };\n h.pop = function () {\n var a = arguments;\n 1 == a.length && I(a[0], K.pop(), !1, h.actioncaller)\n };\n h[_[508]] = function () {\n var a = arguments, b = a.length, c = a[0], d = F(U(c, h.actioncaller));\n if (1 == b)I(c, !pa(d), !0, h.actioncaller); else if (3 <= b) {\n var e;\n b--;\n for (e = 1; e <= b; e++) {\n var g = F(a[e]), f = !1;\n isNaN(Number(d)) || isNaN(Number(g)) ? d == g && (f = !0) : Number(d) == Number(g) && (f = !0);\n if (f) {\n e++;\n e > b && (e = 1);\n I(c, a[e], !0, h.actioncaller);\n break\n }\n }\n }\n };\n h.roundval = function () {\n var a = arguments;\n if (1 <= a.length) {\n var b = Number(U(a[0], h.actioncaller)), c = 2 == a.length ? parseInt(a[1]) : 0, b = 0 == c ? Math.round(b).toString() : b.toFixed(c);\n I(a[0], b, !1, h.actioncaller, !0)\n }\n };\n h.tohex = function () {\n var a = arguments, b = a.length;\n if (0 < b) {\n var c = parseInt(U(a[0], h.actioncaller)).toString(16).toUpperCase();\n 2 < b && (c = (_[419] + c).slice(-parseInt(a[2])));\n 1 < b && (c = a[1] + c);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.tolower = function () {\n var a = arguments;\n 1 == a.length && I(a[0], F(U(a[0], h.actioncaller)), !1, h.actioncaller, !0)\n };\n h.toupper = function () {\n var a = arguments;\n 1 == a.length && I(a[0], (\"\" + U(a[0], h.actioncaller)).toUpperCase(), !1, h.actioncaller, !0)\n };\n h.inc = function () {\n var a = arguments, b = a.length;\n if (1 <= b) {\n var c = Number(U(a[0], h.actioncaller)) + (1 < b ? Number(a[1]) : 1);\n 3 < b && c > Number(a[2]) && (c = Number(a[3]));\n I(a[0], c, !0, h.actioncaller)\n }\n };\n h.dec = function () {\n var a = arguments, b = a.length;\n if (1 <= b) {\n var c = Number(U(a[0], h.actioncaller)) - (1 < b ? Number(a[1]) : 1);\n 3 < b && c < Number(a[2]) && (c = Number(a[3]));\n I(a[0], c, !0, h.actioncaller)\n }\n };\n h.add = function () {\n var a = k(arguments);\n a && I(a[0], a[1] + a[2], !1, h.actioncaller)\n };\n h.sub = function () {\n var a = k(arguments);\n a && I(a[0], a[1] - a[2], !1, h.actioncaller)\n };\n h.mul = function () {\n var a = k(arguments);\n a && I(a[0], a[1] * a[2], !1, h.actioncaller)\n };\n h.div = function () {\n var a = k(arguments);\n a && I(a[0], a[1] / a[2], !1, h.actioncaller)\n };\n h.mod = function () {\n var a = k(arguments);\n if (a) {\n var b = a[1], c = b | 0, b = b + (-c + c % (a[2] | 0));\n I(a[0], b, !1, h.actioncaller)\n }\n };\n h.pow = function () {\n var a = k(arguments);\n a && I(a[0], Math.pow(a[1], a[2]), !1, h.actioncaller)\n };\n h.clamp = function () {\n var a = arguments;\n if (3 == a.length) {\n var b = h.actioncaller, c = Number(U(a[0], b)), d = Number(a[1]), e = Number(a[2]);\n c < d && (c = d);\n c > e && (c = e);\n I(a[0], c, !1, b)\n }\n };\n h.remapfovtype = function () {\n var a = arguments, b = a.length;\n if (3 == b || 5 == b) {\n var c = h.actioncaller, d = Number(U(a[0], c)), e = 3 == b ? m.area.pixelwidth : Number(U(a[3], c)), b = 3 == b ? m.area.pixelheight : Number(U(a[4], c)), d = p.fovRemap(d, a[1], a[2], e, b);\n I(a[0], d, !1, c)\n }\n };\n h.screentosphere = function () {\n var a = arguments;\n if (4 == a.length) {\n var b = h.actioncaller, c = p.screentosphere(Number(U(a[0], b)), Number(U(a[1], b)));\n I(a[2], c.x, !1, b);\n I(a[3], c.y, !1, b)\n }\n };\n h.spheretoscreen = function () {\n var a = arguments;\n if (4 == a.length) {\n var b = h.actioncaller, c = p.spheretoscreen(Number(U(a[0], b)), Number(U(a[1], b)));\n I(a[2], c.x, !1, b);\n I(a[3], c.y, !1, b)\n }\n };\n h.screentolayer = function () {\n var a = arguments;\n if (5 == a.length) {\n var b = h.actioncaller, c = xa.getItem(a[0]);\n if (c) {\n var d = Number(U(a[1], b)), e = Number(U(a[2], b)), g = tc, f = tc, q = c.sprite;\n if (q) {\n var k = X, f = V.viewerlayer.getBoundingClientRect(), n = q.getBoundingClientRect(), g = d * k - (n.left - f.left + q.clientLeft + q.scrollLeft), f = e * k - (n.top - f.top + q.clientTop + q.scrollTop);\n c.scalechildren && (k = 1);\n g /= c._finalxscale * k;\n f /= c._finalyscale * k\n }\n I(a[3], g, !1, b);\n I(a[4], f, !1, b)\n }\n }\n };\n h.layertoscreen = function () {\n var a = arguments;\n if (5 == a.length) {\n var b = h.actioncaller, c = xa.getItem(a[0]);\n if (c) {\n var d = Number(U(a[1], b)), e = Number(U(a[2], b)), g = tc, f = tc, q = c.sprite;\n if (q)var f = X, k = c.scalechildren ? f : 1, n = V.viewerlayer.getBoundingClientRect(), t = q.getBoundingClientRect(), g = d * c._finalxscale / k + (t.left - n.left + q.clientLeft + q.scrollLeft) / f, f = e * c._finalyscale / k + (t.top - n.top + q.clientTop + q.scrollTop) / f;\n I(a[3], g, !1, b);\n I(a[4], f, !1, b)\n }\n }\n };\n h.escape = function () {\n e(0, arguments, h.actioncaller)\n };\n h.unescape = function () {\n e(1, arguments, h.actioncaller)\n };\n h.txtadd = function () {\n var a = arguments, b, c = a.length, d = 2 == c ? String(U(a[0], h.actioncaller)) : \"\";\n \"null\" == d && (d = \"\");\n for (b = 1; b < c; b++)d += a[b];\n I(a[0], d, !1, h.actioncaller, !0)\n };\n h.subtxt = function () {\n var a = arguments, b = a.length;\n if (2 <= b) {\n var c = U(a[1], h.actioncaller), c = null == c ? String(a[1]) : String(c), c = c.substr(2 < b ? Number(a[2]) : 0, 3 < b ? Number(a[3]) : void 0);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.indexoftxt = function () {\n var a = arguments, b = a.length;\n 3 <= b && (b = String(a[1]).indexOf(String(a[2]), 3 < b ? Number(a[3]) : 0), I(a[0], b, !1, h.actioncaller, !0))\n };\n h.txtreplace = function () {\n var a = arguments, b = a.length;\n if (3 == b || 4 == b) {\n var b = 3 == b ? 0 : 1, c = U(a[b], h.actioncaller);\n if (c)var d = a[b + 2], c = c.split(a[b + 1]).join(d);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.txtsplit = function () {\n var a = arguments, b = a.length;\n if (3 <= b) {\n var c = (\"\" + y(a[0], h.actioncaller)).split(\"\" + a[1]), d;\n if (3 == b)for (d = 0; d < c.length; d++)I(a[2] + \"[\" + d + _[455], c[d], !1, h.actioncaller, !0); else for (d = 2; d < b; d++)I(a[d], c[d - 2], !1, h.actioncaller, !0)\n }\n };\n h.showlog = function () {\n var a = arguments, a = !(1 == a.length && 0 == pa(a[0]));\n V.showlog(a)\n };\n h.trace = function () {\n var a = arguments, b, c = a.length, d = \"\", e = h.actioncaller;\n for (b = 0; b < c; b++)var g = a[b], f = U(g, e), d = null != f ? d + f : d + g;\n la(1, d)\n };\n h[_[507]] = function () {\n var a = arguments, b, c = a.length, d = h.actioncaller;\n for (b = 0; b < c; b++)a:{\n var e = d, g = void 0, f = void 0, q = void 0, k = Vc(a[b]), f = k.length;\n if (1 == f && e && (q = k[0], e.hasOwnProperty(q))) {\n e[q] = null;\n delete e[q];\n break a\n }\n for (var n = m, g = 0; g < f; g++) {\n var q = k[g], t = g == f - 1, G = null, l = q.indexOf(\"[\");\n 0 < l && (G = oc(q, l + 1, q.length - 1, e), q = q.slice(0, l));\n if (void 0 !== n[q]) {\n if (null != G && (l = n[q], l.isArray))if (q = l.getItem(G))if (t)break a; else {\n n = q;\n continue\n } else break;\n if (t) {\n n[q] = null;\n delete n[q];\n break a\n } else n = n[q]\n } else break\n }\n }\n };\n h.error = function () {\n 1 == arguments.length || !1 !== pa(arguments[1]) ? Ea(arguments[0]) : la(3, arguments[0])\n };\n h.openurl = function () {\n var a = arguments;\n L.open(a[0], 0 < a.length ? a[1] : _[504])\n };\n h.loadscene = function () {\n var a = arguments;\n if (0 < a.length) {\n var b = a[0], c = U(_[72] + b + _[61]), d = U(_[72] + b + _[394]);\n d && (d += \";\");\n null == c ? la(3, 'loadscene() - scene \"' + b + '\" not found') : (m.xml.scene = b, m.xml.view = {}, Xa.loadxml(_[124] + c + _[117], a[1], a[2], a[3], d))\n }\n };\n h.jsget = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = a[0], c = a[1], d = null;\n try {\n (function () {\n var krpano = V.viewerlayer;\n d = eval(c)\n })()\n } catch (e) {\n la(3, \"js\" + (b ? \"get\" : \"call\") + '() - calling Javascript \"' + c + '\" failed: ' + e)\n }\n b && I(b, d, !1, h.actioncaller)\n }\n };\n h.jscall = function () {\n var a = arguments;\n 1 == a.length && h.jsget(null, a[0])\n };\n h.parseFunction = function (b) {\n var c = null;\n if (b = Gb(b, null, !0))b = b[0], a(b.args, h.actioncaller), c = [b.cmd].concat(b.args);\n return c\n };\n h.js = function (b) {\n b = \"\" + b;\n var c = Gb(b, null, !0);\n if (c) {\n c = c[0];\n a(c.args, h.actioncaller);\n var d = !1;\n if (_[11] == typeof L[c.cmd]) {\n d = !0;\n try {\n L[c.cmd].apply(L[c.cmd], c.args)\n } catch (e) {\n d = !1\n }\n }\n if (0 == d) {\n c = c.cmd + (0 < c.args.length ? \"('\" + c.args.join(\"','\") + \"');\" : \"();\");\n try {\n eval(c)\n } catch (g) {\n la(2, 'js() - calling Javascript \"' + b + '\" failed: ' + g)\n }\n }\n }\n };\n h.setfov = function () {\n var a = arguments;\n 1 == a.length && (p.fov = Number(a[0]))\n };\n h.lookat = function () {\n var a = arguments;\n if (2 <= a.length) {\n var b;\n b = Number(a[0]);\n isNaN(b) || (p.hlookat = b);\n b = Number(a[1]);\n isNaN(b) || (p.vlookat = b);\n b = Number(a[2]);\n isNaN(b) || (p.fov = b);\n b = Number(a[3]);\n isNaN(b) || (p.distortion = b);\n b = Number(a[4]);\n isNaN(b) || (p.architectural = b);\n b = Number(a[5]);\n isNaN(b) || (p.pannini = \"\" + b)\n }\n };\n h.adjusthlookat = function () {\n var a = arguments;\n 1 == a.length && (p.hlookat = nc(p.hlookat, Number(a[0])))\n };\n h.adjust360 = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = h.actioncaller;\n I(a[0], nc(U(a[0], b), Number(y(a[1], b))), !1, b)\n }\n };\n h.loop = function () {\n f(\"loop\", _[192], arguments, h.actioncaller)\n };\n h.asyncloop = function () {\n f(_[402], _[164], arguments, h.actioncaller)\n };\n h[\"for\"] = function () {\n f(\"for\", _[155], arguments, h.actioncaller)\n };\n h.asyncfor = function () {\n f(_[409], \"if('%5'!='NEXTLOOP',%1);if(%2,%4;%3;delayedcall(0,asyncfor(%1,%2,%3,%4,NEXTLOOP)););\", arguments, h.actioncaller)\n };\n h.calc = function () {\n var a, b = arguments;\n 2 == b.length && (a = v(b[1]), b[0] && I(b[0], a, !1, h.actioncaller));\n return a\n };\n h.resolvecondition = function () {\n var a = h.actioncaller, b = arguments, c = b.length, d = null, e = null, e = !1;\n if (2 == c || 3 == c) {\n d = F(b[0]);\n e = 2 == c ? b[1] : b[2];\n if (\"null\" == d || \"\" == d)d = null;\n e = null == e || \"\" == e ? !1 : v(e);\n null != d && (3 == c && (b = F(b[1]), c = pa(U(d, a)), \"and\" == b ? e = c && e : \"or\" == b ? e = c || e : \"xor\" == b && (e = !(c && e) && (c || e))), I(d, e, !1, a))\n }\n return e\n };\n h[\"if\"] = function () {\n var a = arguments, b = h.actioncaller;\n 2 <= a.length && (v(a[0]) ? h.callaction(a[1], b, !0) : 3 == a.length && h.callaction(a[2], b, !0))\n };\n h.ifnot = function () {\n var a = arguments;\n h[\"if\"](a[0], a[2], a[1])\n };\n h.stoplookto = function () {\n n(_[69])\n };\n h.lookto = function () {\n var b = arguments, d = b.length;\n if (2 <= d) {\n var e = h.actioncaller, g = new q;\n h.stopmovements();\n n(_[69]);\n g.id = _[69];\n g.actioncaller = e;\n 1 == pa(b[5]) ? (g.blocking = !1, g.donecall = b[6]) : (g.blocking = !0, h.blocked = !0);\n 4 < d && void 0 === b[4] && d--;\n 3 < d && void 0 === b[3] && d--;\n 2 < d && void 0 === b[2] && d--;\n var f = Number(b[0]), k = Number(b[1]), l = 2 < d ? Number(b[2]) : p.fov, m = 3 < d ? b[3] : null, u = 4 < d ? pa(b[4]) : !0;\n if (!(isNaN(f) || isNaN(k) || isNaN(l))) {\n var B = 1, b = 720, d = -720, t = 720, G = p.hlookat, w = G, P = p.vlookat, v = p.fov;\n if (u) {\n for (; -90 > k || 90 < k;)-90 > k ? (k = -180 - k, f += 180) : 90 < k && (k = 180 - k, f -= 180);\n for (; 0 > G;)G += 360;\n for (; 360 < G;)G -= 360;\n for (; 0 > f;)f += 360;\n for (; 360 < f;)f -= 360;\n for (; -180 > P;)P += 360;\n for (; 180 < P;)P -= 360;\n G = nc(G, f);\n P = nc(P, k);\n u = G - w;\n G -= u;\n f -= u\n }\n g.startH = G;\n g.startV = P;\n g.startF = v;\n g.destH = f;\n g.destV = k;\n g.destF = l;\n f = Math.sqrt((f - G) * (f - G) + (k - P) * (k - P) + (l - v) * (l - v));\n m && ((m = Gb(m)) && (m = m[0]), m && (k = m.cmd, l = m.args, a(l, e), _[43] == k ? (B = 0, t = 360, 1 == m.args.length && (t = parseFloat(l[0]))) : _[496] == k ? (B = 1, 0 < m.args.length && (b = parseFloat(l[0])), 1 < m.args.length && (d = parseFloat(l[1])), 2 < m.args.length && (t = parseFloat(l[2])), b = +Math.abs(b), d = -Math.abs(d), t = +Math.abs(t)) : \"tween\" == k && (B = 2, g.tweenfu = ac.getTweenfu(l[0]), g.maxruntime = parseFloat(l[1]), isNaN(g.maxruntime) && (g.maxruntime = .5))));\n g.motionmode = B;\n 0 == B ? g.maxruntime = f / t : 1 == B && (e = f, B = t * t / (2 * b), m = t / b, f = -(t * t) / (2 * d), k = -t / d, l = e - (B + f), G = l / t, 0 > G && (t = Math.sqrt(2 * e * b * d / (d - b)), B = t * t / (2 * b), m = t / b, f = -(t * t) / (2 * d), k = -t / d, G = l = 0), P = m + G + k, g.accelspeed = b, g.breakspeed = d, g.Vmax = t, g.Tmax = P, g.Smax = e, g.T1 = m, g.T2 = G, g.T3 = k, g.S1 = B, g.S2 = l, g.S3 = f, g.maxruntime = P);\n g.starttime = Ta();\n g.process = r;\n c.push(g)\n }\n }\n };\n h.looktohotspot = function () {\n var a = arguments, b = h.actioncaller, c = Ua.getItem(1 > a.length ? b ? b.name : \"\" : a[0]);\n if (c) {\n var b = c.ath, d = c.atv, e = 30, e = c.getcenter(), b = e.x, d = e.y, e = e.z, c = Number(a[1]);\n isNaN(c) || (e = c);\n c = p.fovmin;\n e < c && (e = c);\n h.lookto(b, d, e, a[2], a[3])\n }\n };\n h.moveto = function () {\n var a = arguments;\n 2 <= a.length && h.lookto(a[0], a[1], p.fov, a[2])\n };\n h.zoomto = function () {\n var a = arguments;\n 1 <= a.length && h.lookto(p.hlookat, p.vlookat, a[0], a[1])\n };\n h.getlooktodistance = function () {\n var a = arguments, b = a.length;\n if (3 <= b) {\n var c = h.actioncaller, d = Number(y(a[1], c)), e = Number(y(a[2], c)), g = p.hlookat, f = p.vlookat;\n 5 == b && (g = Number(y(a[3], c)), f = Number(y(a[4], c)));\n if (!(isNaN(d) || isNaN(e) || isNaN(g) || isNaN(f))) {\n var b = Math.PI, q = b / 180, d = b - d * q, g = b - g * q, f = f * q, e = e * q, d = Math.acos(Math.cos(f) * Math.cos(g) * Math.cos(e) * Math.cos(d) + Math.sin(f) * Math.sin(e) + Math.cos(f) * Math.sin(g) * Math.cos(e) * Math.sin(d)) / q;\n I(a[0], d, !1, c)\n }\n }\n };\n h.wait = function () {\n var a = arguments;\n if (1 == a.length) {\n var a = a[0], b = F(a);\n if (\"load\" == b || _[73] == b)a = 0; else {\n b = \"time\";\n a = Number(a);\n if (isNaN(a))return;\n 0 >= a && (b = _[73], a = 0)\n }\n var d = new q;\n d.waitfor = b;\n d.maxruntime = a;\n d.process = l;\n d.starttime = Ta();\n d.actioncaller = h.actioncaller;\n d.id = \"WAIT\" + ++z;\n d.blocking = !0;\n h.blocked = !0;\n c.push(d)\n }\n };\n h.tween = function () {\n var a = arguments, e = a.length;\n if (2 <= e) {\n var g = h.actioncaller, f = new q, k = F(a[0]);\n if (0 < k.indexOf(\"|\")) {\n var e = (\"\" + a[0]).split(\"|\"), g = (\"\" + a[1]).split(\"|\"), f = a[3] ? (\"\" + a[3]).split(\"|\") : [a[3]], l = e.length, m = g.length, r = f.length, p = parseFloat(a[2]);\n if (0 > p || isNaN(p))p = .5;\n for (k = 0; k < m; k++)g[k] = Ha(g[k]);\n for (k = 0; k < r; k++)f[k] = Ha(f[k]);\n for (k = 0; k < l; k++)h.tween(Ha(e[k]), g[k % m], p, f[k % r], k == l - 1 ? a[4] : null, k == l - 1 ? a[5] : null)\n } else {\n l = k;\n r = a[1];\n m = !1;\n g && 0 > k.indexOf(\".\") && g.hasOwnProperty(k) && (l = g._type + \"[\" + g.name + \"].\" + k, m = !0);\n 0 == m && 0 < k.indexOf(\"[\") && (l = k = b(k, g), l = l.split(_[134]).join(_[127]));\n f.id = l;\n f.varname = k;\n f.actioncaller = g;\n f.startval = m ? g[k] : U(k, g);\n if (null == f.startval || \"\" == f.startval)f.startval = 0;\n f.endval = r;\n k = 2 < e ? String(a[2]) : \"0.5\";\n if (0 < k.indexOf(\"(\") && (p = Gb(k))) {\n var B = p[0];\n _[427] == B.cmd && (p = Number(B.args[0]), k = Number(B.args[1]), r = Math.abs(parseFloat(r) - parseFloat(f.startval)), k = k * r / p)\n }\n k = parseFloat(k);\n isNaN(k) && (k = .5);\n f.maxruntime = k;\n f.tweenmap = ac.getTweenfu(3 < e ? a[3] : _[56]);\n if (4 < e)if (\"wait\" == F(a[4]))f.blocking = !0, h.blocked = !0; else if (r = a[4])0 == m && 0 < r.indexOf(\"[\") && (r = b(r, g)), f.donecall = r;\n 5 < e && (f.updatefu = a[5]);\n f.starttime = Ta();\n f.process = u;\n n(l);\n c.push(f)\n }\n }\n };\n h.stoptween = function () {\n var a = h.actioncaller, c = arguments, e = c.length, g;\n for (g = 0; g < e; g++) {\n var f = F(c[g]);\n if (0 < f.indexOf(\"|\"))h.stoptween.apply(h.stoptween, f.split(\"|\")); else {\n if (a && 0 > f.indexOf(\".\")) {\n if (n(a._type + \"[\" + a.name + \"].\" + f))continue\n } else 0 < f.indexOf(\"[\") && (f = b(f, a)), f = f.split(_[134]).join(_[127]);\n n(f)\n }\n }\n };\n h.invalidatescreen = function () {\n Kb = Ta();\n p.haschanged = !0\n };\n h.updatescreen = function () {\n p.haschanged = !0\n };\n h.updateobject = function () {\n M && M.updateFOV && M.updateFOV(M, [Number(N.hfov), Number(N.vfov), Number(N.voffset)]);\n p.haschanged = !0\n };\n h.loadpano = function (a, b, c, d, e) {\n m.xml.scene = null;\n m.xml.view = {};\n Xa.loadpano(a, b, c, d, e)\n };\n h.loadpanoscene = function (a, b, c, d, e, h) {\n m.xml.scene = b;\n m.xml.view = {};\n m._loadpanoscene_name = b;\n Xa.loadpano(a, c, d, e, h)\n };\n h.loadxml = function (a, b, c, d, e) {\n m.xml.scene = null;\n m.xml.view = {};\n Xa.loadxml(a, b, c, d, e)\n };\n h.fscommand = function () {\n };\n h.freezeview = function () {\n };\n h.reloadpano = function () {\n };\n h.addlensflare = function () {\n };\n h.removelensflare = function () {\n };\n h.SAcall = function (a) {\n var b = U(_[14]);\n if ((a = Gb(a)) && b) {\n var c, d;\n d = a.length;\n for (c = 0; c < d; c++) {\n var e = a[c];\n if (e) {\n var g = e.cmd, f = b.getItem(g);\n f && 1 == pa(f.secure) ? (e = e.args, e.splice(0, 0, g), h.callaction(E(f.content, e))) : la(2, _[428] + g + _[282])\n }\n }\n }\n }\n })();\n var V = {};\n (function () {\n function a(a) {\n a = _[189] + a;\n L.console ? L.console.log(a) : alert(a)\n }\n\n function d(a, b, c, d, e, h) {\n var g = Ja(), f = g.style;\n f.position = _[0];\n \"LT\" == a ? (f.left = b, f.top = c) : (f.left = b, f.bottom = c);\n f.width = d;\n f.height = e;\n f.overflow = _[6];\n !1 === h && (f.webkitUserSelect = f.MozUserSelect = f.msUserSelect = f.oUserSelect = f.userSelect = \"none\");\n return g\n }\n\n function p(a) {\n if (r.fullscreen = a)L.activekrpanowindow = c.id;\n Ka(1 == a ? _[221] : _[225])\n }\n\n function f(a) {\n l && (Aa(a), r.onResize(a), setTimeout(e, 250))\n }\n\n function g(a, b) {\n for (var c = a.style, d = b.length, e = 0, e = 0; e < d; e += 2)c[b[e]] = b[e + 1]\n }\n\n function n(a) {\n p(!!(aa.fullscreenElement || aa.mozFullScreenElement || aa.webkitIsFullScreen || aa.webkitFullscreenElement || aa.msFullscreenElement))\n }\n\n function k(a) {\n if (l) {\n a = L.innerHeight;\n var b = vb;\n a < b ? r.__scrollpage_yet = !0 : r.__scrollpage_yet && (r.__scrollpage_yet = !1, e());\n if (a != b)r.onResize(null)\n }\n }\n\n function e() {\n var a = L.innerWidth, c = L.innerHeight;\n r.__scrollpage_yet && c == vb && (r.__scrollpage_yet = !1);\n var d = screen.height - 64, e = 268;\n 26 <= b.crios && (d += 44, e = 300);\n (320 == a && c != d || a == screen.height && c != e) && L.scrollTo(0, 0)\n }\n\n function w() {\n if (8 == b.iosversion && b.ipad) {\n var a = screen.width, d = screen.height, e = L.innerWidth, f = L.innerHeight, g = c.clientHeight;\n if (Math.min(e, f) == Math.min(a, d) && Math.max(e, f) == Math.max(a, d) || g > f)qa ^= 1, L.scrollTo(0, qa), setTimeout(w, 60)\n }\n }\n\n function x(a, b) {\n Aa(a);\n var c = \"none\" == D.style.display ? \"\" : \"none\";\n void 0 !== b && (c = 1 == b ? \"\" : \"none\");\n D.style.display = c;\n z.scrollTop = z.scrollHeight\n }\n\n function v() {\n Ca && (K.removeChild(Ca), Ca = null);\n var a, c = Ja();\n a = 25;\n b.androidstock && (a *= b.pixelratio);\n g(c, [_[65], _[0], \"left\", \"50%\", \"top\", \"50%\", _[47], _[40], _[120], a + \"px\", _[51], \"none\", _[148], _[5], _[267], \"none\"]);\n a = c.style;\n a.zIndex = 999999;\n a.opacity = .67;\n a = Ja();\n g(a, \"position;relative;left;-50%;top;-25px;fontFamily;sans-serif;textShadow;#000000 1px 1px 2px;lineHeight;110%\".split(\";\"));\n a.innerHTML = _[433] + (Na && Na[1] && 6 < Ha(Na[1], !1).length ? Na[1] : _[169]) + _[375];\n c.appendChild(a);\n K.appendChild(c);\n Ca = c\n }\n\n var r = V;\n r.fullscreen = !1;\n var y = !0, l = !1, u = !1;\n r.__scrollpage_yet = !1;\n var h = null, c = null, K = null;\n r.htmltarget = null;\n r.viewerlayer = null;\n r.controllayer = null;\n r.panolayer = null;\n r.pluginlayer = null;\n r.hotspotlayer = null;\n var D = r.svglayer = null, z = null, q = null, J = null, C = 0, Q = 0, A = !1, H = !1;\n r.build = function (e) {\n function h(a) {\n x(null, !1)\n }\n\n var l = e.target, t = e.id, G = aa.getElementById(l);\n if (!G)return a(_[172] + l), !1;\n for (var l = null, p = t, C = 1; ;)if (l = aa.getElementById(t))if (_[254] == p)C++, t = p + C; else return a(_[165] + t), !1; else break;\n l = Ja();\n l.id = t;\n l.style.position = _[119];\n l.style.overflow = _[6];\n l.style.lineHeight = _[45];\n l.style.fontWeight = _[45];\n l.style.fontStyle = _[45];\n l.tabIndex = -1;\n l.style.outline = 0;\n t = _[26];\n e.bgcolor && (t = e.bgcolor);\n e = F(e.wmode);\n if (_[36] == e || _[142] == e)t = null, m.bgcolor = 4278190080;\n null != t && (l.style.background = t, m.bgcolor = parseInt(t.slice(1), 16));\n G.appendChild(l);\n c = l;\n r.htmltarget = G;\n r.viewerlayer = l;\n K = d(\"LT\", 0, 0, \"100%\", \"100%\", !1);\n g(K, \"msTouchAction none touchAction none msContentZooming none contentZooming none -webkit-tap-highlight-color transparent\".split(\" \"));\n r.controllayer = K;\n t = d(\"LT\", 0, 0, \"100%\", \"100%\");\n r.panolayer = t;\n g(t, [_[258], \"none\"]);\n G = d(\"LT\", 0, 0, \"100%\", \"100%\", !1);\n 0 == b.ie && 0 == b.firefox && g(G, [Id, _[59]]);\n e = G;\n b.android && b.firefox && Kc && (p = d(\"LT\", 0, 0, \"1px\", \"1px\"), p.style.background = _[226], p.style.pointerEvents = \"none\", p.style.zIndex = 999999999, p.style[ib] = _[20], G.appendChild(p));\n var p = b.androidstock ? b.pixelratio : 1, C = 156 * p, u = (b.mobile ? 8 : 13) * p, w = b.androidstock || b.android && b.chrome ? 6 : 8;\n D = d(\"LB\", 0, 0, \"100%\", C + \"px\", !0);\n D.style.display = \"none\";\n !0 !== b.opera && Kc && (2 > Nb && (D.style[ib] = _[20]), b.ios && 0 == b.simulator || b.android && b.chrome) && (D.style[ib] = _[20]);\n D.style.zIndex = 999999999;\n var A = d(\"LT\", 0, 0, \"100%\", \"100%\", !0);\n A.style.opacity = .67;\n b.android && b.opera && (A.style.borderTop = _[179]);\n g(A, [_[255], _[26], pc, _[441] + w + _[373], _[114], w + \"px\", _[482], .67]);\n z = aa.createElement(\"pre\");\n w = null;\n b.mac && (w = _[270] + (L.chrome ? \"1px\" : \"0\"));\n b.realDesktop ? (z.style.fontFamily = _[55], z.style.fontSize = \"11px\", w && (z.style.fontSize = \"13px\", z.style.textShadow = w)) : (z.style.fontFamily = _[38], z.style.fontSize = u + \"px\");\n g(z, [_[65], _[0], \"left\", \"5px\", \"top\", \"0px\", _[50], \"left\", _[329], 0, _[296], b.realDesktop ? \"16px\" : 0, _[346], 0, _[286], 0, _[107], \"none\", _[71], 0, _[114], (b.realDesktop ? 10 : 8) + \"px\", _[49], \"100%\", _[28], C - 10 + \"px\", _[421], \"auto\", _[210], \"none\", _[471], \"block\", _[395], \"left\", _[338], _[411], _[51], \"none\", _[47], _[40]]);\n q = Ja();\n w && (q.style.textShadow = w);\n g(q, [_[65], _[0], _[3], 0, _[2], 0, _[132], \"0 4px\", _[28], C - 10 + \"px\", _[230], \"none\", _[279], \"none\", _[148], _[18], _[76], _[36], _[347], b.realDesktop ? _[55] : _[38], _[120], (b.realDesktop ? 10 : 9 * p | 0) + \"px\", _[47], _[40]]);\n q.innerHTML = \"CLOSE\";\n R(q, _[115], Aa, !0);\n R(q, _[118], h, !0);\n R(q, _[7], h, !0);\n D.appendChild(A);\n D.appendChild(z);\n D.appendChild(q);\n l.appendChild(K);\n K.appendChild(t);\n 0 < b.iosversion && 5 > b.iosversion && (e = Ja(), e.style.position = _[0], G.appendChild(e), K.style.webkitTransformStyle = _[59], G.style.webkitTransformStyle = \"flat\");\n K.appendChild(G);\n b.ios && (t = Ja(), t.style.position = _[0], t.style.webkitTransformStyle = _[59], e.appendChild(t));\n l.appendChild(D);\n r.pluginlayer = G;\n r.hotspotlayer = e;\n b.fullscreensupport && R(aa, b.browser.events.fullscreenchange, n);\n J = [l.style.width, l.style.height];\n r.onResize(null);\n R(L, _[137], r.onResize, !1);\n b.iphone && b.safari && R(L, _[133], k, !1);\n R(L, _[84], f, !1);\n return !0\n };\n r.setFullscreen = function (a) {\n if (b.fullscreensupport)if (a)c[b.browser.events.requestfullscreen](); else try {\n aa.exitFullscreen ? aa.exitFullscreen() : aa.mozCancelFullScreen ? aa.mozCancelFullScreen() : aa.webkitCancelFullScreen ? aa.webkitCancelFullScreen() : aa.webkitExitFullscreen ? aa.webkitExitFullscreen() : aa.msExitFullscreen && aa.msExitFullscreen()\n } catch (d) {\n } else {\n var e = aa.body, f = e.style, h = c.style;\n if (a)r.fsbkup = [f.padding, f.margin, f.overflow, e.scrollTop, e.scrollLeft, L.pageYOffset], f.padding = \"0 0\", f.margin = \"0 0\", f.overflow = _[6], e.scrollTop = \"0\", e.scrollLeft = \"0\", e.appendChild(c), h.position = _[0], h.left = 0, h.top = 0, h.width = \"100%\", h.height = \"100%\", Pa.domUpdate(), L.scrollTo(0, 0), p(!0); else if (a = r.fsbkup)r.htmltarget.appendChild(c), f.padding = a[0], f.margin = a[1], f.overflow = a[2], e.scrollTop = a[3], e.scrollLeft = a[4], h.position = _[119], Pa.domUpdate(), L.scrollTo(0, a[5]), r.fsbkup = null, p(!1)\n }\n };\n var qa = 0;\n r.onResize = function (a, d) {\n A = d;\n Aa(a);\n var f = c, g = \"100%\", k = \"100%\";\n null == J && (J = [f.style.width, f.style.height]);\n J && (g = J[0], k = J[1], \"\" == g && (g = \"100%\"), \"\" == k && (k = \"100%\"), J = null);\n var q = Jb.so;\n q && (q.width && (g = q.width), q.height && (k = q.height));\n r.fullscreen && (g = k = \"100%\");\n var n = f.parentNode, m = 0, p = f;\n do if (m = p.offsetHeight, b.ie && r.fullscreen && 20 > m && (m = 0), 1 >= m) {\n if (p = p.parentNode, null == p) {\n m = L.innerHeight;\n break\n }\n } else break; while (1);\n q = 0;\n for (p = f; p && \"body\" != F(p.nodeName);)q++, p = p.parentNode;\n var n = n ? n.offsetHeight : L.innerHeight, C = f.clientWidth, p = g, f = k;\n 0 < String(g).indexOf(\"%\") ? g = parseFloat(g) * C / 100 : (g = parseFloat(g), p = g + \"px\");\n 0 < String(k).indexOf(\"%\") ? k = parseFloat(k) * m / 100 : (k = parseFloat(k), f = k + \"px\");\n 1 > k && (k = 100);\n m = screen.width;\n C = screen.height;\n b.iphone && 320 == m && 4 > b.iosversion && 480 > C && (C = 480);\n var v = L.innerWidth, x = L.innerHeight;\n b.ios && 2 >= q && 0 == r.fullscreen && (26 <= b.crios && n > x && (x = k = n), w(), 7 <= b.iosversion && k > x && (k = x, l = u = !0, setTimeout(e, 10)));\n y && (y = !1, b.iphone ? (320 == v && x >= C - 124 ? x = C - 124 : v == C && 208 <= x && (x = 208), 2 >= q && (v == g && x && (320 == g && k == C - 124 || g == C && (208 == k || 320 == k)) && (l = !0), 26 <= b.crios && (320 == g || g == C) && (l = !0))) : b.ipad && 28 <= b.crios && 2 >= q && (g > k != m > C && (q = m, m = C, C = q), g == m && k == C - 20 && (u = l = !0)));\n l && (u ? (g = v, k = x) : 320 == L.innerWidth ? (g = 320, k = C - 64, b.crios && (k += 44)) : (g = C, k = 320 == L.innerHeight ? 320 : 268, 26 <= b.crios && (k = 300)), p = g + \"px\", f = k + \"px\");\n b.getViewportScale();\n q = p;\n Pa && Pa.focusLoss();\n l && null == h && (h = setInterval(e, 4E3), setTimeout(e, 250));\n n = !1;\n if (bc != g || vb != k || A)n = !0, A = !1, bc = g, vb = k;\n Ra && (Ra._pxw = Ra.pixelwidth = Ra.imagewidth = bc / X, Ra._pxh = Ra.pixelheight = Ra.imageheight = vb / X);\n Za && (Za._pxw = Za.pixelwidth = Za.imagewidth = bc / X, Za._pxh = Za.pixelheight = Za.imageheight = vb / X);\n n && (pb && pb.calc(bc, vb), Ka(_[63]), n = !1);\n pb ? (n |= pb.calc(bc, vb), K.style.left = pb.pixelx * X + \"px\", K.style.top = pb.pixely * X + \"px\", K.style.width = Qa + \"px\", K.style.height = ya + \"px\", g = Qa, k = ya) : (Qa = bc, ya = vb);\n uc = Math.max(4 * k / 3, g);\n c.style.width = q;\n c.style.height = f;\n b.desktop && (q = L.devicePixelRatio, isNaN(q) || (b.pixelratio = q, b.fractionalscaling = 0 != q % 1));\n Oa.size(g, k);\n H = !0;\n n && Ka(_[63]);\n Xa.updateview(!1, !0);\n r.resizeCheck(!0);\n A = !1\n };\n r.resizeCheck = function (a) {\n var b = !1, d = c, e = d.clientWidth, d = d.clientHeight;\n if (e != C || d != Q || a || pb && pb.haschanged)if (C = e, Q = d, b = !0, 1 == a)b = !1; else r.onResize(null);\n H && !0 !== a && (b = !0, H = !1);\n 255 == (jc & 511) && 0 == (Ya & 1) && v();\n return b\n };\n var ea = \"\";\n r.log = function (a) {\n if (\"cls\" == a)z.innerHTML = \"\"; else if (\"d\" == a)v(); else {\n var c = 4 > b.firefoxversion ? 4096 : 1E4, d = a.slice(0, 6);\n _[140] == d || _[135] == d ? (c = _[200] + (69 == d.charCodeAt(0) ? \"F\" : \"0\") + _[416] + a + _[417], ea += c + \"\\n\", z.innerHTML += \"\\n\" + c) : (ea += a + \"\\n\", ea.length > c ? (ea = ea.slice(-c / 2, -1), z.innerHTML = ea) : z.lastChild ? z.lastChild.nodeValue += \"\\n\" + a : z.innerHTML += a);\n z.scrollTop = z.scrollHeight;\n Jb.so.vars && pa(Jb.so.vars.consolelog) && (c = L.console) && c.log && (b.firefox || b.chrome ? c.log(\"%c\" + a, _[135] == d ? _[259] : _[140] == d ? _[178] : _[420] == d ? _[257] : _[262]) : c.log(a))\n }\n };\n r.showlog = function (a) {\n x(null, a)\n };\n r.togglelog = x;\n r.getMousePos = function (a, b) {\n var c;\n c = {};\n var d = b ? b : K, e = d.getBoundingClientRect();\n c.x = Math.round(a.clientX - e.left - d.clientLeft + d.scrollLeft);\n c.y = Math.round(a.clientY - e.top - d.clientTop + d.scrollTop);\n return c\n };\n r.remove = function () {\n null != h && (clearInterval(h), h = null);\n try {\n ba(L, _[137], r.onResize, !1), b.iphone && b.safari && ba(L, _[133], k, !1), ba(L, _[84], f, !1), b.fullscreensupport && ba(aa, b.browser.events.fullscreenchange, n), r.htmltarget.removeChild(c), r.htmltarget = null, r.viewerlayer = null, r.controllayer = null, r.panolayer = null, r.pluginlayer = null, K = c = q = z = D = r.hotspotlayer = null\n } catch (a) {\n }\n };\n var Ca = null\n })();\n var Pa = {};\n (function () {\n function a(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n a = a.changedTouches ? a.changedTouches : [a];\n var b = a.length, c, d, e;\n for (c = 0; c < b; c++)if (d = a[c], e = d.pointerId ? d.pointerId : d.identifier, void 0 !== e) {\n d = wa(d);\n d = {id: e, lx: d.x / X, ly: d.y / X};\n var f, g;\n g = ka.length;\n for (f = 0; f < g; f++)if (ka[f].id == e) {\n ka[f] = d;\n return\n }\n ka.push(d)\n }\n }\n }\n\n function d(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n a = a.changedTouches ? a.changedTouches : [a];\n var b = a.length, c, d;\n for (c = 0; c < b; c++)if (d = a[c], d = d.pointerId ? d.pointerId : d.identifier, void 0 !== d) {\n var e, f;\n f = ka.length;\n for (e = 0; e < f; e++)if (ka[e].id == d) {\n ka.splice(e, 1);\n break\n }\n }\n }\n }\n\n function E() {\n var a = F(ia.usercontrol);\n return _[19] == a || \"all\" == a\n }\n\n function f(a) {\n return a && (a = a.pointerType, 4 == a || _[19] == a) ? !0 : !1\n }\n\n function g(a, b, c, d) {\n for (var e = jc; 0 < wb.length && !(c - wb[0].t <= Sa) && !(1 >= e - wb[0].f);)wb.shift();\n e = wb.length - 1;\n 0 <= e && a == wb[e].x && b == wb[e].y ? wb[e].t = c : wb.push({x: a, y: b, t: c, f: d})\n }\n\n function n(a, b, c, d) {\n b = p.inverseProject(a, b);\n var e = p.inverseProject(c, d);\n d = (Math.atan2(e.z, e.x) - Math.atan2(b.z, b.x)) / Y;\n b = -(Math.atan2(b.y, Math.sqrt(b.x * b.x + b.z * b.z)) - Math.atan2(e.y, Math.sqrt(e.x * e.x + e.z * e.z))) / Y;\n -180 > d ? d += 360 : 180 < d && (d -= 360);\n if (c < a && 0 > d || c > a && 0 < d)d = -d;\n return {h: d, v: b}\n }\n\n function k(a, b, c, d) {\n E() ? (a = n(a, b, c, d), ga = !1, ca = a.h, oa = a.v, a = p.hlookat + ca, b = p.vlookat + oa, T += ca, ya += oa, c = p._limits, ia.bouncinglimits && c && (360 > c[0] && (a < c[1] ? (Na = !0, a = .5 * T + .5 * c[1]) : a > c[2] && (Na = !0, a = .5 * T + .5 * c[2])), b < c[4] ? (Na = !0, b = .5 * ya + .5 * c[4]) : b > c[5] && (Na = !0, b = .5 * ya + .5 * c[5])), p.hlookat = a, p.vlookat = b, Xa.updateview(), p.haschanged = !0) : oa = ca = 0\n }\n\n function e(a) {\n (aa.hidden || aa.webkitHidden || aa.mozHidden || aa.msHidden) && w(a)\n }\n\n function w(a) {\n K();\n a && (_[64] == a.type && !1 === a.persisted && (jd = !0), O.down && C(a));\n for (var b in N)1 == N[b] && (m.keycode = b, Ka(_[130]), N[b] = !1);\n m.keycode = 0;\n x()\n }\n\n function x() {\n m.hlookat_moveforce = m.vlookat_moveforce = m.fov_moveforce = 0;\n Oa = sa = ga = !1;\n Ga = za = Qa = La = ca = oa = Ea = Ua = Ra = Bb = 0\n }\n\n function v(a) {\n var c = 0;\n if (1 != ia.disablewheel && (Aa(a), cb = Ta(), E())) {\n a.wheelDelta ? c = a.wheelDelta / -120 : a.detail && (c = a.detail, 0 == b.mac && (c /= 3));\n var d = c * ia.mousefovchange;\n ia.zoomtocursor ? (Ma = !0, u(a), Ha = O.x, va = O.y, 0 < d && 0 == ia.zoomoutcursor && (Ma = !1)) : Ma = !1;\n Oa = !0;\n ha = 0;\n Ga += .001 * d;\n m.wheeldelta_raw = -c;\n m.wheeldelta = 3 * -c;\n Ka(_[100])\n }\n }\n\n function r(a) {\n var c = V.viewerlayer;\n aa.activeElement == c != 0 && L.activekrpanowindow == c.id && (c = a.keyCode, 0 == (a.altKey || a.ctrlKey || a.shiftKey || 32 > c || 111 < c && 124 > c) && Aa(a), m.keycode = c, N[c] = !0, Ka(_[384]), 79 != c || !m.logkey && Ya & 1 || V.togglelog(), l(c, 1), 27 == c && (K(), V.fullscreen && (V.fsbkup || b.opera) && V.setFullscreen(!1)))\n }\n\n function y(a) {\n var b = V.viewerlayer;\n aa.activeElement == b != 0 && L.activekrpanowindow == b.id && (a = a.keyCode, m.keycode = a, N[a] = !1, Ka(_[130]), l(a, 0))\n }\n\n function l(a, b) {\n var c = F(ia.usercontrol);\n if (\"all\" == c || \"keyb\" == c)a = \",\" + a + \",\", 0 <= (\",\" + ia.keycodesin + \",\").indexOf(a) ? m.fov_moveforce = -b : 0 <= (\",\" + ia.keycodesout + \",\").indexOf(a) ? m.fov_moveforce = +b : 0 <= (\",\" + ia.keycodesleft + \",\").indexOf(a) ? m.hlookat_moveforce = -b : 0 <= (\",\" + ia.keycodesright + \",\").indexOf(a) ? m.hlookat_moveforce = +b : 0 <= (\",\" + ia.keycodesup + \",\").indexOf(a) ? m.vlookat_moveforce = ia.keybinvert ? +b : -b : 0 <= (\",\" + ia.keycodesdown + \",\").indexOf(a) && (m.vlookat_moveforce = ia.keybinvert ? -b : +b)\n }\n\n function u(a) {\n cb = Ta();\n a = wa(a);\n O.x = a.x / X;\n O.y = a.y / X;\n O.moved = !0\n }\n\n function h(a) {\n cb = Ta();\n var d, e, g = a.changedTouches ? a.changedTouches : [a];\n e = g.length;\n var h = F(a.type), k = 0 <= h.indexOf(\"start\") || 0 <= h.indexOf(\"down\");\n -99 != fa && k && (ra = !0);\n for (d = 0; d < e; d++) {\n var h = g[d], q = h.pointerId ? h.pointerId : h.identifier;\n -99 == fa && k && (fa = q);\n if (fa == q) {\n e = wa(h);\n O.x = e.x / X;\n O.y = e.y / X;\n O.moved = !0;\n 0 == (Ya & 16) && (0 == b.realDesktop || 10 <= b.ieversion && !f(a)) && O.x > bc / X - 22 && O.y > vb / X - 32 && a.type == ta.touchstart && (U = h.pageY, R(W, ta.touchend, c, !0));\n break\n }\n }\n }\n\n function c(a) {\n a = a.changedTouches ? a.changedTouches : [a];\n ba(W, ta.touchend, c, !0);\n -120 > a[0].pageY - U && V.showlog(!0)\n }\n\n function K() {\n if (Za) {\n try {\n W.removeChild(Za), W.removeChild(bb)\n } catch (a) {\n }\n bb = Za = null\n }\n }\n\n function D(a) {\n if (Za)K(); else {\n Aa(a);\n a.stopPropagation();\n var c = wa(a.changedTouches ? a.changedTouches[0] : a);\n Za = De(c.x, c.y, K, 0 <= F(a.type).indexOf(\"touch\"));\n null != Za && (bb = Ja(), a = bb.style, a.position = _[0], b.androidstock || (a.zIndex = 99999999998, a[ib] = _[20]), a.width = \"100%\", a.height = \"100%\", W.appendChild(bb), W.appendChild(Za))\n }\n }\n\n function z(a, c) {\n var d = a.timeStamp | 0;\n 500 < d && 500 > d - kc ? kc = 0 : (L.activekrpanowindow = V.viewerlayer.id, V.viewerlayer.focus(), cb = Ta(), Aa(a), da.isblocked() || 0 != (a.button | 0) || (K(), 1 != c ? (R(L, _[10], q, !0), R(L, _[4], J, !0), b.topAccess && R(top, _[4], C, !0)) : R(b.topAccess ? top : L, ta.touchend, Ca, !0), d = wa(a), ab = d.x, $a = d.y, kb = a.timeStamp, T = p.hlookat, ya = p.vlookat, xa = 0, O.down = !0, O.up = !1, O.moved = !1, O.downx = O.x = d.x / X, O.downy = O.y = d.y / X, ae.update(), Ka(_[103])))\n }\n\n function q(a) {\n Aa(a);\n var b = wa(a);\n O.x = b.x / X;\n O.y = b.y / X;\n O.moved = !0;\n if (_[27] == F(ia.mousetype)) {\n sa = !0;\n var c = n(ab, $a, b.x, b.y).h;\n xa += c\n } else k(ab, $a, b.x, b.y);\n ab = b.x;\n $a = b.y;\n kb = a.timeStamp;\n (0 === a.buttons || void 0 === a.buttons && 0 === a.which) && J(a, !0)\n }\n\n function J(a, c) {\n cb = Ta();\n Aa(a);\n ba(L, _[10], q, !0);\n ba(L, _[4], J, !0);\n b.topAccess && ba(top, _[4], C, !0);\n ga = !0;\n O.down = !1;\n ae.update();\n 0 == O.up && (O.up = !0, Ka(_[113]), !0 !== c && (0 == O.moved || 5 > Math.abs(O.x - O.downx) && 5 > Math.abs(O.y - O.downy)) && Ka(_[131]))\n }\n\n function C(a) {\n J(a, !0)\n }\n\n function Q(a) {\n 1 == m.control.preventTouchEvents && Aa(a)\n }\n\n function A(a) {\n Ia && (xb++, 2 == xb && (qd = 1), Pb.addPointer(a.pointerId), W.setPointerCapture ? W.setPointerCapture(a.pointerId) : W.msSetPointerCapture && W.msSetPointerCapture(a.pointerId))\n }\n\n function H(a) {\n xb--;\n 0 > xb && (xb = 0);\n return 2 > xb && Da ? (t(a), !0) : !1\n }\n\n function qa(c) {\n kc = c.timeStamp | 0;\n Sa = b.ios ? 100 : 49 > nd ? 200 : 100;\n a(c);\n if (ua) {\n if (0 == m.control.preventTouchEvents)return;\n if (f(c)) {\n c.currentPoint && c.currentPoint.properties && 0 == c.currentPoint.properties.isLeftButtonPressed && (c.button = 0);\n kc = 0;\n z(c, !0);\n return\n }\n A(c)\n }\n L.activekrpanowindow = V.viewerlayer.id;\n cb = Ta();\n 0 == V.__scrollpage_yet && Q(c);\n K();\n if (!(Da || 0 == Va && 1 < ka.length || da.isblocked())) {\n var d = c.changedTouches ? c.changedTouches[0] : c, e = wa(d);\n la = d.pointerId ? d.pointerId : d.identifier;\n ab = e.x;\n $a = e.y;\n kb = c.timeStamp;\n wb = [];\n T = p.hlookat;\n ya = p.vlookat;\n xa = 0;\n O.down = !0;\n O.up = !1;\n O.moved = !1;\n O.downx = O.x = e.x / X;\n O.downy = O.y = e.y / X;\n Fa = {t: kc};\n Ka(_[103])\n }\n }\n\n function ea(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n var b = a.changedTouches ? a.changedTouches : [a], c = b.length, d, e, h;\n for (d = 0; d < c; d++)if (e = b[d], h = e.pointerId ? e.pointerId : e.identifier, void 0 !== h) {\n var t, l;\n l = ka.length;\n for (t = 0; t < l; t++)if (ka[t].id == h) {\n e = wa(e);\n h = e.y / X;\n t = ka[t];\n t.lx = e.x / X;\n t.ly = h;\n break\n }\n }\n }\n if (ua) {\n if (f(a)) {\n O.down && q(a);\n return\n }\n if (1 < xb)return\n }\n if ((b = E()) && 0 == Va && 1 < ka.length) {\n var m;\n l = e = ka[0].lx;\n m = h = ka[0].ly;\n t = ka.length;\n for (d = 1; d < t; d++)b = ka[d].lx, c = ka[d].ly, b < e && (e = b), b > l && (l = b), c < h && (h = c), c > m && (m = c);\n b = l - e;\n c = m - h;\n b = Math.sqrt(b * b + c * c);\n 1 > b && (b = 1);\n 0 == M ? (M = !0, I = b, Z(a)) : B(a, b / I)\n } else cb = Ta(), 0 == V.__scrollpage_yet && Q(a), Da || 0 == b || (b = a.changedTouches ? a.changedTouches[0] : a, la == (b.pointerId ? b.pointerId : b.identifier) && (b = wa(b), _[27] == F(ia.touchtype) ? (sa = !0, c = n(ab, $a, b.x, b.y).h, -180 > c ? c = 360 + c : 180 < c && (c = -360 + c), xa += c) : k(ab, $a, b.x, b.y), ab = b.x, $a = b.y, kb = a.timeStamp, g(ab, $a, kb, jc), -99 == fa && (O.x = b.x / X, O.y = b.y / X), Fa && 16 < O.dd && (Fa = null), Aa(a)))\n }\n\n function Ca(a) {\n d(a);\n fa = -99;\n ra = !1;\n if (ua) {\n ba(b.topAccess ? top : L, ta.touchend, Ca, !0);\n if (H(a))return;\n if (f(a)) {\n J(a);\n return\n }\n }\n M && (t(a), M = !1);\n 0 == V.__scrollpage_yet && Q(a);\n if (Da)la = -99; else {\n var c = a.changedTouches ? a.changedTouches[0] : a;\n if (la == (c.pointerId ? c.pointerId : c.identifier)) {\n la = -99;\n c = wa(c);\n O.x = c.x / X;\n O.y = c.y / X;\n ab = c.x;\n $a = c.y;\n kb = a.timeStamp;\n g(ab, $a, kb, jc);\n if (_[27] != F(ia.touchtype))if (E() && 1 < wb.length) {\n var e = wb[0], h = wb[wb.length - 1], c = (h.t - e.t) / 15;\n 0 < c && (e = n(e.x, e.y, h.x, h.y), ga = !0, ca = e.h / c, oa = e.v / c)\n } else ga = !1, oa = ca = 0;\n O.down = !1;\n 0 == O.up && (O.up = !0, Fa && (c = 52800 / (Math.min(Math.max(ja.currentfps, 10), 60) + 35), 32 > O.dd && (a.timeStamp | 0) - Fa.t > c && D(a)), Ka(_[113]), (0 == O.moved || 5 > Math.abs(O.x - O.downx) && 5 > Math.abs(O.y - O.downy)) && Ka(_[131]));\n Fa = null\n }\n }\n }\n\n function S(a) {\n d(a);\n M = !1;\n fa = la = -99;\n Da = !1;\n xb = 0;\n Fa = null\n }\n\n function Z(a) {\n 0 == m.control.preventTouchEvents || Ia && 2 > xb || (Aa(a), Da = !0, Fa = null, pa = p.fov, la = -99, O.down = !1)\n }\n\n function B(a, b) {\n if (0 != m.control.preventTouchEvents) {\n var c = void 0 !== b ? b : a.scale;\n if (Ia) {\n if (2 > xb)return;\n 0 == Da && Z(a);\n c = qd *= c\n }\n Aa(a);\n cb = Ta();\n if (E()) {\n oa = ca = 0;\n var d = 2 / Y, e = 1 / Math.tan(pa / d), d = Math.atan(1 / (e * c)) * d, e = d > p.fov ? -3 : 3;\n m.wheeldelta = e;\n m.wheeldelta_raw = e / 3;\n m.wheeldelta_touchscale = c;\n 0 == ia.touchzoom && (d = p.fov);\n ia.bouncinglimits && (d < p.fovmin ? (d = G(d), c = G(p.fovmin), Ga = .5 * -(d - c), Oa = !0, ha = 1, d += Ga, Ga = 1E-9, d = Ba(d)) : d > p.fovmax && (d = G(d), c = G(p.fovmax), Ga = .75 * -(d - c), Oa = !0, ha = 1, d += Ga, Ga = 1E-9, d = Ba(d)));\n if (ia.zoomtocursor && (0 < e || 1 == ia.zoomoutcursor)) {\n if (e = ka.length, 0 < e) {\n Ma = !0;\n for (c = va = Ha = 0; c < e; c++) {\n var f = ka[c];\n Ha += f.lx;\n va += f.ly\n }\n Ha /= e;\n va /= e;\n p.updateView();\n e = p.screentosphere(Ha, va);\n p.fov = d;\n p.updateView();\n c = p.screentosphere(Ha, va);\n d = p.hlookat + (e.x - c.x);\n e = p.vlookat + (e.y - c.y);\n if (c = p._limits)360 > c[0] && (d < c[1] ? d = c[1] : d > c[2] && (d = c[2])), e < c[4] ? e = c[4] : e > c[5] && (e = c[5]);\n p.hlookat = d;\n p.vlookat = e\n }\n } else p.fov = d, p.updateView();\n Ka(_[100]);\n p.haschanged = !0\n }\n }\n }\n\n function t(a) {\n 0 != m.control.preventTouchEvents && (Da && (Da = !1), ra = !1, ka = [], Aa(a))\n }\n\n function G(a) {\n return pb * Math.log(1 / Math.tan(.5 * a * Y))\n }\n\n function Ba(a) {\n return 2 * Math.atan(1 / Math.exp(a / pb)) / Y\n }\n\n var P = Pa;\n P.mouse = !1;\n P.touch = !1;\n var Fa = null, wa = null, ta = null, W = null, N = [], Da = !1, U = 0, Va = !1, M = !1, I = 1, pa = 90, la = -99, T = 0, ya = 0, ab = 0, $a = 0, kb = 0, wb = [], fa = -99, ra = !1, Sa = 100, ka = [], ua = !1, Ia = !1, Pb = null, xb = 0, qd = 1, ga = !1, ca = 0, oa = 0, sa = !1, Qa = 0, La = 0, za = 0, xa = 0, Oa = !1, Ga = 0, ha = 0, Ma = !1, Ha = 0, va = 0, Ea = 0, Ua = 0, Na = !1, Ra = 0, Bb = 0, Za = null, bb = null;\n P.registerControls = function (a) {\n W = a;\n ta = b.browser.events;\n wa = V.getMousePos;\n b.ie && (Ia = (ua = jb.msPointerEnabled || jb.pointerEnabled) && (1 < jb.msMaxTouchPoints || 1 < jb.maxTouchPoints));\n Va = Ia || 0 == b.simulator && b.ios || void 0 !== aa.documentElement.ongesturestart;\n if (b.chrome || b.android)Va = !1;\n a = !(0 == b.simulator && b.ios || b.android || 10 <= b.ieversion && b.touchdeviceNS);\n var c = b.touchdeviceNS;\n c && (b.mobile || b.tablet) && 0 == b.simulator && (a = !1);\n P.mouse = a;\n P.touch = c;\n ta.mouse = a;\n ta.touch = c;\n R(aa, _[126], r, !1);\n R(aa, \"keyup\", y, !1);\n R(b.topAccess ? top : L, _[37], w, !0);\n R(b.topAccess ? top : L, _[64], w, !0);\n R(aa, _[52], e);\n R(aa, _[79], e);\n R(aa, _[81], e);\n R(aa, _[82], e);\n if (a || ua)R(W, _[95], v, !1), R(W, _[108], v, !1);\n (a || ua) && R(L, _[10], u, !0);\n a && R(W, _[7], z, !1);\n (a && b.realDesktop || b.ie) && R(W, _[37], D, !0);\n c && (R(W, ta.touchstart, h, !0), R(W, ta.touchmove, h, !0), R(W, ta.touchstart, qa, !1), R(W, ta.touchmove, ea, !0), R(W, ta.touchend, Ca, !0), R(W, ta.touchcancel, S, !0), Va && (R(W, ta.gesturestart, Z, !1), R(W, ta.gesturechange, B, !1), R(W, ta.gestureend, t, !0), Ia && (R(W, _[93], t, !0), Pb = new MSGesture, Pb.target = W)))\n };\n P.domUpdate = function () {\n if (Pb) {\n var a = W;\n xb = 0;\n P.unregister();\n P.registerControls(a)\n }\n };\n P.unregister = function () {\n Pb && (Pb = Pb.target = null);\n ba(aa, _[126], r, !1);\n ba(aa, \"keyup\", y, !1);\n ba(b.topAccess ? top : L, _[37], w, !0);\n ba(b.topAccess ? top : L, _[64], w, !0);\n b.topAccess && ba(top, _[4], C, !0);\n ba(aa, _[52], e);\n ba(aa, _[79], e);\n ba(aa, _[81], e);\n ba(aa, _[82], e);\n ba(L, _[10], u, !0);\n ba(L, _[10], q, !0);\n ba(L, _[4], J, !0);\n ba(W, _[95], v, !1);\n ba(W, _[108], v, !1);\n ba(W, _[7], z, !1);\n ba(W, _[37], D, !1);\n ba(W, ta.touchstart, h, !0);\n ba(W, ta.touchmove, h, !0);\n ba(W, ta.touchstart, qa, !1);\n ba(W, ta.touchmove, ea, !0);\n ba(W, ta.touchend, Ca, !0);\n ba(W, ta.touchcancel, S, !0);\n ba(W, ta.gesturestart, Z, !1);\n ba(W, ta.gesturechange, B, !1);\n ba(W, ta.gestureend, t, !0);\n ba(W, _[93], t, !0);\n wa = ta = W = null\n };\n P.handleFrictions = function () {\n var a, b = a = !1, c = m.hlookat_moveforce, d = m.vlookat_moveforce, e = m.fov_moveforce;\n if (0 != e) {\n var f = ia.keybfovchange;\n Ma = !1;\n Oa = !0;\n ha = 0;\n Ga += f * e * .001\n }\n if (0 != c || 0 != d || 0 != Ea || 0 != Ua) {\n var g = ia.keybfriction, b = ia.keybspeed, e = p.hlookat, f = p.vlookat, h = ia.keybaccelerate * Math.tan(Math.min(.5 * Number(p.fov), 45) * Y);\n Ea += c * h;\n c = Ua += d * h;\n d = Ea;\n Ea *= g;\n Ua *= g;\n g = Math.sqrt(c * c + d * d);\n 0 < g ? (c /= g, d /= g) : d = c = 0;\n g > b && (g = b);\n d *= g;\n e = 180 >= (Math.floor(f) % 360 + 450) % 360 ? e + d : e - d;\n f += c * g;\n p.hlookat = e;\n p.vlookat = f;\n g < .05 * h && (Ua = Ea = 0);\n b = !0\n }\n a |= b;\n if (ga)c = Math.pow(ia.touchfriction, .92), ca *= c, oa *= c, c = Math.sqrt(oa * oa + ca * ca), d = Math.min(.04 * uc / p.r_zoom, .5), 0 != c && (p.hlookat += ca, p.vlookat += oa), c < d && (ga = !1, oa = ca = 0), a |= 1; else if (sa) {\n var c = O, d = za, b = Qa, e = La, g = .025 * ia.mouseaccelerate, k = ia.mousespeed, h = ia.mousefriction, f = !1;\n if (E()) {\n if (c.down && (c.x != c.downx || c.y != c.downy)) {\n var q = n(c.downx, c.downy, c.x, c.y);\n q.h = xa;\n b = d * b - q.h * g;\n e = d * e - q.v * g;\n d = Math.sqrt(b * b + e * e);\n 0 < d && (b /= d, e /= d, d > k && (d = k))\n }\n g = p.hlookat;\n k = p.vlookat;\n k += d * e * ia.mouseyfriction;\n p.hlookat = g + d * b;\n p.vlookat = k;\n d *= h;\n h = Math.min(.04 * uc / p.r_zoom, .5);\n 0 == c.down && d < h && (f = !0)\n } else f = !0;\n f && (sa = !1, xa = e = b = d = 0);\n za = d;\n Qa = b;\n La = e;\n a |= 1\n }\n if (Oa) {\n a:{\n d = c = p.fov;\n b = Ga;\n e = !1;\n if (0 < Math.abs(b)) {\n h = b;\n g = ia.fovspeed;\n e = p.fovmin;\n f = p.fovmax;\n b *= ia.fovfriction;\n Math.abs(h) > g && (h = g * (h / Math.abs(h)));\n c = G(c);\n c = Ba(c + h);\n if (ia.bouncinglimits && 0 < ha)if (0 == Da)h = G(c), c < e ? (b = G(e), b = .25 * -(h - b)) : c > f && (b = G(f), b = .25 * -(h - b)); else {\n c = void 0;\n break a\n } else c < e && (c = e, b = 0), c > f && (c = f, b = 0);\n p.fov = c;\n Ga = b;\n e = !0;\n Ma && (p.fov = d, p.updateView(), d = p.screentosphere(Ha, va), p.fov = c, p.updateView(), c = p.screentosphere(Ha, va), b = p.vlookat + (d.y - c.y), p.hlookat += d.x - c.x, p.vlookat = b)\n }\n 1E-5 > Math.abs(Ga) && (ha = Ga = 0, Oa = !1);\n c = e\n }\n a |= c\n }\n Na && (c = !1, O.down ? c = !1 : (d = p.hlookat, b = p.vlookat, d += Ra, b += Bb, p.hlookat = d, p.vlookat = b, c = !0, Ra *= .95, Bb *= .95, e = p._limits, ia.bouncinglimits && e && (360 > e[0] && (d < e[1] ? Ra = .15 * -(d - e[1]) : d > e[2] && (Ra = .15 * -(d - e[2]))), b < e[4] ? Bb = .15 * -(b - e[4]) : b > e[5] && (Bb = .15 * -(b - e[5]))), d = .15 * Math.min(.04 * uc / p.r_zoom, .5), Math.sqrt(Ra * Ra + Bb * Bb) < d && (Ra = Bb = 0, Na = !1)), a |= c);\n return a\n };\n P.stopFrictions = function (a) {\n 0 == (0 | a) && (a = 3);\n a & 1 && (Qa = ca = 0);\n a & 2 && (La = oa = 0);\n a & 4 && (x(), O.down = !1)\n };\n P.isMultiTouch = function () {\n return Da || M || 1 < xb || ra\n };\n P.isBouncing = function () {\n return 0 < ha || Na\n };\n P.focusLoss = w;\n P.trackTouch = function (b) {\n if (0 == Va || Ia) {\n var c = b.type;\n c == ta.touchstart ? ua ? A(b) : a(b) : c == ta.touchend && (ua ? H(b) : d(b))\n }\n };\n var pb = -.1\n })();\n var fa = null, M = null, Cb = !1, $c = !1, Db = 0, Wa = !1, ad = !1, Eb = -1, Xa = {};\n (function () {\n function a(a, b) {\n if (!0 !== b)p.haschanged = !0; else {\n !0 !== a && (Kb = Ta());\n var c = m.webVR;\n c && c.enabled && c.updateview();\n Ka(_[299]);\n p.updateView();\n fa && Oa.renderpano(fa, 2);\n M && Oa.renderpano(M, 1);\n z && (z = Oa.rendersnapshot(z, M));\n ob(!0);\n Ka(_[278])\n }\n }\n\n function d(a, b, c, d, e) {\n h.count++;\n h.id = h.count;\n if (f()) {\n da.busy = !0;\n m.xml.url = \"\";\n m.xml.content = a;\n var g = (new DOMParser).parseFromString(a, _[25]);\n T.resolvexmlincludes(g, function () {\n g = T.xmlDoc;\n n(g, b, c, d, e)\n })\n }\n }\n\n function E(a) {\n var b = 0 != (c & 64) && 0 == (c & 256), d;\n !0 === a && (c = b = 0);\n if (0 == (c & 4)) {\n var e = xa.getArray();\n a = e.length;\n for (d = 0; d < a; d++) {\n var g = e[d];\n !g || 0 != b && 0 != g.keep || (g.sprite && (g.visible = !1, g.parent = null, V.pluginlayer.removeChild(g.sprite)), g.destroy(), xa.removeItem(d), d--, a--)\n }\n }\n if (0 == (c & 128))for (e = Ua.getArray(), a = e.length, d = 0; d < a; d++)if ((g = e[d]) && (0 == b || 0 == g.keep)) {\n if (g.sprite) {\n g.visible = !1;\n g.parent = null;\n try {\n V.hotspotlayer.removeChild(g.sprite)\n } catch (f) {\n }\n if (g._poly) {\n try {\n V.svglayer.removeChild(g._poly)\n } catch (h) {\n }\n g._poly.kobject = null;\n g._poly = null\n }\n }\n g.destroy();\n Ua.removeItem(d);\n d--;\n a--\n }\n b = Yb.getArray();\n a = b.length;\n for (d = 0; d < a; d++)(e = b[d]) && 0 == pa(e.keep) && (Yb.removeItem(d), d--, a--)\n }\n\n function f() {\n return 1 < h.count && h.removeid != h.id && (h.removeid = h.id, Ka(_[301], !0), h.removeid != h.id) ? !1 : !0\n }\n\n function g(a) {\n var b, c, d = \"\";\n a = Gc(a);\n b = a.lastIndexOf(\"/\");\n c = a.lastIndexOf(\"\\\\\");\n c > b && (b = c);\n 0 <= b && (d = a.slice(0, b + 1));\n return d\n }\n\n function n(a, d, e, g, f) {\n za.currentmovingspeed = 0;\n K = !1;\n c = M ? 64 : 0;\n e && (e = F(e), 0 <= e.indexOf(_[323]) && (c |= 4), 0 <= e.indexOf(_[306]) && (c |= 128), 0 <= e.indexOf(_[391]) && (c |= 16), 0 <= e.indexOf(_[418]) && (c |= 32), 0 <= e.indexOf(\"merge\") && (c |= 16448), 0 <= e.indexOf(_[354]) && (c |= 256), 0 <= e.indexOf(_[412]) && (c |= 4), 0 <= e.indexOf(_[459]) && (c |= 36), 0 <= e.indexOf(_[400]) && (K = !0, c |= 65536), 0 <= e.indexOf(_[310]) && I(_[102], 0), 0 <= e.indexOf(_[360]) && (c |= 1056));\n 0 == K && (Db = 0, g && (g = F(g), e = g.indexOf(_[490]), 0 <= e && (Db = parseFloat(g.slice(e + 6)), isNaN(Db) || 0 > Db)) && (Db = 2), M && (e = 0 != (c & 1024), b.webgl ? (e && (fa || z) && (fa && (z = Oa.snapshot(z, fa)), e = !1), fa && (fa.destroy(), fa = null), 0 == e ? (M.stop(), z = Oa.snapshot(z, M), M.destroy(), M = null) : (M.suspended = !0, fa = M, M = null, Oa.renderpano(fa, 2)), Oa.setblendmode(g), Eb = -1, Wa = !1) : (0 == Wa ? (fa && (fa.destroy(), fa = null), fa = M, 0 == e ? fa.stop() : fa.suspended = !0, M = null) : (g = (Ta() - Eb) / 1E3 / Db, g = y(g), .5 < g ? M && (M.destroy(), M = null) : (fa && (fa.destroy(), fa = null), fa = M, 0 == e ? fa.stop() : fa.suspended = !0, M = null), Wa = !1), fa && fa.stopped && Oa.renderpano(fa, 2))), c & 32 && (u[0] = p.hlookat, u[1] = p.vlookat, u[2] = p.camroll, u[3] = p.fov, u[4] = p.fovtype, u[5] = p.fovmin, u[6] = p.fovmax, u[7] = p.maxpixelzoom, u[8] = p.fisheye, u[9] = p.fisheyefovlink, u[10] = p.stereographic, u[12] = p.pannini, u[13] = p.architectural, u[14] = p.architecturalonlymiddle), 0 == (c & 16384) && p.defaults(), p.limitview = \"auto\", p.hlookatmin = Number.NaN, p.hlookatmax = Number.NaN, p.vlookatmin = Number.NaN, p.vlookatmax = Number.NaN, m.preview && delete m.preview, m.image && delete m.image, m.onstart = null, N = m.image = {}, N.type = null, N.multires = !1, N.multiresthreshold = .025, N.cubelabels = \"l|f|r|b|u|d\", N.stereo = !1, N.stereoformat = \"TB\", N.stereolabels = \"1|2\", N.tiled = !1, N.tilesize = 0, N.tiledimagewidth = 0, N.tiledimageheight = 0, N.baseindex = 1, N.level = new bb, N.hfov = 0, N.vfov = 0, N.voffset = 0, N.hres = 0, N.vres = 0, N.haschanged = !1, va(N, \"frame\", 1), N.frames = 1);\n E();\n if (a && a.documentElement && _[22] == a.documentElement.nodeName)Ea(a.baseURI + _[21]); else {\n T.parsexml(a.childNodes, null, c);\n if (null != m._loadpanoscene_name) {\n var h = U(_[72] + m._loadpanoscene_name + \"]\");\n h && (g = _[124] + h.content + _[117], m.xml.url = \"\", m.xml.scene = m._loadpanoscene_name, m.xml.content = g, m.onstart = null, g = (new DOMParser).parseFromString(g, _[25]), T.resolvexmlincludes(g, function () {\n (a = T.xmlDoc) && a.documentElement && _[22] == a.documentElement.nodeName ? Ea(a.baseURI + _[21]) : (T.parsexml(a.childNodes, null, c), f = h.onstart)\n }));\n m._loadpanoscene_name = null\n }\n m.xmlversion = m.version;\n m.version = m.buildversion;\n D = f;\n Wd(d);\n k()\n }\n }\n\n function k() {\n var a, b, d = m.plugin.getArray();\n m.hotspot.getArray();\n var g;\n b = d.length;\n for (a = 0; a < b; a++) {\n var f = d[a];\n if (f && f.layer && f.layer.isArray) {\n var k = f.layer.getArray();\n g = k.length;\n for (b = 0; b < g; b++) {\n var n = k[b];\n n && (n.parent = f.name, n.keep = f.keep, xa.createItem(n.name, n))\n }\n f.plugin = null;\n f.layer = null;\n a--;\n b = d.length\n }\n }\n if (0 != e(!0)) {\n if (0 == K) {\n c & 32 && (p.hlookat = u[0], p.vlookat = u[1], p.camroll = u[2], p.fov = u[3], p.fovtype = u[4], p.fovmin = u[5], p.fovmax = u[6], p.maxpixelzoom = u[7], p.fisheye = u[8], p.fisheyefovlink = u[9], p.stereographic = u[10], p.pannini = u[12], p.architectural = u[13], p.architecturalonlymiddle = u[14]);\n Xa.updateview();\n fa && fa.removemainpano();\n for (a = 0; 4100 > a; a++);\n void 0 !== ja.hardwarelimit && (Lb = parseFloat(ja.hardwarelimit), isNaN(Lb) && (Lb = 0));\n void 0 !== ja.usedesktopimages && (ce = pa(ja.usedesktopimages));\n Cb = !0;\n sc.progress = 0;\n M = Oa.createPano(N);\n M.addToLayer(V.panolayer);\n 0 <= Db && (ad = !0, M.setblend(0), ub = !0, qc = 0)\n }\n da.busy = !1;\n da.actions_autorun(_[466], !0);\n a = m.onstart;\n D && (a = D, D = null);\n d = h.id;\n da.callaction(a, null, !0);\n if (d == h.id && (da.actions_autorun(_[467], !1), Ka(_[287]), m.xml && m.xml.scene && Ka(_[369]), d == h.id)) {\n 0 == K && x();\n a = Ua.getArray();\n d = a.length;\n for (f = 0; f < d; f++)(b = a[f]) && null == b.sprite && (b.create(), V.hotspotlayer.appendChild(b.sprite));\n e();\n Ka(_[63]);\n Xa.updateview();\n da.processactions()\n }\n }\n }\n\n function e(a) {\n var b = xa.getArray(), c = b.length, d, e = !0;\n for (d = 0; d < c; d++) {\n var g = b[d];\n if (g) {\n var f = !1;\n 1 == a ? 1 == g.preload && _[15] != g.type && 0 == g.loaded && (g.onloaded = k, g.altonloaded = null, f = !0, e = !1) : (1 == g.preload && (g.preload = !1, g.onloaded = null), f = !0);\n f && null == g.sprite && (g.create(), null == g._parent && V.pluginlayer.appendChild(g.sprite))\n }\n }\n return e\n }\n\n function w() {\n Ka(_[216])\n }\n\n function x() {\n var c = b.desktop || ce, d = !1, e = N.type, g = parseFloat(N.hfov), f = parseFloat(N.vfov), h = parseFloat(N.voffset);\n isNaN(g) && (g = 0);\n isNaN(f) && (f = 0);\n isNaN(h) && (h = 0);\n var k = !!(N.multires && N.level && 0 < N.level.count), n = !!N.mobile, l = !!N.tablet;\n c || 0 != k || !n && !l || (e = \"cube\", d = !0);\n if (null == e)if (N.left || N.cube)e = \"cube\"; else if (N.cubestrip)e = _[39]; else if (N.sphere)e = _[42]; else if (N.cylinder)e = _[24]; else if (N.flat)e = \"flat\"; else {\n if (n || l)e = \"cube\", d = !0\n } else e = F(e);\n var m = _[42] == e || _[24] == e, p = 0 < g && 1 >= g && 45 >= f && m || \"flat\" == e, u = \"cube\" == e || _[39] == e || null == e && 0 == m && 0 == p, c = !1, t = null;\n if (u)g = 360, f = 180; else if (m || p)if (t = ra.parsePath(U(_[487] + e + \".url\"))) {\n var G = 0;\n 0 <= (G = F(t).indexOf(_[478])) && (m = c = !0, k = p = !1, b.panovideosupport && (t = t.slice(G + 7)))\n }\n N.type = e;\n N.hfov = g;\n N.vfov = f;\n N.voffset = h;\n h = (\"\" + N.cubelabels).split(\"|\");\n 6 == h.length && (M.cubelabels = h);\n M.stereo = b.webgl ? N.stereo : !1;\n M.stereoformat = \"sbs\" == F(N.stereoformat) ? 0 : 1;\n h = (\"\" + N.stereolabels).split(\"|\");\n 2 == h.length && (M.stereolabels = h);\n G = F(U(_[294]));\n if (h = U(_[322])) {\n h = ra.parsePath(h);\n if (_[39] == G || \"null\" == G && u) {\n G = U(_[211]);\n if (null != G) {\n var G = F(G), x = [0, 1, 2, 3, 4, 5];\n x[G.indexOf(\"l\")] = 0;\n x[G.indexOf(\"f\")] = 1;\n x[G.indexOf(\"r\")] = 2;\n x[G.indexOf(\"b\")] = 3;\n x[G.indexOf(\"u\")] = 4;\n x[G.indexOf(\"d\")] = 5;\n G = x\n }\n M.addCubestripPreview(h, G)\n } else(\"flat\" == G || (\"null\" == G || _[42] == G || _[24] == G) && p) && M.addFlatLevel(h, g, f, 0, 0, 0, N.baseindex, !0);\n a(!1, !0)\n } else if (0 == G.indexOf(\"grid\")) {\n if (h = Gb(G))if (h = h[0], \"grid\" == h.cmd) {\n var P = h.args, h = void 0 == P[1] ? 64 : parseInt(P[1]), G = void 0 == P[2] ? 64 : parseInt(P[2]), x = void 0 == P[3] ? 512 : parseInt(P[3]), z = void 0 == P[4] ? 6710886 : parseInt(P[4]), y = void 0 == P[5] ? 2236962 : parseInt(P[5]), P = void 0 == P[6] ? void 0 == P[4] ? 16777215 : z : parseInt(P[6]), z = ca(z), y = ca(y), P = ca(P);\n M.addGridPreview(x, h, G, y, z, P);\n a(!1, !0);\n w()\n }\n } else w();\n h = !1;\n G = b.androidstock && !b.webgl;\n if (p || u) {\n if (d || u && G)l ? h = r(_[311]) : n && (h = r(_[313]));\n if (0 == h)if (\"cube\" == e) {\n if (k)if (n = N.level.getArray(), d = n.length, n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), 0 == b.multiressupport || G) {\n f = b.iphone && b.retina || b.tablet || b.android ? 1100 : b.iphone ? 512 : 2560;\n 0 < Lb && (f = Lb + 256);\n for (k = d - 1; 0 <= k && !(g = n[k].tiledimagewidth, g <= f); k--);\n 0 <= k && (h = r(_[54] + k + \"]\", !0))\n } else for (n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), k = 0; k < d; k++)if (n = _[54] + k + \"]\", l = U(n), f = v(n))n = l.tilesize ? l.tilesize : N.tilesize, g = parseInt(l.tiledimagewidth, 10), 0 < n && 0 < g && (M.addCubeLevel(f, g, n, N.baseindex), h = !0);\n 0 == h && (h = r(_[75]))\n } else if (_[39] == e && N.cubestrip)M.addCubestripPano(ra.parsePath(\"\" + N.cubestrip.url)), h = !0; else if ((_[42] == e || _[24] == e) && 1 >= g && 45 >= f || \"flat\" == e) {\n if (b.multiressupport && k)for (n = N.level.getArray(), d = n.length, n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), k = 0; k < d; k++)if (n = _[54] + k + \"]\", l = U(n), c = U(n + \".\" + e + \".url\"), c = ra.parsePath(c))n = l.tilesize ? l.tilesize : N.tilesize, t = parseInt(l.tiledimagewidth, 10), l = parseInt(l.tiledimageheight, 10), 0 < n && 0 < t && 0 < l && (M.addFlatLevel(c, g, f, t, l, n, N.baseindex, !1), h = !0);\n 0 == h && (d = N[e]) && d.url && (M.addFlatLevel(ra.parsePath(\"\" + d.url), g, f, 0, 0, 0, N.baseindex, !1), h = !0)\n }\n } else m && 0 == k && b.webgl && t && ((g = [Number(N.hfov), Number(N.vfov), Number(N.voffset)], c) ? b.panovideosupport && (f = xa.getItem(t)) && (f.renderToBitmap = !0, f.visible = !1, M.addRoundPano(e, null, g, f), h = !0) : (M.addRoundPano(e, t, g), h = !0));\n h && (Cb = $c = !0);\n M.finalize();\n 0 == h && null != e && la(2, _[171]);\n a(!1, !0)\n }\n\n function v(a) {\n var b = _[174].split(\" \"), c = Array(6), d, e;\n if (d = U(a + \".\" + b[6] + \".url\")) {\n if (d = ra.parsePath(d))for (e = 0; 6 > e; e++)c[e] = d.split(\"%s\").join(M.cubelabels[e])\n } else for (e = 0; 6 > e; e++)if (d = ra.parsePath(U(a + \".\" + b[e] + \".url\")))c[e] = d; else return null;\n return c\n }\n\n function r(a, b) {\n var c = v(a);\n if (!c)return !1;\n if (b) {\n var d = U(a), e = d.tilesize ? d.tilesize : N.tilesize, d = parseInt(d.tiledimagewidth, 10);\n M.addCubeLevel(c, d, e, N.baseindex)\n } else M.addCubeLevel(c, 0, 0, 1);\n return !0\n }\n\n function y(a) {\n 1 < a && (a = 1);\n 0 == b.webgl && (a *= a * a);\n a = 1 - a;\n 0 > a && (a = 0);\n return a\n }\n\n var l = Xa;\n l.loadpano = function (a, b, c, e, k) {\n h.count++;\n h.id = h.count;\n if (f())if (0 > F(c).indexOf(_[358]) && I(_[102], 0), \"null\" == F(a) && (a = null), m.xml.content = null, m.xml.scene = null, a) {\n da.busy = !0;\n null == ra.firstxmlpath ? ra.firstxmlpath = g(a) : a = ra.parsePath(a, !0);\n ra.currentxmlpath = g(a);\n m.xml.url = a;\n var l = h.id;\n ra.loadxml(a, function (d, g) {\n if (l == h.id) {\n if (d && d.childNodes) {\n var f = d.childNodes, m = f.length;\n 0 == m ? d = null : 2 == m && f[1] && _[22] == f[1].nodeName && (d = null)\n }\n d ? (d = T.resolvexmlencryption(d, a), null != d && T.resolvexmlincludes(d, function () {\n d = T.xmlDoc;\n n(d, b, c, e, k)\n })) : 200 == g ? Ea(a + _[21]) : Ea(a + _[181])\n }\n })\n } else m.xml.url = \"\", d(_[219], b, c, e, k)\n };\n l.loadxml = d;\n l.loadxmldoc = n;\n l.updateview = a;\n l.updateplugins = function (a) {\n var b = xa.getArray(), c = b.length, d;\n for (d = 0; d < c; d++) {\n var e = b[d];\n e && (a || e.poschanged) && e.loaded && e.updatepos()\n }\n };\n l.checkautorotate = function (a) {\n var b = Ta();\n a && (Kb = b);\n Kb > cb && (cb = Kb);\n a = b - cb;\n a > 1E3 * m.idletime && cb != Hd && (Hd = cb, Ka(_[492]));\n a = b - Kb;\n if (za.enabled && a > 1E3 * za.waittime) {\n cb = Kb = 0;\n var c = p._hlookat;\n a = p._vlookat;\n var b = p._fov, d = Math.tan(Math.min(.5 * b, 45) * Y), e = za.accel, g = za.speed, f = za.currentmovingspeed, e = e / 60, g = g / 60;\n 0 < g ? (f += e * e, f > g && (f = g)) : (f -= e * e, f < g && (f = g));\n za.currentmovingspeed = f;\n c += d * f;\n d = Math.abs(d * f);\n p._hlookat = c;\n c = parseFloat(za.horizon);\n isNaN(c) || (c = (c - a) / 60, e = Math.abs(c), 0 < e && (e > d && (c = d * c / e), a += c, p._vlookat = a));\n a = parseFloat(za.tofov);\n isNaN(a) || (a < p.fovmin && (a = p.fovmin), a > p.fovmax && (a = p.fovmax), a = (a - b) / 60, c = Math.abs(a), 0 < c && (c > d && (a = d * a / c), b += a, p._fov = b));\n return !0\n }\n za.currentmovingspeed = 0;\n return !1\n };\n l.previewdone = w;\n l.havepanosize = function (a) {\n M && M.id == a.id && (N.hfov = a.hfov, N.vfov = a.vfov, N.hres = a.hres, N.vres = a.vres, Ka(_[405]), p.haschanged = !0)\n };\n l.removeelements = E;\n l.isLoading = function () {\n return Cb\n };\n l.isBlending = function () {\n return ad || Wa\n };\n var u = [], h = {count: 0, id: 0}, c = 0, K = !1, D = null, z = null;\n l.checkHovering = function () {\n if (1 != (jc & 1) && !da.blocked) {\n var a = [xa.getArray(), Ua.getArray()], b, c, d, e, g;\n for (g = 0; 2 > g; g++)for (b = a[g], d = b.length, e = 0; e < d; e++)(c = b[e]) && c._visible && c.hovering && c.onhover && da.callaction(c.onhover, c)\n }\n };\n l.handleloading = function () {\n var a = !1;\n 0 == Wa && (fa && (a |= fa.doloading()), M && (a |= M.doloading()));\n Cb = M && M.isloading();\n var b = Oa.handleloading();\n $c && 1 != Cb && ($c = !1, Ka(_[265]));\n b & 1 && (Cb = !0);\n b & 2 && (a = !0);\n M && (fa || z) && (0 == Wa ? M.previewcheck() && (Wa = !0, Eb = -1) : (a = 0, 0 <= Db && (-1 == Eb ? Eb = Ta() : (a = (Ta() - Eb) / 1E3, a = 0 < Db ? a / Db : 1), a = y(a), ad = !0, M.setblend(1 - a), ub = !0, qc = 1 - a), 0 == a && (Db = 0, fa && (fa.destroy(), fa = null), ad = Wa = !1), a = !0));\n return a\n }\n })();\n var Oa = {};\n (function () {\n var a, d;\n\n function E(a) {\n if (!1 === document.hidden && ka) {\n var b = parseInt(ka.style.height);\n 0 < b && (ka.style.height = b + 1 + \"px\", setTimeout(function () {\n ka && parseInt(ka.style.height) == b + 1 && (ka.style.height = b + \"px\")\n }, 100))\n }\n }\n\n function f(a) {\n return \"#ifdef GL_ES\\n#ifdef GL_FRAGMENT_PRECISION_HIGH\\nprecision highp float;\\n#else\\nprecision mediump float;\\n#endif\\n#endif\\nuniform float aa;uniform sampler2D sm;varying vec2 tt;void main(){vec4 c=texture2D(sm,vec2(tt.s,tt.t)\" + (a ? \",-1.0\" : \"\") + \");gl_FragColor=vec4(c.rgb,c.a*aa);}\"\n }\n\n function g(a, b, c) {\n var d = ua;\n null == a && (a = \"attribute vec2 vx;varying vec2 tx;void main(){gl_Position=vec4(vx.x*2.0-1.0,-1.0+vx.y*2.0,0.0,1.0);tx=vx;}\");\n var e = d.createShader(d.VERTEX_SHADER);\n d.shaderSource(e, a);\n d.compileShader(e);\n if (!d.getShaderParameter(e, d.COMPILE_STATUS))return la(0, _[185] + d.getShaderInfoLog(e)), null;\n a = d.createShader(d.FRAGMENT_SHADER);\n d.shaderSource(a, b);\n d.compileShader(a);\n if (!d.getShaderParameter(a, d.COMPILE_STATUS))return la(0, _[186] + d.getShaderInfoLog(a)), null;\n b = d.createProgram();\n d.attachShader(b, e);\n d.attachShader(b, a);\n d.linkProgram(b);\n if (!d.getProgramParameter(b, d.LINK_STATUS))return la(0, _[162]), null;\n d.useProgram(b);\n d.uniform1i(d.getUniformLocation(b, \"sm\"), 0);\n e = d.getAttribLocation(b, \"vx\");\n d.enableVertexAttribArray(e);\n e = {prg: b, vxp: e};\n c = c.split(\",\");\n var g, f;\n g = c.length;\n for (a = 0; a < g; a++)f = c[a], e[f] = d.getUniformLocation(b, f);\n return e\n }\n\n function n(a) {\n var b = ua;\n a ? (ob = Cb, Cb = a) : (a = Cb = ob, ob = null);\n a && b.useProgram(a)\n }\n\n function k() {\n var c = ua;\n try {\n var e = c.createBuffer();\n c.bindBuffer(lb, e);\n c.bufferData(lb, new Float32Array([0, 0, 0, 1, 1, 1, 1, 0]), wc);\n var h = c.createBuffer();\n c.bindBuffer(Qb, h);\n c.bufferData(Qb, new Uint16Array([0, 1, 2, 0, 2, 3]), wc);\n a = e;\n d = h;\n var k;\n for (k = 0; 6 > k; k++) {\n var e = _[159], t = h = \"\", l = \"\";\n 0 == k ? t = _[168] : 1 == k ? (l = \"cc\", h = _[88], t = _[158]) : 2 == k ? (l = \"cc\", h = _[88], t = _[153]) : 3 == k ? (l = \"ct,zf\", h = _[176], t = _[152]) : 4 == k ? (l = \"fp,bl\", h = _[175], t = \"float t=(tx.x*fp.x+tx.y*fp.y+fp.z)*(1.0-2.0*bl)+bl;gl_FragColor=vec4(texture2D(sm,tx).rgb,smoothstep(t-bl,t+bl,aa));\") : 5 == k && (l = _[439], h = _[163], t = \"float t=(1.0-sqrt(2.0)*sqrt((ap.x*(tx.x-0.5)*(tx.x-0.5)+ap.y*(tx.y-0.5)*(tx.y-0.5))/(0.5*(ap.x+ap.y))))*(1.0-2.0*bl)+bl;gl_FragColor=vec4(texture2D(sm,(tx-vec2(0.5,0.5))*mix(1.0,aa,zf)+vec2(0.5,0.5)).rgb,smoothstep(t-bl,t+bl,aa));\");\n e = _[187] + e + h + \"void main(){\" + t + \"}\";\n ha[k] = g(null, e, \"aa,\" + l);\n if (null == ha[k])return !1\n }\n var m = c.createShader(c.VERTEX_SHADER);\n c.shaderSource(m, \"attribute vec3 vx;attribute vec2 tx;uniform float sh;uniform float ch;uniform mat4 mx;uniform mat4 ot;uniform mat3 tm;varying vec2 tt;void main(){vec3 vr=vec3(ot*vec4(vx,1));vec3 vs=1000.0*normalize(vr);vec2 c2=vec2(vr.x,vr.z);c2=c2/max(1.0,length(c2));vec3 vc=1000.0*vec3(c2.x,clamp(vr.y*inversesqrt(1.0+vr.x*vr.x+vr.z*vr.z),-30.0,+30.0),c2.y);vec3 vv=vr*(1.0-sh)+sh*(vs*(1.0-ch)+vc*ch);gl_Position=mx*vec4(vv,1);tt=(vec3(tx,1)*tm).xy;}\");\n c.compileShader(m);\n if (!c.getShaderParameter(m, c.COMPILE_STATUS))return !1;\n var q = c.createShader(c.FRAGMENT_SHADER);\n c.shaderSource(q, f(!0));\n c.compileShader(q);\n if (!c.getShaderParameter(q, c.COMPILE_STATUS))if (b.ie) {\n if (c.shaderSource(q, f(!1)), c.compileShader(q), !c.getShaderParameter(q, c.COMPILE_STATUS))return !1\n } else return !1;\n var p = c.createProgram();\n c.attachShader(p, m);\n c.attachShader(p, q);\n c.linkProgram(p);\n if (!c.getProgramParameter(p, c.LINK_STATUS))return !1;\n n(p);\n Pa = c.getAttribLocation(p, \"vx\");\n Ra = c.getAttribLocation(p, \"tx\");\n Ya = c.getUniformLocation(p, \"sh\");\n Za = c.getUniformLocation(p, \"ch\");\n bb = c.getUniformLocation(p, \"aa\");\n pb = c.getUniformLocation(p, \"sm\");\n jb = c.getUniformLocation(p, \"mx\");\n Bb = c.getUniformLocation(p, \"ot\");\n vb = c.getUniformLocation(p, \"tm\");\n c.enableVertexAttribArray(Pa);\n c.enableVertexAttribArray(Ra);\n Ia.sh = p;\n Ia.vs = m;\n Ia.ps = q\n } catch (G) {\n return la(0, _[288] + G), !1\n }\n return !0\n }\n\n function e(a) {\n if (a) {\n var b = ua;\n b.deleteBuffer(a.vx);\n b.deleteBuffer(a.tx);\n b.deleteBuffer(a.ix);\n a.vx = null;\n a.tx = null;\n a.ix = null;\n a.vxd = null;\n a.txd = null;\n a.ixd = null;\n a.tcnt = 0\n }\n }\n\n function w(a, b, c, d) {\n this.tcnt = a;\n this.vxd = b;\n this.txd = c;\n this.ixd = d;\n this.ix = this.tx = this.vx = null\n }\n\n function x(a) {\n var b = ua;\n b.bindBuffer(lb, a.vx = b.createBuffer());\n b.bufferData(lb, a.vxd, wc);\n b.bindBuffer(lb, a.tx = b.createBuffer());\n b.bufferData(lb, a.txd, wc);\n b.bindBuffer(Qb, a.ix = b.createBuffer());\n b.bufferData(Qb, a.ixd, wc)\n }\n\n function v(a, b) {\n var c, d = 2 * (b + 1) * (b + 1);\n c = 6 * b * b;\n var e = new Float32Array(3 * (b + 1) * (b + 1)), g = new Float32Array(d), f = new Uint16Array(c);\n if (isNaN(b) || 0 >= b)b = 1;\n var h, k, t, n, l;\n a *= 2;\n for (k = c = d = 0; k <= b; k++)for (h = 0; h <= b; h++)t = h / b, n = k / b, g[d] = t, g[d + 1] = n, d += 2, e[c] = a * (t - .5), e[c + 1] = a * (n - .5), e[c + 2] = 0, c += 3;\n for (k = c = 0; k < b; k++)for (h = 0; h < b; h++)d = h + k * (b + 1), t = d + 1, n = d + (b + 1), l = n + 1, f[c] = d, f[c + 1] = t, f[c + 2] = n, f[c + 3] = t, f[c + 4] = l, f[c + 5] = n, c += 6;\n return new w(6 * b * b, e, g, f)\n }\n\n function r(a) {\n var c = ua;\n null == a && (a = {\n have: !1,\n fb: null,\n tex: null,\n w: 0,\n h: 0,\n alpha: 1,\n havepano: -1,\n drawcalls: 0\n }, a.fb = c.createFramebuffer(), a.tex = c.createTexture(), c.bindTexture(ma, a.tex), c.texParameteri(ma, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE), c.texParameteri(ma, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE), c.texParameteri(ma, c.TEXTURE_MAG_FILTER, qb), c.texParameteri(ma, c.TEXTURE_MIN_FILTER, qb));\n var d = b.gl.width * xa + .5 | 0, e = b.gl.height * xa + .5 | 0;\n if (a.w != d || a.h != e)a.w = d, a.h = e, c.bindTexture(ma, a.tex), c.texImage2D(ma, 0, mb, d, e, 0, mb, Nc, null), c.bindFramebuffer(Ab, a.fb), c.framebufferTexture2D(Ab, c.COLOR_ATTACHMENT0, ma, a.tex, 0), c.bindTexture(ma, null), c.bindFramebuffer(Ab, null);\n return a\n }\n\n function y(c, e, g) {\n var f = ua;\n if (0 >= c.drawcalls || null == e)return !1;\n var h = b.gl.width * xa + .5 | 0, k = b.gl.height * xa + .5 | 0;\n if (0 < h && 0 < k)return n(e.prg), f.viewport(0, 0, h, k), e.aa && (Aa && (g = 1 - Aa(1 - g, 0, 1), 0 > g ? g = 0 : 1 < g && (g = 1)), f.uniform1f(e.aa, g)), e.sz && f.uniform2f(e.sz, h, k), f.bindBuffer(lb, a), f.vertexAttribPointer(e.vxp, 2, Oc, !1, 0, 0), f.bindBuffer(Qb, d), f.activeTexture(Mc), f.bindTexture(ma, c.tex), f.drawElements(Kb, 6, Gb, 0), R++, !0\n }\n\n function l(a, b, c, d, e, g) {\n var f = !1;\n 0 == d && (b = c = d = 1024, Da = f = !0);\n this.type = 0;\n this.stereo = g;\n this.preview = !1;\n this.needsize = f;\n this.w = b;\n this.h = c;\n this.mp = b * c * a >> 20;\n this.tilesize = d;\n this.htiles = (b + d - 1) / d | 0;\n this.vtiles = (c + d - 1) / d | 0;\n this.loadedtiles = [0, 0];\n this.addedtiles = [0, 0];\n this.totaltiles = a * this.htiles * this.vtiles;\n this.i = e;\n this.planeurls = Array(a);\n this.planemapping = 6 == a ? [0, 1, 2, 3, 4, 5] : [1];\n this.invplanemapping = 6 == a ? [0, 1, 2, 3, 4, 5] : [0, 0, 0, 0, 0, 0];\n this.completelyadded = this.complete = !1;\n this.vfov = this.hfov = 90;\n this.voffset = this.hoffset = 0;\n this.vscale = 1\n }\n\n function u(a, b) {\n return a.preview ? -1 : b.preview ? 1 : a.w - b.w\n }\n\n function h(a, b, d, e, g, f, h) {\n f = 0 < f ? e * h / f : 1;\n 0 >= e && (e = 1);\n 0 >= g && (g = f);\n f = g / f;\n b.hfov = e;\n b.vfov = g;\n b.hoffset = 0;\n b.voffset = e / 2 - g / f / 2;\n b.vscale = 1;\n h = a.levels;\n d && h.push(b);\n h.sort(u);\n b = h.length - 1;\n for (d = g = 0; d <= b; d++)h[d].needsize || (g = h[d].vfov);\n if (0 < g) {\n for (d = 0; d <= b; d++)h[d].needsize || (h[d].vscale = g / h[d].vfov * f);\n a.fovlimits = [-e / 2, +e / 2, -g / 2, +g / 2]\n }\n c(a)\n }\n\n function c(a) {\n var b = null, c = 0 == a.type, d = c || null != a.fovlimits, e = a.levels;\n if (e) {\n var g = e.length;\n 0 < g && (e = e[g - 1], 0 == e.preview && 0 == e.needsize && d && (b = e))\n }\n b && a.done && 0 == a.ready && (a.ready = !0, a.hfov = c ? 360 : b.hfov, a.vfov = c ? 180 : b.vfov, a.hres = b.w, a.vres = b.h, Xa.havepanosize(a))\n }\n\n function K() {\n this.h = this.w = 0;\n this.imgfov = null;\n this.loading = !0;\n this.texture = this.obj = null;\n this.texvalid = !1;\n this.mx = Ma()\n }\n\n function D() {\n this.layer = null;\n this.tiles = [];\n this.mx = this.texture = this.csobj = this.csobj0 = null\n }\n\n function z(a) {\n function d(a, b, c, e) {\n f(a);\n if (0 == a.type) {\n var g = ua;\n c || (c = [0, 1, 2, 3, 4, 5]);\n var h, k, t, n;\n if (b) {\n h = b.naturalWidth;\n k = b.naturalHeight;\n n = 1;\n if (3 * h == 2 * k)t = h / 2; else if (2 * h == 3 * k)t = h / 3; else if (1 * h == 6 * k)t = h / 6; else if (6 * h == 1 * k)t = h / 1; else {\n 0 == a.type && la(2, _[247] + b.src + _[190]);\n return\n }\n h /= t;\n k /= t\n } else e && (t = e.width, n = 0, h = 1, k = 6, b = e);\n e = Sa ? 0 : G;\n var m = t, p = new D, zf = new l(6, m, m, m, 1, !1), r, u, w, v = [2, 0, 3, 1, 4, 5];\n 0 == Sa && (r = Ja(), r.style.position = _[0], r.style.pointerEvents = \"none\", p.layer = r);\n p.tiles = Array(6);\n for (u = 0; u < k; u++)for (r = 0; r < h; r++) {\n var x = c[u * h + r], P = new q(\"prev\" + a.id + \"s\" + Yb[x], 0, x, 0, 0, zf, \"\", a);\n w = v[x];\n var B = 1 == x || 3 == x ? e : 0, z = 3 >= x ? e : 0, y = Ja(2);\n y.width = m + 2 * B;\n y.height = m + 2 * z;\n y.style.position = _[0];\n y.style[Zc] = \"0 0\";\n var E = y.getContext(\"2d\");\n E && (0 < z && (E.drawImage(b, n * r * t, n * u * t, t, 1, B, 0, t, z), E.drawImage(b, n * r * t, n * u * t + t - 1, t, 1, B, m + z, t, z)), 0 < B && (E.drawImage(b, n * r * t + 0, n * u * t + 0, 1, t, 0, B, B, t), E.drawImage(b, n * r * t + t - 1, n * u * t + 0, 1, t, m + B, B, B, t)), E.drawImage(b, n * r * t, n * u * t, t, t, B, z, m, m), Ba && E.getImageData(m >> 1, m >> 1, 1, 1));\n P.canvas = y;\n 0 == Sa ? (P.elmt = y, y = -m / 2, P.transform = Fb[x] + _[53] + (y - B) + \"px,\" + (y - z) + \"px,\" + y + \"px) \") : (J(P, m, m), x = g.createTexture(), g.activeTexture(Mc), g.bindTexture(ma, x), g.texParameteri(ma, g.TEXTURE_WRAP_T, g.CLAMP_TO_EDGE), g.texParameteri(ma, g.TEXTURE_WRAP_S, g.CLAMP_TO_EDGE), g.texParameteri(ma, g.TEXTURE_MAG_FILTER, qb), g.texParameteri(ma, g.TEXTURE_MIN_FILTER, qb), g.texImage2D(ma, 0, cc, cc, Nc, y), g.bindTexture(ma, null), P.texture = x, P.mem = 0);\n P.state = 2;\n p.tiles[w] = P\n }\n Da = !0;\n a.cspreview = p\n }\n }\n\n function e(a, b) {\n t.imagefov = b;\n var c = a.rppano, d = c.w, g = c.h;\n a.stereo && (0 == a.stereoformat ? d >>= 1 : g >>= 1);\n var f = b[0], h = b[1], k = b[2];\n 0 >= f && (f = 360);\n if (0 >= h) {\n var h = f, n = d, l = g, m = 180, m = 4 == a.type ? 2 * Math.atan(h / 2 * (l / n) * Y) / Y : h * l / n;\n 180 < m && (m = 180);\n h = m\n }\n a.hfov = f;\n a.vfov = h;\n a.hres = d;\n a.vres = g;\n c.imgfov = [f, h, k];\n c = -h / 2 + k;\n d = +h / 2 + k;\n 4 == a.type && (d = Math.tan(.5 * h * Y), k = Math.sin(k * Y), c = Math.atan(-d + k) / Y, d = Math.atan(+d + k) / Y);\n a.fovlimits = [-f / 2, +f / 2, c, d]\n }\n\n function g(a, c, d, e) {\n c = ua;\n var f = a.rppano, h = c.createTexture();\n c.activeTexture(Mc);\n c.bindTexture(ma, h);\n c.texParameteri(ma, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE);\n c.texParameteri(ma, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE);\n c.texParameteri(ma, c.TEXTURE_MAG_FILTER, qb);\n c.texParameteri(ma, c.TEXTURE_MIN_FILTER, qb);\n if (d) {\n var t;\n e = d.naturalWidth;\n t = d.naturalHeight;\n f.w = e;\n f.h = t;\n var k = !1, n = !1, l = Q(e) << 1 | Q(t), n = b.opera ? \"\" : F(ja.mipmapping);\n if (n = \"force\" == n || \"auto\" == n && 3 == l)0 == (l & 2) && (k = !0, e = A(e)), 0 == (l & 1) && (k = !0, t = A(t)), c.texParameteri(ma, c.TEXTURE_MIN_FILTER, c.LINEAR_MIPMAP_LINEAR);\n e > ga && (k = !0, e = ga);\n t > ga && (k = !0, t = ga);\n if (k) {\n k = Ja(2);\n k.width = e;\n k.height = t;\n l = k.getContext(\"2d\");\n l.drawImage(d, 0, 0, e, t);\n if (b.ios) {\n var m;\n m = t;\n for (var p = l.getImageData(0, 0, 1, m).data, q = 0, r = m, G = m; G > q;)0 == p[4 * (G - 1) + 3] ? r = G : q = G, G = r + q >> 1;\n m = G / m;\n 0 < m && 1 > m && l.drawImage(d, 0, 0, e, t / m)\n }\n c.texImage2D(ma, 0, cc, cc, Nc, k)\n } else c.texImage2D(ma, 0, cc, cc, Nc, d);\n n && c.generateMipmap(ma);\n f.texvalid = !0\n } else e && (f.videoplugin = e, f.videoready = !1);\n c.bindTexture(ma, null);\n f.texture = h;\n a.rppano = f;\n Da = !0\n }\n\n function f(a) {\n var b = ua, c = a.cspreview;\n if (c)if (a.cspreview = null, b)for (a = 0; 6 > a; a++) {\n var d = c.tiles[a], e = d.texture;\n e && (b.deleteTexture(e), d.texture = null)\n } else a.previewadded && (a.layer.removeChild(c.layer), a.previewadded = !1)\n }\n\n var k = ++X, t = this;\n t.id = k;\n t.image = a;\n t.panoview = null;\n t.type = 0;\n t.cubelabels = _[519].split(\"\");\n t.stereo = !1;\n t.stereoformat = 0;\n t.stereolabels = [\"1\", \"2\"];\n t.done = !1;\n t.ready = !1;\n t.fovlimits = null;\n t.hfov = 0;\n t.vfov = 0;\n t.hres = 0;\n t.vres = 0;\n t.levels = [];\n t.frame = 0;\n t.currentlevel = -1;\n t.viewloaded = !1;\n t.stopped = !1;\n t.suspended = !1;\n t.suspended_h = 0;\n t.alpha = 1;\n t.cspreview = null;\n t.rppano = null;\n t.previewadded = !1;\n t.previewloading = !1;\n t.addToLayer = function (a) {\n if (0 == Sa) {\n var b = Ja(), c = b.style;\n c.position = _[0];\n c.left = 0;\n c.top = 0;\n t.layer = b;\n a.appendChild(b)\n }\n };\n t.addGridPreview = function (a, c, e, g, f, h) {\n a += 1;\n var k = b.desktop ? 1023 : b.tablet || b.webgl ? 511 : 255, n = a < k ? a : k, l = Ja(2);\n l.width = n;\n l.height = n;\n k = n / a;\n e *= k;\n c *= k;\n k = l.getContext(\"2d\");\n k.fillStyle = g;\n k.fillRect(0, 0, n, n);\n k.fillStyle = f;\n for (g = 0; g < a; g += e)k.fillRect(0, g, a, 1);\n for (g = 0; g < a; g += c)k.fillRect(g, 0, 1, a);\n if (h != f)for (k.fillStyle = h, f = 0; f < a; f += e)for (g = 0; g < a; g += c)k.fillRect(g, f, 1, 1);\n setTimeout(function () {\n d(t, null, null, l)\n }, 10)\n };\n t.addCubestripPreview = function (a, b) {\n t.previewloading = !0;\n ra.loadimage(a, function (a) {\n d(t, a, b);\n t.previewloading = !1;\n Xa.previewdone()\n }, function (b) {\n la(3, _[58] + a + _[62]);\n t.previewloading = !1\n })\n };\n t.addCubestripPano = function (a) {\n ra.loadimage(a, function (a) {\n d(t, a, null)\n }, function (b) {\n la(3, _[58] + a + _[62])\n })\n };\n t.addCubeLevel = function (a, b, d, e) {\n b = new l(6, b, b, d, e, t.stereo);\n b.planeurls[0] = a[0];\n b.planeurls[1] = a[1];\n b.planeurls[2] = a[2];\n b.planeurls[3] = a[3];\n b.planeurls[4] = a[4];\n b.planeurls[5] = a[5];\n a = t.levels;\n a.push(b);\n a.sort(u);\n c(t)\n };\n t.addFlatLevel = function (a, b, c, d, e, g, f, k) {\n t.type = 1;\n g = new l(1, d, e, g, f, t.stereo);\n g.planeurls[0] = a;\n g.type = 1;\n g.preview = k;\n h(t, g, !0, b, c, d, e)\n };\n t.addRoundPano = function (a, b, c, d) {\n _[24] == F(a) ? t.type = 4 : t.type = 3;\n t.rppano = new K;\n if (d) {\n if (t.updateFOV = e, g(t, a, null, d), d._panoid = t.id, t.imagefov = c, d.onvideoreadyCB = function () {\n var a = t.rppano;\n a.w = d.videowidth;\n a.h = d.videoheight;\n e(t, t.imagefov);\n p.updateView();\n Xa.havepanosize(t);\n t.ready = !0;\n t.rppano.loading = !1;\n a.videoready = !0\n }, d.havevideosize)d.onvideoreadyCB()\n } else b && ra.loadimage(b, function (b) {\n g(t, a, b);\n e(t, c);\n p.updateView();\n Xa.havepanosize(t);\n t.rppano.loading = !1\n })\n };\n t.finalize = function () {\n t.done = !0;\n c(t)\n };\n t.setblend = function (a) {\n Sa ? t.alpha = a : t.layer && (t.layer.style.opacity = a)\n };\n t.removemainpano = function () {\n };\n t.stop = function () {\n t.stopped = !0\n };\n t.destroy = function () {\n var a = ua;\n f(t);\n if (a) {\n var b = t.rppano;\n if (b) {\n var c = b.texture;\n c && a.deleteTexture(c);\n b.texture = null\n }\n }\n for (var d in ab)(b = ab[d]) && b.pano === t && ea(b);\n a || (t.layer.parentNode.removeChild(t.layer), t.layer = null)\n };\n t.previewcheck = function () {\n var a = t.rppano;\n return a && a.videoplugin ? a.texvalid : t.previewloading || 0 == t.type && null == t.cspreview && 0 < t.levels.length && !t.viewloaded ? !1 : !0\n };\n t.doloading = function () {\n return !1\n };\n t.isloading = function () {\n if (t.previewloading)return !0;\n var a = t.levels, b = a.length;\n if (0 < b) {\n if (0 == t.type && (b = a[0].preview && 1 < b ? 1 : 0, 9 > a[b].mp && !a[b].complete) || !t.viewloaded)return !0\n } else if (a = t.rppano)return a.videoplugin ? a.texvalid : a.loading;\n return !1\n }\n }\n\n function q(a, b, c, d, e, g, f, h) {\n this.id = a;\n this.pano = h;\n this.cubeside = c;\n this.stereo = f;\n this.levelindex = b;\n this.level = g;\n this.h = d;\n this.v = e;\n this.draworder = g ? Yb[c] * g.htiles * g.vtiles + e * g.htiles + d : Yb[c];\n this.url = null;\n this.sh = this.ch = this.sv = 0;\n this.mx = this.texture = this.canvas = this.image = this.elmt = null;\n this.lastusage_on_frame = this.mem = this.retries = this.state = 0;\n this.overlap = this.transform = null;\n g && (a = 2 * ((d + .5) / g.htiles - .5), e = 2 * ((e + .5) / g.vtiles - .5), a += .5 / g.htiles, e += .5 / g.vtiles, 1 == h.type && (a *= Math.tan(.5 * g.hfov * Y), e *= Math.tan(.5 * g.vfov * Y)), 0 == c ? (c = 1, g = e, h = -a) : 1 == c ? (c = -a, g = e, h = -1) : 2 == c ? (c = -1, g = e, h = a) : 3 == c ? (c = a, g = e, h = 1) : 4 == c ? (c = -a, h = -e, g = -1) : (c = -a, h = e, g = 1), a = -Math.atan2(c, h), e = -Math.atan2(-g, Math.sqrt(c * c + h * h)), this.sv = Math.sin(e), e = Math.cos(e), this.ch = Math.cos(a) * e, this.sh = Math.sin(a) * e)\n }\n\n function J(a, b, c) {\n var d = Jc[a.cubeside], e = a.level, g = e.w / 2, f = e.tilesize, h = 1E3 / g, k = 1, t = e.vscale;\n 1 == e.type && (k = Math.tan(.5 * e.hfov * Y));\n var n = (-g + a.h * f + b / 2 + 2 * e.hoffset * g / 90) * h * k, e = (-g + a.v * f + c / 2 + 2 * e.voffset * g / e.hfov) * h * k * t, g = g * h;\n Hc(rd, b / 1E3 * k, 0, 0, 0, c / 1E3 * k * t, 0, 0, 0, 1);\n ye(Zb, n, e, g);\n Ic(rd, Zb);\n b = Zb;\n k = d[1];\n t = -d[0] * Y;\n d = Math.cos(t);\n c = Math.sin(t);\n t = -k * Y;\n k = Math.cos(t);\n t = Math.sin(t);\n Hc(b, k, 0, -t, c * t, d, c * k, d * t, -c, d * k);\n Ic(rd, Zb);\n d = Ma();\n Hc(d, h, 0, 0, 0, h, 0, 0, 0, h);\n Ic(d, rd);\n a.mx = d\n }\n\n function C(a, b, c, d, e, g) {\n var f = [], h = a.length, k, t = !1, n = 0, l;\n for (k = 0; k < h; k++) {\n var m = a.charAt(k), p = m.charCodeAt(0);\n if (37 == p)t = !0, n = 0; else if (48 == p)t ? n++ : f.push(m); else if (t) {\n t = !1;\n l = null;\n 65 <= p && 84 >= p && (p += 32);\n if (108 == p)l = c; else if (115 == p)l = b; else if (116 == p)l = g; else if (117 == p || 120 == p || 99 == p || 104 == p)l = d; else if (118 == p || 121 == p || 114 == p)l = e;\n if (null != l) {\n for (; l.length <= n;)l = \"0\" + l;\n f.push(l)\n } else f.push(\"%\" + m)\n } else t = !1, f.push(m)\n }\n return f.join(\"\")\n }\n\n function Q(a) {\n return 0 == (a & a - 1)\n }\n\n function A(a) {\n a--;\n a |= a >> 1;\n a |= a >> 2;\n a |= a >> 4;\n a |= a >> 8;\n a |= a >> 16;\n a++;\n return a\n }\n\n function H(a, b, c, d, e, g) {\n if (0 < g)setTimeout(function () {\n try {\n H(null, b, c, d, e, 0)\n } catch (a) {\n }\n }, g); else {\n null == a && (a = b.getContext(\"2d\"));\n g = e[0];\n var f = e[1], h = e[2], k = e[3];\n 0 < g && a.drawImage(c, 0, 0, 1, d[1], 0, f, g, d[3]);\n 0 < f && a.drawImage(c, 0, 0, d[0], 1, g, 0, d[2], f);\n 0 < h && a.drawImage(c, d[0] - 1, 0, 1, d[1], g + d[2], f, h, d[3]);\n 0 < k && a.drawImage(c, 0, d[1] - 1, d[0], 1, g, f + d[3], d[2], k)\n }\n }\n\n function qa(a) {\n function d() {\n if (0 < I)Da = !0, setTimeout(d, 0); else if (aa--, null != g && null != g.naturalWidth) {\n var e = g.naturalWidth, f = g.naturalHeight, k = e * f * 4, t = !1;\n 0 == k && (t = !0);\n if (t)a.state = 0, Da = !0; else {\n var n = a.level;\n if (n) {\n n.needsize && (n.w = e, n.h = f, n.tilesize = e > f ? e : f, n.needsize = !1, 1 == n.type ? h(a.pano, n, !1, N.hfov, N.vfov, e, f) : c(a.pano), n.preview && Xa.previewdone());\n n.loadedtiles[a.stereo - 1]++;\n n.complete = n.stereo && ja.stereo ? n.loadedtiles[0] == n.totaltiles && n.loadedtiles[1] == n.totaltiles : n.loadedtiles[0] == n.totaltiles;\n t = 1 == n.htiles * n.vtiles;\n a.state = 2;\n a.lastusage_on_frame = M;\n if (Sa) {\n J(a, e, f);\n var l = ua, m = b.opera ? \"\" : F(ja.mipmapping), p = \"force\" == m;\n if (m = p || \"auto\" == m) {\n if (!Q(e) || !Q(f)) {\n m = 1024;\n t ? (m = 0, p && (m = ga)) : p || Q(n.tilesize) || (m = 0);\n var t = A(e), q = A(f);\n t < m && q < m && (n = Ja(2), n.width = t, n.height = q, m = n.getContext(\"2d\"), m.drawImage(g, 0, 0, t, q), g = n, e = t, f = q)\n }\n m = Q(e) && Q(f)\n }\n m && 0 == p && !b.realDesktop && a.level && 2500 < a.level.h && (m = !1);\n e = l.createTexture();\n l.activeTexture(Mc);\n l.bindTexture(ma, e);\n l.texParameteri(ma, l.TEXTURE_WRAP_T, l.CLAMP_TO_EDGE);\n l.texParameteri(ma, l.TEXTURE_WRAP_S, l.CLAMP_TO_EDGE);\n l.texParameteri(ma, l.TEXTURE_MAG_FILTER, qb);\n l.texParameteri(ma, l.TEXTURE_MIN_FILTER, m ? l.LINEAR_MIPMAP_LINEAR : qb);\n l.texImage2D(ma, 0, cc, cc, Nc, g);\n m && l.generateMipmap(ma);\n l.bindTexture(ma, null);\n a.texture = e;\n a.image = g = null\n } else {\n l = [e, f, e, f];\n p = !1;\n e == f && 1 == n.htiles && (m = ja.hardwarelimit, e + 2 * G > m && (n.w = n.h = l[2] = l[3] = e = f = m - 2 * G, p = !0));\n var r = [0, 0, 0, 0], u = G, w = a.h, v = a.v, n = a.cubeside, x = a.level, P = x.tilesize, m = x.vscale, B = -x.w / 2, y = q = 1;\n 1 == x.type && (q = Math.tan(.5 * x.hfov * Y), n = 6, 2 < u && (u = 2), b.ie || b.desktop && b.safari) && (y = 252);\n 1E3 < -B && 4 < u && (u = 4);\n var z = B, D = z;\n r[2] = u;\n r[3] = u;\n 0 == n || 2 == n ? 0 == w && (r[0] = u) : 1 != n && 3 != n || w != x.vtiles - 1 || (r[2] = 0);\n 0 <= n && 3 >= n ? 0 == v && (r[1] = u) : (w == x.htiles - 1 && (r[2] = 0), v == x.vtiles - 1 && (r[3] = 0));\n a.overlap = r;\n z -= r[0];\n D -= r[1];\n r = (z + w * P) * q;\n v = (D + v * P - 2 * x.voffset * B / x.hfov) * q * m;\n x = q;\n P = q * m;\n 1 < y && (r *= y, v *= y, B *= y, x *= y, P *= y);\n y = \"\" + r;\n r = 0 < y.indexOf(\"e-\") ? r = r.toFixed(18) : y;\n y = \"\" + v;\n v = 0 < y.indexOf(\"e-\") ? v = v.toFixed(18) : y;\n y = \"\" + B;\n B = 0 < y.indexOf(\"e-\") ? B = B.toFixed(18) : y;\n a.transform = Fb[n] + _[53] + r + \"px,\" + v + \"px,\" + B + \"px) \";\n if (1 != q || 1 != m)a.transform += _[429] + x + \",\" + P + \",1) \";\n (q = a.overlap) ? (n = Ja(2), n.width = e + q[0] + q[2], n.height = f + q[1] + q[3], n.style.overflow = _[6], k = n.width * n.height * 4, B = y = 0, m = n.getContext(\"2d\"), q && (y = q[0], B = q[1], H(m, n, g, l, q, t ? 0 : 250)), p ? m.drawImage(g, 0, 0, l[0], l[1], y, B, e, f) : m.drawImage(g, y, B), Ba && m.getImageData(l[0] >> 1, l[1] >> 1, 1, 1), a.canvas = n, a.elmt = n, a.image = g = null) : a.elmt = g;\n a.elmt.style.position = _[0];\n a.elmt.style[Zc] = \"0 0\"\n }\n a.mem = k;\n kb += k;\n if (kb > ca) {\n Da = !0;\n I++;\n for (var E, e = null, f = 0; ;) {\n for (E in ab)f++, k = ab[E], 0 < k.levelindex && 2 <= k.state && k.lastusage_on_frame < M - 1 && (!e || k.lastusage_on_frame < e.lastusage_on_frame) && (e = k);\n if (e) {\n if (ea(e), e = null, kb < ca - 2097152)break\n } else break\n }\n if (f > Math.max(2 * $a.length, 100)) {\n e = {};\n for (E in ab)if (k = ab[E])(0 < k.levelindex || 8 < k.level.mp) && 0 == k.state && k.lastusage_on_frame < M - 2 ? (k.pano = null, k.level = null) : e[E] = k;\n ab = e\n }\n kb > ca && (ia = !0)\n }\n Da = !0;\n I++\n }\n }\n }\n }\n\n function e(b, c) {\n aa--;\n c ? a.state = 4 : a.retries < m.network.retrycount ? (a.retries++, a.state = 0, Da = !0) : (a.state = 4, la(3, _[58] + a.url + _[62]))\n }\n\n if (null != a.pano) {\n null == a.url && (a.url = C(a.level.planeurls[a.level.invplanemapping[a.cubeside]], a.pano.cubelabels[a.cubeside], a.levelindex, String(a.h + a.level.i), String(a.v + a.level.i), a.pano.stereolabels[a.stereo - 1]));\n a.state = 1;\n var g = ra.loadimage(a.url, d, e);\n a.image = g;\n aa++\n }\n }\n\n function ea(a) {\n var b = ua, c = a.texture;\n b && c && b.deleteTexture(c);\n (b = a.elmt) && (c = b.parentNode) && c.removeChild(b);\n c = $a.length;\n for (b = 0; b < c; b++)if ($a[b] == a) {\n $a.splice(b, 1);\n break\n }\n b = a.id;\n ab[b] = null;\n delete ab[b];\n if (b = a.level)b.addedtiles[a.stereo - 1]--, b.completelyadded = b.stereo && ja.stereo ? b.addedtiles[0] == b.totaltiles && b.addedtiles[1] == b.totaltiles : b.addedtiles[0] == b.totaltiles;\n kb -= a.mem;\n a.state = 0;\n a.image = null;\n a.canvas = null;\n a.texture = null;\n a.elmt = null;\n a.pano = null;\n a.level = null\n }\n\n function Ca(a) {\n if (Sa) {\n var b = ua, c = xb, d = a.texture;\n c && d && (b.uniformMatrix4fv(Bb, !1, a.mx), b.bindBuffer(lb, c.vx), b.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0), b.bindBuffer(lb, c.tx), b.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0), b.bindBuffer(Qb, c.ix), b.activeTexture(Mc), b.bindTexture(ma, d), b.drawElements(Kb, c.tcnt, Gb, 0), R++)\n } else a.elmt.style[ib] = pc + a.transform\n }\n\n function S(a, b) {\n var c = new Hb;\n c.x = a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n c.y = a[0] * b[3] + a[1] * b[4] + a[2] * b[5];\n c.z = -2 * (a[0] * b[6] + a[1] * b[7] + a[2] * b[8]);\n return c\n }\n\n function Z(a, c) {\n var d = a.panoview, g = a.id, f, h, k, t, n, l, r, G, u, P, y, z, D, E, C, A, Ba, F, H, J, K, S, Q = !1, L, ea, Z, N, I, V, X, ba, ka, kb, T, ca, ga, ia, ha = !1, oa = !1, va = !0, sa = Ta();\n if (Sa) {\n var ra = ua, za = Qa, Ha = ya, Ea = a.panoview, La = Ea.z, Aa = b.gl.width * xa + .5 | 0, Ka = b.gl.height * xa + .5 | 0;\n if (0 < c) {\n var Na = Aa, Aa = Aa >> 1, za = za >> 1;\n ra.viewport(2 == c ? Aa : 0, 0, 1 == c ? Aa : Na - Aa, Ka)\n } else ra.viewport(0, 0, Aa, Ka);\n var wb = 1 / (.5 * za), Oa = -1 / (.5 * Ha), Ma = Ea.zf, $b = 0 < c ? Number(ja.stereooverlap) * za * .5 * (1 == c ? 1 : -1) : 0, qd = Ea.yf, Xa = Math.min(Ma / 200, 1), ib = 0 < Ma ? Ea.ch : 0;\n xe(Tc, wb, 0, 0, 0, 0, Oa, 0, 0, 0, 0, 65535 / 65536, 1, 0, 0, 65535 / 65536 - 1, 0);\n xe(Kd, La, 0, 0, 0, 0, La, 0, 0, $b, qd, 1, 0, Ma * $b, Ma * qd, Ma, 1);\n Ic(Kd, Tc);\n if (0 < c) {\n var Ee = m.webVR;\n Ee && Ee.enabled && Ee.prjmatrix(c, Kd)\n }\n ra.uniform1i(pb, 0);\n ra.uniform1f(bb, 1);\n ra.uniform1f(Ya, Xa);\n ra.uniform1f(Za, ib);\n kd(Gc, tc);\n Ic(Gc, Kd);\n ra.uniformMatrix4fv(jb, !1, Gc);\n ra.uniformMatrix3fv(vb, !1, Db);\n var Jd = Ia.obj0, Pb = Ia.obj;\n null == Jd && (Jd = v(500, 1), Pb = v(500, 19), x(Jd), x(Pb), Ia.obj0 = Jd, Ia.obj = Pb);\n xb = 10 < Ma ? Pb : Jd\n }\n var Wa = c;\n 0 == Wa && (Wa = 1);\n a.stereo && (g += \"t\" + Wa);\n f = +d.h;\n h = -d.v;\n k = d.z;\n t = Ga - f * Y;\n n = -h * Y;\n l = Math.sin(n);\n r = Math.cos(n);\n G = Math.cos(t) * r;\n u = Math.sin(t) * r;\n if (Ib) {\n var cb = [G, l, u];\n Zd(rd, Ib);\n Fd(rd, cb);\n G = cb[0];\n l = cb[1];\n u = cb[2]\n }\n P = a.levels;\n z = P.length;\n D = a.currentlevel;\n a.viewloaded = !1;\n if (5E3 > k) {\n var ff = 1 / Math.max(100, k), mb = Math.abs(Math.cos(f * Y)), Ab = Math.cos(.25 * Ga);\n if (1E-14 > mb || mb > Ab - 1E-14 && mb < Ab + 1E-14 || mb > 1 - 1E-14 || 1E-14 > r || r > 1 - 1E-14)f += (.5 + .5 * Math.random()) * ff * (.5 > Math.random() ? -1 : 1), h += (.5 + .5 * Math.random()) * ff * (.5 > Math.random() ? -1 : 1);\n b.firefox && (l < -(1 - 1E-14) && (h += .5), l > +(1 - 1E-14) && (h -= .5))\n }\n pc = _[53] + Qa / 2 + \"px,\" + ya / 2 + _[207] + d.yf.toFixed(16) + _[232] + k.toFixed(16) + (0 < b.iosversion && 5 > b.iosversion ? \"\" : \"px\") + _[106] + (-d.r).toFixed(16) + _[86] + k.toFixed(16) + _[295] + h.toFixed(16) + _[284] + f.toFixed(16) + \"deg) \" + hc;\n if (0 < z) {\n var qb = 1 == pa(ja.loadwhilemoving) ? !0 : 0 == a.hasmoved || wa, ob = D;\n 7 <= aa && (qb = !1);\n if (a.stopped)qb = !1; else {\n 9 > P[0].mp && (0 == P[0].complete && (ob = 0, Q = !0), 0 == qb && 0 == P[0].completelyadded && (ob = 0, qb = Q = !0));\n var Cb = m.lockmultireslevel | 0;\n m.downloadlockedlevel && 0 <= Cb && Cb < z && (Q = !0, 0 == P[Cb].complete && (qb = !0))\n }\n ta && 5 < ob && (ob -= 3, ta = !1, Da = !0);\n if (qb) {\n Fa = sa;\n wa = !1;\n ca = null;\n ia = 1E6;\n for (E = ob; 0 <= E; E--) {\n y = P[E];\n Ba = y.w;\n F = y.h;\n H = y.tilesize;\n J = y.htiles;\n K = y.vtiles;\n var ha = !0, Zb = y.planeurls.length;\n for (A = 0; A < Zb; A++)if (C = y.planemapping[A], S = Q ? [0, 0, 1, 1] : d.vr[C]) {\n kb = \"p\" + g + \"l\" + E + \"s\" + Yb[C] + \"h\";\n var Fb = 1, Hb = 1;\n 1 == a.type && (Fb = 1 / Math.tan(.5 * y.hfov * Y), Hb = 1 / Math.tan(.5 * y.vfov * Y));\n L = Math.floor((Fb * (S[0] - .5) + .5) * Ba / H);\n ea = Math.ceil((Fb * (S[2] - .5) + .5) * Ba / H);\n 0 > L && (L = 0);\n ea > J && (ea = J);\n Z = Math.floor((Hb * (S[1] - .5) + .5) * F / H);\n N = Math.ceil((Hb * (S[3] - .5) + .5) * F / H);\n 0 > Z && (Z = 0);\n N > K && (N = K);\n for (ba = Z; ba < N; ba++)for (X = L; X < ea; X++) {\n ka = kb + X + \"v\" + ba;\n T = ab[ka];\n T || (T = new q(ka, E, C, X, ba, y, Wa, a), ab[ka] = T, ha = !1);\n if (0 == T.state)ga = Math.acos(G * T.ch + u * T.sh + l * T.sv), ga < ia && (ca = T, ia = ga), ha = !1; else if (1 == T.state)ha = !1; else if (2 == T.state) {\n 0 == Sa && Ca(T);\n var nb = T, ub = null, Eb = null;\n 0 == Sa && (ub = nb.elmt, Eb = a.layer);\n if (0 != Sa || ub.parentNode != Eb) {\n for (var gc = $a.length, Jb = -1, Ob = void 0, Lb = void 0, Fc = nb.pano, Hc = nb.levelindex, Jc = nb.draworder, qc = 0, uc = 0, Lb = 0; Lb < gc; Lb++)if (Ob = $a[Lb], Ob.pano === Fc && (qc = Ob.levelindex, uc = Ob.draworder, qc >= Hc && uc >= Jc)) {\n Jb = Lb;\n break\n }\n 0 > Jb ? (ub && Eb.appendChild(ub), $a.push(nb)) : (ub && Eb.insertBefore(ub, $a[Jb].elmt), $a.splice(Jb, 0, nb));\n var xc = nb.level;\n xc.addedtiles[nb.stereo - 1]++;\n xc.completelyadded = xc.stereo && ja.stereo ? xc.addedtiles[0] == xc.totaltiles && xc.addedtiles[1] == xc.totaltiles : xc.addedtiles[0] == xc.totaltiles\n }\n T.state = 3\n }\n T.lastusage_on_frame = M\n }\n }\n 0 == ta && 0 == ha && E == ob && 1E3 < sa - W && (ta = !0, W = sa);\n if (ha) {\n a.viewloaded = !0;\n break\n }\n }\n ca && qa(ca)\n }\n }\n 1 != a.viewloaded ? (oa = !0, U = sa) : 0 < U && 200 > sa - U && (oa = !0);\n Sa && 10 < d.zf && (oa = !0);\n if (oa) {\n var ac = a.cspreview;\n if (ac) {\n var Ec = ac.layer;\n for (I = 0; 6 > I; I++) {\n var sc = ac.tiles[I];\n Ca(sc);\n 0 == Sa && 2 == sc.state && (Ec.appendChild(sc.elmt), sc.state = 3)\n }\n 0 != Sa || a.previewadded || (0 == a.layer.childNodes.length ? a.layer.appendChild(Ec) : a.layer.insertBefore(Ec, a.layer.childNodes[0]), a.previewadded = !0)\n }\n } else 0 == Sa && a.previewadded && ((ac = a.cspreview) && a.layer.removeChild(ac.layer), a.previewadded = !1);\n a.previewloading && (va = !1);\n if (va)for (V = $a.length, I = 0; I < V; I++)if (T = $a[I], !(T.pano !== a || a.stereo && T.stereo != Wa))if (T.levelindex > D) {\n 0 == Sa && T.pano.layer.removeChild(T.elmt);\n T.state = 2;\n $a.splice(I, 1);\n I--;\n V--;\n var yc = T.level;\n yc.addedtiles[T.stereo - 1]--;\n yc.completelyadded = yc.stereo && ja.stereo ? yc.addedtiles[0] == yc.totaltiles && yc.addedtiles[1] == yc.totaltiles : yc.addedtiles[0] == yc.totaltiles\n } else Ca(T);\n if (0 == z && Sa) {\n var yb = a.rppano;\n if (2 < a.type && yb) {\n var Xc = yb.texture, vc = yb.imgfov, Rb = yb.videoplugin, Mb = null, Lc = !1;\n Rb && (Rb._panoid != a.id ? Rb = yb.videoplugin = null : Da = p.haschanged = !0);\n if (Xc && vc) {\n var Zc = vc[0], ad = vc[1], gd = vc[2];\n Lc = Rb ? (Mb = Rb.videoDOM) ? yb.videoready : yb.texvalid : !0;\n if (Lc) {\n var Pc = Ia.objS, hd = a.type + \"/\" + Zc + \"x\" + ad + \"/\" + gd;\n if (hd != Ia.objS_i) {\n var id = a.type, Uc = Zc, sd = ad, Qc = gd, zc = Pc, bd = 15453, td = 10302, dc = 3E4;\n zc && zc.tcnt != dc && (zc = null);\n var de = zc ? zc.vxd : new Float32Array(bd), Vc = zc ? zc.txd : new Float32Array(td), cd = zc ? zc.ixd : new Uint16Array(dc), Ac, Bc, jd, Wc, ld, md, Yc, ud, ee, nd, od, pd, Ld, fe, Uc = Uc * Y, sd = sd * Y, Qc = Qc * Y;\n 4 == id ? (sd = 1E3 * Math.tan(.5 * sd), Qc = 500 * Math.sin(1 * Qc)) : Qc = -Qc + .5 * Ga;\n for (Bc = bd = td = 0; 50 >= Bc; Bc++)for (Yc = 1 - Bc / 50, 4 == id ? (ee = 1, Wc = sd * (Yc - .5) + Qc) : (ud = (Bc / 50 - .5) * sd + Qc, ee = Math.sin(ud), nd = Math.cos(ud), Wc = 500 * nd), Ac = 0; 100 >= Ac; Ac++)ud = (Ac / 100 - .5) * Uc + Ga, od = Math.sin(ud), pd = Math.cos(ud), jd = 500 * pd * ee, ld = 500 * od * ee, md = 1 - Ac / 100, de[bd] = jd, de[bd + 1] = Wc, de[bd + 2] = ld, bd += 3, Vc[td] = md, Vc[td + 1] = Yc, td += 2;\n for (Bc = dc = 0; 50 > Bc; Bc++)for (Ac = 0; 100 > Ac; Ac++)Ld = 101 * Bc + Ac, fe = Ld + 101, cd[dc] = Ld, cd[dc + 1] = Ld + 1, cd[dc + 2] = fe, cd[dc + 3] = fe, cd[dc + 4] = Ld + 1, cd[dc + 5] = fe + 1, dc += 6;\n var Pc = new w(3E4, de, Vc, cd), dd = Ia.objS, ec = Pc;\n if (dd && dd.tcnt == ec.tcnt) {\n ec.vx = dd.vx;\n ec.tx = dd.tx;\n ec.ix = dd.ix;\n var vd = ua;\n vd.bindBuffer(lb, ec.vx);\n vd.bufferData(lb, ec.vxd, wc);\n vd.bindBuffer(lb, ec.tx);\n vd.bufferData(lb, ec.txd, wc);\n vd.bindBuffer(Qb, ec.ix);\n vd.bufferData(Qb, ec.ixd, wc)\n } else dd && e(dd), x(ec);\n Ia.objS = Pc;\n Ia.objS_i = hd\n }\n var fc = ua;\n fc.uniformMatrix4fv(Bb, !1, yb.mx);\n a.stereo && fc.uniformMatrix3fv(vb, !1, 0 == a.stereoformat ? 1 >= Wa ? jc : kc : 1 >= Wa ? Nb : bc);\n fc.bindBuffer(lb, Pc.vx);\n fc.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0);\n fc.bindBuffer(lb, Pc.tx);\n fc.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0);\n fc.bindBuffer(Qb, Pc.ix);\n var ge = null;\n if (Mb) {\n var Fe = 60 * Mb.currentTime, Ge = Fe != Mb._uf || b.android && b.chrome && 0 == Mb.paused;\n Rb.isseeking && 0 == Rb.iPhoneMode && (Ge = !1);\n 4 > Mb.readyState && (Ge = !1, Mb._uf = -1);\n if (Ge && 0 == Va)if (Va++, Mb._uf = 4 > Mb.readyState ? -1 : Fe, b.ie && b.desktop) {\n null == fa && (fa = Ja(2));\n if (fa.width != yb.w || fa.height != yb.h)fa.width = yb.w, fa.height = yb.h;\n fa.getContext(\"2d\").drawImage(Mb, 0, 0, yb.w, yb.h);\n ge = fa\n } else ge = Mb && Mb.paused && 5 > (Fe | 0) && Rb.posterDOM ? Rb.posterDOM : Mb\n }\n fc.activeTexture(Mc);\n fc.bindTexture(ma, Xc);\n if (ge)try {\n fc.texImage2D(ma, 0, cc, cc, Nc, ge), yb.texvalid = !0\n } catch (Md) {\n Md = \"\" + Md, Rb && Rb.error != Md && (Rb.error = Md, la(3, Md))\n }\n yb.texvalid && (fc.drawElements(Kb, Pc.tcnt, Gb, 0), R++)\n }\n }\n }\n }\n if (Sa) {\n var $c = (\"\" + ja.hotspotrenderer).toLowerCase();\n if (\"both\" == $c || _[30] == $c || \"auto\" == $c && 0 < c) {\n var Sb = ua, he = xb, ie = m.webVR, He = ie && ie.enabled, Ed = He ? ie.getcursor() : null, Nd = a.panoview, Vd = Nd.h, Wd = Nd.v, Xd = Nd.r, Yd = Nd.z / (He ? 2E3 : ya) * 2, Ie = 1, Ie = Ie * (1 + Nd.zf / 1E3), Gd = Ua.getArray(), $d = Gd.length, je, na, Od, Hd = 2 > c, Je = null;\n if (0 < c) {\n var be = He ? ie.eyetranslt(c) : 0;\n ye(rc, -be, 0, 0);\n kd(oc, ic);\n Ic(oc, rc);\n ye(rc, -p.tz, p.ty, -p.tx);\n ef(oc, rc);\n Je = oc\n }\n Sb.uniformMatrix4fv(jb, !1, Kd);\n Sb.bindBuffer(lb, he.vx);\n Sb.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0);\n Sb.bindBuffer(lb, he.tx);\n Sb.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0);\n Sb.bindBuffer(Qb, he.ix);\n for (je = 0; je < $d; je++)if ((na = Gd[je]) && na._visible && na.loaded && na._distorted && (0 != na.keep || !a.suspended)) {\n var ke = na.GL;\n ke || (na.GL = ke = {tex: null});\n var Id = !0;\n if (Hd) {\n var ed = na._scale, Pd = na._depth;\n isNaN(Pd) && (Pd = 1E3, Id = !1);\n na === Ed && (Pd = Ed.hit_depth, ed *= Pd / 1E3);\n var Cc = na._flying, Ke = (1 - Cc) * na._ath, Le = (1 - Cc) * na._atv, Me = (1 - Cc) * na.rotate;\n 0 < Cc && (Ke += Cc * nc(Vd, na._ath), Le += Cc * nc(Wd, na._atv), Me += Cc * nc(Xd, na.rotate));\n 1 == na.scaleflying && (ed = ed * (1 - Cc) + ed / Yd * Cc * Ie);\n var zb = wd, Ne = na._width / 1E3 * ed * 2, Oe = na._height / 1E3 * ed * 2, ce = na.rz, yf = na.ry, Pe = 2 * na.ox, Qe = 2 * na.oy, Re = Pd, ve = -Me, we = -Ke + 90, ze = Le, Ae = -na.tz, Be = na.ty, Ce = na.tx, rb = void 0, Qd = void 0, xd = void 0, yd = void 0, zd = void 0, Ad = void 0, Bd = void 0, sb = void 0, db = void 0, eb = void 0, fb = void 0, gb = void 0, hb = void 0, rb = na.rx * Y, Qd = Math.cos(rb), xd = Math.sin(rb), rb = yf * Y, yd = Math.cos(rb), zd = Math.sin(rb), rb = ce * Y, Ad = Math.cos(rb), Bd = Math.sin(rb), rb = -ze * Y, sb = Math.cos(rb), db = Math.sin(rb), rb = -we * Y, eb = Math.cos(rb), fb = Math.sin(rb), rb = -ve * Y, gb = Math.cos(rb), hb = Math.sin(rb), Tb = void 0, Ub = void 0, Vb = void 0, Tb = Ne * (yd * Ad - zd * xd * Bd), Ub = Ne * (yd * Bd + zd * xd * Ad), Vb = Ne * zd * Qd;\n zb[0] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) - Vb * sb * fb;\n zb[1] = Tb * hb * sb + Ub * gb * sb + Vb * db;\n zb[2] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) - Vb * sb * eb;\n zb[3] = 0;\n Tb = -Oe * Qd * Bd;\n Ub = Oe * Qd * Ad;\n Vb = Oe * xd;\n zb[4] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) + Vb * sb * fb;\n zb[5] = Tb * hb * sb + Ub * gb * sb - Vb * db;\n zb[6] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) + Vb * sb * eb;\n zb[7] = 0;\n Tb = zd * Ad + yd * xd * Bd;\n Ub = zd * Bd - yd * xd * Ad;\n Vb = yd * Qd;\n zb[8] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) + Vb * sb * fb;\n zb[9] = Tb * hb * sb + Ub * gb * sb - Vb * db;\n zb[10] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) + Vb * sb * eb;\n zb[11] = 0;\n zb[12] = Pe * (gb * eb + hb * db * fb) + Qe * (gb * db * fb - hb * eb) + Re * sb * fb + Ae;\n zb[13] = Pe * hb * sb + Qe * gb * sb - Re * db + Be;\n zb[14] = Pe * (hb * db * eb - gb * fb) + Qe * (hb * fb + gb * db * eb) + Re * sb * eb + Ce;\n zb[15] = 1;\n kd(na.MX, wd)\n } else kd(wd, na.MX);\n if (!(.01 > na._alpha)) {\n Je && Id ? Ic(wd, Je) : Ic(wd, ic);\n Sb.uniformMatrix4fv(Bb, !1, wd);\n var Rc = Db, Cd = na.crop;\n na.pressed && na._ondowncrop ? Cd = na._ondowncrop : na.hovering && na._onovercrop && (Cd = na._onovercrop);\n if (Cd)if (Cd != na.C_crop) {\n na.C_crop = Cd;\n var le = (\"\" + Cd).split(\"|\"), gf = na.loader.naturalWidth, hf = na.loader.naturalHeight, Rc = [1, 0, 0, 0, 1, 0, 0, 0, 0];\n Rc[0] = (1 * le[2] - 1) / gf;\n Rc[2] = (1 * le[0] + .5) / gf;\n Rc[4] = (1 * le[3] - 1) / hf;\n Rc[5] = (1 * le[1] + .5) / hf;\n na.C_crop_matrix = Rc\n } else Rc = na.C_crop_matrix;\n Sb.uniformMatrix3fv(vb, !1, Rc);\n Sb.uniform1f(bb, na._alpha);\n Sb.activeTexture(Mc);\n if (Od = ke.tex)Sb.bindTexture(ma, Od); else if (Od = B(na))ke.tex = Od;\n Od && (Sb.drawElements(Kb, he.tcnt, Gb, 0), R++)\n }\n }\n if (Hd && M & 1) {\n var Se = m.webVR, jf = Se && Se.enabled, lc = jf ? Se.getcursor() : null, Te = Ua.getArray(), kf = Te.length, Sc, tb, lf = !jf, Rd = [0, 0, 1], mf = !1, me = lc ? lc.depth : 2E3, nf = lc && lc.enabled;\n if (lf) {\n var nf = !0, mc = O.x, De = O.y;\n if (ja.stereo) {\n var ne = Qa >> 1, of = ne * Number(ja.stereooverlap);\n mc < ne ? (mc += ne >> 1, mc -= of >> 1) : (mc -= ne >> 1, mc += of >> 1)\n }\n var Ue = p.inverseProject(mc, De), Rd = [-Ue.x, -Ue.y, -Ue.z]\n }\n var Wb = Kc, Dd = Rd, Ve = Dd[0], We = Dd[1], Xe = Dd[2];\n Dd[0] = Ve * Wb[0] + We * Wb[4] + Xe * Wb[8] + Wb[12];\n Dd[1] = Ve * Wb[1] + We * Wb[5] + Xe * Wb[9] + Wb[13];\n Dd[2] = Ve * Wb[2] + We * Wb[6] + Xe * Wb[10] + Wb[14];\n for (Sc = kf - 1; 0 <= Sc; Sc--)if ((tb = Te[Sc]) && tb._visible && tb.loaded && tb._distorted && tb !== lc && (tb._hit = !1, nf && tb._enabled)) {\n var Ye, Dc = tb.MX, pf = 0, Xb = 1E3, Ze = Rd[0], $e = Rd[1], af = Rd[2], oe = Xb * Dc[0], pe = Xb * Dc[1], qe = Xb * Dc[2], re = Xb * Dc[4], se = Xb * Dc[5], te = Xb * Dc[6], bf = Dc[12] - (oe + re) / 2, cf = Dc[13] - (pe + se) / 2, df = Dc[14] - (qe + te) / 2, Sd = $e * te - af * se, Td = af * re - Ze * te, Ud = Ze * se - $e * re, fd = oe * Sd + pe * Td + qe * Ud;\n if (-1E-6 > fd || 1E-6 < fd)fd = 1 / fd, Xb = (bf * Sd + cf * Td + df * Ud) * -fd, 0 <= Xb && 1 >= Xb && (Sd = df * pe - cf * qe, Td = bf * qe - df * oe, Ud = cf * oe - bf * pe, Xb = (Ze * Sd + $e * Td + af * Ud) * fd, 0 <= Xb && 1 >= Xb && (pf = (re * Sd + se * Td + te * Ud) * fd));\n Ye = pf;\n if (1 < Ye) {\n mf = tb._hit = !0;\n me = Ye;\n break\n }\n }\n lc && (me = Math.max(me, 200) - 100, lc.hit_depth = me);\n for (Sc = 0; Sc < kf; Sc++)if (tb = Te[Sc]) {\n var ue = tb._hit;\n ue != tb.hovering && (tb.hovering = ue, da.callaction(ue ? tb.onover : tb.onout, tb), lc && da.callaction(ue ? lc.onover : lc.onout, tb))\n }\n 0 == O.down && ae.update(!1, lf && mf)\n }\n }\n }\n }\n\n function B(a) {\n var b = a.loader, c = null;\n if (a.jsplugin)b = null; else if (c = b.src, 1 > b.naturalWidth || 1 > b.naturalHeight)b = null;\n if (!b)return null;\n var d = ua, e = null;\n if (e = Ec[c])e.cnt++, e = e.tex; else {\n e = d.createTexture();\n d.bindTexture(ma, e);\n d.texParameteri(ma, d.TEXTURE_WRAP_T, d.CLAMP_TO_EDGE);\n d.texParameteri(ma, d.TEXTURE_WRAP_S, d.CLAMP_TO_EDGE);\n d.texParameteri(ma, d.TEXTURE_MAG_FILTER, qb);\n d.texParameteri(ma, d.TEXTURE_MIN_FILTER, qb);\n try {\n d.texImage2D(ma, 0, mb, mb, Nc, b), Ec[c] = {cnt: 1, tex: e}\n } catch (g) {\n la(3, g)\n }\n }\n a._GL_onDestroy || (a._GL_onDestroy = function () {\n var b = a.loader;\n if (b && !a.jsplugin) {\n var c = ua, b = b.src, d = Ec[b];\n d && 0 == --d.cnt && (c.deleteTexture(d.tex), d.tex = null, Ec[b] = null, delete Ec[b]);\n a._GL_onDestroy = null\n }\n });\n return e\n }\n\n var t = Oa, G = 0, Ba = !1, P = 0, Fa = 0, wa = !1, ta = !1, W = 0, U = 0, Da = !1, M = 0, Va = 0, R = 0, I = 0, X = 0, aa = 0, ba = 0, T = 16.666, ab = {}, $a = [], kb = 0, ca = 52428800, ia = !1, fa = null, Sa = !1, ka = null, ua = null, Ia = null, ga = 0, xb = null, sa = !1, xa = 1, Ha = !1, oa = null, va = null;\n d = a = null;\n var ha = [], La = null, Aa = null, Ea = !1, za = null, Ka = null, Na = [], Pa, Ra, Ya, Za, bb, pb, jb, Bb, vb, Db = [1, 0, 0, 0, 1, 0, 0, 0, 0], Nb = [1, 0, 0, 0, .5, 0, 0, 0, 0], bc = [1, 0, 0, 0, .5, .5, 0, 0, 0], jc = [.5, 0, 0, 0, 1, 0, 0, 0, 0], kc = [.5, 0, .5, 0, 1, 0, 0, 0, 0], ma, Wa, Ab, Mc, lb, Qb, mb, cc, Nc, Gb, Oc, Kb, wc, qb, Yb = [1, 3, 0, 2, 4, 5, 6], Fb = \"rotateY(90deg) ;;rotateY(-90deg) ;rotateY(180deg) ;rotateX(-90deg) ;rotateX(90deg) ;\".split(\";\"), pc = \"\", hc = \"\", Ib = null;\n t.requiereredraw = !1;\n t.isloading = !1;\n t.setup = function (a) {\n var c, d = null;\n if (2 == a) {\n var e = {};\n if (0 <= F(Jb.so.html5).indexOf(_[196]) || b.mac && b.firefox)e.preserveDrawingBuffer = !0;\n b.mobile && (e.antialias = !1);\n e.depth = !1;\n e.stencil = !1;\n var f = Jb.so.webglsettings;\n f && (!0 === f.preserveDrawingBuffer && (e.preserveDrawingBuffer = !0), !0 === f.depth && (e.depth = !0), !0 === f.stencil && (e.stencil = !0));\n f = F(Jb.so.wmode);\n _[36] == f || _[142] == f ? (sa = !0, e.alpha = !0, e.premultipliedAlpha = !1) : e.alpha = !1;\n try {\n for (ka = Ja(2), ka.style.position = _[0], ka.style.left = 0, c = ka.style.top = 0; 4 > c && !(d = ka.getContext([_[30], _[83], _[116], _[112]][c], e)); c++);\n } catch (h) {\n }\n ka && d && (ua = d, Ia = {}, ma = d.TEXTURE_2D, Wa = d.COLOR_BUFFER_BIT | d.DEPTH_BUFFER_BIT | d.STENCIL_BUFFER_BIT, Ab = d.FRAMEBUFFER, Mc = d.TEXTURE0, lb = d.ARRAY_BUFFER, Qb = d.ELEMENT_ARRAY_BUFFER, mb = d.RGBA, cc = d.RGB, Nc = d.UNSIGNED_BYTE, Gb = d.UNSIGNED_SHORT, Oc = d.FLOAT, Kb = d.TRIANGLES, wc = d.STATIC_DRAW, qb = d.LINEAR, k() && (c = m.bgcolor, d.clearColor((c >> 16 & 255) / 255, (c >> 8 & 255) / 255, (c & 255) / 255, 1 - (c >> 24) / 255, sa ? 1 : 0), d.disable(d.DEPTH_TEST), d.depthFunc(d.NEVER), d.enable(d.BLEND), d.blendFunc(d.SRC_ALPHA, d.ONE_MINUS_SRC_ALPHA), d.enable(d.CULL_FACE), d.cullFace(d.FRONT), ga = d.getParameter(d.MAX_TEXTURE_SIZE), !b.desktop && 4096 < ga && (ga = 4096), 2048 >= ga && b.firefox && !b.mac && !b.android && (b.css3d = !1), b.ios && (ga = 2048), V.panolayer.appendChild(ka), t.infoString = _[423], m.webGL = {\n canvas: ka,\n context: d,\n ppshaders: Na,\n createppshader: function (a, b) {\n return g(null, a, b)\n },\n useProgram: n\n }, Sa = !0));\n 0 == Sa && (Ia = ua = ka = null, a = 1)\n }\n 1 == a && (t.infoString = \"\", b.webgl = !1);\n G = b._tileOverlap | 0;\n if (6 < b.iosversion || b.mac && \"7\" <= b.safariversion)Ba = !0;\n b.multiressupport = b.androidstock && 0 == b.webgl ? !1 : !0;\n (a = b.webgl) && b.android && (b.androidstock ? a = !1 : b.chrome && 38 > b.chromeversion && (a = !1));\n 9 <= b.iosversion && document.addEventListener(_[52], E, !1);\n b.panovideosupport = a;\n b.buildList()\n };\n t.reset = function () {\n M = 0\n };\n var ob = null, Cb = null;\n t.unload = function () {\n var b;\n m.webGL && (m.webGL.canvas = null, m.webGL.context = null, m.webGL = null);\n var c = ua;\n if (c && Ia) {\n c.bindTexture(ma, null);\n c.bindBuffer(lb, null);\n c.bindBuffer(Qb, null);\n c.bindFramebuffer(Ab, null);\n c.deleteProgram(Ia.sh);\n c.deleteShader(Ia.vs);\n c.deleteShader(Ia.ps);\n Ia.obj0 && (e(Ia.obj0), e(Ia.obj));\n Ia.objS && e(Ia.objS);\n Ia = null;\n for (b = 0; 6 > b; b++)ha[b] && ha[b].prg && (c.deleteProgram(ha[b].prg), ha[b].prg = null, ha[b] = null);\n c.deleteBuffer(a);\n c.deleteBuffer(d);\n var g = [oa, va, za, Ka];\n for (b = 0; b < g.length; b++)g[b] && (g[b].fb && c.deleteFramebuffer(g[b].fb), g[b].tex && c.deleteTexture(g[b].tex), g[b] = null)\n }\n Sa = !1;\n ua = ka = null\n };\n t.size = function (a, c) {\n if (Sa) {\n var d = (b.android && 0 == b.androidstock || b.blackberry || b.silk || b.mac) && 0 == b.hidpi ? b.pixelratio : 1;\n if (b.desktop || b.ios || b.ie)d = L.devicePixelRatio;\n isNaN(d) && (d = 1);\n if (!b.desktop && 1 != d)a:{\n var e = d, d = [320, 360, 400, 480, 640, 720, 768, 800, 1024, 1080, 1280, 1366, 1440, 1920, 2560], g, f, h = a * e;\n f = d.length;\n for (g = 0; g < f; g++)if (2 > Math.abs(d[g] - h)) {\n d = d[g] / a;\n break a\n }\n d = e\n }\n d *= 1;\n e = a * d + .25 | 0;\n d = c * d + .25 | 0;\n if (g = m.webVR)if (g = g.getsize(e, d))e = g.w, d = g.h;\n e *= ja.framebufferscale;\n d *= ja.framebufferscale;\n ka.style.width = a + \"px\";\n ka.style.height = c + \"px\";\n if (ka.width != e || ka.height != d) {\n ka.width = e;\n ka.height = d;\n g = ua.drawingBufferWidth | 0;\n f = ua.drawingBufferHeight | 0;\n b.desktop && b.chrome && 300 == g && 150 == f && (g = f = 0);\n if (0 >= g || 0 >= f)g = e, f = d;\n ua.viewport(0, 0, g, f);\n b.gl = {width: g, height: f}\n }\n } else b.gl = {width: 0, height: 0}\n };\n t.fps = function () {\n var a = Ta();\n if (0 < ba) {\n var b = a - ba;\n if (5 < b && 500 > b) {\n var c = Math.min(b / 160, .75);\n T = T * (1 - c) + b * c;\n 0 < T && (nd = 1E3 / T, ja.currentfps = nd)\n }\n 0 == I && (ja.r_ft = .9 * ja.r_ft + .1 * b)\n }\n ba = a\n };\n var Fc = !1;\n t.startFrame = function () {\n Da = !1;\n R = Va = 0;\n Fc = !0;\n ca = m.memory.maxmem << 20;\n if (Sa) {\n var a = ua;\n (Ea = 0 < Na.length) ? (a.clear(Wa), za = r(za), a.bindFramebuffer(Ab, za.fb), a.clear(Wa), R = 0) : a.clear(Wa)\n }\n };\n t.finishFrame = function () {\n M++;\n I = 0;\n if (Sa) {\n var a = ua;\n if (Ea) {\n var c, d = Na.length, e = za, g = null;\n 1 < d && (g = Ka = r(Ka));\n a.disable(a.BLEND);\n for (c = 0; c < d; c++)e.drawcalls = R, R = 0, a.bindFramebuffer(Ab, g ? g.fb : null), a.clear(Wa), y(e, Na[c], 1), e = g, g = c + 1 == d - 1 ? null : c & 1 ? Ka : za;\n a.enable(a.BLEND)\n }\n b.androidstock && a.finish()\n }\n m.memory.usage = kb >> 20;\n Fc = !1\n };\n t.createPano = function (a) {\n return new z(a)\n };\n var Eb = 0, gc = 0, nb = 0, ic = Ma(), Kc = Ma(), Ob = Ma(), tc = Ma(), Lb = Ma(), Tc = Ma(), Kd = Ma(), Gc = Ma(), oc = Ma(), rd = Ma(), Zb = Ma();\n t.setblendmode = function (a) {\n if (Sa) {\n var c = ua;\n La = null;\n var d = !0, e = null, g = null, f = 1, h = da.parseFunction(a);\n if (h)switch (h[0].toUpperCase()) {\n case \"BLEND\":\n (e = h[2]) || (e = _[324]);\n La = ha[0];\n break;\n case _[359]:\n g = Number(h[2]);\n f = Number(h[3]);\n (e = h[4]) || (e = _[319]);\n isNaN(g) && (g = 16777215);\n isNaN(f) && (f = 2);\n La = ha[1];\n n(La.prg);\n break;\n case _[363]:\n g = Number(h[2]);\n (e = h[3]) || (e = _[317]);\n isNaN(g) && (g = 0);\n La = ha[2];\n n(La.prg);\n break;\n case _[365]:\n var d = !1, k = Number(h[2]);\n a = Number(h[3]);\n e = h[4];\n isNaN(k) && (k = 0);\n isNaN(a) && (a = .2);\n a = 0 > a ? 0 : 1 < a ? 1 : a;\n e || (e = _[43]);\n var t = h = 0, l = Math.cos(k * Y), m = Math.sin(k * Y);\n 0 > m && (t = 1, k += 90);\n 0 > l && (h = 1, k += 0 > m ? 90 : -90);\n k = Math.sqrt(2) * Math.cos((45 - k) * Y);\n l *= k;\n m *= k;\n k = 1 / (l * l + m * m);\n La = ha[4];\n n(La.prg);\n c.uniform3f(La.fp, l * k, m * k, (-h * l - t * m) * k);\n c.uniform1f(La.bl, .5 * a);\n break;\n case _[404]:\n d = !1;\n a = Number(h[2]);\n (e = h[3]) || (e = _[272]);\n isNaN(a) && (a = 2);\n La = ha[3];\n n(La.prg);\n c.uniform2f(La.ct, .5, .5);\n c.uniform1f(La.zf, a);\n break;\n case _[399]:\n d = !1, a = Number(h[2]), k = Number(h[3]), t = Number(h[4]), (e = h[5]) || (e = _[43]), isNaN(a) && (a = .2), isNaN(k) && (k = .2), isNaN(t) && (t = 0), a = -1 > a ? -1 : 1 < a ? 1 : a, k = 0 > k ? 0 : 1 < k ? 1 : k, t = 0 > t ? 0 : 1 < t ? 1 : t, h = b.gl.width / b.gl.height, l = 1, isNaN(h) && (h = 1), h *= h, 0 > a ? h *= 1 + a : l *= 1 - a, La = ha[5], n(La.prg), c.uniform2f(La.ap, h, l), c.uniform1f(La.bl, .5 * k), c.uniform1f(La.zf, t)\n }\n if (null == La || 0 == d && ja.stereo)La = ha[0], g = null;\n null !== g && c.uniform3f(La.cc, f * (g >> 16 & 255) / 255, f * (g >> 8 & 255) / 255, f * (g & 255) / 255);\n null == e && (e = _[43]);\n Aa = ac.getTweenfu(e);\n Ha = 0 == b.realDesktop && 1 < b.pixelratio || 33 < ja.r_ft\n }\n };\n t.snapshot = function (a, b) {\n if (Sa) {\n var c = ua;\n if (a) {\n var d = oa;\n oa = va;\n va = d\n }\n Ha && (xa = .707);\n va = r(va);\n c.bindFramebuffer(Ab, va.fb);\n R = 0;\n c.clear(Wa);\n d = 0;\n b && (d = Fc, Fc = !0, t.renderpano(b, 1), Fc = d, d = 1 - b.alpha);\n a && y(oa, La, b ? 1 - b.alpha : a.alpha) && R++;\n va.drawcalls = R;\n c.bindFramebuffer(Ab, Ea ? za.fb : null);\n xa = 1;\n null == a && (a = {});\n a.alpha = d;\n return a\n }\n return null\n };\n t.rendersnapshot = function (a, b) {\n if (0 == Fc)return a;\n if (null == ua || null == va || b && 1 <= b.alpha)return null;\n var c = a.alpha = b ? 1 - b.alpha : a.alpha;\n y(va, La, c);\n return a\n };\n t.renderpano = function (a, c) {\n if (0 != Fc) {\n a.frame = M;\n var d = !1, e = ua;\n if (2 == c && e) {\n if (a.stopped && oa && oa.done && oa.pano == a.id) {\n oa.have = !0;\n return\n }\n Ha && (xa = .707);\n if (oa = r(oa))d = !0, oa.have = !0, oa.pano = a.id, oa.done = !1, oa.alpha = a.alpha, oa.drawcalls = 0, e.bindFramebuffer(Ab, oa.fb), e.clear(Wa)\n }\n var g = a.panoview = a.stopped && a.panoview ? a.panoview : p.getState(a.panoview), f = g.h, h = g.v, k = g.r, t = g.z, l = a.hasmoved = f != Eb || h != gc || t != nb;\n t != nb && (ia = !1);\n var q = Ta();\n if (l) {\n if (\"auto\" == F(ja.loadwhilemoving)) {\n var G = q - cb;\n 200 < q - Fa && 0 == O.down && 200 < G && (wa = !0)\n }\n P = q\n } else 10 > q - P && (a.hasmoved = l = !0);\n Da = l;\n Eb = f;\n gc = h;\n nb = t;\n l = ic;\n t = Kc;\n Yd(l, f, h, k);\n kd(tc, l);\n hc = \"\";\n Ib = null;\n if (a.image && a.image.prealign && (f = (\"\" + a.image.prealign).split(\"|\"), 3 == f.length)) {\n var h = Number(f[0]), u = -Number(f[1]), k = -Number(f[2]);\n if (!isNaN(h) && !isNaN(u) && !isNaN(k)) {\n hc = _[125] + u.toFixed(4) + _[271] + k.toFixed(4) + _[269] + h.toFixed(4) + \"deg) \";\n Ib = Ob;\n Zd(t, l);\n l = tc;\n t = Lb;\n kd(l, ic);\n var f = Ib, w, G = -k * Y, k = Math.cos(G), q = Math.sin(G), G = -u * Y, u = Math.cos(G);\n w = Math.sin(G);\n G = -h * Y;\n h = Math.cos(G);\n G = Math.sin(G);\n Hc(f, h * u + G * q * w, G * k, -h * w + G * q * u, -G * u + h * q * w, h * k, G * w + h * q * u, k * w, -q, k * u);\n ef(l, Ib)\n }\n }\n Zd(t, l);\n l = (b.android && 0 == b.androidstock || b.blackberry || b.ios) && 0 == b.hidpi ? b.pixelratio : 1;\n b.ios && b.retina && (l = 1.5);\n 1.4 < l && (l = 1.4);\n h = 1 / (g.z / (.5 * ya));\n f = g.zf;\n 200 < f && (h = Math.atan(h), f = Math.min(h + Math.asin(f / 1E3 * Math.sin(h)), 1), isNaN(f) && (f = 1), h = Math.tan(f));\n .5 > h && (l = 1);\n b.desktop && (l = b.pixelratio);\n l = .25 * Ga * (Qa * l / Math.sin(Math.atan(Qa / ya * h)) + ya * l / h);\n 0 == a.type ? l *= 2 / Ga : 1 == a.type && (f = a.levels, l *= 2 / Ga, l *= Math.tan(.5 * f[f.length - 1].vfov * Y));\n h = l;\n l = 0;\n k = a.levels;\n f = k.length;\n q = 1 + (N ? parseFloat(N.multiresthreshold) : 0);\n isNaN(q) && (q = 1);\n .1 > q && (q = .1);\n h = Math.ceil(h * q);\n if (0 < f) {\n for (; !(0 == k[l].preview && k[l].h >= h);)if (l++, l >= f) {\n l = f - 1;\n break\n }\n ia && 0 < l && --l;\n h = m.lockmultireslevel;\n _[470] == F(h) && (m.lockmultireslevel = h = \"\" + l);\n h |= 0;\n 0 <= h && h < f && (l = h);\n a.currentlevel != l && (a.currentlevel = l)\n }\n 1 == c && (l = a.currentlevel, m.multireslevel = 0 < l && a.levels[0].preview ? l - 1 : l);\n a:{\n k = t;\n t = g.zf;\n h = 1 / (g.z / (.5 * uc));\n if (0 < t && (l = Math.atan(h), h = Math.tan(l + Math.asin(t / 1E3 * Math.sin(l))), isNaN(h) || 0 >= h)) {\n t = [0, 0, 1, 1];\n g.vr = [t, t, t, t, t, t];\n break a\n }\n q = h * ya / Qa;\n G = g.yf / ya * 2 * q;\n t = [h, q + G, -1];\n l = [-h, q + G, -1];\n f = [-h, -q + G, -1];\n h = [h, -q + G, -1];\n Fd(k, t);\n Fd(k, l);\n Fd(k, f);\n Fd(k, h);\n for (var q = 1, v = null, G = Array(40), u = [null, null, null, null, null, null], k = 0; 6 > k; k++) {\n var x = [], B = [];\n x.push(S(t, ub[k]));\n x.push(S(l, ub[k]));\n x.push(S(f, ub[k]));\n x.push(S(h, ub[k]));\n var z = 0, E = 0, D = 0, C = 0;\n for (w = E = 0; 4 > w; w++)v = x[w], E = v.x, D = v.y, C = v.z / 2, E = 1 * (E > -C) + 8 * (E < C) + 64 * (D < C) + 512 * (D > -C) + 4096 * (-.1 > -C), G[w] = E, z += E;\n w = 0 != (z & 18724);\n if (0 == z)for (w = 0; 4 > w; w++)v = x[w], B.push(v.x / v.z), B.push(v.y / v.z); else if (w)continue; else {\n for (var z = 4, v = G, A = 0, Ba = [], W = [], H, J = 0, J = 0; 5 > J; J++) {\n var ta = 1 << 3 * J;\n for (w = 0; w < z; w++) {\n var D = (w + z - 1) % z, E = x[D], K = x[w], D = v[D], Q = v[w], L = 0;\n 0 == (Q & ta) ? (L |= 2, D & ta && (L |= 1)) : 0 == (D & ta) && (L |= 1);\n L & 1 && (4 == J ? q = (.1 - E.z / 2) / (K.z - E.z) / 2 : 3 == J ? q = (-E.y - E.z / 2) / (K.y - E.y + (K.z - E.z) / 2) : 2 == J ? q = (E.z / 2 - E.y) / (K.y - E.y - (K.z - E.z) / 2) : 1 == J ? q = (E.z / 2 - E.x) / (K.x - E.x - (K.z - E.z) / 2) : 0 == J && (q = (-E.z / 2 - E.x) / (K.x - E.x + (K.z - E.z) / 2)), H = new Hb, H.x = E.x + (K.x - E.x) * q, H.y = E.y + (K.y - E.y) * q, H.z = E.z + (K.z - E.z) * q, E = H.x, D = H.y, C = H.z / 2, E = 1 * (E > -C) + 8 * (E < C) + 64 * (D < C) + 512 * (D > -C) + 4096 * (-.1 > -C), Ba.push(H), W.push(E), A++);\n L & 2 && (Ba.push(K), W.push(Q), A++)\n }\n z = A;\n x = Ba;\n v = W;\n A = 0;\n Ba = [];\n W = []\n }\n for (w = 0; w < z; w++)v = x[w], B.push(v.x / v.z), B.push(v.y / v.z)\n }\n x = z = 9;\n A = v = -9;\n Ba = B.length;\n if (4 < Ba) {\n for (w = 0; w < Ba; w++)B[w] += .5;\n for (w = 0; w < Ba; w += 2)B[w + 0] < z && (z = B[w + 0]), B[w + 1] < x && (x = B[w + 1]), B[w + 0] > v && (v = B[w + 0]), B[w + 1] > A && (A = B[w + 1]);\n z > v || 0 > z && 0 > v || 1 < z && 1 < v || x > A || 0 > x && 0 > A || 1 < x && 1 < A || (0 > z && (z = 0), 0 > x && (x = 0), 1 < v && (v = 1), 1 < A && (A = 1), u[k] = [z, x, v, A])\n }\n }\n g.vr = u\n }\n Ia && (n(Ia.sh), e.blendFunc(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA), sa && e.colorMask(!0, !0, !0, !0));\n ja.stereo ? (Z(a, 1), Z(a, 2)) : Z(a, 0);\n g = 0;\n m.downloadlockedlevel && 0 < (m.lockmultireslevel | 0) && (g = m.lockmultireslevel | 0);\n t = a.levels;\n 0 < t.length && (g = t[g], sc.progress = g.stereo && ja.stereo ? (g.loadedtiles[0] + g.loadedtiles[1]) / (2 * g.totaltiles) : g.loadedtiles[0] / g.totaltiles);\n d && (e.bindFramebuffer(Ab, Ea ? za.fb : null), e.clear(Wa), oa.drawcalls = R, oa.done = !0, xa = 1);\n 1 == c && e && oa && 0 < oa.drawcalls && oa.done && oa.have && (oa.have = !1, y(oa, La, 1 - qc));\n sa && e.colorMask(!0, !0, !0, !1)\n }\n };\n t.handleloading = function () {\n return Da ? 2 : 0\n };\n var Jc = [[0, 180], [0, 90], [0, 0], [0, 270], [-90, 90], [90, 90]], ub = [[-1, 0, 0, 0, 1, 0, 0, 0, 1], [0, 0, 1, 0, 1, 0, 1, 0, 0], [1, 0, 0, 0, 1, 0, 0, 0, -1], [0, 0, -1, 0, 1, 0, -1, 0, 0], [0, 0, 1, -1, 0, 0, 0, 1, 0], [0, 0, 1, 1, 0, 0, 0, -1, 0]], Ec = {}, wd = Ma(), rc = Ma()\n })();\n var sf = function () {\n function a(a, b, f) {\n a = F(a).charCodeAt(0);\n return 118 == a ? f : 104 == a ? b : 100 == a ? Math.sqrt(b * b + f * f) : Math.max(b, f * d.mfovratio)\n }\n\n var d = this;\n d.haschanged = !1;\n d.r_rmatrix = Ma();\n (function () {\n var a = \"hlookat vlookat camroll fov maxpixelzoom fisheye fisheyefovlink architectural tx ty tz\".split(\" \"), b = [_[268], _[193]], f;\n for (f in a)va(d, a[f], 0);\n for (f in b)va(d, b[f], !1);\n va(d, _[474], \"VFOV\");\n d.continuousupdates = !1;\n ha(d, _[477], function () {\n return \"\" + d._pannini\n }, function (a) {\n var b = Number(a), b = isNaN(b) ? pa(a) ? 1 : 0 : 0 > b ? 0 : 1 < b ? 1 : b;\n d._pannini = b;\n d.haschanged = !0\n });\n ha(d, _[364], function () {\n return d._fisheye\n }, function (a) {\n d.fisheye = a\n });\n ha(d, _[215], function () {\n return d._fisheyefovlink\n }, function (a) {\n d.fisheyefovlink = a\n });\n ha(d, _[305], function () {\n var a = d.hlookatmax, b = d.hlookatmin, g = M && M.fovlimits;\n isNaN(b) && (b = g ? g[0] : -180);\n isNaN(a) && (a = g ? g[1] : 180);\n return a - b\n }, function (a) {\n });\n ha(d, _[304], function () {\n var a = d.vlookatmax, b = d.vlookatmin, g = M && M.fovlimits;\n isNaN(b) && (b = g ? g[2] : -90);\n isNaN(a) && (a = g ? g[3] : 90);\n return a - b\n }, function (a) {\n })\n })();\n d.defaults = function () {\n d._hlookat = 0;\n d._vlookat = 0;\n d._architectural = 0;\n d._architecturalonlymiddle = !0;\n d._fov = 90;\n d._fovtype = b.desktop ? \"VFOV\" : \"MFOV\";\n d._camroll = 0;\n d.mfovratio = 4 / 3;\n d._maxpixelzoom = Number.NaN;\n d._stereographic = !0;\n d._pannini = 0;\n d._fisheye = 0;\n d._fisheyefovlink = .5;\n d.fovmin = 1;\n d.fovmax = 179;\n d.r_zoom = 1;\n d.r_yoff = 0;\n d.r_zoff = 0;\n d.haschanged = !1;\n d.limitview = \"auto\";\n d.hlookatmin = Number.NaN;\n d.hlookatmax = Number.NaN;\n d.vlookatmin = Number.NaN;\n d.vlookatmax = Number.NaN;\n d._limits = null\n };\n d.inverseProject = function (a, b) {\n var f, e, m, p, v, r, y, l;\n m = -1E3;\n v = m / d.r_zoom;\n f = (a - Qa / 2) * v;\n e = (b - ya / 2 - d.r_yoff) * v;\n v = 1 / Math.sqrt(f * f + e * e + m * m);\n f *= v;\n e *= v;\n m *= v;\n p = d.r_zoff;\n 0 < p && (0 == d._stereographic && (l = Math.atan(1E3 / p) / Y - 1, (1 > -m ? Math.acos(-m) / Y : 0) > l && (r = -e, y = f, v = r * r + y * y, 0 < v && (v = 1 / Math.sqrt(v), r *= v, y *= v), l *= Y, v = Math.sin(l), f = v * y, e = -v * r, m = -Math.cos(l))), r = p * m, y = r * r - (p * p - 1E6), 0 < y && (v = -r + Math.sqrt(y), f *= v, e *= v, m = m * v - -p, v = 1 / Math.sqrt(f * f + e * e + m * m), f *= v, e *= v, m *= v));\n p = new Hb;\n p.x = f;\n p.y = e;\n p.z = m;\n return p\n };\n var m = d.fovRemap = function (b, d, f, e, m) {\n e || (e = Qa);\n m || (m = ya);\n b = Math.tan(b / 360 * Ga);\n d = a(d, e, m);\n f = a(f, e, m);\n return b = 360 * Math.atan(b * f / d) / Ga\n }, f = Ma();\n d.screentosphere = function (a, b) {\n var k = new Hb;\n if (ja.stereo) {\n var e = Qa / 2, m = e / 2 * (1 - Number(ja.stereooverlap));\n a = a < e ? a + m : a - m\n }\n e = d.inverseProject(a * X, b * X);\n Zd(f, d.r_rmatrix);\n nb(f, e);\n e = [Math.atan2(e.x, e.z) / Y + 270, Math.atan2(-e.y, Math.sqrt(e.x * e.x + e.z * e.z)) / Y];\n 180 < e[0] && (e[0] -= 360);\n k.x = e[0];\n k.y = e[1];\n k.z = 0;\n return k\n };\n d.spheretoscreen = function (a, b) {\n var f = new Hb, e = (180 - a) * Y, m = b * Y;\n f.x = 1E3 * Math.cos(m) * Math.cos(e);\n f.z = 1E3 * Math.cos(m) * Math.sin(e);\n f.y = 1E3 * Math.sin(m);\n nb(d.r_rmatrix, f);\n var e = f.z + d.r_zoff, p = m = tc;\n 10 <= e && (e = d.r_zoom / e, m = (f.x * e + .5 * Qa) / X, p = (f.y * e + .5 * ya) / X + d.r_yoff);\n f.x = m;\n f.y = p;\n return f\n };\n d.updateView = function () {\n var a = d._maxpixelzoom;\n if (!isNaN(a) && 0 != a) {\n var f = 1E-6;\n if (M && M.ready) {\n var k = M.vres, e = M.vfov;\n 0 == M.type && (k = k * Math.PI * .5);\n if (50 < k && 0 < e) {\n var f = Qa, w = ya, a = 360 / Math.PI * Math.atan(Math.tan(2 * Math.atan(1 / (2 / Math.PI * k * a / (e / 180) / (.5 * f)))) / (f / w));\n if (isNaN(a) || 1E-4 > a)a = d.fovmax;\n 90 < a && (a = 90);\n f = m(a, \"VFOV\", d._fovtype)\n }\n }\n d.fovmin = f\n }\n var e = d._fov, f = d._hlookat, w = d._vlookat, a = d._camroll, x = b.webgl ? d._fisheye : 0, v = d._fisheyefovlink, r = d._stereographic, k = 0, y = 0 == ia.bouncinglimits || 0 == Pa.isBouncing();\n y && (e < d.fovmin && (e = d.fovmin), e > d.fovmax && (e = d.fovmax));\n 179 < e && (e = 179);\n if (0 < x) {\n var l = m(e, d._fovtype, \"VFOV\");\n r ? (170 < e && (e = 170), k = 1E3 * x * Math.sin(Math.pow(Math.min(l / 130, 1), 2 * v) * Ga * .5)) : (x += Math.pow(Math.min(x, 1), 10) / 10, k = x * Math.sin(Math.pow(l / 180, v) * Ga * .5), k *= 3E3 * k)\n }\n var u = F(d.limitview), h = M && M.fovlimits, c = 0, K = 0, D = 0, v = Number(d.hlookatmin), l = Number(d.hlookatmax), z = Number(d.vlookatmin), q = Number(d.vlookatmax);\n \"auto\" == u && (v = l = z = q = Number.NaN);\n isNaN(v) && (v = h ? h[0] : -180);\n isNaN(l) && (l = h ? h[1] : 180);\n isNaN(z) && (z = h ? h[2] : -90);\n isNaN(q) && (q = h ? h[3] : 90);\n \"auto\" == u && (p.hlookatmin = v, p.hlookatmax = l, p.vlookatmin = z, p.vlookatmax = q, u = \"range\");\n q < z && (h = z, z = q, q = h);\n l < v && (h = v, v = l, l = h);\n var J = !1, C = !1, L = _[123] != u, A = !0, A = 180, h = l - v, H = q - z;\n switch (u) {\n case \"off\":\n case _[31]:\n h = 360;\n v = -180;\n l = 180;\n z = -1E5;\n q = 1E5;\n L = !1;\n break;\n case _[379]:\n L = !0;\n case _[123]:\n C = !0;\n case \"range\":\n if ((J = 360 > h) || 180 > H)D = m(e, d._fovtype, \"HFOV\"), D > h && (A = !0, C && m(h, \"HFOV\", \"VFOV\") < H && (A = J = !1), D = h, L && A && (e = m(D, \"HFOV\", d._fovtype))), c = m(e, d._fovtype, \"VFOV\"), c > H && (A = !0, C && m(H, \"VFOV\", \"HFOV\") < h && (A = J = !1), c = H, L && A && (e = m(c, \"VFOV\", d._fovtype))), m(e, d._fovtype, \"HFOV\"), A = c, K = c *= .5, D *= .5, -89.9 >= z && (c = 0), 89.9 <= q && (K = 0)\n }\n u = [360, -180, 180, c + K, z + c, q - K];\n y && (w - c < z ? (w = z + c, Pa.stopFrictions(2)) : w + K > q && (w = q - K, Pa.stopFrictions(2)));\n J && (D = -w * Y, K = .5 * Qa, c = .5 * ya, z = c / Math.tan(A * Y * .5), 0 < D && (c = -c), K = 1 / Math.sqrt(1 + (K * K + c * c) / (z * z)), c = c / z * K, z = Math.acos(-K * Math.sin(D) + c * Math.cos(D)) - Ga / 2, isNaN(z) && (z = -Ga / 2), K = Math.acos((K * Math.cos(D) + c * Math.sin(D)) / Math.sin(z + Ga / 2)), isNaN(K) && (K = 0), D = 180 * K / Ga, 2 * D >= h && (L && (D = m(h, \"HFOV\", d._fovtype), D < e && (e = D)), D = h / 2));\n 360 > h && (L = !1, u[0] = h, u[1] = v + D, u[2] = l - D, y && (f - D < v ? (f = v + D, L = !0) : f + D > l && (f = l - D, L = !0)), L && (Pa.stopFrictions(1), 0 != za.currentmovingspeed && (za.currentmovingspeed = 0, za.speed *= -1)));\n d._limits = u;\n d._fov = e;\n d._hlookat = f;\n d._vlookat = w;\n e = m(e, d._fovtype, \"MFOV\");\n 0 < x && 0 == r ? (l = m(e, \"MFOV\", \"VFOV\"), x = Math.asin(1E3 * Math.sin(l * Y * .5) / (1E3 + .72 * k)), x = .5 * ya / Math.tan(x)) : x = .5 * uc / Math.tan(e / 114.591559);\n d.hfov = m(e, \"MFOV\", \"HFOV\");\n d.vfov = m(e, \"MFOV\", \"VFOV\");\n d.r_fov = e;\n d.r_zoom = x;\n d.r_zoff = k;\n d.r_vlookat = w;\n r = Number(d._architectural);\n y = 0;\n 0 < r && (1 == d._architecturalonlymiddle && (y = Math.abs(w / 90), 1 < y && (y = 1), y = Math.tan(y * Ga * .25), r *= 1 - y), y = r * (-w * (ya / Math.tan(m(e, \"MFOV\", \"VFOV\") / 114.591559)) / 90), w *= 1 - r);\n d.r_yoff = y;\n Yd(d.r_rmatrix, f, w, a);\n d.r_hlookat = f;\n d.r_vlookatA = w;\n d.r_roll = a;\n e = 0 == b.realDesktop && b.ios && 5 > b.iosversion || b.androidstock || be ? \"\" : \"px\";\n ic = 0 == b.simulator && (b.iphone || b.ipad) ? .25 : 1;\n b.ie && (ic = p.r_zoom / 1E3 * 10);\n if (b.androidstock || b.android && b.chrome || b.blackberry)ic = p.r_zoom / 1E3 / 4;\n $d = _[303] + x + e + _[106] + -a + _[86] + (x - k / 2 * ic) + \"px) \";\n d.haschanged = !1\n };\n d.getState = function (a) {\n null == a && (a = {h: 0, v: 0, z: 0, r: 0, zf: 0, yf: 0, ch: 0, vr: null});\n a.h = d._hlookat;\n a.v = d.r_vlookatA;\n a.z = d.r_zoom;\n a.r = d._camroll;\n a.zf = d.r_zoff;\n a.yf = d.r_yoff;\n a.ch = d._pannini;\n return a\n };\n d.defaults()\n }, uf = function () {\n var a = this;\n a.defaults = function () {\n a.usercontrol = \"all\";\n a.mousetype = _[27];\n a.touchtype = _[485];\n a.mouseaccelerate = 1;\n a.mousespeed = 10;\n a.mousefriction = .8;\n a.mouseyfriction = 1;\n a.mousefovchange = 1;\n a.keybaccelerate = .5;\n a.keybspeed = 10;\n a.keybfriction = .9;\n a.keybfovchange = .75;\n a.keybinvert = !1;\n a.fovspeed = 3;\n a.fovfriction = .9;\n a.camrollreset = !0;\n a.keycodesleft = \"37\";\n a.keycodesright = \"39\";\n a.keycodesup = \"38\";\n a.keycodesdown = \"40\";\n a.keycodesin = \"\";\n a.keycodesout = \"\";\n a.touchfriction = .87;\n a.touchzoom = !0;\n a.zoomtocursor = !1;\n a.zoomoutcursor = !0;\n a.disablewheel = !1;\n a.bouncinglimits = !1;\n a.preventTouchEvents = !0\n };\n a.defaults()\n }, vf = function () {\n var a = this;\n a.standard = _[5];\n a.dragging = \"move\";\n a.moving = \"move\";\n a.hit = _[18];\n a.update = function (b, m) {\n void 0 === b && (b = O.down);\n var f = F(ia.mousetype);\n V.controllayer.style.cursor = b ? _[27] == f ? a.moving : a.dragging : m ? a.hit : a.standard\n }\n }, rf = function () {\n var a = this;\n a.haschanged = !1;\n a.mode = _[50];\n a.pixelx = 0;\n a.pixely = 0;\n a.pixelwidth = 0;\n a.pixelheight = 0;\n va(a, _[50], _[66]);\n va(a, \"x\", \"0\");\n va(a, \"y\", \"0\");\n va(a, _[49], \"100%\");\n va(a, _[28], \"100%\");\n va(a, \"left\", \"0\");\n va(a, \"top\", \"0\");\n va(a, _[3], \"0\");\n va(a, _[2], \"0\");\n a.calc = function (b, m) {\n var f = 1 / X, g = _[71] == F(a.mode), n = g ? a._left : a._x, k = g ? a._top : a._y, e = g ? a._right : a._width, p = g ? a._bottom : a._height, n = 0 < n.indexOf(\"%\") ? parseFloat(n) / 100 * b * f : Number(n), e = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * b * f : Number(e), k = 0 < k.indexOf(\"%\") ? parseFloat(k) / 100 * m * f : Number(k), p = 0 < p.indexOf(\"%\") ? parseFloat(p) / 100 * m * f : Number(p), n = n / f, k = k / f, e = e / f, p = p / f;\n g ? (e = b - n - e, p = m - k - p) : (g = F(a._align), 0 <= g.indexOf(\"left\") || (n = 0 <= g.indexOf(_[3]) ? b - e - n : (b - e) / 2 + n), 0 <= g.indexOf(\"top\") || (k = 0 <= g.indexOf(_[2]) ? m - p - k : (m - p) / 2 + k));\n a.pixelx = Math.round(n * f);\n a.pixely = Math.round(k * f);\n g = !1;\n n = Math.round(e);\n e = Math.round(p);\n if (Qa != n || ya != e)g = !0, Qa = n, ya = e;\n a.pixelwidth = n * f;\n a.pixelheight = e * f;\n a.haschanged = !1;\n return g\n }\n }, Wc = !1, Ob = function () {\n function a() {\n var a = c._alpha;\n _[1] == c._type && (a *= qc);\n var b = 255 * a | 0;\n b == c._aa || c.GL || (c.sprite && (c.sprite.style.opacity = a, c._aa = b), c._poly && (c._poly.style.opacity = a, c._aa = b));\n c._autoalpha && (a = 0 < a, a != c._visible && (c.visible = a))\n }\n\n function d() {\n if (c.sprite && null != c._zorder) {\n var a = parseInt(c._zorder);\n !isNaN(a) && 0 <= a ? (c.sprite.style.zIndex = J + a, c._zdeep = a, c._deepscale = 100 / (200 + a)) : (c._zdeep = 0, c._deepscale = .5)\n }\n _[1] == c._type && (Wc = !0)\n }\n\n function p() {\n c.sprite && (c.sprite.style.overflow = c._maskchildren ? _[6] : _[12], z && b.safari && u())\n }\n\n function f(a, b) {\n b && (b = a._enabled) && _[15] == a.type && (b = 0 != a.bgcapture);\n a._enabledstate = 1 * b + 2 * a._handcursor;\n var c = a.sprite.style;\n c.cursor = b && a._handcursor ? _[18] : _[5];\n c.pointerEvents = b ? \"auto\" : \"none\";\n 0 == b && a.hovering && (a.hovering = !1);\n if (c = a._childs) {\n var d, e, g;\n e = c.length;\n for (d = 0; d < e; d++)(g = c[d]) && g.sprite && f(g, b)\n }\n }\n\n function g() {\n if (c.sprite) {\n var a = c._enabled;\n z && (a &= c.bgcapture);\n if (a && c._parent)a:{\n for (a = n(c._parent); a;) {\n if (0 == a._enabled || 0 == a.children) {\n a = !1;\n break a\n }\n if (a._parent)a = n(a._parent); else break\n }\n a = !0\n }\n 1 * a + 2 * c._handcursor != c._enabledstate && f(c, a)\n }\n }\n\n function n(a) {\n var b = null;\n if (a) {\n var b = a = F(a), c = xa, d = a.indexOf(\"[\");\n 0 < d && (b = a.slice(0, d), _[1] == b && (c = Ua), a = a.slice(d + 1, a.indexOf(\"]\")));\n if (\"stage\" == b)return null == Ra.sprite && (Ra.sprite = V.viewerlayer, Ra.loaded = !0), Ra;\n if (_[468] == b)return null == Za.sprite && (a = Ja(), b = a.style, b.position = _[0], b.width = \"100%\", b.height = \"100%\", b.overflow = _[6], b.zIndex = \"0\", b.pointerEvents = \"none\", V.controllayer.parentNode.insertBefore(a, V.controllayer), Za.sprite = a, Za.loaded = !0), Za;\n b = c.getItem(a)\n }\n return b\n }\n\n function k(a) {\n if (c._parent != a) {\n if (c._parent) {\n var b = n(c._parent);\n if (b) {\n var d = b._childs;\n if (d) {\n var e, f;\n f = d.length;\n for (e = 0; e < f; e++)if (d[e] === c) {\n d.splice(e, 1);\n f--;\n break\n }\n 0 == f && (d = null);\n b._childs = d;\n b.poschanged = !0\n }\n }\n }\n a && ((b = n(a)) ? b.sprite ? (null == b._childs && (b._childs = []), b._use_css_scale = !1, c._use_css_scale = !1, b._childs.push(c), b.sprite.appendChild(c.sprite), b.poschanged = !0) : setTimeout(function () {\n c._parent = null;\n k(a)\n }, 16) : a = null);\n null == a && V.pluginlayer.appendChild(c.sprite);\n c._parent = a;\n c.poschanged = !0;\n g()\n }\n }\n\n function e(a) {\n (a = this.kobject) && 0 == D && (a = a.url, 0 < F(a).indexOf(\".swf\") ? la(2, c._type + \"[\" + c.name + _[78] + Vd(a)) : (a && _[74] == a.slice(0, 5) && 50 < a.length && (a = a.slice(0, 50) + \"...\"), la(3, c._type + \"[\" + c.name + _[85] + a)))\n }\n\n function w(a) {\n if (S && (Pa.trackTouch(a), ba(L, a.type, w, !0), _[4] == a.type ? (aa.body.style.webkitUserSelect = aa.body.style.backupUserSelect, ba(L, _[10], x, !0), ba(L, _[4], w, !0)) : (ba(L, b.browser.events.touchmove, x, !0), ba(L, b.browser.events.touchend, w, !0)), S.pressed)) {\n S.pressed = !1;\n if (S._ondowncrop || S._onovercrop)S.hovering && S._onovercrop ? h(S, S._onovercrop) : h(S, S._crop);\n da.callaction(S.onup, S);\n K || da.blocked || da.callaction(S.onclick, S)\n }\n }\n\n function x(a, c) {\n var d = a.changedTouches && 0 < a.changedTouches.length ? a.changedTouches[0] : a, e = d.pageX, d = d.pageY;\n !0 === c ? I = [e, d] : I ? 0 == K && (e -= I[0], d -= I[1], Math.sqrt(e * e + d * d) >= (b.touchdevice ? 11 : 4) && (K = !0)) : (I = null, ba(L, a.type, x, !0))\n }\n\n function v(a, d) {\n var e = a.timeStamp | 0, f = !0;\n switch (a.type) {\n case _[34]:\n case _[8]:\n case _[16]:\n 1 == d && (e = _[15] == S.type, y(S) && (!e || e && S.bgcapture) && S._handcursor && (c.sprite.style.cursor = _[18]));\n e = S.sprite;\n for (f = 0; e;) {\n var g = e.kobject;\n if (g) {\n var k = g._enabled;\n 0 == b.pointerEvents && (k = y(g));\n if (0 == k || 0 < f && 0 == g.children)return;\n f++;\n e = e.parentNode\n } else break\n }\n for (f = S.sprite; f;) {\n if (g = f.kobject)g.enabled && 0 == g.hovering && (g.hovering = !0, 0 == g.pressed && g._onovercrop && h(g, g._onovercrop), da.blocked || da.callaction(g.onover, g)); else break;\n f = f.parentNode\n }\n break;\n case _[35]:\n case _[9]:\n case _[17]:\n for (e = (f = a.relatedTarget) ? f.kobject : null; f && null == e;)if (f = f.parentNode)e = f.kobject; else break;\n for (f = S.sprite; f;) {\n if (g = f.kobject) {\n for (var k = !1, l = e; l;) {\n if (g == l) {\n k = !0;\n break\n }\n if (l.sprite && l.sprite.parentNode)l = l.sprite.parentNode.kobject; else break\n }\n if (0 == k)1 == g.hovering && (g.hovering = !1, 0 == g.pressed && g._onovercrop && h(g, g._crop), da.callaction(g.onout, g)); else break\n } else break;\n f = f.parentNode\n }\n break;\n case _[7]:\n if (500 < e && 500 > e - kc) {\n kc = 0;\n break\n }\n if (f = 0 == (a.button | 0))aa.body.style.backupUserSelect = aa.body.style.webkitUserSelect, aa.body.style.webkitUserSelect = \"none\", x(a, !0), R(L, _[4], w, !0), R(L, _[10], x, !0), K = !1, S.pressed = !0, S._ondowncrop && h(S, S._ondowncrop), da.blocked || da.callaction(S.ondown, S);\n break;\n case b.browser.events.touchstart:\n kc = e;\n Pa.trackTouch(a);\n if (Pa.isMultiTouch())break;\n K = !1;\n if (f = 0 == (a.button | 0))x(a, !0), R(L, b.browser.events.touchend, w, !0), R(L, b.browser.events.touchmove, x, !0), S.pressed = !0, S._ondowncrop && h(S, S._ondowncrop), da.blocked || da.callaction(S.ondown, S)\n }\n }\n\n function r(a, b) {\n if (a === b)return !1;\n for (; b && b !== a;)b = b.parentNode;\n return b === a\n }\n\n function y(a) {\n if (a._enabled) {\n for (a = a.sprite; a;)if ((a = a.parentNode) && a.kobject && 0 == a.kobject._enabled)return !1;\n return !0\n }\n return !1\n }\n\n function l(a) {\n cb = Ta();\n var d = a.type;\n if (_[7] != d && d != b.browser.events.touchstart || !da.isblocked()) {\n var e = a.target.kobject;\n _[34] == d ? d = _[8] : _[35] == d && (d = _[9]);\n null == e && (e = c);\n if ((_[8] != d && _[9] != d || 4 == a.pointerType || _[19] == a.pointerType) && e) {\n var e = a.timeStamp, f = c._eP;\n e != c._eT && (f = 0);\n if (_[16] == d || _[8] == d) {\n var h = a.relatedTarget;\n if (this === h || r(this, h))return\n } else if (_[17] == d || _[9] == d)if (h = a.relatedTarget, this === h || r(this, h))return;\n 0 == e && (_[16] == d && 0 == c.hovering ? f = 0 : _[17] == d && 1 == c.hovering && (f = 0));\n d = c._enabled;\n 0 == b.pointerEvents && (d = y(c));\n if (d && (!z || z && c.bgcapture))0 == c.children && a.stopPropagation(), 0 == f && (0 == c.children && 1 == a.eventPhase || 2 <= a.eventPhase) && (f = 1, c.jsplugin && c.jsplugin.hittest && (d = V.getMousePos(a.changedTouches ? a.changedTouches[0] : a, c.sprite), c.jsplugin.hittest(d.x * c.imagewidth / c.pixelwidth, d.y * c.imageheight / c.pixelheight) || (f = 2)), 1 == f && (S = c, v(a), c.capture && (null != c.jsplugin && r(V.controllayer, c.sprite) || 0 == (a.target && \"A\" == a.target.nodeName) && Aa(a), a.stopPropagation()))); else if (0 == b.pointerEvents && aa.msElementsFromPoint && 0 == f && 2 == a.eventPhase && (h = a.type, d = _[4] == h || _[17] == h || _[35] == h || _[9] == h || h == b.browser.events.touchend, _[7] == h || _[16] == h || _[34] == h || _[8] == h || h == b.browser.events.touchstart || d) && (h = aa.msElementsFromPoint(a.clientX, a.clientY))) {\n var k = [], l, n, m = null, m = null;\n for (l = 0; l < h.length; l++)if (m = h[l], m = m.kobject)k.push(m); else break;\n d && g();\n if (d && Z)for (l = 0; l < Z.length; l++) {\n var m = Z[l], p = !1;\n for (n = 0; n < k.length; n++)k[n] === m && (p = !0);\n 0 == p && (f = 1, S = m, v(a, !0), m.capture && (null == c.jsplugin && Aa(a), a.stopPropagation()))\n }\n for (l = 0; l < h.length; l++)if (m = h[l], m = m.kobject) {\n if (n = _[15] == m.type, 1 == (y(m) && (!n || n && m.bgcapture)) || d)if (f = 1, S = m, v(a, !0), m.capture) {\n null == c.jsplugin && Aa(a);\n a.stopPropagation();\n break\n }\n } else break;\n Z = k\n }\n c._eT = e;\n c._eP = f\n }\n }\n }\n\n function u() {\n var a = c.sprite;\n if (a) {\n var a = a.style, d = Number(c._bgcolor), e = Number(c._bgalpha), f = X;\n isNaN(d) && (d = 0);\n isNaN(e) && (e = 0);\n var g = (\"\" + c._bgborder).split(\" \"), h = Ib(g[0], f, \",\"), k = g[1] | 0, g = Number(g[2]);\n isNaN(g) && (g = 1);\n if (h[0] != q[0] || h[3] != q[3])q = h, c.poschanged = !0;\n 0 == e ? a.background = \"none\" : a.backgroundColor = ca(d, e);\n var d = Ib(c.bgroundedge, f * c._scale, \" \"), e = \"\", l = c.bgshadow;\n if (l) {\n var n = (\"\" + l).split(\",\"), m, p;\n p = n.length;\n for (m = 0; m < p; m++) {\n var r = Ha(n[m]).split(\" \"), u = r.length;\n if (4 < u) {\n var v = 5 < u ? 1 : 0;\n \"\" != e && (e += \", \");\n e += r[0] * f + \"px \" + r[1] * f + \"px \" + r[2] * f + \"px \" + (v ? r[3] * f : 0) + \"px \" + ca(r[3 + v] | 0, r[4 + v]) + (6 < u ? \" \" + r[6] : \"\")\n }\n }\n }\n if (b.safari || b.ios)a.webkitMaskImage = c._maskchildren && !l && 0 < d[0] + d[1] + d[2] + d[3] ? _[167] : \"\";\n a[pc] = e;\n a.borderStyle = \"solid\";\n a.borderColor = ca(k, g);\n a.borderWidth = h.join(\"px \") + \"px\";\n a.borderRadius = d.join(\"px \") + \"px\"\n }\n }\n\n function h(a, b) {\n var c = 0, d = 0, e = a.loader;\n e && (c = e.naturalWidth, d = e.naturalHeight);\n b && (b = String(b).split(\"|\"), 4 == b.length && (c = b[2], d = b[3]));\n null == a.jsplugin && 0 == a._isNE() && (a.imagewidth = c, a.imageheight = d, e = a._gOSF(), e & 1 && (a._width = String(c)), e & 2 && (a._height = String(d)));\n a.updatepos()\n }\n\n var c = this;\n c.prototype = Fb;\n this.prototype.call(this);\n c._type = _[29];\n c.layer = c.plugin = new bb(Ob);\n c.createvar = function (a, b, d) {\n var e = \"_\" + a;\n c[e] = void 0 === b ? null : b;\n c.__defineGetter__(a, function () {\n return c[e]\n });\n void 0 !== d ? c.__defineSetter__(a, function (a) {\n c[e] = a;\n d()\n }) : c.__defineSetter__(a, function (a) {\n c[e] = a;\n c.poschanged = !0\n })\n };\n var K = !1, D = !1, z = !1, q = [0, 0, 0, 0], J = 0, C = 3, Q = !1;\n c._isNE = function () {\n return D\n };\n c._gOSF = function () {\n return C\n };\n c.haveUserWidth = function () {\n return 0 == (C & 1)\n };\n c.haveUserHeight = function () {\n return 0 == (C & 2)\n };\n c.sprite = null;\n c.loader = null;\n c.jsplugin = null;\n c._use_css_scale = !1;\n c._finalxscale = 1;\n c._finalyscale = 1;\n c._hszscale = 1;\n c._eT = 0;\n c._eP = 0;\n c._pCD = !1;\n c.MX = Ma();\n c.__defineGetter__(\"type\", function () {\n return _[57] == c.url ? _[15] : _[75]\n });\n c.__defineSetter__(\"type\", function (a) {\n _[15] == F(a) && (c.url = _[57])\n });\n c.imagewidth = 0;\n c.imageheight = 0;\n c.pixelwidth = 0;\n c.pixelheight = 0;\n c._pxw = 0;\n c._pxh = 0;\n c.pressed = !1;\n c.hovering = !1;\n c.loading = !1;\n c.loaded = !1;\n c.loadedurl = null;\n c.loadingurl = null;\n c.preload = !1;\n c._ispreload = !1;\n c.keep = !1;\n c.poschanged = !1;\n c.style = null;\n c.capture = !0;\n c.children = !0;\n c.pixelx = 0;\n c.pixely = 0;\n c._deepscale = .5;\n c._zdeep = 0;\n c.accuracy = 0;\n c._dyn = !1;\n c.onloaded = null;\n c.altonloaded = null;\n c.maxwidth = 0;\n c.minwidth = 0;\n c.maxheight = 0;\n c.minheight = 0;\n c.onover = null;\n c.onhover = null;\n c.onout = null;\n c.onclick = null;\n c.ondown = null;\n c.onup = null;\n c.onloaded = null;\n var A = c.createvar, H = function (a, b) {\n var d = \"_\" + a;\n c[d] = null;\n c.__defineGetter__(a, function () {\n return c[d]\n });\n c.__defineSetter__(a, b)\n };\n A(_[472], !0, g);\n A(_[353], !0, g);\n A(_[302], !1, p);\n A(_[415], null, function () {\n var a = c._jsborder;\n 0 >= parseInt(a) && (c._jsborder = a = null);\n c.sprite && (c.sprite.style.border = a);\n null != a && (c._use_css_scale = !1)\n });\n A(_[512], null, function () {\n if (null != c.sprite) {\n var a = c._alturl;\n c._alturl = null;\n c.url = a\n }\n });\n A(\"url\", null, function () {\n if (\"\" == c._url || \"null\" == c._url)c._url = null;\n null != c._url ? c.reloadurl() : (c.jsplugin && c.jsplugin.unloadplugin && c.jsplugin.unloadplugin(), c.jsplugin = null, c.loadedurl = null, c.loadingurl = null, c.loading = !1, c.loaded = !1)\n });\n A(\"scale\", 1, function () {\n c.poschanged = !0;\n z && u()\n });\n A(_[277], !1, function () {\n Q = !0\n });\n A(_[516], 0);\n A(\"alpha\", 1, a);\n A(_[403], !1, a);\n A(_[503], null, d);\n H(_[12], function (a) {\n a = pa(a);\n if (c._visible != a && (c._visible = a, c._poly && (c._poly.style.visibility = a ? _[12] : _[6]), c.sprite)) {\n var b = !0;\n c.jsplugin && c.jsplugin.onvisibilitychanged && (b = !0 !== c.jsplugin.onvisibilitychanged(a));\n b && (0 == a ? c.sprite.style.display = \"none\" : c.poschanged = !0)\n }\n });\n c._visible = !0;\n A(\"crop\", null, function () {\n h(c, c._crop)\n });\n c._childs = null;\n c._parent = null;\n c.__defineGetter__(_[149], function () {\n return c._parent\n });\n c.__defineSetter__(_[149], function (a) {\n if (null == a || \"\" == a || \"null\" == F(a))a = null;\n c.sprite ? k(a) : c._parent = a\n });\n for (var N = [_[50], \"edge\", _[341], _[339]], ea = 0; ea < N.length; ea++)A(N[ea]);\n H(_[49], function (a) {\n 0 == 0 * parseFloat(a) ? C &= 2 : a && \"prop\" == a.toLowerCase() ? (a = \"prop\", C &= 2) : (a = null, C |= 1);\n c._width = a;\n c.poschanged = !0\n });\n H(_[28], function (a) {\n 0 == 0 * parseFloat(a) ? C &= 1 : a && \"prop\" == a.toLowerCase() ? (a = \"prop\", C &= 1) : (a = null, C |= 2);\n c._height = a;\n c.poschanged = !0\n });\n H(\"x\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._x = a;\n c.poschanged = !0\n });\n H(\"y\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._y = a;\n c.poschanged = !0\n });\n H(\"ox\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._ox = a;\n c.poschanged = !0\n });\n H(\"oy\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._oy = a;\n c.poschanged = !0\n });\n c.loadstyle = function (a) {\n da.assignstyle(c.getfullpath(), a)\n };\n c.getmouse = function (a) {\n var b = 0, d = 0, d = V.controllayer, e = c.sprite, f = d.getBoundingClientRect(), g = e.getBoundingClientRect(), b = O.x - g.left - e.clientLeft + f.left + d.clientLeft, d = O.y - g.top - e.clientTop + f.top + d.clientTop;\n a && (b = b * c.imagewidth / c.pixelwidth, d = d * c.imageheight / c.pixelheight);\n return {x: b, y: d}\n };\n c._assignEvents = function (a) {\n Pa.touch && (R(a, b.browser.events.touchstart, l, !0), R(a, b.browser.events.touchstart, l, !1));\n Pa.mouse && (R(a, _[7], l, !0), R(a, _[7], l, !1));\n b.desktop && (Pa.mouse || b.ie) && (0 == Pa.mouse && b.ie ? (R(a, b.browser.events.pointerover, l, !0), R(a, b.browser.events.pointerover, l, !1), R(a, b.browser.events.pointerout, l, !0), R(a, b.browser.events.pointerout, l, !1)) : (R(a, _[16], l, !0), R(a, _[16], l, !1), R(a, _[17], l, !0), R(a, _[17], l, !1)))\n };\n c.create = function () {\n c._pCD = !0;\n c.alturl && (c.url = c.alturl, c._alturl = null);\n c.altscale && (c.scale = c.altscale, delete c.altscale);\n var b = c.sprite = Ja(), f = c.loader = Ja(1);\n b.kobject = c;\n f.kobject = c;\n b.style.display = \"none\";\n b.style.position = _[0];\n J = _[29] == c._type ? 3001 : 2001;\n b.style.zIndex = J;\n p();\n g();\n a();\n d();\n c._jsborder && (c.jsborder = c._jsborder);\n c._assignEvents(b);\n R(f, _[48], e, !0);\n R(f, \"load\", c.loadurl_done, !1);\n if (b = c._parent)c._parent = null, k(b);\n null != c._url && c.reloadurl()\n };\n c.destroy = function () {\n c.jsplugin && c.jsplugin.unloadplugin && c.jsplugin.unloadplugin();\n c._GL_onDestroy && c._GL_onDestroy();\n c.jsplugin = null;\n c.loaded = !1;\n c._destroyed = !0;\n c.parent = null;\n var a = c._childs;\n if (a) {\n var b, d, a = a.slice();\n d = a.length;\n for (b = 0; b < d; b++)a[b].parent = null;\n c._childs = null\n }\n };\n c.getfullpath = function () {\n return c._type + \"[\" + c.name + \"]\"\n };\n c.changeorigin = function () {\n var a = arguments, b = null, d = null;\n if (0 < a.length) {\n var e = null, f = 0, g = 0, h = 0, k = 0, l = X, m = Qa / l, p = ya / l, q = c._parent;\n q && (q = n(q)) && (0 == c._use_css_scale ? (m = q._pxw * l, p = q._pxh * l) : (m = q.imagewidth * l, p = q.imageheight * l));\n l = c.imagewidth;\n q = c.imageheight;\n b = 0;\n e = String(c._width);\n \"\" != e && null != e && (0 < e.indexOf(\"%\") ? l = parseFloat(e) / 100 * m : \"prop\" == e.toLowerCase() ? b = 1 : l = e);\n e = String(c._height);\n \"\" != e && null != e && (0 < e.indexOf(\"%\") ? q = parseFloat(e) / 100 * p : \"prop\" == e.toLowerCase() ? b = 2 : q = e);\n 1 == b ? l = q * c.imagewidth / c.imageheight : 2 == b && (q = l * c.imageheight / c.imagewidth);\n b = d = F(a[0]);\n 1 < a.length && (d = F(a[1]));\n var a = String(c._align), r = c._edge ? F(c._edge) : \"null\";\n if (\"null\" == r || _[498] == r)r = a;\n (e = String(c._x)) && (f = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * m : parseFloat(e));\n isNaN(f) && (f = 0);\n (e = String(c._y)) && (g = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * p : parseFloat(e));\n isNaN(g) && (g = 0);\n if (e = a)h = 0 <= e.indexOf(\"left\") ? 0 + f : 0 <= e.indexOf(_[3]) ? m - f : m / 2 + f, k = 0 <= e.indexOf(\"top\") ? 0 + g : 0 <= e.indexOf(_[2]) ? p - g : p / 2 + g;\n 1 != c._scale && (l *= c._scale, q *= c._scale);\n h = 0 <= r.indexOf(\"left\") ? h + 0 : 0 <= r.indexOf(_[3]) ? h + -l : h + -l / 2;\n k = 0 <= r.indexOf(\"top\") ? k + 0 : 0 <= r.indexOf(_[2]) ? k + -q : k + -q / 2;\n e = a = 0;\n a = 0 <= b.indexOf(\"left\") ? 0 + f : 0 <= b.indexOf(_[3]) ? m - f : m / 2 + f;\n e = 0 <= b.indexOf(\"top\") ? 0 + g : 0 <= b.indexOf(_[2]) ? p - g : p / 2 + g;\n a = 0 <= d.indexOf(\"left\") ? a + 0 : 0 <= d.indexOf(_[3]) ? a + -l : a + -l / 2;\n e = 0 <= d.indexOf(\"top\") ? e + 0 : 0 <= d.indexOf(_[2]) ? e + -q : e + -q / 2;\n c._align = b;\n c._edge = d;\n 0 <= b.indexOf(_[3]) ? c._x = String(f + a - h) : c._x = String(f - a + h);\n 0 <= b.indexOf(_[2]) ? c._y = String(g + e - k) : c._y = String(g - e + k)\n }\n };\n c.resetsize = function () {\n c.loaded && (c._width = String(c.imagewidth), c._height = String(c.imageheight), C = 3, c.poschanged = !0)\n };\n c.registercontentsize = function (a, b) {\n null != a && (c.imagewidth = Number(a), C & 1 && (c._width = String(a)));\n null != b && (c.imageheight = Number(b), C & 2 && (c._height = String(b)));\n c.poschanged = !0\n };\n var I = null, S = null, Z = null;\n\n\n\n\n /**\n * Created by sohow on 16-6-15.\n */\n\n var krpanoplugin2 = function () {\n function Er(e) {\n return \".yes.on.true.1\"[s]((\".\" + e)[c]()) >= 0\n }\n\n function Sr(e) {\n }\n\n function xr() {\n ar = 0;\n if (Tn[at] || _n)if (Tn[_]) {\n var e = (\"\" + navigator.userAgent)[c]()[s](\"ucbrowser\") > 0;\n Tn.chrome || Tn[Ht] ? ar = 2 : e && (ar = 2)\n } else ar = 2;\n if (ar > 0) {\n Vn == 0 && (ar = 1);\n if (Tn[E] && _n)setTimeout(Nr, 10); else {\n window[u](ar == 1 ? f : h, Cr, t);\n var i = Nn[l] != \"\" && Nn[l] != n;\n setTimeout(Nr, Tn[E] ? 10 : i ? 1500 : 3e3)\n }\n } else sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Tr() {\n sr == t && (sr = r, er = r, tr = r, nr = r, rr = t, Rr(), xn[J](Nn[O], Nn))\n }\n\n function Nr() {\n window[o](f, Cr, t), window[o](h, Cr, t), Tn[E] && _n ? Tr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Cr(e) {\n window[o](e.type, Cr, t), e.type == f || e.type == h && e[K] && e.rotationRate ? (sr = r, er = r, tr = r, Tn[E] && (nr = r), Rr(), xn[J](Nn[O], Nn)) : Tn[E] && _n ? Tr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function jr(e) {\n var i;\n for (i = 0; i < e[kt]; i++)if (e[i] instanceof HMDVRDevice) {\n kr = e[i], kr[F] ? (Dr = kr[F](mt), Pr = kr[F](Tt), Ar = Dr[pn], Or = Pr[pn], Mr = Dr[Et], _r = Pr[Et]) : kr[$] && kr[C] && (Ar = kr[$](mt), Or = kr[$](Tt), Mr = kr[C](mt), _r = kr[C](Tt));\n var s = 2 * Math.max(Mr.leftDegrees, Mr.rightDegrees), o = 2 * Math.max(Mr.upDegrees, Mr.downDegrees);\n Br = Math.max(s, o);\n break\n }\n for (i = 0; i < e[kt]; i++)if (e[i] instanceof PositionSensorVRDevice)if (kr == n || kr[vn] == e[i][vn]) {\n Lr = e[i];\n break\n }\n kr || Lr ? (er = r, Xn == t && Tn[_] && (rr = r), xn[J](Nn[O], Nn)) : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Ir(e) {\n Zn = e;\n if (e) {\n Fr = {\n imagehfov: xn.image.hfov,\n continuousupdates: xn[p][g],\n usercontrol: xn[y][it],\n mousetype: xn[y][St],\n contextmenu_touch: xn[Rt].touch,\n loadwhilemoving: xn[m][A],\n stereo: xn[m][Ct],\n stereooverlap: xn[m][j],\n hlookat: xn[p][V],\n vlookat: xn[p][jt],\n camroll: xn[p][an],\n fovmin: xn[p][ft],\n fovmax: xn[p][ht],\n fisheye: xn[p][X],\n fov: xn[p].fov,\n maxpixelzoom: xn[p][d],\n fovtype: xn[p][G],\n stereographic: xn[p][x],\n fisheyefovlink: xn[p][b],\n pannini: xn[p][nt],\n architectural: xn[p][v],\n limitview: xn[p][T],\n area_mode: xn[Lt].mode,\n area_align: xn[Lt].align,\n area_x: xn[Lt].x,\n area_y: xn[Lt].y,\n area_width: xn[Lt][Y],\n area_height: xn[Lt][N],\n maxmem: xn.memory[en]\n }, xn[Lt].mode = \"align\", xn[Lt].align = \"lefttop\", xn[Lt].x = \"0\", xn[Lt].y = \"0\", xn[Lt][Y] = \"100%\", xn[Lt][N] = \"100%\", xn[Rt].touch = t, xn[p][g] = r, nr && Tn[E] && !mr ? xn[y][St] = \"drag2d\" : xn[y][it] = \"off\", xn[m][Ct] = r, xn[m][A] = r, xn[p][T] = \"off\", xn[p][nt] = 0, xn[p][v] = 0, xn[p][G] = \"VFOV\", xn[p][ft] = 0, xn[p][ht] = 179, xn[p][X] = 0, xn[p].fov = Br, xn[p][d] = 0, xn[p][x] = r, xn[p][b] = 0, cr = xn[p][V], ci = 0, Tn[E] || (cr -= Ci()), ui();\n if (tr || rr)zr(0, 0), nr && Tn[E] && !mr || (xn[yt] = r);\n ri(), Dn && oi(r), xn.set(\"events[__webvr].keep\", r), xn.set(\"events[__webvr].onnewpano\", ii), xn.set(\"events[__webvr].onresize\", si), (tr || rr) && Ko(r), xn[J](Nn.onentervr, Nn)\n } else if (Fr) {\n xn.set(\"events[__webvr].name\", n), xn[p][g] = Fr[g], xn[y][it] = Fr[it], xn[y][St] = Fr[St], xn[Rt].touch = Fr.contextmenu_touch, xn[m][A] = Fr[A], xn[m][Ct] = Fr[Ct], xn[m][j] = Fr[j], xn[p][an] = 0;\n if (Fr.imagehfov == xn.image.hfov)xn[p][ft] = Fr[ft], xn[p][ht] = Fr[ht], xn[p].fov = Fr.fov, xn[p][d] = Fr[d], xn[p][G] = Fr[G], xn[p][T] = Fr[T], xn[p][X] = Fr[X], xn[p][x] = Fr[x], xn[p][b] = Fr[b], xn[p][nt] = Fr[nt], xn[p][v] = Fr[v]; else {\n var i = xn.xml[p];\n xn[p][ft] = i && !isNaN(Number(i[ft])) ? Number(i[ft]) : 1, xn[p][ht] = i && !isNaN(Number(i[ht])) ? Number(i[ht]) : 140, xn[p].fov = i && !isNaN(Number(i.fov)) ? Number(i.fov) : 90, xn[p][X] = i && !isNaN(Number(i[X])) ? Number(i[X]) : 0, xn[p][nt] = i && !isNaN(Number(i[nt])) ? Number(i[nt]) : 0, xn[p][v] = i && !isNaN(Number(i[v])) ? Number(i[v]) : 0, xn[p][d] = i && !isNaN(Number(i[d])) ? Number(i[d]) : 2, xn[p][G] = i && i[G] ? i[G] : \"MFOV\", xn[p][T] = i && i[T] ? i[T] : pt, xn[p][x] = r, xn[p][b] = .5\n }\n xn[Lt].mode = Fr.area_mode, xn[Lt].align = Fr.area_align, xn[Lt].x = Fr.area_x, xn[Lt].y = Fr.area_y, xn[Lt][Y] = Fr.area_width, xn[Lt][N] = Fr.area_height, xn[W] = -1, xn[D] = t, xn.memory[en] = Fr[en], Fr = n, Qn && (ji(Qn, t), Qn = n), Ko(t), oi(t), ui(), xn[J](Nn.onexitvr, Nn)\n }\n }\n\n function Rr() {\n if (qr)return qr;\n var e = \"Unknown\", t = 0, n = 1536, r = Math.min(screen[Y], screen[N]), i = Math.max(screen[Y], screen[N]), o = window.devicePixelRatio || 1;\n if (Tn.iphone)if (i == 568) {\n var u = xn.webGL.context, a = \"\" + u.getParameter(u.VERSION);\n a[s](\"A8 GPU\") > 0 ? (e = ln, t = 4.7) : (e = \"iPhone 5\", t = 4, n = 1024)\n } else i == 667 ? o == 2 ? (e = ln, t = 4.7) : (e = on, t = 5.5) : i == 736 && (e = on, t = 5.5); else {\n var f = navigator.userAgent[c]();\n f[s](\"gt-n710\") >= 0 ? (t = 5.5, e = \"Note 2\") : f[s](\"sm-n900\") >= 0 ? (t = 5.7, e = \"Note 3\") : f[s](\"sm-n910\") >= 0 ? (t = 5.7, e = \"Note 4\") : f[s](\"gt-i930\") >= 0 || f[s](sn) >= 0 ? (t = 4.7, e = \"Galaxy S3\") : f[s](\"gt-i950\") >= 0 || f[s](sn) >= 0 ? (t = 5, e = \"Galaxy S4\") : f[s](\"sm-g900\") >= 0 || f[s](\"sc-04f\") >= 0 || f[s](\"scl23\") >= 0 ? (t = 5.1, e = \"Galaxy S5\") : f[s](\"sm-g920\") >= 0 || f[s](\"sm-g925\") >= 0 ? (t = 5.1, e = \"Galaxy S6\") : f[s](\"lg-d85\") >= 0 || f[s](\"vs985\") >= 0 || f[s](\"lgls990\") >= 0 || f[s](\"lgus990\") >= 0 ? (t = 5.5, e = \"LG G3\") : f[s](\"lg-h810\") >= 0 || f[s](\"lg-h815\") >= 0 || f[s](\"lgls991\") >= 0 ? (t = 5.5, e = \"LG G4\") : f[s](\"xt1068\") >= 0 || f[s](\"xt1069\") >= 0 || f[s](\"xt1063\") >= 0 ? (t = 5.5, e = \"Moto G 2g\") : f[s](\"xt1058\") >= 0 ? (t = 5.2, e = \"Moto X 2g\") : f[s](\"d6653\") >= 0 || f[s](\"d6603\") >= 0 ? (t = 5.2, e = \"Xperia Z3\") : f[s](\"xperia z4\") >= 0 ? (t = 5.5, e = \"Xperia Z4\") : f[s](\"htc_p4550\") >= 0 || f[s](\"htc6525lv\") >= 0 || f[s](\"htc_pn071\") >= 0 ? (t = 5, e = \"One M8\") : f[s](\"nexus 4\") >= 0 ? (t = 4.7, e = \"Nexus 4\") : f[s](\"nexus 5\") >= 0 ? (t = 5, e = \"Nexus 5\") : f[s](\"nexus 6\") >= 0 ? (t = 6, e = \"Nexus 6\") : f[s](\"lumia 930\") >= 0 && (t = 5, e = \"Lumia 930\")\n }\n t == 0 && (xn[J](Nn[Nt], Nn), t = 5);\n var l = Math[Bt](t * t / (1 + r / i * (r / i))) * 25.4, h = l * r / i;\n return qr = {\n screendiagonal_inch: t,\n screenwidth_mm: l,\n screenheight_mm: h,\n screenwidth_px: i * o,\n screenheight_px: r * o,\n devicename: e,\n best_res: n\n }, qr\n }\n\n function Ur() {\n Fn < 1 ? Fn = 1 : Fn > 179.9 && (Fn = 179.9), In < 0 ? In = 0 : In > 5 && (In = 5);\n var e = qn[mn](\"|\"), t;\n for (t = 0; t < 4; t++) {\n var n = Number(e[t]);\n isNaN(n) && (n = t == 0 ? 1 : 0), Rn[t] = n\n }\n Un = Rn[0] != 1 || Rn[1] != 0 || Rn[2] != 0 || Rn[3] != 0, or[a] && (tr || rr) && (zr(0, 0), Ko(r))\n }\n\n function zr(e, n) {\n var i = Rr(), s = 0, o = 0, u = xn.webGL.canvas;\n if (u) {\n var a = Number(xn[m].framebufferscale);\n s = u[Y], o = u[N], !isNaN(a) && a != 0 && (s /= a, o /= a)\n }\n if (e <= 0 || n <= 0)e = s, n = o;\n var f = Fn, l = In;\n f = Math.tan(f * .5 * br), l = Math.exp(l) - 1;\n var c = Math.atan(f) * 2 / 2, h = l * 1e3, p = 1e3, d = p * Math.sin(c), v = p * Math.cos(c), g = 2 * Math.atan(d / (h + v));\n f = Math.tan(g / 2);\n var y = l, b = Hn;\n b /= jn;\n var w = i.screenwidth_mm, E = i.screenheight_mm;\n if (Bn > 0) {\n var S = Math.min(screen[Y], screen[N]), x = Math.max(screen[Y], screen[N]);\n w = Math[Bt](Bn * Bn / (1 + S / x * (S / x))) * 25.4, E = w * S / x\n }\n var T = w / 2 - b, C = 2 * (T / w), k = e, L = n, A = i.screenwidth_px, O = i.screenheight_px, M = r;\n if (nr || Tn.tablet || n > e)M = t;\n k <= 0 && (k = s), L <= 0 && (L = o);\n var _ = E / 70.9, D = f;\n D *= _, hr = _ / .69, M && (D *= L / O, C = 2 * (w * (k / A) / 2 - b) / (w * (k / A)));\n var P = 2 * Math.atan(D) * wr;\n pr = P, dr = y, vr = C, Wr()\n }\n\n function Wr() {\n var e = xn[p];\n pr > 0 && (e[X] = dr, e.fov = pr, e[ft] = pr, e[ht] = pr, e[d] = 0, e[G] = \"VFOV\", e[x] = r, e[b] = 0, e[T] = \"off\", xn[m][j] = vr)\n }\n\n function Xr() {\n return Tn[E] && kr && kr.deviceName ? kr.deviceName : (Rr(), qr ? qr[Gt] : \"\")\n }\n\n function Vr() {\n return qr ? qr.screendiagonal_inch : 0\n }\n\n function $r(e) {\n if ((\"\" + e)[c]() == pt)Bn = 0, Ur(); else {\n var t = parseFloat(e);\n if (isNaN(t) || t <= 0)t = 0;\n Bn = t, Ur()\n }\n }\n\n function Jr() {\n var e = Bn;\n return e <= 0 ? pt : e\n }\n\n function Kr() {\n return Tn[_] ? xn[m].viewerlayer : xn.webGL.canvas\n }\n\n function Qr() {\n xn.trace(0, \"update - stereo=\" + xn[m][Ct]), or[a] && (tr || rr) && (zr(0, 0), Ko(r))\n }\n\n function Gr() {\n if (er && Zn == t)if (tr == t) {\n var e = Kr();\n Sn[u](Tn[w][k][Yt], li), or[a] = r, Ir(r), ur = r, rr = t, Xn == t && Tn[_] && (rr = r), rr && (ur = t), e[Tn[w][k].requestfullscreen]({\n vrDisplay: kr,\n vrDistortion: ur\n }), Tn[at] && ei(xn[p][V]), ur == t && zr()\n } else {\n Sn[u](Tn[w][k][Yt], li), or[a] = r, Ir(r);\n if (Tn[at] || Tn.tablet)ar == 1 ? window[u](f, Mi, r) : ar == 2 && window[u](h, Bs, r);\n nr == t && Tn[w][k].touch && xn[y][$t][u](Tn[w][k][Kt], ni, t)\n }\n }\n\n function Yr() {\n or[a] = t, xn.get(yt) && xn.set(yt, t), window[o](f, Mi, r), window[o](h, Bs, r), Tn[w][k].touch && xn[y][$t][o](Tn[w][k][Kt], ni, t), Ir(t), xn[p].haschanged = r\n }\n\n function Zr() {\n er && (Zn ? Yr() : Gr())\n }\n\n function ei(e) {\n e === undefined ? e = 0 : (e = Number(e), isNaN(e) && (e = 0));\n var t = xn[p][V];\n if (Lr) {\n try {\n Lr.resetSensor !== undefined && Lr.resetSensor()\n } catch (n) {\n }\n try {\n Lr.zeroSensor !== undefined && Lr.zeroSensor()\n } catch (n) {\n }\n t = 0, cr = 0\n }\n nr && (xn[p][V] = e), cr = cr - t + e, ci = 0\n }\n\n function ni(e) {\n var i = t;\n if (Mn == t)i = r; else {\n var s = xn[y].getMousePos(e[fn] ? e[fn][0] : e);\n s.x /= xn.stagescale, s.y /= xn.stagescale;\n if (e.type == Tn[w][k][Kt])ti == n ? (ti = s, xn[y][$t][u](Tn[w][k][un], ni, r), xn[y][$t][u](Tn[w][k][gn], ni, r)) : i = r; else if (e.type == Tn[w][k][gn])i = r; else if (e.type == Tn[w][k][un] && ti) {\n var a = ti.x, f = s.x;\n if (xn[m][Ct]) {\n var l = xn.stagewidth * .5;\n (a >= l || f >= l) && (a < l || f < l) && (f = a)\n }\n var c = xn[cn](a, ti.y, t), h = xn[cn](f, s.y, t), p = h.x - c.x;\n ti = s, cr -= p\n }\n }\n i && (ti = n, xn[y][$t][o](Tn[w][k][un], ni, r), xn[y][$t][o](Tn[w][k][gn], ni, r))\n }\n\n function ri() {\n if (An == t)xn[W] = -1, xn[D] = t; else if (xn.image.type == \"cube\" && xn.image.multires) {\n var e = Rr().best_res, n = 0, s = -1, o = 0, u = xn.image.level.getArray(), a = u[kt];\n if (a > 0)for (i = 0; i < a; i++) {\n var f = u[i].tiledimagewidth, l = Math.abs(f - e);\n if (s == -1 || l < s)n = f, s = l, o = i\n }\n if (s > 0) {\n xn[W] = o, xn[D] = r;\n if (n > 0) {\n var c = 4 + 8 * (n * n * 6 + 1048575 >> 20);\n c > xn.memory[en] && (xn.memory[en] = c)\n }\n }\n }\n }\n\n function ii() {\n or[a] && ri()\n }\n\n function si() {\n ii(), Ur()\n }\n\n function ui() {\n fr = 0, ki.t = 0, Li.t = 0, yo(), So = 0, go = t, Ls = n\n }\n\n function fi(e) {\n ai == 1 ? (yr.apply(document), ai = 0) : (gr.apply(Kr()), ai = 1)\n }\n\n function li(e) {\n var n = Kr(), i = !!(Sn[Jt] || Sn[Mt] || Sn[zt] || Sn[gt] || Sn[qt]);\n if (i && or[a]) {\n try {\n Tn[E] && mr && (gr.apply(n), nr && (ai = 1, xn[y][$t][u](nn, fi, t)))\n } catch (s) {\n }\n Tn[E] && n[u](rn, hi, t)\n } else window[o](f, Mi, r), window[o](h, Bs, r), n[o](rn, hi, t), xn[y][$t][o](nn, fi, t), or[a] = t, Ir(t)\n }\n\n function hi(e) {\n var t = Kr();\n if (Sn.pointerLockElement === t || Sn.mozPointerLockElement === t) {\n var n = e.movementX || e.mozMovementX, r = e.movementY || e.mozMovementY;\n if (!isNaN(n)) {\n ci += n * kn;\n while (ci < 0)ci += Math.PI * 2;\n while (ci >= Math.PI * 2)ci -= Math.PI * 2\n } else n = 0;\n nr && (isNaN(r) && (r = 0), xn[p][V] += n * kn * wr, xn[p][jt] = Math.max(Math.min(xn[p][jt] + r * kn * wr, 120), -120))\n }\n }\n\n function pi(e, t, n, r) {\n this.x = e, this.y = t, this.z = n, this.w = r\n }\n\n function di(e) {\n var t = Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z + e.w * e.w);\n t === 0 ? (e.x = e.y = e.z = 0, e.w = 1) : (t = 1 / t, e.x *= t, e.y *= t, e.z *= t, e.w *= t)\n }\n\n function vi(e) {\n e.x *= -1, e.y *= -1, e.z *= -1, di(e)\n }\n\n function mi(e, t) {\n return e.x * t.x + e.y * t.y + e.z * t.z + e.w * t.w\n }\n\n function gi(e) {\n return Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z + e.w * e.w)\n }\n\n function yi(e, t) {\n var n = e.x, r = e.y, i = e.z, s = e.w, o = t.x, u = t.y, a = t.z, f = t.w;\n e.x = n * f + s * o + r * a - i * u, e.y = r * f + s * u + i * o - n * a, e.z = i * f + s * a + n * u - r * o, e.w = s * f - n * o - r * u - i * a\n }\n\n function bi(e, t) {\n var n = t.x, r = t.y, i = t.z, s = t.w, o = e.x, u = e.y, a = e.z, f = e.w;\n e.x = n * f + s * o + r * a - i * u, e.y = r * f + s * u + i * o - n * a, e.z = i * f + s * a + n * u - r * o, e.w = s * f - n * o - r * u - i * a\n }\n\n function wi(e, t, n) {\n var r = e.x, i = e.y, s = e.z, o = e.w, u = r * t.x + i * t.y + s * t.z + o * t.w;\n u < 0 ? (u = -u, e.x = -t.x, e.y = -t.y, e.z = -t.z, e.w = -t.w) : (e.x = t.x, e.y = t.y, e.z = t.z, e.w = t.w);\n if (u >= 1) {\n e.w = o, e.x = r, e.y = i, e.z = s;\n return\n }\n var a = Math.acos(u), f = Math[Bt](1 - u * u);\n if (Math.abs(f) < .001) {\n e.w = .5 * (o + e.w), e.x = .5 * (r + e.x), e.y = .5 * (i + e.y), e.z = .5 * (s + e.z);\n return\n }\n var l = Math.sin((1 - n) * a) / f, c = Math.sin(n * a) / f;\n e.w = o * l + e.w * c, e.x = r * l + e.x * c, e.y = i * l + e.y * c, e.z = s * l + e.z * c\n }\n\n function Ei(e, t, n) {\n var r = n / 2, i = Math.sin(r);\n e.x = t.x * i, e.y = t.y * i, e.z = t.z * i, e.w = Math.cos(r)\n }\n\n function Si(e, t, n, r, i) {\n var s = Math.cos(t / 2), o = Math.cos(n / 2), u = Math.cos(r / 2), a = Math.sin(t / 2), f = Math.sin(n / 2), l = Math.sin(r / 2);\n return i === \"XYZ\" ? (e.x = a * o * u + s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u - a * f * l) : i === Wt ? (e.x = a * o * u + s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u + a * f * l) : i === \"ZXY\" ? (e.x = a * o * u - s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u - a * f * l) : i === \"ZYX\" ? (e.x = a * o * u - s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u + a * f * l) : i === \"YZX\" ? (e.x = a * o * u + s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u - a * f * l) : i === \"XZY\" && (e.x = a * o * u - s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u + a * f * l), e\n }\n\n function xi(e, t, n) {\n var r, i, s, o, u, a, f, l, c, h, p, d;\n i = t.x, s = t.y, o = t.z, u = Math[Bt](i * i + s * s + o * o), u > 0 && (i /= u, s /= u, o /= u), a = n.x, f = n.y, l = n.z, c = Math[Bt](a * a + f * f + l * l), c > 0 && (a /= c, f /= c, l /= c), r = i * a + s * f + o * l + 1, r < 1e-6 ? (r = 0, Math.abs(i) > Math.abs(o) ? (h = -s, p = i, d = 0) : (h = 0, p = -o, d = s)) : (h = s * l - o * f, p = o * a - i * l, d = i * f - s * a), e.x = h, e.y = p, e.z = d, e.w = r, di(e)\n }\n\n function Ti(e, t, n) {\n function r(e, t, n) {\n return e < t ? t : e > n ? n : e\n }\n\n if (!t || isNaN(t.x) || isNaN(t.y) || isNaN(t.z) || isNaN(t.w))return;\n var i = t.x * t.x, s = t.y * t.y, o = t.z * t.z, u = t.w * t.w;\n if (n === \"XYZ\")e[0] = Math[tt](2 * (t.x * t.w - t.y * t.z), u - i - s + o), e[1] = Math.asin(r(2 * (t.x * t.z + t.y * t.w), -1, 1)), e[2] = Math[tt](2 * (t.z * t.w - t.x * t.y), u + i - s - o); else if (n === Wt)e[0] = Math.asin(r(2 * (t.x * t.w - t.y * t.z), -1, 1)), e[1] = Math[tt](2 * (t.x * t.z + t.y * t.w), u - i - s + o), e[2] = Math[tt](2 * (t.x * t.y + t.z * t.w), u - i + s - o); else if (n === \"ZXY\")e[0] = Math.asin(r(2 * (t.x * t.w + t.y * t.z), -1, 1)), e[1] = Math[tt](2 * (t.y * t.w - t.z * t.x), u - i - s + o), e[2] = Math[tt](2 * (t.z * t.w - t.x * t.y), u - i + s - o); else if (n === \"ZYX\")e[0] = Math[tt](2 * (t.x * t.w + t.z * t.y), u - i - s + o), e[1] = Math.asin(r(2 * (t.y * t.w - t.x * t.z), -1, 1)), e[2] = Math[tt](2 * (t.x * t.y + t.z * t.w), u + i - s - o); else if (n === \"YZX\")e[0] = Math[tt](2 * (t.x * t.w - t.z * t.y), u - i + s - o), e[1] = Math[tt](2 * (t.y * t.w - t.x * t.z), u + i - s - o), e[2] = Math.asin(r(2 * (t.x * t.y + t.z * t.w), -1, 1)); else {\n if (n !== \"XZY\")return;\n e[0] = Math[tt](2 * (t.x * t.w + t.y * t.z), u - i + s - o), e[1] = Math[tt](2 * (t.x * t.z + t.y * t.w), u + i - s - o), e[2] = Math.asin(r(2 * (t.z * t.w - t.x * t.y), -1, 1))\n }\n }\n\n function Ni(e, t) {\n var r, i, s, o;\n e == n ? (r = Math.tan(50 * br), i = Math.tan(50 * br), s = Math.tan(45 * br), o = Math.tan(45 * br)) : (r = Math.tan(e.upDegrees * br), i = Math.tan(e.downDegrees * br), s = Math.tan(e.leftDegrees * br), o = Math.tan(e.rightDegrees * br));\n var u = 2 / (s + o), a = 2 / (r + i);\n t[0] = u, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = -a, t[6] = 0, t[7] = 0, t[8] = (s - o) * u * .5, t[9] = -((r - i) * a * .5), t[10] = 65535 / 65536, t[11] = 1, t[12] = 0, t[13] = 0, t[14] = 65535 / 65536 - 1, t[15] = 1\n }\n\n function Ci() {\n var e = Number.NaN, t = screen[Y] > screen[N], n = screen[st] || screen.msOrientation || screen.mozOrientation;\n if (n) {\n n = (\"\" + n)[c]();\n var r = n[s](\"portrait\") >= 0, i = n[s](\"landscape\") >= 0, o = n[s](\"primary\") >= 0, u = n[s](\"secondary\") >= 0;\n r && o ? e = 0 : i && o ? e = 90 : i && u ? e = -90 : r && u && (e = 180), !isNaN(e) && !Tn[at] && (e -= 90)\n }\n return isNaN(e) && (e = xn._have_top_access ? top[st] : window[st]), isNaN(e) && (Tn[at] ? e = t ? 90 : 0 : e = t ? 0 : 90), Tn.tablet && Tn[Ht] && (e += 90), e\n }\n\n function Mi(e) {\n if (!or[a])return;\n var t = xn[B], r = t - Hs;\n Hs = t;\n var i = Ci() * br, s = e.alpha * br, o = e.beta * br, u = e.gamma * br;\n Oi === n && (Oi = s), s = s - Oi + Math.PI;\n var f = Math.cos(s), l = Math.sin(s), c = Math.cos(o), h = Math.sin(o), p = Math.cos(u), d = Math.sin(u);\n s = Math[tt](-l * h * p - f * d, l * d - f * h * p), o = -Math.asin(c * p), u = Math[tt](c * d, -h) - Math.PI, ki.q.x = Li.q.x, ki.q.y = Li.q.y, ki.q.z = Li.q.z, ki.q.w = Li.q.w, ki.t = Li.t;\n var v = Li.q;\n Li.t = t, fr++, Si(v, o, s + i, u - i, Wt)\n }\n\n function _i() {\n if (or[a]) {\n xn[p][g] = r;\n var e = [0, 0, 0];\n if (Lr) {\n Hr = Lr.getState();\n if (Hr) {\n rr && Wr();\n if (Ln) {\n var t = Hr.position;\n if (t) {\n ci = 0;\n var i = 400;\n xn[p].tx = t.x * i, xn[p].ty = t.y * i, xn[p].tz = t.z * i\n }\n }\n Ti(e, Hr[st], Wt);\n var s = 0;\n Tn[_] && (s = Ci()), s += cr, xn[p][V] = (-e[1] + ci) * wr + s, xn[p][jt] = -e[0] * wr, xn[p][an] = -e[2] * wr\n }\n } else if (tr) {\n Wr();\n if (fr > lr) {\n var o = n;\n if ($n == 0)o = Li.q; else if (($n == 4 || $n >= 6) && ar == 2)o = Li.q, Ds(o); else if ($n <= 3 || $n == 5 || ar == 1)if (ki.t > 0 && Li.t > 0) {\n var u = xn[B], f = Li.t - ki.t, l = 0, c = 0, h = 1;\n $n == 1 || $n == 2 ? l = u - Li.t : (l = u - ki.t, h = 2), f <= 0 ? c = 1 : (c = l / f, c > h && (c = h)), Ai.x = ki.q.x, Ai.y = ki.q.y, Ai.z = ki.q.z, Ai.w = ki.q.w, wi(Ai, Li.q, c), o = Ai\n }\n if (o) {\n Ti(e, o, Wt);\n var s = Ci();\n xn[p][V] = cr + (-e[1] + ci) * wr + s, xn[p][jt] = -e[0] * wr, xn[p][an] = -e[2] * wr\n }\n }\n }\n }\n }\n\n function Di(e, n) {\n tr == t && ur == r && Ni(e == 1 ? Mr : _r, n)\n }\n\n function Pi(e) {\n var t = 0;\n return e == 1 ? Ar && Ar.x ? t = Ar.x : t = -0.03 : e == 2 && (Or && Or.x ? t = Or.x : t = .03), t *= 320 / Cn, t\n }\n\n function Hi(e, i) {\n var s = !!(Sn[Jt] || Sn[Mt] || Sn[zt] || Sn[gt] || Sn[qt]);\n if (or[a] && s && tr == t && ur == r) {\n var o = 0, u = 0;\n if (Dr)o = Dr[lt][Y] + Pr[lt][Y], u = Math.max(Dr[lt][N], Pr[lt][N]); else if (S in kr) {\n var f = kr[S](mt), l = kr[S](Tt);\n o = f[Y] + l[Y], u = Math.max(f[N], l[N])\n } else if (H in kr) {\n var c = kr[H]();\n o = c[Y], u = c[N]\n } else z in kr ? (o = kr[z][Y], u = kr[z][N]) : (o = 2e3, u = 1056);\n if (o > 0 && u > 0) {\n var h = 1;\n return o *= h, u *= h, {w: o, h: u}\n }\n } else or[a] && (tr || ur == t) && zr(e, i);\n return n\n }\n\n function Bi(e) {\n var e = (\"\" + e)[c](), i = e[s](dn), o = e.lastIndexOf(\"]\");\n if (i >= 0 && o > i) {\n var u = e[It](i + 8, o), a = dn + u + \"]\";\n a != Jn && (Jn = a, Qn && (ji(Qn, t), Qn = n), Qn = xn.get(Jn), Qn && ji(Qn, r))\n }\n }\n\n function ji(e, i) {\n if (i == r)e[Vt] = {\n visible: e[Ft],\n enabled: e[a],\n flying: e.flying,\n scaleflying: e[ot],\n distorted: e[xt],\n zorder: e.zorder,\n scale: e.scale,\n depth: e.depth,\n onover: e.onover,\n onout: e.onout\n }, e[a] = t, e.flying = 1, e[ot] = t, e[xt] = r, e.zorder = 999999999; else {\n var s = e[Vt];\n s && (e[Ft] = s[Ft], e[a] = s[a], e.flying = s.flying, e[ot] = s[ot], e[xt] = s[xt], e.zorder = s.zorder, e.scale = s.scale, e.depth = s.depth, e.onover = s.onover, e.onout = s.onout, e[Vt] = s = n)\n }\n }\n\n function Fi() {\n if (Jn) {\n var e = Qn;\n e == n && (e = xn.get(Jn), e && (ji(e, r), Qn = e));\n if (e) {\n if (!or[a])return e[Ft] = t, n;\n e.onover = Gn, e.onout = Yn, e[a] = Kn, e[Ft] = r\n }\n return e\n }\n return n\n }\n\n function Ii() {\n this.x = 0, this.y = 0, this.z = 0\n }\n\n function qi(e, t, n, r) {\n e.x = t, e.y = n, e.z = r\n }\n\n function Ri(e, t) {\n e.x = t.x, e.y = t.y, e.z = t.z\n }\n\n function Ui(e) {\n e.x = 0, e.y = 0, e.z = 0\n }\n\n function zi(e, t, n) {\n t == 0 ? e.x = n : t == 1 ? e.y = n : e.z = n\n }\n\n function Wi(e) {\n return Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z)\n }\n\n function Xi(e) {\n var t = Wi(e);\n t > 0 ? Vi(e, 1 / t) : (e.x = 0, e.y = 0, e.z = 0)\n }\n\n function Vi(e, t) {\n e.x *= t, e.y *= t, e.z *= t\n }\n\n function $i(e, t, n) {\n qi(n, e.x - t.x, e.y - t.y, e.z - t.z)\n }\n\n function Ji(e, t, n) {\n qi(n, e.y * t.z - e.z * t.y, e.z * t.x - e.x * t.z, e.x * t.y - e.y * t.x)\n }\n\n function Ki(e, t) {\n return e.x * t.x + e.y * t.y + e.z * t.z\n }\n\n function Qi() {\n var e;\n return typeof Float64Array != \"undefined\" ? e = new Float64Array(9) : e = new Array(9), Yi(e), e\n }\n\n function Gi(e) {\n e[0] = e[1] = e[2] = e[3] = e[4] = e[5] = e[6] = e[7] = e[8] = 0\n }\n\n function Yi(e) {\n e[0] = e[4] = e[8] = 1, e[1] = e[2] = e[3] = e[5] = e[6] = e[7] = 0\n }\n\n function Zi(e, t) {\n e[0] = e[4] = e[8] = t\n }\n\n function es(e, t) {\n e[0] *= t, e[1] *= t, e[2] *= t, e[3] *= t, e[4] *= t, e[5] *= t, e[6] *= t, e[7] *= t, e[8] *= t\n }\n\n function ts(e, t) {\n var n = e[1], r = e[2], i = e[5];\n t[0] = e[0], t[1] = e[3], t[2] = e[6], t[3] = n, t[4] = e[4], t[5] = e[7], t[6] = r, t[7] = i, t[8] = e[8]\n }\n\n function ns(e, t, n) {\n e[t] = n.x, e[t + 3] = n.y, e[t + 6] = n.z\n }\n\n function rs(e, t) {\n e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e[4] = t[4], e[5] = t[5], e[6] = t[6], e[7] = t[7], e[8] = t[8]\n }\n\n function is(e, t) {\n var n = e[0] * (e[4] * e[8] - e[7] * e[5]) - e[1] * (e[3] * e[8] - e[5] * e[6]) + e[2] * (e[3] * e[7] - e[4] * e[6]);\n n != 0 && (n = 1 / n, t[0] = (e[4] * e[8] - e[7] * e[5]) * n, t[1] = -(e[1] * e[8] - e[2] * e[7]) * n, t[2] = (e[1] * e[5] - e[2] * e[4]) * n, t[3] = -(e[3] * e[8] - e[5] * e[6]) * n, t[4] = (e[0] * e[8] - e[2] * e[6]) * n, t[5] = -(e[0] * e[5] - e[3] * e[2]) * n, t[6] = (e[3] * e[7] - e[6] * e[4]) * n, t[7] = -(e[0] * e[7] - e[6] * e[1]) * n, t[8] = (e[0] * e[4] - e[3] * e[1]) * n)\n }\n\n function ss(e, t) {\n e[0] -= t[0], e[1] -= t[1], e[2] -= t[2], e[3] -= t[3], e[4] -= t[4], e[5] -= t[5], e[6] -= t[6], e[7] -= t[7], e[8] -= t[8]\n }\n\n function os(e, t) {\n e[0] += t[0], e[1] += t[1], e[2] += t[2], e[3] += t[3], e[4] += t[4], e[5] += t[5], e[6] += t[6], e[7] += t[7], e[8] += t[8]\n }\n\n function us(e, t, n) {\n var r = t[0], i = t[1], s = t[2], o = t[3], u = t[4], a = t[5], f = t[6], l = t[7], c = t[8], h = e[0], p = e[1], d = e[2];\n n[0] = h * r + p * o + d * f, n[1] = h * i + p * u + d * l, n[2] = h * s + p * a + d * c, h = e[3], p = e[4], d = e[5], n[3] = h * r + p * o + d * f, n[4] = h * i + p * u + d * l, n[5] = h * s + p * a + d * c, h = e[6], p = e[7], d = e[8], n[6] = h * r + p * o + d * f, n[7] = h * i + p * u + d * l, n[8] = h * s + p * a + d * c\n }\n\n function as(e, t, n) {\n var r = e[0] * t.x + e[1] * t.y + e[2] * t.z, i = e[3] * t.x + e[4] * t.y + e[5] * t.z, s = e[6] * t.x + e[7] * t.y + e[8] * t.z;\n n.x = r, n.y = i, n.z = s\n }\n\n function fs(e, t, n) {\n n[0] = e[0] + t[0], n[1] = e[1] + t[1], n[2] = e[2] + t[2], n[3] = e[3] + t[3], n[4] = e[4] + t[4], n[5] = e[5] + t[5], n[6] = e[6] + t[6], n[7] = e[7] + t[7], n[8] = e[8] + t[8]\n }\n\n function bs(e, t, n) {\n Ji(e, t, cs);\n if (Wi(cs) == 0)Yi(n); else {\n Ri(hs, e), Ri(ps, t), Xi(cs), Xi(hs), Xi(ps);\n var r = vs, i = ms;\n Ji(cs, hs, ls), r[0] = hs.x, r[1] = hs.y, r[2] = hs.z, r[3] = cs.x, r[4] = cs.y, r[5] = cs.z, r[6] = ls.x, r[7] = ls.y, r[8] = ls.z, Ji(cs, ps, ls), i[0] = ps.x, i[3] = ps.y, i[6] = ps.z, i[1] = cs.x, i[4] = cs.y, i[7] = cs.z, i[2] = ls.x, i[5] = ls.y, i[8] = ls.z, us(i, r, n)\n }\n }\n\n function ws(e, t) {\n var n = Ki(e, e), r = Math[Bt](n), i, s;\n if (n < 1e-8)i = 1 - 1 / 6 * n, s = .5; else if (n < 1e-6)s = .5 - .25 * (1 / 6) * n, i = 1 - n * (1 / 6) * (1 - .05 * n); else {\n var o = 1 / r;\n i = Math.sin(r) * o, s = (1 - Math.cos(r)) * o * o\n }\n Ss(e, i, s, t)\n }\n\n function Es(e, t) {\n var n = (e[0] + e[4] + e[8] - 1) * .5;\n qi(t, (e[7] - e[5]) / 2, (e[2] - e[6]) / 2, (e[3] - e[1]) / 2);\n var r = Wi(t);\n if (n > Math.SQRT1_2)r > 0 && Vi(t, Math.asin(r) / r); else if (n > -Math.SQRT1_2) {\n var i = Math.acos(n);\n Vi(t, i / r)\n } else {\n var i = Math.PI - Math.asin(r), s = e[0] - n, o = e[4] - n, u = e[8] - n, a = gs;\n s * s > o * o && s * s > u * u ? qi(a, s, (e[3] + e[1]) / 2, (e[2] + e[6]) / 2) : o * o > u * u ? qi(a, (e[3] + e[1]) / 2, o, (e[7] + e[5]) / 2) : qi(a, (e[2] + e[6]) / 2, (e[7] + e[5]) / 2, u), Ki(a, t) < 0 && Vi(a, -1), Xi(a), Vi(a, i), Ri(t, a)\n }\n }\n\n function Ss(e, t, n, r) {\n var i = e.x * e.x, s = e.y * e.y, o = e.z * e.z;\n r[0] = 1 - n * (s + o), r[4] = 1 - n * (i + o), r[8] = 1 - n * (i + s);\n var u = t * e.z, a = n * e.x * e.y;\n r[1] = a - u, r[3] = a + u, u = t * e.y, a = n * e.x * e.z, r[2] = a + u, r[6] = a - u, u = t * e.x, a = n * e.y * e.z, r[5] = a - u, r[7] = a + u\n }\n\n function xs(e, t, n, r) {\n t *= br, n *= br, r *= br;\n var i = Math.cos(t), s = Math.sin(t), o = Math.cos(n), u = Math.sin(n), a = Math.cos(r), f = Math.sin(r), l = i * u, c = s * u;\n e[0] = o * a, e[1] = l * a + i * f, e[2] = -c * a + s * f, e[3] = -o * f, e[4] = -l * f + i * a, e[5] = c * f + s * a, e[6] = u, e[7] = -s * o, e[8] = i * o\n }\n\n function Ts(e, t) {\n var n = e[0] + e[4] + e[8], r;\n n > 0 ? (r = Math[Bt](1 + n) * 2, t.x = (e[5] - e[7]) / r, t.y = (e[6] - e[2]) / r, t.z = (e[1] - e[3]) / r, t.w = .25 * r) : e[0] > e[4] && e[0] > e[8] ? (r = Math[Bt](1 + e[0] - e[4] - e[8]) * 2, t.x = .25 * r, t.y = (e[3] + e[1]) / r, t.z = (e[6] + e[2]) / r, t.w = (e[5] - e[7]) / r) : e[4] > e[8] ? (r = Math[Bt](1 + e[4] - e[0] - e[8]) * 2, t.x = (e[3] + e[1]) / r, t.y = .25 * r, t.z = (e[7] + e[5]) / r, t.w = (e[6] - e[2]) / r) : (r = Math[Bt](1 + e[8] - e[0] - e[4]) * 2, t.x = (e[6] + e[2]) / r, t.y = (e[7] + e[5]) / r, t.z = .25 * r, t.w = (e[1] - e[3]) / r)\n }\n\n function Ds(e) {\n if (js) {\n var t = Ci();\n t != Ls && (Ls = t, xs(Os, 0, 0, -t), xs(As, -90, 0, +t));\n var n;\n if ($n <= 1 || $n == 3)n = To(); else {\n var r = xn[B], i = (r - Ns) / 1e3, s = i;\n $n == 2 ? s += 2 / 60 : $n == 6 ? s += 1 / 60 : $n == 7 && (s += 2 / 60), n = Lo(s)\n }\n us(Os, n, _s), us(_s, As, Ms), Ts(Ms, e)\n }\n }\n\n function Bs(e) {\n if (!or[a])return;\n var i = xn[B], s = i - Hs;\n Hs = i, s > 5e3 && (ui(), s = .16), fr++;\n if (fr < lr)return;\n go == t && (go = r, yo());\n var o = e[K], u = o.x, f = o.y, l = o.z;\n u == n && (u = 0), f == n && (f = 9.81), l == n && (l = 0);\n var c = e.acceleration;\n if (c) {\n var h = c.x, p = c.y, d = c.z;\n h == n && (h = 0), p == n && (p = 0), d == n && (d = 0), u -= h, f -= p, l -= d\n }\n if (Tn.ios || Tn.ie)u *= -1, f *= -1, l *= -1;\n var v = e.rotationRate, m = v.alpha, g = v.beta, y = v.gamma;\n m == n && (m = 0), g == n && (g = 0), y == n && (y = 0);\n if (Tn.ios || Tn[Ht] || Tn.ie) {\n m *= br, g *= br, y *= br;\n if (Tn.ie) {\n var b = m, w = g, E = y;\n m = w, g = E, y = b\n }\n }\n Uo ? Jo(s, m, g, y) : Pn && Ps(m, g, y, i);\n var S = zo;\n m -= S.rx, g -= S.ry, y -= S.rz, qi(Cs, u, f, l), Eo(Cs, s), Ns = i, qi(ks, m, g, y), xo(ks, i);\n if ($n <= 3 || $n == 5)ki.q.x = Li.q.x, ki.q.y = Li.q.y, ki.q.z = Li.q.z, ki.q.w = Li.q.w, ki.t = Li.t, Ds(Li.q), Li.t = i\n }\n\n function yo() {\n Yi(Qs), Yi(Gs), Gi(Zs), Zi(Zs, ho), Gi(Ys), Zi(Ys, 1), Gi(ro), Zi(ro, po), Gi(to), Gi(eo), Gi(no), Ui(Ws), Ui(Us), Ui(Rs), Ui(zs), Ui(qs), qi(Is, 0, 0, vo), js = t\n }\n\n function bo(e, t) {\n as(e, Is, Rs), bs(Rs, Us, co), Es(co, t)\n }\n\n function wo() {\n ts(Gs, fo), us(Zs, fo, lo), us(Gs, lo, Zs), Yi(Gs)\n }\n\n function Eo(e, t) {\n Ri(Us, e);\n if (js) {\n bo(Qs, Ws), t < 5 && (t = 5);\n var n = 1e3 / 60 / t, i = mo * n, s = 1 / mo, o = Xs;\n for (var u = 0; u < 3; u++)Ui(o), zi(o, u, s), ws(o, io), us(io, Qs, so), bo(so, Vs), $i(Ws, Vs, $s), Vi($s, i), ns(eo, u, $s);\n ts(eo, oo), us(Zs, oo, uo), us(eo, uo, ao), fs(ao, ro, to), is(to, oo), ts(eo, uo), us(uo, oo, ao), us(Zs, ao, no), as(no, Ws, qs), us(no, eo, oo), Yi(uo), ss(uo, oo), us(uo, Zs, oo), rs(Zs, oo), ws(qs, Gs), us(Gs, Qs, Qs), wo()\n } else bs(Is, Us, Qs), js = r\n }\n\n function xo(e, t) {\n if (So != 0) {\n var n = (t - So) / 1e3;\n n > 1 && (n = 1), Ri(zs, e), Vi(zs, -n), ws(zs, Gs), rs(Js, Qs), us(Gs, Qs, Js), rs(Qs, Js), wo(), rs(Ks, Ys), es(Ks, n * n), os(Zs, Ks)\n }\n So = t, Ri(Fs, e)\n }\n\n function To() {\n return Qs\n }\n\n function Lo(e) {\n var t = No;\n Ri(t, Fs), Vi(t, -e);\n var n = Co;\n ws(t, n);\n var r = ko;\n return us(n, Qs, r), r\n }\n\n function Ho(e) {\n var t = e[s](\"://\");\n if (t > 0) {\n var r = e[s](\"/\", t + 3), i = e[It](0, t)[c](), o = e[It](t + 3, r), u = e[It](r);\n return [i, o, u]\n }\n return n\n }\n \n function local_storage() {\n // krpano WebVR Plugin - cross-domain localstorage - server page\n // - save the WebVR cardboard settings (IPD, screensize, lens-settings, gyro-calibration)\n\n var ls = window.localStorage;\n if (ls)\n {\n if (false) //parent === window\n {\n // direct call - show stored settings\n var vals = ls.getItem(\"krpano.webvr.4\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals)\n {\n vals = (\"\"+vals).split(\",\")\n if (vals.length >= 6)\n {\n document.body.innerHTML =\n \"<div style='font-family:Arial;font-size:14px;'>\"+\n \"krpano WebVR Settings (v4): \"+\n \"ipd=\"+Number(vals[0]).toFixed(2)+\"mm, \"+\n \"screensize=\"+(vals[1] == 0 ? \"auto\" : Number(vals[1]).toFixed(1)+\" inch\")+\", \"+\n \"fov=\"+Number(vals[2]).toFixed(1)+\", \"+\n \"distortion=\"+Number(vals[3]).toFixed(2)+\", \"+\n \"distortion2=\"+(vals[10] ? vals[10] : \"none\")+\", \"+\n \"ca=\"+(!isNaN(Number(vals[11])) ? Number(vals[11]) : \"0.0\")+\", \"+\n \"vignette=\"+Number(vals[4]).toFixed(1)+\", \"+\n \"sensormode=\"+Number(vals[5]).toFixed(0)+\", \"+\n \"overlap=\"+(vals.length >= 10 ? Number(vals[9]) : 1.0).toFixed(2)+\n (vals.length >= 9 ? \", gyro-calibration=\"+Number(vals[6]).toFixed(4)+\"/\"+Number(vals[7]).toFixed(4)+\"/\"+Number(vals[8]).toFixed(4) : \"\")+\n \"</div>\";\n }\n }\n }\n else\n {\n // handle messages from the parent frame\n window.addEventListener(\"message\", function(event)\n {\n var request = (\"\"+event.data).toLowerCase();\n var vals;\n\n if ( request == \"load.1\" )\n {\n // load.1 => ipd,size,fov,dist,vig,ssm\n vals = ls.getItem(\"krpano.webvr.1\");\n if (vals)\n {\n if ((\"\"+vals).split(\",\").length == 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n }\n else if ( request == \"load.2\" )\n {\n // load.2 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz\n vals = ls.getItem(\"krpano.webvr.2\");\n if (vals)\n {\n if ((\"\"+vals).split(\",\").length == 9)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else\n {\n // use older version data: load.2 => ipd,size,fov,dist,vig,ssm,0,0,0\n vals = ls.getItem(\"krpano.webvr.1\");\n if (vals && (\"\"+vals).split(\",\").length == 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals+\",0,0,0\", event.origin);\n }\n }\n }\n else if ( request == \"load.3\" )\n {\n // load.3 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap\n vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals && (\"\"+vals).split(\",\").length >= 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else if ( request == \"load.4\" )\n {\n // load.4 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap,dist2,ca\n vals = ls.getItem(\"krpano.webvr.4\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals && (\"\"+vals).split(\",\").length >= 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else if ( request.slice(0,7) == \"save.1:\" )\n {\n // save.1:ipd,size,fov,dist,vig,ssm\n vals = request.slice(7).split(\",\");\n if (vals.length == 6)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10\n )\n {\n ls.setItem(\"krpano.webvr.1\", vals.join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.2:\" )\n {\n // save.2:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz\n vals = request.slice(7).split(\",\");\n if (vals.length == 9)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz)\n )\n {\n ls.setItem(\"krpano.webvr.2\", vals.join(\",\"));\n\n // save settings also for older versions\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.3:\" )\n {\n // save.3:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap\n vals = request.slice(7).split(\",\");\n if (vals.length == 10)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n var olp = Number(vals[9]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz) &&\n !isNaN(olp) && olp > 0 && olp < 2\n )\n {\n ls.setItem(\"krpano.webvr.3\", vals.join(\",\"));\n\n // save the settings also for older versions\n ls.setItem(\"krpano.webvr.2\", vals.slice(0,9).join(\",\"));\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.4:\" )\n {\n // save.4:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap,dist2,ca\n vals = request.slice(7).split(\",\");\n if (vals.length == 12)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n var olp = Number(vals[9]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz) &&\n !isNaN(olp) && olp > 0 && olp < 2\n )\n {\n ls.setItem(\"krpano.webvr.4\", vals.join(\",\"));\n\n // save the settings also for older versions\n ls.setItem(\"krpano.webvr.3\", vals.slice(0,10).join(\",\"));\n ls.setItem(\"krpano.webvr.2\", vals.slice(0,9).join(\",\"));\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n }\n , false);\n }\n }\n }\n\n function Bo(e) {\n if (Mo == n) {\n var i = Ho(Ao), s = Ho(window[wn].href);\n if (s[0] == \"http\" || s[0] == \"https\") {\n _o = s[0] + \"://\" + i[1], Do = _o + i[2];\n var o = document[bn](\"iframe\");\n o.style.cssText = \"position:absolute;width:1px;height:1px;left:-9999px;visibility:hidden;\",\n xn[m].viewerlayer.appendChild(o),\n Mo = o,\n o[u](\"load\", function () {\n Oo = r, e(Mo)\n }, true),\n window[u](\"message\", Fo, true);\n //o.src = Do\n local_storage();\n }\n } else Oo && e(Mo)\n }\n\n function jo(e) {\n Bo(function (t) {\n try {\n t.contentWindow.postMessage(e, _o)\n } catch (n) {\n }\n })\n }\n\n function Fo(e) {\n alert(233);\n if (e.origin == _o) {\n var t = \"\" + e.data;\n t[It](0, 15) == \"webvr_settings:\" && Io(t[It](15))\n }\n }\n\n function Io(e) {\n var t = e[mn](bt), n = Number(t[0]), i = Number(t[1]), s = Number(t[2]), o = Number(t[3]), u = Number(t[4]), a = Number(t[5]), f = Number(t[6]), l = Number(t[7]), c = Number(t[8]), h = Number(t[9]), p = \"\" + t[10], d = Number(t[11]);\n isNaN(f) && (f = 0), isNaN(l) && (l = 0), isNaN(c) && (c = 0), isNaN(h) && (h = 1), isNaN(d) && (d = 0), p[mn](\"|\")[kt] != 4 && (p = Qt), !isNaN(n) && n >= 30 && n < 90 && !isNaN(i) && i >= 0 && i < 12 && !isNaN(s) && s >= 1 && s < 180 && !isNaN(o) && o >= 0 && o < 10 && !isNaN(u) && u >= 1 && u < 500 && !isNaN(a) && a >= 0 && a < 10 && !isNaN(h) && h > 0 && h < 2 && (Hn = n, Bn = i, Fn = s, In = o, Wn = u, $n = a, zo.rx = f, zo.ry = l, zo.rz = c, jn = h, qn = p, zn = d, ir = r)\n }\n\n function qo(e) {\n if (tr || rr) {\n if (Po)try {\n var t = window.localStorage;\n if (t) {\n var n = t[tn](Pt);\n n || (n = t[tn](Dt)), n || (n = t[tn](At)), n || (n = t[tn](Ot)), n && Io(n)\n }\n } catch (r) {\n }\n (\"\" + e)[c]() != \"local\" && jo(\"load.4\")\n }\n }\n\n function Ro(e) {\n if (tr || rr) {\n var t = Hn + bt + Bn + bt + Fn + bt + In + bt + Wn + bt + $n + bt + zo.rx + bt + zo.ry + bt + zo.rz + bt + jn + bt + qn + bt + zn;\n if (Po)try {\n var n = window.localStorage;\n n && (n[Zt](Pt, t), n[Zt](Dt, t[mn](bt)[It](0, 10).join(bt)), n[Zt](At, t[mn](bt)[It](0, 9).join(bt)), n[Zt](Ot, t[mn](bt)[It](0, 6).join(bt)))\n } catch (r) {\n }\n (\"\" + e)[c]() != \"local\" && jo(\"save.4:\" + t)\n }\n }\n\n function Vo(e, n) {\n Zn && tr && !nr && (Uo = r, Pn = t, Wo = e, Xo = n, Jo(-1))\n }\n\n function $o() {\n Uo = t, zo.rx = 0, zo.ry = 0, zo.rz = 0\n }\n\n var e = \"registerattribute\", t = !1, n = null, r = !0, s = \"indexOf\", o = \"removeEventListener\", u = \"addEventListener\", a = \"enabled\", f = \"deviceorientation\", l = \"onunavailable\", c = \"toLowerCase\", h = \"devicemotion\", p = \"view\", d = \"maxpixelzoom\", v = \"architectural\", m = \"display\", g = \"continuousupdates\", y = \"control\", b = \"fisheyefovlink\", w = \"browser\", E = \"desktop\", S = \"getRecommendedEyeRenderRect\", x = \"stereographic\", T = \"limitview\", N = \"height\", C = \"getCurrentEyeFieldOfView\", k = \"events\", L = \"#ifdef GL_FRAGMENT_PRECISION_HIGH\\n\", A = \"loadwhilemoving\", O = \"onavailable\", M = \"float b = texture2D(sm,vB).b;\", _ = \"android\", D = \"downloadlockedlevel\", P = \"float r = texture2D(sm,vR).r;\", H = \"getRecommendedRenderTargetSize\", B = \"timertick\", j = \"stereooverlap\", F = \"getEyeParameters\", I = \"uniform1f\", q = \"vec2 vR = center + v * ca;\", R = \"vec2 vB = center + v / ca;\", U = \"precision mediump float;\\n\", z = \"renderTargetSize\", W = \"lockmultireslevel\", X = \"fisheye\", V = \"hlookat\", $ = \"getEyeTranslation\", J = \"call\", K = \"accelerationIncludingGravity\", Q = \"documentElement\", G = \"fovtype\", Y = \"width\", Z = \"#endif\\n\", et = \"precision highp float;\\n\", tt = \"atan2\", nt = \"pannini\", rt = \"uniform sampler2D sm;\", it = \"usercontrol\", st = \"orientation\", ot = \"scaleflying\", ut = \"vec2 v = tx - center;\", at = \"mobile\", ft = \"fovmin\", lt = \"renderRect\", ct = \"useProgram\", ht = \"fovmax\", pt = \"auto\", dt = \"uniform float ca;\", vt = \"uniform float ol;\", mt = \"left\", gt = \"webkitFullscreenElement\", yt = \"fullscreen\", bt = \",\", wt = \"varying vec2 tx;\", Et = \"recommendedFieldOfView\", St = \"mousetype\", xt = \"distorted\", Tt = \"right\", Nt = \"onunknowndevice\", Ct = \"stereo\", kt = \"length\", Lt = \"area\", At = \"krpano.webvr.2\", Ot = \"krpano.webvr.1\", Mt = \"mozFullScreenElement\", _t = \"#ifdef GL_ES\\n\", Dt = \"krpano.webvr.3\", Pt = \"krpano.webvr.4\", Ht = \"firefox\", Bt = \"sqrt\", jt = \"vlookat\", Ft = \"visible\", It = \"slice\", qt = \"msFullscreenElement\", Rt = \"contextmenu\", Ut = \"mozGetVRDevices\", zt = \"webkitIsFullScreen\", Wt = \"YXZ\", Xt = \"void main()\", Vt = \"_VR_backup\", $t = \"layer\", Jt = \"fullscreenElement\", Kt = \"touchstart\", Qt = \"1|0|0|0\", Gt = \"devicename\", Yt = \"fullscreenchange\", Zt = \"setItem\", en = \"maxmem\", tn = \"getItem\", nn = \"mousedown\", rn = \"mousemove\", sn = \"galaxy s4\", on = \"iPhone 6+\", un = \"touchmove\", an = \"camroll\", fn = \"changedTouches\", ln = \"iPhone 6\", cn = \"screentosphere\", hn = \"createppshader\", pn = \"eyeTranslation\", dn = \"hotspot[\", vn = \"hardwareUnitId\", mn = \"split\", gn = \"touchend\", yn = \"#else\\n\", bn = \"createElement\", wn = \"location\", En = this, Sn = document, xn = n, Tn = n, Nn = n, Cn = 1, kn = .00125, Ln = t, An = r, On = r, Mn = t, _n = t, Dn = r, Pn = t, Hn = 63.5, Bn = pt, jn = 1, Fn = 96, In = .6, qn = Qt, Rn = [1, 0, 0, 0], Un = t, zn = 0, Wn = 100, Xn = t, Vn = 1, $n = 3, Jn = \"\", Kn = r, Qn = n, Gn = n, Yn = n, Zn = t, er = t, tr = t, nr = t, rr = t, ir = t, sr = t, or = {\n enabled: t,\n eyetranslt: Pi,\n updateview: _i,\n prjmatrix: Di,\n getsize: Hi,\n getcursor: Fi\n }, ur = r, ar = 0, fr = 0, lr = 6, cr = 0, hr = 1, pr = 0, dr = 0, vr = 0, mr = t, gr = n, yr = n, br = Math.PI / 180, wr = 180 / Math.PI;\n En.registerplugin = function (i, s, o) {\n xn = i, Nn = o;\n if (xn.version < \"1.19\" || xn.build < \"2015-07-09\") {\n xn.trace(3, \"WebVR plugin - too old krpano version (min. 1.19)\");\n return\n }\n if (xn.webVR)return;\n Tn = xn.device, Nn[e](\"worldscale\", Cn, function (e) {\n var t = Number(e);\n isNaN(t) || (Cn = Math.max(t, .1))\n }, function () {\n return Cn\n }), Nn[e](\"mousespeed\", kn, function (e) {\n var t = Number(e);\n isNaN(t) || (kn = t)\n }, function () {\n return kn\n }), Nn[e](\"pos_tracking\", Ln, function (e) {\n Ln = Er(e)\n }, function () {\n return Ln\n }), Nn[e](\"multireslock\", An, function (e) {\n An = Er(e), or[a] && ri()\n }, function () {\n return An\n }), Nn[e](\"mobilevr_support\", On, function (e) {\n On = Er(e)\n }, function () {\n return On\n }), Nn[e](\"mobilevr_touch_support\", Mn, function (e) {\n Mn = Er(e)\n }, function () {\n return Mn\n }), Nn[e](\"mobilevr_fake_support\", _n, function (e) {\n _n = Er(e)\n }, function () {\n return _n\n }), Nn[e](\"mobilevr_ipd\", Hn, function (e) {\n var t = Number(e);\n isNaN(t) || (Hn = t), Ur()\n }, function () {\n return Hn\n }), Nn[e](\"mobilevr_screensize\", Bn, function (e) {\n $r(e)\n }, function () {\n return Jr()\n }), Nn[e](\"mobilevr_lens_fov\", Fn, function (e) {\n var t = Number(e);\n isNaN(t) || (Fn = t, Ur())\n }, function () {\n return Fn\n }), Nn[e](\"mobilevr_lens_overlap\", jn, function (e) {\n var t = Number(e);\n isNaN(t) || (jn = t, Ur())\n }, function () {\n return jn\n }), Nn[e](\"mobilevr_lens_dist\", In, function (e) {\n var t = Number(e);\n isNaN(t) || (In = t, Ur())\n }, function () {\n return In\n }), Nn[e](\"mobilevr_lens_dist2\", qn, function (e) {\n qn = e, Ur()\n }, function () {\n return qn\n }), Nn[e](\"mobilevr_lens_ca\", zn, function (e) {\n var t = Number(e);\n isNaN(t) || (zn = t, Ur())\n }, function () {\n return zn\n }), Nn[e](\"mobilevr_lens_vign\", Wn, function (e) {\n var t = Number(e);\n isNaN(t) || (Wn = t, Ur())\n }, function () {\n return Wn\n }), Nn[e](\"mobilevr_webvr_dist\", Xn, function (e) {\n Xn = Er(e)\n }, function () {\n return Xn\n }), Nn[e](\"mobilevr_wakelock\", Dn, function (e) {\n Dn = Er(e)\n }, function () {\n return Dn\n }), Nn[e](\"mobilevr_autocalibration\", Pn, function (e) {\n Pn = Er(e)\n }, function () {\n return Pn\n }), Nn[e](\"mobilevr_sensor\", Vn, function (e) {\n Vn = parseInt(e) & 1\n }, function () {\n return Vn\n }), Nn[e](\"mobilevr_sensor_mode\", $n, function (e) {\n var t = parseInt(e);\n t >= 0 && t <= 7 && ($n = t), fr = 0\n }, function () {\n return $n\n }), Nn[e](\"vr_cursor\", Jn, function (e) {\n Bi(e)\n }, function () {\n return Jn\n }), Nn[e](\"vr_cursor_enabled\", Kn, function (e) {\n Kn = Er(e)\n }, function () {\n return Kn\n }), Nn[e](\"vr_cursor_onover\", Gn, function (e) {\n Gn = e\n }, function () {\n return Gn\n }), Nn[e](\"vr_cursor_onout\", Yn, function (e) {\n Yn = e\n }, function () {\n return Yn\n }), Nn[e](\"isavailable\", er, function (e) {\n }, function () {\n return er\n }), Nn[e](\"isenabled\", Zn, function (e) {\n }, function () {\n return Zn\n }), Nn[e](\"iswebvr\", !tr, function (e) {\n }, function () {\n return !tr || rr\n }), Nn[e](\"ismobilevr\", tr, function (e) {\n }, function () {\n return tr || rr\n }), Nn[e](\"isfake\", nr, function (e) {\n }, function () {\n return nr\n }), Nn[e](\"havesettings\", ir, function (e) {\n }, function () {\n return ir\n }), Nn[e](Gt, \"\", function (e) {\n }, function () {\n return Xr()\n }), Nn[e](\"devicesize\", \"\", function (e) {\n }, function () {\n return Vr()\n }), Nn[e](O, n), Nn[e](l, n), Nn[e](Nt, n), Nn[e](\"onentervr\", n), Nn[e](\"onexitvr\", n), Nn.entervr = Gr, Nn.exitvr = Yr, Nn.togglevr = Zr, Nn.resetsensor = ei, Nn.loadsettings = qo, Nn.savesettings = Ro, Nn.calibrate = Vo, Nn.resetcalibration = $o, Nn.update = Qr;\n if (xn.webGL) {\n xn.webVR = or;\n var u = Tn[_] && Tn[Ht], f = document[Q].requestPointerLock || document[Q].mozRequestPointerLock || document[Q].webkitRequestPointerLock, c = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock;\n f && c && (mr = r, gr = f, yr = c);\n try {\n u == t && navigator.getVRDevices ? navigator.getVRDevices().then(jr) : u == t && navigator[Ut] ? navigator[Ut](jr) : On ? xr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n } catch (h) {\n }\n } else sr == t && (sr = r, xn[J](Nn[l], Nn))\n }, En.unloadplugin = function () {\n Yr(), oi(t, r), xn.webVR = n\n };\n var kr = n, Lr = n, Ar = n, Or = n, Mr = n, _r = n, Dr = n, Pr = n, Hr = n, Br = 100, Fr = n, qr = n, ti = n, oi = function () {\n var e = n, r = n;\n return function (i, s) {\n if (Tn[at] && nr == t)if (i)Tn.ios ? e = window.setInterval(function () {\n window[wn] = window[wn], window.setTimeout(window.stop, 0)\n }, 15e3) : Tn[_] && (r == n && (r = document[bn](\"video\"), r.setAttribute(\"loop\", \"\"), r.canPlayType(\"video/webm\") != \"\" && (r.src = Qo)), r.play()); else {\n e && (window.clearInterval(e), e = n);\n if (r && s) {\n r.pause();\n try {\n r.src = \"\", r.removeAttribute(\"src\")\n } catch (o) {\n }\n r = n\n }\n }\n }\n }(), ai = 0, ci = 0, ki = {q: new pi(0, 0, 0, 1), t: 0}, Li = {\n q: new pi(0, 0, 0, 1),\n t: 0\n }, Ai = new pi(0, 0, 0, 1), Oi = n, ls = new Ii, cs = new Ii, hs = new Ii, ps = new Ii, ds = new Ii, vs = Qi(), ms = Qi(), gs = new Ii, ys = new Ii, Ns = 0, Cs = new Ii, ks = new Ii, Ls = n, As = Qi(), Os = Qi(), Ms = Qi(), _s = Qi(), Ps = function () {\n var e = 0, t = 0, n = 0, r = 0, i = 0, s = 0, o = 0, u = 0, a = 0, f = 0, l = 1, c = 0, h = 0, p = 0, d = .03;\n return function (c, h, p, v) {\n var m = c - e, g = h - t, y = p - n, b = v - r;\n e = c, t = h, n = p, r = v;\n var w = Math[Bt](m * m + g * g + y * y);\n if (b > 500) {\n i = 0;\n return\n }\n if (i == 0) {\n i = b, s = w;\n return\n }\n i = i * .95 + .05 * b;\n var E = Math.min(15 * i / 1e3, .5);\n s = s * (1 - E) + E * w;\n var S = zo;\n s < d ? (o++, u += c, a += h, f += p, o > 19 && (S.rx = S.rx * (1 - l) + l * (u / o), S.ry = S.ry * (1 - l) + l * (a / o), S.rz = S.rz * (1 - l) + l * (f / o), l > .5 && (l *= .9), s = 10, d *= .5)) : (o = 1, u = c, a = h, f = p)\n }\n }(), Hs = 0, js = t, Fs = new Ii, Is = new Ii, qs = new Ii, Rs = new Ii, Us = new Ii, zs = new Ii, Ws = new Ii, Xs = new Ii, Vs = new Ii, $s = new Ii, Js = Qi(), Ks = Qi(), Qs = Qi(), Gs = Qi(), Ys = Qi(), Zs = Qi(), eo = Qi(), to = Qi(), no = Qi(), ro = Qi(), io = Qi(), so = Qi(), oo = Qi(), uo = Qi(), ao = Qi(), fo = Qi(), lo = Qi(), co = Qi(), ho = 20, po = .5, vo = 9.81, mo = 1e7, go = t, So = 0, No = new Ii, Co = Qi(), ko = Qi(), Ao = \"http://d8d913s460fub.cloudfront.net/krpanocloud/webvr_localstorage.html?v=114\", Oo = t, Mo = n, _o = n, Do = n, Po = r, Uo = t, zo = {\n rx: 0,\n ry: 0,\n rz: 0\n }, Wo = n, Xo = n, Jo = function () {\n function i() {\n var t = 0, r = n * 3, i = 0, s = 0, o = 0, u = 0, a = 0, f = 0, l = 0, c = 0, h = 0, p = 0;\n for (t = 0; t < r; t += 3)i += e[t | 0], s += e[t + 1 | 0], o += e[t + 2 | 0];\n i /= n, s /= n, o /= n;\n for (t = 0; t < r; t += 3)l = e[t | 0] - i, c = e[t + 1 | 0] - s, h = e[t + 2 | 0] - o, u += l * l, a += c * c, f += h * h;\n u = Math[Bt](u / n), a = Math[Bt](a / n), f = Math[Bt](f / n), p = Math[Bt](u * u + a * a + f * f);\n if (p < .05) {\n var d = zo;\n d.rx = i, d.ry = s, d.rz = o, Wo && xn[J](Wo, Nn)\n } else Xo && xn[J](Xo, Nn)\n }\n\n var e = new Array(300), n = 0, r = 0;\n return function (s, o, u, a) {\n if (s < 0) {\n n = 0, r = xn[B];\n return\n }\n var f = xn[B] - r;\n if (f > 500) {\n var l = n * 3;\n e[l | 0] = o, e[l + 1 | 0] = u, e[l + 2 | 0] = a, n++;\n if (n > 100 || f > 2500)Uo = t, i()\n }\n }\n }(), Ko = function () {\n function u(t) {\n for (i = 0; i < t[kt]; i++)if (e && t[i] === e || s && t[i] === s)t.splice(i, 1), i--\n }\n\n var e = n, r = \"\" + _t + L + et + yn + U + Z + Z + rt + wt + dt + vt + Xt + \"{\" + \"float g = texture2D(sm,tx).g;\" + \"vec2 center = vec2(0.5 + (0.5 - ol)*(step(0.5,tx.x) - 0.5), 0.5);\" + ut + q + P + R + M + \"gl_FragColor=vec4(r,g,b,1.0);\" + \"}\", s = n, o = \"\" + _t + L + et + yn + U + Z + Z + rt + wt + \"uniform vec2 sz;\" + \"uniform float ss;\" + dt + vt + \"uniform float vg;\" + \"uniform vec4 dd;\" + Xt + \"{\" + \"float vig = 0.015;\" + \"float side = step(0.5,tx.x) - 0.5;\" + \"float aspect = (sz.x / sz.y);\" + \"vec2 center = vec2(0.5 + (0.5 - ol)*side, 0.5);\" + ut + \"v.x = v.x * aspect;\" + \"v *= 2.0 * ss;\" + \"float rs = dot(v,v);\" + \"v = v * (dd.x + rs*(dd.y + rs*(dd.z + rs*dd.w)));\" + \"v /= 2.0 * ss;\" + \"v.x = v.x / aspect;\" + \"vec2 vG = center + v;\" + \"float a = (1.0 - smoothstep(vG.x-vig - side*ol, vG.x - side*ol, center.x - 0.25)) * \" + \"(1.0 - smoothstep(center.x + 0.25 - vG.x + side*ol - vig, center.x + 0.25 - vG.x + side*ol, 0.0)) * \" + \"(1.0 - smoothstep(vG.y-vig, vG.y, 0.0)) * \" + \"(1.0 - smoothstep(1.0 - vG.y-vig,1.0 - vG.y, 0.0));\" + \"a *= smoothstep(rs-vig, rs+vig, vg);\" + q + R + P + \"float g = texture2D(sm,vG).g;\" +\n M + \"gl_FragColor=vec4(a*r,a*g,a*b,1.0);\" + \"}\";\n return function (i) {\n var a = xn.webGL;\n if (a) {\n var f, l = a.context, c = a.ppshaders, h = 1 - zn * .1 / hr;\n Un == t && h > .999999 && h < 1.000001 && (i = t), xn[m][Ct] == t && (i = t);\n if (i)if (Un) {\n s == n && (s = a[hn](o, \"ss,ca,dd,ol,sz,vg\"));\n if (s) {\n var p = 1 / Rn[0], d = Rn[1], v = Rn[2], g = Rn[3];\n a[ct](s.prg), l[I](s.ss, hr), l[I](s.ca, h), l.uniform4f(s.dd, p, p * d, p * v, p * g), l[I](s.ol, .5 * vr * (1 + (jn - 1) * .1)), l[I](s.vg, Wn / 30), a[ct](n), u(c), c.push(s)\n }\n } else e == n && (e = a[hn](r, \"ca,ol\")), e && (a[ct](e.prg), l[I](e.ca, h), l[I](e.ol, .5 * vr * (1 + (jn - 1) * .1)), a[ct](n), u(c), c.push(e)); else u(c)\n }\n }\n }(), Qo = \"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4ECQoWBAhhTgGcBAAAAAAABzRFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEuTbuMU6uEHFO7a1OsggGw7AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEMq17GDD0JATYCMTGF2ZjU2LjMuMTAwV0GMTGF2ZjU2LjMuMTAwc6SQC+JFWnEfyt4nOD98NcnLDESJiAAAAAAAAAAAFlSuawEAAAAAAABCrgEAAAAAAAA514EBc8WBAZyBACK1nIN1bmSGhVZfVlA4g4EBI+ODgw9CQOABAAAAAAAADrCBCLqBCFSwgQhUuoEIH0O2dQEAAAAAAAAo54EAo6OBAACAEAIAnQEqCAAIAABHCIWFiIWEiAICAAwNYAD+/6PeABxTu2sBAAAAAAAAEbuPs4EAt4r3gQHxggF88IED\"\n };\n\n\n\n c.reloadurl = function () {\n if (c.sprite) {\n var a = ra.parsePath(c.url), b = a, d = \"\", f = b.indexOf(\"?\");\n 0 < f && (b = b.slice(0, f));\n f = b.indexOf(\"#\");\n 0 < f && (b = b.slice(0, f));\n f = b.lastIndexOf(\".\");\n 0 < f && (d = F(b.slice(f + 1)));\n if (c.loading) {\n if (c.loadingurl == a)return;\n c.loader.kobject = null;\n ba(c.loader, _[48], e, !0);\n ba(c.loader, \"load\", c.loadurl_done, !1);\n Jc(c);\n R(c.loader, _[48], e, !0);\n R(c.loader, \"load\", c.loadurl_done, !1)\n }\n if (c.loadedurl != a)\n if (D = !1, c.loadedurl = null, _[57] == b) {\n z = D = !0;\n Jc(c);\n c.loadedurl = a;\n c.createvar(_[456], c.bgcolor ? Number(c.bgcolor) : 0, u);\n c.createvar(_[463], c.bgalpha ? Number(c.bgalpha) : 0, u);\n c.createvar(_[337], c.bgroundedge ? c.bgroundedge : \"0\", u);\n c.createvar(_[406], c.bgborder ? c.bgborder : \"0\", u);\n c.createvar(_[413], c.bgshadow ? c.bgshadow : \"\", u);\n c.createvar(_[386], pa(c.bgcapture), g);\n g();\n u();\n var h = {};\n h.ss = X;\n h.onresize = function (a, b) {\n a = c.pixelwidth;\n b = c.pixelheight;\n c.imagewidth = a / c.scale;\n c.imageheight = b / c.scale;\n h.ss != X && (h.ss = X, u());\n Q = !0;\n return !1\n };\n c.jsplugin = h;\n c.loadurl_done()\n } \n else if (0 <= a.indexOf(_[281])) {\n D = !0;\n Jc(c);\n c.loadedurl = a;\n var k = new Af;\n k.registerplugin(m, c.getfullpath(), c);\n c.jsplugin = k;\n 0 == c._dyn ? (k.updatehtml(), c.loadurl_done()) : setTimeout(function () {\n k.updatehtml();\n c.loadurl_done()\n }, 7)\n } \n else\"js\" == d ? \n (D = !0, Jc(c), c.loading = !0, c.loaded = !1, c.loadingurl = a, ra.loadfile2(a, _[92], function (b) {\n c.loading = !1;\n c.loaded = !0;\n c.loadedurl = a;\n b = b.data;\n if (null != b) {\n var d = 'the file \"' + a + '\" is not a krpano plugin!';\n try {\n eval(b + \";\")\n } catch (e) {\n d = 'parsing \"' + a + '\" failed: ' + e\n }\n _[11] == typeof krpanoplugin2 ? (b = new krpanoplugin2, b.registerplugin(m, c.getfullpath(), c), c._nativeelement = !0, c.jsplugin = b, c.loadurl_done()) : la(3, d)\n }\n })) : \"swf\" == d ? la(2, c._type + \"[\" + c.name + _[78] + Vd(a)) : c.loader.src != a && (c.loaded && c.preload && (c._ispreload = !0, c.preload = !1, c.onloaded = null), ra.DMcheck(a) ? (c.loading = !0, c.loaded = !1, c.loadingurl = a, c.loader.src = a) : (c.loading = !1, la(3, c._type + \"[\" + c.name + _[85] + a)))\n }\n };\n c.loadurl_done = function () {\n 1 != c._destroyed && (0 == D && (c.sprite.style.backgroundImage = 'url(\"' + c.loader.src + '\")'), h(c, c._crop), c.loading = !1, Q = c.loaded = !0, 0 == D && (c.loadedurl = c.loadingurl), c.poschanged = !0, 0 == (b.iphone && b.retina && 7 > b.iosversion) && null == c.jsborder && 0 == D && null == c.parent && null == c._childs && (c._use_css_scale = !0), 0 == c.preload && 0 == c._ispreload && (c._busyonloaded = da.busy || da.blocked, c._busyonloaded && da.callaction(_[188], c, !0)), da.callaction(null != c.altonloaded ? c.altonloaded : c.onloaded, c, !0))\n };\n var B = null;\n c.updatepluginpos = c.updatepos = function () {\n var a = _[1] == c._type;\n c.poschanged = !1;\n var d = c.sprite, e = c.loader;\n if (d && (e || 0 != D)) {\n D && (e = null);\n var f = c._align, g = c._scale;\n f || (f = _[66]);\n var h = c._use_css_scale, k = c.imagewidth, l = c.imageheight, m = !1, p = c._crop;\n c.pressed && c._ondowncrop ? p = c._ondowncrop : c.hovering && c._onovercrop && (p = c._onovercrop);\n p && (p = String(p).split(\"|\"), 4 == p.length ? (p[0] |= 0, p[1] |= 0, p[2] |= 0, p[3] |= 0) : p = null);\n var r = c.scale9grid;\n r && (r = String(r).split(\"|\"), 4 <= r.length ? (r[0] |= 0, r[1] |= 0, r[2] |= 0, r[3] |= 0, h = c._use_css_scale = !1, c._scalechildren = !1) : r = null);\n var u = X, v = Qa, w = ya;\n a && c.distorted && (u = 1, v = w = 1E3);\n var x = 1, y = 1, z = c._parent, E = !0;\n if (z) {\n var C = n(z);\n C ? (C.poschanged && C.updatepos(), 0 == h ? (v = C._pxw * u, w = C._pxh * u) : (v = C.imagewidth * u, w = C.imageheight * u), C._scalechildren ? (x = 0 != C.imagewidth ? v / u / C.imagewidth : 1, y = 0 != C.imageheight ? w / u / C.imageheight : 1) : (x *= C._finalxscale, y *= C._finalyscale), 0 == C.loaded && (E = !1, d.style.display = \"none\")) : la(3, 'no parent \"' + z + '\" found')\n }\n var A = c._width, F = c._height, H = c._x, J = c._y, z = c._ox, K = c._oy;\n isNaN(k) && (k = 0);\n isNaN(l) && (l = 0);\n A && 0 < String(A).indexOf(\"%\") ? A = parseFloat(A) * (v / u) / (100 * x) : null == A && (A = k);\n F && 0 < String(F).indexOf(\"%\") ? F = parseFloat(F) * (w / u) / (100 * y) : null == F && (F = l);\n var S = \"prop\" == A | (\"prop\" == F) << 1, A = Number(A) * u, F = Number(F) * u;\n 0 > A && (A = v / x + A, 0 > A && (A = 0));\n 0 > F && (F = w / y + F, 0 > F && (F = 0));\n S && (S & 1 ? A = 0 != l ? Number(F) * k / l : 0 : F = 0 != k ? Number(A) * l / k : 0);\n 0 < c.maxwidth && A > u * c.maxwidth && (A = u * c.maxwidth);\n 0 < c.minwidth && A < u * c.minwidth && (A = u * c.minwidth);\n 0 < c.maxheight && F > u * c.maxheight && (F = u * c.maxheight);\n 0 < c.minheight && F < u * c.minheight && (F = u * c.minheight);\n A = A * x * g;\n F = F * y * g;\n H && 0 < String(H).indexOf(\"%\") ? H = parseFloat(H) * (v / u) / (100 * x) : null == H && (H = 0);\n J && 0 < String(J).indexOf(\"%\") ? J = parseFloat(J) * (w / u) / (100 * y) : null == J && (J = 0);\n H = Number(H) * u * x;\n J = Number(J) * u * y;\n g = c._hszscale;\n z = z && 0 < String(z).indexOf(\"%\") ? parseFloat(z) * A * g / 100 / u : null == z ? 0 : z * x;\n K = K && 0 < String(K).indexOf(\"%\") ? parseFloat(K) * F * g / 100 / u : null == K ? 0 : K * y;\n z = Number(z) * u;\n K = Number(K) * u;\n 0 != c.accuracy || a || (A = hc(A), F = hc(F));\n var g = 0 != k ? A / k : 0, S = 0 != l ? F / l : 0, ea = A / u, Z = F / u;\n if (ea != c._pxw || Z != c._pxh)c._pxw = ea, c._pxh = Z, c.pixelwidth = ea / x, c.pixelheight = Z / y, m = !0;\n this._scalechildren ? (c._finalxscale = g, c._finalyscale = S) : (c._finalxscale = x, c._finalyscale = y);\n h ? (d.style.width = k + \"px\", d.style.height = l + \"px\") : (d.style.width = A + \"px\", d.style.height = F + \"px\");\n if (r) {\n var Z = r, O = A, N = F, I = p, p = c.sprite, l = c.loader, M;\n M = X;\n 5 == Z.length && (M *= Number(Z[4]));\n e = l.naturalWidth;\n k = l.naturalHeight;\n null == I && (I = [0, 0, e, k]);\n l = 'url(\"' + l.src + '\")';\n if (null == B)for (B = Array(9), x = 0; 9 > x; x++)r = Ja(), r.kobject = c, r.imgurl = null, r.style.position = _[0], r.style.overflow = _[6], B[x] = r, p.appendChild(r);\n for (var x = [I[0] + 0, I[0] + Z[0], I[0] + Z[0] + Z[2], I[0] + I[2]], y = [I[1] + 0, I[1] + Z[1], I[1] + Z[1] + Z[3], I[1] + I[3]], ea = [Z[0], Z[2], I[2] - Z[0] - Z[2]], Z = [Z[1], Z[3], I[3] - Z[1] - Z[3]], O = [ea[0] * M | 0, O - ((ea[0] + ea[2]) * M | 0), ea[2] * M | 0], R = [Z[0] * M | 0, N - ((Z[0] + Z[2]) * M | 0), Z[2] * M | 0], T = [0, O[0], O[0] + O[1]], U = [0, R[0], R[0] + R[1]], qa, V, I = 0; 3 > I; I++)for (M = 0; 3 > M; M++)r = B[3 * I + M], N = r.style, qa = 0 != ea[M] ? O[M] / ea[M] : 0, V = 0 != Z[I] ? R[I] / Z[I] : 0, r.imgurl != l && (r.imgurl = l, N.backgroundImage = l), r = b.mac && b.firefox ? L.devicePixelRatio : 1, N[pd] = (e * qa * r | 0) / r + \"px \" + (k * V * r | 0) / r + \"px\", N.backgroundPosition = (-x[M] * qa * r | 0) / r + \"px \" + (-y[I] * V * r | 0) / r + \"px\", N.left = T[M] + \"px\", N.top = U[I] + \"px\", N.width = O[M] + \"px\", N.height = R[I] + \"px\";\n p.style.background = \"none\"\n } else {\n if (B) {\n try {\n for (k = 0; 9 > k; k++)B[k].kobject = null, d.removeChild(B[k])\n } catch (Ca) {\n }\n B = null;\n c.sprite && c.loader && (c.sprite.style.backgroundImage = 'url(\"' + c.loader.src + '\")')\n }\n p ? (k = -p[0], p = -p[1], h || (k *= g, p *= S), d.style.backgroundPosition = k + \"px \" + p + \"px\") : d.style.backgroundPosition = \"0 0\";\n e && (d.style[pd] = 0 == h ? e.naturalWidth * g + \"px \" + e.naturalHeight * S + \"px\" : e.naturalWidth + \"px \" + e.naturalHeight + \"px\")\n }\n c.jsplugin && c.jsplugin.onresize && (c._pxw != c.imagewidth || c._pxh != c.imageheight) && (p = [c.imagewidth, c.imageheight], c.imagewidth = c._pxw, c.imageheight = c._pxh, !0 === c.jsplugin.onresize(c._pxw, c._pxh) && (c.imagewidth = p[0], c.imageheight = p[1]));\n c._oxpix = z;\n c._oypix = K;\n l = \"\";\n e = p = 0;\n if (0 == a) {\n p = c._edge;\n if (null == p || \"\" == p)p = f;\n a = k = 0;\n k = 0 <= p.indexOf(\"left\") ? k + 0 : 0 <= p.indexOf(_[3]) ? k + -A : k + -A / 2;\n a = 0 <= p.indexOf(\"top\") ? a + 0 : 0 <= p.indexOf(_[2]) ? a + -F : a + -F / 2;\n p = 0 <= f.indexOf(\"left\") ? H + k : 0 <= f.indexOf(_[3]) ? v - H + k : v / 2 + H + k;\n e = 0 <= f.indexOf(\"top\") ? J + a : 0 <= f.indexOf(_[2]) ? w - J + a : w / 2 + J + a;\n c.pixelx = (p + z) / u;\n c.pixely = (e + K) / u;\n p -= q[3];\n e -= q[0];\n 0 == c.accuracy && (p = hc(p), e = hc(e));\n h && (u = f = 1, v = c.imagewidth / 2, w = c.imageheight / 2, J = H = 0, C && 0 == C._scalechildren && (f /= C.pixelwidth / C.imagewidth, u /= C.pixelheight / C.imageheight, H = -k * (1 - f), J = -a * (1 - u)), l = _[60] + (-v + H) + \"px,\" + (-w + J) + _[340] + g * f + \",\" + S * u + _[293] + v + \"px,\" + w + \"px) \");\n 0 == c.accuracy && (p = hc(p), e = hc(e));\n C = A / 2 + k;\n F = F / 2 + a;\n h && (0 != g && (C /= g, z /= g), 0 != S && (F /= S, K /= S));\n l = _[60] + p + \"px,\" + e + \"px) \" + l + _[60] + -C + \"px,\" + -F + _[332] + c._rotate + _[245] + (C + z) + \"px,\" + (F + K) + \"px)\";\n Kc && 2 > Nb && !0 !== b.opera ? l = _[182] + l : b.androidstock && (l = _[199] + l);\n ib ? d.style[ib] = l : (d.style.left = p + \"px\", d.style.top = e + \"px\");\n h = c._visible && E ? \"\" : \"none\";\n h != d.style.display && (d.style.display = h)\n }\n if (m || Q) {\n if (d = c._childs)for (m = d.length, k = 0; k < m; k++)d[k].updatepos();\n Q = !1\n }\n }\n }\n }, Af = function () {\n function a(a, b, c, e) {\n v.registerattribute(b, c, function (c) {\n r[b] != c && (r[b] = c, null != e ? e(b, c) : d(a))\n }, function () {\n return r[b]\n })\n }\n\n function d(a) {\n l |= a;\n v && null == y && (y = setTimeout(m, 0))\n }\n\n function m() {\n y = null;\n if (v) {\n var a = !1;\n 2 == l && (a = e());\n 0 == a && p();\n l = 0\n }\n }\n\n function f(a) {\n a && 0 == a.indexOf(_[74]) && ((a = U(\"data[\" + a.slice(5) + _[61])) || (a = \"\"));\n return a\n }\n\n function g(a) {\n if (a && a.parentNode)try {\n a.parentNode.removeChild(a)\n } catch (b) {\n }\n }\n\n function n(a) {\n a && (a.style.left = _[122], a.style.visibility = _[6], V.viewerlayer.appendChild(a))\n }\n\n function k(a) {\n a.ontouchend = function () {\n a.click()\n }\n }\n\n function e() {\n var a = !1;\n if (H) {\n var b = H.childNodes[0];\n if (b) {\n var a = b.style, b = pa(r.background), c = pa(r.border), d = parseInt(r.backgroundcolor), e = parseFloat(r.backgroundalpha);\n isNaN(e) && (e = 1);\n var f = parseFloat(r.borderwidth);\n isNaN(f) && (f = 1);\n var g = r.bordercolor, g = g ? parseInt(g) : 0, h = parseFloat(r.borderalpha);\n isNaN(h) && (h = 1);\n var k = Number(r.shadow);\n isNaN(k) && (k = 0);\n var l = Number(r.textshadow);\n isNaN(l) && (l = 0);\n var m = 1 == Lc ? .78 : .8, n = r.shadowangle * Y, p = r.textshadowangle * Y;\n a.backgroundColor = b ? ca(d, e) : \"\";\n a.borderColor = c && 0 < f ? ca(g, e * h) : \"\";\n a.borderRadius = 0 < D[0] + D[1] + D[2] + D[3] ? D.join(\"px \") + \"px\" : \"\";\n a[pc] = 0 < k ? Math.round(k * Math.cos(n)) + \"px \" + Math.round(k * Math.sin(n)) + \"px \" + m * r.shadowrange + \"px \" + ca(r.shadowcolor, e * r.shadowalpha) : \"\";\n a.textShadow = 0 < l ? Math.round(l * Math.cos(p)) + \"px \" + Math.round(l * Math.sin(p)) + \"px \" + m * r.textshadowrange + \"px \" + ca(r.textshadowcolor, e * r.textshadowalpha) : \"\";\n a = !0\n }\n }\n return a\n }\n\n function p() {\n if (v) {\n y && (clearTimeout(y), y = null);\n var a = 2 == u || 1 == u && 0 == v.haveUserWidth(), d = 2 == h || 1 == h && 0 == v.haveUserHeight(), g = r.html, m = r.css, g = g ? f(g) : \"\", m = m ? f(m) : \"\";\n pa(r.background);\n var w = pa(r.border), t = parseFloat(r.borderwidth);\n isNaN(t) && (t = 1);\n var g = Ed(g), m = m.split(\"0x\").join(\"#\"), E = m.split(\"}\").join(\"{\").split(\"{\");\n if (1 < E.length) {\n for (var D = [], m = 1; m < E.length; m += 2) {\n var J = Ha(E[m - 1]), L = E[m], M = \"p\" == F(J) ? \"div\" : J, g = g.split(\"<\" + J).join(\"<\" + M + _[407] + L + \"' \"), g = g.split(\"</\" + J + \">\").join(\"</\" + M + \">\");\n D.push(E[m])\n }\n m = \"\"\n }\n g = _[206] + K[0] + \"px \" + K[1] + \"px \" + K[2] + \"px \" + K[3] + \"px;\" + m + \"'>\" + g + _[68];\n 1 == r.vcenter && 0 == d && (g = \"<table style='width:100%;height:100%;border-collapse:collapse;text-decoration:inherit;'><tr style='vertical-align:middle;'><td style='padding:0;'>\" + g + _[214]);\n g = g.split(\"<p\").join(_[161]);\n g = g.split(\"</p>\").join(_[68]);\n m = _[213];\n if (1 == a || 0 == pa(r.wordwrap))m += _[205];\n 0 == d && (m += _[308]);\n z = 1;\n w && 0 < t ? (z = t * X, m += _[450] + Math.ceil(t) + _[197]) : z = 0;\n 0 == a && (m += _[505] + v.imagewidth + _[202]);\n g = unescape(g);\n g = '<div style=\"' + m + '\">' + g + _[68];\n v.sprite.style.color = _[26];\n v.sprite.style[_[51]] = \"none\";\n H && H.parentNode == v.sprite && (A = H, H = null);\n null == H && (H = Ja(), I = H.style, pa(r.selectable) && (I.webkitUserSelect = I.MozUserSelect = I.msUserSelect = I.oUserSelect = I.userSelect = \"text\", I.cursor = \"text\"), I.position = _[0], I.left = I.top = -z + \"px\", _[1] == v._type && 1 == v._distorted ? (I.width = \"100%\", I.height = \"100%\", I[ib] = \"\") : (I[Zc] = \"0 0\", I[ib] = _[141] + X + \")\", I.width = 100 / X + \"%\", I.height = 100 / X + \"%\"), I.fontSize = \"12px\", I.fontFamily = \"Arial\", I.lineHeight = _[45]);\n H.innerHTML = g;\n e();\n if (a = H.getElementsByTagName(\"a\"))if (d = a.length, 0 < d)for (m = 0; m < d; m++)if (g = a[m])w = \"\" + g.href, _[509] == w.toLowerCase().slice(0, 6) && (g.href = _[173] + V.viewerlayer.id + _[376] + w.slice(6).split(\"'\").join('\"') + \"','\" + v.getfullpath() + \"');\"), b.touch && k(g);\n _[1] == v._type && (v.forceupdate = !0, ob(!0, v.index));\n n(H);\n c = !1;\n v.loaded = !0;\n v.scalechildren = v.scalechildren;\n C = 0;\n null == q && (q = setTimeout(x, 10));\n l = 0\n }\n }\n\n function x() {\n q = null;\n c = !1;\n if (v && H) {\n var a = 2 == u || 1 == u && 0 == v.haveUserWidth(), b = 2 == h || 1 == h && 0 == v.haveUserHeight();\n J = !0;\n var d = H && H.parentNode == v.sprite, e = 0, f = 0;\n if (0 == a && 0 == b)f = v.imageheight, 1 > f && (f = 1); else {\n try {\n e = H.childNodes[0].clientWidth, f = H.childNodes[0].clientHeight, 3 > f && (f = 0)\n } catch (k) {\n }\n if (1 > f && d && H.parentNode && 1 > H.parentNode.clientHeight) {\n n(H);\n C = 0;\n null == q && (q = setTimeout(x, 10));\n J = !1;\n return\n }\n }\n if (0 < f) {\n if (v._enabledstate = null, v.enabled = v._enabled, I.top = I.left = -z + \"px\", c = !0, A && A.parentNode == v.sprite ? (I.visibility = _[12], v.sprite.replaceChild(H, A), A = null) : (g(A), A = null, I.visibility = _[12], v.sprite.appendChild(H)), 0 != a || 0 != b)if (e = a ? Math.round(e) : v.imagewidth, f = b ? Math.round(f) : v.imageheight, e != v._width || f != v._height)a && (v._width = e), b && (v._height = f), v.poschanged = !0, _[1] == v._type ? ob(!0, v.index) : v.updatepluginpos(), v.onautosized && da.callaction(v.onautosized, v, !0)\n } else C++, 10 > C ? null == q && (q = setTimeout(x, 20)) : (A && A.parentNode == v.sprite && (v.sprite.replaceChild(H, A), A = null), v.height = 0);\n J = !1\n }\n }\n\n var v = null, r = {}, y = null, l = 0, u = 1, h = 1, c = !1, K = [0, 0, 0, 0], D = [0, 0, 0, 0], z = 1, q = null, J = !1, C = 0, L = X, A = null, H = null, I = null;\n this.registerplugin = function (b, c, e) {\n v = e;\n b = v.html;\n c = v.css;\n delete v.html;\n delete v.css;\n v._istextfield = !0;\n v.accuracy = 0;\n v.registerattribute(_[377], \"auto\", function (a) {\n u = \"auto\" == F(a) ? 1 : 2 * pa(a);\n d(1)\n }, function () {\n return 1 == u ? \"auto\" : 2 == u ? \"true\" : _[31]\n });\n v.registerattribute(_[357], \"auto\", function (a) {\n h = \"auto\" == F(a) ? 1 : 2 * pa(a);\n d(1)\n }, function () {\n return 1 == h ? \"auto\" : 2 == h ? \"true\" : _[31]\n });\n a(1, _[446], !1);\n a(1, _[132], \"2\", function (a, b) {\n Ib(b, 1, \" \", K);\n d(1)\n });\n a(2, _[107], !0);\n a(2, _[235], 1);\n a(2, _[237], 16777215);\n a(1, _[71], !1);\n a(1, _[105], 1);\n a(2, _[104], 1);\n a(2, _[101], 0);\n a(2, _[380], \"0\", function (a, b) {\n Ib(b, 1, \" \", D);\n d(2)\n });\n a(2, _[522], 0);\n a(2, _[320], 4);\n a(2, _[318], 45);\n a(2, _[316], 0);\n a(2, _[315], 1);\n a(2, _[366], 0);\n a(2, _[241], 4);\n a(2, _[242], 45);\n a(2, _[243], 0);\n a(2, _[244], 1);\n a(1, _[370], !1);\n a(1, _[410], !0);\n a(1, _[502], \"\");\n v.registerattribute(\"blur\", 0);\n v.registerattribute(_[408], 0);\n v.registerattribute(_[440], null, function (a) {\n null != a && \"\" != a && \"none\" != (\"\" + a).toLowerCase() && (h = 2, d(1))\n }, function () {\n return 2 == h ? _[136] : \"none\"\n });\n v.registercontentsize(400, 300);\n v.sprite.style.pointerEvents = \"none\";\n a(1, \"html\", b ? b : \"\");\n a(1, \"css\", c ? c : \"\")\n };\n this.unloadplugin = function () {\n v && (v.loaded = !1, q && clearTimeout(q), y && clearTimeout(y), g(A), g(H));\n v = y = q = I = H = A = null\n };\n this.onvisibilitychanged = function (a) {\n a && _[1] == v._type && (v.forceupdate = !0, ob(!0, v.index));\n return !1\n };\n this.onresize = function (a, b) {\n if (L != X)return L = X, Ib(r.padding, 1, \" \", K), Ib(r.roundedge, 1, \" \", D), p(), !1;\n if (J)return !1;\n if (v) {\n var d = 2 == u || 1 == u && 0 == v.haveUserWidth(), e = 2 == h || 1 == h && 0 == v.haveUserHeight();\n v.registercontentsize(a, b);\n H && (_[1] != v._type || 1 != v._distorted ? (I[ib] = _[141] + X + \")\", I.width = 100 / X + \"%\", I.height = 100 / X + \"%\") : (I[ib] = \"\", I.width = \"100%\", I.height = \"100%\"), c && (I.left = I.top = -z + \"px\"), 0 == d && (H.childNodes[0].style.width = a + \"px\"), 0 == e && (H.childNodes[0].style.height = b + \"px\"), d || e ? (c = !1, d && (v.sprite.style.width = 0), e && (v.sprite.style.height = 0), C = 0, null == q && (q = setTimeout(x, 10))) : (0 == d && (I.width = a + 2 * z + \"px\"), 0 == e && (I.height = b + \"px\")))\n }\n return !1\n };\n this.updatehtml = p\n }, ub = !1, qc = 1, wf = function () {\n function a() {\n 0 == b.css3d && d._distorted && (d._distorted = !1, d.zoom = !0);\n d.poschanged = !0;\n d.jsplugin && d.jsplugin.onresize && (d.forceupdate = !0, d.imagewidth = d.imageheight = 0);\n d.sprite && (d._visible && d.loaded && ob(!0, d.index), d.sprite.style[ib + _[143]] = d._distorted ? \"0 0\" : _[461])\n }\n\n var d = this;\n d.prototype = Ob;\n this.prototype.call(this);\n d._type = _[1];\n var m = d.createvar;\n m(\"ath\", 0);\n m(\"atv\", 0);\n m(\"depth\", 1E3);\n m(_[501], 0);\n d.scaleflying = !0;\n m(\"zoom\", !1);\n m(\"rx\", 0);\n m(\"ry\", 0);\n m(\"rz\", 0);\n m(\"tx\", 0);\n m(\"ty\", 0);\n m(\"tz\", 0);\n m(_[401], !1, a);\n d.accuracy = 1;\n d.zorder2 = 0;\n d.inverserotation = !1;\n d.forceupdate = !1;\n d._hit = !1;\n d.point = new bb(null);\n var f = d.create;\n d.create = function () {\n function b() {\n Gd(d)\n }\n\n f();\n d.createvar(_[121], d.polyline ? pa(d.polyline) : !1, b);\n d.createvar(_[398], d.fillcolor ? Number(d.fillcolor) : 11184810, b);\n d.createvar(_[396], d.fillalpha ? Number(d.fillalpha) : .5, b);\n d.createvar(_[105], d.borderwidth ? Number(d.borderwidth) : 3, b);\n d.createvar(_[101], d.bordercolor ? Number(d.bordercolor) : 11184810, b);\n d.createvar(_[104], d.borderalpha ? Number(d.borderalpha) : 1, b);\n a()\n };\n d.updatepos = function () {\n d.poschanged = !0\n };\n d.getcenter = function () {\n var a = 0, b = 0, f = 25;\n if (d._url)a = d._ath, b = d._atv, f = 25 * Number(d.scale); else {\n for (var e = d.point.getArray(), m = 0, p = e.length, v, r, y, l = 5E4, u = -5E4, h = 5E4, c = -5E4, E = 5E4, D = -5E4, z = 0, q = 0, F = 0, m = 0; m < p; m++)r = e[m], v = Number(r.ath), y = Number(r.atv), r = 0 > v ? v + 360 : v, v < l && (l = v), v > u && (u = v), r < h && (h = r), r > c && (c = r), y < E && (E = y), y > D && (D = y), v = (180 - v) * Y, y *= Y, z += Math.cos(y) * Math.cos(v), F += Math.cos(y) * Math.sin(v), q += Math.sin(y);\n 0 < p && (z /= p, q /= p, F /= p, a = 90 + Math.atan2(z, F) / Y, b = -Math.atan2(-q, Math.sqrt(z * z + F * F)) / Y, 180 < a && (a -= 360), v = u - l, y = D - E, 170 < v && (v = c - h), f = v > y ? v : y)\n }\n 1 > f ? f = 1 : 90 < f && (f = 90);\n e = new Hb;\n e.x = a;\n e.y = b;\n e.z = f;\n f = arguments;\n 2 == f.length && (I(f[0], a, !1, this), I(f[1], b, !1, this));\n return e\n }\n }, $d = \"\", ic = 1, Be = \"translate3D(;;px,;;px,0px) ;;rotateX(;;deg) rotateY(;;deg) ;;deg) rotateX(;;deg) scale3D(;;) translateZ(;;px) rotate(;;deg) translate(;;px,;;px) rotate;;deg) rotate;;deg) rotate;;deg) scale(;;,;;) translate(;;px,;;px)\".split(\";\"), Ce = \"translate(;;px,;;px) translate(;;px,;;px) rotate(;;deg) translate(;;px,;;px) scale(;;,;;) translate(;;px,;;px)\".split(\";\"), tf = function () {\n this.fullscreen = b.fullscreensupport;\n this.touch = this.versioninfo = !0;\n this.customstyle = null;\n this.enterfs = _[371];\n this.exitfs = _[246];\n this.item = new bb(function () {\n this.visible = this.enabled = !0;\n this.caption = null;\n this.separator = !1;\n this.onclick = null\n })\n }, Xd = function () {\n function a(a) {\n var b = ja.FRM;\n if (0 == b && n)n(a); else {\n 0 == b && (b = 60);\n var d = 1E3 / b, b = (new Date).getTime(), d = Math.max(0, d - (b - g));\n L.setTimeout(a, d);\n g = b + d\n }\n }\n\n function d() {\n m && (f(), a(d))\n }\n\n var m = !0, f = null, g = 0, n = L.requestAnimationFrame || L.webkitRequestAnimationFrame || L.mozRequestAnimationFrame || L.oRequestAnimationFrame || L.msRequestAnimationFrame;\n return {\n start: function (g) {\n if (b.ios && 9 > b.iosversion || b.linux && b.chrome)n = null;\n m = !0;\n f = g;\n a(d)\n }, stop: function () {\n m = !1;\n f = null\n }\n }\n }();\n Jb.init = function (a) {\n Jb.so = a;\n b.runDetection(a);\n if (b.css3d || b.webgl)ib = b.browser.css.transform, Id = ib + \"Style\", Zc = ib + _[143];\n pd = b.browser.css.backgroundsize;\n pc = b.browser.css.boxshadow;\n var d = b.webkit && 534 > b.webkitversion, E = 0;\n b.ios && 0 == b.simulator ? (Nb = 0, 5 <= b.iosversion && 1 != Yc && (Nb = 1, E = b._cubeOverlap = 4)) : b.android ? (Nb = 2, b._cubeOverlap = 0, E = 4, b.chrome ? (Nb = 1, Lc = 0, b._cubeOverlap = 4) : b.firefox && (E = 0)) : (b.windows || b.mac) && d ? (be = 1, Lc = Nb = 0, b._cubeOverlap = 4) : (Nb = 1, Lc = 0, E = 2, b.desktop && b.safari && (E = 8), b.chrome && (22 <= b.chromeversion && 25 >= b.chromeversion ? (b._cubeOverlap = 64, E = 16) : b._cubeOverlap = 1), b.ie && (E = 8));\n b._tileOverlap = E;\n qf();\n if (!V.build(a))return !1;\n ia.layer = V.controllayer;\n ia.panoControl = Pa;\n ia.getMousePos = V.getMousePos;\n ja.htmltarget = V.htmltarget;\n ja.viewerlayer = V.viewerlayer;\n la(1, _[128] + m.version + _[426] + m.build + (m.debugmode ? _[476] : \")\"));\n d = !(b.android && b.firefox && 22 > b.firefoxversion);\n a.html5 && (E = F(a.html5), 0 <= E.indexOf(_[30]) ? d = !0 : 0 <= E.indexOf(\"css3d\") && (d = !1));\n b.webgl && d ? Oa.setup(2) : Oa.setup(1);\n la(1, b.infoString + Oa.infoString);\n a && a.basepath && \"\" != a.basepath && (ra.swfpath = a.basepath);\n V.onResize(null);\n Pa.registerControls(V.controllayer);\n Xd.start(xf);\n if (!b.css3d && !b.webgl && 0 > F(a.html5).indexOf(_[488]))Ea(_[156]); else {\n var f, g, n = [], d = !0, E = 0, k = [], e = _[150].split(\" \"), w = _[151].split(\" \"), x = null, v = null, r = Xc(100), y = F(_[160]).split(\";\"), l, u;\n if (null != mb && \"\" != mb) {\n var h = ra.b64u8(mb), c = h.split(\";\");\n if (l = c[0] == y[0])if (h = F(h), 0 <= h.indexOf(y[6]) || 0 <= h.indexOf(y[7]) || 0 <= h.indexOf(y[8]))l = !1;\n var h = mb = null, h = c.length, h = h - 2, K = c[h], D = 0;\n 0 == K.indexOf(\"ck=\") ? K = K.slice(3) : l = !1;\n if (l)for (l = 0; l < h; l++) {\n var z = c[l], q = z.length;\n for (u = 0; u < q; u++)D += z.charCodeAt(u) & 255;\n if (!(4 > q) && (u = z.slice(3), \"\" != u))switch (_[177].indexOf(z.slice(0, 3)) / 3 | 0) {\n case 1:\n Ya = parseInt(u);\n d = 0 == (Ya & 1);\n break;\n case 2:\n f = u;\n n.push(y[1] + \"=\" + u);\n break;\n case 3:\n g = u;\n n.push(y[2] + u);\n break;\n case 4:\n k.push(u);\n n.push(y[3] + \"=\" + u);\n break;\n case 5:\n z = parseInt(u);\n x = new Date;\n x.setFullYear(z >> 16, (z >> 8 & 15) - 1, z & 63);\n break;\n case 6:\n v = u;\n break;\n case 7:\n q = z = u.length;\n if (128 > z)for (; 128 > q;)u += u.charAt(q % z), q++;\n od = u;\n break;\n case 8:\n break;\n case 9:\n Na = u.split(\"|\");\n 4 != Na.length && (Na = null);\n break;\n case 10:\n break;\n default:\n n.push(z)\n }\n }\n D != parseInt(K) && (E = 1);\n l = aa.location;\n l = F(l.search || l.hash);\n if (0 < l.indexOf(_[90])) {\n Ea(n.join(\", \"), F(_[90]).toUpperCase());\n return\n }\n 0 < l.indexOf(_[248]) && (null == a.vars && (a.vars = {}), a.vars.consolelog = !0, Ya = Ya & 1 | 14);\n c = null\n }\n vc = n = F(aa[y[3]]);\n try {\n throw Error(\"path\");\n } catch (J) {\n l = \"\" + J.stack, c = l.indexOf(\"://\"), 0 < c && (c += 3, h = l.indexOf(\"/\", c), l = l.slice(c, h), h = l.indexOf(\":\"), 0 < h && (l = l.slice(0, h)), vc = l)\n }\n 0 == n.indexOf(_[524]) && (n = n.slice(4));\n y = \"\" == n || _[382] == n || _[381] == n || 0 == n.indexOf(y[4]);\n b.browser.domain = y ? null : n;\n if (0 == (Ya & 2) && y)E = 3; else if (!y) {\n l = n.indexOf(\".\") + 1;\n 0 > n.indexOf(\".\", l) && (l = 0);\n y = n;\n n = n.slice(l);\n 0 == n.indexOf(_[479]) && _[109] != n && (E = 2);\n for (l = 0; l < e.length; l++)if (e[l] == n) {\n E = 2;\n break\n }\n if (0 == E && 0 < k.length)for (E = 2, l = 0; l < k.length; l++)if (n == k[l] || gd(k[l], y)) {\n E = 0;\n break\n }\n }\n if (f || g)for (g = (\".\" + f + \".\" + g).toLowerCase(), l = 0; l < w.length; l++)0 <= g.indexOf(w[l]) && (E = 1);\n if (null != x && new Date > x)Ea(_[250]), null != v && setTimeout(function () {\n L.location = v\n }, 500); else if (0 < E)Ea(_[97] + [\"\", _[251], _[222]][E - 1]); else {\n Na && (Ya &= -129, la(1, Na[0]));\n 0 == d && (f ? la(1, _[253] + f) : d = !0);\n (d || 0 == (Ya & 1)) && V.log(r);\n f = null;\n a.xml && (f = a.xml);\n a.vars && (a.vars.xml && (f = a.vars.xml), f || (f = a.vars.pano));\n 0 == (Ya & 4) && (a.vars = null);\n Ya & 16 && (m[rc[0]] = m[rc[1]] = !1);\n g = V.viewerlayer;\n Ya & 8 ? (g.get = gc(U), g.set = gc(I), g.call = hd) : (g.set = function () {\n la(2, _[180])\n }, g.get = Na ? gc(U) : g.set, g.call = gc(da.SAcall));\n g.screentosphere = p.screentosphere;\n g.spheretoscreen = p.spheretoscreen;\n g.unload = ve;\n a.initvars && Wd(a.initvars);\n da.loadpano(f, a.vars);\n if (a.onready)a.onready(g);\n return !0\n }\n }\n }\n }\n\n var _ = function () {\n // var F = mb;\n // mb = null;\n // var Ha = F.length - 3, pa, ga, sa, ha = \"\", va = \"\", Aa = 1, R = 0, ba = [], Ja = [1, 48, 55, 53, 38, 51, 52, 3];\n // sa = F.charCodeAt(4);\n // for (pa = 5; pa < Ha; pa++)ga = F.charCodeAt(pa), 92 <= ga && ga--, 34 <= ga && ga--, ga -= 32, ga = (ga + 3 * pa + 59 + Ja[pa & 7] + sa) % 93, sa = (23 * sa + ga) % 32749, ga += 32, 124 == ga ? 0 == Aa ? R ^= 1 : 1 == R ? R = 0 : (ba.push(ha), ha = \"\", Aa = 0) : (ga = String.fromCharCode(ga), 0 == R ? ha += ga : va += ga, Aa++);\n // 0 < Aa && ba.push(ha);\n // ga = 0;\n // for (Ha += 3; pa < Ha;)ga = ga << 5 | F.charCodeAt(pa++) - 53;\n // ga != sa && (ba = null);\n // mb = va;\n\n\n //sohow\n // var ba_json = window.JSON.stringify(ba);\n var ba = new Array(\"absolute\",\"hotspot\",\"bottom\",\"right\",\"mouseup\",\"default\",\"hidden\",\"mousedown\",\"pointerover\",\"pointerout\",\"mousemove\",\"function\",\"visible\",\"string\",\"action\",\"container\",\"mouseover\",\"mouseout\",\"pointer\",\"mouse\",\"translateZ(+2000000000000px)\",\" - xml parsing failed!\",\"parsererror\",\"px solid \",\"cylinder\",\"text/xml\",\"#000000\",\"moveto\",\"height\",\"plugin\",\"webgl\",\"false\",\" - wrong encryption!\",\"Invalid expression\",\"MSPointerOver\",\"MSPointerOut\",\"transparent\",\"contextmenu\",\"sans-serif\",\"cubestrip\",\"#FFFFFF\",\"iphone\",\"sphere\",\"linear\",\"mobile\",\"normal\",\"krpano\",\"color\",\"error\",\"width\",\"align\",\"-webkit-text-size-adjust\",\"visibilitychange\",\"translate3D(\",\"image.level[\",\"Courier New\",\"easeoutquad\",\"<container>\",\"loading of \",\"preserve-3d\",\"translate(\",\"].content\",\" failed!\",\"onresize\",\"pagehide\",\"position\",\"lefttop\",\"boolean\",\"</div>\",\"LOOKTO\",\"webkit\",\"border\",\"scene[\",\"blend\",\"data:\",\"image\",\"-webkit-tap-highlight-color\",\"http://www.w3.org/2000/svg\",\"] skipped flash file: \",\"webkitvisibilitychange\",\" - loading failed! (\",\"mozvisibilitychange\",\"msvisibilitychange\",\"experimental-webgl\",\"orientationchange\",\"] loading error: \",\"deg) translateZ(\",\"unknown action: \",\"uniform vec3 cc;\",\"actions overflow\",\"showlicenseinfo\",\"MSGestureChange\",\"text/javascript\",\"MSInertiaStart\",\"get:calc:data:\",\"DOMMouseScroll\",\"MSGestureStart\",\"LICENSE ERROR\",\"opacity 0.25s\",\"MSGestureEnd\",\"onmousewheel\",\"bordercolor\",\"scene.count\",\"onmousedown\",\"borderalpha\",\"borderwidth\",\") rotateZ(\",\"background\",\"mousewheel\",\"krpano.com\",\"fullscreen\",\"undefined\",\"webkit-3d\",\"onmouseup\",\"marginTop\",\"touchmove\",\"moz-webgl\",\"</krpano>\",\"touchend\",\"relative\",\"fontSize\",\"polyline\",\"-10000px\",\"offrange\",\"<krpano>\",\"rotateY(\",\"keydown\",\"plugin[\",\"krpano \",\"include\",\"onkeyup\",\"onclick\",\"padding\",\"scroll\",\"layer[\",\"DEBUG:\",\"center\",\"resize\",\"tablet\",\"&nbsp;\",\"ERROR:\",\"scale(\",\"opaque\",\"Origin\",\"object\",\" edge/\",\"iPhone\",\"Chrome\",\"cursor\",\"parent\",\"360etours.net clickcwb.com.br afu360.com realtourvision.com webvr.net webvr.cn round.me aero-scan.ru shambalaland.com littlstar.com d3uo9a4kiyu5sk.cloudfront.net youvisit.com vrvideo.com\",\"panofree freeuser figgler teameat eatusebuy no-mail chen44 .lestra. gfreidinger an37almk\",\"gl_FragColor=vec4(texture2D(sm,(tx-ct)/mix(1.0,zf,1.0-aa)+ct).rgb,aa);\",\"gl_FragColor=vec4(mix(texture2D(sm,tx).rgb,cc,2.0*(1.0-aa)),aa*2.0);\",\" - invalid name! Names need to begin with an alphabetic character!\",\"if(\\'%5\\'!=\\'NEXTLOOP\\',%1);if(%2,%4;%3;for(%1,%2,%3,%4,NEXTLOOP););\",\"A Browser with CSS 3D Transforms or WebGL support is required!\",\"abs acos asin atan ceil cos exp floor log round sin sqrt tan\",\"gl_FragColor=vec4(texture2D(sm,tx).rgb+(1.0-aa)*cc,aa);\",\"uniform sampler2D sm;varying vec2 tx;uniform float aa;\",\"kr;user;mail=;domain;file:;id;chen4490;teameat;figgler\",\"<div style=\\'padding-top:2.5px; padding-bottom:5px;\\' \",\"WebGL-Error shaderProgram: could not link shaders!\",\"uniform vec2 ap;uniform float zf;uniform float bl;\",\"if(%1,%2;delayedcall(0,asyncloop(%1,%2,%3));,%3);\",\"there is already a html element with this id: \",\"<div style=\\'padding:8px; text-align:center;\\'>\",\"-webkit-radial-gradient(circle, white, black)\",\"gl_FragColor=vec4(texture2D(sm,tx).rgb,aa);\",\"<i><b>krpano</b><br/>demo&nbsp;version</i>\",\" - invalid or unsupported xml encryption!\",\"No device compatible image available...\",\"there is no html element with this id: \",\"javascript:document.getElementById(\\'\",\"left front right back up down cube\",\"uniform vec3 fp;uniform float bl;\",\"uniform vec2 ct;uniform float zf;\",\"xx=lz=rg=ma=dm=ed=eu=ek=rd=pt=id=\",\"color:#FF0000;font-weight:bold;\",\"1px solid rgba(255,255,255,0.5)\",\"Javascript Interface disabled!\",\" - loading or parsing failed!\",\"translateZ(+1000000000000px) \",\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\"loading or parsing failed!\",\"WebGL-Error vertexShader: \",\"WebGL-Error pixelShader: \",\"precision mediump float;\",\"set(_busyonloaded,false)\",\"krpano embedding error: \",\" (not a cubestrip image)\",\"webkitRequestFullScreen\",\"if(%1,%2;loop(%1,%2););\",\"architecturalonlymiddle\",\"webkitRequestFullscreen\",\"(-webkit-transform-3d)\",\"preservedrawingbuffer\",\"px solid transparent;\",\" - style not found: \",\"translateZ(+1000px) \",\"<span style=\\'color:#\",\"mozRequestFullScreen\",\"px;overflow:hidden;\",\"0px 0px 8px #FFFFFF\",\"addlayer/addplugin(\",\"white-space:nowrap;\",\"<div style=\\'margin:\",\"px,0px) translateY(\",\"xml parsing failed!\",\"msRequestFullscreen\",\"-ms-overflow-style\",\"preview.striporder\",\"-webkit-box-shadow\",\"position:absolute;\",\"</td></tr></table>\",\"distortionfovlink\",\"onpreviewcomplete\",\"WebkitPerspective\",\"Microsoft.XMLHTTP\",\"<krpano></krpano>\",\"http://krpano.com\",\"onenterfullscreen\",\" - NO LOCAL USAGE\",\"requestFullscreen\",\"Internet Explorer\",\"onexitfullscreen\",\"rgba(0,0,0,0.01)\",\"access permitted\",\"fullscreenchange\",\"FullscreenChange\",\"webkitUserSelect\",\"framebufferscale\",\"px) perspective(\",\"__defineGetter__\",\"__defineSetter__\",\"backgroundalpha\",\"MSPointerCancel\",\"backgroundcolor\",\"Android Browser\",\"1px solid white\",\" <small>(build \",\"textshadowrange\",\"textshadowangle\",\"textshadowcolor\",\"textshadowalpha\",\"deg) translate(\",\"Exit Fullscreen\",\"ignoring image \",\"consolelog=true\",\"-moz-box-shadow\",\"LICENSE EXPIRED\",\" - WRONG DOMAIN\",\"WebkitBoxShadow\",\"Registered to: \",\"krpanoSWFObject\",\"backgroundColor\",\"backgroundSize\",\"color:#AA7700;\",\"pointer-events\",\"color:#007700;\",\"Microsoft Edge\",\")</small><br/>\",\"color:#333333;\",\"translateZ(0) \",\"visiblePainted\",\"onloadcomplete\",\"return false;\",\"pointerEvents\",\"stereographic\",\"deg) rotateX(\",\"#FFF 0px 0px \",\"deg) rotateZ(\",\"easeInOutSine\",\"0123456789+/=\",\" translate3D(\",\"mobile safari\",\"gesturechange\",\"scalechildren\",\"onviewchanged\",\"mozUserSelect\",\"pointercancel\",\"textfield.swf\",\" not allowed!\",\"MSPointerMove\",\"deg) rotateY(\",\"HTML5/Desktop\",\"paddingBottom\",\"onxmlcomplete\",\"WebGL-Error: \",\"windows phone\",\"MSPointerDown\",\" FATAL ERROR:\",\"MozBoxShadow\",\") translate(\",\"preview.type\",\"px) rotateX(\",\"paddingRight\",\"Amazon Silk \",\"&nbsp;</div>\",\"onviewchange\",\"gesturestart\",\"onremovepano\",\"maskchildren\",\"perspective(\",\"vlookatrange\",\"hlookatrange\",\"keephotspots\",\"actioncaller\",\"height:100%;\",\"</encrypted>\",\"removescenes\",\"image.tablet\",\"stroke-width\",\"image.mobile\",\"oninterrupt\",\"shadowalpha\",\"shadowcolor\",\"easeoutsine\",\"shadowangle\",\"easeincubic\",\"shadowrange\",\"addhotspot(\",\"preview.url\",\"keepplugins\",\"easeInCubic\",\"translateZ(\",\"stageheight\",\"touchcancel\",\"MSPointerUp\",\"paddingLeft\",\"pointermove\",\"pointerdown\",\"px) rotate(\",\"<encrypted>\",\"versioninfo\",\"perspective\",\"BlackBerry \",\"bgroundedge\",\"whiteSpace\",\"onovercrop\",\"px) scale(\",\"ondowncrop\",\"box-shadow\",\"touchstart\",\"rim tablet\",\"blackberry\",\"paddingTop\",\"fontFamily\",\"2015-08-04\",\"%FIRSTXML%\",\"1px solid \",\"stagewidth\",\"stagescale\",\"handcursor\",\"ignorekeep\",\"gestureend\",\" Simulator\",\"autoheight\",\"keepscenes\",\"LIGHTBLEND\",\"keepmoving\",\"CURRENTXML\",\"showerrors\",\"COLORBLEND\",\"distortion\",\"SLIDEBLEND\",\"textshadow\",\"FATALERROR\",\"yesontrue1\",\"onnewscene\",\"selectable\",\"Fullscreen\",\"javascript\",\"px #FFFFFF\",\"encrypted\",\"</center>\",\"\\').call(\\'\",\"autowidth\",\" (Chrome)\",\"fullrange\",\"roundedge\",\"127.0.0.1\",\"localhost\",\"framerate\",\"onkeydown\",\"Viewer...\",\"bgcapture\",\"transform\",\"boxShadow\",\"__swfpath\",\"pointerup\",\"nopreview\",\"useragent\",\"<![CDATA[\",\"].onstart\",\"textAlign\",\"fillalpha\",\"timertick\",\"fillcolor\",\"OPENBLEND\",\"keepimage\",\"distorted\",\"asyncloop\",\"autoalpha\",\"ZOOMBLEND\",\"onnewpano\",\"bgborder\",\" style=\\'\",\"textblur\",\"asyncfor\",\"wordwrap\",\"pre-line\",\"keepbase\",\"bgshadow\",\"Panorama\",\"jsborder\",\"FFF00;\\'>\",\"</span> \",\"keepview\",\"00000000\",\"WARNING:\",\"overflow\",\"HTMLPATH\",\" - WebGL\",\"__fte1__\",\"__fte2__\",\" (build \",\"distance\",\"Calling \",\"scale3D(\",\"panotour\",\"SAMSUNG \",\"1.19-pr3\",\"<center>\",\"Firefox \",\"videourl\",\"iemobile\",\"FIRSTXML\",\"jsplugin\",\"ap,zf,bl\",\"autosize\",\"0px 0px \",\"<=>=!===\",\"</small>\",\"polygon\",\"Mobile \",\"vcenter\",\"Tablet \",\"webkit/\",\"Chrome \",\"border:\",\"Version\",\"action(\",\"action[\",\"Android\",\"].value\",\"bgcolor\",\" - iOS:\",\"WARNING\",\"keepall\",\"Firefox\",\"50% 50%\",\"preview\",\"bgalpha\",\"android\",\"desktop\",\"preinit\",\"onstart\",\"bglayer\",\"trident\",\"current\",\"display\",\"enabled\",\"BASEDIR\",\"fovtype\",\"SWFPATH\",\" debug)\",\"pannini\",\"plugin:\",\"krpano.\",\"BGLAYER\",\"<small>\",\"opacity\",\"devices\",\"lighter\",\"drag2d\",\"canvas\",\"image.\",\"always\",\"logkey\",\"blend(\",\"stereo\",\"onidle\",\"stagey\",\"Webkit\",\"stagex\",\"smooth\",\"&quot;\",\"origin\",\"&apos;\",\"random\",\"flying\",\"effect\",\"zorder\",\"_blank\",\"width:\",\"points\",\"delete\",\"switch\",\"event:\",\"stroke\",\" Build\",\"alturl\",\"Tablet\",\"Gecko/\",\"style[\",\"rotate\",\"Opera \",\"Mobile\",\"lfrbud\",\"Safari\",\"CriOS/\",\"shadow\",\"number\",\"www.\",\"\");\n mb = 'a3I7aWQ9NDk5ODEzMDAzLzIwMTUtMTEtMDk7bHo9MTU5O3JnPeWkqea0peaegeedv+i9r+S7tuaKgOacr+W8gOWPkeaciemZkOWFrOWPuDttYT10ZXJhQGdlZXJlaS5jb207ZWs9Mm5vM3JuM2xlM2x0M3RwMnNyM2hlM2xwMnNlMmlpM2xnM2tpMmZwMmlzZGJZYlhQWVlZYllaTFhhYWRNTk5OTE1MTE1kTExMTUtMTEtMTmQyc3AyZ3BIM3BzZDJoazJzcDJzZjJzbDJtaDJoczNsaDJpaDNnbzNrbTJscE5NS047cmQ9SlBLR1E7Y2s9MTc2MTI7';\n\n return ba\n }();\n\n _ && _[111] != typeof krpanoJS && (new hd).init(gd)\n }", "function AppMeasurement_Module_ActivityMap(f) {\n function g(a, d) {\n var b, c, n;\n if (a && d && (b = e.c[d] || (e.c[d] = d.split(\",\"))))\n for (n = 0; n < b.length && (c = b[n++]) ;)\n if (-1 < a.indexOf(c)) return null;\n p = 1;\n return a;\n }\n\n function q(a, d, b, c, e) {\n var g, h;\n if (a.dataset && (h = a.dataset[d])) g = h;\n else if (a.getAttribute)\n if (h = a.getAttribute(\"data-\" + b)) g = h;\n else if (h = a.getAttribute(b)) g = h;\n if (!g && f.useForcedLinkTracking && e && (g = \"\", d = a.onclick ? \"\" + a.onclick : \"\")) {\n b = d.indexOf(c);\n var l, k;\n if (0 <= b) {\n for (b += 10; b < d.length && 0 <= \"= \\t\\r\\n\".indexOf(d.charAt(b)) ;) b++;\n if (b < d.length) {\n h = b;\n for (l = k = 0; h < d.length && (\";\" != d.charAt(h) || l) ;) l ? d.charAt(h) != l || k ? k = \"\\\\\" == d.charAt(h) ? !k : 0 : l = 0 : (l = d.charAt(h), '\"' != l && \"'\" != l && (l = 0)), h++;\n if (d = d.substring(b, h)) a.e = new Function(\"s\", \"var e;try{s.w.\" + c + \"=\" + d + \"}catch(e){}\"), a.e(f);\n }\n }\n }\n return g || e && f.w[c];\n }\n\n function r(a, d, b) {\n var c;\n return (c = e[d](a, b)) && (p ? (p = 0, c) : g(k(c), e[d + \"Exclusions\"]));\n }\n\n function s(a, d, b) {\n var c;\n if (a && !(1 === (c = a.nodeType) && (c = a.nodeName) && (c = c.toUpperCase()) && t[c]) && (1 === a.nodeType && (c = a.nodeValue) && (d[d.length] = c), b.a ||\n b.t || b.s || !a.getAttribute || ((c = a.getAttribute(\"alt\")) ? b.a = c : (c = a.getAttribute(\"title\")) ? b.t = c : \"IMG\" == (\"\" + a.nodeName).toUpperCase() && (c = a.getAttribute(\"src\") || a.src) && (b.s = c)), (c = a.childNodes) && c.length))\n for (a = 0; a < c.length; a++) s(c[a], d, b);\n }\n\n function k(a) {\n if (null == a || void 0 == a) return a;\n try {\n return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\", \"mg\"), \"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n \"mg\"), \"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\", \"mg\"), \" \").substring(0, 254);\n } catch (d) { }\n }\n var e = this;\n e.s = f;\n var m = window;\n m.s_c_in || (m.s_c_il = [], m.s_c_in = 0);\n e._il = m.s_c_il;\n e._in = m.s_c_in;\n e._il[e._in] = e;\n m.s_c_in++;\n e._c = \"s_m\";\n e.c = {};\n var p = 0,\n t = {\n SCRIPT: 1,\n STYLE: 1,\n LINK: 1,\n CANVAS: 1\n };\n e._g = function () {\n var a, d, b, c = f.contextData,\n e = f.linkObject;\n (a = f.pageName || f.pageURL) && (d = r(e, \"link\", f.linkName)) && (b = r(e, \"region\")) && (c[\"a.activitymap.page\"] = a.substring(0,\n 255), c[\"a.activitymap.link\"] = 128 < d.length ? d.substring(0, 128) : d, c[\"a.activitymap.region\"] = 127 < b.length ? b.substring(0, 127) : b, c[\"a.activitymap.pageIDType\"] = f.pageName ? 1 : 0);\n };\n e.link = function (a, d) {\n var b;\n if (d) b = g(k(d), e.linkExclusions);\n else if ((b = a) && !(b = q(a, \"sObjectId\", \"s-object-id\", \"s_objectID\", 1))) {\n var c, f;\n (f = g(k(a.innerText || a.textContent), e.linkExclusions)) || (s(a, c = [], b = {\n a: void 0,\n t: void 0,\n s: void 0\n }), (f = g(k(c.join(\"\")))) || (f = g(k(b.a ? b.a : b.t ? b.t : b.s ? b.s : void 0))) || !(c = (c = a.tagName) && c.toUpperCase ? c.toUpperCase() :\n \"\") || (\"INPUT\" == c || \"SUBMIT\" == c && a.value ? f = g(k(a.value)) : a.src && \"IMAGE\" == c && (f = g(k(a.src)))));\n b = f;\n }\n return b;\n };\n e.region = function (a) {\n for (var d, b = e.regionIDAttribute || \"id\"; a && (a = a.parentNode) ;) {\n if (d = q(a, b, b, b)) return d;\n if (\"BODY\" == a.nodeName) return \"BODY\";\n }\n };\n }", "static private protected internal function m118() {}", "static transient final protected internal function m47() {}", "function vc() {\n if (\"undefined\" == typeof atob) throw new T(E.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function t(e, r, i) {\n this.name = e, this.version = r, this.Tt = i, \n // NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the\n // bug we're checking for should exist in iOS >= 12.2 and < 13, but for\n // whatever reason it's much harder to hit after 12.2 so we only proactively\n // log on 12.2.\n 12.2 === t.It(Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"getUA\"])()) && S(\"Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.\");\n }", "transient protected internal function m189() {}", "function gc() {\n if (\"undefined\" == typeof atob) throw new S(_.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function googleError(){\n alert(\"Google API failed to load.\");\n //console.log(\"error\");\n}", "function initializeApi() {\n gapi.client.load('storage', API_VERSION);\n}", "function tt() {\n if (\"undefined\" == typeof atob) throw new c(a.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function firebase_setup(){\n /*\n var firebaseConfig = {\n apiKey: \"AIzaSyB0ZY93KxJK4UIRVnyXWqNm2V1l1M-4j_4\",\n authDomain: \"office-inventory-12f99.firebaseapp.com\",\n databaseURL: \"https://office-inventory-12f99.firebaseio.com\",\n projectId: \"office-inventory-12f99\",\n storageBucket: \"office-inventory-12f99.appspot.com\",\n messagingSenderId: \"147848186588\",\n appId: \"1:147848186588:web:33dbc8d727af1de4\"\n };\n // Initialize Firebase\n firebase.initializeApp(firebaseConfig);\n db = firebase.firestore();\n */\n}", "refreshCacheTTL() {\n // This comment is here to please Sonarqube. It requires a comment\n // explaining why a function is empty, but there is no sense\n // duplicating what has been just said in the JSDoc.\n // So, instead, here are the lyrics or Daft Punk's \"Around the world\":\n //\n // Around the world, around the world\n // Around the world, around the world\n // Around the world, around the world\n // Around the world, around the world\n // Around the world, around the world\n // [repeat 66 more times]\n // Around the world, around the world.\n }", "function onApiLoaded() {\n GMapApi.gmapApi = {}\n return window.google\n }", "static transient final protected public internal function m46() {}", "getGoogleId(){\n return this.google_id;\n }", "function googleError(){\r\n alert('Could not fetch data');\r\n}", "async function main() {\n const bucketName = process.env.BUCKET_NAME;\n const objectName = process.env.OBJECT_NAME;\n // Defines a credential access boundary that grants objectViewer access in\n // the specified bucket.\n const cab = {\n accessBoundary: {\n accessBoundaryRules: [\n {\n availableResource: `//storage.googleapis.com/projects/_/buckets/${bucketName}`,\n availablePermissions: ['inRole:roles/storage.objectViewer'],\n availabilityCondition: {\n expression:\n \"resource.name.startsWith('projects/_/buckets/\" +\n `${bucketName}/objects/${objectName}')`,\n },\n },\n ],\n },\n };\n\n const googleAuth = new GoogleAuth({\n scopes: 'https://www.googleapis.com/auth/cloud-platform',\n });\n const projectId = await googleAuth.getProjectId();\n // Obtain an authenticated client via ADC.\n const client = await googleAuth.getClient();\n // Use the client to generate a DownscopedClient.\n const cabClient = new DownscopedClient(client, cab);\n\n // OAuth 2.0 Client\n const authClient = new OAuth2Client();\n // Define a refreshHandler that will be used to refresh the downscoped token\n // when it expires.\n authClient.refreshHandler = async () => {\n const refreshedAccessToken = await cabClient.getAccessToken();\n return {\n access_token: refreshedAccessToken.token,\n expiry_date: refreshedAccessToken.expirationTime,\n };\n };\n\n const storageOptions = {\n projectId,\n authClient: new GoogleAuth({authClient}),\n };\n\n const storage = new Storage(storageOptions);\n const downloadFile = await storage\n .bucket(bucketName)\n .file(objectName)\n .download();\n console.log('Successfully retrieved file. Contents:');\n console.log(downloadFile.toString('utf8'));\n}", "function Ec() {\n if (\"undefined\" == typeof atob) throw new G(j.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "transient final private internal function m170() {}", "function startFirebase() {\n// Initialize Firebase\n var config = {\n apiKey: \"AIzaSyDAraVHUUUkR4L0yNE3P2n2jiF2jTNy6Kg\",\n authDomain: \"rps-multiplayer-e8125.firebaseapp.com\",\n databaseURL: \"https://rps-multiplayer-e8125.firebaseio.com\",\n projectId: \"rps-multiplayer-e8125\",\n storageBucket: \"rps-multiplayer-e8125.appspot.com\",\n messagingSenderId: \"763015821378\"\n };\n\n firebase.initializeApp(config);\n\n}", "function init() {\n gapi.client.setApiKey(\"AIzaSyCIL7jjwmYLVQW8XHqn6zBX9pp0264RJoM\");\n gapi.client.load(\"civicinfo\", \"v2\")\n .then( () => {\n console.log(\"loaded\");\n })\n .then(addSearchListener());\n}", "function getGAauthenticationToken(email, password) {\n password = encodeURIComponent(password);\n var response = UrlFetchApp.fetch(\"https://www.google.com/accounts/ClientLogin\", {\n method: \"post\",\n payload: \"accountType=GOOGLE&Email=\" + email + \"&Passwd=\" + password + \"&service=fusiontables&Source=testing\"\n });\n \n\tvar responseStr = response.getContentText();\n\tresponseStr = responseStr.slice(responseStr.search(\"Auth=\") + 5, responseStr.length);\n\tresponseStr = responseStr.replace(/\\n/g, \"\");\n\treturn responseStr;\n}", "transient final private protected public internal function m166() {}", "static transient final private internal function m43() {}", "protected internal function m252() {}", "function heyGoogle( name ) {\n // console.log(\"Yes Jacob?\");\n console.log(`Yes ${ name }?`);\n}", "static transient final private protected internal function m40() {}", "static hd() {\n return firebase.storage();\n }", "function metadataStaticView() {\n html= HtmlService\n .createTemplateFromFile('staticMetadata')\n .evaluate()\n .setSandboxMode(HtmlService.SandboxMode.IFRAME);\n DocumentApp.getUi().showSidebar(html);\n }", "function supportedGeolocAPI () {\n if (window.navigator.geolocation) {\n return \"w3c\";\n } else {\n return \"none\";\n }\n}", "getGoogleResponse() {\n return this.getNormalResponse();\n }", "function setupChromeApis() {\n new MockChromeStorageAPI();\n}", "static final private public function m104() {}", "function getGoogleData () {\n var googleIds = main(1)\n for (var googleObject in googleIds) {\n var gId = googleIds[googleObject].cellValue\n gStore.app({appId: gId}).then((data) => {\n console.log({\n dataId: data.appId, \n price: data.price,\n versionText: data.androidVersionText, \n developer: data.developer, \n developerWebsite: data.developerWebsite\n }) \n console.log(\"\")\n }).catch( (err) => {\n });\n }\n}", "function googleMapAPIScript() {\n\t// https://maps.google.com/maps?q=225+delaware+avenue,+Buffalo,+NY&hl=en&sll=42.746632,-75.770041&sspn=5.977525,8.591309&t=h&hnear=225+Delaware+Ave,+Buffalo,+Erie,+New+York+14202&z=16\n\t// API key console\n\t// https://code.google.com/apis/console\n\t// BfloFRED API Key : key=AIzaSyBMSezbmos0W2n6BQutkFvNjkF5NTPd0-Q\n\n\tvar script = document.createElement(\"script\");\n\t// Load the Google Maps API : required\n\t// https://developers.google.com/maps/documentation/javascript/tutorial\n\tscript.src = \"http://maps.googleapis.com/maps/api/js?v=3&key=AIzaSyBMSezbmos0W2n6BQutkFvNjkF5NTPd0-Q&sensor=true\";\n\tdocument.head.appendChild(script);\n}", "transient final private protected internal function m167() {}" ]
[ "0.57512176", "0.5345903", "0.52893716", "0.5242048", "0.5074461", "0.50543845", "0.50521696", "0.5051502", "0.5051502", "0.5027637", "0.4989611", "0.498545", "0.49730507", "0.49567991", "0.4916299", "0.48886392", "0.4876151", "0.48606881", "0.48606881", "0.48490617", "0.48490617", "0.48435485", "0.48295322", "0.48123735", "0.47831675", "0.4768704", "0.47340217", "0.4720092", "0.47187722", "0.4709046", "0.4693696", "0.46882945", "0.46855348", "0.46846828", "0.46788326", "0.4678405", "0.46775785", "0.46773046", "0.46752015", "0.46745238", "0.46729264", "0.46707234", "0.4664581", "0.46463197", "0.46441376", "0.46361956", "0.46249402", "0.46208033", "0.46192744", "0.46104193", "0.46062222", "0.46045882", "0.45942646", "0.45928755", "0.45910943", "0.45833793", "0.45830405", "0.45809963", "0.45779058", "0.4577811", "0.45748523", "0.45707053", "0.45573023", "0.4547042", "0.45421642", "0.45365164", "0.45328885", "0.45308247", "0.45239997", "0.45184344", "0.45129567", "0.44994783", "0.4498293", "0.448557", "0.44852275", "0.4481251", "0.44732192", "0.44666508", "0.4465513", "0.44496667", "0.44484794", "0.44476423", "0.4446629", "0.44436583", "0.443799", "0.4437923", "0.4434733", "0.4430508", "0.44291753", "0.44167104", "0.44139627", "0.44126382", "0.44071183", "0.44064862", "0.4404661", "0.44035488", "0.43892667", "0.43881297", "0.43878698", "0.43864462", "0.43859112" ]
0.0
-1
Returns true if obj is an object and contains at least one of the specified methods.
function implementsAnyMethods$1(obj,methods){if(typeof obj!=='object'||obj===null){return false;}var object=obj;for(var _i=0,methods_1=methods;_i<methods_1.length;_i++){var method=methods_1[_i];if(method in object&&typeof object[method]==='function'){return true;}}return false;}/** * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *//** * An opaque base class for FieldValue sentinel objects in our public API, * with public static methods for creating said sentinel objects. */// tslint:disable-next-line:class-as-namespace We use this as a base class.
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (const method of methods) {\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n var object = obj;\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in object && typeof object[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n var object = obj;\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in object && typeof object[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n var object = obj;\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in object && typeof object[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n var object = obj;\n\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n\n return false;\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\r\n var method = methods_1[_i];\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n var object = obj;\n\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n\n return false;\n }", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n return false;\n }\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n\n return false;\n }", "function implementsAnyMethods$1(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods$1(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods$1(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n var object = obj;\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n\t if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n\t return false;\n\t }\n\t for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n\t var method = methods_1[_i];\n\t if (method in obj && typeof obj[method] === 'function') {\n\t return true;\n\t }\n\t }\n\t return false;\n\t}", "function implementsAnyMethods(obj, methods) {\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n return false;\n }\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = methods[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var method = _step.value;\n\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return false;\n}", "function implementsAnyMethods(obj, methods) {\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n return false;\n }\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = methods[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var method = _step.value;\n\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return false;\n}", "function isOf(obj) {\n var types = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n types[_i - 1] = arguments[_i];\n }\n var objType = typeof obj;\n return types.some(function (t) { return t === objType; });\n }", "static isFunction(obj) {\n return !!(obj && obj.constructor && obj.call && obj.apply);\n }", "function isFunction (obj) {\n return !!(obj && obj.constructor && obj.call && obj.apply)\n}", "hasProps(obj) {\n const size = this.size;\n\n for (let i = 0; i < size; ++i) {\n const prop = this.getProp(obj, i);\n\n if (prop === null || prop === undefined) {\n return false;\n }\n }\n\n return true;\n }", "function checkObjects(obj = {}) {\n return Object.keys(obj).length > 0;\n }", "function Vo(t) {\n /**\n * Returns true if obj is an object and contains at least one of the specified\n * methods.\n */\n return function(t, e) {\n if (\"object\" != typeof t || null === t) return !1;\n for (var n = t, r = 0, i = [ \"next\", \"error\", \"complete\" ]; r < i.length; r++) {\n var o = i[r];\n if (o in n && \"function\" == typeof n[o]) return !0;\n }\n return !1;\n }(t);\n}", "function hasChildrenObjects(obj)\n {\n if(obj.length===0) return false;\n for(var i in obj) if(typeof obj[i] === \"object\") return true;\n return false; \n }", "function isFunction(obj) {\n return (typeof obj == \"function\");\n }", "function is_empthy_obj(obj) {\n for (var prop in obj)\n return false;\n return true;\n}", "function methodsStartingWith(obj, startsWith) {\n return methods(obj, function (fn, name, obj) {\n return name.indexOf(startsWith) === 0;\n });\n }", "function has_all(obj, keys) {\n for (var i in keys) {\n let key = keys[i];\n if (!(key in obj)) {\n return false;\n }\n }\n return true;\n}", "contains(o){\n\t\tif(o instanceof Objet){\n\t\t\treturn this.objets.includes(o);\n\t\t}\n\t\treturn false;\n\t}", "function checkInterface(obj, funcs) {\n for (var i = 0; i < funcs.length; ++i) {\n if (typeof obj[funcs[i]] !== 'function')\n return false;\n }\n return true;\n}", "function isFunction(obj) {\n return $.isFunction(obj);\n }", "function has$1(obj, path) {\n path = toPath$1(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n }", "function has$1(obj, path) {\n path = toPath$1(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n }", "function has$1(obj, path) {\n path = toPath$1(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n }", "function has$1(obj, path) {\n path = toPath$1(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n }", "function has$1(obj, path) {\n path = toPath$1(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n }", "function has$1(obj, path) {\n path = toPath$1(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n }", "function has$1(obj, path) {\n path = toPath$1(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n }", "function has$1(obj, path) {\n path = toPath$1(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n }", "function has$1(obj, path) {\n path = toPath$1(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n }", "function has(obj, name) {\n\n for (; obj; obj = Object.getPrototypeOf(obj))\n if (hasOwn.call(obj, name))\n return true;\n\n return false;\n}", "function areHostMethods(object, properties) {\r\n\t\tfor (var i = properties.length; i--; ) {\r\n\t\t\tif ( !isHostMethod(object, properties[i]) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "function checkIfObject(obj) {\n if (obj === null || typeof obj === \"function\") return false;\n return typeof obj === \"object\";\n}", "function isFunction( obj ){\n return Object.prototype.toString.call( obj ) == \"[object Function]\";\n }", "function forEveryKeyInObject (obj, fn) {\n if (Object.keys(obj).length < 1) {\n return false\n }\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (!fn(key)) return false\n }\n }\n return true\n }", "function isFunction(obj) {\n return (obj && typeof obj === \"function\");\n }", "function contains(obj, prop) {\n\t return Object.prototype.hasOwnProperty.call(obj, prop);\n\t}", "function objectHasProperties(obj) {\n return Object.keys(obj).length > 0;\n}", "function every(obj, call) {\n for (var i in obj) {\n if (!call(obj[i], i)) return false;\n }\n return true;\n}", "function _isFunction(obj) {\n return typeof obj === 'function';\n}", "function inPub(name, obj) {\n var t = typeof obj;\n if (!obj || (t !== 'object' && t !== 'function')) {\n throw new TypeError('invalid \"in\" operand: ' + obj);\n }\n obj = Object(obj);\n if (canReadPub(obj, name)) { return true; }\n if (canCallPub(obj, name)) { return true; }\n if ((name + '_getter___') in obj) { return true; }\n if ((name + '_handler___') in obj) { return true; }\n return false;\n }", "function isFunction(obj) {\n return typeof obj === 'function';\n }", "function isFunction(obj) {\n return typeof obj === 'function';\n }", "function _isPlainObject(obj) {\n var proto, Ctor;\n\n // Detect obvious negatives\n // Use toString instead of jQuery.type to catch host objects\n if (!obj || toString.call(obj) !== \"[object Object]\") {\n return false;\n }\n\n proto = getProto(obj);\n\n // Objects with no prototype (e.g., `Object.create( null )`) are plain\n if (!proto) {\n return true;\n }\n\n // Objects with prototype are plain iff they were constructed by a global Object function\n Ctor = hasOwn.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && fnToString.call(Ctor) === ObjectFunctionString;\n }", "function _isPlainObject(obj) {\n var proto, Ctor;\n\n // Detect obvious negatives\n // Use toString instead of jQuery.type to catch host objects\n if (!obj || toString.call(obj) !== \"[object Object]\") {\n return false;\n }\n\n proto = getProto(obj);\n\n // Objects with no prototype (e.g., `Object.create( null )`) are plain\n if (!proto) {\n return true;\n }\n\n // Objects with prototype are plain iff they were constructed by a global Object function\n Ctor = hasOwn.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && fnToString.call(Ctor) === ObjectFunctionString;\n }", "containsObject(obj, list) {\n return obj.hasOwnProperty(list);\n }", "function isEmpty(obj) {\n\t\tfor(var prop in obj) {\n\t\t\tif(obj.hasOwnProperty(prop))\n\t\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function isEmpty(obj) {\n\t\t\tfor(var prop in obj) {\n\t\t\t\tif(obj.hasOwnProperty(prop))\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "function isObject(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n }", "function isObj(obj) {\n // innner util to check type of 'obj's\n return typeof(obj) == \"object\";\n }", "function isObject(obj) {\n\t return typeOf(obj) === 'object' || typeOf(obj) === 'function';\n\t}", "function isFunction(obj) {\n return (typeof obj === \"function\");\n}", "function isObject(obj) {\n var objType = typeof obj;\n return objType === \"function\" || objType === \"object\" && !!obj;\n }", "function isTrueObject(obj) {\n if (obj && typeof obj === 'object' && !(obj instanceof Array)) {\n return true;\n } else {\n return false;\n }\n }", "function isFunction(obj) {\n return typeof obj === 'function';\n }", "function isFunction(obj) {\n return typeof obj === 'function';\n }", "static isEmpty(obj) {\r\n for(var key in obj) {\r\n if(obj.hasOwnProperty(key)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "function isEmpty(obj) {\n for (prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n return false;\n }\n }\n return true;\n }" ]
[ "0.8071181", "0.80450475", "0.80450475", "0.80450475", "0.80445945", "0.80445945", "0.80445945", "0.80445945", "0.803563", "0.80104864", "0.80104864", "0.80104864", "0.80104864", "0.80104864", "0.80104864", "0.80104864", "0.80104864", "0.80104864", "0.80104864", "0.80097085", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.8004316", "0.7999241", "0.7999241", "0.7999241", "0.79837394", "0.797651", "0.7921652", "0.7921652", "0.7921652", "0.7877917", "0.7509402", "0.7509402", "0.6538596", "0.64285594", "0.63768214", "0.6345869", "0.6342869", "0.6305077", "0.6281258", "0.6144826", "0.6127095", "0.61236477", "0.6118409", "0.61054677", "0.6103316", "0.6021403", "0.6020567", "0.6020567", "0.6020567", "0.6020567", "0.6020567", "0.6020567", "0.6020567", "0.6020567", "0.6020567", "0.6018696", "0.60156417", "0.5998401", "0.5983208", "0.5977371", "0.5973486", "0.5947901", "0.59445584", "0.593868", "0.59252715", "0.59107125", "0.58921987", "0.58921987", "0.58783525", "0.58783525", "0.587554", "0.5869523", "0.5867168", "0.58637077", "0.58544046", "0.585013", "0.5849245", "0.5849151", "0.5848661", "0.5841954", "0.5841954", "0.58389884", "0.582237" ]
0.0
-1
Initializes a ParseContext with the given source and path.
function ParseContext(dataSource,methodName,path,arrayElement,fieldTransforms,fieldMask){this.dataSource=dataSource;this.methodName=methodName;this.path=path;this.arrayElement=arrayElement;// Minor hack: If fieldTransforms is undefined, we assume this is an // external call and we need to validate the entire path. if(fieldTransforms===undefined){this.validatePath();}this.arrayElement=arrayElement!==undefined?arrayElement:false;this.fieldTransforms=fieldTransforms||[];this.fieldMask=fieldMask||[];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(source) {\n const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }", "function ParseContext(dataSource, methodName, path, fieldTransforms, fieldMask) {\n this.dataSource = dataSource;\n this.methodName = methodName;\n this.path = path;\n // Minor hack: If fieldTransforms is undefined, we assume this is an\n // external call and we need to validate the entire path.\n if (fieldTransforms === undefined) {\n this.validatePath();\n }\n this.fieldTransforms = fieldTransforms || [];\n this.fieldMask = fieldMask || [];\n }", "function SourceFile(context, node) {\n var _this = \n // start hack :(\n _super.call(this, context, node, undefined) || this;\n /** @internal */\n _this._isSaved = false;\n /** @internal */\n _this._modifiedEventContainer = new utils_1.EventContainer();\n /** @internal */\n _this._referenceContainer = new utils_1.SourceFileReferenceContainer(_this);\n _this.sourceFile = _this;\n return _this;\n // end hack\n }", "constructor(directory, context, path, stats) {\n super(directory, context, path_1.normalize(path.replace(/\\/$/, \"\") + path_1.sep), stats);\n }", "function createLexer(source, options) {\n\t var startOfFileToken = new Tok(SOF, 0, 0, 0, 0, null);\n\t var lexer = {\n\t source: source,\n\t options: options,\n\t lastToken: startOfFileToken,\n\t token: startOfFileToken,\n\t line: 1,\n\t lineStart: 0,\n\t advance: advanceLexer,\n\t lookahead: lookahead\n\t };\n\t return lexer;\n\t}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n }", "constructor(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }", "function createLexer(source, options) {\n\t var startOfFileToken = new Tok(SOF, 0, 0, 0, 0, null);\n\t var lexer = {\n\t source: source,\n\t options: options,\n\t lastToken: startOfFileToken,\n\t token: startOfFileToken,\n\t line: 1,\n\t lineStart: 0,\n\t advance: advanceLexer\n\t };\n\t return lexer;\n\t}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "constructor(x, source, offset) {\n this.source = source || '';\n if (x instanceof range_1.Range) {\n this.range = x;\n }\n else if (x instanceof antlr4ts_1.ParserRuleContext) {\n if (!offset) {\n offset = 0;\n }\n this.range = templateExtensions_1.TemplateExtensions.convertToRange(x, offset);\n }\n }", "function createLexer(source, options) {\n var startOfFileToken = new Tok(_tokenKind.TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function Context(doc, src, fname) {\n this.doc = doc;\n this.src = src;\n this.fname = fname;\n this.blocks = [];\n this.block = undefined;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer\n };\n return lexer;\n}", "constructor(source) {\n this.source = source;\n try {\n this.scanner = new OnigScanner_1.default([this.source]);\n }\n catch (error) {\n // doesn't make much sense, but this to pass atom/node-oniguruam tests\n }\n }", "function Lexer(source) {\n var startOfFileToken = new _ast.Token(_tokenKind.TokenKind.SOF, 0, 0, 0, 0, null);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }", "function Lexer(source) {\n var startOfFileToken = new _ast.Token(_tokenKind.TokenKind.SOF, 0, 0, 0, 0, null);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }", "function Lexer(source) {\n var startOfFileToken = new _ast.Token(_tokenKind.TokenKind.SOF, 0, 0, 0, 0, null);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }", "function Lexer(source) {\n var startOfFileToken = new ast[\"b\" /* Token */](TokenKind.SOF, 0, 0, 0, 0, null);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }", "constructor(source) {\r\n this.source = source;\r\n try {\r\n this.scanner = new OnigScanner_1.default([this.source]);\r\n }\r\n catch (error) {\r\n // doesn't make much sense, but this to pass atom/node-oniguruam tests\r\n }\r\n }", "initialize(config) {\n this.context = config.context;\n }", "initialize(config) {\n this.context = config.context;\n }", "initialize(config) {\n this.context = config.context;\n }", "initialize(config) {\n this.context = config.context;\n }", "initialize(config) {\n this.context = config.context;\n }", "initialize(config) {\n this.context = config.context;\n }", "function createLexer(source, options) {\n var startOfFileToken = new Tok(_tokenKind__WEBPACK_IMPORTED_MODULE_1__[\"TokenKind\"].SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(_tokenKind__WEBPACK_IMPORTED_MODULE_3__[\"TokenKind\"].SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function Lexer(source) {\n var startOfFileToken = new _ast_mjs__WEBPACK_IMPORTED_MODULE_0__.Token(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__.TokenKind.SOF, 0, 0, 0, 0, null);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }", "function Lexer(source) {\n var startOfFileToken = new _ast_mjs__WEBPACK_IMPORTED_MODULE_0__.Token(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__.TokenKind.SOF, 0, 0, 0, 0, null);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }", "initialize(config) {\r\n this.context = config.context;\r\n }", "constructor(source) {\n this.source = source;\n try {\n this.scanner = new OnigScanner_1$1.default([this.source]);\n }\n catch (error) {\n // doesn't make much sense, but this to pass atom/node-oniguruam tests\n }\n }", "constructor(source)\n\t{\n\t}", "constructor(source) {\n this.index = 0;\n this.pos = 0;\n this.line = 1;\n this.column = 1;\n this.source = source;\n this.size = source.length;\n\n this.keywords = {\n and: 1,\n break: 1,\n do: 1,\n else: 1,\n elseif: 1,\n end: 1,\n false: 1,\n for: 1,\n function: 1,\n if: 1,\n in: 1,\n local: 1,\n nil: 1,\n not: 1,\n or: 1,\n repeat: 1,\n return: 1,\n then: 1,\n true: 1,\n until: 1,\n while: 1\n };\n }", "constructor(file, context, path, stats) {\n super(file, context, path, stats);\n this.fileInfo = stats;\n }", "function Lexer(source) {\n var startOfFileToken = new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[\"Token\"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[\"TokenKind\"].SOF, 0, 0, 0, 0, null);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }", "function Lexer(source) {\n var startOfFileToken = new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[\"Token\"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[\"TokenKind\"].SOF, 0, 0, 0, 0, null);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }", "constructor (param) {\n if (param == null) { param = {} }\n const { includePath, registry, scopePrefix } = param\n this.includePath = includePath\n this.registry = registry\n this.scopePrefix = scopePrefix\n if (this.registry == null) { this.registry = new GrammarRegistry({ maxTokensPerLine: Infinity }) }\n this._loadingGrammars = false\n if (this.scopePrefix == null) { this.scopePrefix = '' }\n }", "getParserFor(source) {\n const config = this.getConfigFor(source.filename);\n return new Parser(config.resolve());\n }", "function ParseContext(dataSource, methodName, path, arrayElement, fieldTransforms, fieldMask) {\n this.dataSource = dataSource;\n this.methodName = methodName;\n this.path = path;\n this.arrayElement = arrayElement;\n // Minor hack: If fieldTransforms is undefined, we assume this is an\n // external call and we need to validate the entire path.\n if (fieldTransforms === undefined) {\n this.validatePath();\n }\n this.arrayElement = arrayElement !== undefined ? arrayElement : false;\n this.fieldTransforms = fieldTransforms || [];\n this.fieldMask = fieldMask || [];\n }", "function ParseContext(dataSource, methodName, path, arrayElement, fieldTransforms, fieldMask) {\n this.dataSource = dataSource;\n this.methodName = methodName;\n this.path = path;\n this.arrayElement = arrayElement;\n // Minor hack: If fieldTransforms is undefined, we assume this is an\n // external call and we need to validate the entire path.\n if (fieldTransforms === undefined) {\n this.validatePath();\n }\n this.arrayElement = arrayElement !== undefined ? arrayElement : false;\n this.fieldTransforms = fieldTransforms || [];\n this.fieldMask = fieldMask || [];\n }", "function ParseContext(dataSource, methodName, path, arrayElement, fieldTransforms, fieldMask) {\n this.dataSource = dataSource;\n this.methodName = methodName;\n this.path = path;\n this.arrayElement = arrayElement;\n // Minor hack: If fieldTransforms is undefined, we assume this is an\n // external call and we need to validate the entire path.\n if (fieldTransforms === undefined) {\n this.validatePath();\n }\n this.arrayElement = arrayElement !== undefined ? arrayElement : false;\n this.fieldTransforms = fieldTransforms || [];\n this.fieldMask = fieldMask || [];\n }", "function ParseContext(dataSource, methodName, path, arrayElement, fieldTransforms, fieldMask) {\n this.dataSource = dataSource;\n this.methodName = methodName;\n this.path = path;\n this.arrayElement = arrayElement;\n // Minor hack: If fieldTransforms is undefined, we assume this is an\n // external call and we need to validate the entire path.\n if (fieldTransforms === undefined) {\n this.validatePath();\n }\n this.arrayElement = arrayElement !== undefined ? arrayElement : false;\n this.fieldTransforms = fieldTransforms || [];\n this.fieldMask = fieldMask || [];\n }", "function ParseContext(dataSource, methodName, path, arrayElement, fieldTransforms, fieldMask) {\n this.dataSource = dataSource;\n this.methodName = methodName;\n this.path = path;\n this.arrayElement = arrayElement;\n // Minor hack: If fieldTransforms is undefined, we assume this is an\n // external call and we need to validate the entire path.\n if (fieldTransforms === undefined) {\n this.validatePath();\n }\n this.arrayElement = arrayElement !== undefined ? arrayElement : false;\n this.fieldTransforms = fieldTransforms || [];\n this.fieldMask = fieldMask || [];\n }", "function ParseContext(dataSource, methodName, path, arrayElement, fieldTransforms, fieldMask) {\n this.dataSource = dataSource;\n this.methodName = methodName;\n this.path = path;\n this.arrayElement = arrayElement; // Minor hack: If fieldTransforms is undefined, we assume this is an\n // external call and we need to validate the entire path.\n\n if (fieldTransforms === undefined) {\n this.validatePath();\n }\n\n this.arrayElement = arrayElement !== undefined ? arrayElement : false;\n this.fieldTransforms = fieldTransforms || [];\n this.fieldMask = fieldMask || [];\n }", "function ParseContext(dataSource, methodName, path, arrayElement, fieldTransforms, fieldMask) {\n this.dataSource = dataSource;\n this.methodName = methodName;\n this.path = path;\n this.arrayElement = arrayElement; // Minor hack: If fieldTransforms is undefined, we assume this is an\n // external call and we need to validate the entire path.\n\n if (fieldTransforms === undefined) {\n this.validatePath();\n }\n\n this.arrayElement = arrayElement !== undefined ? arrayElement : false;\n this.fieldTransforms = fieldTransforms || [];\n this.fieldMask = fieldMask || [];\n }", "constructor(inputPath /*: string */) {\n this._inputPath = inputPath;\n }", "function ParseContext(dataSource, methodName, path, arrayElement, fieldTransforms, fieldMask) {\r\n this.dataSource = dataSource;\r\n this.methodName = methodName;\r\n this.path = path;\r\n this.arrayElement = arrayElement;\r\n // Minor hack: If fieldTransforms is undefined, we assume this is an\r\n // external call and we need to validate the entire path.\r\n if (fieldTransforms === undefined) {\r\n this.validatePath();\r\n }\r\n this.arrayElement = arrayElement !== undefined ? arrayElement : false;\r\n this.fieldTransforms = fieldTransforms || [];\r\n this.fieldMask = fieldMask || [];\r\n }", "function ParseContext(dataSource, methodName, path, arrayElement, fieldTransforms, fieldMask) {\r\n this.dataSource = dataSource;\r\n this.methodName = methodName;\r\n this.path = path;\r\n this.arrayElement = arrayElement;\r\n // Minor hack: If fieldTransforms is undefined, we assume this is an\r\n // external call and we need to validate the entire path.\r\n if (fieldTransforms === undefined) {\r\n this.validatePath();\r\n }\r\n this.arrayElement = arrayElement !== undefined ? arrayElement : false;\r\n this.fieldTransforms = fieldTransforms || [];\r\n this.fieldMask = fieldMask || [];\r\n }", "function ParseContext(dataSource, methodName, path, arrayElement, fieldTransforms, fieldMask) {\r\n this.dataSource = dataSource;\r\n this.methodName = methodName;\r\n this.path = path;\r\n this.arrayElement = arrayElement;\r\n // Minor hack: If fieldTransforms is undefined, we assume this is an\r\n // external call and we need to validate the entire path.\r\n if (fieldTransforms === undefined) {\r\n this.validatePath();\r\n }\r\n this.arrayElement = arrayElement !== undefined ? arrayElement : false;\r\n this.fieldTransforms = fieldTransforms || [];\r\n this.fieldMask = fieldMask || [];\r\n }", "function Parser()\n{\n this.pathArray = [];\n \n this.onopentag = function(path, node) { }\n this.onclosetag = function(path) { }\n this.ontext = function(path, text) { }\n \n this.parse = function(xmlSource) {\n this.pathArray = [];\n this.path = '';\n \n var parser = sax.parser(true);\n \n parser.onopentag = function(node) {\n this.pathArray.push(node.name);\n this.path = this.pathArray.join(\".\");\n \n this.onopentag(this.path, node);\n }.bind(this);\n \n parser.ontext = function(text) {\n this.ontext(this.path, text);\n }.bind(this);\n \n parser.onclosetag = function() {\n this.onclosetag(this.path);\n this.pathArray.pop();\n this.path = this.pathArray.join(\".\");\n }.bind(this);\n \n parser.write(xmlSource).close();\n }\n}", "constructor( aPath ) {\n this.fullpath = aPath;\n }", "constructor(props, context) {\n super(props);\n\n const {\n onComplete,\n pathSimplifier,\n } = props;\n\n const map = context;\n\n breakIfNotChildOfAMap('PathNavigator', pathSimplifier, 'PathSimplifier');\n\n this.pathNavigatorOptions = PathNavigator.parsePathNavigatorOptions(props);\n\n this.pathNavigator = this.createPathNavigator(this.pathNavigatorOptions);\n\n this.eventCallbacks = this.parseEvents();\n\n this.bindEvents(this.pathNavigator, this.eventCallbacks);\n\n onComplete && onComplete(map, this.pathNavigator, pathSimplifier);\n }", "function initContext () {\n var cwd = process.cwd(),\n context = \"none\";\n if (hasDir(cwd, \"CVS\")) context = \"cvs\";\n else if (hasDir(cwd, \".svn\")) context = \"svn\";\n else if (hasInSelfOrParent(cwd, \".git\")) context = \"git\";\n else if (hasInSelfOrParent(cwd, \".hg\")) context = \"hg\";\n return context;\n}", "function makeParser(source, options) {\n var _lexToken = (0, _lexer.lex)(source);\n return {\n _lexToken: _lexToken,\n source: source,\n options: options,\n prevEnd: 0,\n token: _lexToken()\n };\n}", "function makeParser(source, options) {\n\t var _lexToken = (0, _lexer.lex)(source);\n\t return {\n\t _lexToken: _lexToken,\n\t source: source,\n\t options: options,\n\t prevEnd: 0,\n\t token: _lexToken()\n\t };\n\t}", "static fromString(source, filename) {\n const ast = espree.parse(source, {\n ecmaVersion: 2017,\n sourceType: \"module\",\n loc: true,\n });\n return new TemplateExtractor(ast, filename || \"inline\", source);\n }", "function Source() {\n _classCallCheck(this, Source);\n\n Source.initialize(this);\n }", "constructor(path: string) {\n this.path = path;\n this.absolutePath = null;\n }", "setSource(source){\n \n if(source === undefined)\n return;\n \n this.source = source;\n \n }", "constructor() {\n super();\n this.loadContext();\n }", "parse(toParse, options) {\n var _a;\n let tokens;\n if (typeof toParse === 'string') {\n tokens = Lexer_1.Lexer.scan(toParse).tokens;\n }\n else {\n tokens = toParse;\n }\n this.logger = (_a = options === null || options === void 0 ? void 0 : options.logger) !== null && _a !== void 0 ? _a : new Logger_1.Logger();\n this.tokens = tokens;\n this.options = this.sanitizeParseOptions(options);\n this.allowedLocalIdentifiers = [\n ...TokenKind_1.AllowedLocalIdentifiers,\n //when in plain brightscript mode, the BrighterScript source literals can be used as regular variables\n ...(this.options.mode === ParseMode.BrightScript ? TokenKind_1.BrighterScriptSourceLiterals : [])\n ];\n this.current = 0;\n this.diagnostics = [];\n this.namespaceAndFunctionDepth = 0;\n this.pendingAnnotations = [];\n this.ast = this.body();\n //now that we've built the AST, link every node to its parent\n this.ast.link();\n return this;\n }", "initialisePathPDO(pathObject) {\n this._title = pathObject._title;\n this._locations = pathObject._locations;\n }", "function Parse(_compiler) {\n var _this = this;\n this._compiler = _compiler;\n this._parser = new Parser(new Lexer());\n this._pipesCache = new Map();\n this._evalCache = new Map();\n this._calcCache = new Map();\n var compiler = this._compiler;\n var pipeCache = compiler._delegate._metadataResolver._pipeCache;\n pipeCache.forEach(function (pipeMetadata, pipe) { return _this._pipesCache.set(pipeMetadata.name, new pipe()); });\n }", "static readPath(sourcePath, path) {\n path.uniqueIdentifier = sourcePath.uniqueIdentifier;\n path.start = { x: sourcePath.startPoint.X, y: sourcePath.startPoint.Y };\n if (sourcePath.elements) {\n for (let i = 0; i < sourcePath.elements.length; i++) {\n const sourceElement = sourcePath.elements[i];\n let element = { x: sourceElement.point.X, y: sourceElement.point.Y };\n if (sourceElement.angle) {\n element.angle = sourceElement.angle;\n }\n SketchUtils.copyLineAttributes(sourceElement, element);\n if (path.elements === undefined) {\n path.elements = [element];\n } else {\n path.elements.push(element);\n }\n }\n }\n path.closed = sourcePath.closed;\n if (sourcePath.negative) {\n path.negative = sourcePath.negative;\n }\n path.area = sourcePath.area;\n path.label = sourcePath.label;\n path.arrow = sourcePath.arrow;\n path.layer = sourcePath.layer\n }", "constructor(startingPosition,path){cov_u1i8s0vbq.f[0]++;cov_u1i8s0vbq.s[0]++;this.startingPositionInput=startingPosition;cov_u1i8s0vbq.s[1]++;this.currentX=Number(startingPosition.split(\" \")[0]);cov_u1i8s0vbq.s[2]++;this.currentY=Number(startingPosition.split(\" \")[1]);cov_u1i8s0vbq.s[3]++;this.path=path.split(\"\");cov_u1i8s0vbq.s[4]++;this.historicalPath=[[this.currentX,this.currentY]];}", "constructor(stream) {\n this._stream = stream;\n this._parser = null;\n }", "function _initPath(){ \n\tthis._setPath = function(){ \n\treturn (\"/*your path here*/\"); }; }", "constructor(path) {\n let base = window.location.origin;\n let searchpath;\n if (path) {\n const fullPath = arguments.join(\"/\");\n let pathParts = window.location.searchpath.split(\"/\");\n if (fullPath.startsWith(\"..\")) {\n if (pathParts.length > 0) {\n // TODO: Figure out what I was thinking here... what is the point of this?\n } else {\n pathParts = fullPath.replace(/^\\.\\./, '').split(\"/\");\n }\n } else if (fullPath.startsWith(\".\") || fullPath.search(/^\\w+:/i) === -1) {\n // TODO: Figure out what I was thinking here... what is the point of this?\n } else if (fullPath.startsWith(\"/\")) {\n base = window.location.origin;\n } else {\n base = fullPath;\n }\n } else {\n\n }\n let base = path || window.location.href;\n if (path && path.startsWith(\".\")) {\n base = window.location.href;\n }\n const is_rel = base.search(/^\\w+:/i) === -1;\n super(base);\n }", "function onLoad() {\n var sourceUrl = document.location.search.substr(1);\n if (!sourceUrl) {\n displayMessage('Missing source file URL');\n return;\n }\n\n var plainText = document.location.hash == '#text';\n\n var config;\n if (plainText)\n config = Configuration.createDefault();\n else\n config = Configuration.fromExtension(\n sourceUrl.split('.').pop().toLowerCase());\n\n loadContent(sourceUrl,\n plainText,\n config.createCodeMirror.bind(config),\n displayMessage.bind(null, 'Failed to load ' + sourceUrl)\n );\n}", "function Parser(text) {\n if (typeof text !== 'string') {\n throw new Error('not a string');\n }\n this.text = text.trim();\n this.level = 0;\n this.place = 0;\n this.root = null;\n this.stack = [];\n this.currentObject = null;\n this.state = NEUTRAL;\n}", "function Parser(text) {\n if (typeof text !== 'string') {\n throw new Error('not a string');\n }\n this.text = text.trim();\n this.level = 0;\n this.place = 0;\n this.root = null;\n this.stack = [];\n this.currentObject = null;\n this.state = NEUTRAL;\n}", "function Parser(text) {\n if (typeof text !== 'string') {\n throw new Error('not a string');\n }\n this.text = text.trim();\n this.level = 0;\n this.place = 0;\n this.root = null;\n this.stack = [];\n this.currentObject = null;\n this.state = NEUTRAL;\n}", "function Parser(text) {\n if (typeof text !== 'string') {\n throw new Error('not a string');\n }\n this.text = text.trim();\n this.level = 0;\n this.place = 0;\n this.root = null;\n this.stack = [];\n this.currentObject = null;\n this.state = NEUTRAL;\n}", "constructor(filePath) {\n this.filePath = filePath;\n this.fileName = path.basename(filePath);\n this.projectPath = path.dirname(filePath);\n }", "LoadSourceState() {\n\n }", "constructor( type, code_or_tree, embedded=false ){\n super(type)\n if(typeof code_or_tree == \"string\" ){\n var p = new GeneratorParser(false, embedded)\n this.tree = p.get(new Source(\"generator-lexeme\",code_or_tree))\n }else this.tree = code_or_tree\n }", "function initializeContext() {\n GSC.Logging.checkWithLogger(logger, context === null);\n context = new GSC.PcscLiteClient.Context(CLIENT_TITLE, SERVER_APP_ID);\n context.addOnInitializedCallback(contextInitializedListener);\n context.addOnDisposeCallback(contextDisposedListener);\n context.initialize();\n}", "function newParser(source) {\n\tvar tokensState = readToken;\n\tvar tokens = tokenizer(source, tokensState);\n\t// buffer for look-ahead tokens; holds {token, state} records\n\tvar lookahead = [];\n\t// while looking, where are we in the lookahead buffer?\n\tvar lookaheadIndex = 0;\n\t// the current tabstop column\n\tvar tabstop = null;\n\t// are we inside a pattern?\n\tvar inPattern = false;\n\t// are we immediately preceeded by whitspace?\n\tvar inWhitespace = false;\n\t/** Reset the lookahead pointer to the current token. */\n\tfunction startLooking() {\n\t\tlookaheadIndex = 0;\n\t}\n\t/** Get the next token for real and move the \"current\" token pointer. */\n\tfunction nextToken() {\n\t\tstartLooking();\n\t\tif (lookahead.length) {\n\t\t\tvar r = lookahead.shift();\n\t\t\ttokensState = r.state;\n\t\t\treturn r.token;\n\t\t} else {\n\t\t\tvar out = tokens.next();\n\t\t\ttokensState = tokens.state();\n\t\t\treturn out;\n\t\t}\n\t}\n\t/**\n\t * Get the next token speculatively. Repeated calls\n\t * will move forward in the token stream. May be reset\n\t * to the \"current\" token using startLooking().\n\t */\n\tfunction look() {\n\t\ttry {\n\t\t\tif (lookahead.length > lookaheadIndex) {\n\t\t\t\treturn lookahead[lookaheadIndex++].token;\n\t\t\t} else {\n\t\t\t\tlookahead.push({token: tokens.next(), state: tokens.state()});\n\t\t\t\treturn look();\n\t\t\t}\n\t\t} catch (e) {}\n\t}\n\t/** Get the next token and change its style based on the parse state. */\n\tfunction next() {\n\t\tvar out = nextToken();\n\t\t// if we're in a pattern, apply the \"pattern\" style\n\t\tif (inPattern) out.style += \" pattern\";\n\t\tif (out.content == \"\\n\") {\n\t\t\tif (tabstop == null) tabstop = 0;\n\t\t\tvar _tabstop = tabstop;\n\t\t\tout.indentation = function (start) {\n\t\t\t\treturn _tabstop;\n\t\t\t};\n\t\t\ttabstop = null;\n\t\t} else {\n\t\t\t// if the variable is in function call position,\n\t\t\t// change it to a \"site\"\n\t\t\tif (out.type == \"variable\") {\n\t\t\t\tstartLooking();\n var tmp;\n\t\t\t\tdo {\n\t\t\t\t\ttmp = look();\n\t\t\t\t\tif (!tmp) break;\n\t\t\t\t\tif (tmp.type == \"(\" || tmp.type == \"[\") {\n\t\t\t\t\t\tout.style = \"site\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} while (tmp.type == \"whitespace\");\n\t\t\t}\n\t\t\t// if no tabstop has been set yet, use the\n\t\t\t// length of the first whitespace token\n\t\t\tif (tabstop == null) {\n\t\t\t\tif (out.type == \"whitespace\") {\n\t\t\t\t\ttabstop = out.value.length;\n\t\t\t\t} else {\n\t\t\t\t\ttabstop = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tinWhitespace = (out.type == \"whitespace\");\n\t\treturn out;\n\t}\n\tfunction copy() {\n\t\tvar _tokensState = tokensState;\n\t\tvar _inPattern = inPattern;\n\t\treturn function (source) {\n\t\t\ttokens = tokenizer(source, _tokensState);\n\t\t\ttokensState = _tokensState;\n\t\t\tinPattern = _inPattern;\n\t\t\t// the copy starts at the beginning\n\t\t\t// of the line, so most of the within-line\n\t\t\t// state should just be reset\n\t\t\tlookahead = [];\n\t\t\tlookaheadIndex = 0;\n\t\t\ttabstop = null;\n\t\t\tinWhitespace = true;\n\t\t\treturn parser;\n\t\t};\n\t}\n\tvar parser = { next: next, copy: copy };\n\treturn parser;\n}", "function LContext(){}", "function ProcessingContext(crawler, url) {\n this.location = url;\n this._crawler = crawler;\n}", "async init() {\n // Early Exit: File type not allowed\n const allowed = Util.isAllowedType(this.opts);\n if (!allowed) return;\n \n // START LOGGING\n this.startLog();\n\n // Destructure options\n const { file } = this;\n\n // Make source traversable with JSDOM\n let dom = Util.jsdom.dom({src: file.src});\n\n // Find <a> tags and add active state \n // if their [href] matches the current page url\n // Note: Using `a[href]` instead of just `a` as selector, since a user may omit the `[href]` attribute\n const $links = dom.window.document.querySelectorAll('a[href]');\n $links.forEach((link,i) => this.setActive({file, link}));\n\n // Store updated file source\n file.src = Util.setSrc({dom});\n\n // END LOGGING\n this.endLog();\n }", "constructor( parser ){ \n super()\n this.parser = parser \n }", "function createSource(...args) {\n return new Source(...args)\n}", "function SourceNode$1(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode$1] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}", "function SourceNode$1(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}", "constructor (params) {\n if (params == null) { params = {} }\n ({\n cacheDir: this.cacheDir, importPaths: this.importPaths, resourcePath: this.resourcePath, fallbackDir: this.fallbackDir, syncCaches: this.syncCaches,\n lessSourcesByRelativeFilePath: this.lessSourcesByRelativeFilePath, importedFilePathsByRelativeImportPath: this.importedFilePathsByRelativeImportPath\n } = params)\n\n if (this.lessSourcesByRelativeFilePath == null) { this.lessSourcesByRelativeFilePath = {} }\n if (this.importedFilePathsByRelativeImportPath == null) { this.importedFilePathsByRelativeImportPath = {} }\n this.importsCacheDir = this.cacheDirectoryForImports(this.importPaths)\n if (this.fallbackDir) {\n this.importsFallbackDir = join(this.fallbackDir, basename(this.importsCacheDir))\n }\n\n try {\n ({ importedFiles: this.importedFiles } = this.readJson(join(this.importsCacheDir, 'imports.json')))\n } catch (error) {}\n\n this.setImportPaths(this.importPaths)\n\n this.stats = {\n hits: 0,\n misses: 0\n }\n }" ]
[ "0.57478917", "0.5470267", "0.5456823", "0.54400456", "0.5319433", "0.5294155", "0.528039", "0.5265975", "0.52425516", "0.52216965", "0.52216965", "0.52216965", "0.52216965", "0.52216965", "0.52216965", "0.52216965", "0.52216965", "0.52216965", "0.52186733", "0.5217294", "0.52153945", "0.51863337", "0.51863337", "0.51863337", "0.51863337", "0.51863337", "0.51863337", "0.508545", "0.5067049", "0.5067049", "0.5067049", "0.50598377", "0.50483215", "0.5037603", "0.5037603", "0.5037603", "0.5037603", "0.5037603", "0.5037603", "0.5013634", "0.5012384", "0.49946967", "0.49946967", "0.49926028", "0.4963412", "0.49467853", "0.49388394", "0.48949", "0.48947617", "0.4888883", "0.48884118", "0.48703048", "0.48332918", "0.48332918", "0.48332918", "0.48332918", "0.48332918", "0.47986317", "0.47962046", "0.4788298", "0.47829142", "0.47829142", "0.47829142", "0.47737896", "0.47549433", "0.47076207", "0.46641523", "0.46217537", "0.46176547", "0.4616115", "0.4579895", "0.45059064", "0.45034438", "0.448796", "0.44600615", "0.44477975", "0.4436895", "0.44361812", "0.44254217", "0.44247717", "0.44171607", "0.43899977", "0.43661243", "0.43628657", "0.43628657", "0.43628657", "0.43628657", "0.435197", "0.43510535", "0.43324608", "0.43317634", "0.43251133", "0.42939153", "0.4281879", "0.42811728", "0.42645898", "0.4261574", "0.42538035", "0.42234457", "0.42231226" ]
0.49333325
47
Checks whether an object looks like a JSON object that should be converted into a struct. Normal class/prototype instances are considered to look like JSON objects since they should be converted to a struct value. Arrays, Dates, GeoPoints, etc. are not considered to look like JSON objects since they map to specific FieldValue types other than ObjectValue.
function looksLikeJsonObject(input){return typeof input==='object'&&input!==null&&!(input instanceof Array)&&!(input instanceof Date)&&!(input instanceof Timestamp)&&!(input instanceof GeoPoint)&&!(input instanceof Blob)&&!(input instanceof DocumentKeyReference)&&!(input instanceof FieldValueImpl);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isJSONContainer(obj) {\n if (!obj) { return false; }\n if (obj.RECORD___ === obj) { return true; }\n var constr = directConstructor(obj);\n if (constr === void 0) { return false; }\n var typeTag = constr.typeTag___;\n if (typeTag !== 'Object' && typeTag !== 'Array') { return false; }\n return !isPrototypical(obj);\n }", "function looksLikeJsonObject(input) {\n return typeof input === 'object' && input !== null && !(input instanceof Array) && !(input instanceof Date) && !(input instanceof Timestamp) && !(input instanceof GeoPoint) && !(input instanceof Blob) && !(input instanceof DocumentKeyReference) && !(input instanceof FieldValueImpl);\n }", "isJSON(obj) {\r\n if (typeof (obj) == \"object\") {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }", "function looksLikeJsonObject(input) {\n return typeof input === 'object' && input !== null && !(input instanceof Array) && !(input instanceof Date) && !(input instanceof Timestamp) && !(input instanceof GeoPoint) && !(input instanceof Blob) && !(input instanceof DocumentKeyReference) && !(input instanceof FieldValueImpl);\n}", "function looksLikeJsonObject(input) {\r\n return (typeof input === 'object' &&\r\n input !== null &&\r\n !(input instanceof Array) &&\r\n !(input instanceof Date) &&\r\n !(input instanceof Timestamp) &&\r\n !(input instanceof GeoPoint) &&\r\n !(input instanceof Blob) &&\r\n !(input instanceof DocumentKeyReference) &&\r\n !(input instanceof FieldValueImpl));\r\n}", "function looksLikeJsonObject(input) {\r\n return (typeof input === 'object' &&\r\n input !== null &&\r\n !(input instanceof Array) &&\r\n !(input instanceof Date) &&\r\n !(input instanceof Timestamp) &&\r\n !(input instanceof GeoPoint) &&\r\n !(input instanceof Blob) &&\r\n !(input instanceof DocumentKeyReference) &&\r\n !(input instanceof FieldValueImpl));\r\n}", "function looksLikeJsonObject(input) {\r\n return (typeof input === 'object' &&\r\n input !== null &&\r\n !(input instanceof Array) &&\r\n !(input instanceof Date) &&\r\n !(input instanceof Timestamp) &&\r\n !(input instanceof GeoPoint) &&\r\n !(input instanceof Blob) &&\r\n !(input instanceof DocumentKeyReference) &&\r\n !(input instanceof FieldValueImpl));\r\n}", "function looksLikeJsonObject(input) {\n return (typeof input === 'object' &&\n input !== null &&\n !(input instanceof Array) &&\n !(input instanceof Date) &&\n !(input instanceof Timestamp) &&\n !(input instanceof GeoPoint) &&\n !(input instanceof Blob) &&\n !(input instanceof DocumentKeyReference) &&\n !(input instanceof FieldValueImpl));\n}", "function looksLikeJsonObject(input) {\n return (typeof input === 'object' &&\n input !== null &&\n !(input instanceof Array) &&\n !(input instanceof Date) &&\n !(input instanceof Timestamp) &&\n !(input instanceof GeoPoint) &&\n !(input instanceof Blob) &&\n !(input instanceof DocumentKeyReference) &&\n !(input instanceof FieldValueImpl));\n}", "function looksLikeJsonObject(input) {\n return (typeof input === 'object' &&\n input !== null &&\n !(input instanceof Array) &&\n !(input instanceof Date) &&\n !(input instanceof GeoPoint) &&\n !(input instanceof Blob) &&\n !(input instanceof DocumentKeyReference) &&\n !(input instanceof FieldValueImpl));\n}", "function isValidJSON( value ){\n\t if( value === null ){\n\t return true;\n\t }\n\t\n\t switch( typeof value ){\n\t case 'number' :\n\t case 'string' :\n\t case 'boolean' :\n\t return true;\n\t\n\t case 'object':\n\t var proto = Object.getPrototypeOf( value );\n\t\n\t if( proto === Object.prototype || proto === Array.prototype ){\n\t return _.every( value, isValidJSON );\n\t }\n\t }\n\t\n\t return false;\n\t}", "function isJSON (obj) {\n if (typeof obj != 'string')\n obj = JSON.stringify(obj);\n\n try {\n JSON.parse(obj);\n return true;\n } catch (e) {\n return false;\n }\n}", "function _is_json_value(value) {\n\tif (value === undefined) return false;\n\tif (value === null) return true;\n\treturn ([Object, Array, String, Number, Boolean].indexOf(value.constructor) !== -1);\n}", "function wkt_is_object(val) {\n return !!val && typeof val == 'object' && !Array.isArray(val);\n}", "function isobj(data) {\n if (data == null) return false\n if (data.constructor && data.constructor.name != 'Object') return false\n return true\n}", "isJson(value) {\n try {\n return typeof JSON.parse(value) === \"object\";\n } catch (e) {\n return false;\n }\n }", "function looksLikeJsonObject(input) {\n return (typeof input === 'object' &&\n input !== null &&\n !(input instanceof Array) &&\n !(input instanceof Date) &&\n !(input instanceof __WEBPACK_IMPORTED_MODULE_14__geo_point__[\"a\" /* GeoPoint */]) &&\n !(input instanceof __WEBPACK_IMPORTED_MODULE_11__blob__[\"a\" /* Blob */]) &&\n !(input instanceof DocumentKeyReference) &&\n !(input instanceof __WEBPACK_IMPORTED_MODULE_13__field_value__[\"b\" /* FieldValueImpl */]));\n}", "function looksLikeJsonObject(input) {\n return (typeof input === 'object' &&\n input !== null &&\n !(input instanceof Array) &&\n !(input instanceof Date) &&\n !(input instanceof __WEBPACK_IMPORTED_MODULE_14__geo_point__[\"a\" /* GeoPoint */]) &&\n !(input instanceof __WEBPACK_IMPORTED_MODULE_11__blob__[\"b\" /* Blob */]) &&\n !(input instanceof DocumentKeyReference) &&\n !(input instanceof __WEBPACK_IMPORTED_MODULE_13__field_value__[\"c\" /* FieldValueImpl */]));\n}", "function looksLikeJsonObject(input) {\n return (typeof input === 'object' &&\n input !== null &&\n !(input instanceof Array) &&\n !(input instanceof Date) &&\n !(input instanceof __WEBPACK_IMPORTED_MODULE_14__geo_point__[\"a\" /* GeoPoint */]) &&\n !(input instanceof __WEBPACK_IMPORTED_MODULE_11__blob__[\"b\" /* Blob */]) &&\n !(input instanceof DocumentKeyReference) &&\n !(input instanceof __WEBPACK_IMPORTED_MODULE_13__field_value__[\"c\" /* FieldValueImpl */]));\n}", "isPlainObject(obj) {\n return _toString.call(obj) === '[object Object]'\n }", "__is_object(value) {\n return value && typeof value === 'object' && value.constructor === Object;\n }", "function sc_isStruct(o) {\n return (o instanceof sc_Struct);\n}", "function isObject(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isValueObject(obj) {\n\treturn (obj instanceof Number) || (obj instanceof String) || (obj instanceof Boolean) || (obj === null);\n}", "function isObject(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function plainObjectCheck(x) {\n if (x === null) {\n // Note: typeof `null` is 'object', and `null` is valid in JSON.\n return true;\n }\n else if (typeof x === 'object') {\n if (Object.getPrototypeOf(x) === Object.prototype) {\n // `x` is a JavaScript object and its prototype is Object.\n const keys = Object.keys(x);\n for (const key of keys) {\n if (typeof key !== 'string') {\n // JSON keys must be strings.\n return false;\n }\n if (!plainObjectCheck(x[key])) { // Recursive call.\n return false;\n }\n }\n return true;\n }\n else {\n // `x` is a JavaScript object but its prototype is not Object.\n if (Array.isArray(x)) {\n // `x` is a JavaScript array.\n for (const item of x) {\n if (!plainObjectCheck(item)) { // Recursive call.\n return false;\n }\n }\n return true;\n }\n else {\n // `x` is a JavaScript object and its prototype is not Object,\n // and it's not an Array. I.e., it's a complex object such as\n // `Error` and `Date`.\n return false;\n }\n }\n }\n else {\n // `x` is not a JavaScript object or `null`.\n const xType = typeof x;\n return xType === 'string' || xType === 'number' || xType === 'boolean';\n }\n}", "function isObject(obj){\n return Object.prototype.toString.call(obj) == '[object Object]';\n }", "function isObject(obj) {\n return typeof obj === 'object'\n && obj !== null // eslint-disable-line @typescript-eslint/no-explicit-any\n && !Array.isArray(obj)\n && !(obj instanceof RegExp)\n && !(obj instanceof Date);\n}", "function isObject(obj) {\n return typeof obj === 'object'\n && obj !== null // eslint-disable-line @typescript-eslint/no-explicit-any\n && !Array.isArray(obj)\n && !(obj instanceof RegExp)\n && !(obj instanceof Date);\n}", "function isObject(o) { return typeof o === 'object'; }", "function isObject(o) { return typeof o === 'object'; }", "function isObject(o) { return typeof o === 'object'; }", "function plainObjectCheck(x) {\n if (x === null) {\n // Note: typeof `null` is 'object', and `null` is valid in JSON.\n return true;\n }\n else if (typeof x === 'object') {\n if (Object.getPrototypeOf(x) === Object.prototype) {\n // `x` is a JavaScript object and its prototype is Object.\n var keys = Object.keys(x);\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if (typeof key !== 'string') {\n // JSON keys must be strings.\n return false;\n }\n if (!plainObjectCheck(x[key])) { // Recursive call.\n return false;\n }\n }\n return true;\n }\n else {\n // `x` is a JavaScript object but its prototype is not Object.\n if (Array.isArray(x)) {\n // `x` is a JavaScript array.\n for (var _a = 0, x_1 = x; _a < x_1.length; _a++) {\n var item = x_1[_a];\n if (!plainObjectCheck(item)) { // Recursive call.\n return false;\n }\n }\n return true;\n }\n else {\n // `x` is a JavaScript object and its prototype is not Object,\n // and it's not an Array. I.e., it's a complex object such as\n // `Error` and `Date`.\n return false;\n }\n }\n }\n else {\n // `x` is not a JavaScript object or `null`.\n var xType = typeof x;\n return xType === 'string' || xType === 'number' || xType === 'boolean';\n }\n}", "function object (data) {\n return Object.prototype.toString.call(data) === '[object Object]';\n }", "function _isPlainObject(obj) {\n return (obj && obj.constructor.prototype === Object.prototype);\n}", "function isPlainObject(input){return typeof input==='object'&&input!==null&&(Object.getPrototypeOf(input)===Object.prototype||Object.getPrototypeOf(input)===null);}", "function isDataStructure(value) {\n return typeof value === 'object' && (isImmutable(value) || Array.isArray(value) || isPlainObj(value));\n}", "function isPlainObject(obj){\n \tif (obj.constructor.name===\"Object\"){\n \t\treturn true;\n \t}\n \treturn false;\n }", "function isPOJO(value) {\n return !!(value && value.constructor === Object);\n}", "function isObject(obj) {\n if (obj == null) {\n return false;\n }\n\n return typeof obj === \"object\" && !Array.isArray(obj);\n}", "function isObject(obj) {\n return !isArray(obj) && isObjectLike(obj);\n}", "function isObject(value) {\n // YOUR CODE BELOW HERE //\n //Make a conditional statement using if, else-if... to check for value type and return boolean\n //Could be a number, so I have to handle numbers too!\n //check if value is array using Array.isArray, as typeof will return 'object'\n if(Array.isArray(value)) {\n return false;\n }\n //check if value is null, not using typeof operator, which would return 'object'\n else if(value === null) {\n return false;\n }\n //check for instanceof Date, not using typeof operator, which would return 'object'\n else if(value instanceof Date) {\n return false;\n }\n //use typeof operator to check remaining value types...\n else if(typeof value === 'number') {\n return false;\n }\n else if(typeof value === 'string') {\n return false;\n }\n else if(typeof value === 'boolean') {\n return false;\n }\n else if(typeof value === 'object') {\n return true;\n\n }\n \n \n \n // YOUR CODE ABOVE HERE //\n}", "function isObject (o) { return o && typeof o === 'object' }", "function isObject (o) { return o && typeof o === 'object' }", "function isObj(value) {\n var type = typeof value;\n return value !== null && (type === 'object' || type === 'function');\n}", "function isDataStructure(value) {\n return (\n typeof value === 'object' &&\n (isImmutable(value) || Array.isArray(value) || isPlainObj(value))\n );\n}", "function isDataStructure(value) {\n return (\n typeof value === 'object' &&\n (isImmutable(value) || Array.isArray(value) || isPlainObj(value))\n );\n}", "function isDataStructure(value) {\n return (\n typeof value === 'object' &&\n (isImmutable(value) || Array.isArray(value) || isPlainObj(value))\n );\n}", "function isObject(obj) {\n \t\treturn obj && toString.call(obj) === '[object Object]';\n \t}", "function shallConvertToJSON (params) {\n return isObject(params.body)\n}", "function isObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n}", "function isObject(obj) {\n if (Object.prototype.toString.call(obj) === \"[object Object]\") return true;\n return false;\n}", "isObject(obj) {\n return obj !== null && typeof obj === 'object'\n }", "function isObject(obj) {\n return obj && toString.call(obj) === '[object Object]';\n }", "function isObject(o){ return typeof o === 'object' && o !== null; }", "function isObj(obj) {\n // innner util to check type of 'obj's\n return typeof(obj) == \"object\";\n }", "function isObject(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObjectLike(obj) {\n return typeof obj === \"object\" && obj !== null;\n}", "function isObject(obj){return obj!==null&&(typeof obj===\"undefined\"?\"undefined\":_typeof2(obj))==='object';}", "function isObject(obj){return obj!==null&&(typeof obj===\"undefined\"?\"undefined\":_typeof2(obj))==='object';}", "function isJSON(body) {\n\t if (!body) return false;\n\t if ('string' == typeof body) return false;\n\t if ('function' == typeof body.pipe) return false;\n\t if (Buffer.isBuffer(body)) return false;\n\t return true;\n\t}", "function isPlainObject(obj){return _toString.call(obj)==='[object Object]';}", "function isPlainObject(obj){return _toString.call(obj)==='[object Object]';}", "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isJSON(body) {\n if (!body) return false;\n if ('string' == typeof body) return false;\n if ('function' == typeof body.pipe) return false;\n if (Buffer.isBuffer(body)) return false;\n return true;\n}", "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isDataStructure(value) {\n return isImmutable(value) || Array.isArray(value) || isPlainObj(value);\n}", "function isDataStructure(value) {\n return isImmutable(value) || Array.isArray(value) || isPlainObj(value);\n}", "function isObject(obj) {\n\t\t\treturn obj && toString.call(obj) === '[object Object]';\n\t\t}", "function isObject(obj) {\r\n return obj && toString.call(obj) === '[object Object]';\r\n}", "function isObject(x) {\n return (x !== null && x !== undefined && !Array.isArray(x) &&\n (x.toString() === \"[object BSON]\" || x.toString() === \"[object Object]\" ||\n (typeof x === \"object\" && Object.getPrototypeOf(x) === Object.prototype)));\n }", "function isObject(obj){return obj!==null&&(typeof obj==='undefined'?'undefined':_typeof(obj))==='object';}", "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "function isObj(something) {\n return something && typeof something === \"object\" && !Array.isArray(something);\n}", "function isObj$1(something) {\n return typeDetect(something) === 'Object';\n}", "function isobj(item){\n if(typeof(item) === 'object'){\n return true;\n }else{\n return false;\n }\n }", "function isObject(value) {\n\n\t if (typeof value === 'object' && value !== null &&\n\t !(value instanceof Boolean) &&\n\t !(value instanceof Date) &&\n\t !(value instanceof Number) &&\n\t !(value instanceof RegExp) &&\n\t !(value instanceof String)) {\n\n\t return true;\n\t }\n\n\t return false;\n\t }", "function isJSON(input) {\n try {\n JSON.parse(input);\n return true;\n } catch (e) {\n return false;\n }\n\n return true;\n}", "function isObject(obj) {\n\t\treturn obj && toString.call(obj) === '[object Object]';\n\t}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function checkObjectInside(obj){\n if(typeof obj.data === 'object'){\n checkObject(obj.data);\n };\n}", "function isPlainObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]'\n}", "function isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}" ]
[ "0.70478886", "0.690076", "0.6877085", "0.6822039", "0.6737699", "0.6737699", "0.6737699", "0.67257696", "0.67257696", "0.671834", "0.6669784", "0.65451586", "0.6487071", "0.64797443", "0.6475275", "0.6463843", "0.6461636", "0.644003", "0.644003", "0.63575494", "0.6276503", "0.6273326", "0.6209532", "0.6208143", "0.6180505", "0.6179396", "0.6162975", "0.61610633", "0.61610633", "0.61584085", "0.61584085", "0.61584085", "0.61547637", "0.6110526", "0.61098504", "0.60961944", "0.6092385", "0.6090176", "0.6065761", "0.6061311", "0.60603595", "0.60453063", "0.60452497", "0.60452497", "0.6032067", "0.6029009", "0.6029009", "0.6029009", "0.60200256", "0.6015007", "0.60138667", "0.6012404", "0.6000856", "0.5994917", "0.59937894", "0.59774095", "0.5975052", "0.59716177", "0.5970283", "0.5970283", "0.59694844", "0.5959225", "0.5959225", "0.5957668", "0.59529567", "0.5951913", "0.5948507", "0.5948507", "0.5946667", "0.59431094", "0.59414", "0.5939564", "0.59376186", "0.59376186", "0.59376186", "0.59376186", "0.59376186", "0.59376186", "0.59376186", "0.59376186", "0.59376186", "0.59376186", "0.59376186", "0.59376186", "0.59335154", "0.59300816", "0.5929338", "0.5928609", "0.59271336", "0.591255", "0.58880836", "0.58880836", "0.58880836", "0.58880836", "0.58880836", "0.58880836", "0.58880836", "0.58845496", "0.5880388", "0.58725667" ]
0.717352
0
Helper that calls fromDotSeparatedString() but wraps any error thrown.
function fieldPathFromArgument(methodName,path){if(path instanceof FieldPath$1){return path._internalPath;}else if(typeof path==='string'){return fieldPathFromDotSeparatedString(methodName,path);}else{var message='Field path arguments must be of type string or FieldPath.';throw new index_esm_FirestoreError(Code.INVALID_ARGUMENT,"Function "+methodName+"() called with invalid data. "+message);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n if (found >= 0) {\n throw new __WEBPACK_IMPORTED_MODULE_1__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\n \"'~', '*', '/', '[', or ']'\");\n }\n try {\n return new (FieldPath.bind.apply(FieldPath, [void 0].concat(path.split('.'))))();\n }\n catch (e) {\n throw new __WEBPACK_IMPORTED_MODULE_1__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\n \"begin with '.', end with '.', or contain '..'\");\n }\n}", "function fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n if (found >= 0) {\n throw new __WEBPACK_IMPORTED_MODULE_1__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\n \"'~', '*', '/', '[', or ']'\");\n }\n try {\n return new (FieldPath.bind.apply(FieldPath, [void 0].concat(path.split('.'))))();\n }\n catch (e) {\n throw new __WEBPACK_IMPORTED_MODULE_1__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\n \"begin with '.', end with '.', or contain '..'\");\n }\n}", "function fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n if (found >= 0) {\n throw new __WEBPACK_IMPORTED_MODULE_1__util_error__[\"b\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__util_error__[\"a\" /* Code */].INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\n \"'~', '*', '/', '[', or ']'\");\n }\n try {\n return new (FieldPath.bind.apply(FieldPath, [void 0].concat(path.split('.'))))();\n }\n catch (e) {\n throw new __WEBPACK_IMPORTED_MODULE_1__util_error__[\"b\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__util_error__[\"a\" /* Code */].INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\n \"begin with '.', end with '.', or contain '..'\");\n }\n}", "function fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n\n if (found >= 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" + \"'~', '*', '/', '[', or ']'\");\n }\n\n try {\n return new (FieldPath$1.bind.apply(FieldPath$1, tslib.__spreadArrays([void 0], path.split('.'))))();\n } catch (e) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" + \"begin with '.', end with '.', or contain '..'\");\n }\n }", "function fromDotSeparatedString(path) {\r\n var found = path.search(RESERVED);\r\n if (found >= 0) {\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\r\n \"'~', '*', '/', '[', or ']'\");\r\n }\r\n try {\r\n return new (FieldPath$1.bind.apply(FieldPath$1, tslib.__spreadArrays([void 0], path.split('.'))))();\r\n }\r\n catch (e) {\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\r\n \"begin with '.', end with '.', or contain '..'\");\r\n }\r\n}", "function fromDotSeparatedString(path) {\r\n var found = path.search(RESERVED);\r\n if (found >= 0) {\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\r\n \"'~', '*', '/', '[', or ']'\");\r\n }\r\n try {\r\n return new (FieldPath$1.bind.apply(FieldPath$1, tslib.__spreadArrays([void 0], path.split('.'))))();\r\n }\r\n catch (e) {\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\r\n \"begin with '.', end with '.', or contain '..'\");\r\n }\r\n}", "function fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n if (found >= 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\n \"'~', '*', '/', '[', or ']'\");\n }\n try {\n return new (FieldPath$1.bind.apply(FieldPath$1, [void 0].concat(path.split('.'))))();\n }\n catch (e) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\n \"begin with '.', end with '.', or contain '..'\");\n }\n}", "function fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n if (found >= 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\n \"'~', '*', '/', '[', or ']'\");\n }\n try {\n return new (FieldPath$1.bind.apply(FieldPath$1, [void 0].concat(path.split('.'))))();\n }\n catch (e) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\n \"begin with '.', end with '.', or contain '..'\");\n }\n}", "function fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n if (found >= 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\n \"'~', '*', '/', '[', or ']'\");\n }\n try {\n return new (FieldPath$1.bind.apply(FieldPath$1, [void 0].concat(path.split('.'))))();\n }\n catch (e) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\n \"begin with '.', end with '.', or contain '..'\");\n }\n}", "function fromDotSeparatedString(path) {\r\n var found = path.search(RESERVED);\r\n if (found >= 0) {\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\r\n \"'~', '*', '/', '[', or ']'\");\r\n }\r\n try {\r\n return new (FieldPath$1.bind.apply(FieldPath$1, [void 0].concat(path.split('.'))))();\r\n }\r\n catch (e) {\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\r\n \"begin with '.', end with '.', or contain '..'\");\r\n }\r\n}", "function fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n\n if (found >= 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" + \"'~', '*', '/', '[', or ']'\");\n }\n\n try {\n return new (FieldPath$1.bind.apply(FieldPath$1, [void 0].concat(path.split('.'))))();\n } catch (e) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" + \"begin with '.', end with '.', or contain '..'\");\n }\n}", "function fromDotSeparatedString(path){var found=path.search(RESERVED);if(found>=0){throw new index_esm_FirestoreError(Code.INVALID_ARGUMENT,\"Invalid field path (\"+path+\"). Paths must not contain \"+\"'~', '*', '/', '[', or ']'\");}try{return new(FieldPath$1.bind.apply(FieldPath$1,[void 0].concat(path.split('.'))))();}catch(e){throw new index_esm_FirestoreError(Code.INVALID_ARGUMENT,\"Invalid field path (\"+path+\"). Paths must not be empty, \"+\"begin with '.', end with '.', or contain '..'\");}}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return Object(__WEBPACK_IMPORTED_MODULE_12__field_path__[\"b\" /* fromDotSeparatedString */])(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new __WEBPACK_IMPORTED_MODULE_5__util_error__[\"b\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_5__util_error__[\"a\" /* Code */].INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__field_path__[\"b\" /* fromDotSeparatedString */])(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new __WEBPACK_IMPORTED_MODULE_5__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_5__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__field_path__[\"b\" /* fromDotSeparatedString */])(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new __WEBPACK_IMPORTED_MODULE_5__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_5__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function fieldPathFromDotSeparatedString(methodName,path){try{return fromDotSeparatedString(path)._internalPath;}catch(e){var message=errorMessage(e);throw new index_esm_FirestoreError(Code.INVALID_ARGUMENT,\"Function \"+methodName+\"() called with invalid data. \"+message);}}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return fromDotSeparatedString(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return fromDotSeparatedString(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return fromDotSeparatedString(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\r\n try {\r\n return fromDotSeparatedString(path)._internalPath;\r\n }\r\n catch (e) {\r\n var message = errorMessage(e);\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\r\n }\r\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\r\n try {\r\n return fromDotSeparatedString(path)._internalPath;\r\n }\r\n catch (e) {\r\n var message = errorMessage(e);\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\r\n }\r\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\r\n try {\r\n return fromDotSeparatedString(path)._internalPath;\r\n }\r\n catch (e) {\r\n var message = errorMessage(e);\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\r\n }\r\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return fromDotSeparatedString(path)._internalPath;\n } catch (e) {\n var message = errorMessage(e);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return fromDotSeparatedString(path)._internalPath;\n } catch (e) {\n var message = errorMessage(e);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n }", "get split () {\n return String(this.normalize).split('.')\n }", "function stringToInt(strIP, theThingToThrow) {\n let octets = strIP.split('.');\n if(octets.length != 4)\n throw new theThingToThrow();\n return arrayToInt(octets, theThingToThrow);\n}", "function prepareError(error) {\n\t\t\terror = error.replace(/[[,\\],{,},\"]/g, '');\t\t\t// remove []{} brackets... and \"\n\t\t\terror = error.replace(/\\\\/g, ' ');\t\t\t\t\t// and \\\n\t\t\treturn error;\n\t\t}", "function splitByLastDot(str)\n{\n\tif(str != '')\n\t{\n\t\tvar arr = str.split('.');\n\t\treturn arr[1];\n\t}\n}", "function parseError(str,o){\n\t\t// find nearest token\n\t\tvar err;\n\t\t\n\t\tif (o.lexer) {\n\t\t\tvar token = o.lexer.yytext;\n\t\t\t// console.log o:lexer:pos,token.@loc\n\t\t\terr = new ImbaParseError({message: str},{\n\t\t\t\tpos: o.lexer.pos,\n\t\t\t\ttokens: o.lexer.tokens,\n\t\t\t\ttoken: o.lexer.yytext,\n\t\t\t\tmeta: o\n\t\t\t});\n\t\t\t\n\t\t\tthrow err;\n\t\t\t\n\t\t\t// should find the closest token with actual position\n\t\t\t// str = \"[{token.@loc}:{token.@len || String(token):length}] {str}\"\n\t\t};\n\t\tvar e = new Error(str);\n\t\te.lexer = o.lexer;\n\t\te.options = o;\n\t\tthrow e;\n\t}", "function parseField(fieldName) {\n // fields may be deep (e.g. \"foo.bar.baz\"), so parse\n var fields = [];\n var current = '';\n for (var i = 0, len = fieldName.length; i < len; i++) {\n var ch = fieldName[i];\n if (ch === '.') {\n if (i > 0 && fieldName[i - 1] === '\\\\') { // escaped delimiter\n current = current.substring(0, current.length - 1) + '.';\n } else { // not escaped, so delimiter\n fields.push(current);\n current = '';\n }\n } else { // normal character\n current += ch;\n }\n }\n fields.push(current);\n return fields;\n }", "function resolvePathDots(input) {\r\n\t\tvar output = [];\r\n\t\tinput.replace(/^(\\.\\.?(\\/|$))+/, '')\r\n\t\t .replace(/\\/(\\.(\\/|$))+/g, '/')\r\n\t\t .replace(/\\/\\.\\.$/, '/../')\r\n\t\t .replace(/\\/?[^\\/]*/g, function (part) { part === '/..' ? output.pop() : output.push(part); });\r\n\t\treturn output.join('').replace(/^\\//, input.charAt(0) === '/' ? '/' : '');\r\n\t}", "function splitStringLiteral(s){if(s==='. '){return['.',' '];// for locales with periods bound to the end of each year/month/date\n}else{return[s];}}", "function ParseException() {\r\n}", "getStrToEol() {\n throw new Error('this method should be impelemented in subclass');\n }", "_fromString(str) {\n // trim off weird whitespace and extra trailing commas\n const parts = str.replace(/^[ ,]+|[ ,]+$/g, '').split(',').map(s => s.trim());\n\n this.name = parts[0].split('.').slice(0, -1).join('.');\n this.protocol = parts[0].split('.').slice(-1)[0];\n this.subtypes = parts.slice(1);\n }", "function splitStringLiteral(s) {\n\tif (s === '. ') {\n\t\treturn [ '.', ' ' ]; // for locales with periods bound to the end of each year/month/date\n\t}\n\telse {\n\t\treturn [ s ];\n\t}\n}", "function splitStringLiteral(s) {\n\tif (s === '. ') {\n\t\treturn [ '.', ' ' ]; // for locales with periods bound to the end of each year/month/date\n\t}\n\telse {\n\t\treturn [ s ];\n\t}\n}", "function splitStringLiteral(s) {\n\tif (s === '. ') {\n\t\treturn [ '.', ' ' ]; // for locales with periods bound to the end of each year/month/date\n\t}\n\telse {\n\t\treturn [ s ];\n\t}\n}", "function splitStringLiteral(s) {\n\tif (s === '. ') {\n\t\treturn [ '.', ' ' ]; // for locales with periods bound to the end of each year/month/date\n\t}\n\telse {\n\t\treturn [ s ];\n\t}\n}", "function splitStringLiteral(s) {\n\tif (s === '. ') {\n\t\treturn [ '.', ' ' ]; // for locales with periods bound to the end of each year/month/date\n\t}\n\telse {\n\t\treturn [ s ];\n\t}\n}", "function parseField(fieldName) {\n\t // fields may be deep (e.g. \"foo.bar.baz\"), so parse\n\t var fields = [];\n\t var current = '';\n\t for (var i = 0, len = fieldName.length; i < len; i++) {\n\t var ch = fieldName[i];\n\t if (ch === '.') {\n\t if (i > 0 && fieldName[i - 1] === '\\\\') { // escaped delimiter\n\t current = current.substring(0, current.length - 1) + '.';\n\t } else { // not escaped, so delimiter\n\t fields.push(current);\n\t current = '';\n\t }\n\t } else { // normal character\n\t current += ch;\n\t }\n\t }\n\t fields.push(current);\n\t return fields;\n\t}", "function checkDotsBeforeNumber(num){\r\n\tlet temp = num.split(\".\").length-1;\r\n\tif (temp>1) {\r\n\t\treturn num.substring(0, num.length-1);\r\n\t} \r\n\t// Set \"0\" before dot\r\n\tif (num[0] == '.') {\r\n\t\tnum = \"0\" + num;\r\n\t}\r\n\treturn num;\r\n}", "function splitStringLiteral(s) {\n if (s === '. ') {\n return ['.', ' ']; // for locales with periods bound to the end of each year/month/date\n }\n else {\n return [s];\n }\n}", "function splitStringLiteral(s) {\n if (s === '. ') {\n return ['.', ' ']; // for locales with periods bound to the end of each year/month/date\n }\n else {\n return [s];\n }\n}", "function splitStringLiteral(s) {\n if (s === '. ') {\n return ['.', ' ']; // for locales with periods bound to the end of each year/month/date\n }\n else {\n return [s];\n }\n}", "function splitStringLiteral(s) {\n if (s === '. ') {\n return ['.', ' ']; // for locales with periods bound to the end of each year/month/date\n }\n else {\n return [s];\n }\n}", "function parseField$1(fieldName) {\n\t // fields may be deep (e.g. \"foo.bar.baz\"), so parse\n\t var fields = [];\n\t var current = '';\n\t for (var i = 0, len = fieldName.length; i < len; i++) {\n\t var ch = fieldName[i];\n\t if (ch === '.') {\n\t if (i > 0 && fieldName[i - 1] === '\\\\') { // escaped delimiter\n\t current = current.substring(0, current.length - 1) + '.';\n\t } else { // not escaped, so delimiter\n\t fields.push(current);\n\t current = '';\n\t }\n\t } else { // normal character\n\t current += ch;\n\t }\n\t }\n\t fields.push(current);\n\t return fields;\n\t}", "function parseField(fieldName) {\n // fields may be deep (e.g. \"foo.bar.baz\"), so parse\n var fields = [];\n var current = '';\n for (var i = 0, len = fieldName.length; i < len; i++) {\n var ch = fieldName[i];\n if (ch === '.') {\n if (i > 0 && fieldName[i - 1] === '\\\\') { // escaped delimiter\n current = current.substring(0, current.length - 1) + '.';\n } else { // not escaped, so delimiter\n fields.push(current);\n current = '';\n }\n } else { // normal character\n current += ch;\n }\n }\n fields.push(current);\n return fields;\n}", "function parseField(fieldName) {\n // fields may be deep (e.g. \"foo.bar.baz\"), so parse\n var fields = [];\n var current = '';\n for (var i = 0, len = fieldName.length; i < len; i++) {\n var ch = fieldName[i];\n if (ch === '.') {\n if (i > 0 && fieldName[i - 1] === '\\\\') { // escaped delimiter\n current = current.substring(0, current.length - 1) + '.';\n } else { // not escaped, so delimiter\n fields.push(current);\n current = '';\n }\n } else { // normal character\n current += ch;\n }\n }\n fields.push(current);\n return fields;\n}", "function parseField(fieldName) {\n // fields may be deep (e.g. \"foo.bar.baz\"), so parse\n var fields = [];\n var current = '';\n for (var i = 0, len = fieldName.length; i < len; i++) {\n var ch = fieldName[i];\n if (ch === '.') {\n if (i > 0 && fieldName[i - 1] === '\\\\') { // escaped delimiter\n current = current.substring(0, current.length - 1) + '.';\n } else { // not escaped, so delimiter\n fields.push(current);\n current = '';\n }\n } else { // normal character\n current += ch;\n }\n }\n fields.push(current);\n return fields;\n}", "function parseField(fieldName) {\n // fields may be deep (e.g. \"foo.bar.baz\"), so parse\n var fields = [];\n var current = '';\n for (var i = 0, len = fieldName.length; i < len; i++) {\n var ch = fieldName[i];\n if (ch === '.') {\n if (i > 0 && fieldName[i - 1] === '\\\\') { // escaped delimiter\n current = current.substring(0, current.length - 1) + '.';\n } else { // not escaped, so delimiter\n fields.push(current);\n current = '';\n }\n } else { // normal character\n current += ch;\n }\n }\n fields.push(current);\n return fields;\n}", "function parseField(fieldName) {\n // fields may be deep (e.g. \"foo.bar.baz\"), so parse\n var fields = [];\n var current = '';\n for (var i = 0, len = fieldName.length; i < len; i++) {\n var ch = fieldName[i];\n if (ch === '.') {\n if (i > 0 && fieldName[i - 1] === '\\\\') { // escaped delimiter\n current = current.substring(0, current.length - 1) + '.';\n } else { // not escaped, so delimiter\n fields.push(current);\n current = '';\n }\n } else { // normal character\n current += ch;\n }\n }\n fields.push(current);\n return fields;\n}", "function parseField(fieldName) {\n // fields may be deep (e.g. \"foo.bar.baz\"), so parse\n var fields = [];\n var current = '';\n for (var i = 0, len = fieldName.length; i < len; i++) {\n var ch = fieldName[i];\n if (ch === '.') {\n if (i > 0 && fieldName[i - 1] === '\\\\') { // escaped delimiter\n current = current.substring(0, current.length - 1) + '.';\n } else { // not escaped, so delimiter\n fields.push(current);\n current = '';\n }\n } else { // normal character\n current += ch;\n }\n }\n fields.push(current);\n return fields;\n}", "function readToken_dot() {\n const nextChar = _base.input.charCodeAt(_base.state.pos + 1);\n if (nextChar >= _charcodes.charCodes.digit0 && nextChar <= _charcodes.charCodes.digit9) {\n readNumber(true);\n return;\n }\n\n if (nextChar === _charcodes.charCodes.dot && _base.input.charCodeAt(_base.state.pos + 2) === _charcodes.charCodes.dot) {\n _base.state.pos += 3;\n finishToken(_types.TokenType.ellipsis);\n } else {\n ++_base.state.pos;\n finishToken(_types.TokenType.dot);\n }\n}", "function readToken_dot() {\n const nextChar = input.charCodeAt(state.pos + 1);\n if (nextChar >= charCodes.digit0 && nextChar <= charCodes.digit9) {\n readNumber(true);\n return;\n }\n\n if (nextChar === charCodes.dot && input.charCodeAt(state.pos + 2) === charCodes.dot) {\n state.pos += 3;\n finishToken(TokenType.ellipsis);\n } else {\n ++state.pos;\n finishToken(TokenType.dot);\n }\n}", "get (nameOrDotted) {\n const [name] = nameOrDotted.split('.');\n return this[name]\n }", "ConvertFromString(str) {\n let conv = str.split(\".\")\n this.Major = Number(conv[0]);\n this.Minor = Number(conv[1]);\n this.Patch = Number(conv[2]);\n }", "function formal_key_split(key) {\n return key.split(\".\");\n}", "function isDotValid(Look) {\n try {\n var Operators = new Array();\n for (var i = 0; i < Look.length; i++) {\n if (isOperator(Look[i])) {\n Operators.push(Look[i]);\n }\n }\n var flag = -1, count = 0;\n for (i = 0; i < Operators.length; i++) {\n if (Operators[i] == \".\") {\n if (count == 0) {\n count = 1;\n flag = i;\n } else {\n if (i - flag != 1) {\n flag = i;\n } else {\n throw \"Dot is invalid!\";\n return false;\n }\n }\n }\n }\n return true;\n }\n catch(Error) {\n alert(Error);\n ClearAll();\n }\n}", "function ParseErr(message, str, indx) {\r\n var whitespace = str.slice(0, indx).split(/\\n/);\r\n var lineNo = whitespace.length;\r\n var colNo = whitespace[lineNo - 1].length + 1;\r\n message +=\r\n ' at line ' +\r\n lineNo +\r\n ' col ' +\r\n colNo +\r\n ':\\n\\n' +\r\n ' ' +\r\n str.split(/\\n/)[lineNo - 1] +\r\n '\\n' +\r\n ' ' +\r\n Array(colNo).join(' ') +\r\n '^';\r\n throw EtaErr(message);\r\n}", "parse(message: string): ?string {\n message = GO_ERROR_PREFIX.exec(message)[MESSAGE_GROUP];\n return this.filter(message);\n }", "function importDelim(str, opts) {\n return importDelim2({content: str}, opts);\n }", "static parse(str) {\n }", "function parseError(input, contents, err) {\n var errLines = err.message.split(\"\\n\");\n var lineNumber = (errLines.length > 0? errLines[0].substring(errLines[0].indexOf(\":\") + 1) : 0);\n var lines = contents.split(\"\\n\", lineNumber);\n return {\n message: err.name + \": \" + (errLines.length > 2? errLines[errLines.length - 2] : err.message),\n severity: \"error\",\n lineNumber: lineNumber,\n characterOffset: 0,\n lineContent: (lineNumber > 0 && lines.length >= lineNumber? lines[lineNumber - 1] : \"Unknown line\"),\n source: input\n };\n}", "function parsePath(path) {\n const paths = path.split('.');\n return paths.length > 1 ? paths : [paths[0]];\n}", "function tryParse(parseFn, value) {\n return value ? parseFn(value) : value;\n}", "function splitNested(str) {\n return [str].join('.').replace(/\\[/g, '.').replace(/\\]/g, '').split('.');\n}", "normalize(events) {\n if (events.length == 0) {\n return events;\n }\n\n return events.map((e) => e.split('.').shift());\n }", "readToken_dot(): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (next >= charCodes.digit0 && next <= charCodes.digit9) {\n this.readNumber(true);\n return;\n }\n\n const next2 = this.input.charCodeAt(this.state.pos + 2);\n if (next === charCodes.dot && next2 === charCodes.dot) {\n this.state.pos += 3;\n this.finishToken(tt.ellipsis);\n } else {\n ++this.state.pos;\n this.finishToken(tt.dot);\n }\n }", "parse(address) {\n const groups = address.split('.');\n if (!address.match(constants.RE_ADDRESS)) {\n throw new AddressError('Invalid IPv4 address.');\n }\n return groups;\n }", "function parseInput(string) {\n // remember, these get applied right-to-left\n var f = helpers.compose(createObjects, splitOnDashes, createArrays)\n return f(string)\n}", "function splitDecimal(numStr) {\n\t var allowNegative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t var hasNagation = numStr[0] === '-';\n\t var addNegation = hasNagation && allowNegative;\n\t numStr = numStr.replace('-', '');\n\n\t var parts = numStr.split('.');\n\t var beforeDecimal = parts[0];\n\t var afterDecimal = parts[1] || '';\n\n\t return {\n\t beforeDecimal: beforeDecimal,\n\t afterDecimal: afterDecimal,\n\t hasNagation: hasNagation,\n\t addNegation: addNegation\n\t };\n\t}", "function ParseError(res) {\n\tthis.message = 'Unexpected characters \"' + res[0] + '\":\\n' +\n\t\tres.input.replace(/\\t|\\n/g, '.') + '\\n' + (new Array(res.index + 1).join('-')) + '^';\n\tthis.name = 'ParseError';\n}", "function buildErrorImportVal(l)\n{\n let s = \"\";\n for (let i = 0; i < l.length; i++)\n {\n let stringPart = \"\";\n for (let j = 0; j < l[i].length; j++)\n {\n if (j > 0)\n {\n stringPart += \",\";\n }\n stringPart += l[i][j];\n }\n if (i > 0)\n {\n s += \"\\n\";\n }\n s += stringPart;\n }\n return s;\n}", "function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (isPathSeparator(code))\n break;\n else\n code = CHAR_FORWARD_SLASH;\n\n if (isPathSeparator(code)) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 ||\n res.charCodeAt(res.length - 1) !== CHAR_DOT ||\n res.charCodeAt(res.length - 2) !== CHAR_DOT) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(separator);\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);\n }\n lastSlash = i;\n dots = 0;\n continue;\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0) {\n res += `${separator}..`;\n\t }\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) {\n res += separator + path.slice(lastSlash + 1, i); \n\t }\n else {\n res = path.slice(lastSlash + 1, i);\n\t }\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === CHAR_DOT && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}", "function InvalidStringException(param){\n this.name = \"InvalidStringException\";\n this.message = \"La cadena introducida '\"+ param +\"'solo tiene que estar formada por letras\";\n}", "function ParseErr(message, str, indx) {\r\n var whitespace = str.slice(0, indx).split(/\\n/);\r\n var lineNo = whitespace.length;\r\n var colNo = whitespace[lineNo - 1].length + 1;\r\n message +=\r\n ' at line ' +\r\n lineNo +\r\n ' col ' +\r\n colNo +\r\n ':\\n\\n' +\r\n ' ' +\r\n str.split(/\\n/)[lineNo - 1] +\r\n '\\n' +\r\n ' ' +\r\n Array(colNo).join(' ') +\r\n '^';\r\n throw SqrlErr(message);\r\n}", "chain(type, pos, msg) {\n\t\tthrow new ParseError(type, pos, msg, this);\n\t}", "replaceDot(value) {\n if (value) {\n return value.toString().replace(/\\./, \",\");\n }\n }", "function hasLeadingDot(x) {\n return /^\\./.test(x)\n}", "function NumberStringToArray(numString) {\n let strArray = numString.split('');\n \n for (let x = 0; x < strArray.length; x++) {\n if (strArray[x] === '.') {\n strArray[x] = undefined;\n } else {\n strArray[x] = parseInt(strArray[x])\n }\n }\n return strArray\n}", "function parseDateRange(input) {\n var dateRange = input.split(\"..\");\n\n if(dateRange.length != 2) { dateRange = [dateRange[0], dateRange[0]]; }\n\n return dateRange;\n }", "translateFieldError (error) {\n // Special cases for generator errors (need some parsing first)\n if (error.indexOf('The module.') > -1) {\n error = 'Module ' + error.split('.')[1] + '.';\n }\n\n if (error.indexOf('The fields.') > -1) {\n error = 'Field\\'s ' + error.split('.')[2] + '.';\n }\n\n if (fieldErrorTranslations[error]) {\n // If translation for field error is found return it\n return fieldErrorTranslations[error];\n }\n\n // Else return the field error API returns (which is good 99% of the time)\n return error;\n }", "function removeLeadingDot(dotName)\r\n{\r\n var index = dotName.indexOf(\".\");\r\n if (0 != index)\r\n return dotName;\r\n \r\n var resName = dotName.substr(1);\r\n return resName;\r\n}", "function t(e,t){for(var r=0,o=e.length-1;o>=0;o--){var a=e[o];\".\"===a?e.splice(o,1):\"..\"===a?(e.splice(o,1),r++):r&&(e.splice(o,1),r--)}if(t)for(;r--;r)e.unshift(\"..\");return e}", "function ParserError(e,t){this.message=e,this.error=t}", "function toDate(input) {\n var part = input.split(\".\");\n return new Date(part[2], (part[1] - 1), part[0]);\n}", "setRegularDot(regularDot){\r\n this.regularDot = regularDot;\r\n }", "function parseError(err, path){\n app.logger.log(err, path); \n \n if(typeof err == 'string')\n return err;\n return 'Unknown error';\n }", "function cut_first_sentence(string) {\n let index = string.indexOf(\".\");\n return string.substring(index + 1, string.length).trim();\n}", "function validIPAddresses(string) {\n let results = [];\n //now let's look through all the possible positions where we can insert a period!\n for (let i = 0; i < Math.min(string.length, 4); i++) {\n let curIP = [\"\", \"\", \"\", \"\"];\n //decide what will be our first part of IP\n curIP[0] = string.slice(0, i); //will give us whatever is before the 1st period we place\n if (!isValidPart(curIP[0])) continue;\n //once we found the place for first period=>found first valid part\n //let's find the next valid parts(the place where to insert the next period) that we can generate\n //with curIP[0]\n //i+1 becase we want to put next period at least one more position from previous and AT MOST 3 positions past i\n for (let j = i + 1; j < i + Math.min(string.length - i, 4); j++) {\n curIP[1] = string.slice(i, j); //we start from index i(after the previous valid part) and j -is where we place the next period\n if (!isValidPart(curIP[1])) continue;\n\n for (let k = j + 1; k < j + Math.min(string.length - j, 4); k++) {\n curIP[2] = string.slice(j, k); //we start from index j after the previous valid part) and untill k -is where we place the next period\n curIP[3] = string.slice(k); // the last 4th part is whatever is left after the third part\n if (isValidPart(curIP[2]) && isValidPart(curIP[3])) {\n results.push(curIP.join(\".\"));\n }\n }\n }\n }\n return results;\n}", "static applyWithError(func, verify) {\n return (expression, state, options) => {\n let value;\n const { args, error: childrenError } = FunctionUtils.evaluateChildren(expression, state, options, verify);\n let error = childrenError;\n if (!error) {\n try {\n ({ value, error } = func(args));\n }\n catch (e) {\n error = e.message;\n }\n }\n return { value, error };\n };\n }", "convertError(response) {\n var error = response.data.error;\n\n if (error == \"Invalid API Key\") {\n return new errors.InvalidApiKeyError(response.error);\n } else if (error.match(/limited/)) {\n return new errors.UsageLimitExceededError(response.error);\n } else {\n return new errors.ApiError(error);\n }\n }", "function parseFloatOpts(str) {\n\n if (typeof str === \"number\") {\n return str;\n }\n\n var ar = str.split(/\\.|,/);\n\n var value = '';\n for (var i in ar) {\n if (i > 0 && i == ar.length - 1) {\n value += \".\";\n }\n value += ar[i];\n }\n return Number(value);\n}", "function newParser(options) {\n if (options.separator === undefined) {\n // using exception here because a missing separator here would be a bug,\n // not misuse of the library\n throw 'no separator specified';\n }\n let sep = options.separator;\n let quote = options.quote;\n if (quote !== undefined) { // quoted parser\n return function(line) {\n let tokens = [];\n let pos = 0;\n while (pos < line.length) {\n let [token, newpos] = parseQuoted(line, pos, quote);\n if (token === false) {\n return [`missing/wrong field at pos ${pos}`, null]\n };\n pos = newpos;\n if (pos < line.length) {\n if (line[pos] !== '\\n' && line[pos] !== '\\r' && line[pos] !== sep) {\n return [`expected separator at pos ${pos}`];\n }\n pos += 1;\n }\n tokens[tokens.length] = token;\n }\n return [null, tokens];\n }\n } else { // unquoted parser\n return function(line) {\n let tokens = [];\n let pos = 0;\n while (pos < line.length) {\n let start = pos;\n while (pos < line.length && line[pos] !== sep) {\n pos += 1;\n }\n let end = pos;\n tokens[tokens.length] = line.substring(start, end);\n if (pos < line.length) {\n pos += 1;\n }\n }\n return [null, tokens];\n }\n }\n }", "function forceDouble(strText, strDot)\n{\n strText = strText.replace(strDot, '.');\n var strNumbers = '1234567890.\\n';\n var strNewText = '';\n for (var intCount = 0; intCount < strText.length; ++intCount) {\n if (strNumbers.indexOf(strText.charAt(intCount)) != -1)\n strNewText += strText.charAt(intCount);\n }\n if (strNewText === '')\n return '';\n var floNew = parseFloat(strNewText, 10);\n strNewText = floNew + '';\n strText = strText.replace('.', strDot);\n return strText;\n}", "parse (array = []) {\r\n // If already is an array, no need to parse it\r\n if (array instanceof Array) return array\r\n\r\n return array.trim().split(delimiter).map(parseFloat)\r\n }", "function checkDotExists(){\n //looks for dot in result\n //yes does nothing & exit\n //no adds result and history & exit \n if(result.indexOf(\".\") < 0){\n concResult(input);\n concHistory(input);\n }\n }", "function dotCombine() {\r\n\t\t\twhile($scope.input.indexOf(\".\") != -1) {\r\n\t\t\t\tvar dotPosition = $scope.input.indexOf(\".\");\r\n\t\t\t\tvar dotNumber = $scope.input[dotPosition - 1] + $scope.input[dotPosition] + $scope.input[dotPosition + 1];\r\n\t\t\t\t$scope.input.splice(dotPosition, 2);\r\n\t\t\t\t$scope.input[dotPosition - 1] = parseFloat(dotNumber);\r\n\t\t\t}\r\n\t\t}", "function parseString(string, options) {\n return Promise.resolve(string).then(function (data) {\n return data.split('\\n');\n }).then(makeArrayOfMessages$1).then(function (messages) {\n return parseMessages$1(messages, options);\n });\n }", "function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];\".\"===i?e.splice(r,1):\"..\"===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift(\"..\");return e}" ]
[ "0.6113351", "0.6113351", "0.60802096", "0.5968342", "0.5908675", "0.5908675", "0.58591676", "0.58591676", "0.58591676", "0.58097744", "0.5794948", "0.5687447", "0.52799267", "0.5135127", "0.5135127", "0.51215273", "0.50789124", "0.50789124", "0.50789124", "0.50610167", "0.50610167", "0.50610167", "0.50152427", "0.49628478", "0.4833114", "0.47564828", "0.47023186", "0.4676799", "0.46638024", "0.45948413", "0.45912182", "0.45865834", "0.45175952", "0.45013013", "0.44933736", "0.44817966", "0.44817966", "0.44817966", "0.44817966", "0.44817966", "0.4476848", "0.44721135", "0.4466715", "0.4466715", "0.4466715", "0.4466715", "0.44509175", "0.44475284", "0.44475284", "0.44475284", "0.44475284", "0.44475284", "0.44475284", "0.44270337", "0.44257274", "0.44166476", "0.4416606", "0.4404354", "0.43973824", "0.43946904", "0.4394306", "0.43919986", "0.43821484", "0.4379493", "0.43779814", "0.43630183", "0.43576726", "0.43571076", "0.4351357", "0.4332637", "0.43156093", "0.43047404", "0.4296128", "0.42840716", "0.4278108", "0.4273605", "0.42667475", "0.42649105", "0.42385736", "0.4237975", "0.42336", "0.42076364", "0.4201338", "0.4200406", "0.4198853", "0.41940373", "0.41935414", "0.4190482", "0.41898727", "0.4179637", "0.41758555", "0.41755196", "0.41746902", "0.41696092", "0.41586375", "0.41547033", "0.41492745", "0.41393822", "0.4134239", "0.4133657", "0.41281086" ]
0.0
-1
Wraps fromDotSeparatedString with an error message about the method that was thrown.
function fieldPathFromDotSeparatedString(methodName,path){try{return fromDotSeparatedString(path)._internalPath;}catch(e){var message=errorMessage(e);throw new index_esm_FirestoreError(Code.INVALID_ARGUMENT,"Function "+methodName+"() called with invalid data. "+message);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return Object(__WEBPACK_IMPORTED_MODULE_12__field_path__[\"b\" /* fromDotSeparatedString */])(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new __WEBPACK_IMPORTED_MODULE_5__util_error__[\"b\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_5__util_error__[\"a\" /* Code */].INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__field_path__[\"b\" /* fromDotSeparatedString */])(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new __WEBPACK_IMPORTED_MODULE_5__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_5__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__field_path__[\"b\" /* fromDotSeparatedString */])(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new __WEBPACK_IMPORTED_MODULE_5__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_5__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function InvalidStringException(param){\n this.name = \"InvalidStringException\";\n this.message = \"La cadena introducida '\"+ param +\"'solo tiene que estar formada por letras\";\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return fromDotSeparatedString(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return fromDotSeparatedString(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return fromDotSeparatedString(path)._internalPath;\n }\n catch (e) {\n var message = errorMessage(e);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return fromDotSeparatedString(path)._internalPath;\n } catch (e) {\n var message = errorMessage(e);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\r\n try {\r\n return fromDotSeparatedString(path)._internalPath;\r\n }\r\n catch (e) {\r\n var message = errorMessage(e);\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\r\n }\r\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\r\n try {\r\n return fromDotSeparatedString(path)._internalPath;\r\n }\r\n catch (e) {\r\n var message = errorMessage(e);\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\r\n }\r\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\r\n try {\r\n return fromDotSeparatedString(path)._internalPath;\r\n }\r\n catch (e) {\r\n var message = errorMessage(e);\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\r\n }\r\n}", "function ParseErr(message, str, indx) {\r\n var whitespace = str.slice(0, indx).split(/\\n/);\r\n var lineNo = whitespace.length;\r\n var colNo = whitespace[lineNo - 1].length + 1;\r\n message +=\r\n ' at line ' +\r\n lineNo +\r\n ' col ' +\r\n colNo +\r\n ':\\n\\n' +\r\n ' ' +\r\n str.split(/\\n/)[lineNo - 1] +\r\n '\\n' +\r\n ' ' +\r\n Array(colNo).join(' ') +\r\n '^';\r\n throw EtaErr(message);\r\n}", "function fieldPathFromDotSeparatedString(methodName, path) {\n try {\n return fromDotSeparatedString(path)._internalPath;\n } catch (e) {\n var message = errorMessage(e);\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + methodName + \"() called with invalid data. \" + message);\n }\n }", "function CustomError() {}", "function SQLParseError(message)\n{\nthis.name = \"SQLParseError\";\nthis.message = strf.apply(\nthis, \narguments.length ? arguments : [\"Error while parsing sql query\"]\n);\n}", "function err( i ) {\n if ( !data.errors ) return \"🚨 (Modular): \";\n\n let args = data.errors[i],\n type = `[${ args[0] }]`,\n position = \"\",\n information,\n error;\n\n // Removing error type\n args.shift();\n\n // Don't show error-origin if only one argument present.\n if ( args.length > 1 ) {\n position = `\\n@ ${ args.pop() }()\\n`;\n }\n\n // Formatting the error information\n information = args.map( arg => `\\n--> ${ arg }` ).join( \"\\n\" );\n error = `🚨 (Modular): ${ [type, information, position].join( \"\\n\" ) }`;\n\n return error;\n }", "function VeryBadError() {}", "formatErrorMessage(message) { return `An error occurred: \\`${message}\\``; }", "_syntaxError(message) {\n log.error(\"Syntax Error:\",message);\n throw message;\n }", "function caml_raise_with_string (tag, msg) {\n caml_raise_with_arg (tag, new MlWrappedString (msg));\n}", "getError(name, value) {\n return `Issue identified for ${name}. Was not expecting ${value}.`;\n }", "friendlyErrorMessage(errorMessage)\n {\n if(errorMessage.includes(\"FIELD_CUSTOM_VALIDATION_EXCEPTION\")){\n let errorSplit = errorMessage.split(\"FIELD_CUSTOM_VALIDATION_EXCEPTION, \");\n if(errorSplit != null && errorSplit[1] !== undefined){\n errorMessage = errorSplit[1].replace(/(?=\\S*['_])([\\[a-zA-Z'_\\]]+)/g,\"\");\n errorMessage = errorMessage.slice(0, -2);\n }\n }\n return errorMessage;\n }", "_Error2Console(message, methodName = '') {\r\n if (typeof message === 'string') {\r\n console.error(this.constructor.name + \" - \" + methodName + \" - \" + message);\r\n }\r\n else {\r\n console.error(message);\r\n }\r\n }", "function ParseErr(message, str, indx) {\r\n var whitespace = str.slice(0, indx).split(/\\n/);\r\n var lineNo = whitespace.length;\r\n var colNo = whitespace[lineNo - 1].length + 1;\r\n message +=\r\n ' at line ' +\r\n lineNo +\r\n ' col ' +\r\n colNo +\r\n ':\\n\\n' +\r\n ' ' +\r\n str.split(/\\n/)[lineNo - 1] +\r\n '\\n' +\r\n ' ' +\r\n Array(colNo).join(' ') +\r\n '^';\r\n throw SqrlErr(message);\r\n}", "function parseError(str,o){\n\t\t// find nearest token\n\t\tvar err;\n\t\t\n\t\tif (o.lexer) {\n\t\t\tvar token = o.lexer.yytext;\n\t\t\t// console.log o:lexer:pos,token.@loc\n\t\t\terr = new ImbaParseError({message: str},{\n\t\t\t\tpos: o.lexer.pos,\n\t\t\t\ttokens: o.lexer.tokens,\n\t\t\t\ttoken: o.lexer.yytext,\n\t\t\t\tmeta: o\n\t\t\t});\n\t\t\t\n\t\t\tthrow err;\n\t\t\t\n\t\t\t// should find the closest token with actual position\n\t\t\t// str = \"[{token.@loc}:{token.@len || String(token):length}] {str}\"\n\t\t};\n\t\tvar e = new Error(str);\n\t\te.lexer = o.lexer;\n\t\te.options = o;\n\t\tthrow e;\n\t}", "function error(expected){\n console.log(\"Expected: \"+expected+\n \" but found \"+(toks[i][0])+\": \"+\n (toks[i][1]));\n var e = new Error();\n console.log(e.stack);\n throw \"Parse error\";\n }", "ListsNetworkException (msg) {\n let error = new Error(msg);\n error.name = 'ListsNetworkException';\n //error.snappMessage = \"something?\";\n throw error;\n }", "getStrToEol() {\n throw new Error('this method should be impelemented in subclass');\n }", "function throwStyledComponentsError(code) {\n var interpolations = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n interpolations[_i - 1] = arguments[_i];\n }\n {\n return new Error(format.apply(void 0, __spreadArray([ERRORS[code]], interpolations, false)).trim());\n }\n }", "function fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n if (found >= 0) {\n throw new __WEBPACK_IMPORTED_MODULE_1__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\n \"'~', '*', '/', '[', or ']'\");\n }\n try {\n return new (FieldPath.bind.apply(FieldPath, [void 0].concat(path.split('.'))))();\n }\n catch (e) {\n throw new __WEBPACK_IMPORTED_MODULE_1__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\n \"begin with '.', end with '.', or contain '..'\");\n }\n}", "function fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n if (found >= 0) {\n throw new __WEBPACK_IMPORTED_MODULE_1__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\n \"'~', '*', '/', '[', or ']'\");\n }\n try {\n return new (FieldPath.bind.apply(FieldPath, [void 0].concat(path.split('.'))))();\n }\n catch (e) {\n throw new __WEBPACK_IMPORTED_MODULE_1__util_error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__util_error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\n \"begin with '.', end with '.', or contain '..'\");\n }\n}", "chain(type, pos, msg) {\n\t\tthrow new ParseError(type, pos, msg, this);\n\t}", "parse(message: string): ?string {\n message = GO_ERROR_PREFIX.exec(message)[MESSAGE_GROUP];\n return this.filter(message);\n }", "function genCatch(invMsg){\n if(!invMsg)\n return TRY_END; \n\n return TRY_END.replace('e.getMessage()', `${invMsg.endsWith(';') ? invMsg.split(';')[0] : invMsg }`); \n}", "makeError(message) {\n var _a;\n let msg = (_a = this.fileName) !== null && _a !== void 0 ? _a : \"\";\n if (this.trackPosition) {\n if (msg.length > 0) {\n msg += \":\";\n }\n msg += `${this.line}:${this.column}`;\n }\n if (msg.length > 0) {\n msg += \": \";\n }\n return new Error(msg + message);\n }", "function wrapTryCatch(newMethod, oldMethod, methodName) {\n return (function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n try {\n return newMethod.apply(void 0, __spread(args));\n }\n catch (e) {\n logger_1.logger.error(\"Error [\" + methodName + \"]: (\" + e.stack + \") \" + e.message, e);\n // Always return the old method if anything fails\n // Don't crash everything :-)\n return oldMethod === null || oldMethod === void 0 ? void 0 : oldMethod.apply(void 0, __spread(args));\n }\n });\n}", "function fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n if (found >= 0) {\n throw new __WEBPACK_IMPORTED_MODULE_1__util_error__[\"b\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__util_error__[\"a\" /* Code */].INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" +\n \"'~', '*', '/', '[', or ']'\");\n }\n try {\n return new (FieldPath.bind.apply(FieldPath, [void 0].concat(path.split('.'))))();\n }\n catch (e) {\n throw new __WEBPACK_IMPORTED_MODULE_1__util_error__[\"b\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__util_error__[\"a\" /* Code */].INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" +\n \"begin with '.', end with '.', or contain '..'\");\n }\n}", "function throwError(msg, loc, errorClass) {\n loc.source = loc.source || \"<unknown>\"; // FIXME -- we should have the source populated\n // rewrite a ColoredPart to match the format expected by the runtime\n function rewritePart(part){\n if(typeof(part) === 'string'){\n return part;\n } else if(part instanceof symbolExpr){\n return '[\"span\", [[\"class\", \"SchemeValue-Symbol\"]], '+part.val+']';\n return part.val;\n } else if(part.location !== undefined){\n return {text: part.text, type: 'ColoredPart', loc: part.location.toBytecode()\n , toString: function(){return part.text;}};\n } else if(part.locations !== undefined){\n return {text: part.text, type: 'MultiPart', solid: part.solid\n , locs: part.locations.map(function(l){return l.toBytecode()})\n , toString: function(){return part.text;}};\n }\n }\n \n msg.args = msg.args.map(rewritePart);\n \n var json = {type: \"moby-failure\"\n , \"dom-message\": [\"span\"\n ,[[\"class\", \"Error\"]]\n ,[\"span\"\n , [[\"class\", (errorClass || \"Message\")]]].concat(\n (errorClass? [[\"span\"\n , [[\"class\", \"Error.reason\"]]\n , msg.toString()]\n , [\"span\", [[\"class\", ((errorClass || \"message\")\n +((errorClass === \"Error-GenericReadError\")?\n \".locations\"\n :\".otherLocations\"))]]]]\n : msg.args.map(function(x){return x.toString();})))\n ,[\"br\", [], \"\"]\n ,[\"span\"\n , [[\"class\", \"Error.location\"]]\n , [\"span\"\n , [[\"class\", \"location-reference\"]\n , [\"style\", \"display:none\"]]\n , [\"span\", [[\"class\", \"location-offset\"]], (loc.offset+1).toString()]\n , [\"span\", [[\"class\", \"location-line\"]] , loc.sLine.toString()]\n , [\"span\", [[\"class\", \"location-column\"]], loc.sCol.toString()]\n , [\"span\", [[\"class\", \"location-span\"]] , loc.span.toString()]\n , [\"span\", [[\"class\", \"location-id\"]] , loc.source.toString()]\n ]\n ]\n ]\n , \"structured-error\": JSON.stringify({message: (errorClass? false : msg.args), location: loc.toBytecode() })\n };\n throw JSON.stringify(json);\n}", "function ParseException() {\r\n}", "function pluginErr(pi, msg)\n{\n\tvar str = _util.format.apply(_util, Array.prototype.slice.call(arguments, 1));\n\n\taddMsg(MSG_TYPE_ERROR, pi, str);\n}", "error(message, index = null) {\n this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));\n this.skip();\n }", "error(message, index = null) {\n this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));\n this.skip();\n }", "function MyError() {}", "function MyError() {}", "function TabControl_TabButton_ParseExceptionIntoText(strException, uidObject, style)\n{\n\t//initialise result\n\tvar result = \"\";\n\t//do we have style? with before image?\n\tif (style && !String_IsNullOrWhiteSpace(style.ImageBefore))\n\t{\n\t\t//add this first\n\t\tresult += \"<img style='vertical-align:middle' src='\" + __HOST_LESSON_RESOURCES + style.ImageBefore + \"'>\";\n\t}\n\t//process default value\n\tresult += strException.ToPlainText(uidObject).replace(/@(.+)@/gi, \"<img style='vertical-align:middle' src='\" + __HOST_LESSON_RESOURCES + \"$1'>\");\n\t//do we have style? with after image?\n\tif (style && !String_IsNullOrWhiteSpace(style.ImageAfter))\n\t{\n\t\t//add this last\n\t\tresult += \"<img style='vertical-align:middle' src='\" + __HOST_LESSON_RESOURCES + style.ImageAfter + \"'>\";\n\t}\n\t//return the result\n\treturn result;\n}", "function formatMessage(message, isError) {\n let lines = message.split('\\n');\n\n // Strip Webpack-added headers off errors/warnings\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n lines = lines.filter(line => !/Module [A-z ]+\\(from/.test(line));\n\n // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n lines = lines.map(line => {\n const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(\n line\n );\n if (!parsingError) {\n return line;\n }\n const [, errorLine, errorColumn, errorMessage] = parsingError;\n return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`;\n });\n\n message = lines.join('\\n');\n // Smoosh syntax errors (commonly found in CSS)\n message = message.replace(\n /SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g,\n `${friendlySyntaxErrorLabel} $3 ($1:$2)\\n`\n );\n // Remove columns from ESLint formatter output (we added these for more\n // accurate syntax errors)\n message = message.replace(/Line (\\d+):\\d+:/g, 'Line $1:');\n // Clean up export errors\n message = message.replace(\n /^.*export '(.+?)' was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$2'.`\n );\n message = message.replace(\n /^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$2' does not contain a default export (imported as '$1').`\n );\n message = message.replace(\n /^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`\n );\n lines = message.split('\\n');\n\n // Remove leading newline\n if (lines.length > 2 && lines[1].trim() === '') {\n lines.splice(1, 1);\n }\n // Clean up file name\n lines[0] = lines[0].replace(/^(.*) \\d+:\\d+-\\d+$/, '$1');\n\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1] && lines[1].indexOf('Module not found: ') === 0) {\n lines = [\n lines[0],\n lines[1]\n .replace('Error: ', '')\n .replace('Module not found: Cannot find file:', 'Cannot find file:'),\n ];\n }\n\n // Add helpful message for users trying to use Sass for the first time\n if (lines[1] && lines[1].match(/Cannot find module.+node-sass/)) {\n lines[1] = 'To import Sass files, you first need to install node-sass.\\n';\n lines[1] +=\n 'Run `npm install node-sass` or `yarn add node-sass` inside your workspace.';\n }\n\n lines[0] = chalk.inverse(lines[0]);\n\n message = lines.join('\\n');\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by Webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n message = message.replace(\n /^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm,\n ''\n ); // at ... ...:x:y\n message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, ''); // at <anonymous>\n lines = message.split('\\n');\n\n // Remove duplicated newlines\n lines = lines.filter(\n (line, index, arr) =>\n index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()\n );\n\n // Reassemble the message\n message = lines.join('\\n');\n return message.trim();\n}", "function pluginError (message) {\n return new PluginError('gulp-join-data', message);\n}", "function throwError() {\n throw new Error('Malicious method invoked.');\n}", "raise ( message, pos ) {\n\t\tconst err = new Error( this.sourceLocation( pos ) + ': ' + message );\n\t\terr.pos = this.completePosition( this.createPosition() );\n\t\tthrow err;\n\t}", "handleCallError(errs, url, method) {\n // TODO: probably we need some logger, now it's just logging to console\n console.log(`Failed calling ${method} for URL:`, url);\n console.log(`Reason:`, errs);\n }", "function evalError(call, message) {\n var e = new Error(message);\n e.call = call;\n return e;\n}", "error(...args) {\n }", "function raise(message) {\n var parameters = [];\n if(arguments.length > 1) {\n parameters = Array.prototype.slice.call(arguments, 1);\n }\n var err = this.error.apply(this, [message].concat(parameters));\n this.errors.push(err);\n return err;\n}", "[custom]() {\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(this)}`;\n }", "[custom]() {\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(this)}`;\n }", "[custom]() {\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(this)}`;\n }", "function frameError(err, str) {\n var stringParts = [\n str.slice(0, err.pos),\n '<span class=\"error\">',\n str.slice(err.pos, err.pos + err.extent),\n '</span>',\n str.slice(err.pos + err.extent),\n ];\n return stringParts.join(\"\");\n}", "errorMessage(locator)\n {\n cy.log(locator);\n let errorPanel = cy.get(locator);\n cy.log(errorPanel);\n let messageElement = errorPanel.get('li');\n cy.log(messageElement);\n cy.log('started');\n cy.log(messageElement.invoke('text'));\n return messageElement.invoke('text');\n }", "function $ERROR (str) {\n try {\n __$ERROR__ = __$ERROR__ + \" | \" + str\n }\n catch(ex) {\n __$ERROR__ = str\n }\n}", "unexpected(pos, messageOrType) {\n if (messageOrType == null) messageOrType = 'Unexpected token';\n if (typeof messageOrType !== 'string') messageOrType = `Unexpected token, expected \"${messageOrType.label}\"`;\n throw this.raise(pos != null ? pos : this.state.start, messageOrType);\n }", "function MyException(message){exception(this);}", "function error(message) {\n throw message;\n}", "addError(message, obj = {}) {\n\n obj.path = Object.assign([], this.path);\n\n if (obj.field !== undefined)\n obj.path.push(obj.field);\n\n if (obj.index !== undefined)\n obj.path.push(obj.index);\n\n obj.path = obj.path.join('.');\n\n message = format(message, obj);\n\n if (this.errors.message === '')\n this.errors.message = message;\n\n if (obj.field === undefined) return;\n\n this.errors.fields.push({\n path: obj.path,\n message,\n field: obj.field,\n type: this.model[obj.field].type\n });\n\n if (be.function(this.model[obj.field].onError)) {\n this.model[obj.field].onError.call(this, message);\n }\n }", "function ParserError(e,t){this.message=e,this.error=t}", "_error(msg) {\n msg += ` (${this._errorPostfix})`;\n const e = new Error(msg);\n return e;\n }", "function errorPrefix(fnName, argName) {\n return fnName + \" failed: \" + argName + \" argument \";\n}", "function errorPrefix(fnName, argName) {\n return fnName + \" failed: \" + argName + \" argument \";\n}", "function errorPrefix(fnName, argName) {\n return fnName + \" failed: \" + argName + \" argument \";\n}", "function parseError(text, token)\n{\n error('parse error: ' + text + ' ' + token.pos);\n}", "textForApiErrorCode(message) {\n\n if (message == undefined) {\n return getTranslatedMessage(\"site_err_occupied\");\n }\n if (message.indexOf(\"the request transport encountered an error communicating with Stitch: Network request failed\") != -1) {\n return getTranslatedMessage(\"site_err_no_internet\");\n }\n if (message.indexOf(\"method called requires being authenticated\") != -1) {\n return getTranslatedMessage(\"site_err_expired_session\");\n }\n if (message.indexOf(\"invalid username/password\") != -1) {\n return getTranslatedMessage(\"site_err_credentials\");\n }\n if (message.indexOf(\"failed to confirm user\") != -1) {\n return getTranslatedMessage(\"site_err_invalid_user\");\n }\n if (message.indexOf(\"password must be between 6 and 128 characters\") != -1) {\n return getTranslatedMessage(\"site_err_password_size\");\n }\n if (message.indexOf(\"name already in use\") != -1) {\n return getTranslatedMessage(\"site_err_user_already_exists\");\n }\n if (message.indexOf(\"invalid token data\") != -1) {\n return getTranslatedMessage(\"site_err_invalid_token\");\n }\n if (message.indexOf(\"already confirmed\") != -1) {\n return getTranslatedMessage(\"site_err_email_already_registered\");\n }\n if (message.indexOf(\"userpass token is expired or invalid\") != -1) {\n return getTranslatedMessage(\"site_err_expired_token\");\n }\n if (message.indexOf(\"user not found\") != -1) {\n return getTranslatedMessage(\"site_err_user_not_exists\");\n }\n if (message.indexOf(\"bad argument\") != -1) {\n return getTranslatedMessage(\"site_err_bad_request\");\n }\n\n return getTranslatedMessage(\"site_err_unknown_error\") + \" (\" + message + \")\";\n }", "function ParseError(message, hash) {\n _.extend(this, hash);\n\n this.name = 'ParseError';\n this.message = (message || '');\n}", "function ExpectedError(message) {\n this.message = message || \"\";\n}", "function error(m) {\n\t\t var i, col=0, line=1;\n\t\t for (i = at-1; i > 0 && text[i] !== '\\n'; i--, col++) {}\n\t\t for (; i > 0; i--) if (text[i] === '\\n') line++;\n\t\t throw new Error(m + \" at line \" + line + \",\" + col + \" >>>\" + text.substr(at-col, 20) + \" ...\");\n\t\t }", "function error(line, message) {\n return CIFTools.ParserResult.error(message, line);\n }", "function parseException(message, cmdArgs, index){\n this.message = message;\n this.cmdArgs = cmdArgs;\n this.index = index;\n}", "function _makeErrorFunc(msg){\n\treturn function(){\n\t\tthrow Error(msg);\n\t};\n}", "function caml_invalid_argument (msg) {\n caml_raise_with_string(caml_global_data[4], msg);\n}", "function Lo(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function Lo(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function Lo(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function caml_string_bound_error () {\n caml_invalid_argument (\"index out of bounds\");\n}", "function throwStyledComponentsError(code) {\n for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n if (false) {} else {\n throw new Error(format.apply(void 0, [ERRORS[code]].concat(interpolations)).trim());\n }\n}", "function throwStyledComponentsError(code) {\n for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n if (false) {} else {\n throw new Error(format.apply(void 0, [ERRORS[code]].concat(interpolations)).trim());\n }\n}", "function throwStyledComponentsError(code) {\n for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n if (false) {} else {\n throw new Error(format.apply(void 0, [ERRORS[code]].concat(interpolations)).trim());\n }\n}", "function throwStyledComponentsError(code) {\n for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n if (false) {} else {\n throw new Error(format.apply(void 0, [ERRORS[code]].concat(interpolations)).trim());\n }\n}", "function DieValueError(message) {\n this.name = 'DieValueError';\n this.message = (message || \"\");\n }", "function JanusFireboxParserException(msg) {\n this.message = msg;\n}", "error(text, dismissable = false){\n this.message(text, 'error', dismissable);\n }", "function showError(type, text) {}", "function fromDotSeparatedString(path) {\n var found = path.search(RESERVED);\n\n if (found >= 0) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not contain \" + \"'~', '*', '/', '[', or ']'\");\n }\n\n try {\n return new (FieldPath$1.bind.apply(FieldPath$1, tslib.__spreadArrays([void 0], path.split('.'))))();\n } catch (e) {\n throw new FirestoreError(Code.INVALID_ARGUMENT, \"Invalid field path (\" + path + \"). Paths must not be empty, \" + \"begin with '.', end with '.', or contain '..'\");\n }\n }", "function formatSyntaxError(err, filePath) {\n if ( !err.name || err.name !== 'SyntaxError') {\n return err;\n }\n\n var unexpected = err.found ? \"'\" + err.found + \"'\" : \"end of file\";\n var errString = \"Unexpected \" + unexpected;\n var lineInfo = \":\" + err.line + \":\" + err.column;\n\n return new Error((filePath || 'string') + lineInfo + \": \" + errString);\n}", "error(error) {}", "function error(message){\n throw new TypeError(message);\n }", "function textExceptionThrow(text, from, message) {\n if ( !optionsGlobal.isProduction ) {\n\n var line = exceptionHeader(that.library);\n\n var startLine = text.lastIndexOf(\"\\n\", from) + 1;\n var endLine = text.indexOf(\"\\n\", from);\n endLine = endLine > -1 ? endLine : text.length;\n\n var row = text.substring(startLine, endLine);\n var rows = text.split(\"\\n\"); // Split each token, string to char array\n\n // Find the rowIndex\n for ( var rowIndex = 0; rowIndex < rows.length; rowIndex++ ) {\n if ( rows[rowIndex] == row ) {\n break;\n }\n }\n\n var tokenIndex = from - startLine; // From start up to the token\n\n rows.splice(rowIndex, 0, line);\n rows.splice(rowIndex+2, 0, line);\n\n throw str(\n \"\\n\", line,\n \"\\nMoCP: Exception on (line, token) : (\", rowIndex + 1, \", \", tokenIndex + 1,\") \\n\",\n \"Message:\\n \", message,\n \"\\n\", line,\n \"\\n\\n\",\n rows.join(\"\\n\")\n );\n }\n\n }", "function parseError(input, contents, err) {\n var errLines = err.message.split(\"\\n\");\n var lineNumber = (errLines.length > 0? errLines[0].substring(errLines[0].indexOf(\":\") + 1) : 0);\n var lines = contents.split(\"\\n\", lineNumber);\n return {\n message: err.name + \": \" + (errLines.length > 2? errLines[errLines.length - 2] : err.message),\n severity: \"error\",\n lineNumber: lineNumber,\n characterOffset: 0,\n lineContent: (lineNumber > 0 && lines.length >= lineNumber? lines[lineNumber - 1] : \"Unknown line\"),\n source: input\n };\n}", "function Mo(t){return Object.prototype.toString.call(t).indexOf(\"Error\")>-1}", "static applyWithError(func, verify) {\n return (expression, state, options) => {\n let value;\n const { args, error: childrenError } = FunctionUtils.evaluateChildren(expression, state, options, verify);\n let error = childrenError;\n if (!error) {\n try {\n ({ value, error } = func(args));\n }\n catch (e) {\n error = e.message;\n }\n }\n return { value, error };\n };\n }", "function _incorrectField(field, provided) {\n return `There was a problem with the ${field} you provided. Please change this from \"${provided}\" and try again.`;\n}", "function error() {\n _error.apply(null, utils.toArray(arguments));\n }", "function makeError (message) {\n const ret = Error(message);\n const stack = ret.stack.split(/\\n/)\n ret.stack = stack.slice(0, 2).join(\"\\n\");\n return ret;\n}" ]
[ "0.55404127", "0.5535818", "0.5535818", "0.54476184", "0.544033", "0.544033", "0.544033", "0.5408289", "0.540814", "0.540814", "0.540814", "0.53779423", "0.532357", "0.52187175", "0.520455", "0.5187823", "0.518635", "0.518081", "0.51455814", "0.5142097", "0.50914276", "0.5071425", "0.50620127", "0.50528824", "0.5035577", "0.5021158", "0.4999395", "0.49943346", "0.49888015", "0.49789724", "0.49789724", "0.4966173", "0.49613866", "0.49545237", "0.49504492", "0.49491978", "0.4940998", "0.49276835", "0.49099508", "0.49068826", "0.4889113", "0.4889113", "0.48849282", "0.48849282", "0.48802912", "0.487502", "0.4863201", "0.48575747", "0.4853664", "0.48522127", "0.48517323", "0.48478368", "0.48470458", "0.48455307", "0.48455307", "0.48455307", "0.48386514", "0.4832617", "0.4826679", "0.48242468", "0.48234597", "0.4820397", "0.47936845", "0.4777686", "0.47674784", "0.47612277", "0.47612277", "0.47612277", "0.47480398", "0.47403514", "0.47372445", "0.47195274", "0.4718111", "0.47180408", "0.47025433", "0.46942946", "0.46928096", "0.46920425", "0.46920425", "0.46920425", "0.46916226", "0.46848953", "0.46848953", "0.46848953", "0.46848953", "0.46786323", "0.46616858", "0.4650693", "0.46483415", "0.4647939", "0.46454775", "0.46254218", "0.46237168", "0.46224102", "0.46208495", "0.46188784", "0.46161664", "0.4604226", "0.4596384", "0.45954934" ]
0.52892023
13
TODO(2018/11/01): As of 2018/04/17 we're changing docChanges from an array into a method. Because this is a runtime breaking change and somewhat subtle (both Array and Function have a .length, etc.), we'll replace commonlyused properties (including Symbol.iterator) to throw a custom error message. In ~6 months we can delete the custom error as most folks will have hopefully migrated.
function throwDocChangesMethodError(){throw new index_esm_FirestoreError(Code.INVALID_ARGUMENT,'QuerySnapshot.docChanges has been changed from a property into a '+'method, so usages like "querySnapshot.docChanges" should become '+'"querySnapshot.docChanges()"');}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function throwDocChangesMethodError() {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'QuerySnapshot.docChanges has been changed from a property into a ' + 'method, so usages like \"querySnapshot.docChanges\" should become ' + '\"querySnapshot.docChanges()\"');\n }", "function throwDocChangesMethodError() {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'QuerySnapshot.docChanges has been changed from a property into a ' + 'method, so usages like \"querySnapshot.docChanges\" should become ' + '\"querySnapshot.docChanges()\"');\n}", "function throwDocChangesMethodError() {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'QuerySnapshot.docChanges has been changed from a property into a ' +\n 'method, so usages like \"querySnapshot.docChanges\" should become ' +\n '\"querySnapshot.docChanges()\"');\n}", "function throwDocChangesMethodError() {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'QuerySnapshot.docChanges has been changed from a property into a ' +\n 'method, so usages like \"querySnapshot.docChanges\" should become ' +\n '\"querySnapshot.docChanges()\"');\n}", "function throwDocChangesMethodError() {\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'QuerySnapshot.docChanges has been changed from a property into a ' +\r\n 'method, so usages like \"querySnapshot.docChanges\" should become ' +\r\n '\"querySnapshot.docChanges()\"');\r\n}", "function throwDocChangesMethodError() {\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'QuerySnapshot.docChanges has been changed from a property into a ' +\r\n 'method, so usages like \"querySnapshot.docChanges\" should become ' +\r\n '\"querySnapshot.docChanges()\"');\r\n}", "function throwDocChangesMethodError() {\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'QuerySnapshot.docChanges has been changed from a property into a ' +\r\n 'method, so usages like \"querySnapshot.docChanges\" should become ' +\r\n '\"querySnapshot.docChanges()\"');\r\n}", "function findArgChanges(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var breakingChanges = [];\n var dangerousChanges = [];\n\n var _arr3 = Object.keys(oldTypeMap);\n\n for (var _i3 = 0; _i3 < _arr3.length; _i3++) {\n var typeName = _arr3[_i3];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!(Object(_type_definition__WEBPACK_IMPORTED_MODULE_1__[\"isObjectType\"])(oldType) || Object(_type_definition__WEBPACK_IMPORTED_MODULE_1__[\"isInterfaceType\"])(oldType)) || !(Object(_type_definition__WEBPACK_IMPORTED_MODULE_1__[\"isObjectType\"])(newType) || Object(_type_definition__WEBPACK_IMPORTED_MODULE_1__[\"isInterfaceType\"])(newType)) || newType.constructor !== oldType.constructor) {\n continue;\n }\n\n var oldTypeFields = oldType.getFields();\n var newTypeFields = newType.getFields();\n\n var _arr4 = Object.keys(oldTypeFields);\n\n for (var _i4 = 0; _i4 < _arr4.length; _i4++) {\n var fieldName = _arr4[_i4];\n\n if (!newTypeFields[fieldName]) {\n continue;\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n var _loop = function _loop() {\n var oldArgDef = _step.value;\n var newArgs = newTypeFields[fieldName].args;\n var newArgDef = Object(_polyfills_find__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(newArgs, function (arg) {\n return arg.name === oldArgDef.name;\n }); // Arg not present\n\n if (!newArgDef) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_REMOVED,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" was removed\")\n });\n } else {\n var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArgDef.type, newArgDef.type);\n\n if (!isSafe) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_CHANGED_KIND,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" has changed type from \") + \"\".concat(oldArgDef.type.toString(), \" to \").concat(newArgDef.type.toString())\n });\n } else if (oldArgDef.defaultValue !== undefined && oldArgDef.defaultValue !== newArgDef.defaultValue) {\n dangerousChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" has changed defaultValue\")\n });\n }\n }\n };\n\n for (var _iterator = oldTypeFields[fieldName].args[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n _loop();\n } // Check if arg was added to the field\n\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n var _loop2 = function _loop2() {\n var newArgDef = _step2.value;\n var oldArgs = oldTypeFields[fieldName].args;\n var oldArgDef = Object(_polyfills_find__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(oldArgs, function (arg) {\n return arg.name === newArgDef.name;\n });\n\n if (!oldArgDef) {\n var argName = newArgDef.name;\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_1__[\"isRequiredArgument\"])(newArgDef)) {\n breakingChanges.push({\n type: BreakingChangeType.REQUIRED_ARG_ADDED,\n description: \"A required arg \".concat(argName, \" on \") + \"\".concat(typeName, \".\").concat(fieldName, \" was added\")\n });\n } else {\n dangerousChanges.push({\n type: DangerousChangeType.OPTIONAL_ARG_ADDED,\n description: \"An optional arg \".concat(argName, \" on \") + \"\".concat(typeName, \".\").concat(fieldName, \" was added\")\n });\n }\n }\n };\n\n for (var _iterator2 = newTypeFields[fieldName].args[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n _loop2();\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n }\n\n return {\n breakingChanges: breakingChanges,\n dangerousChanges: dangerousChanges\n };\n}", "function docFromChanges(options, changes) {\n const doc = init(options)\n const [state, _] = Backend.applyChanges(Backend.init(), changes)\n const patch = Backend.getPatch(state)\n patch.state = state\n return Frontend.applyPatch(doc, patch)\n}", "get docChanged() { return !this.changes.empty; }", "function getDocs(fn) {\n let msg = \"API documentation\\n\" + \"-----------------\\n\";\n for(let idx in fn.__metadata) {\n const methodDefinition = fn.__metadata[idx];\n if(!methodDefinition.returnType) {\n methodDefinition.returnType = 'unknown';\n }\n let apifn = \"* \" + methodDefinition.name + '(' + generateParamList(methodDefinition) + ') => ' + methodDefinition.returnType + '\\n';\n apifn += methodDefinition.description + '\\n';\n apifn += generateParamDocs(methodDefinition);\n msg += apifn + '\\n\\n';\n }\n return msg;\n }", "function findArgChanges(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n\n var breakingChanges = [];\n var dangerousChanges = [];\n\n Object.keys(oldTypeMap).forEach(function (typeName) {\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n if (!(oldType instanceof _definition.GraphQLObjectType || oldType instanceof _definition.GraphQLInterfaceType) || !(newType instanceof oldType.constructor)) {\n return;\n }\n\n var oldTypeFields = oldType.getFields();\n var newTypeFields = newType.getFields();\n\n Object.keys(oldTypeFields).forEach(function (fieldName) {\n if (!newTypeFields[fieldName]) {\n return;\n }\n\n oldTypeFields[fieldName].args.forEach(function (oldArgDef) {\n var newArgs = newTypeFields[fieldName].args;\n var newArgDef = newArgs.find(function (arg) {\n return arg.name === oldArgDef.name;\n });\n\n // Arg not present\n if (!newArgDef) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_REMOVED,\n description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' was removed')\n });\n } else {\n var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArgDef.type, newArgDef.type);\n if (!isSafe) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_CHANGED_KIND,\n description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' has changed type from ') + (oldArgDef.type.toString() + ' to ' + newArgDef.type.toString())\n });\n } else if (oldArgDef.defaultValue !== undefined && oldArgDef.defaultValue !== newArgDef.defaultValue) {\n dangerousChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' has changed defaultValue')\n });\n }\n }\n });\n // Check if a non-null arg was added to the field\n newTypeFields[fieldName].args.forEach(function (newArgDef) {\n var oldArgs = oldTypeFields[fieldName].args;\n var oldArgDef = oldArgs.find(function (arg) {\n return arg.name === newArgDef.name;\n });\n if (!oldArgDef && newArgDef.type instanceof _definition.GraphQLNonNull) {\n breakingChanges.push({\n type: BreakingChangeType.NON_NULL_ARG_ADDED,\n description: 'A non-null arg ' + newArgDef.name + ' on ' + (newType.name + '.' + fieldName + ' was added')\n });\n }\n });\n });\n });\n\n return {\n breakingChanges: breakingChanges,\n dangerousChanges: dangerousChanges\n };\n}", "function findArgChanges(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n\n var breakingChanges = [];\n var dangerousChanges = [];\n\n Object.keys(oldTypeMap).forEach(function (typeName) {\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n if (!(oldType instanceof _definition.GraphQLObjectType || oldType instanceof _definition.GraphQLInterfaceType) || !(newType instanceof oldType.constructor)) {\n return;\n }\n\n var oldTypeFields = oldType.getFields();\n var newTypeFields = newType.getFields();\n\n Object.keys(oldTypeFields).forEach(function (fieldName) {\n if (!newTypeFields[fieldName]) {\n return;\n }\n\n oldTypeFields[fieldName].args.forEach(function (oldArgDef) {\n var newArgs = newTypeFields[fieldName].args;\n var newArgDef = newArgs.find(function (arg) {\n return arg.name === oldArgDef.name;\n });\n\n // Arg not present\n if (!newArgDef) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_REMOVED,\n description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' was removed')\n });\n } else {\n var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArgDef.type, newArgDef.type);\n if (!isSafe) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_CHANGED_KIND,\n description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' has changed type from ') + (oldArgDef.type.toString() + ' to ' + newArgDef.type.toString())\n });\n } else if (oldArgDef.defaultValue !== undefined && oldArgDef.defaultValue !== newArgDef.defaultValue) {\n dangerousChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' has changed defaultValue')\n });\n }\n }\n });\n // Check if a non-null arg was added to the field\n newTypeFields[fieldName].args.forEach(function (newArgDef) {\n var oldArgs = oldTypeFields[fieldName].args;\n var oldArgDef = oldArgs.find(function (arg) {\n return arg.name === newArgDef.name;\n });\n if (!oldArgDef && newArgDef.type instanceof _definition.GraphQLNonNull) {\n breakingChanges.push({\n type: BreakingChangeType.NON_NULL_ARG_ADDED,\n description: 'A non-null arg ' + newArgDef.name + ' on ' + (newType.name + '.' + fieldName + ' was added')\n });\n }\n });\n });\n });\n\n return {\n breakingChanges: breakingChanges,\n dangerousChanges: dangerousChanges\n };\n}", "function getDocs(fn) {\n var msg = \"API documentation\\n\" +\n \"-----------------\\n\";\n for (var idx in fn.__metadata) {\n var methodDefinition = fn.__metadata[idx];\n if (!methodDefinition.returnType) {\n methodDefinition.returnType = 'unknown';\n }\n var apifn = \"* \" + methodDefinition.name + '(' + generateParamList(methodDefinition) + ') => ' + methodDefinition.returnType + '\\n';\n apifn += methodDefinition.description + '\\n';\n apifn += generateParamDocs(methodDefinition);\n msg += apifn + '\\n\\n';\n }\n return msg;\n }", "function invalidClassError(functionName,type,position,argument){var description=valueDescription(argument);return new index_esm_FirestoreError(Code.INVALID_ARGUMENT,\"Function \"+functionName+\"() requires its \"+ordinal(position)+\" \"+(\"argument to be a \"+type+\", but it was: \"+description));}", "function getDiffs(oldDoc, newDoc) {\n const changes = new Array();\n const flatOld = flattenObject(oldDoc);\n const flatNew = flattenObject(newDoc);\n // find deleted nodes\n Object.keys(flatOld).forEach(key => {\n if (!Object.prototype.hasOwnProperty.call(flatNew, key)) {\n changes.push({\n action: 'DELETED',\n keyName: key,\n });\n }\n });\n // find added nodes\n Object.keys(flatNew).forEach(key => {\n if (!Object.prototype.hasOwnProperty.call(flatOld, key)) {\n changes.push({\n action: 'ADDED',\n keyName: key,\n });\n }\n });\n // find updated nodes\n Object.keys(flatOld).forEach(key => {\n let oldValue = flatOld[key];\n if (Array.isArray(oldValue)) {\n oldValue = oldValue.join(', ');\n }\n let newValue = flatNew[key];\n if (newValue) {\n if (Array.isArray(newValue)) {\n newValue = newValue.join(', ');\n }\n if (newValue !== oldValue && key !== 'revision' && key !== 'etag') {\n changes.push({\n action: 'CHANGED',\n keyName: key,\n });\n }\n }\n });\n return changes;\n}", "get docChanged() {\n return !this.changes.empty;\n }", "function addInspectMethod(newError) {\n // @ts-expect-error - TypeScript doesn't support symbol indexers\n newError[inspectMethod] = inspect;\n}", "static documentClass() {\n throw new TypeError('You must override documentClass (static).');\n }", "function IterableChangeRecord() {}", "function IterableChangeRecord() {}", "function IterableChangeRecord() {}", "static documentClass() {\n throw new TypeError('You must override documentClass (static).');\n }", "function docChanges(query, scheduler) {\n return fromCollectionRef(query, scheduler)\n .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"startWith\"])(undefined), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"pairwise\"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(([priorAction, action]) => {\n const docChanges = action.payload.docChanges();\n const actions = docChanges.map(change => ({ type: change.type, payload: change }));\n // the metadata has changed from the prior emission\n if (priorAction && JSON.stringify(priorAction.payload.metadata) !== JSON.stringify(action.payload.metadata)) {\n // go through all the docs in payload and figure out which ones changed\n action.payload.docs.forEach((currentDoc, currentIndex) => {\n const docChange = docChanges.find(d => d.doc.ref.isEqual(currentDoc.ref));\n const priorDoc = priorAction === null || priorAction === void 0 ? void 0 : priorAction.payload.docs.find(d => d.ref.isEqual(currentDoc.ref));\n if (docChange && JSON.stringify(docChange.doc.metadata) === JSON.stringify(currentDoc.metadata) ||\n !docChange && priorDoc && JSON.stringify(priorDoc.metadata) === JSON.stringify(currentDoc.metadata)) {\n // document doesn't appear to have changed, don't log another action\n }\n else {\n // since the actions are processed in order just push onto the array\n actions.push({\n type: 'modified',\n payload: {\n oldIndex: currentIndex,\n newIndex: currentIndex,\n type: 'modified',\n doc: currentDoc\n }\n });\n }\n });\n }\n return actions;\n }));\n}", "constructor(doc) {\n _defineProperty(this, \"mutations\", void 0);\n\n _defineProperty(this, \"document\", void 0);\n\n _defineProperty(this, \"LOCAL\", void 0);\n\n _defineProperty(this, \"commits\", void 0);\n\n _defineProperty(this, \"buffer\", void 0);\n\n _defineProperty(this, \"onMutation\", void 0);\n\n _defineProperty(this, \"onRebase\", void 0);\n\n _defineProperty(this, \"onDelete\", void 0);\n\n _defineProperty(this, \"commitHandler\", void 0);\n\n _defineProperty(this, \"committerRunning\", void 0);\n\n _defineProperty(this, \"onConsistencyChanged\", void 0);\n\n this.buffer = new _SquashingBuffer.default(doc);\n this.document = new _Document.default(doc);\n\n this.document.onMutation = msg => this.handleDocMutation(msg);\n\n this.document.onRebase = (msg, remoteMutations, localMutations) => this.handleDocRebase(msg, remoteMutations, localMutations);\n\n this.document.onConsistencyChanged = msg => this.handleDocConsistencyChanged(msg);\n\n this.LOCAL = doc;\n this.mutations = [];\n this.commits = [];\n }", "function IterableChanges(){}", "function IterableChangeRecord() { }", "function IterableChangeRecord() { }", "function handleDocMutation (method, path, args, out, ns, callbacks) {\n // Or directly on the path to a document that is an immediate child of the namespace\n if (path.substring(ns.length + 1).indexOf('.') !== -1) return false;\n\n // The mutation can:\n switch (method) {\n // (1) remove the document\n case 'del':\n callbacks.onRmDoc(out);\n break;\n\n // (2) add or over-write the document with a new version of the document\n case 'set':\n case 'setNull':\n callbacks.onAddDoc(args[1], out);\n break;\n\n default:\n throw new Error('Uncaught edge case');\n }\n return true;\n}", "function findDangerousChanges(oldSchema, newSchema) {\n return [].concat(findArgChanges(oldSchema, newSchema).dangerousChanges, findValuesAddedToEnums(oldSchema, newSchema), findInterfacesAddedToObjectTypes(oldSchema, newSchema), findTypesAddedToUnions(oldSchema, newSchema), findFieldsThatChangedTypeOnInputObjectTypes(oldSchema, newSchema).dangerousChanges);\n}", "function IterableChanges() {}", "function IterableChanges() {}", "function IterableChanges() {}", "function deprecatedWarning(oldMethodCall, newMethodCall) {\n // eslint-disable-next-line no-console\n console.warn('WARNING: ' + oldMethodCall + ' will be deprecated soon! Please use ' + newMethodCall + ' instead.');\n}", "function findDangerousChanges(oldSchema, newSchema) {\n return [].concat(findArgChanges(oldSchema, newSchema).dangerousChanges);\n}", "function IterableChanges() { }", "function IterableChanges() { }", "apply(doc) {\n if (this.length != doc.length)\n throw new RangeError(\"Applying change set to a document with the wrong length\");\n iterChanges(this, (fromA, toA, fromB, _toB, text) => doc = doc.replace(fromB, fromB + (toA - fromA), text), false);\n return doc;\n }", "function IterableChangeRecord(){}", "function iterateFunc(doc){cov_20g0dos6ux().f[0]++;cov_20g0dos6ux().s[9]++;console.log(JSON.stringify(doc,null,4));}", "function deprecatedWarning(oldMethodCall, newMethodCall) {\n\t // eslint-disable-next-line no-console\n\t console.warn('WARNING: ' + oldMethodCall + ' will be deprecated soon! Please use ' + newMethodCall + ' instead.');\n\t}", "function findDangerousChanges(oldSchema, newSchema) {\n return [].concat(findArgChanges(oldSchema, newSchema).dangerousChanges, findValuesAddedToEnums(oldSchema, newSchema), findTypesAddedToUnions(oldSchema, newSchema));\n}", "function findBreakingChanges(oldSchema, newSchema) {\n return [].concat(findRemovedTypes(oldSchema, newSchema), findTypesThatChangedKind(oldSchema, newSchema), findFieldsThatChangedTypeOnObjectOrInterfaceTypes(oldSchema, newSchema), findFieldsThatChangedTypeOnInputObjectTypes(oldSchema, newSchema).breakingChanges, findTypesRemovedFromUnions(oldSchema, newSchema), findValuesRemovedFromEnums(oldSchema, newSchema), findArgChanges(oldSchema, newSchema).breakingChanges, findInterfacesRemovedFromObjectTypes(oldSchema, newSchema), findRemovedDirectives(oldSchema, newSchema), findRemovedDirectiveArgs(oldSchema, newSchema), findAddedNonNullDirectiveArgs(oldSchema, newSchema), findRemovedDirectiveLocations(oldSchema, newSchema));\n}", "function checkDocument(doc) {\n if (doc.kind !== 'Document') {\n throw new Error(\"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\");\n }\n var operations = doc.definitions.filter(function (d) {\n return d.kind !== 'FragmentDefinition';\n }).map(function (definition) {\n if (definition.kind !== 'OperationDefinition') {\n throw new Error(\"Schema type definitions not allowed in queries. Found: \\\"\" + definition.kind + \"\\\"\");\n }\n return definition;\n });\n if (operations.length > 1) {\n throw new Error(\"Ambiguous GraphQL document: contains \" + operations.length + \" operations\");\n }\n}", "function checkDocument(doc) {\n if (doc.kind !== 'Document') {\n throw new Error(\"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\");\n }\n var operations = doc.definitions.filter(function (d) {\n return d.kind !== 'FragmentDefinition';\n }).map(function (definition) {\n if (definition.kind !== 'OperationDefinition') {\n throw new Error(\"Schema type definitions not allowed in queries. Found: \\\"\" + definition.kind + \"\\\"\");\n }\n return definition;\n });\n if (operations.length > 1) {\n throw new Error(\"Ambiguous GraphQL document: contains \" + operations.length + \" operations\");\n }\n}", "async _checkMagik(doc) {\n if (!vscode.workspace.getConfiguration('magik-vscode').enableLinting)\n return;\n\n await this.symbolProvider.loadSymbols();\n\n const isConsole = this.magikVSCode.magikConsole.isConsoleDoc(doc);\n\n const diagnostics = [];\n const methodNames = {};\n const symbols = this.magikVSCode.currentSymbols;\n const symbolsLength = symbols.length;\n\n for (let i = 0; i < symbolsLength; i++) {\n const sym = symbols[i];\n\n if (sym.kind === vscode.SymbolKind.Method) {\n const startLine = sym.location.range.start.line;\n const region = MagikUtils.currentRegion(true, startLine);\n const {lines} = region;\n\n if (lines) {\n const {firstRow} = region;\n const assignedVars = MagikVar.getVariables(\n lines,\n firstRow,\n this.symbolProvider.classNames,\n this.symbolProvider.classData,\n this.symbolProvider.globalNames,\n diagnostics\n );\n this._checkUnusedVariables(assignedVars, diagnostics);\n this._checkClassNameVariables(assignedVars, diagnostics);\n // eslint-disable-next-line\n await this._checkMethodCalls(\n lines,\n firstRow,\n assignedVars,\n methodNames,\n diagnostics\n );\n\n if (!isConsole) {\n this._checkPublicComment(doc, lines, firstRow, diagnostics);\n this._checkMethodComplexity(lines, firstRow, diagnostics);\n this._checkMethodLength(lines, firstRow, diagnostics);\n }\n }\n }\n }\n\n this.diagnosticCollection.set(doc.uri, diagnostics);\n }", "function checkDocument(doc) {\n if (doc.kind !== 'Document') {\n throw new Error(\"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\");\n }\n var operations = doc.definitions\n .filter(function (d) { return d.kind !== 'FragmentDefinition'; })\n .map(function (definition) {\n if (definition.kind !== 'OperationDefinition') {\n throw new Error(\"Schema type definitions not allowed in queries. Found: \\\"\" + definition.kind + \"\\\"\");\n }\n return definition;\n });\n if (operations.length > 1) {\n throw new Error(\"Ambiguous GraphQL document: contains \" + operations.length + \" operations\");\n }\n}", "function checkDocument(doc) {\n if (doc.kind !== 'Document') {\n throw new Error(\"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\");\n }\n var operations = doc.definitions\n .filter(function (d) { return d.kind !== 'FragmentDefinition'; })\n .map(function (definition) {\n if (definition.kind !== 'OperationDefinition') {\n throw new Error(\"Schema type definitions not allowed in queries. Found: \\\"\" + definition.kind + \"\\\"\");\n }\n return definition;\n });\n if (operations.length > 1) {\n throw new Error(\"Ambiguous GraphQL document: contains \" + operations.length + \" operations\");\n }\n}", "function checkDocument(doc) {\n if (doc.kind !== 'Document') {\n throw new Error(\"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\");\n }\n var operations = doc.definitions\n .filter(function (d) { return d.kind !== 'FragmentDefinition'; })\n .map(function (definition) {\n if (definition.kind !== 'OperationDefinition') {\n throw new Error(\"Schema type definitions not allowed in queries. Found: \\\"\" + definition.kind + \"\\\"\");\n }\n return definition;\n });\n if (operations.length > 1) {\n throw new Error(\"Ambiguous GraphQL document: contains \" + operations.length + \" operations\");\n }\n}", "function checkDocument(doc) {\n if (doc.kind !== 'Document') {\n throw new Error(\"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\");\n }\n var operations = doc.definitions\n .filter(function (d) { return d.kind !== 'FragmentDefinition'; })\n .map(function (definition) {\n if (definition.kind !== 'OperationDefinition') {\n throw new Error(\"Schema type definitions not allowed in queries. Found: \\\"\" + definition.kind + \"\\\"\");\n }\n return definition;\n });\n if (operations.length > 1) {\n throw new Error(\"Ambiguous GraphQL document: contains \" + operations.length + \" operations\");\n }\n}", "function checkDocument(doc) {\n if (doc.kind !== 'Document') {\n throw new Error(\"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\");\n }\n var operations = doc.definitions\n .filter(function (d) { return d.kind !== 'FragmentDefinition'; })\n .map(function (definition) {\n if (definition.kind !== 'OperationDefinition') {\n throw new Error(\"Schema type definitions not allowed in queries. Found: \\\"\" + definition.kind + \"\\\"\");\n }\n return definition;\n });\n if (operations.length > 1) {\n throw new Error(\"Ambiguous GraphQL document: contains \" + operations.length + \" operations\");\n }\n}", "function checkDocument(doc) {\n if (doc.kind !== 'Document') {\n throw new Error(\"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\");\n }\n var operations = doc.definitions\n .filter(function (d) { return d.kind !== 'FragmentDefinition'; })\n .map(function (definition) {\n if (definition.kind !== 'OperationDefinition') {\n throw new Error(\"Schema type definitions not allowed in queries. Found: \\\"\" + definition.kind + \"\\\"\");\n }\n return definition;\n });\n if (operations.length > 1) {\n throw new Error(\"Ambiguous GraphQL document: contains \" + operations.length + \" operations\");\n }\n}", "function checkDocument(doc) {\n if (doc.kind !== 'Document') {\n throw new Error(\"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\");\n }\n var operations = doc.definitions\n .filter(function (d) { return d.kind !== 'FragmentDefinition'; })\n .map(function (definition) {\n if (definition.kind !== 'OperationDefinition') {\n throw new Error(\"Schema type definitions not allowed in queries. Found: \\\"\" + definition.kind + \"\\\"\");\n }\n return definition;\n });\n if (operations.length > 1) {\n throw new Error(\"Ambiguous GraphQL document: contains \" + operations.length + \" operations\");\n }\n}", "function checkDocument(doc) {\n if (doc.kind !== 'Document') {\n throw new Error(\"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\");\n }\n var operations = doc.definitions\n .filter(function (d) { return d.kind !== 'FragmentDefinition'; })\n .map(function (definition) {\n if (definition.kind !== 'OperationDefinition') {\n throw new Error(\"Schema type definitions not allowed in queries. Found: \\\"\" + definition.kind + \"\\\"\");\n }\n return definition;\n });\n if (operations.length > 1) {\n throw new Error(\"Ambiguous GraphQL document: contains \" + operations.length + \" operations\");\n }\n}", "function checkDocument(doc) {\n if (doc.kind !== 'Document') {\n throw new Error(\"Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \\\"gql\\\" tag? http://docs.apollostack.com/apollo-client/core.html#gql\");\n }\n var operations = doc.definitions\n .filter(function (d) { return d.kind !== 'FragmentDefinition'; })\n .map(function (definition) {\n if (definition.kind !== 'OperationDefinition') {\n throw new Error(\"Schema type definitions not allowed in queries. Found: \\\"\" + definition.kind + \"\\\"\");\n }\n return definition;\n });\n if (operations.length > 1) {\n throw new Error(\"Ambiguous GraphQL document: contains \" + operations.length + \" operations\");\n }\n}", "function changesFromSnapshot(firestore,includeMetadataChanges,snapshot){if(snapshot.oldDocs.isEmpty()){// Special case the first snapshot because index calculation is easy and\n// fast\nvar lastDoc_1;var index_1=0;return snapshot.docChanges.map(function(change){var doc=new index_esm_QueryDocumentSnapshot(firestore,change.doc.key,change.doc,snapshot.fromCache);index_esm_assert(change.type===ChangeType.Added,'Invalid event type for first snapshot');index_esm_assert(!lastDoc_1||snapshot.query.docComparator(lastDoc_1,change.doc)<0,'Got added events in wrong order');lastDoc_1=change.doc;return{type:'added',doc:doc,oldIndex:-1,newIndex:index_1++};});}else{// A DocumentSet that is updated incrementally as changes are applied to use\n// to lookup the index of a document.\nvar indexTracker_1=snapshot.oldDocs;return snapshot.docChanges.filter(function(change){return includeMetadataChanges||change.type!==ChangeType.Metadata;}).map(function(change){var doc=new index_esm_QueryDocumentSnapshot(firestore,change.doc.key,change.doc,snapshot.fromCache);var oldIndex=-1;var newIndex=-1;if(change.type!==ChangeType.Added){oldIndex=indexTracker_1.indexOf(change.doc.key);index_esm_assert(oldIndex>=0,'Index for document not found');indexTracker_1=indexTracker_1.delete(change.doc.key);}if(change.type!==ChangeType.Removed){indexTracker_1=indexTracker_1.add(change.doc);newIndex=indexTracker_1.indexOf(change.doc.key);}return{type:resultChangeType(change.type),doc:doc,oldIndex:oldIndex,newIndex:newIndex};});}}", "function Docs() {}", "function iodocsUpgrade(data){\n \tvar data = data['endpoints'];\n\tvar newResource = {};\n\tnewResource.resources = {};\n\tfor (var index2 = 0; index2 < data.length; index2++) {\n\t\tvar resource = data[index2];\n\t\tvar resourceName = resource.name;\n\t\tnewResource.resources[resourceName] = {};\n\t\tnewResource.resources[resourceName].methods = {};\n\t\tvar methods = resource.methods;\n\t\tfor (var index3 = 0; index3 < methods.length; index3++) {\n\t\t\tvar method = methods[index3];\n\t\t\tvar methodName = method['MethodName'];\n\t\t\tvar methodName = methodName.split(' ').join('_');\n\t\t\tnewResource.resources[resourceName].methods[methodName] = {};\n\t\t\tnewResource.resources[resourceName].methods[methodName].name = method['MethodName'];\n\t\t\tnewResource.resources[resourceName].methods[methodName]['httpMethod'] = method['HTTPMethod'];\n\t\t\tnewResource.resources[resourceName].methods[methodName]['path'] = method['URI'];\n\t\t\tnewResource.resources[resourceName].methods[methodName].parameters = {};\n\t\t\tif (!method.parameters) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar parameters = method.parameters;\n\t\t\tfor (var index4 = 0; index4 < parameters.length; index4++) {\n\t\t\t\tvar param = parameters[index4];\n\t\t\t\tnewResource.resources[resourceName].methods[methodName].parameters[param.Name] = {};\n\t\t\t\tnewResource.resources[resourceName].methods[methodName].parameters[param.Name]['title'] = param.name;\n\t\t\t\tnewResource.resources[resourceName].methods[methodName].parameters[param.Name]['required'] = (param['Required'] == 'Y');\n\t\t\t\tnewResource.resources[resourceName].methods[methodName].parameters[param.Name]['default'] = param['Default'];\n\t\t\t\tnewResource.resources[resourceName].methods[methodName].parameters[param.Name]['type'] = param['Type'];\n\t\t\t\tnewResource.resources[resourceName].methods[methodName].parameters[param.Name]['description'] = param['Description'];\n\t\t\t}\n\t\t}\n\t}\n return newResource;\n}", "if (Array.isArray(originalError.path)) {\n return (originalError: any);\n }", "function getInvalidLocaleArguments() {\n var _Symbol$toPrimitive,\n _length,\n _mutatorMap,\n _this = this;\n\n function CustomError() {}\n\n var topLevelErrors = [// fails ToObject\n [null, TypeError], // fails Get\n [{\n get length() {\n throw new CustomError();\n }\n\n }, CustomError], // fail ToLength\n [{\n length: Symbol.toPrimitive\n }, TypeError], [{\n length: (_length = {}, _Symbol$toPrimitive = Symbol.toPrimitive, _mutatorMap = {}, _mutatorMap[_Symbol$toPrimitive] = _mutatorMap[_Symbol$toPrimitive] || {}, _mutatorMap[_Symbol$toPrimitive].get = function () {\n throw new CustomError();\n }, _defineEnumerableProperties(_length, _mutatorMap), _length)\n }, CustomError], [{\n length: _defineProperty({}, Symbol.toPrimitive, function () {\n throw new CustomError();\n })\n }, CustomError], [{\n length: {\n get valueOf() {\n throw new CustomError();\n }\n\n }\n }, CustomError], [{\n length: {\n valueOf: function valueOf() {\n throw new CustomError();\n }\n }\n }, CustomError], [{\n length: {\n get toString() {\n throw new CustomError();\n }\n\n }\n }, CustomError], [{\n length: {\n toString: function toString() {\n throw new CustomError();\n }\n }\n }, CustomError], // fail type check\n [[undefined], TypeError], [[null], TypeError], [[true], TypeError], [[Symbol.toPrimitive], TypeError], [[1], TypeError], [[0.1], TypeError], [[NaN], TypeError]];\n var invalidLanguageTags = [\"\", // empty tag\n \"i\", // singleton alone\n \"x\", // private use without subtag\n \"u\", // extension singleton in first place\n \"419\", // region code in first place\n \"u-nu-latn-cu-bob\", // extension sequence without language\n \"hans-cmn-cn\", // \"hans\" could theoretically be a 4-letter language code,\n // but those can't be followed by extlang codes.\n \"abcdefghi\", // overlong language\n \"cmn-hans-cn-u-u\", // duplicate singleton\n \"cmn-hans-cn-t-u-ca-u\", // duplicate singleton\n \"de-gregory-gregory\", // duplicate variant\n \"*\", // language range\n \"de-*\", // language range\n \"中文\", // non-ASCII letters\n \"en-ß\", // non-ASCII letters\n \"ıd\" // non-ASCII letters\n ];\n return topLevelErrors.concat(invalidLanguageTags.map(function (tag) {\n _newArrowCheck(this, _this);\n\n return [tag, RangeError];\n }.bind(this)), invalidLanguageTags.map(function (tag) {\n _newArrowCheck(this, _this);\n\n return [[tag], RangeError];\n }.bind(this)), invalidLanguageTags.map(function (tag) {\n _newArrowCheck(this, _this);\n\n return [[\"en\", tag], RangeError];\n }.bind(this)));\n}", "function findBreakingChanges(oldSchema, newSchema) {\n return [].concat(findRemovedTypes(oldSchema, newSchema), findTypesThatChangedKind(oldSchema, newSchema), findFieldsThatChangedType(oldSchema, newSchema), findTypesRemovedFromUnions(oldSchema, newSchema), findValuesRemovedFromEnums(oldSchema, newSchema), findArgChanges(oldSchema, newSchema).breakingChanges, findInterfacesRemovedFromObjectTypes(oldSchema, newSchema));\n}", "function findBreakingChanges(oldSchema, newSchema) {\n return [].concat(findRemovedTypes(oldSchema, newSchema), findTypesThatChangedKind(oldSchema, newSchema), findFieldsThatChangedType(oldSchema, newSchema), findTypesRemovedFromUnions(oldSchema, newSchema), findValuesRemovedFromEnums(oldSchema, newSchema), findArgChanges(oldSchema, newSchema).breakingChanges, findInterfacesRemovedFromObjectTypes(oldSchema, newSchema));\n}", "function convertLiveDocs(apiInfo){\n rename(apiInfo,'title','name');\n rename(apiInfo,'prefix','publicPath');\n rename(apiInfo,'server','basePath');\n apiInfo.resources = {};\n for (var e in apiInfo.endpoints) {\n var ep = apiInfo.endpoints[e];\n var eName = ep.name ? ep.name : 'Default';\n\n if (!apiInfo.resources[eName]) apiInfo.resources[eName] = {};\n apiInfo.resources[eName].description = ep.description;\n\n for (var m in ep.methods) {\n var lMethod = ep.methods[m];\n if (!apiInfo.resources[eName].methods) apiInfo.resources[eName].methods = {};\n var mName = lMethod.MethodName ? lMethod.MethodName : 'Default';\n if (mName.endsWith('.')) mName = mName.substr(0,mName.length-1);\n mName = mName.split(' ').join('_');\n rename(lMethod,'HTTPMethod','httpMethod');\n rename(lMethod,'URI','path');\n rename(lMethod,'Synopsis','description');\n rename(lMethod,'MethodName','name');\n\n lMethod.path = fixPathParameters(lMethod.path);\n\n var params = {};\n for (var p in lMethod.parameters) {\n var lParam = lMethod.parameters[p];\n if (!lParam.type) lParam.type = 'string';\n if (lParam.type == 'json') lParam.type = 'string';\n if (!lParam.location) {\n if (lMethod.path.indexOf(':'+lParam.name)>=0) {\n lParam.location = 'path';\n }\n else {\n lParam.location = 'query';\n }\n }\n if (lParam.location == 'boddy') lParam.location = 'body'; // ;)\n params[lParam.name] = lParam;\n delete lParam.name;\n delete lParam.input; // TODO checkbox to boolean?\n delete lParam.label;\n rename(lParam,'options','enum');\n }\n lMethod.parameters = params;\n if (Object.keys(params).length==0) delete lMethod.parameters;\n\n apiInfo.resources[eName].methods[mName] = lMethod;\n }\n\n }\n delete apiInfo.endpoints; // to keep size down\n return apiInfo;\n}", "static add_to_deprecate_db(obj) {\n let keys = Object.getOwnPropertyNames(obj)\n if(obj.old){\n this.deprecate_db.push(obj)\n }\n else { dde_error(\"add_to_deprecate_db passed object: \" + JSON.stringify(obj) +\n \"<br/>that doesn't have only properties: \" + \"old, new, doc\")\n }\n }", "function deprecated(oldMethod, newMethod) {\n if (!deprecationWarnings_) {\n return;\n }\n\n console.warn(oldMethod + ' is deprecated, please use ' + newMethod + ' instead.');\n }", "apiDefinationGeneratorTest(obj) {\n let newProps = {};\n newProps['methods'] = {};\n newProps['properties'] = {};\n newProps['name'] = obj.constructor.name;\n\n if (obj.version) {\n newProps['version'] = obj.version;\n }\n\n newProps['events'] = {\n 'listening': [this, this.listening],\n 'wssError': [this, this.wssError],\n 'wssConnection': [this, this.wssOnConnection],\n 'wssMessage': [this, this.wssOnMessage],\n };\n\n do {\n //console.log(obj);\n for (let index of Object.getOwnPropertyNames(obj)) {\n if (obj[index]) {\n if ((typeof obj[index]) == 'function') {\n let jsDoc = ''\n\n // The constructor function contains all the code for the class,\n // including the comments between functions which is where the\n // jsDoc definition for the function lives.\n if (obj['constructor']) {\n let done = false;\n\n // The first line of this specific function will be the last line\n // in the constructor we need to look at. The relevant jsDoc\n // should be right above.\n let firstLine = obj[index].toString().split(/\\n/)[0];\n\n // We are going to parse every line of the constructor until we\n // find the first line of the function we're looking for.\n for (let line of obj['constructor'].toString().split(/\\n/)) {\n if (!done) {\n // Start of a new jsDoc segment. Anything we already have is\n // not related to this function.\n if (line.match(/\\/\\*\\*/)) {\n jsDoc = line + '\\n';\n }\n\n // There should be no lines that start with a \"}\" within the\n // jsDoc definition so if we find one we've meandered out of\n // the jsDoc definition. This makes sure that later\n // functions that have no jsDoc defition don't get jsDoc\n // definitions from earlier functions (the earlier functions\n // will end with \"}\").\n else if (line.replace(/^\\s*/g, '').match(/^}/)) {\n jsDoc = '';\n }\n\n // If this line from the constructor matches the first line\n // from this function (with leading whitespace removed), we\n // have what we came for. Don't process future lines.\n else if (line.replace(/^\\s*/g, '') == firstLine) {\n done = true;\n }\n\n // Either this line is part of the jsDoc or it's junk, Either\n // way, append it to the jsDoc we're extracting. If it's\n // junk it will be cleared by the start of the next jsDoc\n // segment or the end of a function.\n else {\n jsDoc += line + '\\n';\n }\n }\n }\n }\n\n // Now we just tidy up the jsDoc fragment we extracted. More to do\n // here.\n if (jsDoc.match(/\\/\\*\\*/)) {\n jsDoc = jsDoc.split(/\\/\\*\\*/)[1];\n }\n else {\n jsDoc = '';\n }\n if (jsDoc.match(/\\*\\//)) {\n jsDoc = jsDoc.split(/\\*\\//)[0];\n }\n\n let functionProperties = obj[index];\n functionProperties['namedArguments'] = {};\n functionProperties['numberedArguments'] = [];\n functionProperties['private'] = false;\n functionProperties['description'] = '';\n functionProperties['returns'] = '';\n if (jsDoc.length > 0) {\n jsDoc = jsDoc.replace(/^\\s*/mg, '');\n for (let line of (jsDoc.split(/\\n/))) {\n if (line.match(/^\\@private/i)) {\n functionProperties['private'] = true;\n }\n else if (line.match(/^\\@param/i)) {\n let parsedLine = this.parseJsDocLine(line);\n functionProperties['numberedArguments'].push(parsedLine)\n functionProperties['namedArguments'][parsedLine[0]] = parsedLine;\n }\n else if (line.match(/^\\@return/i)) {\n functionProperties['returns'] = line;\n }\n else {\n functionProperties['description'] += line;\n }\n }\n //console.log(index);\n //console.log(jsDoc);\n //console.log(functionProperties);\n newProps['methods'][index] = functionProperties;\n newProps['methods'][index]['uri'] = index;\n }\n }\n else if (typeof obj[index] != 'object') {\n newProps['properties'][index] = {\n 'uri': index,\n 'getter': 'TODO'\n }\n }\n else {\n //console.log(\"not a function: \", index, typeof obj[index]);\n }\n }\n }\n } while (obj = Object.getPrototypeOf(obj));\n\n return newProps;\n }", "ListsUnsupportedRequest (msg) {\n let error = new Error(msg);\n error.name = 'ListsUnsupportedRequest';\n //error.snappMessage = \"something?\";\n throw error;\n }", "constructor(doc) {\n _defineProperty(this, \"incoming\", void 0);\n\n _defineProperty(this, \"submitted\", void 0);\n\n _defineProperty(this, \"pending\", void 0);\n\n _defineProperty(this, \"HEAD\", void 0);\n\n _defineProperty(this, \"EDGE\", void 0);\n\n _defineProperty(this, \"onRebase\", void 0);\n\n _defineProperty(this, \"onMutation\", void 0);\n\n _defineProperty(this, \"onConsistencyChanged\", void 0);\n\n _defineProperty(this, \"inconsistentAt\", void 0);\n\n _defineProperty(this, \"lastStagedAt\", void 0);\n\n this.reset(doc);\n }", "function deprecated(oldMethod, newMethod) {\n\t if (!deprecationWarnings_) {\n\t return;\n\t }\n\n\t console.warn(oldMethod + ' is deprecated, please use ' + newMethod + ' instead.');\n\t}", "constructor(doc) {\n _defineProperty(this, \"BASIS\", void 0);\n\n _defineProperty(this, \"out\", []);\n\n _defineProperty(this, \"PRESTAGE\", void 0);\n\n _defineProperty(this, \"setOperations\", void 0);\n\n _defineProperty(this, \"staged\", void 0);\n\n _defineProperty(this, \"dmp\", void 0);\n\n if (doc) {\n (0, _debug.default)('Reset mutation buffer to rev %s', doc._rev);\n } else {\n (0, _debug.default)('Reset mutation buffer state to document being deleted');\n }\n\n this.staged = [];\n this.setOperations = {};\n this.BASIS = doc;\n this.PRESTAGE = doc;\n this.dmp = new DiffMatchPatch.diff_match_patch();\n }", "function invalidClassError(functionName, type, position, argument) {\n var description = valueDescription(argument);\n return new __WEBPACK_IMPORTED_MODULE_1__error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + ordinal(position) + \" \" +\n (\"argument to be a \" + type + \", but it was: \" + description));\n}", "function invalidClassError(functionName, type, position, argument) {\n var description = valueDescription(argument);\n return new __WEBPACK_IMPORTED_MODULE_1__error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__[\"b\" /* Code */].INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + ordinal(position) + \" \" +\n (\"argument to be a \" + type + \", but it was: \" + description));\n}", "function findBreakingChanges(oldSchema, newSchema) {\n\t return [].concat(findRemovedTypes(oldSchema, newSchema), findTypesThatChangedKind(oldSchema, newSchema), findFieldsThatChangedType(oldSchema, newSchema), findTypesRemovedFromUnions(oldSchema, newSchema), findValuesRemovedFromEnums(oldSchema, newSchema));\n\t}", "changes(spec = []) {\n if (spec instanceof ChangeSet)\n return spec;\n return ChangeSet.of(spec, this.doc.length, this.facet(EditorState.lineSeparator));\n }", "function invalidClassError(functionName, type, position, argument) {\r\n var description = valueDescription(argument);\r\n return new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + ordinal(position) + \" \" +\r\n (\"argument to be a \" + type + \", but it was: \" + description));\r\n}", "function invalidClassError(functionName, type, position, argument) {\r\n var description = valueDescription(argument);\r\n return new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + ordinal(position) + \" \" +\r\n (\"argument to be a \" + type + \", but it was: \" + description));\r\n}", "function invalidClassError(functionName, type, position, argument) {\r\n var description = valueDescription(argument);\r\n return new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + ordinal(position) + \" \" +\r\n (\"argument to be a \" + type + \", but it was: \" + description));\r\n}", "checkDocs(docs) {\n if(docs) {\n if(docs.length > 0) {\n return {\n check: true,\n };\n } else {\n return {\n check: false,\n res: error.error\n };\n }\n } else {\n return {\n check: false,\n res: error.error\n };\n }\n }", "function deprecated(oldMethod, newMethod) {\n if (!deprecationWarnings_) {\n return;\n }\n console.warn(oldMethod + ' is deprecated, please use ' + newMethod +\n ' instead.');\n}", "function deprecated(oldMethod, newMethod) {\n if (!deprecationWarnings_) {\n return;\n }\n console.warn(oldMethod + ' is deprecated, please use ' + newMethod +\n ' instead.');\n}", "function invalidClassError(functionName, type, position, argument) {\n var description = valueDescription(argument);\n return new __WEBPACK_IMPORTED_MODULE_1__error__[\"b\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__[\"a\" /* Code */].INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + ordinal(position) + \" \" +\n (\"argument to be a \" + type + \", but it was: \" + description));\n}", "function deprecated(oldMethod, newMethod) {\n if (!deprecationWarnings_) {\n return;\n }\n\n console.warn(oldMethod + ' is deprecated, please use ' + newMethod + ' instead.');\n}", "changeDecorations(callback) {\n const changeAccessor = {\n deltaDecorations: (oldDecorations, newDecorations) => {\n return this.deltaDecorationsImpl(oldDecorations, newDecorations);\n }\n };\n let result = null;\n try {\n result = callback(changeAccessor);\n }\n catch (e) {\n errors_1.onUnexpectedError(e);\n }\n changeAccessor.deltaDecorations = invalidFunc;\n return result;\n }", "method() {\n throw new Error('Not implemented');\n }", "function invalidClassError(functionName, type, position, argument) {\n var description = valueDescription(argument);\n return new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + ordinal(position) + \" \" + (\"argument to be a \" + type + \", but it was: \" + description));\n }", "add(doc){const idx=this.size();if(isString(doc)){this._addString(doc,idx);}else {this._addObject(doc,idx);}}", "function enumerable(rule,value,source,errors,options){rule[ENUM]=Array.isArray(rule[ENUM])?rule[ENUM]:[];if(rule[ENUM].indexOf(value)===-1){errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\"/* format */](options.messages[ENUM],rule.fullField,rule[ENUM].join(', ')));}}", "function VeryBadError() {}", "function invalidClassError(functionName, type, position, argument) {\n var description = valueDescription(argument);\n return new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + ordinal(position) + \" \" +\n (\"argument to be a \" + type + \", but it was: \" + description));\n}", "function invalidClassError(functionName, type, position, argument) {\n var description = valueDescription(argument);\n return new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + ordinal(position) + \" \" +\n (\"argument to be a \" + type + \", but it was: \" + description));\n}", "function invalidClassError(functionName, type, position, argument) {\n var description = valueDescription(argument);\n return new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + ordinal(position) + \" \" +\n (\"argument to be a \" + type + \", but it was: \" + description));\n}", "function invalidClassError(functionName, type, position, argument) {\n var description = valueDescription(argument);\n return new FirestoreError(Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + ordinal(position) + \" \" + (\"argument to be a \" + type + \", but it was: \" + description));\n}", "jsdocPeldaPrivate() {}", "_rebaseChange(args, cb) {\n this.documentEngine.getChanges({\n documentId: args.documentId,\n sinceVersion: args.version\n }, function(err, result) {\n let B = result.changes.map(this.deserializeChange)\n let a = this.deserializeChange(args.change)\n // transform changes\n DocumentChange.transformInplace(a, B)\n let ops = B.reduce(function(ops, change) {\n return ops.concat(change.ops)\n }, [])\n let serverChange = new DocumentChange(ops, {}, {})\n\n cb(null, {\n change: this.serializeChange(a),\n serverChange: this.serializeChange(serverChange),\n version: result.version\n })\n }.bind(this))\n }", "function ls(t, e, n) {\n for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];\n t = Uo(t, jo);\n var o = Uo(t.firestore, xu), u = eu(o);\n // For Compat types, we have to \"extract\" the underlying types before\n // performing validation.\n return e instanceof x && (e = e._), ds(o, [ (\"string\" == typeof e || e instanceof Do ? fu(u, \"updateDoc\", t.S_, e, n, r) : cu(u, \"updateDoc\", t.S_, e)).O_(t.S_, Ue.exists(!0)) ]);\n}", "function CustomError() {}", "function changesFromSnapshot(firestore, includeMetadataChanges, snapshot, converter) {\r\n if (snapshot.oldDocs.isEmpty()) {\r\n // Special case the first snapshot because index calculation is easy and\r\n // fast\r\n var lastDoc_1;\r\n var index_1 = 0;\r\n return snapshot.docChanges.map(function (change) {\r\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key), converter);\r\n assert(change.type === ChangeType.Added, 'Invalid event type for first snapshot');\r\n assert(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\r\n lastDoc_1 = change.doc;\r\n return {\r\n type: 'added',\r\n doc: doc,\r\n oldIndex: -1,\r\n newIndex: index_1++\r\n };\r\n });\r\n }\r\n else {\r\n // A DocumentSet that is updated incrementally as changes are applied to use\r\n // to lookup the index of a document.\r\n var indexTracker_1 = snapshot.oldDocs;\r\n return snapshot.docChanges\r\n .filter(function (change) { return includeMetadataChanges || change.type !== ChangeType.Metadata; })\r\n .map(function (change) {\r\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key), converter);\r\n var oldIndex = -1;\r\n var newIndex = -1;\r\n if (change.type !== ChangeType.Added) {\r\n oldIndex = indexTracker_1.indexOf(change.doc.key);\r\n assert(oldIndex >= 0, 'Index for document not found');\r\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\r\n }\r\n if (change.type !== ChangeType.Removed) {\r\n indexTracker_1 = indexTracker_1.add(change.doc);\r\n newIndex = indexTracker_1.indexOf(change.doc.key);\r\n }\r\n return { type: resultChangeType(change.type), doc: doc, oldIndex: oldIndex, newIndex: newIndex };\r\n });\r\n }\r\n}", "checkValidationWarnings () {\n\t\tif (\n\t\t\tthis.model.validationWarnings instanceof Array &&\n\t\t\tthis.api\n\t\t) {\n\t\t\tthis.api.warn(`Validation warnings: \\n${this.model.validationWarnings.join('\\n')}`);\n\t\t}\n\t}", "function findDangerousChanges(oldSchema, newSchema) {\n var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in DangerousChangeType;\n });\n return dangerousChanges;\n}", "function findDangerousChanges(oldSchema, newSchema) {\n var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in DangerousChangeType;\n });\n return dangerousChanges;\n}" ]
[ "0.73009336", "0.72349805", "0.7195611", "0.7195611", "0.7166976", "0.7166976", "0.7166976", "0.57884866", "0.54631996", "0.53587776", "0.5337766", "0.52802134", "0.52802134", "0.52700585", "0.52391666", "0.5113136", "0.5103486", "0.5094628", "0.507601", "0.50735646", "0.50735646", "0.50735646", "0.50721186", "0.5057348", "0.5054037", "0.50183827", "0.5009291", "0.5009291", "0.49970114", "0.49921176", "0.4988325", "0.4988325", "0.4988325", "0.49789613", "0.49750042", "0.49716184", "0.49716184", "0.49519813", "0.49491388", "0.49433324", "0.4922532", "0.48908725", "0.48889774", "0.48873493", "0.48873493", "0.48800373", "0.4863858", "0.4863858", "0.4863858", "0.4863858", "0.4863858", "0.4863858", "0.4863858", "0.4863858", "0.4863858", "0.48571485", "0.48527133", "0.48446482", "0.48218963", "0.48148492", "0.48027655", "0.48027655", "0.4787693", "0.47811836", "0.47586644", "0.47290316", "0.47135118", "0.4710788", "0.47047284", "0.46885285", "0.46843323", "0.46843323", "0.46826103", "0.4677617", "0.46749842", "0.46749842", "0.46749842", "0.4674075", "0.46681428", "0.46681428", "0.46597096", "0.46447498", "0.4637595", "0.4633152", "0.46219876", "0.4609778", "0.46076265", "0.46017322", "0.46016824", "0.46016824", "0.46016824", "0.45947424", "0.45778492", "0.4576935", "0.4576068", "0.45686436", "0.45606893", "0.4543411", "0.45428157", "0.45428157" ]
0.74256736
0
Calculates the array of firestore.DocumentChange's for a given ViewSnapshot. Exported for testing.
function changesFromSnapshot(firestore,includeMetadataChanges,snapshot){if(snapshot.oldDocs.isEmpty()){// Special case the first snapshot because index calculation is easy and // fast var lastDoc_1;var index_1=0;return snapshot.docChanges.map(function(change){var doc=new index_esm_QueryDocumentSnapshot(firestore,change.doc.key,change.doc,snapshot.fromCache);index_esm_assert(change.type===ChangeType.Added,'Invalid event type for first snapshot');index_esm_assert(!lastDoc_1||snapshot.query.docComparator(lastDoc_1,change.doc)<0,'Got added events in wrong order');lastDoc_1=change.doc;return{type:'added',doc:doc,oldIndex:-1,newIndex:index_1++};});}else{// A DocumentSet that is updated incrementally as changes are applied to use // to lookup the index of a document. var indexTracker_1=snapshot.oldDocs;return snapshot.docChanges.filter(function(change){return includeMetadataChanges||change.type!==ChangeType.Metadata;}).map(function(change){var doc=new index_esm_QueryDocumentSnapshot(firestore,change.doc.key,change.doc,snapshot.fromCache);var oldIndex=-1;var newIndex=-1;if(change.type!==ChangeType.Added){oldIndex=indexTracker_1.indexOf(change.doc.key);index_esm_assert(oldIndex>=0,'Index for document not found');indexTracker_1=indexTracker_1.delete(change.doc.key);}if(change.type!==ChangeType.Removed){indexTracker_1=indexTracker_1.add(change.doc);newIndex=indexTracker_1.indexOf(change.doc.key);}return{type:resultChangeType(change.type),doc:doc,oldIndex:oldIndex,newIndex:newIndex};});}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changesFromSnapshot(firestore, snapshot) {\n if (snapshot.oldDocs.isEmpty()) {\n // Special case the first snapshot because index calculation is easy and\n // fast\n var lastDoc_1;\n var index_1 = 0;\n return snapshot.docChanges.map(function (change) {\n var doc = new DocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache);\n Object(__WEBPACK_IMPORTED_MODULE_12__util_assert__[\"a\" /* assert */])(change.type === __WEBPACK_IMPORTED_MODULE_4__core_view_snapshot__[\"a\" /* ChangeType */].Added, 'Invalid event type for first snapshot');\n Object(__WEBPACK_IMPORTED_MODULE_12__util_assert__[\"a\" /* assert */])(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\n lastDoc_1 = change.doc;\n return {\n type: 'added',\n doc: doc,\n oldIndex: -1,\n newIndex: index_1++\n };\n });\n }\n else {\n // A DocumentSet that is updated incrementally as changes are applied to use\n // to lookup the index of a document.\n var indexTracker_1 = snapshot.oldDocs;\n return snapshot.docChanges.map(function (change) {\n var doc = new DocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache);\n var oldIndex = -1;\n var newIndex = -1;\n if (change.type !== __WEBPACK_IMPORTED_MODULE_4__core_view_snapshot__[\"a\" /* ChangeType */].Added) {\n oldIndex = indexTracker_1.indexOf(change.doc.key);\n Object(__WEBPACK_IMPORTED_MODULE_12__util_assert__[\"a\" /* assert */])(oldIndex >= 0, 'Index for document not found');\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\n }\n if (change.type !== __WEBPACK_IMPORTED_MODULE_4__core_view_snapshot__[\"a\" /* ChangeType */].Removed) {\n indexTracker_1 = indexTracker_1.add(change.doc);\n newIndex = indexTracker_1.indexOf(change.doc.key);\n }\n return { type: resultChangeType(change.type), doc: doc, oldIndex: oldIndex, newIndex: newIndex };\n });\n }\n}", "function changesFromSnapshot(firestore, snapshot) {\n if (snapshot.oldDocs.isEmpty()) {\n // Special case the first snapshot because index calculation is easy and\n // fast\n var lastDoc_1;\n var index_1 = 0;\n return snapshot.docChanges.map(function (change) {\n var doc = new DocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache);\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__util_assert__[\"a\" /* assert */])(change.type === __WEBPACK_IMPORTED_MODULE_4__core_view_snapshot__[\"a\" /* ChangeType */].Added, 'Invalid event type for first snapshot');\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__util_assert__[\"a\" /* assert */])(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\n lastDoc_1 = change.doc;\n return {\n type: 'added',\n doc: doc,\n oldIndex: -1,\n newIndex: index_1++\n };\n });\n }\n else {\n // A DocumentSet that is updated incrementally as changes are applied to use\n // to lookup the index of a document.\n var indexTracker_1 = snapshot.oldDocs;\n return snapshot.docChanges.map(function (change) {\n var doc = new DocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache);\n var oldIndex = -1;\n var newIndex = -1;\n if (change.type !== __WEBPACK_IMPORTED_MODULE_4__core_view_snapshot__[\"a\" /* ChangeType */].Added) {\n oldIndex = indexTracker_1.indexOf(change.doc.key);\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__util_assert__[\"a\" /* assert */])(oldIndex >= 0, 'Index for document not found');\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\n }\n if (change.type !== __WEBPACK_IMPORTED_MODULE_4__core_view_snapshot__[\"a\" /* ChangeType */].Removed) {\n indexTracker_1 = indexTracker_1.add(change.doc);\n newIndex = indexTracker_1.indexOf(change.doc.key);\n }\n return { type: resultChangeType(change.type), doc: doc, oldIndex: oldIndex, newIndex: newIndex };\n });\n }\n}", "function changesFromSnapshot(firestore, snapshot) {\n if (snapshot.oldDocs.isEmpty()) {\n // Special case the first snapshot because index calculation is easy and\n // fast\n var lastDoc_1;\n var index_1 = 0;\n return snapshot.docChanges.map(function (change) {\n var doc = new DocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache);\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__util_assert__[\"a\" /* assert */])(change.type === __WEBPACK_IMPORTED_MODULE_4__core_view_snapshot__[\"a\" /* ChangeType */].Added, 'Invalid event type for first snapshot');\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__util_assert__[\"a\" /* assert */])(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\n lastDoc_1 = change.doc;\n return {\n type: 'added',\n doc: doc,\n oldIndex: -1,\n newIndex: index_1++\n };\n });\n }\n else {\n // A DocumentSet that is updated incrementally as changes are applied to use\n // to lookup the index of a document.\n var indexTracker_1 = snapshot.oldDocs;\n return snapshot.docChanges.map(function (change) {\n var doc = new DocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache);\n var oldIndex = -1;\n var newIndex = -1;\n if (change.type !== __WEBPACK_IMPORTED_MODULE_4__core_view_snapshot__[\"a\" /* ChangeType */].Added) {\n oldIndex = indexTracker_1.indexOf(change.doc.key);\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12__util_assert__[\"a\" /* assert */])(oldIndex >= 0, 'Index for document not found');\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\n }\n if (change.type !== __WEBPACK_IMPORTED_MODULE_4__core_view_snapshot__[\"a\" /* ChangeType */].Removed) {\n indexTracker_1 = indexTracker_1.add(change.doc);\n newIndex = indexTracker_1.indexOf(change.doc.key);\n }\n return { type: resultChangeType(change.type), doc: doc, oldIndex: oldIndex, newIndex: newIndex };\n });\n }\n}", "function changesFromSnapshot(firestore, snapshot) {\n if (snapshot.oldDocs.isEmpty()) {\n // Special case the first snapshot because index calculation is easy and\n // fast\n var lastDoc_1;\n var index_1 = 0;\n return snapshot.docChanges.map(function (change) {\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache);\n assert$1(change.type === ChangeType.Added, 'Invalid event type for first snapshot');\n assert$1(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\n lastDoc_1 = change.doc;\n return {\n type: 'added',\n doc: doc,\n oldIndex: -1,\n newIndex: index_1++\n };\n });\n }\n else {\n // A DocumentSet that is updated incrementally as changes are applied to use\n // to lookup the index of a document.\n var indexTracker_1 = snapshot.oldDocs;\n return snapshot.docChanges.map(function (change) {\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache);\n var oldIndex = -1;\n var newIndex = -1;\n if (change.type !== ChangeType.Added) {\n oldIndex = indexTracker_1.indexOf(change.doc.key);\n assert$1(oldIndex >= 0, 'Index for document not found');\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\n }\n if (change.type !== ChangeType.Removed) {\n indexTracker_1 = indexTracker_1.add(change.doc);\n newIndex = indexTracker_1.indexOf(change.doc.key);\n }\n return { type: resultChangeType(change.type), doc: doc, oldIndex: oldIndex, newIndex: newIndex };\n });\n }\n}", "function changesFromSnapshot(firestore, includeMetadataChanges, snapshot, converter) {\n if (snapshot.oldDocs.isEmpty()) {\n // Special case the first snapshot because index calculation is easy and\n // fast\n var lastDoc_1;\n var index_1 = 0;\n return snapshot.docChanges.map(function (change) {\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key), converter);\n assert(change.type === ChangeType.Added, 'Invalid event type for first snapshot');\n assert(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\n lastDoc_1 = change.doc;\n return {\n type: 'added',\n doc: doc,\n oldIndex: -1,\n newIndex: index_1++\n };\n });\n } else {\n // A DocumentSet that is updated incrementally as changes are applied to use\n // to lookup the index of a document.\n var indexTracker_1 = snapshot.oldDocs;\n return snapshot.docChanges.filter(function (change) {\n return includeMetadataChanges || change.type !== ChangeType.Metadata;\n }).map(function (change) {\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key), converter);\n var oldIndex = -1;\n var newIndex = -1;\n\n if (change.type !== ChangeType.Added) {\n oldIndex = indexTracker_1.indexOf(change.doc.key);\n assert(oldIndex >= 0, 'Index for document not found');\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\n }\n\n if (change.type !== ChangeType.Removed) {\n indexTracker_1 = indexTracker_1.add(change.doc);\n newIndex = indexTracker_1.indexOf(change.doc.key);\n }\n\n return {\n type: resultChangeType(change.type),\n doc: doc,\n oldIndex: oldIndex,\n newIndex: newIndex\n };\n });\n }\n }", "function changesFromSnapshot(firestore, includeMetadataChanges, snapshot) {\r\n if (snapshot.oldDocs.isEmpty()) {\r\n // Special case the first snapshot because index calculation is easy and\r\n // fast\r\n var lastDoc_1;\r\n var index_1 = 0;\r\n return snapshot.docChanges.map(function (change) {\r\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key));\r\n assert(change.type === ChangeType.Added, 'Invalid event type for first snapshot');\r\n assert(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\r\n lastDoc_1 = change.doc;\r\n return {\r\n type: 'added',\r\n doc: doc,\r\n oldIndex: -1,\r\n newIndex: index_1++\r\n };\r\n });\r\n }\r\n else {\r\n // A DocumentSet that is updated incrementally as changes are applied to use\r\n // to lookup the index of a document.\r\n var indexTracker_1 = snapshot.oldDocs;\r\n return snapshot.docChanges\r\n .filter(function (change) { return includeMetadataChanges || change.type !== ChangeType.Metadata; })\r\n .map(function (change) {\r\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key));\r\n var oldIndex = -1;\r\n var newIndex = -1;\r\n if (change.type !== ChangeType.Added) {\r\n oldIndex = indexTracker_1.indexOf(change.doc.key);\r\n assert(oldIndex >= 0, 'Index for document not found');\r\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\r\n }\r\n if (change.type !== ChangeType.Removed) {\r\n indexTracker_1 = indexTracker_1.add(change.doc);\r\n newIndex = indexTracker_1.indexOf(change.doc.key);\r\n }\r\n return { type: resultChangeType(change.type), doc: doc, oldIndex: oldIndex, newIndex: newIndex };\r\n });\r\n }\r\n}", "function changesFromSnapshot(firestore, includeMetadataChanges, snapshot) {\r\n if (snapshot.oldDocs.isEmpty()) {\r\n // Special case the first snapshot because index calculation is easy and\r\n // fast\r\n var lastDoc_1;\r\n var index_1 = 0;\r\n return snapshot.docChanges.map(function (change) {\r\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key));\r\n assert(change.type === ChangeType.Added, 'Invalid event type for first snapshot');\r\n assert(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\r\n lastDoc_1 = change.doc;\r\n return {\r\n type: 'added',\r\n doc: doc,\r\n oldIndex: -1,\r\n newIndex: index_1++\r\n };\r\n });\r\n }\r\n else {\r\n // A DocumentSet that is updated incrementally as changes are applied to use\r\n // to lookup the index of a document.\r\n var indexTracker_1 = snapshot.oldDocs;\r\n return snapshot.docChanges\r\n .filter(function (change) { return includeMetadataChanges || change.type !== ChangeType.Metadata; })\r\n .map(function (change) {\r\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key));\r\n var oldIndex = -1;\r\n var newIndex = -1;\r\n if (change.type !== ChangeType.Added) {\r\n oldIndex = indexTracker_1.indexOf(change.doc.key);\r\n assert(oldIndex >= 0, 'Index for document not found');\r\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\r\n }\r\n if (change.type !== ChangeType.Removed) {\r\n indexTracker_1 = indexTracker_1.add(change.doc);\r\n newIndex = indexTracker_1.indexOf(change.doc.key);\r\n }\r\n return { type: resultChangeType(change.type), doc: doc, oldIndex: oldIndex, newIndex: newIndex };\r\n });\r\n }\r\n}", "function changesFromSnapshot(firestore, includeMetadataChanges, snapshot) {\n if (snapshot.oldDocs.isEmpty()) {\n // Special case the first snapshot because index calculation is easy and\n // fast\n var lastDoc_1;\n var index_1 = 0;\n return snapshot.docChanges.map(function (change) {\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key));\n assert(change.type === ChangeType.Added, 'Invalid event type for first snapshot');\n assert(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\n lastDoc_1 = change.doc;\n return {\n type: 'added',\n doc: doc,\n oldIndex: -1,\n newIndex: index_1++\n };\n });\n }\n else {\n // A DocumentSet that is updated incrementally as changes are applied to use\n // to lookup the index of a document.\n var indexTracker_1 = snapshot.oldDocs;\n return snapshot.docChanges\n .filter(function (change) { return includeMetadataChanges || change.type !== ChangeType.Metadata; })\n .map(function (change) {\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key));\n var oldIndex = -1;\n var newIndex = -1;\n if (change.type !== ChangeType.Added) {\n oldIndex = indexTracker_1.indexOf(change.doc.key);\n assert(oldIndex >= 0, 'Index for document not found');\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\n }\n if (change.type !== ChangeType.Removed) {\n indexTracker_1 = indexTracker_1.add(change.doc);\n newIndex = indexTracker_1.indexOf(change.doc.key);\n }\n return { type: resultChangeType(change.type), doc: doc, oldIndex: oldIndex, newIndex: newIndex };\n });\n }\n}", "function changesFromSnapshot(firestore, includeMetadataChanges, snapshot) {\n if (snapshot.oldDocs.isEmpty()) {\n // Special case the first snapshot because index calculation is easy and\n // fast\n var lastDoc_1;\n var index_1 = 0;\n return snapshot.docChanges.map(function (change) {\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key));\n assert(change.type === ChangeType.Added, 'Invalid event type for first snapshot');\n assert(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\n lastDoc_1 = change.doc;\n return {\n type: 'added',\n doc: doc,\n oldIndex: -1,\n newIndex: index_1++\n };\n });\n }\n else {\n // A DocumentSet that is updated incrementally as changes are applied to use\n // to lookup the index of a document.\n var indexTracker_1 = snapshot.oldDocs;\n return snapshot.docChanges\n .filter(function (change) { return includeMetadataChanges || change.type !== ChangeType.Metadata; })\n .map(function (change) {\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key));\n var oldIndex = -1;\n var newIndex = -1;\n if (change.type !== ChangeType.Added) {\n oldIndex = indexTracker_1.indexOf(change.doc.key);\n assert(oldIndex >= 0, 'Index for document not found');\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\n }\n if (change.type !== ChangeType.Removed) {\n indexTracker_1 = indexTracker_1.add(change.doc);\n newIndex = indexTracker_1.indexOf(change.doc.key);\n }\n return { type: resultChangeType(change.type), doc: doc, oldIndex: oldIndex, newIndex: newIndex };\n });\n }\n}", "function changesFromSnapshot(firestore, includeMetadataChanges, snapshot) {\n if (snapshot.oldDocs.isEmpty()) {\n // Special case the first snapshot because index calculation is easy and\n // fast\n var lastDoc_1;\n var index_1 = 0;\n return snapshot.docChanges.map(function (change) {\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key));\n assert(change.type === ChangeType.Added, 'Invalid event type for first snapshot');\n assert(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\n lastDoc_1 = change.doc;\n return {\n type: 'added',\n doc: doc,\n oldIndex: -1,\n newIndex: index_1++\n };\n });\n } else {\n // A DocumentSet that is updated incrementally as changes are applied to use\n // to lookup the index of a document.\n var indexTracker_1 = snapshot.oldDocs;\n return snapshot.docChanges.filter(function (change) {\n return includeMetadataChanges || change.type !== ChangeType.Metadata;\n }).map(function (change) {\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key));\n var oldIndex = -1;\n var newIndex = -1;\n\n if (change.type !== ChangeType.Added) {\n oldIndex = indexTracker_1.indexOf(change.doc.key);\n assert(oldIndex >= 0, 'Index for document not found');\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\n }\n\n if (change.type !== ChangeType.Removed) {\n indexTracker_1 = indexTracker_1.add(change.doc);\n newIndex = indexTracker_1.indexOf(change.doc.key);\n }\n\n return {\n type: resultChangeType(change.type),\n doc: doc,\n oldIndex: oldIndex,\n newIndex: newIndex\n };\n });\n }\n}", "function changesFromSnapshot(firestore, includeMetadataChanges, snapshot, converter) {\r\n if (snapshot.oldDocs.isEmpty()) {\r\n // Special case the first snapshot because index calculation is easy and\r\n // fast\r\n var lastDoc_1;\r\n var index_1 = 0;\r\n return snapshot.docChanges.map(function (change) {\r\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key), converter);\r\n assert(change.type === ChangeType.Added, 'Invalid event type for first snapshot');\r\n assert(!lastDoc_1 || snapshot.query.docComparator(lastDoc_1, change.doc) < 0, 'Got added events in wrong order');\r\n lastDoc_1 = change.doc;\r\n return {\r\n type: 'added',\r\n doc: doc,\r\n oldIndex: -1,\r\n newIndex: index_1++\r\n };\r\n });\r\n }\r\n else {\r\n // A DocumentSet that is updated incrementally as changes are applied to use\r\n // to lookup the index of a document.\r\n var indexTracker_1 = snapshot.oldDocs;\r\n return snapshot.docChanges\r\n .filter(function (change) { return includeMetadataChanges || change.type !== ChangeType.Metadata; })\r\n .map(function (change) {\r\n var doc = new QueryDocumentSnapshot(firestore, change.doc.key, change.doc, snapshot.fromCache, snapshot.mutatedKeys.has(change.doc.key), converter);\r\n var oldIndex = -1;\r\n var newIndex = -1;\r\n if (change.type !== ChangeType.Added) {\r\n oldIndex = indexTracker_1.indexOf(change.doc.key);\r\n assert(oldIndex >= 0, 'Index for document not found');\r\n indexTracker_1 = indexTracker_1.delete(change.doc.key);\r\n }\r\n if (change.type !== ChangeType.Removed) {\r\n indexTracker_1 = indexTracker_1.add(change.doc);\r\n newIndex = indexTracker_1.indexOf(change.doc.key);\r\n }\r\n return { type: resultChangeType(change.type), doc: doc, oldIndex: oldIndex, newIndex: newIndex };\r\n });\r\n }\r\n}", "snapshotChanges() {\n const scheduledFromDocRef$ = fromDocRef(this.ref, this.afs.schedulers.outsideAngular);\n return scheduledFromDocRef$.pipe(this.afs.keepUnstableUntilFirst);\n }", "function docChanges(query, scheduler) {\n return fromCollectionRef(query, scheduler)\n .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"startWith\"])(undefined), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"pairwise\"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(([priorAction, action]) => {\n const docChanges = action.payload.docChanges();\n const actions = docChanges.map(change => ({ type: change.type, payload: change }));\n // the metadata has changed from the prior emission\n if (priorAction && JSON.stringify(priorAction.payload.metadata) !== JSON.stringify(action.payload.metadata)) {\n // go through all the docs in payload and figure out which ones changed\n action.payload.docs.forEach((currentDoc, currentIndex) => {\n const docChange = docChanges.find(d => d.doc.ref.isEqual(currentDoc.ref));\n const priorDoc = priorAction === null || priorAction === void 0 ? void 0 : priorAction.payload.docs.find(d => d.ref.isEqual(currentDoc.ref));\n if (docChange && JSON.stringify(docChange.doc.metadata) === JSON.stringify(currentDoc.metadata) ||\n !docChange && priorDoc && JSON.stringify(priorDoc.metadata) === JSON.stringify(currentDoc.metadata)) {\n // document doesn't appear to have changed, don't log another action\n }\n else {\n // since the actions are processed in order just push onto the array\n actions.push({\n type: 'modified',\n payload: {\n oldIndex: currentIndex,\n newIndex: currentIndex,\n type: 'modified',\n doc: currentDoc\n }\n });\n }\n });\n }\n return actions;\n }));\n}", "ProcessDocChanges(documents) {\n // process document changes to build a list of documents for us to fetch in batches\n const docRequest = [];\n\n documents.forEach((doc) => {\n if (doc.deleted) {\n // TODO - remove document from database?\n\n // emit document deleted event\n this.emit('deleted', doc);\n } else if (doc.changes !== undefined && doc.changes.length) {\n let AlreadyHaveChange = false;\n docRequest.forEach((docRequested) => {\n if (docRequested.id === doc.id) {\n AlreadyHaveChange = true;\n\n // compare revision numbers\n if (RevisionToInt(doc.changes[0].rev) > RevisionToInt(docRequested.rev)) {\n // if this revision is greater than our existing one, replace\n docRequested.rev = doc.changes[0].rev;\n }\n\n // don't break out of for-loop in case there are even more revision in the changelist\n }\n });\n\n // push new change if we haven't already got one for this document ID in our list\n if (!AlreadyHaveChange) {\n docRequest.push({\n atts_since: null,\n rev: doc.changes[0].rev,\n id: doc.id,\n });\n }\n }\n });\n\n if (docRequest.length === 0) {\n this.Log('Extracted 0 document changes, skipping fetch');\n\n return Promise.resolve();\n }\n this.Log(`Extracted ${docRequest.length} document changes to fetch`);\n\n // filter out document revisions we already have\n return this.FilterAlreadyGotRevisions(docRequest).then((filteredDocRequest) => {\n this.Log(`After filtering on already-got revisions, left with ${filteredDocRequest.length} documents to fetch`);\n\n // split document requests into batches of docFetchBatchSize size\n const batches = [];\n while (filteredDocRequest.length > 0) {\n batches.push(filteredDocRequest.splice(0, Math.min(docFetchBatchSize, filteredDocRequest.length)));\n }\n\n this.Log(`Split document changes into ${batches.length} batches`);\n\n // resolve promises with each batch in order\n return batches.reduce((prev, cur) => prev.then(() => this.ProcessDocChangeBatch(cur)), Promise.resolve()).then(() => Promise.resolve());\n });\n }", "snapshotChanges(events) {\n const validatedEvents = validateEventsArray(events);\n const scheduledSortedChanges$ = sortedChanges(this.query, validatedEvents, this.afs.schedulers.outsideAngular);\n return scheduledSortedChanges$.pipe(this.afs.keepUnstableUntilFirst);\n }", "snapshotChanges(events) {\n const validatedEvents = validateEventsArray(events);\n const scheduledSortedChanges$ = sortedChanges(this.query, validatedEvents, this.afs.schedulers.outsideAngular);\n return scheduledSortedChanges$.pipe(this.afs.keepUnstableUntilFirst);\n }", "observableArrayChange (changes) {\n let adds = [];\n let dels = [];\n for (const index in changes) {\n const change = changes[index];\n if (change.status === 'added') {\n adds.push([change.index, change.value]);\n } else {\n dels.unshift([change.index, change.value]);\n }\n }\n dels.forEach(change => this.delChange(...change));\n adds.forEach(change => this.addChange(...change));\n }", "function getViewToClickRatio(){\n let viewsArr = getItemViews();\n let clicksArr = getItemClicks();\n let ratioArr = [];\n\n for (let i = 0; i<allItems.length; i++){\n ratioArr.push(clicksArr[i] / viewsArr[i]);\n }\n return ratioArr;\n}", "stateChanges(events) {\n let source = docChanges(this.query, this.afs.schedulers.outsideAngular);\n if (events && events.length > 0) {\n source = source.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(actions => actions.filter(change => events.indexOf(change.type) > -1)));\n }\n return source.pipe(\n // We want to filter out empty arrays, but always emit at first, so the developer knows\n // that the collection has been resolve; even if it's empty\n Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"startWith\"])(undefined), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"pairwise\"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"filter\"])(([prior, current]) => current.length > 0 || !prior), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(([prior, current]) => current), this.afs.keepUnstableUntilFirst);\n }", "function getDiffs(oldDoc, newDoc) {\n const changes = new Array();\n const flatOld = flattenObject(oldDoc);\n const flatNew = flattenObject(newDoc);\n // find deleted nodes\n Object.keys(flatOld).forEach(key => {\n if (!Object.prototype.hasOwnProperty.call(flatNew, key)) {\n changes.push({\n action: 'DELETED',\n keyName: key,\n });\n }\n });\n // find added nodes\n Object.keys(flatNew).forEach(key => {\n if (!Object.prototype.hasOwnProperty.call(flatOld, key)) {\n changes.push({\n action: 'ADDED',\n keyName: key,\n });\n }\n });\n // find updated nodes\n Object.keys(flatOld).forEach(key => {\n let oldValue = flatOld[key];\n if (Array.isArray(oldValue)) {\n oldValue = oldValue.join(', ');\n }\n let newValue = flatNew[key];\n if (newValue) {\n if (Array.isArray(newValue)) {\n newValue = newValue.join(', ');\n }\n if (newValue !== oldValue && key !== 'revision' && key !== 'etag') {\n changes.push({\n action: 'CHANGED',\n keyName: key,\n });\n }\n }\n });\n return changes;\n}", "getChats(callback) {\n this.unsubscribeChatChanges =\n this.chats\n .where('room', '==', this.chatroom)\n .orderBy('sent_at')\n .onSnapshot(snapshot => {\n\n snapshot.docChanges().forEach(change => {\n callback(change.doc.data(), change.type, change.doc.id);\n });//forEach()\n\n });//onSnapshot()\n }", "function calcChanges(childArr, oldChildArr) {\n\tvar subIndex = 0;\n\tvar changes = [];\n\n\tif (oldChildArr.length === 0 && childArr.length === 0) {\n\t\treturn [];\n\t}\n\n\tfor (; subIndex < childArr.length; subIndex++) {\n\t\tvar oldChild = oldChildArr[subIndex];\n\t\tvar newChild = childArr[subIndex];\n\t\tif (oldChild === newChild) {\n\t\t\tcontinue;\n\t\t};\n\t\tvar type = oldChild != null && newChild == null ? 'rm' : oldChild == null && newChild != null ? 'add' : 'set';\n\n\t\t// aggregate consecutive changes of the similar type to perform batch operations\n\t\tvar lastChange = changes.length > 0 ? changes[changes.length - 1] : null;\n\t\t// if there was a similiar change we add this change to the last change\n\t\tif (lastChange && lastChange.type === type) {\n\t\t\tif (type == 'rm') {\n\t\t\t\t// we just count the positions\n\t\t\t\tlastChange.num++;\n\t\t\t} else {\n\t\t\t\t// for add and set operations we need the exact index of the child and the child element to insert\n\t\t\t\tlastChange.indexes.push(subIndex);\n\t\t\t\tlastChange.elems.push(newChild);\n\t\t\t}\n\t\t} else {\n\t\t\t// if we couldn't aggregate we push a new change\n\t\t\tchanges.push({\n\t\t\t\tindexes: [subIndex],\n\t\t\t\telems: [newChild],\n\t\t\t\tnum: 1,\n\t\t\t\ttype: type\n\t\t\t});\n\t\t}\n\t}\n\t// all elements that are not in the new list got deleted\n\tif (subIndex < oldChildArr.length) {\n\t\tchanges.push({\n\t\t\tindexes: [subIndex],\n\t\t\tnum: oldChildArr.length - subIndex,\n\t\t\ttype: 'rm'\n\t\t});\n\t}\n\n\treturn changes;\n}", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits.get(docId);\n var indexableKeysToKeyValues = docData[0];\n var changes = docData[1];\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return __WEBPACK_IMPORTED_MODULE_0_pouchdb_promise__[\"a\" /* default */].resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return __WEBPACK_IMPORTED_MODULE_0_pouchdb_promise__[\"a\" /* default */].resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKeyValueDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeys = new __WEBPACK_IMPORTED_MODULE_1_pouchdb_collections__[\"b\" /* Set */]();\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeys.add(doc._id);\n doc._deleted = !indexableKeysToKeyValues.has(doc._id);\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues.get(doc._id);\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n var newKeys = Object(__WEBPACK_IMPORTED_MODULE_6_pouchdb_mapreduce_utils__[\"f\" /* mapToKeysArray */])(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeys.has(key)) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues.get(key);\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = Object(__WEBPACK_IMPORTED_MODULE_6_pouchdb_mapreduce_utils__[\"i\" /* uniq */])(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKeyValueDocs(metaDoc, kvDocsRes);\n });\n });\n }", "async function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n const metaDocId = '_local/doc_' + docId;\n const defaultMetaDoc = {_id: metaDocId, keys: []};\n const docData = docIdsToChangesAndEmits.get(docId);\n const indexableKeysToKeyValues = docData[0];\n const changes = docData[1];\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return Promise.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return Promise.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKeyValueDocs(metaDoc, kvDocsRes) {\n const kvDocs = [];\n const oldKeys = new Set();\n\n for (let i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n const row = kvDocsRes.rows[i];\n const doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeys.add(doc._id);\n doc._deleted = !indexableKeysToKeyValues.has(doc._id);\n if (!doc._deleted) {\n const keyValue = indexableKeysToKeyValues.get(doc._id);\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n const newKeys = mapToKeysArray(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeys.has(key)) {\n // new doc\n const kvDoc = {\n _id: key\n };\n const keyValue = indexableKeysToKeyValues.get(key);\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n const metaDoc = await getMetaDoc();\n const keyValueDocs = await getKeyValueDocs(metaDoc);\n return processKeyValueDocs(metaDoc, keyValueDocs);\n }", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits[docId];\n var indexableKeysToKeyValues = docData.indexableKeysToKeyValues;\n var changes = docData.changes;\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return Promise.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return Promise.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKvDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeysMap = {};\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeysMap[doc._id] = true;\n doc._deleted = !indexableKeysToKeyValues[doc._id];\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues[doc._id];\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n\n var newKeys = Object.keys(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeysMap[key]) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues[key];\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = utils.uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKvDocs(metaDoc, kvDocsRes);\n });\n });\n}", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits[docId];\n var indexableKeysToKeyValues = docData.indexableKeysToKeyValues;\n var changes = docData.changes;\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return Promise.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return Promise.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKvDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeysMap = {};\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeysMap[doc._id] = true;\n doc._deleted = !indexableKeysToKeyValues[doc._id];\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues[doc._id];\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n\n var newKeys = Object.keys(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeysMap[key]) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues[key];\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = pouchdbMapreduceUtils.uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKvDocs(metaDoc, kvDocsRes);\n });\n });\n}", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits[docId];\n var indexableKeysToKeyValues = docData.indexableKeysToKeyValues;\n var changes = docData.changes;\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return Promise.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId)[\"catch\"](defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return Promise.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKvDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeysMap = {};\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeysMap[doc._id] = true;\n doc._deleted = !indexableKeysToKeyValues[doc._id];\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues[doc._id];\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n\n var newKeys = Object.keys(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeysMap[key]) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues[key];\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = utils.uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKvDocs(metaDoc, kvDocsRes);\n });\n });\n}", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits.get(docId);\n var indexableKeysToKeyValues = docData[0];\n var changes = docData[1];\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return Promise.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId)[\"catch\"](defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return Promise.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKeyValueDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeys = new ExportedSet();\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeys.add(doc._id);\n doc._deleted = !indexableKeysToKeyValues.has(doc._id);\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues.get(doc._id);\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n var newKeys = mapToKeysArray(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeys.has(key)) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues.get(key);\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKeyValueDocs(metaDoc, kvDocsRes);\n });\n });\n }", "stateChanges(events) {\n if (!events || events.length === 0) {\n return docChanges(this.query, this.afs.schedulers.outsideAngular).pipe(this.afs.keepUnstableUntilFirst);\n }\n return docChanges(this.query, this.afs.schedulers.outsideAngular)\n .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(actions => actions.filter(change => events.indexOf(change.type) > -1)), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"filter\"])(changes => changes.length > 0), this.afs.keepUnstableUntilFirst);\n }", "_getTheActualUpdatedDocuments (newDocs, oldDocs, propToCheck = 'provider_name') {\n const result = {};\n\n newDocs.forEach((newDoc, index) => {\n const docId = newDoc.id;\n\n result[docId] = {};\n result[docId]['from'] = {};\n result[docId]['to'] = {};\n\n if (newDoc[propToCheck] !== oldDocs[index][propToCheck]) {\n result[docId]['from'][propToCheck] = oldDocs[index][propToCheck];\n result[docId]['to'][propToCheck] = newDoc[propToCheck];\n }\n })\n\n return result;\n }", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits.get(docId);\n var indexableKeysToKeyValues = docData[0];\n var changes = docData[1];\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return Promise.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return Promise.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKeyValueDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeys = new ExportedSet();\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeys.add(doc._id);\n doc._deleted = !indexableKeysToKeyValues.has(doc._id);\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues.get(doc._id);\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n var newKeys = mapToKeysArray(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeys.has(key)) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues.get(key);\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKeyValueDocs(metaDoc, kvDocsRes);\n });\n });\n }", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits.get(docId);\n var indexableKeysToKeyValues = docData[0];\n var changes = docData[1];\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return Promise.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return Promise.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKeyValueDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeys = new ExportedSet();\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeys.add(doc._id);\n doc._deleted = !indexableKeysToKeyValues.has(doc._id);\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues.get(doc._id);\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n var newKeys = mapToKeysArray(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeys.has(key)) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues.get(key);\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKeyValueDocs(metaDoc, kvDocsRes);\n });\n });\n }", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits.get(docId);\n var indexableKeysToKeyValues = docData[0];\n var changes = docData[1];\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return Promise.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId)[\"catch\"](defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return Promise.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKeyValueDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeys = new ExportedSet();\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeys.add(doc._id);\n doc._deleted = !indexableKeysToKeyValues.has(doc._id);\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues.get(doc._id);\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n var newKeys = mapToKeysArray(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeys.has(key)) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues.get(key);\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = uniq$1(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKeyValueDocs(metaDoc, kvDocsRes);\n });\n });\n }", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits[docId];\n var indexableKeysToKeyValues = docData.indexableKeysToKeyValues;\n var changes = docData.changes;\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return PouchPromise.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return PouchPromise.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKvDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeysMap = {};\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeysMap[doc._id] = true;\n doc._deleted = !indexableKeysToKeyValues[doc._id];\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues[doc._id];\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n\n var newKeys = Object.keys(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeysMap[key]) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues[key];\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKvDocs(metaDoc, kvDocsRes);\n });\n });\n}", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits[docId];\n var indexableKeysToKeyValues = docData.indexableKeysToKeyValues;\n var changes = docData.changes;\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return PouchPromise.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return PouchPromise.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKvDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeysMap = {};\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeysMap[doc._id] = true;\n doc._deleted = !indexableKeysToKeyValues[doc._id];\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues[doc._id];\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n\n var newKeys = Object.keys(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeysMap[key]) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues[key];\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKvDocs(metaDoc, kvDocsRes);\n });\n });\n}", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits[docId];\n var indexableKeysToKeyValues = docData.indexableKeysToKeyValues;\n var changes = docData.changes;\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return PouchPromise.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId)[\"catch\"](defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return PouchPromise.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKvDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeysMap = {};\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeysMap[doc._id] = true;\n doc._deleted = !indexableKeysToKeyValues[doc._id];\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues[doc._id];\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n\n var newKeys = Object.keys(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeysMap[key]) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues[key];\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKvDocs(metaDoc, kvDocsRes);\n });\n });\n}", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n\t var metaDocId = '_local/doc_' + docId;\n\t var defaultMetaDoc = {_id: metaDocId, keys: []};\n\t var docData = docIdsToChangesAndEmits[docId];\n\t var indexableKeysToKeyValues = docData.indexableKeysToKeyValues;\n\t var changes = docData.changes;\n\t\n\t function getMetaDoc() {\n\t if (isGenOne(changes)) {\n\t // generation 1, so we can safely assume initial state\n\t // for performance reasons (avoids unnecessary GETs)\n\t return PouchPromise.resolve(defaultMetaDoc);\n\t }\n\t return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n\t }\n\t\n\t function getKeyValueDocs(metaDoc) {\n\t if (!metaDoc.keys.length) {\n\t // no keys, no need for a lookup\n\t return PouchPromise.resolve({rows: []});\n\t }\n\t return view.db.allDocs({\n\t keys: metaDoc.keys,\n\t include_docs: true\n\t });\n\t }\n\t\n\t function processKvDocs(metaDoc, kvDocsRes) {\n\t var kvDocs = [];\n\t var oldKeysMap = {};\n\t\n\t for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n\t var row = kvDocsRes.rows[i];\n\t var doc = row.doc;\n\t if (!doc) { // deleted\n\t continue;\n\t }\n\t kvDocs.push(doc);\n\t oldKeysMap[doc._id] = true;\n\t doc._deleted = !indexableKeysToKeyValues[doc._id];\n\t if (!doc._deleted) {\n\t var keyValue = indexableKeysToKeyValues[doc._id];\n\t if ('value' in keyValue) {\n\t doc.value = keyValue.value;\n\t }\n\t }\n\t }\n\t\n\t var newKeys = Object.keys(indexableKeysToKeyValues);\n\t newKeys.forEach(function (key) {\n\t if (!oldKeysMap[key]) {\n\t // new doc\n\t var kvDoc = {\n\t _id: key\n\t };\n\t var keyValue = indexableKeysToKeyValues[key];\n\t if ('value' in keyValue) {\n\t kvDoc.value = keyValue.value;\n\t }\n\t kvDocs.push(kvDoc);\n\t }\n\t });\n\t metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));\n\t kvDocs.push(metaDoc);\n\t\n\t return kvDocs;\n\t }\n\t\n\t return getMetaDoc().then(function (metaDoc) {\n\t return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n\t return processKvDocs(metaDoc, kvDocsRes);\n\t });\n\t });\n\t}", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n\t var metaDocId = '_local/doc_' + docId;\n\t var defaultMetaDoc = {_id: metaDocId, keys: []};\n\t var docData = docIdsToChangesAndEmits.get(docId);\n\t var indexableKeysToKeyValues = docData[0];\n\t var changes = docData[1];\n\n\t function getMetaDoc() {\n\t if (isGenOne(changes)) {\n\t // generation 1, so we can safely assume initial state\n\t // for performance reasons (avoids unnecessary GETs)\n\t return PouchPromise.resolve(defaultMetaDoc);\n\t }\n\t return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n\t }\n\n\t function getKeyValueDocs(metaDoc) {\n\t if (!metaDoc.keys.length) {\n\t // no keys, no need for a lookup\n\t return PouchPromise.resolve({rows: []});\n\t }\n\t return view.db.allDocs({\n\t keys: metaDoc.keys,\n\t include_docs: true\n\t });\n\t }\n\n\t function processKeyValueDocs(metaDoc, kvDocsRes) {\n\t var kvDocs = [];\n\t var oldKeys = new ExportedSet();\n\n\t for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n\t var row = kvDocsRes.rows[i];\n\t var doc = row.doc;\n\t if (!doc) { // deleted\n\t continue;\n\t }\n\t kvDocs.push(doc);\n\t oldKeys.add(doc._id);\n\t doc._deleted = !indexableKeysToKeyValues.has(doc._id);\n\t if (!doc._deleted) {\n\t var keyValue = indexableKeysToKeyValues.get(doc._id);\n\t if ('value' in keyValue) {\n\t doc.value = keyValue.value;\n\t }\n\t }\n\t }\n\t var newKeys = mapToKeysArray(indexableKeysToKeyValues);\n\t newKeys.forEach(function (key) {\n\t if (!oldKeys.has(key)) {\n\t // new doc\n\t var kvDoc = {\n\t _id: key\n\t };\n\t var keyValue = indexableKeysToKeyValues.get(key);\n\t if ('value' in keyValue) {\n\t kvDoc.value = keyValue.value;\n\t }\n\t kvDocs.push(kvDoc);\n\t }\n\t });\n\t metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));\n\t kvDocs.push(metaDoc);\n\n\t return kvDocs;\n\t }\n\n\t return getMetaDoc().then(function (metaDoc) {\n\t return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n\t return processKeyValueDocs(metaDoc, kvDocsRes);\n\t });\n\t });\n\t }", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n\t var metaDocId = '_local/doc_' + docId;\n\t var defaultMetaDoc = {_id: metaDocId, keys: []};\n\t var docData = docIdsToChangesAndEmits.get(docId);\n\t var indexableKeysToKeyValues = docData[0];\n\t var changes = docData[1];\n\n\t function getMetaDoc() {\n\t if (isGenOne$2(changes)) {\n\t // generation 1, so we can safely assume initial state\n\t // for performance reasons (avoids unnecessary GETs)\n\t return PouchPromise$1.resolve(defaultMetaDoc);\n\t }\n\t return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n\t }\n\n\t function getKeyValueDocs(metaDoc) {\n\t if (!metaDoc.keys.length) {\n\t // no keys, no need for a lookup\n\t return PouchPromise$1.resolve({rows: []});\n\t }\n\t return view.db.allDocs({\n\t keys: metaDoc.keys,\n\t include_docs: true\n\t });\n\t }\n\n\t function processKeyValueDocs(metaDoc, kvDocsRes) {\n\t var kvDocs = [];\n\t var oldKeys = new ExportedSet$1();\n\n\t for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n\t var row = kvDocsRes.rows[i];\n\t var doc = row.doc;\n\t if (!doc) { // deleted\n\t continue;\n\t }\n\t kvDocs.push(doc);\n\t oldKeys.add(doc._id);\n\t doc._deleted = !indexableKeysToKeyValues.has(doc._id);\n\t if (!doc._deleted) {\n\t var keyValue = indexableKeysToKeyValues.get(doc._id);\n\t if ('value' in keyValue) {\n\t doc.value = keyValue.value;\n\t }\n\t }\n\t }\n\t var newKeys = mapToKeysArray$1(indexableKeysToKeyValues);\n\t newKeys.forEach(function (key) {\n\t if (!oldKeys.has(key)) {\n\t // new doc\n\t var kvDoc = {\n\t _id: key\n\t };\n\t var keyValue = indexableKeysToKeyValues.get(key);\n\t if ('value' in keyValue) {\n\t kvDoc.value = keyValue.value;\n\t }\n\t kvDocs.push(kvDoc);\n\t }\n\t });\n\t metaDoc.keys = uniq$1(newKeys.concat(metaDoc.keys));\n\t kvDocs.push(metaDoc);\n\n\t return kvDocs;\n\t }\n\n\t return getMetaDoc().then(function (metaDoc) {\n\t return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n\t return processKeyValueDocs(metaDoc, kvDocsRes);\n\t });\n\t });\n\t }", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits.get(docId);\n var indexableKeysToKeyValues = docData[0];\n var changes = docData[1];\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return PouchPromise$1.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return PouchPromise$1.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKeyValueDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeys = new ExportedSet();\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeys.add(doc._id);\n doc._deleted = !indexableKeysToKeyValues.has(doc._id);\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues.get(doc._id);\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n var newKeys = mapToKeysArray(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeys.has(key)) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues.get(key);\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKeyValueDocs(metaDoc, kvDocsRes);\n });\n });\n }", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits.get(docId);\n var indexableKeysToKeyValues = docData[0];\n var changes = docData[1];\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return PouchPromise$1.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return PouchPromise$1.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKeyValueDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeys = new ExportedSet();\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeys.add(doc._id);\n doc._deleted = !indexableKeysToKeyValues.has(doc._id);\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues.get(doc._id);\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n var newKeys = mapToKeysArray(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeys.has(key)) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues.get(key);\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKeyValueDocs(metaDoc, kvDocsRes);\n });\n });\n }", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits.get(docId);\n var indexableKeysToKeyValues = docData[0];\n var changes = docData[1];\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return PouchPromise.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return PouchPromise.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKeyValueDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeys = new ExportedSet();\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeys.add(doc._id);\n doc._deleted = !indexableKeysToKeyValues.has(doc._id);\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues.get(doc._id);\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n var newKeys = mapToKeysArray(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeys.has(key)) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues.get(key);\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKeyValueDocs(metaDoc, kvDocsRes);\n });\n });\n }", "function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {\n var metaDocId = '_local/doc_' + docId;\n var defaultMetaDoc = {_id: metaDocId, keys: []};\n var docData = docIdsToChangesAndEmits.get(docId);\n var indexableKeysToKeyValues = docData[0];\n var changes = docData[1];\n\n function getMetaDoc() {\n if (isGenOne(changes)) {\n // generation 1, so we can safely assume initial state\n // for performance reasons (avoids unnecessary GETs)\n return PouchPromise$1.resolve(defaultMetaDoc);\n }\n return view.db.get(metaDocId)[\"catch\"](defaultsTo(defaultMetaDoc));\n }\n\n function getKeyValueDocs(metaDoc) {\n if (!metaDoc.keys.length) {\n // no keys, no need for a lookup\n return PouchPromise$1.resolve({rows: []});\n }\n return view.db.allDocs({\n keys: metaDoc.keys,\n include_docs: true\n });\n }\n\n function processKeyValueDocs(metaDoc, kvDocsRes) {\n var kvDocs = [];\n var oldKeys = new ExportedSet();\n\n for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {\n var row = kvDocsRes.rows[i];\n var doc = row.doc;\n if (!doc) { // deleted\n continue;\n }\n kvDocs.push(doc);\n oldKeys.add(doc._id);\n doc._deleted = !indexableKeysToKeyValues.has(doc._id);\n if (!doc._deleted) {\n var keyValue = indexableKeysToKeyValues.get(doc._id);\n if ('value' in keyValue) {\n doc.value = keyValue.value;\n }\n }\n }\n var newKeys = mapToKeysArray(indexableKeysToKeyValues);\n newKeys.forEach(function (key) {\n if (!oldKeys.has(key)) {\n // new doc\n var kvDoc = {\n _id: key\n };\n var keyValue = indexableKeysToKeyValues.get(key);\n if ('value' in keyValue) {\n kvDoc.value = keyValue.value;\n }\n kvDocs.push(kvDoc);\n }\n });\n metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));\n kvDocs.push(metaDoc);\n\n return kvDocs;\n }\n\n return getMetaDoc().then(function (metaDoc) {\n return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {\n return processKeyValueDocs(metaDoc, kvDocsRes);\n });\n });\n }", "getUserChange(transaction) {\n const result = [];\n let value = roundedDecimal(transaction.paid - transaction.owed); // determine what is owed\n const override = this.setOverrides(value); // set any available override(s)\n\n // get user's change for transaction\n while (value > 0) {\n const denomination = this.getDenomination(value, override); // returns object\n const remainder = value - denomination.value; // Update Difference\n value = roundedDecimal(remainder);\n result.push(denomination.name); // Push user's change to array until we reach 0\n }\n // console.warn(\"Result: \", result);\n return result;\n }", "get docChanged() { return !this.changes.empty; }", "snapshotToArray(snapshot) {\n var returnArr = [];\n\n snapshot.forEach(function(childSnapshot) {\n var item = childSnapshot.val();\n item.key = childSnapshot.key;\n\n returnArr.push(item);\n });\n\n return returnArr;\n }", "snapshotToArray(snapshot) {\n var returnArr = [];\n\n snapshot.forEach(function(childSnapshot) {\n var item = childSnapshot.val();\n item.key = childSnapshot.key;\n\n returnArr.push(item);\n });\n\n return returnArr;\n }", "function throwDocChangesMethodError(){throw new index_esm_FirestoreError(Code.INVALID_ARGUMENT,'QuerySnapshot.docChanges has been changed from a property into a '+'method, so usages like \"querySnapshot.docChanges\" should become '+'\"querySnapshot.docChanges()\"');}", "onEventCommit({ changes }) {\n [...changes.added, ...changes.modified].forEach((eventRecord) => this.repaintEvent(eventRecord));\n }", "async getHistory() {\n this.setState({ loading: true });\n const db = firebase.firestore(firebaseApp);\n const result = { statusResponse: true, error: null, history: [] };\n try {\n const histDoc = await db\n .collection(\"history\")\n .where(\"idUser\", \"==\", getCurrentUser().uid)\n .get();\n await Promise.all(\n map(histDoc.docs, async (doc) => {\n const record = doc.data();\n result.history.push(record);\n })\n );\n } catch (error) {\n result.statusResponse = false;\n result.error = error;\n }\n return result;\n }", "function r2changes(results) {\n return results.map(function(res) { return res.slice(1) }).filter(function(changes) { return changes.length })\n }", "function getChanges(target, changeState) {\n var state = $.data(target, 'datagrid');\n var insertedRows = state.insertedRows;\n var deletedRows = state.deletedRows;\n var updatedRows = state.updatedRows;\n\n if (!changeState) {\n var rows = [];\n rows = rows.concat(insertedRows);\n rows = rows.concat(deletedRows);\n rows = rows.concat(updatedRows);\n return rows;\n } else if (changeState == 'inserted') {\n return insertedRows;\n } else if (changeState == 'deleted') {\n return deletedRows;\n } else if (changeState == 'updated') {\n return updatedRows;\n }\n\n return [];\n }", "function snapshotToArray(snapshot) {\n var returnArr = [];\n snapshot.forEach(function (childSnapshot) {\n var item = childSnapshot.val();\n item.key = childSnapshot.key;\n\n returnArr.push(item);\n });\n return returnArr;\n }", "function listChanges(auth) {\n console.log(\"checking for changes for changeID: \" + changeId);\n\n //for keeping track of last revision time\n var lastRevisionTime = 0;\n\n var service = google.drive('v2');\n service.changes.list({\n auth: auth,\n startChangeId: changeId\n }, function(err, response) {\n if (err) {\n console.log('The API returned an error: ' + err);\n numChanges = 0;\n return;\n }\n\n var changes = response.items;\n\n //if there are no changes, don't update change ID\n if (changes.length == 0) {\n console.log('No changes.');\n numChanges = 0;\n\n //if there aren't any immediate changes, check the docs that have already been edited\n for (var i = 0; i < fileIds.length; i++) {\n console.log(\"checking file: \" + fileIds[i]);\n //this uses a different API call\n getLastRevision(auth, fileIds[i]);\n }\n } \n\n //otherwise, get the changes\n else {\n //console.log('Recent changes:');\n\n for (var i = 0; i < changes.length; i++) {\n var change = changes[i];\n if (change.kind == \"drive#change\") {\n /*console.log(\"kind: \" + change.file.kind);\n console.log(\"title: \" + change.file.title);\n console.log(\"modifiedDate: \" + change.file.modifiedDate);\n console.log(\"lastModifyingUserName: \" + change.file.lastModifyingUserName);\n console.log(\"lastModifiedByMeDate:\" + change.file.modifiedByMeDate);\n console.log(\"lastViewedByMe:\" + change.file.lastViewedByMeDate);\n console.log(\"version: \" + change.file.version);*/\n\n //get the last time the document was viewed by the user\n var lastViewTime = Date.parse(change.file.lastViewedByMeDate);\n //get the last time the document was modified (either by user or someone else)\n var lastModifyTime = Date.parse(change.file.modifiedDate);\n\n //if the last view time was the same time or after the last modification, then reset number of unviewed changes\n if (lastViewTime - lastModifyTime >= 0) {\n totalUnviewedChanges = 0;\n }\n //otherwise, update number of unviewed changes\n else {\n totalUnviewedChanges++;\n }\n\n //get file id\n var fileId = change.file.id;\n //if a unique ID, add to file list\n if (fileIds.indexOf(fileId) == -1) {\n fileIds.push(fileId);\n }\n }\n }\n\n //update time difference between last modification time and current time\n if (Date.parse(changes[changes.length-1].file.modifiedDate) > lastChangeTime) {\n lastChangeTime = Date.parse(changes[changes.length-1].file.modifiedDate);\n editDelta = Date.now() - lastChangeTime;\n\n //send data\n if (useSerial) {\n sendSerialData();\n }\n else {\n sendCloudData(editDelta, activityFunction);\n sendCloudData(totalUnviewedChanges, changesFunction);\n }\n }\n\n //now update change ID for next call\n changeId = parseInt(response.largestChangeId) + 1;\n }\n });\n}", "get docChanged() {\n return !this.changes.empty;\n }", "function manejarSnapshot(snapshot) {\n const aforos = snapshot.docs.map(doc => {\n return {\n id: doc.id,\n ...doc.data()\n }\n });\n\n // almacenar los resultados en el state\n guadarAforo(aforos);\n }", "function getItemViews(){\n let viewsArr = [];\n for (let i = 0; i < allItems.length; i++){\n viewsArr.push(allItems[i].viewed);\n }\n return viewsArr;\n}", "async function calBalance(userId,date) {\n var ratio;\n await admin.firestore().collection(\"users\").doc(userId).collection(\"ratio-record\").orderBy(\"timestamp\", \"desc\").limit(1).get()\n .then(function (querySnapshot) {\n querySnapshot.forEach(function (doc) {\n // doc.data() is never undefined for query doc snapshots\n ratio = doc.data()\n });\n });\n //console.log(ratio)\n\n var data = [\n breakfastData = { rice: 0, fruits: 0, vegetable: 0, milk: 0, meat: 0, fat: 0, sugar: 0, sodium: 0 },\n morningsnackData = { rice: 0, fruits: 0, vegetable: 0, milk: 0, meat: 0, fat: 0, sugar: 0, sodium: 0 },\n lunchData = { rice: 0, fruits: 0, vegetable: 0, milk: 0, meat: 0, fat: 0, sugar: 0, sodium: 0 },\n afternoonsnackData = { rice: 0, fruits: 0, vegetable: 0, milk: 0, meat: 0, fat: 0, sugar: 0, sodium: 0 },\n dinnerData = { rice: 0, fruits: 0, vegetable: 0, milk: 0, meat: 0, fat: 0, sugar: 0, sodium: 0 },\n beforebedData = { rice: 0, fruits: 0, vegetable: 0, milk: 0, meat: 0, fat: 0, sugar: 0, sodium: 0 }\n ]\n await admin.firestore().collection(\"users\").doc(userId).collection(\"diary\").doc(date).collection('breakfast').get()\n .then(snapshot => {\n snapshot.forEach(doc => {\n data[0].rice = data[0].rice + doc.data().rice\n data[0].fruits = data[0].fruits + doc.data().fruits\n data[0].vegetable = data[0].vegetable + doc.data().vegetable\n data[0].milk = data[0].milk + doc.data().milk\n data[0].meat = data[0].meat + doc.data().meat\n data[0].fat = data[0].fat + doc.data().fat\n data[0].sugar = data[0].sugar + doc.data().sugar\n data[0].sodium = data[0].sodium + doc.data().sodium\n });\n })\n await admin.firestore().collection(\"users\").doc(userId).collection(\"diary\").doc(date).collection('morningsnack').get()\n .then(snapshot => {\n snapshot.forEach(doc => {\n data[1].rice = data[1].rice + doc.data().rice\n data[1].fruits = data[1].fruits + doc.data().fruits\n data[1].vegetable = data[1].vegetable + doc.data().vegetable\n data[1].milk = data[1].milk + doc.data().milk\n data[1].meat = data[1].meat + doc.data().meat\n data[1].fat = data[1].fat + doc.data().fat\n data[1].sugar = data[1].sugar + doc.data().sugar\n data[1].sodium = data[1].sodium + doc.data().sodium\n });\n })\n await admin.firestore().collection(\"users\").doc(userId).collection(\"diary\").doc(date).collection('lunch').get()\n .then(snapshot => {\n snapshot.forEach(doc => {\n data[2].rice = data[2].rice + doc.data().rice\n data[2].fruits = data[2].fruits + doc.data().fruits\n data[2].vegetable = data[2].vegetable + doc.data().vegetable\n data[2].milk = data[2].milk + doc.data().milk\n data[2].meat = data[2].meat + doc.data().meat\n data[2].fat = data[2].fat + doc.data().fat\n data[2].sugar = data[2].sugar + doc.data().sugar\n data[2].sodium = data[2].sodium + doc.data().sodium\n });\n })\n await admin.firestore().collection(\"users\").doc(userId).collection(\"diary\").doc(date).collection('afternoonsnack').get()\n .then(snapshot => {\n snapshot.forEach(doc => {\n data[3].rice = data[3].rice + doc.data().rice\n data[3].fruits = data[3].fruits + doc.data().fruits\n data[3].vegetable = data[3].vegetable + doc.data().vegetable\n data[3].milk = data[3].milk + doc.data().milk\n data[3].meat = data[3].meat + doc.data().meat\n data[3].fat = data[3].fat + doc.data().fat\n data[3].sugar = data[3].sugar + doc.data().sugar\n data[3].sodium = data[3].sodium + doc.data().sodium\n });\n })\n await admin.firestore().collection(\"users\").doc(userId).collection(\"diary\").doc(date).collection('dinner').get()\n .then(snapshot => {\n snapshot.forEach(doc => {\n data[4].rice = data[4].rice + doc.data().rice\n data[4].fruits = data[4].fruits + doc.data().fruits\n data[4].vegetable = data[4].vegetable + doc.data().vegetable\n data[4].milk = data[4].milk + doc.data().milk\n data[4].meat = data[4].meat + doc.data().meat\n data[4].fat = data[4].fat + doc.data().fat\n data[4].sugar = data[4].sugar + doc.data().sugar\n data[4].sodium = data[4].sodium + doc.data().sodium\n });\n })\n await admin.firestore().collection(\"users\").doc(userId).collection(\"diary\").doc(date).collection('beforebed').get()\n .then(snapshot => {\n snapshot.forEach(doc => {\n data[5].rice = data[5].rice + doc.data().rice\n data[5].fruits = data[5].fruits + doc.data().fruits\n data[5].vegetable = data[5].vegetable + doc.data().vegetable\n data[5].milk = data[5].milk + doc.data().milk\n data[5].meat = data[5].meat + doc.data().meat\n data[5].fat = data[5].fat + doc.data().fat\n data[5].sugar = data[5].sugar + doc.data().sugar\n data[5].sodium = data[5].sodium + doc.data().sodium\n });\n })\n\n var dataTotal = {\n rice: data[0].rice + data[1].rice + data[2].rice + data[3].rice + data[4].rice + data[5].rice,\n fruits: data[0].fruits + data[1].fruits + data[2].fruits + data[3].fruits + data[4].fruits + data[5].fruits,\n vegetable: data[0].vegetable + data[1].vegetable + data[2].vegetable + data[3].vegetable + data[4].vegetable + data[5].vegetable,\n milk: data[0].milk + data[1].milk + data[2].milk + data[3].milk + data[4].milk + data[5].milk,\n meat: data[0].meat + data[1].meat + data[2].meat + data[3].meat + data[4].meat + data[5].meat,\n fat: data[0].fat + data[1].fat + data[2].fat + data[3].fat + data[4].fat + data[5].fat,\n sugar: data[0].sugar + data[1].sugar + data[2].sugar + data[3].sugar + data[4].sugar + data[5].sugar,\n sodium: data[0].sodium + data[1].sodium + data[2].sodium + data[3].sodium + data[4].sodium + data[5].sodium,\n }\n\n //console.log(dataTotal)\n var balance = {\n rice: calculate(ratio.rice, dataTotal.rice),\n fruits: calculate(ratio.fruits, dataTotal.fruits),\n vegetable: calculate(ratio.vegetable, dataTotal.vegetable),\n milk: calculate(ratio.milk, dataTotal.milk),\n meat: calculate(ratio.meat, dataTotal.meat),\n fat: calculate(ratio.fat, dataTotal.fat),\n sugar: calculate(ratio.sugar, dataTotal.sugar),\n sodium: calculate(ratio.sodium, dataTotal.sodium),\n }\n //console.log(balance)\n\n await admin.firestore().collection(\"users\").doc(userId).collection(\"diary\").doc(date).collection(\"history\").doc(\"ratio\").set(ratio);\n await admin.firestore().collection(\"users\").doc(userId).collection(\"diary\").doc(date).collection(\"history\").doc(\"total\").set(dataTotal);\n await admin.firestore().collection(\"users\").doc(userId).collection(\"diary\").doc(date).collection(\"history\").doc(\"balance\").set(balance);\n\n\n function calculate(ratio, dataTotal) {\n var result = ratio - dataTotal\n\n return parseFloat(result)\n }\n}", "function ListenForUpdates() {\r\n // query to listen to real time updates in user recent_chats collection\r\n const query = db.collection('chats')\r\n .where('participants', 'array-contains', cur_email)\r\n .orderBy('last_updated');\r\n\r\n query.onSnapshot(async snapshot => {\r\n for (const change of snapshot.docChanges()) {\r\n //console.log(change);\r\n if (document.querySelector(\"#chat-sidebar-new\").contains(document.getElementById(change.doc.id))){\r\n document.querySelector(\"#chat-sidebar-new\").removeChild(document.getElementById(change.doc.id));\r\n }\r\n if (change.type === 'added') {\r\n const data = change.doc.data();\r\n const id = change.doc.id;\r\n chat_photourl = \"\";\r\n chat_name = \"\";\r\n if (data.name) {\r\n chat_name = data.name;\r\n if (data.photo_url) {\r\n chat_photourl = data.photo_url ? data.photo_url : '/images/user/pp.png';\r\n } else {\r\n chat_photourl = \"\";\r\n }\r\n } else {\r\n const details = await GetDetails(data.participants);\r\n chat_name = details[0].name;\r\n chat_photourl = details[0].photo ? details[0].photo : '/images/user/pp.png';\r\n chat_email = details[1];\r\n chat_status = details[0].status;\r\n }\r\n recent_chats.push(chat_email);\r\n var chat_time= data.last_updated ? data.last_updated.toDate() : new Date();\r\n AddDiv(id, chat_name, chat_photourl, data.last_message, chat_status, chat_email, chat_time, true); // Recent Chats\r\n } else if (change.type === \"modified\") {\r\n RefreshDiv(change.doc.id, change.doc.data().last_message, change.doc.data().last_updated);\r\n } else if (change.type === \"removed\") {\r\n RemoveDiv(change.doc.id);\r\n }\r\n }\r\n });\r\n NewChats();\r\n}", "getEvents(arr) {\n var ref = this;\n ref.events = arr;\n ref.nEvents = arr.length;\n }", "async listenerVehicules() {\n // Obtain user id from credentials \n if (!this.uid)\n await this.getUID() \n \n let vehicules = []\n\n await db.collection('users').doc(this.uid).collection('vehicules').onSnapshot(querySnapshot => {\n querySnapshot.docChanges().forEach(change => {\n if (change.type === 'added' || change.type === 'modified') {\n //console.log('New/modified Vehicule: ', change.doc.data())\n let vehicule = change.doc.data()\n let loadVehicule = new Vehicule(vehicule.plate, \n vehicule.name, \n vehicule.type,\n vehicule.brand,\n vehicule.model,\n vehicule.height,\n vehicule.width,\n vehicule.depth)\n vehicules.push(loadVehicule)\n }\n if (change.type === 'removed') {\n //console.log('Removed Vehicule: ', change.doc.data())\n }\n })\n }) \n return vehicules\n }", "static change(array) {\n let change = [];\n array.reduce(function (accumulator, currentValue, currentIndex, array) {\n if (currentIndex === 0) {\n accumulator = currentValue;\n }\n change.push(currentValue - accumulator);\n return currentValue;\n }, array[0]);\n return change;\n }", "function throwDocChangesMethodError() {\n throw new FirestoreError(Code.INVALID_ARGUMENT, 'QuerySnapshot.docChanges has been changed from a property into a ' + 'method, so usages like \"querySnapshot.docChanges\" should become ' + '\"querySnapshot.docChanges()\"');\n }", "function average_change(row, col, numrow, numcol) {\n var change_array = historic_data.getRange(row, col, numrow, numcol).getValues()[0] // returns column array\n var change_total = 0\n for (var i = 0; i < change_array.length; i ++) {\n change_total += change_array[i]\n }\n var avg_change = Math.round(change_total/change_array.length*100)/100\n return avg_change\n}", "onViewChange(e){\n\t\tconst view = e.target.value;\n\t\tvar oldSort = this.state.sort;\n\t\tthis.setState({ sort: 'date' });\n\t\tthis.setState({ view: view });\n\n\t\tconst originalList = this.state.items;\n\t\tvar newList = [];\n\n\t\tswitch (view){\n\t\t\tcase 'mygroups':\n\t\t\t\t\tnewList = this.state.myGroups;\n\t\t\t\t\tbreak;\n\t\t\tcase 'followed':\n\t\t\t\t\tnewList = this.state.followedGroups;\n\t\t\t\t\tbreak;\n\t\t\tcase 'all':\n\t\t\t\t\tnewList = this.state.items;\n\t\t\t\t\tbreak;\n\t\t}\n\n this.setState({ viewItems: newList });\n\n\t\tthis.sortChange(oldSort, newList);\n\t}", "copyEvents (array_ref) {\n var i = 0\n var obj = {}\n for (i = 0; i < this.props.events.length; i++) {\n if( this.props.events[i].hasOwnProperty('included') ) {\n if (this.props.events[i].included === false) {\n continue\n }\n }\n if (this.props.events[i].date) {\n obj.date = date_obj_to_string(this.props.events[i].date)\n } else {\n continue\n }\n if (is_numeric(this.props.events[i].rate)) {\n obj.rate = Number(this.props.events[i].rate)\n }\n if (is_numeric(this.props.events[i].recurring_amount)) {\n obj.recurring_amount = Number(this.props.events[i].recurring_amount)\n }\n if (is_numeric(this.props.events[i].pay_installment)) {\n obj.pay_installment = Number(this.props.events[i].pay_installment)\n }\n if (is_numeric(this.props.events[i].pay_reduction)) {\n obj.pay_reduction = Number(this.props.events[i].pay_reduction)\n }\n if (is_numeric(this.props.events[i].single_payment_fee)) {\n obj.pay_single_fee = Number(this.props.events[i].single_payment_fee)\n }\n if (is_numeric(this.props.events[i].recurring_payment_fee)) {\n obj.recurring_fee_amount = Number(this.props.events[i].recurring_payment_fee)\n }\n if (this.props.events[i].payment_method) {\n obj.payment_method = this.props.events[i].payment_method\n }\n array_ref.push(Object.assign({}, obj))\n obj = {}\n }\n }", "function getCampaignHistories(campaign_id) {\n console.info('Querying campaign', campaign_id);\n return db.collection('campaigns').doc(campaign_id)\n .collection('campaignHistory').orderBy('time_stamp', 'desc').get()\n .then(querySnapshot => {\n const histories = [];\n querySnapshot.docs.forEach(doc => {\n histories.push(doc.data());\n });\n return histories;\n });\n}", "static onUpdateData(col, fn) {\n db.collection(col).onSnapshot(snapshot => {\n snapshot.docChanges().forEach(change => {\n if (change.type === 'modified') fn();\n });\n });\n }", "async getDates(doctorName, department, hospital, email) {\n blockAppointments = []\n var i = 1\n querySnapshot = await firebase.firestore().collection(\"hospital\").doc(hospital).collection(\"Departments\").doc(department).collection(\"Doctors\").doc(doctorName).collection(\"Appointments\").get();\n querySnapshot.forEach((doc) => {\n this.loadEvents(doc.id, doctorName, department, hospital, email).then((res) => {\n if (typeof res[0] != 'undefined') {\n blockAppointments.push(res)\n this.setState({ events: blockAppointments })\n }\n })\n })\n return blockAppointments\n }", "_rebaseChange(args, cb) {\n this.documentEngine.getChanges({\n documentId: args.documentId,\n sinceVersion: args.version\n }, function(err, result) {\n let B = result.changes.map(this.deserializeChange)\n let a = this.deserializeChange(args.change)\n // transform changes\n DocumentChange.transformInplace(a, B)\n let ops = B.reduce(function(ops, change) {\n return ops.concat(change.ops)\n }, [])\n let serverChange = new DocumentChange(ops, {}, {})\n\n cb(null, {\n change: this.serializeChange(a),\n serverChange: this.serializeChange(serverChange),\n version: result.version\n })\n }.bind(this))\n }", "function getLogToAnalyze(request){\n\nvar log =[];\nreturn MIRESAdmin.firestore().collection(MIRESconfig.MIRES_log).where('timestamp', '>=', request.data.timestamp).get()\n.then(snapshot => {\n if(snapshot.empty){\n console.log(\"getLogToAnalyze function: log is empty.\");\n return log;\n }\n else{\n // Get the existing log\n snapshot.forEach(doc => {\n const logRow ={\n id:doc.id,\n data:doc.data(),\n }\n log.push(logRow);\n });\n return log;\n }\n })\n .catch(err => {\n throw new Error(\"getLogToAnalyze function: \"+err);\n }); \n}", "function combineChange(combined, change) {\n switch (change.type) {\n case 'added':\n if (combined[change.newIndex] && combined[change.newIndex].doc.ref.isEqual(change.doc.ref)) {\n // Not sure why the duplicates are getting fired\n }\n else {\n return sliceAndSplice(combined, change.newIndex, 0, change);\n }\n break;\n case 'modified':\n if (combined[change.oldIndex] == null || combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {\n // When an item changes position we first remove it\n // and then add it's new position\n if (change.oldIndex !== change.newIndex) {\n const copiedArray = combined.slice();\n copiedArray.splice(change.oldIndex, 1);\n copiedArray.splice(change.newIndex, 0, change);\n return copiedArray;\n }\n else {\n return sliceAndSplice(combined, change.newIndex, 1, change);\n }\n }\n break;\n case 'removed':\n if (combined[change.oldIndex] && combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {\n return sliceAndSplice(combined, change.oldIndex, 1);\n }\n break;\n }\n return combined;\n}", "updateRecordArrays() {\n this.store.recordArrayManager.recordDidChange(this);\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n for (var i = 0, copy = []; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue;\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m;\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n }\n }\n }\n return copy;\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n for (var i = 0, copy = []; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue;\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m;\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n }\n }\n }\n return copy;\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n for (var i = 0, copy = []; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue;\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m;\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n }\n }\n }\n return copy;\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n for (var i = 0, copy = []; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue;\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m;\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n }\n }\n }\n return copy;\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n for (var i = 0, copy = []; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue;\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m;\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n }\n }\n }\n return copy;\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n for (var i = 0, copy = []; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue;\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m;\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n }\n }\n }\n return copy;\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\n for (var i = 0, copy = []; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue;\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m;\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n }\n }\n }\n return copy;\n }", "function copyHistoryArray(events, newGroup, instantiateSel) {\r\n var copy = [];\r\n for (var i = 0; i < events.length; ++i) {\r\n var event = events[i];\r\n if (event.ranges) {\r\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\r\n continue\r\n }\r\n var changes = event.changes, newChanges = [];\r\n copy.push({changes: newChanges});\r\n for (var j = 0; j < changes.length; ++j) {\r\n var change = changes[j], m = (void 0);\r\n newChanges.push({from: change.from, to: change.to, text: change.text});\r\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\r\n if (indexOf(newGroup, Number(m[1])) > -1) {\r\n lst(newChanges)[prop] = change[prop];\r\n delete change[prop];\r\n }\r\n } } }\r\n }\r\n }\r\n return copy\r\n}", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = []\n for (var i = 0; i < events.length; ++i) {\n var event = events[i]\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event)\n continue\n }\n var changes = event.changes, newChanges = []\n copy.push({changes: newChanges})\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0)\n newChanges.push({from: change.from, to: change.to, text: change.text})\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop]\n delete change[prop]\n }\n } } }\n }\n }\n return copy\n}", "function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = []\n for (var i = 0; i < events.length; ++i) {\n var event = events[i]\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event)\n continue\n }\n var changes = event.changes, newChanges = []\n copy.push({changes: newChanges})\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0)\n newChanges.push({from: change.from, to: change.to, text: change.text})\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop]\n delete change[prop]\n }\n } } }\n }\n }\n return copy\n}" ]
[ "0.68647707", "0.68630606", "0.68630606", "0.673613", "0.63643783", "0.6356479", "0.6356479", "0.63383365", "0.63383365", "0.6289973", "0.62876195", "0.5635551", "0.54318357", "0.5415221", "0.5406787", "0.5406787", "0.540614", "0.528469", "0.5258782", "0.5249162", "0.52283615", "0.5161187", "0.5151129", "0.51313466", "0.51093787", "0.51093787", "0.5108511", "0.50693595", "0.5069049", "0.5055659", "0.5023183", "0.5023183", "0.5018261", "0.5004837", "0.5004837", "0.500218", "0.49999383", "0.4988313", "0.49792653", "0.49731454", "0.49731454", "0.49663562", "0.49610016", "0.49591243", "0.4939965", "0.4887757", "0.48858982", "0.48477367", "0.48192614", "0.48054564", "0.47813097", "0.47720692", "0.47669464", "0.47400957", "0.4729034", "0.46740866", "0.46659932", "0.46628803", "0.46538672", "0.46505624", "0.46382478", "0.46354595", "0.4615501", "0.4602145", "0.45976952", "0.45953143", "0.45932165", "0.4586537", "0.45735568", "0.45729545", "0.45724452", "0.45710552", "0.45610246", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45542398", "0.45535827", "0.45535827", "0.45535827", "0.45535827", "0.45535827", "0.45535827", "0.45535827", "0.4548447", "0.45451578", "0.45451578" ]
0.6690844
4
Configures Firestore as part of the Firebase SDK by calling registerService.
function configureForFirebase(firebase$$1){firebase$$1.INTERNAL.registerService('firestore',function(app){return new index_esm_Firestore(app);},shallowCopy(firestoreNamespace));}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function registerFirestore(instance){configureForFirebase(instance);}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\n}", "function configureForFirebase(firebase) {\r\n firebase.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\r\n}", "function configureForFirebase(firebase) {\r\n firebase.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\r\n}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) {\n return new Firestore(app);\n }, shallowCopy(firestoreNamespace));\n}", "function configureForFirebase(firebase$$1) {\n firebase$$1.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\n}", "function configureForFirebase(firebase$$1) {\n firebase$$1.INTERNAL.registerService('firestore', function (app) { return new Firestore(app); }, shallowCopy(firestoreNamespace));\n}", "function registerFirestore(instance) {\n configureForFirebase(instance);\n}", "function registerFirestore(instance) {\n configureForFirebase(instance);\n}", "function registerFirestore(instance) {\n configureForFirebase(instance);\n}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new __WEBPACK_IMPORTED_MODULE_1__api_database__[\"a\" /* Firestore */](app); }, Object(__WEBPACK_IMPORTED_MODULE_5__util_obj__[\"f\" /* shallowCopy */])(firestoreNamespace));\n}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerComponent(new component.Component('firestore', function (container) {\n var app = container.getProvider('app').getImmediate();\n return new Firestore(app, container.getProvider('auth-internal'));\n }, \"PUBLIC\"\n /* PUBLIC */\n ).setServiceProps(shallowCopy(firestoreNamespace)));\n }", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new __WEBPACK_IMPORTED_MODULE_1__api_database__[\"i\" /* Firestore */](app); }, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__util_obj__[\"a\" /* shallowCopy */])(firestoreNamespace));\n}", "function configureForFirebase(firebase) {\n firebase.INTERNAL.registerService('firestore', function (app) { return new __WEBPACK_IMPORTED_MODULE_1__api_database__[\"i\" /* Firestore */](app); }, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__util_obj__[\"a\" /* shallowCopy */])(firestoreNamespace));\n}", "function configureForFirebase(firebase) {\r\n firebase.INTERNAL.registerComponent(new component.Component('firestore', function (container) {\r\n var app = container.getProvider('app').getImmediate();\r\n return new Firestore(app, container.getProvider('auth-internal'));\r\n }, \"PUBLIC\" /* PUBLIC */).setServiceProps(shallowCopy(firestoreNamespace)));\r\n}", "function registerFirestore(instance) {\n Object(__WEBPACK_IMPORTED_MODULE_2__src_platform_config__[\"a\" /* configureForFirebase */])(instance);\n}", "function registerFirestore(instance) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__src_platform_config__[\"a\" /* configureForFirebase */])(instance);\n}", "function registerFirestore(instance) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__src_platform_config__[\"a\" /* configureForFirebase */])(instance);\n}", "function firebase_setup(){\n /*\n var firebaseConfig = {\n apiKey: \"AIzaSyB0ZY93KxJK4UIRVnyXWqNm2V1l1M-4j_4\",\n authDomain: \"office-inventory-12f99.firebaseapp.com\",\n databaseURL: \"https://office-inventory-12f99.firebaseio.com\",\n projectId: \"office-inventory-12f99\",\n storageBucket: \"office-inventory-12f99.appspot.com\",\n messagingSenderId: \"147848186588\",\n appId: \"1:147848186588:web:33dbc8d727af1de4\"\n };\n // Initialize Firebase\n firebase.initializeApp(firebaseConfig);\n db = firebase.firestore();\n */\n}", "constructor(options, nameOrConfig, shouldEnablePersistence, settings, \n // tslint:disable-next-line:ban-types\n platformId, zone, persistenceSettings, _useEmulator, useAuthEmulator) {\n this.schedulers = new _angular_fire__WEBPACK_IMPORTED_MODULE_3__[\"ɵAngularFireSchedulers\"](zone);\n this.keepUnstableUntilFirst = Object(_angular_fire__WEBPACK_IMPORTED_MODULE_3__[\"ɵkeepUnstableUntilFirstFactory\"])(this.schedulers);\n const app = Object(_angular_fire__WEBPACK_IMPORTED_MODULE_3__[\"ɵfirebaseAppFactory\"])(options, zone, nameOrConfig);\n if (!firebase_app__WEBPACK_IMPORTED_MODULE_5___default.a.auth && useAuthEmulator) {\n Object(_angular_fire__WEBPACK_IMPORTED_MODULE_3__[\"ɵlogAuthEmulatorError\"])();\n }\n const useEmulator = _useEmulator;\n [this.firestore, this.persistenceEnabled$] = Object(_angular_fire__WEBPACK_IMPORTED_MODULE_3__[\"ɵfetchInstance\"])(`${app.name}.firestore`, 'AngularFirestore', app, () => {\n const firestore = zone.runOutsideAngular(() => app.firestore());\n if (settings) {\n firestore.settings(settings);\n }\n if (useEmulator) {\n firestore.useEmulator(...useEmulator);\n }\n if (shouldEnablePersistence && !Object(_angular_common__WEBPACK_IMPORTED_MODULE_4__[\"isPlatformServer\"])(platformId)) {\n // We need to try/catch here because not all enablePersistence() failures are caught\n // https://github.com/firebase/firebase-js-sdk/issues/608\n const enablePersistence = () => {\n try {\n return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__[\"from\"])(firestore.enablePersistence(persistenceSettings || undefined).then(() => true, () => false));\n }\n catch (e) {\n if (typeof console !== 'undefined') {\n console.warn(e);\n }\n return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__[\"of\"])(false);\n }\n };\n return [firestore, zone.runOutsideAngular(enablePersistence)];\n }\n else {\n return [firestore, Object(rxjs__WEBPACK_IMPORTED_MODULE_1__[\"of\"])(false)];\n }\n }, [settings, useEmulator, shouldEnablePersistence]);\n }", "constructor() {\n app.initializeApp(config);\n this.appAuth = app.auth();\n this.googleProvider = new firebase.auth.GoogleAuthProvider();\n this.db = firebase.firestore();\n this.functions = firebase.functions();\n this.rdb = firebase.database().ref(); //Real time database\n }", "function initializeFirebase(){\n var config = {\n apiKey: \"AIzaSyAg4AuCkuiw4VgVIYtFKU4JQgF0PzfzlTA\",\n authDomain: \"memoize-216516.firebaseapp.com\",\n databaseURL: \"https://memoize-216516.firebaseio.com\",\n projectId: \"memoize-216516\",\n storageBucket: \"memoize-216516.appspot.com\",\n messagingSenderId: \"889544015679\"\n };\n firebase.initializeApp(config);\n \n\n var db = firebase.firestore();\n var storage = firebase.storage();\n return [db,storage];\n\n}", "function initializeDB() {\n if (!firebase.apps.length) {\n app = firebase.initializeApp(firebaseConfig);\n } else {\n app = firebase.app();\n }\n db = firebase.firestore(app);\n console.log(\"DB initialized!\");\n}", "function initialize() {\n try {\n if (admin.apps.length === 0) {\n admin.initializeApp({\n credential: admin.credential.cert(serviceAccount),\n databaseURL: process.env.DATABASE_URL,\n databaseAuthVariableOverride: {\n uid: process.env.UID_OVERRIDE\n }\n });\n }\n } catch (error) {\n console.error(error);\n throw Error(\"Can't setup a connection to Firebase. Check logs\");\n }\n}", "function initFirebase () {\n firebase.initializeApp(firebaseConfig);\n return new Promise((resolve, reject) => {\n firebase.firestore().enablePersistence()\n .then(resolve)\n .catch(err => {\n if (err.code === 'failed-precondition') {\n reject(err)\n // Multiple tabs open, persistence can only be\n // enabled in one tab at a a time.\n } else if (err.code === 'unimplemented') {\n reject(err)\n // The current browser does not support all of\n // the features required to enable persistence\n }\n })\n })\n}", "static db() {\n return firebase.firestore();\n }", "function FirebaseService(firebase) {\n this._firebase = firebase;\n }", "function initializeFirebase() {\n firebase.initializeApp(getFirebaseConfig(inProduction()));\n}", "static initialize(handleFirebaseCriticalSyncErrorCallback = () => { }) {\n if (isInitialized)\n throw new Error('Firebase service is already initialized.');\n\n firebaseFailureHandled = false;\n onFirebaseFailedCallbacks = [];\n handleFirebaseCriticalSyncError = handleFirebaseCriticalSyncErrorCallback;\n\n return new Promise(async (resolve, reject) => {\n try {\n // Initialize firebase.\n firebaseApp = firebase.initializeApp(config);\n\n firebase.auth().onAuthStateChanged((user) => {\n if (user) {\n isSignedIn = true;\n currentUserUID = user.uid;\n }\n else\n isSignedIn = false;\n\n isInitialized = true;\n\n resolve(currentUserUID);\n });\n\n // Initialize firestore\n firestore = firebase.firestore();\n }\n catch (error) {\n reject(error);\n }\n });\n\n }", "async initFirebase(config) {\n if (!Firebase.apps || Firebase.apps.length == 0) {\n Firebase.initializeApp(config);\n }\n }", "_ensureClient() {\n if (!this._clientInitialized) {\n common = require('@google-cloud/common');\n\n this._clientInitialized = new Promise((resolve, reject) => {\n this._firestoreClient = module.exports\n .v1beta1(this._initalizationOptions)\n .firestoreClient(this._initalizationOptions);\n\n Firestore.log('Firestore', 'Initialized Firestore GAPIC Client');\n\n // We schedule Project ID detection using `setImmediate` to allow the\n // testing framework to provide its own implementation of\n // `getProjectId`.\n setImmediate(() => {\n this._firestoreClient.getProjectId((err, projectId) => {\n if (err) {\n Firestore.log(\n 'Firestore._ensureClient',\n 'Failed to detect project ID: %s',\n err\n );\n reject(err);\n } else {\n Firestore.log(\n 'Firestore._ensureClient',\n 'Detected project ID: %s',\n projectId\n );\n this._referencePath = new ResourcePath(\n projectId,\n this._referencePath.databaseId\n );\n resolve();\n }\n });\n });\n });\n }\n return this._clientInitialized;\n }", "function firebaseInit() {\n if (!$window.firebase.apps.length) {\n var firebaseConfig = {\n apiKey: 'AIzaSyBGm_Gwo7zUW3TjAKkVoODZ6g6n4Jx6z9w',\n authDomain: 'flh-pvstation.firebaseapp.com',\n databaseURL: 'https://flh-pvstation.firebaseio.com',\n storageBucket: 'flh-pvstation.appspot.com'\n };\n $window.firebase.initializeApp(firebaseConfig);\n }\n }", "function pu(t) {\n !function(t, e) {\n t.INTERNAL.registerComponent(new o.Component(\"firestore\", (function(t) {\n return function(t, e) {\n var n = new Oo, r = new Po(n);\n return new zs(t, e, r, n);\n }(t.getProvider(\"app\").getImmediate(), t.getProvider(\"auth-internal\"));\n }), \"PUBLIC\" /* PUBLIC */).setServiceProps(Object.assign({}, lu)));\n }(t), t.registerVersion(\"@firebase/firestore\", \"1.16.6\");\n}", "static createConection() {\n try {\n //if (this._db && this._storageFirebase && this._auth) {\n if (this._auth) { \n return Firebase.getConection();\n }\n\n // initialize firebase\n// admin.initializeApp({\n// credential: admin.credential.cert(serviceAccount),\n// apiKey: SDK_Firebase.apiKey,\n// projectId: SDK_Firebase.projectId,\n// storageBucket: SDK_Firebase.storageBucket\n// });\n console.log(\"llamo a admin.initializeApp()\");\n admin.initializeApp({\n credential: admin.credential.cert(serviceAccount),\n });\n\n const settings = { timestampsInSnapshots: true };\n admin.firestore().settings(settings);\n\n // fireStore DB\n this._db = admin.firestore();\n\n // auth object\n this._auth = admin.auth();\n\n return {\n auth: this._auth\n };\n } catch (e) {\n throw customError(\"Error Firebase\", \"createConection\", 500, e);\n }\n }", "setFirebaseServiceAccount(firebaseServiceAccount) {\n this.firebaseServiceAccount = firebaseServiceAccount\n }", "async function getFirestore (store) {\n const firestore = Firebase.firestore()\n try {\n await firestore.enablePersistence()\n } catch (err) {\n console.log('err.code → ', err.code)\n if (err.code === 'failed-precondition') {\n // Multiple tabs open, persistence can only be enabled in one tab at a a time.\n let message = store.getters.text.api['firebase/failed-precondition']\n Notify.create({ message, preset: 'error' })\n } else if (err.code === 'unimplemented') {\n // The current browser does not support all of the\n // features required to enable persistence\n return firestore\n }\n }\n return firestore\n}", "constructor() {\n\t\tsuper();\n\t\tthis.firebase = new Firebase();\n\t\t// Add a new collection to Firebase.\n\t\tthis.users = this.firebase.child('users');\n\n\t\tthis.signup();\n\t\tthis.signin();\n\t\tthis.signout();\n\t}", "function setup(){\n\tinitializeFirebase();\n\tvar database = firebase.database();\n\tvar featuredRef = database.ref(\"Featured/\");\n\tsetupIndex(featuredRef);\n}", "function FirebaseAuthService(firebase) {\n this._firebase = firebase;\n }", "initFirebase({ dispatch, state }) {\n if (!firebase.apps.length) {\n firebase.initializeApp(state.firebaseConfig);\n }\n\n firebase.auth().onAuthStateChanged(async (user) => {\n if (user) {\n // Create an entry for the user\n await firebase.database().ref(`/users/${user.uid}`).set({\n name: user.displayName,\n email: user.email,\n photo_url: user.photoURL,\n });\n\n dispatch('setUser', user);\n dispatch('firebaseFeedback');\n } else {\n dispatch('firebaseFeedback');\n }\n });\n }", "static async init () {\n if (!collections.DOCUMENT_COLL) {\n throw new Error('Missing env variable');\n }\n Document.COLLECTION = collections.DOCUMENT_COLL;\n Document.validator = new SchemaValidator();\n const instance = Mongo.instance();\n\n await Document.validator.init({ schemas: [schema] });\n\n Document.db = instance.getDb();\n }", "function init() {\n // connect to the taco database\n dbRef = firebase.database();\n\n // wire up the taco eaters collection\n tacoEatersRef = dbRef.ref('tacoEaters');\n tacoEatersCollection = $firebaseArray(tacoEatersRef);\n tacoEatersRef.on('value', function (snapshot) {\n var eaters = snapshotToArray(snapshot);\n service.users = _.map(eaters, mapUsers);\n $rootScope.$broadcast('firebase.usersUpdated');\n\n // set up activity and leaderboard\n service.activity = getActivityFeed(service.users);\n console.log(service.activity);\n service.leaderboard = getLeaderBoard(service.users);\n });\n\n // set up the user ref if we can\n addUserRef();\n }", "init() {\n switch(Config.backend) {\n case \"firebase_storage\":\n this.engine = FirebaseStorage;\n break;\n }\n if (this.engine) this.engine.init();\n }", "function setupGoogleServices(auth) {\n const PROJECT_ID = 'fitly-327819';\n const TOPIC_ID = PROJECT_ID + '-topic';\n const SUB_ID = 'projects/' + PROJECT_ID + '/subscriptions/' + TOPIC_ID + '-sub';\n\n const GOOGLE_GMAIL_USER = google.gmail({version: 'v1'}).users;\n const TOPIC_STR = 'projects/' + PROJECT_ID + '/topics/' + TOPIC_ID;\n initGmailWatcher(\n GOOGLE_GMAIL_USER,\n {\n userId: 'me',\n auth: auth,\n resource: {\n labelIds: ['INBOX'],\n topicName : TOPIC_STR\n }\n }\n );\n\n const messageHandler = message => {\n const gmailQuery = \"from:\" + config.PHONE_NUMBER_EMAIL;\n GOOGLE_GMAIL_USER.messages.list({userId: 'me', auth: auth, q: gmailQuery}).then((listData) => {\n GOOGLE_GMAIL_USER.messages.get({userId: 'me', auth: auth, id: listData.data.messages[0].id}).then((messageData) => {\n let dataPoints = messageData.data.snippet.split('; ');\n\n // we want to verify the list split\n // we're expecting something like \"[ '10/02/21', '4.52km', '35:00', '346' ]\"\n if(dataPoints.length === 4) {\n console.log('Creating database entry...');\n run.createRun(dataPoints[0], dataPoints[1], dataPoints[2], dataPoints[3]);\n }\n });\n });\n\n message.ack();\n };\n\n new PubSub({\n PROJECT_ID,\n keyFilename: '/home/john/Desktop/fit-ly/fitly-service.json'\n }).subscription(SUB_ID).on('message', messageHandler);\n}", "function initializeFirebase() {\n const firebaseConfig = {\n apiKey: \"AIzaSyD1DP3Fg9S8UEKKpyt7XknY6vickoJ3eFs\",\n authDomain: \"instyle-3f5f5.firebaseapp.com\",\n databaseURL:\n \"https://instyle-3f5f5-default-rtdb.europe-west1.firebasedatabase.app\",\n projectId: \"instyle-3f5f5\",\n storageBucket: \"instyle-3f5f5.appspot.com\",\n messagingSenderId: \"8399215605\",\n appId: \"1:8399215605:web:09ba5877b522ef0abe5ebc\",\n };\n //initialize firebase\n if (firebase.apps.length === 0) {\n firebase.initializeApp(firebaseConfig);\n }\n }", "function initialize_firebase() {\n // Initialize Firebase\n\n firebase.initializeApp(firebase_configuration);\n firebase_ref = firebase;\n firebase_database = firebase.database();\n firebase_authentication = firebase.auth();\n firebase_storage = firebase.storage();\n console.log(\"Firebase Initialized\");\n\n // Setup authentiation state change action\n firebase_authentication.onAuthStateChanged(on_authentication_state_changed);\n\n // Setup sign-in Page\n setup_sign_in_controls();\n}", "function e(e, n) {\n var r = this;\n return (r = t.call(this, e, n) || this)._firestore = e, r;\n }", "function e(e, n) {\n var r = this;\n return (r = t.call(this, e, n) || this)._firestore = e, r;\n }", "function e(e, n) {\n var r = this;\n return (r = t.call(this, e, n) || this)._firestore = e, r;\n }", "function PublicacionesService(firestore) {\n _classCallCheck(this, PublicacionesService);\n\n this.publicacionesCollection = firestore.collection('PublicacionesGenerales'); //this.probar1 = firestore.collection('Publicaciones'.where(\"Visibilidad\", \"==\", true).get();\n\n this.publicaciones = this.publicacionesCollection.snapshotChanges().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (actions) {\n return actions.map(function (a) {\n var data = a.payload.doc.data();\n var id = a.payload.doc.id;\n return Object.assign({\n id: id\n }, data);\n });\n }));\n this.publicacionesMateriaCollection = firestore.collection('Publicaciones', function (ref) {\n return ref.orderBy(\"Fecha\", \"desc\");\n });\n this.publicacionesMateria = this.publicacionesMateriaCollection.snapshotChanges().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (actions) {\n return actions.map(function (a) {\n var data = a.payload.doc.data();\n var id = a.payload.doc.id;\n return Object.assign({\n id: id\n }, data);\n });\n }));\n }", "function firebaseInit()\n{\n var firebaseConfig = {\n\tapiKey: \"AIzaSyDz4KVH1_aoVs0tcofy1cxHkI05AIP0PCY\",\n\tauthDomain: \"robox-3666f.firebaseapp.com\",\n\tdatabaseURL: \"https://robox-3666f.firebaseio.com\",\n\tprojectId: \"robox-3666f\",\n\tstorageBucket: \"robox-3666f.appspot.com\",\n\tmessagingSenderId: \"356472837055\",\n\tappId: \"1:356472837055:web:3491df60bef9212534470a\"\n };\n\n firebase.initializeApp(firebaseConfig);\n}", "function install (Vue, options) {\n console.error('Docservice.install()', options)\n if (_docservice) {\n console.error(\"Vue.use(Docservice) has already been called.\")\n return\n }\n let tmpvue = new Vue()\n let $content = tmpvue.$content\n if ( !$content) {\n console.error(\"$content not defined. Please register ContentService before calling Vue.use(Docservice).\")\n return\n }\n\n // _Vue = Vue\n\n // Create ourselves a Docservice Object\n _docservice = new Docservice(options)\n\n // const isDef = v => v !== undefined\n\n // Vue.mixin adds an additional 'beforeCreate' function to it's\n // list of functions to be called when new Vue is created. We'll\n // use it to look for new Vue({ Docservice }). If found, we'll\n // consider this to be the root. If it is not found, then we will\n // assume this is a child of the root, and create pointers back\n // to the root.\n //Vue.mixin({\n Vue.mixin({\n beforeCreate () {\n // console.log('vue-docservice: index.js - beforeCreate()')\n\n if (!this.$parent) {\n //if (isDef(this.$options.docservice)) {\n // console.error('Initializing ROOT *********')\n // This must be the root, since we found docservice in it's options.\n this._docserviceRoot = this\n this._docservice = _docservice\n // this._docservice.init(this)\n Vue.util.defineReactive(this, '_docservice', this.$docservice)\n // Vue.util.defineReactive(this, '_docservice', this._docservice.jwt)\n // Vue.util.defineReactive(this, '_docservice', this._docservice.fromCache)\n } else {\n //console.log('Initialise new child')\n this._docserviceRoot = this.$parent._docserviceRoot\n }\n },\n destroyed () {\n // registerInstance(this)\n }\n })\n\n // As described above, the Vue instances form a hierachy. The mixin\n // above ensures that each instance has an '_docserviceRoot' field\n // that points to the instance where 'docservice' was passed to new Vue({ }).\n // Note that it's _docserviceRoot might actually point to itself.\n Object.defineProperty(Vue.prototype, '$docservice', {\n get () { return this._docserviceRoot._docservice }\n })\n\n\n /*\n * Register our components with Contentservice\n */\n\n // Google Slides Widget\n $content.registerWidget(Vue, {\n name: 'google-slides',\n label: 'Slides',\n category: 'Google Docs',\n iconClass: 'fa fa-file-powerpoint-o',\n iconClass5: 'far fa-file-powerpoint',\n dragtype: 'component',\n\n // Register native Vue templates\n componentName: 'content-google-slides',\n component: ContentGoogleSlides,\n propertyComponent: ContentGoogleSlidesProps,\n\n // Identical structure to a CUT or COPY from edit mode.\n data: {\n type: \"contentservice.io\",\n version: \"1.0\",\n source: \"toolbox\",\n layout: {\n type: 'google-slides',\n //docId: '2PACX-1vT14-yIpiY4EbQN0XscNBhMuJDZ-k4n03-cWPEgK_kyCTP35ehchuWiPDrTq2TIGYl6nFToRGQRJXZl'\n }\n }\n })\n\n\n // Google Sheets Widget\n $content.registerWidget(Vue, {\n name: 'google-sheets',\n label: 'Sheets',\n category: 'Google Docs',\n iconClass: 'fa fa-file-excel-o',\n iconClass5: 'far fa-file-excel',\n dragtype: 'component',\n\n // Register native Vue templates\n componentName: 'content-google-sheets',\n component: ContentGoogleSheets,\n propertyComponent: ContentGoogleSheetsProps,\n\n // Identical structure to a CUT or COPY from edit mode.\n data: {\n type: \"contentservice.io\",\n version: \"1.0\",\n source: \"toolbox\",\n layout: {\n type: 'google-sheets',\n //docId: '2PACX-1vT14-yIpiY4EbQN0XscNBhMuJDZ-k4n03-cWPEgK_kyCTP35ehchuWiPDrTq2TIGYl6nFToRGQRJXZl'\n }\n }\n })\n\n\n // Google Doc Widget\n $content.registerWidget(Vue, {\n name: 'google-docs',\n label: 'Doc',\n category: 'Google Docs',\n iconClass: 'fa fa-file-word-o',\n iconClass5: 'far fa-file-word',\n dragtype: 'component',\n\n // Register native Vue templates\n componentName: 'content-google-docs',\n component: ContentGoogleDocs,\n propertyComponent: ContentGoogleDocsProps,\n\n // Identical structure to a CUT or COPY from edit mode.\n data: {\n type: \"contentservice.io\",\n version: \"1.0\",\n source: \"toolbox\",\n layout: {\n type: 'google-docs',\n //docId: '2PACX-1vT14-yIpiY4EbQN0XscNBhMuJDZ-k4n03-cWPEgK_kyCTP35ehchuWiPDrTq2TIGYl6nFToRGQRJXZl'\n }\n }\n })\n\n // $content.registerLayoutType(Vue, 'google-slides', 'content-google-slides', ContentGoogleSlides, ContentGoogleSlidesProps)\n // $content.registerLayoutType(Vue, 'google-sheets', 'content-google-sheets', ContentGoogleSheets, ContentGoogleSheetsProps)\n // $content.registerLayoutType(Vue, 'google-docs', 'content-google-docs', ContentGoogleDocs, ContentGoogleDocsProps)\n\n\n // Initialise the store\n Vue.use(Vuex)\n let store = new Vuex.Store(DocserviceStore);\n _docservice.store = store\n console.log(`YARP docservice has a new store`, store);\n\n return _docservice\n} //- install()", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n if (allowMultipleInstances === void 0) { allowMultipleInstances = false; }\r\n // If re-registering a service that already exists, return existing service\r\n if (factories[name]) {\r\n logger.debug(\"There were multiple attempts to register service \" + name + \".\");\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return namespace[name];\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n function serviceNamespace(appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n // @ts-ignore\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n throw ERROR_FACTORY.create(\"invalid-app-argument\" /* INVALID_APP_ARGUMENT */, {\r\n appName: name\r\n });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n // @ts-ignore\r\n return appArg[name]();\r\n }\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n // @ts-ignore\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n // @ts-ignore\r\n firebaseAppImpl.prototype[name] =\r\n // TODO: The eslint disable can be removed and the 'ignoreRestArgs'\r\n // option added to the no-explicit-any rule when ESlint releases it.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n if (allowMultipleInstances === void 0) { allowMultipleInstances = false; }\r\n // If re-registering a service that already exists, return existing service\r\n if (factories[name]) {\r\n logger.debug(\"There were multiple attempts to register service \" + name + \".\");\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return namespace[name];\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n function serviceNamespace(appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n // @ts-ignore\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n throw ERROR_FACTORY.create(\"invalid-app-argument\" /* INVALID_APP_ARGUMENT */, {\r\n appName: name\r\n });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n // @ts-ignore\r\n return appArg[name]();\r\n }\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n // @ts-ignore\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n // @ts-ignore\r\n firebaseAppImpl.prototype[name] =\r\n // TODO: The eslint disable can be removed and the 'ignoreRestArgs'\r\n // option added to the no-explicit-any rule when ESlint releases it.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }", "function configureForStandalone(exportObject) {\n var copiedNamespace = Object(__WEBPACK_IMPORTED_MODULE_5__util_obj__[\"f\" /* shallowCopy */])(firestoreNamespace);\n // Unlike the use with Firebase, the standalone allows the use of the\n // constructor, so export it's internal class\n copiedNamespace['Firestore'] = __WEBPACK_IMPORTED_MODULE_1__api_database__[\"a\" /* Firestore */];\n exportObject['firestore'] = copiedNamespace;\n}", "function setUpAuth () {\n const serviceAccount = JSON.parse(fs.readFileSync(program.service_account_json));\n const jwtAccess = new google.auth.JWT();\n jwtAccess.fromJSON(serviceAccount);\n // Note that if you require additional scopes, they should be specified as a\n // string, separated by spaces.\n jwtAccess.scopes = 'https://www.googleapis.com/auth/cloud-platform';\n // Set the default authentication to the above JWT access.\n google.options({ auth: jwtAccess });\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.0.4',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: createSubscribe,\n ErrorFactory: ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!index_esm_contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n patchProperty(app, 'App', index_esm_FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) {\n rawConfig = {};\n }\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (index_esm_contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new index_esm_FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n index_esm_FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\n function extendNamespace(props) {\n deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n if (allowMultipleInstances === void 0) {\n allowMultipleInstances = false;\n } // Cannot re-register a service that already exists\n\n\n if (factories[name]) {\n throw ERROR_FACTORY.create(\"duplicate-service\"\n /* DUPLICATE_SERVICE */\n , {\n name: name\n });\n } // Capture the service factory for later service instantiation\n\n\n factories[name] = createService; // Capture the appHook, if passed\n\n if (appHook) {\n appHooks[name] = appHook; // Run the **new** app hook on all existing apps\n\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n } // The Service namespace is an accessor function ...\n\n\n function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n throw ERROR_FACTORY.create(\"invalid-app-argument\"\n /* INVALID_APP_ARGUMENT */\n , {\n name: name\n });\n } // Forward service instance lookup to the FirebaseApp.\n\n\n return appArg[name]();\n } // ... and a container for service-level properties.\n\n\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n } // Monkey-patch the serviceNamespace onto the firebase namespace\n\n\n namespace[name] = serviceNamespace; // Patch the FirebaseAppImpl prototype\n\n firebaseAppImpl.prototype[name] = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var serviceFxn = this._getService.bind(this, name);\n\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n\n return serviceNamespace;\n }", "startService () {\n // Start the service\n this.timerReference = setInterval(() => {\n // Check to see if a password has expired\n this.databaseManagerMongo.crawlTrackedCollection();\n }, this.configurationOptions.serviceInterval);\n }", "async [FmConfigAction.firebaseAuth](store, config) {\n const { commit, rootState, dispatch } = store;\n try {\n const db = await database();\n const auth = await db.auth();\n FireModel.defaultDb = db;\n const ctx = {\n Watch,\n Record,\n List,\n auth,\n db,\n config,\n dispatch,\n commit,\n state: rootState\n };\n auth.onAuthStateChanged(authChanged(ctx));\n auth.setPersistence(typeof config.auth === \"object\"\n ? config.auth.persistence || \"session\"\n : \"session\");\n }\n catch (e) {\n console.log(\"Problem hooking into onAuthStateChanged: \", e.message);\n console.log(e.stack);\n }\n }", "function App() {\n\n\tconst firebaseConfig = {\n\t\tapiKey: \"AIzaSyAJEciQYs_1Qop9MZTvMA8Z5kVh39cZ1YA\",\n\t\tauthDomain: \"orangenutri-91bff.firebaseapp.com\",\n\t\tprojectId: \"orangenutri-91bff\",\n\t\tstorageBucket: \"orangenutri-91bff.appspot.com\",\n\t\tmessagingSenderId: \"768344951920\",\n\t\tappId: \"1:768344951920:web:de21f9210317b10c0e38b5\", \n\t\tmeasurementId: \"G-RCBV4SFYYT\"\n\t}\n\n\tfirebase.initializeApp(firebaseConfig)\n\tconsole.log(firebase.firestore())\n\n\treturn (\n\t\t<>\n\t\t\t<Routes /> \n\t\t</>\n\t)\n}", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "componentWillMount () {\n const config = {\n apiKey: \"AIzaSyCb0oTczXHUmbVW8tDQ1ZigYb-N_YYvcnw\",\n authDomain: \"manager-2405b.firebaseapp.com\",\n databaseURL: \"https://manager-2405b.firebaseio.com\",\n projectId: \"manager-2405b\",\n storageBucket: \"manager-2405b.appspot.com\",\n messagingSenderId: \"528377064997\"\n };\n\n firebase.initializeApp(config);\n }", "constructor() {\n firebase.initializeApp(FirebaseConfig)\n\n // initialize the mobx-firebase store that we inherited from, pass in the reference to our firebase\n super(firebase.database().ref())\n\n // now let us create our SettingsStore data that we would like to pass around to other parts of our application\n this.splashTime = 500 // 5000 milliseconds = 5 seconds\n this.splashImg = require('../../images/Splash.jpg')\n\n // login\n this.loginBackgroundImg = require('../../images/Login.jpg')\n }", "function onDeviceReady() {\n firebaseApp();\n}", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function PublicidadService(firestore) {\n _classCallCheck(this, PublicidadService);\n\n this.publicidadCollection = firestore.collection('Publicidad'); //this.probar1 = firestore.collection('Publicaciones'.where(\"Visibilidad\", \"==\", true).get();\n\n this.publicidad = this.publicidadCollection.snapshotChanges().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (actions) {\n return actions.map(function (a) {\n var data = a.payload.doc.data();\n var id = a.payload.doc.id;\n return Object.assign({\n id: id\n }, data);\n });\n }));\n }", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.6.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.6.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n Object(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n '__esModule': true,\n 'initializeApp':\n /**\n * Create a new App instance (name must be unique).\n */\n function (options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { 'name': name + '' });\n }\n }\n if (apps_[name] !== undefined) {\n error('duplicate-app', { 'name': name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n ,\n 'app': app,\n 'apps': null,\n 'Promise': LocalPromise,\n 'SDK_VERSION': '4.1.1',\n 'INTERNAL': {\n 'registerService':\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function (name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { 'name': name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function () {\n var appArg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : app();\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { 'name': name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var serviceFxn = this._getService.bind(this, name);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n ,\n 'createFirebaseNamespace': createFirebaseNamespace,\n 'extendNamespace': function (props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n },\n 'createSubscribe': _subscribe.createSubscribe,\n 'ErrorFactory': _errors.ErrorFactory,\n 'removeApp':\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function (name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n ,\n 'factories': factories,\n 'useAsService': useAsService,\n 'Promise': _shared_promise.local.GoogPromise,\n 'deepExtend': _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n var result = apps_[name];\n if (result === undefined) {\n error('no-app', { 'name': name });\n }\n return result;\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n app.options;\n\n return name;\n }\n return namespace;\n}", "init() {\n if (this.__isInitialized) {\n return; // silently do nothing.\n }\n\n this.__isInitialized = true;\n let data = this.cursor.fetch();\n\n data.forEach(doc => {\n this.store[doc._id] = doc;\n });\n }", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n '__esModule': true,\n 'initializeApp':\n /**\n * Create a new App instance (name must be unique).\n */\n function (options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n } else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { 'name': name + '' });\n }\n }\n if (apps_[name] !== undefined) {\n error('duplicate-app', { 'name': name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n ,\n 'app': app,\n 'apps': null,\n 'Promise': LocalPromise,\n 'SDK_VERSION': '4.1.2',\n 'INTERNAL': {\n 'registerService':\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function (name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { 'name': name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function () {\n var appArg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : app();\n\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { 'name': name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var serviceFxn = this._getService.bind(this, name);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n ,\n 'createFirebaseNamespace': createFirebaseNamespace,\n 'extendNamespace': function (props) {\n (0, _deep_copy.deepExtend)(namespace, props);\n },\n 'createSubscribe': _subscribe.createSubscribe,\n 'ErrorFactory': _errors.ErrorFactory,\n 'removeApp':\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function (name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n ,\n 'factories': factories,\n 'useAsService': useAsService,\n 'Promise': _shared_promise.local.GoogPromise,\n 'deepExtend': _deep_copy.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n (0, _deep_copy.patchProperty)(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n var result = apps_[name];\n if (result === undefined) {\n error('no-app', { 'name': name });\n }\n return result;\n }\n (0, _deep_copy.patchProperty)(app, 'App', FirebaseAppImpl);function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n app.options;\n\n return name;\n }\n return namespace;\n}", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"I\" /* deepExtend */])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function startFirebase() {\n// Initialize Firebase\n var config = {\n apiKey: \"AIzaSyDAraVHUUUkR4L0yNE3P2n2jiF2jTNy6Kg\",\n authDomain: \"rps-multiplayer-e8125.firebaseapp.com\",\n databaseURL: \"https://rps-multiplayer-e8125.firebaseio.com\",\n projectId: \"rps-multiplayer-e8125\",\n storageBucket: \"rps-multiplayer-e8125.appspot.com\",\n messagingSenderId: \"763015821378\"\n };\n\n firebase.initializeApp(config);\n\n}", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "async [FmConfigAction.connect](store, config) {\n const { commit, dispatch, rootState } = store;\n if (!config) {\n throw new FireModelPluginError(`Connecting to database but NO configuration was present!`, \"not-allowed\");\n }\n try {\n const db = await database(config);\n FireModel.defaultDb = db;\n const ctx = {\n Watch,\n Record,\n List,\n dispatch,\n commit,\n db,\n config,\n state: rootState\n };\n await runQueue(ctx, \"connected\");\n commit(\"CONFIGURE\" /* configure */, config); // set Firebase configuration\n }\n catch (e) {\n throw new FireModelPluginError(`There was an issue connecting to the Firebase database: ${e.message}`, `vuex-plugin-firemodel/connection-problem`);\n }\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n\t // Cannot re-register a service that already exists\n\t if (factories[name]) {\n\t error('duplicate-service', { name: name });\n\t }\n\t // Capture the service factory for later service instantiation\n\t factories[name] = createService;\n\t // Capture the appHook, if passed\n\t if (appHook) {\n\t appHooks[name] = appHook;\n\t // Run the **new** app hook on all existing apps\n\t getApps().forEach(function (app) {\n\t appHook('create', app);\n\t });\n\t }\n\t // The Service namespace is an accessor function ...\n\t var serviceNamespace = function serviceNamespace(appArg) {\n\t if (appArg === void 0) {\n\t appArg = app();\n\t }\n\t if (typeof appArg[name] !== 'function') {\n\t // Invalid argument.\n\t // This happens in the following case: firebase.storage('gs:/')\n\t error('invalid-app-argument', { name: name });\n\t }\n\t // Forward service instance lookup to the FirebaseApp.\n\t return appArg[name]();\n\t };\n\t // ... and a container for service-level properties.\n\t if (serviceProperties !== undefined) {\n\t (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n\t }\n\t // Monkey-patch the serviceNamespace onto the firebase namespace\n\t namespace[name] = serviceNamespace;\n\t // Patch the FirebaseAppImpl prototype\n\t FirebaseAppImpl.prototype[name] = function () {\n\t var args = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t args[_i] = arguments[_i];\n\t }\n\t var serviceFxn = this._getService.bind(this, name);\n\t return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n\t };\n\t return serviceNamespace;\n\t }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\r\n // Cannot re-register a service that already exists\r\n if (factories[name]) {\r\n error('duplicate-service', { name: name });\r\n }\r\n // Capture the service factory for later service instantiation\r\n factories[name] = createService;\r\n // Capture the appHook, if passed\r\n if (appHook) {\r\n appHooks[name] = appHook;\r\n // Run the **new** app hook on all existing apps\r\n getApps().forEach(function (app) {\r\n appHook('create', app);\r\n });\r\n }\r\n // The Service namespace is an accessor function ...\r\n var serviceNamespace = function (appArg) {\r\n if (appArg === void 0) { appArg = app(); }\r\n if (typeof appArg[name] !== 'function') {\r\n // Invalid argument.\r\n // This happens in the following case: firebase.storage('gs:/')\r\n error('invalid-app-argument', { name: name });\r\n }\r\n // Forward service instance lookup to the FirebaseApp.\r\n return appArg[name]();\r\n };\r\n // ... and a container for service-level properties.\r\n if (serviceProperties !== undefined) {\r\n util.deepExtend(serviceNamespace, serviceProperties);\r\n }\r\n // Monkey-patch the serviceNamespace onto the firebase namespace\r\n namespace[name] = serviceNamespace;\r\n // Patch the FirebaseAppImpl prototype\r\n FirebaseAppImpl.prototype[name] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var serviceFxn = this._getService.bind(this, name);\r\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\r\n };\r\n return serviceNamespace;\r\n }", "function firebaseConfigModule(firebase){\n\n //firebase cfg\n const config = {\n apiKey: \"AIzaSyC0G_puVkQgwqL1wICl4TuQigccVJ2u7xw\",\n authDomain: \"scakapo-2f1c6.firebaseapp.com\",\n databaseURL: \"https://scakapo-2f1c6.firebaseio.com\",\n storageBucket: \"scakapo-2f1c6.appspot.com\",\n messagingSenderId: \"656327460988\"\n };\n\n //init firebase app\n firebase.initializeApp(config);\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.6.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "_initServices() {\n this._config.initServicesIma(ns, this._oc, this._config.services);\n\n this._config.plugins\n .filter(plugin => typeof plugin.module.initServices === 'function')\n .forEach(plugin => {\n plugin.module.initServices(ns, this._oc, this._config.services);\n });\n\n this._config.initServicesApp(ns, this._oc, this._config.services);\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n (0, _deep_copy.deepExtend)(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '4.8.1',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"createSubscribe\"],\n ErrorFactory: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"ErrorFactory\"],\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: __WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"]\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"patchProperty\"])(app, 'App', FirebaseAppImpl);\n /**\n * Create a new App instance (name must be unique).\n */\n function initializeApp(options, name) {\n if (name === undefined) {\n name = DEFAULT_ENTRY_NAME;\n }\n else {\n if (typeof name !== 'string' || name === '') {\n error('bad-app-name', { name: name + '' });\n }\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, name, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__firebase_util__[\"deepExtend\"])(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.8.3',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: util.createSubscribe,\n ErrorFactory: util.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: util.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n util.patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n util.patchProperty(app, 'App', FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) {\n rawConfig = {};\n }\n if ((typeof rawConfig === 'undefined' ? 'undefined' : _typeof(rawConfig)) !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) {\n return apps_[name];\n });\n }\n /*\r\n * Register a Firebase Service.\r\n *\r\n * firebase.INTERNAL.registerService()\r\n *\r\n * TODO: Implement serviceProperties.\r\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\n function extendNamespace(props) {\n util.deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n index_esm_FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }", "function configureForStandalone(exportObject) {\n var copiedNamespace = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__util_obj__[\"a\" /* shallowCopy */])(firestoreNamespace);\n // Unlike the use with Firebase, the standalone allows the use of the\n // constructor, so export it's internal class\n copiedNamespace['Firestore'] = __WEBPACK_IMPORTED_MODULE_1__api_database__[\"i\" /* Firestore */];\n exportObject['firestore'] = copiedNamespace;\n}", "function configureForStandalone(exportObject) {\n var copiedNamespace = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__util_obj__[\"a\" /* shallowCopy */])(firestoreNamespace);\n // Unlike the use with Firebase, the standalone allows the use of the\n // constructor, so export it's internal class\n copiedNamespace['Firestore'] = __WEBPACK_IMPORTED_MODULE_1__api_database__[\"i\" /* Firestore */];\n exportObject['firestore'] = copiedNamespace;\n}", "componentDidMount() {\n /*\n db.collection(\"accounts\").get().then(snapshot => {\n snapshot.docs.forEach(doc => {\n if (doc && doc.exists) {\n var data = doc.data();\n // saves the data to 'name'\n db.collection(\"accounts\").doc(data.ID).set(data);\n }\n })\n });\n */\n }", "setupIfNeeded() {\n if (angular.isUndefined(window.firebase) || firebase.apps.length == 0) {\n this.grrApiService_.markAuthDone();\n return;\n }\n\n var firebaseError;\n firebase.auth()\n .getRedirectResult()\n .then(function(result) {\n // We don't have to do anything when redirect is successful.\n // onAuthStateChanged callback is responsible for this case.\n }.bind(this))\n .catch(function(error) {\n firebaseError = error;\n // Marking auth as done, letting the grrApiService to proceed with API\n // requests, which will inevitably fail. Failing requests would be\n // indicated in the UI, so the user will be aware of the issue.\n this.grrApiService_.markAuthDone();\n }.bind(this));\n\n // Listening for auth state changes.\n firebase.auth().onAuthStateChanged(function(user) {\n if (user) {\n user.getToken().then(function(token) {\n this.http_.defaults.headers['common']['Authorization'] =\n 'Bearer ' + token;\n this.grrApiService_.markAuthDone();\n }.bind(this));\n } else if (!firebaseError) {\n var providerName = firebase.apps[0].options['authProvider'];\n var provider = new firebase.auth[providerName]();\n firebase.auth().signInWithRedirect(provider);\n }\n }.bind(this));\n }", "init(storeConfig) {\n this[config] = thorin.util.extend({\n credentials: null, // Google Cloud credentials json content\n namespace: '',\n projectId: null,\n idSize: 26, // the size of the \"id\" field\n path: path.normalize(thorin.root + '/app/entities')\n }, storeConfig);\n if (process.env.GOOGLE_APPLICATION_CREDENTIALS && (!this[config].credentials || (typeof this[config].credentials === 'object' && Object.keys(this[config].credentials).length === 0))) {\n this[config].credentials = process.env.GOOGLE_APPLICATION_CREDENTIALS;\n }\n if (!this[config].credentials) {\n throw thorin.error('STORE.GCLOUD', 'Missing or invalid credentials');\n }\n if (typeof this[config].credentials === 'string' && this[config].credentials) {\n this[config].credentials = this[config].credentials.trim();\n if (this[config].credentials.charAt(0) === '{') {\n try {\n this[config].credentials = JSON.parse(this[config].credentials);\n } catch (e) {\n throw thorin.error('STORE.GCLOUD', 'Credentials could not be parsed');\n }\n } else {\n let credPath = this[config].credentials.charAt(0) === '/' ? path.normalize(this[config].credentials) : path.normalize(thorin.root + '/' + this[config].credentials);\n try {\n let creds = fs.readFileSync(credPath, {encoding: 'utf8'});\n creds = JSON.parse(creds);\n this[config].credentials = creds;\n } catch (e) {\n throw thorin.error('STORE.GCLOUD', 'Credentials could not be read [' + credPath + ']');\n }\n }\n }\n StoreModel = initModel(thorin, this[config]);\n this[store] = new Datastore({\n namespace: this[config].namespace,\n credentials: this[config].credentials,\n projectId: this[config].projectId\n });\n if (this[config].path) {\n let files = thorin.util.readDirectory(this[config].path, {\n ext: '.js'\n });\n for (let i = 0, len = files.length; i < len; i++) {\n let file = files[i],\n code = path.basename(file).replace('.js', '');\n code = camelCase(code);\n let modelObj = new StoreModel(code),\n modelFn = require(file);\n if (typeof modelFn !== 'function') continue;\n modelFn(modelObj, StoreModel);\n if (!modelObj.isValid()) throw thorin.error('STORE.GCLOUD', `Store model ${modelObj.code} is not valid`);\n this[models][modelObj.code] = modelObj;\n modelObj.store = this;\n }\n }\n this[initialized] = true;\n }", "static enablePersistence(persistenceSettings) {\n return {\n ngModule: AngularFirestoreModule,\n providers: [\n { provide: ENABLE_PERSISTENCE, useValue: true },\n { provide: PERSISTENCE_SETTINGS, useValue: persistenceSettings },\n ]\n };\n }", "function createFirebaseNamespace() {\n var apps_ = {};\n var factories = {};\n var appHooks = {};\n // A namespace is a plain JavaScript Object.\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n __esModule: true,\n initializeApp: initializeApp,\n app: app,\n apps: null,\n Promise: Promise,\n SDK_VERSION: '5.5.9',\n INTERNAL: {\n registerService: registerService,\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: util.createSubscribe,\n ErrorFactory: util.ErrorFactory,\n removeApp: removeApp,\n factories: factories,\n useAsService: useAsService,\n Promise: Promise,\n deepExtend: util.deepExtend\n }\n };\n // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n util.patchProperty(namespace, 'default', namespace);\n // firebase.apps is a read-only getter.\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\n * Called by App.delete() - but before any services associated with the App\n * are deleted.\n */\n function removeApp(name) {\n var app = apps_[name];\n callAppHooks(app, 'delete');\n delete apps_[name];\n }\n /**\n * Get the App object for a given name (or DEFAULT).\n */\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n if (!contains(apps_, name)) {\n error('no-app', { name: name });\n }\n return apps_[name];\n }\n util.patchProperty(app, 'App', FirebaseAppImpl);\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) { rawConfig = {}; }\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = { name: name_1 };\n }\n var config = rawConfig;\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n var name = config.name;\n if (typeof name !== 'string' || !name) {\n error('bad-app-name', { name: name + '' });\n }\n if (contains(apps_, name)) {\n error('duplicate-app', { name: name });\n }\n var app = new FirebaseAppImpl(options, config, namespace);\n apps_[name] = app;\n callAppHooks(app, 'create');\n return app;\n }\n /*\n * Return an array of all the non-deleted FirebaseApps.\n */\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps_).map(function (name) { return apps_[name]; });\n }\n /*\n * Register a Firebase Service.\n *\n * firebase.INTERNAL.registerService()\n *\n * TODO: Implement serviceProperties.\n */\n function registerService(name, createService, serviceProperties, appHook, allowMultipleInstances) {\n // Cannot re-register a service that already exists\n if (factories[name]) {\n error('duplicate-service', { name: name });\n }\n // Capture the service factory for later service instantiation\n factories[name] = createService;\n // Capture the appHook, if passed\n if (appHook) {\n appHooks[name] = appHook;\n // Run the **new** app hook on all existing apps\n getApps().forEach(function (app) {\n appHook('create', app);\n });\n }\n // The Service namespace is an accessor function ...\n var serviceNamespace = function (appArg) {\n if (appArg === void 0) { appArg = app(); }\n if (typeof appArg[name] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n error('invalid-app-argument', { name: name });\n }\n // Forward service instance lookup to the FirebaseApp.\n return appArg[name]();\n };\n // ... and a container for service-level properties.\n if (serviceProperties !== undefined) {\n util.deepExtend(serviceNamespace, serviceProperties);\n }\n // Monkey-patch the serviceNamespace onto the firebase namespace\n namespace[name] = serviceNamespace;\n // Patch the FirebaseAppImpl prototype\n FirebaseAppImpl.prototype[name] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var serviceFxn = this._getService.bind(this, name);\n return serviceFxn.apply(this, allowMultipleInstances ? args : []);\n };\n return serviceNamespace;\n }\n /**\n * Patch the top-level firebase namespace with additional properties.\n *\n * firebase.INTERNAL.extendNamespace()\n */\n function extendNamespace(props) {\n util.deepExtend(namespace, props);\n }\n function callAppHooks(app, eventName) {\n Object.keys(factories).forEach(function (serviceName) {\n // Ignore virtual services\n var factoryName = useAsService(app, serviceName);\n if (factoryName === null) {\n return;\n }\n if (appHooks[factoryName]) {\n appHooks[factoryName](eventName, app);\n }\n });\n }\n // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n var useService = name;\n var options = app.options;\n return useService;\n }\n return namespace;\n}" ]
[ "0.8120072", "0.78001773", "0.77622277", "0.77622277", "0.7745563", "0.76116765", "0.76116765", "0.75143313", "0.75143313", "0.75143313", "0.7459621", "0.74163455", "0.7367059", "0.7367059", "0.72925097", "0.6937962", "0.69327384", "0.69327384", "0.66773844", "0.6113555", "0.59099466", "0.5883837", "0.5825068", "0.576804", "0.5697939", "0.5689582", "0.56646204", "0.5631129", "0.561905", "0.55554163", "0.554221", "0.54104394", "0.5397125", "0.5396795", "0.5337644", "0.5327921", "0.5322416", "0.5304543", "0.52833223", "0.5235167", "0.5222054", "0.52151483", "0.5210182", "0.5166747", "0.5152317", "0.51331216", "0.50993204", "0.50993204", "0.50993204", "0.50728536", "0.5043357", "0.50186074", "0.49953893", "0.49953893", "0.49651465", "0.49607587", "0.49560934", "0.49409726", "0.49403536", "0.49392697", "0.49241474", "0.49238807", "0.49238807", "0.49112043", "0.4901955", "0.48913714", "0.48867616", "0.48867616", "0.4886581", "0.48725307", "0.48725307", "0.48721364", "0.48675245", "0.48663616", "0.48521832", "0.48415524", "0.4834332", "0.48303673", "0.48229155", "0.48191348", "0.48191348", "0.4816418", "0.4816418", "0.4816418", "0.4809303", "0.4799997", "0.47985813", "0.4796006", "0.4796006", "0.4792932", "0.47902188", "0.47873044", "0.47858253", "0.47831273", "0.47831273", "0.47776797", "0.47705466", "0.47644138", "0.47370514", "0.47368664" ]
0.7786346
2
Copyright 2017 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
function registerFirestore(instance){configureForFirebase(instance);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function me(e,t,a,s){var n,i=arguments.length,r=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var d=e.length-1;d>=0;d--)(n=e[d])&&(r=(i<3?n(r):i>3?n(t,a,r):n(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r\n/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */}", "constructor() {\n this.authToken = null;\n this.dataSourceIdMap = {};\n this.scopeMap = {};\n this.dataSourceIdMap[\"com.google.step_count.delta\"] = \"derived:com.google.step_count.delta:com.google.android.gms:estimated_steps\";\n this.dataSourceIdMap[\"com.google.calories.expended\"] = \"derived:com.google.calories.expended:com.google.android.gms:merge_calories_expended\";\n this.dataSourceIdMap[\"com.google.distance.delta\"] = \"derived:com.google.distance.delta:com.google.android.gms:merge_distance_delta\";\n this.dataSourceIdMap[\"com.google.heart_rate.bpm\"] = \"derived:com.google.heart_rate.bpm:com.google.android.gms:merge_heart_rate_bpm\";\n this.dataSourceIdMap[\"com.google.weight\"] = \"derived:com.google.weight:com.google.android.gms:merge_weight\";\n this.dataSourceIdMap[\"com.google.blood_pressure\"] = \"derived:com.google.blood_pressure:com.google.android.gms:merged\";\n\n this.scopeMap[\"com.google.heart_rate.bpm\"] = \"https://www.googleapis.com/auth/fitness.body.read https://www.googleapis.com/auth/fitness.body.write\";\n this.scopeMap[\"com.google.weight\"] = \"https://www.googleapis.com/auth/fitness.body.read https://www.googleapis.com/auth/fitness.body.write\";\n this.scopeMap[\"com.google.blood_pressure\"] = \"https://www.googleapis.com/auth/fitness.blood_pressure.read https://www.googleapis.com/auth/fitness.blood_pressure.write\";\n\n }", "private internal function m248() {}", "private public function m246() {}", "googleLogin() { }", "function t(e,t,a,s){var i,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,s);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(r=(n<3?i(r):n>3?i(t,a,r):i(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "function gn() {\n if (!pe.Lt().ia) throw new c(h.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "static get scopes() {\n return ['https://www.googleapis.com/auth/cloud-platform'];\n }", "static get scopes() {\n return ['https://www.googleapis.com/auth/cloud-platform'];\n }", "function defGoogle(frame) {\n\n var googlePolicy = (function() {\n\n var google = {};\n\n function drawBeforeAdvice(f, self, args) {\n var result = [ args[0] ];\n for (var i = 1; i < args.length; i++) {\n result.push(copyJson(args[i]));\n }\n return result;\n }\n\n function opaqueNodeAdvice(f, self, args) {\n return [ opaqueNode(args[0]) ];\n }\n\n ////////////////////////////////////////////////////////////////////////\n // gViz integration\n\n google.visualization = {};\n\n /** @constructor */\n google.visualization.DataTable = function(opt_data, opt_version) {};\n google.visualization.DataTable.__super__ = Object;\n google.visualization.DataTable.prototype.getNumberOfRows = function() {};\n google.visualization.DataTable.prototype.getNumberOfColumns = function() {};\n google.visualization.DataTable.prototype.clone = function() {};\n google.visualization.DataTable.prototype.getColumnId = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnIndex = function(columnId) {};\n google.visualization.DataTable.prototype.getColumnLabel = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnPattern = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnRole = function(columnIndex) {};\n google.visualization.DataTable.prototype.getColumnType = function(columnIndex) {};\n google.visualization.DataTable.prototype.getValue = function(rowIndex, columnIndex) {};\n google.visualization.DataTable.prototype.getFormattedValue = function(rowIndex, columnIndex) {};\n google.visualization.DataTable.prototype.getProperty = function(rowIndex, columnIndex, property) {};\n google.visualization.DataTable.prototype.getProperties = function(rowIndex, columnIndex) {};\n google.visualization.DataTable.prototype.getTableProperties = function() {};\n google.visualization.DataTable.prototype.getTableProperty = function(property) {};\n google.visualization.DataTable.prototype.setTableProperties = function(properties) {};\n google.visualization.DataTable.prototype.setTableProperty = function(property, value) {};\n google.visualization.DataTable.prototype.setValue = function(rowIndex, columnIndex, value) {};\n google.visualization.DataTable.prototype.setFormattedValue = function(rowIndex, columnIndex, formattedValue) {};\n google.visualization.DataTable.prototype.setProperties = function(rowIndex, columnIndex, properties) {};\n google.visualization.DataTable.prototype.setProperty = function(rowIndex, columnIndex, property, value) {};\n google.visualization.DataTable.prototype.setCell = function(rowIndex, columnIndex, opt_value, opt_formattedValue, opt_properties) {};\n google.visualization.DataTable.prototype.setRowProperties = function(rowIndex, properties) {};\n google.visualization.DataTable.prototype.setRowProperty = function(rowIndex, property, value) {};\n google.visualization.DataTable.prototype.getRowProperty = function(rowIndex, property) {};\n google.visualization.DataTable.prototype.getRowProperties = function(rowIndex) {};\n google.visualization.DataTable.prototype.setColumnLabel = function(columnIndex, newLabel) {};\n google.visualization.DataTable.prototype.setColumnProperties = function(columnIndex, properties) {};\n google.visualization.DataTable.prototype.setColumnProperty = function(columnIndex, property, value) {};\n google.visualization.DataTable.prototype.getColumnProperty = function(columnIndex, property) {};\n google.visualization.DataTable.prototype.getColumnProperties = function(columnIndex) {};\n google.visualization.DataTable.prototype.insertColumn = function(atColIndex, type, opt_label, opt_id) {};\n google.visualization.DataTable.prototype.addColumn = function(type, opt_label, opt_id) {};\n google.visualization.DataTable.prototype.insertRows = function(atRowIndex, numOrArray) {};\n google.visualization.DataTable.prototype.addRows = function(numOrArray) {};\n google.visualization.DataTable.prototype.addRow = function(opt_cellArray) {};\n google.visualization.DataTable.prototype.getColumnRange = function(columnIndex) {};\n google.visualization.DataTable.prototype.getSortedRows = function(sortColumns) {};\n google.visualization.DataTable.prototype.sort = function(sortColumns) {};\n google.visualization.DataTable.prototype.getDistinctValues = function(column) {};\n google.visualization.DataTable.prototype.getFilteredRows = function(columnFilters) {};\n google.visualization.DataTable.prototype.removeRows = function(fromRowIndex, numRows) {};\n google.visualization.DataTable.prototype.removeRow = function(rowIndex) {};\n google.visualization.DataTable.prototype.removeColumns = function(fromColIndex, numCols) {};\n google.visualization.DataTable.prototype.removeColumn = function(colIndex) {};\n\n /** @return {string} JSON representation. */\n google.visualization.DataTable.prototype.toJSON = function() {\n return copyJson(this.toJSON());\n };\n google.visualization.DataTable.prototype.toJSON.__subst__ = true;\n\n google.visualization.arrayToDataTable = function(arr) {};\n\n /** @constructor */\n google.visualization.AreaChart = function(container) {};\n google.visualization.AreaChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.AreaChart.__super__ = Object;\n google.visualization.AreaChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.AreaChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.AreaChart.prototype.clearChart = function() {};\n // google.visualization.AreaChart.prototype.getSelection = function() {};\n // google.visualization.AreaChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.BarChart = function(container) {};\n google.visualization.BarChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.BarChart.__super__ = Object;\n google.visualization.BarChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.BarChart.prototype.clearChart = function() {};\n // google.visualization.BarChart.prototype.getSelection = function() {};\n // google.visualization.BarChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.BubbleChart = function(container) {};\n google.visualization.BubbleChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.BubbleChart.__super__ = Object;\n google.visualization.BubbleChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.BubbleChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.BubbleChart.prototype.clearChart = function() {};\n // google.visualization.BubbleChart.prototype.getSelection = function() {};\n // google.visualization.BubbleChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.CandlestickChart = function(container) {};\n google.visualization.CandlestickChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.CandlestickChart.__super__ = Object;\n google.visualization.CandlestickChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.CandlestickChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.CandlestickChart.prototype.clearChart = function() {};\n // google.visualization.CandlestickChart.prototype.getSelection = function() {};\n // google.visualization.CandlestickChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.ColumnChart = function(container) {};\n google.visualization.ColumnChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.ColumnChart.__super__ = Object;\n google.visualization.ColumnChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.ColumnChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.ColumnChart.prototype.clearChart = function() {};\n // google.visualization.ColumnChart.prototype.getSelection = function() {};\n // google.visualization.ColumnChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.ComboChart = function(container) {};\n google.visualization.ComboChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.ComboChart.__super__ = Object;\n google.visualization.ComboChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.ComboChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.ComboChart.prototype.clearChart = function() {};\n // google.visualization.ComboChart.prototype.getSelection = function() {};\n // google.visualization.ComboChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.Gauge = function(container) {};\n google.visualization.Gauge.__before__ = [ opaqueNodeAdvice ];\n google.visualization.Gauge.__super__ = Object;\n google.visualization.Gauge.prototype.draw = function(dataTable, opt_options) {};\n google.visualization.Gauge.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.Gauge.prototype.clearChart = function() {};\n\n /** @constructor */\n google.visualization.GeoChart = function(container) {};\n google.visualization.GeoChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.GeoChart.__super__ = Object;\n // google.visualization.GeoChart.mapExists = function(userOptions) {};\n google.visualization.GeoChart.prototype.clearChart = function() {};\n google.visualization.GeoChart.prototype.draw = function(dataTable, userOptions, opt_state) {};\n google.visualization.GeoChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n // google.visualization.GeoChart.prototype.getSelection = function() {};\n // google.visualization.GeoChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.LineChart = function(container) {};\n google.visualization.LineChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.LineChart.__super__ = Object;\n google.visualization.LineChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.LineChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.LineChart.prototype.clearChart = function() {};\n // google.visualization.LineChart.prototype.getSelection = function() {};\n // google.visualization.LineChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.PieChart = function(container) {};\n google.visualization.PieChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.PieChart.__super__ = Object;\n google.visualization.PieChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.PieChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.PieChart.prototype.clearChart = function() {};\n // google.visualization.PieChart.prototype.getSelection = function() {};\n // google.visualization.PieChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.ScatterChart = function(container) {};\n google.visualization.ScatterChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.ScatterChart.__super__ = Object;\n google.visualization.ScatterChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.ScatterChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.ScatterChart.prototype.clearChart = function() {};\n // google.visualization.ScatterChart.prototype.getSelection = function() {};\n // google.visualization.ScatterChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.SteppedAreaChart = function(container) {};\n google.visualization.SteppedAreaChart.__before__ = [ opaqueNodeAdvice ];\n google.visualization.SteppedAreaChart.__super__ = Object;\n google.visualization.SteppedAreaChart.prototype.draw = function(data, opt_options, opt_state) {};\n google.visualization.SteppedAreaChart.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.SteppedAreaChart.prototype.clearChart = function() {};\n // google.visualization.SteppedAreaChart.prototype.getSelection = function() {};\n // google.visualization.SteppedAreaChart.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.Table = function(container) {};\n google.visualization.Table.__before__ = [ opaqueNodeAdvice ];\n google.visualization.Table.__super__ = Object;\n google.visualization.Table.prototype.draw = function(dataTable, opt_options) {};\n google.visualization.Table.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.Table.prototype.clearChart = function() {};\n // google.visualization.Table.prototype.getSortInfo = function() {};\n // google.visualization.Table.prototype.getSelection = function() {};\n // google.visualization.Table.prototype.setSelection = function(selection) {};\n\n /** @constructor */\n google.visualization.TreeMap = function(container) {};\n google.visualization.TreeMap.__before__ = [ opaqueNodeAdvice ];\n google.visualization.TreeMap.__super__ = Object;\n google.visualization.TreeMap.prototype.draw = function(dataTable, opt_options) {};\n google.visualization.TreeMap.prototype.draw.__before__ = [ drawBeforeAdvice ];\n google.visualization.TreeMap.prototype.clearChart = function() {};\n // google.visualization.TreeMap.prototype.getSelection = function() {};\n // google.visualization.TreeMap.prototype.setSelection = function(selection) {};\n\n ////////////////////////////////////////////////////////////////////////\n // OnePick integration\n\n google.picker = {};\n\n google.picker.DocsUploadView = function() {};\n google.picker.DocsUploadView.__super__ = Object;\n google.picker.DocsUploadView.prototype.setIncludeFolders = function(boolean) {};\n\n google.picker.View = function() {};\n google.picker.View.__super__ = Object;\n google.picker.View.prototype.getId = function() {};\n google.picker.View.prototype.setMimeTypes = function() {};\n google.picker.View.prototype.setQuery = function() {};\n\n google.picker.DocsView = function() {};\n google.picker.DocsView.__super__ = ['google', 'picker', 'View'];\n google.picker.DocsView.prototype.setIncludeFolders = function() {};\n google.picker.DocsView.prototype.setMode = function() {};\n google.picker.DocsView.prototype.setOwnedByMe = function() {};\n google.picker.DocsView.prototype.setStarred = function() {};\n\n google.picker.DocsViewMode = {};\n google.picker.DocsViewMode.GRID = 1;\n google.picker.DocsViewMode.LIST = 1;\n\n google.picker.Feature = {};\n google.picker.Feature.MINE_ONLY = 1;\n google.picker.Feature.MULTISELECT_ENABLED = 1;\n google.picker.Feature.NAV_HIDDEN = 1;\n google.picker.Feature.SIMPLE_UPLOAD_ENABLED = 1;\n\n google.picker.ImageSearchView = function() {};\n google.picker.ImageSearchView.__super__ = ['google', 'picker', 'View'];\n google.picker.ImageSearchView.prototype.setLicense = function() {};\n google.picker.ImageSearchView.prototype.setSite = function() {};\n google.picker.ImageSearchView.prototype.setSize = function() {};\n\n google.picker.ImageSearchView.License = {};\n google.picker.ImageSearchView.License.NONE = 1;\n google.picker.ImageSearchView.License.COMMERCIAL_REUSE = 1;\n google.picker.ImageSearchView.License.COMMERCIAL_REUSE_WITH_MODIFICATION = 1;\n google.picker.ImageSearchView.License.REUSE = 1;\n google.picker.ImageSearchView.License.REUSE_WITH_MODIFICATION = 1;\n\n google.picker.ImageSearchView.Size = {};\n google.picker.ImageSearchView.Size.SIZE_QSVGA = 1;\n google.picker.ImageSearchView.Size.SIZE_VGA = 1;\n google.picker.ImageSearchView.Size.SIZE_SVGA = 1;\n google.picker.ImageSearchView.Size.SIZE_XGA = 1;\n google.picker.ImageSearchView.Size.SIZE_WXGA = 1;\n google.picker.ImageSearchView.Size.SIZE_WXGA2 = 1;\n google.picker.ImageSearchView.Size.SIZE_2MP = 1;\n google.picker.ImageSearchView.Size.SIZE_4MP = 1;\n google.picker.ImageSearchView.Size.SIZE_6MP = 1;\n google.picker.ImageSearchView.Size.SIZE_8MP = 1;\n google.picker.ImageSearchView.Size.SIZE_10MP = 1;\n google.picker.ImageSearchView.Size.SIZE_12MP = 1;\n google.picker.ImageSearchView.Size.SIZE_15MP = 1;\n google.picker.ImageSearchView.Size.SIZE_20MP = 1;\n google.picker.ImageSearchView.Size.SIZE_40MP = 1;\n google.picker.ImageSearchView.Size.SIZE_70MP = 1;\n google.picker.ImageSearchView.Size.SIZE_140MP = 1;\n\n google.picker.MapsView = function() {};\n google.picker.MapsView.__super__ = ['google', 'picker', 'View'];\n google.picker.MapsView.prototype.setCenter = function() {};\n google.picker.MapsView.prototype.setZoom = function() {};\n\n google.picker.PhotoAlbumsView = function() {};\n google.picker.PhotoAlbumsView.__super__ = ['google', 'picker', 'View'];\n\n google.picker.PhotosView = function() {};\n google.picker.PhotosView.__super__ = ['google', 'picker', 'View'];\n google.picker.PhotosView.prototype.setType = function() {};\n\n google.picker.PhotosView.Type = {};\n google.picker.PhotosView.Type.FEATURED = 1;\n google.picker.PhotosView.Type.UPLOADED = 1;\n\n var SECRET = {};\n\n google.picker.Picker = function() {\n if (arguments[0] !== SECRET) { throw new TypeError(); }\n this.v = arguments[1];\n };\n google.picker.Picker.__super__ = Object;\n google.picker.Picker.__subst__ = true;\n google.picker.Picker.prototype.isVisible = function() {\n return this.v.isVisible();\n };\n google.picker.Picker.prototype.setCallback = function(c) {\n this.v.setCallback(c);\n };\n google.picker.Picker.prototype.setRelayUrl = function(u) {\n this.v.setRelayUrl(u);\n };\n google.picker.Picker.prototype.setVisible = function(b) {\n this.v.setVisible(b);\n };\n\n/*\n google.picker.PickerBuilder = function() {};\n google.picker.PickerBuilder.__super__ = Object;\n google.picker.PickerBuilder.prototype.addView = function() {};\n google.picker.PickerBuilder.prototype.addViewGroup = function() {};\n google.picker.PickerBuilder.prototype.build = function() {};\n google.picker.PickerBuilder.prototype.disableFeature = function() {};\n google.picker.PickerBuilder.prototype.enableFeature = function() {};\n google.picker.PickerBuilder.prototype.getRelayUrl = function() {};\n google.picker.PickerBuilder.prototype.getTitle = function() {};\n google.picker.PickerBuilder.prototype.hideTitleBar = function() {};\n google.picker.PickerBuilder.prototype.isFeatureEnabled = function() {};\n google.picker.PickerBuilder.prototype.setAppId = function() {};\n google.picker.PickerBuilder.prototype.setAuthUser = function() {};\n google.picker.PickerBuilder.prototype.setCallback = function() {};\n google.picker.PickerBuilder.prototype.setDocument = function() {};\n google.picker.PickerBuilder.prototype.setLocale = function() {};\n google.picker.PickerBuilder.prototype.setRelayUrl = function() {};\n google.picker.PickerBuilder.prototype.setSelectableMimeTypes = function() {};\n google.picker.PickerBuilder.prototype.setSize = function() {};\n google.picker.PickerBuilder.prototype.setTitle = function() {}; // TODO: Add \"trusted path\" annotation\n google.picker.PickerBuilder.prototype.setUploadToAlbumId = function() {};\n google.picker.PickerBuilder.prototype.toUri = function() {};\n*/\n\n google.picker.PickerBuilder = function() {\n this.v = new window.google.picker.PickerBuilder();\n };\n google.picker.PickerBuilder.__subst__ = true;\n google.picker.PickerBuilder.__super__ = Object;\n google.picker.PickerBuilder.prototype.addView = function() {\n this.v.addView.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.addViewGroup = function() {\n this.v.addViewGroup.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.disableFeature = function() {\n this.v.disableFeature.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.enableFeature = function() {\n this.v.enableFeature.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.getRelayUrl = function() {\n this.v.getRelayUrl.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.getTitle = function() {\n this.v.getTitle.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.hideTitleBar = function() {\n this.v.hideTitleBar.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.isFeatureEnabled = function() {\n this.v.isFeatureEnabled.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setAppId = function() {\n this.v.setAppId.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setAuthUser = function() {\n this.v.setAuthUser.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setCallback = function() {\n this.v.setCallback.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setDocument = function() {\n this.v.setDocument.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setLocale = function() {\n this.v.setLocale.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setRelayUrl = function() {\n this.v.setRelayUrl.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setSelectableMimeTypes = function() {\n this.v.setSelectableMimeTypes.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setSize = function() {\n this.v.setSize.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setTitle = function() {\n this.v.setTitle.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.setUploadToAlbumId = function() {\n this.v.setUploadToAlbumId.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.toUri = function() {\n this.v.toUri.apply(this.v, arguments);\n return this;\n };\n google.picker.PickerBuilder.prototype.build = function() {\n return new google.picker.Picker(SECRET, this.v.build.apply(this.v, arguments));\n }; \n\n google.picker.ResourceId = {};\n google.picker.ResourceId.generate = function() {};\n\n google.picker.VideoSearchView = function() {};\n google.picker.VideoSearchView.__super__ = ['google', 'picker', 'View'];\n google.picker.VideoSearchView.prototype.setSite = function() {};\n\n google.picker.VideoSearchView.YOUTUBE = 1;\n\n google.picker.ViewGroup = function() {};\n google.picker.ViewGroup.__super__ = Object;\n google.picker.ViewGroup.prototype.addLabel = function() {};\n google.picker.ViewGroup.prototype.addView = function() {};\n google.picker.ViewGroup.prototype.addViewGroup = function() {};\n\n google.picker.ViewId = {};\n google.picker.ViewId.DOCS = 1;\n google.picker.ViewId.DOCS_IMAGES = 1;\n google.picker.ViewId.DOCS_IMAGES_AND_VIDEOS = 1;\n google.picker.ViewId.DOCS_VIDEOS = 1;\n google.picker.ViewId.DOCUMENTS = 1;\n google.picker.ViewId.FOLDERS = 1;\n google.picker.ViewId.FORMS = 1;\n google.picker.ViewId.IMAGE_SEARCH = 1;\n google.picker.ViewId.PDFS = 1;\n google.picker.ViewId.PHOTO_ALBUMS = 1;\n google.picker.ViewId.PHOTO_UPLOAD = 1;\n google.picker.ViewId.PHOTOS = 1;\n google.picker.ViewId.PRESENTATIONS = 1;\n google.picker.ViewId.RECENTLY_PICKED = 1;\n google.picker.ViewId.SPREADSHEETS = 1;\n google.picker.ViewId.VIDEO_SEARCH = 1;\n google.picker.ViewId.WEBCAM = 1;\n google.picker.ViewId.YOUTUBE = 1;\n\n google.picker.WebCamView = function() {};\n google.picker.WebCamView.__super__ = ['google', 'picker', 'View'];\n\n google.picker.WebCamViewType = {};\n google.picker.WebCamViewType.STANDARD = 1;\n google.picker.WebCamViewType.VIDEOS = 1;\n\n google.picker.Action = {};\n google.picker.Action.CANCEL = 1;\n google.picker.Action.PICKED = 1;\n\n google.picker.Audience = {};\n google.picker.Audience.OWNER_ONLY = 1;\n google.picker.Audience.LIMITED = 1;\n google.picker.Audience.ALL_PERSONAL_CIRCLES = 1;\n google.picker.Audience.EXTENDED_CIRCLES = 1;\n google.picker.Audience.DOMAIN_PUBLIC = 1;\n google.picker.Audience.PUBLIC = 1;\n\n google.picker.Document = {};\n google.picker.Document.ADDRESS_LINES = 1;\n google.picker.Document.AUDIENCE = 1;\n google.picker.Document.DESCRIPTION = 1;\n google.picker.Document.DURATION = 1;\n google.picker.Document.EMBEDDABLE_URL = 1;\n google.picker.Document.ICON_URL = 1;\n google.picker.Document.ID = 1;\n google.picker.Document.IS_NEW = 1;\n google.picker.Document.LAST_EDITED_UTC = 1;\n google.picker.Document.LATITUDE = 1;\n google.picker.Document.LONGITUDE = 1;\n google.picker.Document.MIME_TYPE = 1;\n google.picker.Document.NAME = 1;\n google.picker.Document.NUM_CHILDREN = 1;\n google.picker.Document.PARENT_ID = 1;\n google.picker.Document.PHONE_NUMBERS = 1;\n google.picker.Document.SERVICE_ID = 1;\n google.picker.Document.THUMBNAILS = 1;\n google.picker.Document.TYPE = 1;\n google.picker.Document.URL = 1;\n\n google.picker.Response = {};\n google.picker.Response.ACTION = 1;\n google.picker.Response.DOCUMENTS = 1;\n google.picker.Response.PARENTS = 1;\n google.picker.Response.VIEW = 1;\n\n google.picker.ServiceId = {};\n google.picker.ServiceId.DOCS = 1;\n google.picker.ServiceId.MAPS = 1;\n google.picker.ServiceId.PHOTOS = 1;\n google.picker.ServiceId.SEARCH_API = 1;\n google.picker.ServiceId.URL = 1;\n google.picker.ServiceId.YOUTUBE = 1;\n\n google.picker.Thumbnail = {};\n google.picker.Thumbnail.HEIGHT = 1;\n google.picker.Thumbnail.WIDTH = 1;\n google.picker.Thumbnail.URL = 1;\n\n google.picker.Type = {};\n google.picker.Type.ALBUM = 1;\n google.picker.Type.DOCUMENT = 1;\n google.picker.Type.PHOTO = 1;\n google.picker.Type.URL = 1;\n google.picker.Type.VIDEO = 1;\n\n ////////////////////////////////////////////////////////////////////////\n\n google.setOnLoadCallback = function(olc) {\n throw 'Cannot set onLoadCallback once modules loaded';\n }\n google.setOnLoadCallback.__subst__ = true;\n\n return google;\n })();\n\n function copyJson(o) {\n if (!o) { return undefined; }\n return JSON.parse(JSON.stringify(o, function(key, value) {\n return /__$/.test(key) ? void 0 : value;\n }));\n }\n\n function opaqueNode(guestNode) {\n var d = guestNode.ownerDocument.createElement('div');\n frame.imports.tameNodeAsForeign___(d);\n guestNode.appendChild(d);\n return d;\n }\n\n function forallkeys(obj, cb) {\n for (var k in obj) {\n if (!/.*__$/.test(k)) {\n cb(k);\n }\n }\n }\n\n function targ(obj, policy) {\n return policy.__subst__ ? policy : obj;\n }\n\n ////////////////////////////////////////////////////////////////////////\n \n function grantRead(o, k) {\n if (o[k + '__grantRead__']) { return; }\n console.log(' + grantRead');\n caja.grantRead(o, k);\n o[k + '__grantRead__'] = true;\n }\n\n function grantMethod(o, k) {\n if (o[k + '__grantMethod__']) { return; }\n caja.grantMethod(o, k);\n console.log(' + grantMethod');\n o[k + '__grantMethod__'] = true;\n }\n\n function markFunction(o) {\n if (o.__markFunction__) { return o; }\n var r = caja.markFunction(o);\n console.log(' + markFunction');\n o.__markFunction__ = true;\n return r;\n }\n\n function markCtor(o, sup) {\n if (o.__markCtor__) { return o; }\n var r = caja.markCtor(o, sup);\n console.log(' + markCtor');\n o.__markCtor__ = true;\n return r;\n }\n\n function adviseFunctionBefore(o, advices) {\n if (o.__adviseFunctionBefore__) { return o; }\n for (var i = 0; i < advices.length; i++) {\n caja.adviseFunctionBefore(o, advices[i]);\n }\n console.log(' + adviseFunctionBefore');\n return o;\n }\n\n ////////////////////////////////////////////////////////////////////////\n\n function defCtor(path, obj, policy) {\n console.log(path + ' defCtor');\n forallkeys(policy, function(name) {\n if (!obj[name]) {\n console.log(path + '.' + name + ' skip');\n return;\n }\n console.log(path + '.' + name + ' grant static');\n grantRead(obj, name);\n if (typeof policy[name] === 'function') {\n markFunction(obj[name]);\n }\n });\n forallkeys(policy.prototype, function(name) {\n if (!obj.prototype[name]) {\n console.log(path + '.prototype.' + name + ' skip');\n return;\n }\n console.log(path + '.prototype.' + name + ' grant instance');\n if (typeof policy.prototype[name] === 'function') {\n if (policy.prototype[name].__before__) {\n adviseFunctionBefore(obj.prototype[name], policy.prototype[name].__before__);\n }\n grantMethod(obj.prototype, name);\n } else {\n grantRead(obj.prototype, name);\n }\n });\n var sup;\n if (policy.__super__ === Object) {\n sup = Object;\n } else {\n sup = window;\n for (var i = 0; i < policy.__super__.length; i++) {\n sup = sup[policy.__super__[i]];\n }\n }\n\n if (obj.__before__) {\n adviseFunctionBefore(obj, obj.__before__);\n }\n\n return markCtor(obj, sup);\n }\n\n function defFcn(path, obj, policy) {\n console.log(path + ' defFcn');\n if (obj.__before__) {\n adviseFunctionBefore(obj, obj.__before__);\n }\n return markFunction(obj);\n }\n\n function defObj(path, obj, policy) {\n console.log(path + ' defObj');\n var r = {};\n forallkeys(policy, function(name) {\n var sub_obj = obj[name];\n if (!sub_obj) {\n console.log(path + '.' + name + ' skip');\n return;\n }\n var sub_policy = policy[name];\n var sub_path = path + '.' + name;\n var t_sub_policy = typeof sub_policy;\n if (t_sub_policy === 'function') {\n if (sub_policy.__super__) {\n r[name] = defCtor(sub_path, targ(sub_obj, sub_policy), sub_policy);\n } else {\n r[name] = defFcn(sub_path, targ(sub_obj, sub_policy), sub_policy);\n }\n } else if (t_sub_policy === 'object'){\n r[name] = defObj(sub_path, targ(sub_obj, sub_policy), sub_policy);\n } else {\n console.log(path + '.' + name + ' grant static');\n r[name] = targ(sub_obj, sub_policy);\n grantRead(r, name);\n }\n });\n return caja.markReadOnlyRecord(r);\n }\n\n ////////////////////////////////////////////////////////////////////////\n\n return defObj('google', window['google'], googlePolicy);\n}", "static getClassName() {\n return 'AdminGoogleSecurityContainer';\n }", "function e(t,e,r,o){var i,s=arguments.length,a=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,o);else for(var n=t.length-1;n>=0;n--)(i=t[n])&&(a=(s<3?i(a):s>3?i(e,r,a):i(e,r))||a);return s>3&&a&&Object.defineProperty(e,r,a),a\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "_getPageMetadata() {\n return undefined;\n }", "function emptyByteString(){return PlatformSupport.getPlatform().emptyByteString;}/**\r\n * Copyright 2017 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */// TODO(mcg): Change to a string enum once we've upgraded to typescript 2.4.", "isGMOnly() {\n return false\n }", "function Xi(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.o || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "get Android() {}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\n if(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\n b.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n \"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n 255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n \"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):a.src&&\"IMAGE\"==c&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\n if(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\n b.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n \"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n 255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n \"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):\"IMAGE\"==c&&a.src&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\nif(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\nb.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n\"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):\"IMAGE\"==c&&a.src&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function AppMeasurement_Module_ActivityMap(f){function g(a,d){var b,c,n;if(a&&d&&(b=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<b.length&&(c=b[n++]);)if(-1<a.indexOf(c))return null;p=1;return a}function q(a,d,b,c,e){var g,h;if(a.dataset&&(h=a.dataset[d]))g=h;else if(a.getAttribute)if(h=a.getAttribute(\"data-\"+b))g=h;else if(h=a.getAttribute(b))g=h;if(!g&&f.useForcedLinkTracking&&e&&(g=\"\",d=a.onclick?\"\"+a.onclick:\"\")){b=d.indexOf(c);var l,k;if(0<=b){for(b+=10;b<d.length&&0<=\"= \\t\\r\\n\".indexOf(d.charAt(b));)b++;\nif(b<d.length){h=b;for(l=k=0;h<d.length&&(\";\"!=d.charAt(h)||l);)l?d.charAt(h)!=l||k?k=\"\\\\\"==d.charAt(h)?!k:0:l=0:(l=d.charAt(h),'\"'!=l&&\"'\"!=l&&(l=0)),h++;if(d=d.substring(b,h))a.e=new Function(\"s\",\"var e;try{s.w.\"+c+\"=\"+d+\"}catch(e){}\"),a.e(f)}}}return g||e&&f.w[c]}function r(a,d,b){var c;return(c=e[d](a,b))&&(p?(p=0,c):g(k(c),e[d+\"Exclusions\"]))}function s(a,d,b){var c;if(a&&!(1===(c=a.nodeType)&&(c=a.nodeName)&&(c=c.toUpperCase())&&t[c])&&(1===a.nodeType&&(c=a.nodeValue)&&(d[d.length]=c),b.a||\nb.t||b.s||!a.getAttribute||((c=a.getAttribute(\"alt\"))?b.a=c:(c=a.getAttribute(\"title\"))?b.t=c:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(c=a.getAttribute(\"src\")||a.src)&&(b.s=c)),(c=a.childNodes)&&c.length))for(a=0;a<c.length;a++)s(c[a],d,b)}function k(a){if(null==a||void 0==a)return a;try{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=f;var m=window;m.s_c_in||(m.s_c_il=[],m.s_c_in=0);e._il=m.s_c_il;e._in=m.s_c_in;e._il[e._in]=e;m.s_c_in++;e._c=\"s_m\";e.c={};var p=0,t={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,b,c=f.contextData,e=f.linkObject;(a=f.pageName||f.pageURL)&&(d=r(e,\"link\",f.linkName))&&(b=r(e,\"region\"))&&(c[\"a.activitymap.page\"]=a.substring(0,\n255),c[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,c[\"a.activitymap.region\"]=127<b.length?b.substring(0,127):b,c[\"a.activitymap.pageIDType\"]=f.pageName?1:0)};e.link=function(a,d){var b;if(d)b=g(k(d),e.linkExclusions);else if((b=a)&&!(b=q(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var c,f;(f=g(k(a.innerText||a.textContent),e.linkExclusions))||(s(a,c=[],b={a:void 0,t:void 0,s:void 0}),(f=g(k(c.join(\"\"))))||(f=g(k(b.a?b.a:b.t?b.t:b.s?b.s:void 0)))||!(c=(c=a.tagName)&&c.toUpperCase?c.toUpperCase():\n\"\")||(\"INPUT\"==c||\"SUBMIT\"==c&&a.value?f=g(k(a.value)):\"IMAGE\"==c&&a.src&&(f=g(k(a.src)))));b=f}return b};e.region=function(a){for(var d,b=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=q(a,b,b,b))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "function assertBase64Available(){if(!PlatformSupport.getPlatform().base64Available){throw new index_esm_FirestoreError(Code.UNIMPLEMENTED,'Blobs are unavailable in Firestore in this environment.');}}", "function assertUint8ArrayAvailable(){if(typeof Uint8Array==='undefined'){throw new index_esm_FirestoreError(Code.UNIMPLEMENTED,'Uint8Arrays are not available in this environment.');}}", "static get scopes() {\n return [\n 'https://www.googleapis.com/auth/cloud-platform',\n ];\n }", "function WebIdUtils () {\n}", "function getGoogle(n) {\n\n}", "function dc(t) {\n for (var e, n, r, i = [], o = 1; o < arguments.length; o++) i[o - 1] = arguments[o];\n t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_0__[\"getModularInstance\"])(t);\n var s = {\n includeMetadataChanges: !1\n }, a = 0;\n \"object\" != typeof i[a] || ea(i[a]) || (s = i[a], a++);\n var c, h, f, l = {\n includeMetadataChanges: s.includeMetadataChanges\n };\n if (ea(i[a])) {\n var d = i[a];\n i[a] = null === (e = d.next) || void 0 === e ? void 0 : e.bind(d), i[a + 1] = null === (n = d.error) || void 0 === n ? void 0 : n.bind(d), \n i[a + 2] = null === (r = d.complete) || void 0 === r ? void 0 : r.bind(d);\n }\n if (t instanceof Wu) h = Ku(t.firestore, ia), f = zt(t._key.path), c = {\n next: function(e) {\n i[a] && i[a](yc(h, t, e));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }; else {\n var p = Ku(t, Hu);\n h = Ku(p.firestore, ia), f = p._query;\n var y = new fc(h);\n c = {\n next: function(t) {\n i[a] && i[a](new Qa(h, y, p, t));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }, Ha(t._query);\n }\n return function(t, e, n, r) {\n var i = this, o = new lu(r), s = new gs(e, o, n);\n return t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ds, [ 4 /*yield*/ , Su(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n })), function() {\n o.Wo(), t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ps, [ 4 /*yield*/ , Su(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n }));\n };\n }(oa(h), f, l, c);\n}", "function i(t){\"use strict\";var a=this,n=e;a.s=t,a._c=\"s_m\",n.s_c_in||(n.s_c_il=[],n.s_c_in=0),a._il=n.s_c_il,a._in=n.s_c_in,a._il[a._in]=a,n.s_c_in++,a.version=\"1.0\";var i,o,r,s=\"pending\",c=\"resolved\",d=\"rejected\",l=\"timeout\",u=!1,p={},m=[],g=[],f=0,b=!1,h=function(){var e={};e.requiredVarList=[\"supplementalDataID\",\"timestamp\",\"dynamicVariablePrefix\",\"visitorID\",\"marketingCloudVisitorID\",\"analyticsVisitorID\",\"audienceManagerLocationHint\",\"authState\",\"fid\",\"vmk\",\"visitorMigrationKey\",\"visitorMigrationServer\",\"visitorMigrationServerSecure\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"fpCookieDomainPeriods\",\"cookieLifetime\",\"pageName\",\"pageURL\",\"referrer\",\"contextData\",\"currencyCode\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\",\"retrieveLightProfiles\",\"deleteLightProfiles\",\"retrieveLightData\"],e.accountVarList=e.requiredVarList.concat([\"purchaseID\",\"variableProvider\",\"channel\",\"server\",\"pageType\",\"transactionID\",\"campaign\",\"state\",\"zip\",\"events\",\"events2\",\"products\",\"audienceManagerBlob\",\"tnt\"]),e.lightRequiredVarList=[\"timestamp\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"cookieLifetime\",\"contextData\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\"],e.lightVarList=e.lightRequiredVarList.slice(0),e.accountConfigList=[\"account\",\"allAccounts\",\"debugTracking\",\"visitor\",\"visitorOptedOut\",\"trackOffline\",\"offlineLimit\",\"offlineThrottleDelay\",\"offlineFilename\",\"usePlugins\",\"doPlugins\",\"configURL\",\"visitorSampling\",\"visitorSamplingGroup\",\"linkObject\",\"clickObject\",\"linkURL\",\"linkName\",\"linkType\",\"trackDownloadLinks\",\"trackExternalLinks\",\"trackClickMap\",\"trackInlineStats\",\"linkLeaveQueryString\",\"linkTrackVars\",\"linkTrackEvents\",\"linkDownloadFileTypes\",\"linkExternalFilters\",\"linkInternalFilters\",\"useForcedLinkTracking\",\"forcedLinkTrackingTimeout\",\"trackingServer\",\"trackingServerSecure\",\"ssl\",\"abort\",\"mobile\",\"dc\",\"lightTrackVars\",\"maxDelay\",\"expectSupplementalData\",\"usePostbacks\",\"AudienceManagement\"];for(var t=0;250>=t;t++)76>t&&(e.accountVarList.push(\"prop\"+t),e.lightVarList.push(\"prop\"+t)),e.accountVarList.push(\"eVar\"+t),e.lightVarList.push(\"eVar\"+t),6>t&&e.accountVarList.push(\"hier\"+t),4>t&&e.accountVarList.push(\"list\"+t);var a=[\"pe\",\"pev1\",\"pev2\",\"pev3\",\"latitude\",\"longitude\",\"resolution\",\"colorDepth\",\"javascriptVersion\",\"javaEnabled\",\"cookiesEnabled\",\"browserWidth\",\"browserHeight\",\"connectionType\",\"homepage\",\"pageURLRest\"];return e.accountVarList=e.accountVarList.concat(a),e.requiredVarList=e.requiredVarList.concat(a),e}();a.newCall=!1,a.newCallVariableOverrides=null,a.hitCount=0,a.timeout=1e3,a.currentHit=null,a.backup=function(e,t,a){var n,i,o,r;for(t=t||{},n=0;2>n;n++)for(i=n>0?h.accountConfigList:h.accountVarList,o=0;o<i.length;o++)r=i[o],t[r]=e[r],a||t[r]||(t[\"!\"+r]=1);return t},a.restore=function(e,t,a){var n,i,o,r,s,c,d=!0;for(n=0;2>n;n++)for(i=n>0?h.accountConfigList:h.accountVarList,o=0;o<i.length;o++)if(r=i[o],s=e[r],s||e[\"!\"+r]){if(!a&&(\"contextData\"==r||\"retrieveLightData\"==r)&&t[r])for(c in t[r])s[c]||(s[c]=t[r][c]);t[r]=s}return d},a.createHitMeta=function(e,t){var n,i=a.s,o=[],r=[];return t=t||{},n={id:e,delay:!1,restorePoint:f,status:c,promise:Promise.resolve(),backup:{s:{},sSet:{},variableOverrides:{}},values:{s:{},variableOverrides:{}},timeout:!1},o=a.replacePromises(i,n.values.s),r=a.replacePromises(t,n.values.variableOverrides),n.backup.s=a.backup(i),n.backup.sSet=a.backup(i,null,!0),n.backup.variableOverrides=t,(o&&o.length>0||r&&r.length>0)&&(n.delay=!0,n.status=s,n.promise=Promise.all([Promise.all(o),Promise.all(r)]).then(function(){n.delay=!1,n.status=c,n.timeout&&clearTimeout(n.timeout)}),a.timeout&&(n.timeout=setTimeout(function(){n.delay=!1,n.status=l,n.timeout&&clearTimeout(n.timeout),a.sendPendingHits()},a.timeout))),n},a.replacePromises=function(e,t){var a,n,i,o,r,l,u=[];t=t||{},o=function(e,t){return function(a){t[e].value=a,t[e].status=c}},r=function(e,t){return function(a){t[e].status=d,t[e].exception=a}},l=function(e,t,a){var n=e[t];n instanceof Promise?(a[t]=a[t]||{},\"contextData\"===t||\"retrieveLightData\"===t?e[t]={}:e[t]=\"\",a[t].status=s,u.push(n.then(o(t,a))[\"catch\"](r(t,a)))):\"object\"==typeof n&&null!==n&&n.promise instanceof Promise&&(a[t]=a[t]||{},\"contextData\"===t||\"retrieveLightData\"===t?e[t]={}:e[t]=\"\",n.hasOwnProperty(\"unresolved\")&&(a[t].value=n.unresolved),a[t].status=s,u.push(n.promise.then(o(t,a))[\"catch\"](r(t,a))))};for(a in e)if(e.hasOwnProperty(a))if(i=e[a],\"contextData\"===a||\"retrieveLightData\"===a)if(i instanceof Promise||\"object\"==typeof i&&null!==i&&i.promise instanceof Promise)l(e,a,t);else{t[a]={isGroup:!0};for(n in i)i.hasOwnProperty(n)&&l(i,n,t[a])}else l(e,a,t);return u},a.metaToObject=function(e){var t,n,i,o,r=(a.s,{});if(e)for(t in e)if(e.hasOwnProperty(t))if(i=e[t],\"contextData\"!==t&&\"retrieveLightData\"!==t||!i.isGroup)i.value&&i.status===c&&(r[t]=i.value);else{r[t]={};for(n in i)i.hasOwnProperty(n)&&(o=i[n],o.value&&o.status===c&&(r[t][n]=o.value))}return r},a.getMeta=function(e){return e&&m[e]?m[e]:m},a.forceReady=function(){u=!0,a.sendPendingHits()},i=t.isReadyToTrack,t.isReadyToTrack=function(){return!!(!a.newCall&&i()&&g&&g.length>0&&(u||m[g[0]]&&!m[g[0]].delay))},o=t.callbackWhenReadyToTrack,t.callbackWhenReadyToTrack=function(e,n,i){var r,s;return n!==t.track?o(e,n,i):void(a.newCall&&(r=a.hitCount++,g.push(r),s=a.createHitMeta(r,a.newCallVariableOverrides),m[r]=s,b||(b=setInterval(a.sendPendingHits,100)),s.promise.then(function(){a.sendPendingHits()})))},r=t.t,t.t=t.track=function(e,t,n){n||(a.newCall=!0,a.newCallVariableOverrides=e),r(e,t),n||(a.newCall=!1,a.newCallVariableOverrides=null,a.sendPendingHits())},a.sendPendingHits=function(){for(var e,t,n,i,o,r=a.s;r.isReadyToTrack();){for(e=m[g[0]],a.currentHit=e,i={},o={},a.trigger(\"hitBeforeSend\",e),o.marketingCloudVisitorID=r.marketingCloudVisitorID,o.visitorOptedOut=r.visitorOptedOut,o.analyticsVisitorID=r.analyticsVisitorID,o.audienceManagerLocationHint=r.audienceManagerLocationHint,o.audienceManagerBlob=r.audienceManagerBlob,a.restore(e.backup.s,r),t=e.restorePoint;t<g[0];t++)n=a.metaToObject(m[t].values.s),delete n.referrer,delete n.resolution,delete n.colorDepth,delete n.javascriptVersion,delete n.javaEnabled,delete n.cookiesEnabled,delete n.browserWidth,delete n.browserHeight,delete n.connectionType,delete n.homepage,a.restore(n,o);a.restore(e.backup.sSet,o),a.restore(a.metaToObject(e.values.s),o),a.restore(e.backup.variableOverrides,i),a.restore(a.metaToObject(e.values.variableOverrides),i),r.track(i,o,!0),f=g.shift(),a.trigger(\"hitAfterSend\",e),a.currentHit=null}b&&g.length<1&&(clearInterval(b),b=!1)},i()||o(a,function(){a.sendPendingHits()},[]),a.on=function(e,t){p[e]||(p[e]=[]),p[e].push(t)},a.trigger=function(e,t){var a,n,i,o=!1;if(p[e])for(a=0,n=p[e].length;n>a;a++){i=p[e][a];try{i(t),o=!0}catch(e){}}else o=!0;return o},a._s=function(){a.trigger(\"_s\")},a._d=function(){return a.trigger(\"_d\"),0},a._g=function(){a.trigger(\"_g\")},a._t=function(){a.trigger(\"_t\")}}", "static get apiEndpoint() {\n return 'securitycenter.googleapis.com';\n }", "transient final protected internal function m174() {}", "function xi(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "function sdk(){\n}", "function getGamerAd () {\n //google publisher tag\n window.googletag = window.googletag || {};\n window.googletag.cmd = window.googletag.cmd || [];\n window.googletag.cmd.push(function () {\n window.googletag.pubads().setTargeting('permutive', 'gaming');\n googletag.enableServices();\n console.log( `3) pubads called with segment data `)// check\n });\n}", "function start() {\n // console.log(typeof String(getKey('google')))\n // 2. Initialize the JavaScript client library.\n gapi.client.init({\n 'apiKey': \"AIzaSyABljrxKqX_RRid-9DZMq9aHGm65tuXSSk\"\n }).then(function () {\n // 3. Initialize and make the API request.\n gapi.client.request({\n 'path': `${defineRequest()}`,\n })\n }).then(function (response) {\n }, function (reason) {\n console.log(reason);\n console.log('Error: ' + reason.result.error.message);\n });\n }", "static get servicePath() {\n return 'securitycenter.googleapis.com';\n }", "function trackInAnalytics(version) {\n // Create the random UUID from 30 random hex numbers gets them into the format xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx (with y being 8, 9, a, or b).\n var uuid = \"\";\n for (var i = 0; i < 30; i++) {\n uuid += parseInt(Math.random() * 16).toString(16);\n }\n uuid = uuid.substr(0, 8) + \"-\" + uuid.substr(8, 4) + \"-4\" + uuid.substr(12, 3) + \"-\" + parseInt(Math.random() * 4 + 8).toString(16) + uuid.substr(15, 3) + \"-\" + uuid.substr(18, 12);\n\n var url = \"http://www.google-analytics.com/collect?v=1&t=event&tid=UA-74705456-1&cid=\" + uuid + \"&ds=adwordsscript&an=qstracker&av=\"\n + version\n + \"&ec=AdWords%20Scripts&ea=Script%20Execution&el=QS%20Tracker%20v\" + version;\n UrlFetchApp.fetch(url);\n}", "static get servicePath() {\n return 'logging.googleapis.com';\n }", "function Pi(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "static get scopes() {\n return ['https://www.googleapis.com/auth/cloud-platform'];\n }", "function errorGoogle() {\r\n\t\twindow.alert('Your API is NOT Valid. Please check again');\r\n}", "static final private internal function m106() {}", "transient private internal function m185() {}", "function AppMeasurement_Module_ActivityMap(h){function q(){var a=f.pageYOffset+(f.innerHeight||0);a&&a>+g&&(g=a)}function r(){if(e.scrollReachSelector){var a=h.d.querySelector&&h.d.querySelector(e.scrollReachSelector);a?(g=a.scrollTop||0,a.addEventListener(\"scroll\",function(){var d;(d=a&&a.scrollTop+a.clientHeight||0)>g&&(g=d)})):0<w--&&setTimeout(r,1E3)}}function l(a,d){var c,b,n;if(a&&d&&(c=e.c[d]||(e.c[d]=d.split(\",\"))))for(n=0;n<c.length&&(b=c[n++]);)if(-1<a.indexOf(b))return null;p=1;return a}\nfunction s(a,d,c,b,e){var f,k;if(a.dataset&&(k=a.dataset[d]))f=k;else if(a.getAttribute)if(k=a.getAttribute(\"data-\"+c))f=k;else if(k=a.getAttribute(c))f=k;if(!f&&h.useForcedLinkTracking&&e){var g;a=a.onclick?\"\"+a.onclick:\"\";varValue=\"\";if(b&&a&&(d=a.indexOf(b),0<=d)){for(d+=b.length;d<a.length;)if(c=a.charAt(d++),0<=\"'\\\"\".indexOf(c)){g=c;break}for(k=!1;d<a.length&&g;){c=a.charAt(d);if(!k&&c===g)break;\"\\\\\"===c?k=!0:(varValue+=c,k=!1);d++}}(g=varValue)&&(h.w[b]=g)}return f||e&&h.w[b]}function t(a,d,\nc){var b;return(b=e[d](a,c))&&(p?(p=0,b):l(m(b),e[d+\"Exclusions\"]))}function u(a,d,c){var b;if(a&&!(1===(b=a.nodeType)&&(b=a.nodeName)&&(b=b.toUpperCase())&&x[b])&&(1===a.nodeType&&(b=a.nodeValue)&&(d[d.length]=b),c.a||c.t||c.s||!a.getAttribute||((b=a.getAttribute(\"alt\"))?c.a=b:(b=a.getAttribute(\"title\"))?c.t=b:\"IMG\"==(\"\"+a.nodeName).toUpperCase()&&(b=a.getAttribute(\"src\")||a.src)&&(c.s=b)),(b=a.childNodes)&&b.length))for(a=0;a<b.length;a++)u(b[a],d,c)}function m(a){if(null==a||void 0==a)return a;\ntry{return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\"mg\"),\"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\",\"mg\"),\" \").substring(0,254)}catch(d){}}var e=this;e.s=h;var f=window;f.s_c_in||(f.s_c_il=[],f.s_c_in=0);e._il=f.s_c_il;e._in=f.s_c_in;e._il[e._in]=e;f.s_c_in++;\ne._c=\"s_m\";var g=0,v,w=60;e.c={};var p=0,x={SCRIPT:1,STYLE:1,LINK:1,CANVAS:1};e._g=function(){var a,d,c,b=h.contextData,e=h.linkObject;(a=h.pageName||h.pageURL)&&(d=t(e,\"link\",h.linkName))&&(c=t(e,\"region\"))&&(b[\"a.activitymap.page\"]=a.substring(0,255),b[\"a.activitymap.link\"]=128<d.length?d.substring(0,128):d,b[\"a.activitymap.region\"]=127<c.length?c.substring(0,127):c,0<g&&(b[\"a.activitymap.xy\"]=10*Math.floor(g/10)),b[\"a.activitymap.pageIDType\"]=h.pageName?1:0)};e.e=function(){e.trackScrollReach&&\n!v&&(e.scrollReachSelector?r():(q(),f.addEventListener&&f.addEventListener(\"scroll\",q,!1)),v=!0)};e.link=function(a,d){var c;if(d)c=l(m(d),e.linkExclusions);else if((c=a)&&!(c=s(a,\"sObjectId\",\"s-object-id\",\"s_objectID\",1))){var b,f;(f=l(m(a.innerText||a.textContent),e.linkExclusions))||(u(a,b=[],c={a:void 0,t:void 0,s:void 0}),(f=l(m(b.join(\"\"))))||(f=l(m(c.a?c.a:c.t?c.t:c.s?c.s:void 0)))||!(b=(b=a.tagName)&&b.toUpperCase?b.toUpperCase():\"\")||(\"INPUT\"==b||\"SUBMIT\"==b&&a.value?f=l(m(a.value)):\"IMAGE\"==\nb&&a.src&&(f=l(m(a.src)))));c=f}return c};e.region=function(a){for(var d,c=e.regionIDAttribute||\"id\";a&&(a=a.parentNode);){if(d=s(a,c,c,c))return d;if(\"BODY\"==a.nodeName)return\"BODY\"}}}", "get service() {\n return this.canvas.__jsonld.service; // eslint-disable-line no-underscore-dangle\n }", "function fc(t) {\n for (var e, n, r, i = [], o = 1; o < arguments.length; o++) i[o - 1] = arguments[o];\n t = Object(_firebase_util__WEBPACK_IMPORTED_MODULE_0__[\"getModularInstance\"])(t);\n var s = {\n includeMetadataChanges: !1\n }, a = 0;\n \"object\" != typeof i[a] || Zu(i[a]) || (s = i[a], a++);\n var c, h, f, l = {\n includeMetadataChanges: s.includeMetadataChanges\n };\n if (Zu(i[a])) {\n var d = i[a];\n i[a] = null === (e = d.next) || void 0 === e ? void 0 : e.bind(d), i[a + 1] = null === (n = d.error) || void 0 === n ? void 0 : n.bind(d), \n i[a + 2] = null === (r = d.complete) || void 0 === r ? void 0 : r.bind(d);\n }\n if (t instanceof Qu) h = Bu(t.firestore, na), f = Qt(t._key.path), c = {\n next: function(e) {\n i[a] && i[a](dc(h, t, e));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }; else {\n var p = Bu(t, zu);\n h = Bu(p.firestore, na), f = p._query;\n var y = new cc(h);\n c = {\n next: function(t) {\n i[a] && i[a](new Ka(h, y, p, t));\n },\n error: i[a + 1],\n complete: i[a + 2]\n }, za(t._query);\n }\n return function(t, e, n, r) {\n var i = this, o = new fu(r), s = new ms(e, o, n);\n return t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ls, [ 4 /*yield*/ , Tu(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n })), function() {\n o.Wo(), t.asyncQueue.enqueueAndForget((function() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(i, void 0, void 0, (function() {\n var e;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(n) {\n switch (n.label) {\n case 0:\n return e = ds, [ 4 /*yield*/ , Tu(t) ];\n\n case 1:\n return [ 2 /*return*/ , e.apply(void 0, [ n.sent(), s ]) ];\n }\n }));\n }));\n }));\n };\n }(ra(h), f, l, c);\n}", "transient private protected internal function m182() {}", "function onYouTubeApiLoad() {\n // This API key is intended for use only in this lesson.\n // See http://goo.gl/PdPA1 to get a key for your own applications.\n gapi.client.setApiKey('AIzaSyBgAgZFXgrB_osmxLAYqTW3DAQOYKno3zI');\n\n \n}", "function SigV4Utils() { }", "function ga4(){\n try {\n return window.gtag.apply(window.gtag, arguments);\n } catch (e) {\n console.error('Could not track event. Fine if this is a test.', e, Array.from(arguments));\n }\n}", "function a(t){\"use strict\";var n=this,i=e;n.s=t,n._c=\"s_m\",i.s_c_in||(i.s_c_il=[],i.s_c_in=0),n._il=i.s_c_il,n._in=i.s_c_in,n._il[n._in]=n,i.s_c_in++,n.version=\"1.0\";var a,r,o,s=\"pending\",c=\"resolved\",u=\"rejected\",l=\"timeout\",d=!1,f={},p=[],g=[],h=0,m=!1,v=function(){var e={};e.requiredVarList=[\"supplementalDataID\",\"timestamp\",\"dynamicVariablePrefix\",\"visitorID\",\"marketingCloudVisitorID\",\"analyticsVisitorID\",\"audienceManagerLocationHint\",\"authState\",\"fid\",\"vmk\",\"visitorMigrationKey\",\"visitorMigrationServer\",\"visitorMigrationServerSecure\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"fpCookieDomainPeriods\",\"cookieLifetime\",\"pageName\",\"pageURL\",\"referrer\",\"contextData\",\"currencyCode\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\",\"retrieveLightProfiles\",\"deleteLightProfiles\",\"retrieveLightData\"],e.accountVarList=e.requiredVarList.concat([\"purchaseID\",\"variableProvider\",\"channel\",\"server\",\"pageType\",\"transactionID\",\"campaign\",\"state\",\"zip\",\"events\",\"events2\",\"products\",\"audienceManagerBlob\",\"tnt\"]),e.lightRequiredVarList=[\"timestamp\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"cookieLifetime\",\"contextData\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\"],e.lightVarList=e.lightRequiredVarList.slice(0),e.accountConfigList=[\"account\",\"allAccounts\",\"debugTracking\",\"visitor\",\"visitorOptedOut\",\"trackOffline\",\"offlineLimit\",\"offlineThrottleDelay\",\"offlineFilename\",\"usePlugins\",\"doPlugins\",\"configURL\",\"visitorSampling\",\"visitorSamplingGroup\",\"linkObject\",\"clickObject\",\"linkURL\",\"linkName\",\"linkType\",\"trackDownloadLinks\",\"trackExternalLinks\",\"trackClickMap\",\"trackInlineStats\",\"linkLeaveQueryString\",\"linkTrackVars\",\"linkTrackEvents\",\"linkDownloadFileTypes\",\"linkExternalFilters\",\"linkInternalFilters\",\"useForcedLinkTracking\",\"forcedLinkTrackingTimeout\",\"trackingServer\",\"trackingServerSecure\",\"ssl\",\"abort\",\"mobile\",\"dc\",\"lightTrackVars\",\"maxDelay\",\"expectSupplementalData\",\"usePostbacks\",\"AudienceManagement\"];for(var t=0;250>=t;t++)76>t&&(e.accountVarList.push(\"prop\"+t),e.lightVarList.push(\"prop\"+t)),e.accountVarList.push(\"eVar\"+t),e.lightVarList.push(\"eVar\"+t),6>t&&e.accountVarList.push(\"hier\"+t),4>t&&e.accountVarList.push(\"list\"+t);var n=[\"pe\",\"pev1\",\"pev2\",\"pev3\",\"latitude\",\"longitude\",\"resolution\",\"colorDepth\",\"javascriptVersion\",\"javaEnabled\",\"cookiesEnabled\",\"browserWidth\",\"browserHeight\",\"connectionType\",\"homepage\",\"pageURLRest\"];return e.accountVarList=e.accountVarList.concat(n),e.requiredVarList=e.requiredVarList.concat(n),e}(),b=!1;n.newHit=!1,n.newHitVariableOverrides=null,n.hitCount=0,n.timeout=1e3,n.currentHit=null,n.backup=function(e,t,n){var i,a,r,o;for(t=t||{},i=0;2>i;i++)for(a=i>0?v.accountConfigList:v.accountVarList,r=0;r<a.length;r++)o=a[r],t[o]=e[o],n||t[o]||(t[\"!\"+o]=1);return t},n.restore=function(e,t,n){var i,a,r,o,s,c,u=!0;for(i=0;2>i;i++)for(a=i>0?v.accountConfigList:v.accountVarList,r=0;r<a.length;r++)if(o=a[r],s=e[o],s||e[\"!\"+o]){if(!n&&(\"contextData\"==o||\"retrieveLightData\"==o)&&t[o])for(c in t[o])s[c]||(s[c]=t[o][c]);t[o]=s}return u},n.createHitMeta=function(e,t){var i,a=n.s,r=[],o=[];return b&&console.log(a.account+\" - createHitMeta\"),t=t||{},i={id:e,delay:!1,restorePoint:h,status:c,promise:Promise.resolve(),backup:{s:{},sSet:{},variableOverrides:{}},values:{s:{},variableOverrides:{}},timeout:!1},r=n.replacePromises(a,i.values.s),o=n.replacePromises(t,i.values.variableOverrides),i.backup.s=n.backup(a),i.backup.sSet=n.backup(a,null,!0),i.backup.variableOverrides=t,(r&&r.length>0||o&&o.length>0)&&(i.delay=!0,i.status=s,i.promise=Promise.all([Promise.all(r),Promise.all(o)]).then(function(){i.delay=!1,i.status=c,i.timeout&&clearTimeout(i.timeout)}),n.timeout&&(i.timeout=setTimeout(function(){i.delay=!1,i.status=l,i.timeout&&clearTimeout(i.timeout),n.sendPendingHits()},n.timeout))),i},n.replacePromises=function(e,t){var n,i,a,r,o,l,d=[];t=t||{},r=function(e,t){return function(n){t[e].value=n,t[e].status=c}},o=function(e,t){return function(n){t[e].status=u,t[e].exception=n}},l=function(e,t,n){var i=e[t];i instanceof Promise?(n[t]=n[t]||{},e[t]=\"contextData\"===t||\"retrieveLightData\"===t?{}:\"\",n[t].status=s,d.push(i.then(r(t,n))[\"catch\"](o(t,n)))):\"object\"==typeof i&&null!==i&&i.promise instanceof Promise&&(n[t]=n[t]||{},e[t]=\"contextData\"===t||\"retrieveLightData\"===t?{}:\"\",i.hasOwnProperty(\"unresolved\")&&(n[t].value=i.unresolved),n[t].status=s,d.push(i.promise.then(r(t,n))[\"catch\"](o(t,n))))};for(n in e)if(e.hasOwnProperty(n))if(a=e[n],\"contextData\"===n||\"retrieveLightData\"===n)if(a instanceof Promise||\"object\"==typeof a&&null!==a&&a.promise instanceof Promise)l(e,n,t);else{t[n]={isGroup:!0};for(i in a)a.hasOwnProperty(i)&&l(a,i,t[n])}else l(e,n,t);return d},n.metaToObject=function(e){var t,i,a,r,o=(n.s,{});if(e)for(t in e)if(e.hasOwnProperty(t))if(a=e[t],\"contextData\"!==t&&\"retrieveLightData\"!==t||!a.isGroup)a.value&&a.status===c&&(o[t]=a.value);else{o[t]={};for(i in a)a.hasOwnProperty(i)&&(r=a[i],r.value&&r.status===c&&(o[t][i]=r.value))}return o},n.getMeta=function(e){return e&&p[e]?p[e]:p},n.forceReady=function(){d=!0,n.sendPendingHits()},a=t.isReadyToTrack,t.isReadyToTrack=function(){if(!n.newHit&&a()&&g&&g.length>0&&(d||p[g[0]]&&!p[g[0]].delay))return b&&console.log(t.account+\" - isReadyToTrack - true\"),!0;if(b&&(console.log(t.account+\" - isReadyToTrack - false\"),console.log(t.account+\" - isReadyToTrack - isReadyToTrack(original) - \"+a()),!a()))try{throw Error(\"Debugging Call stack\")}catch(e){console.log(t.account+\" - isReadyToTrack - \"+e.stack)}return!1},r=t.callbackWhenReadyToTrack,t.callbackWhenReadyToTrack=function(e,i,a){var o,s;return b&&console.log(t.account+\" - callbackWhenReadyToTrack\"),i!==t.track?r(e,i,a):void(n.newHit&&(o=n.hitCount++,g.push(o),s=n.createHitMeta(o,n.newHitVariableOverrides),p[o]=s,m||(m=setInterval(n.sendPendingHits,100)),s.promise.then(function(){n.sendPendingHits()})))},o=t.t,t.t=t.track=function(e,i,a){b&&console.log(t.account+\" - track\"),a||(n.newHit=!0,n.newHitVariableOverrides=e),o(e,i),a||(n.newHit=!1,n.newHitVariableOverrides=null,n.sendPendingHits())},n.sendPendingHits=function(){var e,t,i,a,r,o=n.s;for(b&&console.log(o.account+\" - sendPendingHits\");o.isReadyToTrack();){for(e=p[g[0]],n.currentHit=e,a={},r={},n.trigger(\"hitBeforeSend\",e),r.marketingCloudVisitorID=o.marketingCloudVisitorID,r.visitorOptedOut=o.visitorOptedOut,r.analyticsVisitorID=o.analyticsVisitorID,r.audienceManagerLocationHint=o.audienceManagerLocationHint,r.audienceManagerBlob=o.audienceManagerBlob,b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.s,o),t=e.restorePoint;t<g[0];t++)i=n.metaToObject(p[t].values.s),delete i.referrer,delete i.resolution,delete i.colorDepth,delete i.javascriptVersion,delete i.javaEnabled,delete i.cookiesEnabled,delete i.browserWidth,delete i.browserHeight,delete i.connectionType,delete i.homepage,n.restore(i,r);b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.sSet,r),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(n.metaToObject(e.values.s),r),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),n.restore(e.backup.variableOverrides,a),n.restore(n.metaToObject(e.values.variableOverrides),a),o.track(a,r,!0),b&&console.log(o.account+\" - sendPendingHits - s.audienceManagerBlob => \"+o.audienceManagerBlob),h=g.shift(),n.trigger(\"hitAfterSend\",e),n.currentHit=null}m&&g.length<1&&(clearInterval(m),m=!1)},b&&console.log(t.account+\" - INITIAL isReadyToTrack - \"+a()),a()||r(n,function(){if(b)try{throw Error(\"Debugging Call stack\")}catch(e){console.log(t.account+\" - callbackWhenReadyToTrack - \"+e.stack)}n.sendPendingHits()},[]),n.on=function(e,t){f[e]||(f[e]=[]),f[e].push(t)},n.trigger=function(e,t){var n,i,a,r=!1;if(f[e])for(n=0,i=f[e].length;i>n;n++){a=f[e][n];try{a(t),r=!0}catch(o){}}else r=!0;return r},n._s=function(){n.trigger(\"_s\")},n._d=function(){return n.trigger(\"_d\"),0},n._g=function(){n.trigger(\"_g\")},n._t=function(){n.trigger(\"_t\")}}", "function t(e, r, i) {\n this.name = e, this.version = r, this.Un = i, \n // NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the\n // bug we're checking for should exist in iOS >= 12.2 and < 13, but for\n // whatever reason it's much harder to hit after 12.2 so we only proactively\n // log on 12.2.\n 12.2 === t.Qn(Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"getUA\"])()) && A(\"Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.\");\n }", "function googleApiClientReady() {\n loadAPIClientInterfaces();\n /*console.log(\"Getting ready\");\n gapi.auth.init(function() {\n window.setTimeout(checkAuth, 1);\n });*/\n}", "function M() {\n if (\"undefined\" == typeof atob) throw new P(R.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "supportsPlatform() {\n return true;\n }", "function version(){ return \"0.13.0\" }", "function getClientVersion() { return '0.14.4'; }", "get api() {\n return google;\n }", "function googleAPIError() {\n alert('Fail to connect to Google API.');\n}", "async function main() {\n try {\n const oAuth2Client = await getAuthenticatedClient();\n // Make a simple request to the Google Plus API using our pre-authenticated client. The `request()` method\n // takes an AxiosRequestConfig object. Visit https://github.com/axios/axios#request-config.\n // const url = 'https://www.googleapis.com/plus/v1/people?query=pizza';\n\n console.log(oAuth2Client);\n var call_creds = grpc.credentials.createFromGoogleCredential(oAuth2Client);\n var combined_creds = grpc.credentials.combineChannelCredentials(ssl_creds, call_creds);\n var stub = new authProto.Greeter('greeter.googleapis.com', combined_credentials);\n const res = await oAuth2Client.request({scope})\n console.log(res.data);\n } catch (e) {\n console.error(e);\n }\n process.exit();\n}", "function Ci(t, e) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n var n = t.projectId;\n return t.isDefaultDatabase || (n += \".\" + t.database), \"firestore/\" + e + \"/\" + n + \"/\"\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */;\n}", "function initGAPI() {\r\n if (!app.google.api.length) {\r\n jQuery(\".az-gg-login-btn\").remove();\r\n return;\r\n }\r\n gapi.load(\"auth2\", function () {\r\n gapi.auth2.init({\r\n client_id: app.google.api\r\n })\r\n .then(function (response) {\r\n // console.log('Google API Success');\r\n app.google.hasValidApi = true;\r\n // console.log(response);\r\n })\r\n .catch(function (error) {\r\n console.log('Google API Error');\r\n app.google.hasValidApi = false;\r\n // console.log(error);\r\n });\r\n });\r\n}", "static get scopes() {\n return [\n 'https://www.googleapis.com/auth/cloud-platform',\n 'https://www.googleapis.com/auth/cloud-platform.read-only',\n 'https://www.googleapis.com/auth/logging.admin',\n 'https://www.googleapis.com/auth/logging.read',\n 'https://www.googleapis.com/auth/logging.write',\n ];\n }", "function DWRUtil() { }", "onGoogleLogin(response) {\n console.log(response);\n }", "function embedhtml5(gd, mb) {\n function hd() {\n function F(a) {\n return (\"\" + a).toLowerCase()\n }\n\n function Ha(a, d) {\n if (!a)return a;\n var b = 0, f = 0, g, n = a.length, k;\n for (g = 0; g < n; g++)if (k = a.charCodeAt(g), 32 >= k)b++; else break;\n for (g = n - 1; 0 < g; g--)if (k = a.charCodeAt(g), 32 >= k)f++; else break;\n void 0 === d && (g = a.charAt(b), k = a.charAt(n - f - 1), (\"'\" == g && \"'\" == k || '\"' == g && '\"' == k) && 3 == a.split(g).length && (b++, f++));\n return a = a.slice(b, n - f)\n }\n\n function pa(a) {\n return 0 <= _[368].indexOf(String(a).toLowerCase())\n }\n\n function ga(a, d) {\n return _[523] == d ? Number(a) : _[67] == d ? pa(a) : _[13] == d ? null == a ? null : String(a) : a\n }\n\n function sa(a) {\n return Number(a).toFixed(6)\n }\n\n function ha(a, d, b, f) {\n a.__defineGetter__(d, b);\n void 0 !== f && a.__defineSetter__(d, f)\n }\n\n function va(a, d, b) {\n var f = \"_\" + d;\n a[f] = b;\n a.__defineGetter__(d, function () {\n return a[f]\n });\n a.__defineSetter__(d, function (d) {\n d = ga(d, typeof b);\n d != a[f] && (a[f] = d, a.haschanged = !0)\n })\n }\n\n function Aa(a) {\n a && a.preventDefault()\n }\n\n function R(a, d, b, f) {\n a && a.addEventListener(d, b, f)\n }\n\n function ba(a, d, b, f) {\n a && a.removeEventListener(d, b, f)\n }\n\n function Ja(a) {\n var d = aa.createElement(1 == a ? \"img\" : 2 == a ? _[486] : \"div\");\n d && 1 == a && \"off\" != Tc && (d.crossOrigin = Tc);\n return d\n }\n\n function gc(a) {\n return function () {\n return a.apply(a, arguments)\n }\n }\n\n function id(a) {\n return a.split(\"<\").join(\"&lt;\").split(\">\").join(\"&gt;\")\n }\n\n function ca(a, d) {\n var b = \"(\" + (a >> 16 & 255) + \",\" + (a >> 8 & 255) + \",\" + (a & 255);\n void 0 === d && (d = 1 - (a >> 24 & 255) / 255);\n return (1 > d ? \"rgba\" + b + \",\" + d : \"rgb\" + b) + \")\"\n }\n\n function Ed(a) {\n return a.split(\"[\").join(\"<\").split(\"<<\").join(\"[\").split(\"]\").join(\">\").split(\">>\").join(\"]\")\n }\n\n function nc(a, d) {\n a = Number(a);\n for (d = Number(d); 0 > a;)a += 360;\n for (; 360 < a;)a -= 360;\n var b = Math.abs(d - a), f = Math.abs(d - (a - 360)), g = Math.abs(d - (a + 360));\n f < b && f < g ? a -= 360 : g < b && g < f && (a += 360);\n return a\n }\n\n function Gc(a) {\n if (a) {\n var d = a.indexOf(\"?\");\n 0 <= d && (a = a.slice(0, d));\n d = a.indexOf(\"#\");\n 0 <= d && (a = a.slice(0, d))\n }\n return a\n }\n\n function Vd(a) {\n a = Gc(a);\n var d = a.lastIndexOf(\"/\"), b = a.lastIndexOf(\"\\\\\");\n b > d && (d = b);\n return a.slice(d + 1)\n }\n\n function Uc(a, d) {\n var b = String(a).charCodeAt(0);\n return 48 <= b && 57 >= b ? (la(3, d + _[154]), !1) : !0\n }\n\n function gd(a, d) {\n for (var b = \"\", f = 0, g = 1, n = 0, k = 0; 1 == g && 0 == f;) {\n var e, w = a.indexOf(\"*\", n), b = \"\";\n 0 > w ? (w = a.length, f = 1) : (b = a.indexOf(\"*\", w + 1), 0 > b && (b = a.length), e = b - (w + 1), b = a.substr(w + 1, e));\n e = w - n;\n 0 < e && d.substr(k, f ? void 0 : e) != a.substr(n, e) && (g = 0);\n n = w + 1;\n \"\" != b && (k = d.indexOf(b, k), 0 > k && (g = 0))\n }\n return !!g\n }\n\n function oc(a, d, b, f) {\n for (; 32 >= a.charCodeAt(d);)d++;\n for (; 32 >= a.charCodeAt(b - 1);)b--;\n var g = a.charCodeAt(d);\n if (37 == g)a = U(a.slice(d + 1, b), f); else if (103 == g && \"get(\" == a.slice(d, d + 4)) {\n for (d += 4; 32 >= a.charCodeAt(d);)d++;\n for (b = a.lastIndexOf(\")\"); 32 >= a.charCodeAt(b - 1);)b--;\n a = U(a.slice(d, b), f)\n } else 99 == g && \"calc(\" == a.slice(d, d + 5) ? a = U(a.slice(d, b), f) : (f = a.charCodeAt(d), 39 != f && 34 != f || f != a.charCodeAt(b - 1) || (d++, b--), a = a.slice(d, b));\n return a\n }\n\n function Vc(a) {\n var d = [];\n if (null == a || void 0 == a)return d;\n var b, f = 0, g, n, k = 0;\n a = F(a);\n g = a.length;\n for (b = 0; b < g; b++)n = a.charCodeAt(b), 40 == n ? k++ : 41 == n ? k-- : 46 == n && 0 == k && (d.push(a.slice(f, b)), f = b + 1);\n d.push(a.slice(f));\n return d\n }\n\n function Ka(a, d) {\n a = F(a);\n var b, f, g, n;\n g = Yb[a];\n null != g && void 0 !== g && \"\" != g && Zb(g, null, d);\n n = Yb.getArray();\n f = n.length;\n for (b = 0; b < f; b++)if (g = n[b])g = g[a], null != g && void 0 !== g && \"\" != g && Zb(g, null, d)\n }\n\n function I(a, d, b, f, g) {\n if (d && _[13] == typeof d) {\n var n = d.slice(0, 4);\n \"get:\" == n ? d = U(d.slice(4)) : \"calc\" == n && 58 == d.charCodeAt(4) && (d = da.calc(null, d.slice(5)))\n }\n var n = null, k, e = Vc(a);\n k = e.length;\n if (1 == k && f && (n = e[0], void 0 !== f[n])) {\n f[n] = _[67] == typeof f[n] ? pa(d) : d;\n return\n }\n var w = m, n = null;\n 1 < k && (n = e[k - 1]);\n for (a = 0; a < k; a++) {\n var x = e[a], v = a == k - 1, r = null, y = x.indexOf(\"[\");\n 0 < y && (r = oc(x, y + 1, x.length - 1, f), x = x.slice(0, y));\n y = !1;\n if (void 0 === w[x]) {\n if (b)break;\n v || (null == r ? w[x] = new Fb : (w[x] = new bb(Fb), y = !0))\n } else y = !0;\n if (y && 0 == v && w[x] && 1 == w[x].isArray && null != r)if (v = null, w = w[x], v = b ? w.getItem(r) : w.createItem(r)) {\n if (a == k - 2 && \"name\" == n) {\n d = F(d);\n r != d && (null == d || \"null\" == d || \"\" == d ? w.removeItem(r) : w.renameItem(r, d));\n break\n }\n w = v;\n continue\n } else break;\n if (v)w[x] = 1 == g ? d : ga(d, typeof w[x]); else if (w = w[x], null == w)break\n }\n }\n\n function Wd(a) {\n if (a && \"null\" != a) {\n if (_[13] == typeof a) {\n var d = a.split(\"&\"), b = d.length, f;\n a = {};\n for (f = 0; f < b; f++) {\n var g = d[f].split(\"=\");\n a[g[0]] = g[1]\n }\n }\n for (var n in a)\"xml\" != n && I(n, a[n])\n }\n }\n\n function U(a, d, b) {\n if (a && \"calc(\" == (\"\" + a).slice(0, 5))return da.calc(null, a.slice(5, a.lastIndexOf(\")\")));\n var f, g, n = Vc(a);\n f = n.length;\n if (1 == f && _[307] == n[0])return d ? d._type + \"[\" + d.name + \"]\" : \"\";\n if (1 == f && d && (g = n[0], d.hasOwnProperty(g)))return d[g];\n var k = m;\n for (a = 0; a < f; a++) {\n g = n[a];\n var e = a == f - 1, w = null, x = g.indexOf(\"[\");\n 0 < x && (w = oc(g, x + 1, g.length - 1, d), g = g.slice(0, x));\n if (k && void 0 !== k[g]) {\n if (null != w && (x = k[g]) && x.isArray)if (g = x.getItem(w)) {\n if (e)return g;\n k = g;\n continue\n } else break;\n if (e)return k[g];\n k = k[g]\n } else break\n }\n return !0 === b ? void 0 : null\n }\n\n function Zb(a, d, b) {\n da.callaction(a, d, b)\n }\n\n function hd(a, d, b) {\n Zb(a, d ? U(d) : null, b ? pa(b) : null)\n }\n\n function la(a, d) {\n !jd && (0 < a || m.debugmode) && (d = [\"DEBUG\", \"INFO\", _[458], \"ERROR\", _[367]][a] + \": \" + d, V.log(d), 2 < a && m.showerrors && setTimeout(function () {\n try {\n V.showlog(!0)\n } catch (a) {\n }\n }, 500))\n }\n\n function Ea(a, d) {\n if (!jd) {\n a = \"\" + a;\n var E = 0 < F(a).indexOf(\"load\");\n a = id(a).split(\"[br]\").join(\"<br/>\");\n var f = xa.createItem(_[424]), g = xa.createItem(_[425]);\n f.sprite || (f.create(), V.controllayer.appendChild(f.sprite));\n g.sprite || (g.create(), V.controllayer.appendChild(g.sprite));\n var n;\n f.loaded = !0;\n f.align = _[66];\n f.width = \"100%\";\n f.height = \"100%\";\n f.alpha = .5;\n f.keep = !0;\n n = f.sprite.style;\n n.backgroundColor = _[26];\n n.zIndex = 99999998;\n E && (g.visible = !1);\n g.loaded = !0;\n g.align = _[136];\n g.y = 0;\n g.width = \"105%\";\n var k = b.ie || b.android ? -2 : 2;\n g.height = k + 46 / X;\n g.keep = !0;\n n = g.sprite.style;\n n.backgroundColor = _[26];\n n.color = _[40];\n n.fontFamily = b.realDesktop && !b.ie ? _[55] : _[38];\n n.fontSize = \"12px\";\n n.margin = \"-2px\";\n n.border = _[239];\n d || (d = _[291]);\n g.sprite.innerHTML = _[166] + d + \"<br/>\" + a + _[298];\n n.zIndex = 99999999;\n n[pc] = _[203];\n g.jsplugin = {\n onresize: function (a, d) {\n var b = g.sprite.childNodes[0].clientHeight;\n g.height = k + Math.max(46, b) / X;\n 0 >= b && (g.imageheight = 1)\n }\n };\n f.updatepos();\n g.updatepos();\n E && setTimeout(function () {\n try {\n g.visible = !0\n } catch (a) {\n }\n }, 500)\n }\n }\n\n function ve() {\n Xa.removeelements(!0);\n Xd.stop();\n Pa.unregister();\n Oa.unload();\n V.remove()\n }\n\n function we() {\n this.caller = this.args = this.cmd = null;\n this.breakable = !1\n }\n\n function Gb(a, d, b) {\n if (null == a || \"\" == a)return null;\n for (var f = 0, g = 0, n = 0, k = 0, e = 0, w = 0, x = 0, v = 0, r = \"\", r = 0; ;)\n if (r = a.charCodeAt(e), 0 < r && 32 >= r)\n e++;\n else\n break;\n\n //sohow_base64\n for (var y = [], g = a.length, f = e; f < g; f++)\n if (r = a.charCodeAt(f), 0 == v && 0 == x && 40 == r)\n n++;\n else if (0 == v && 0 == x && 41 == r) {\n if (k++, n == k) {\n w = f + 1;\n r = a.slice(e, w);\n y.push(r);\n for (e = w; ;)if (r = a.charCodeAt(e), 0 < r && 32 >= r)e++; else break;\n r = a.charCodeAt(e);\n if (59 != r) {\n w = g;\n break\n }\n for (e++; ;)if (r = a.charCodeAt(e), 59 == r || 0 < r && 32 >= r)e++; else break;\n f = e\n }\n }\n else\n 34 == r ? 0 == x ? x = 1 : 1 == x && (x = 0) : 39 == r ? 0 == x ? x = 2 : 2 == x && (x = 0) : 91 == r && 0 == x ? v++ : 93 == r && 0 == x && v--;\n\n\n w != g && (r = a.slice(e, g), 0 < r.length && y.push(r));\n a = null;\n g = y.length;\n for (f = 0; f < g; f++) {\n r = y[f];\n x = r.indexOf(\"[\");\n k = r.indexOf(\"]\");\n n = r.indexOf(\"(\");\n 0 < x && 0 < k && n > x && n < k && (n = r.indexOf(\"(\", k));\n e = k = null;\n 0 < n ? (k = r.slice(0, n), e = Ha(r.slice(n + 1, r.lastIndexOf(\")\")), !1), 0 >= e.length && (e = null)) : (k = r, e = null);\n k = Ha(k);\n w = [];\n if (null != e) {\n var l, v = e.length, n = 0, u = -1, h = -1, c = x = 0, r = null;\n for (l = 0; l < v; l++)\n r = e.charCodeAt(l),\n 0 == x && 40 == r ? n++ : 0 == x && 41 == r ? n-- : 34 == r ? 1 == x && 0 <= u ? (u = -1, x = 0) : 0 == x && (u = l, x = 1) : 39 == r && (2 == x && 0 <= h ? (h = -1, x = 0) : 0 == x && (h = l, x = 2)),\n 44 == r && 0 == n && 0 == x && (r = Ha(e.slice(c, l)), (r != \"data:image/png;base64\") && (w.push(r),c = l + 1));\n\n 0 == n && (r = Ha(e.slice(c, l)), w.push(r))\n }\n null == a && (a = []);\n n = new we;\n n.cmd = b ? k : F(k);\n n.args = w;\n n.caller = d;\n a.push(n)\n }\n return a\n }\n\n function Hb() {\n this.z = this.y = this.x = 0\n }\n\n function Ma() {\n var a = _[111] !== typeof Float32Array ? new Float32Array(16) : Array(16);\n a[0] = a[5] = a[10] = a[15] = 1;\n a[1] = a[2] = a[3] = a[4] = a[6] = a[7] = a[8] = a[9] = a[11] = a[12] = a[13] = a[14] = 0;\n return a\n }\n\n function xe(a, d, b, f, g, n, k, e, w, x, v, r, y, l, u, h, c) {\n a[0] = d;\n a[1] = b;\n a[2] = f;\n a[3] = g;\n a[4] = n;\n a[5] = k;\n a[6] = e;\n a[7] = w;\n a[8] = x;\n a[9] = v;\n a[10] = r;\n a[11] = y;\n a[12] = l;\n a[13] = u;\n a[14] = h;\n a[15] = c\n }\n\n function Hc(a, d, b, f, g, n, k, e, w, x) {\n a[0] = d;\n a[1] = b;\n a[2] = f;\n a[3] = 0;\n a[4] = g;\n a[5] = n;\n a[6] = k;\n a[7] = 0;\n a[8] = e;\n a[9] = w;\n a[10] = x;\n a[11] = 0;\n a[12] = 0;\n a[13] = 0;\n a[14] = 0;\n a[15] = 1\n }\n\n function kd(a, d) {\n a[0] = d[0];\n a[1] = d[1];\n a[2] = d[2];\n a[3] = d[3];\n a[4] = d[4];\n a[5] = d[5];\n a[6] = d[6];\n a[7] = d[7];\n a[8] = d[8];\n a[9] = d[9];\n a[10] = d[10];\n a[11] = d[11];\n a[12] = d[12];\n a[13] = d[13];\n a[14] = d[14];\n a[15] = d[15]\n }\n\n function Ic(a, d) {\n var b = d[0], f = d[1], g = d[2], n = d[3], k = d[4], e = d[5], w = d[6], x = d[7], v = d[8], r = d[9], y = d[10], l = d[11], u = d[12], h = d[13], c = d[14], m = d[15], D = a[0], z = a[1], q = a[2], J = a[3];\n a[0] = D * b + z * k + q * v + J * u;\n a[1] = D * f + z * e + q * r + J * h;\n a[2] = D * g + z * w + q * y + J * c;\n a[3] = D * n + z * x + q * l + J * m;\n D = a[4];\n z = a[5];\n q = a[6];\n J = a[7];\n a[4] = D * b + z * k + q * v + J * u;\n a[5] = D * f + z * e + q * r + J * h;\n a[6] = D * g + z * w + q * y + J * c;\n a[7] = D * n + z * x + q * l + J * m;\n D = a[8];\n z = a[9];\n q = a[10];\n J = a[11];\n a[8] = D * b + z * k + q * v + J * u;\n a[9] = D * f + z * e + q * r + J * h;\n a[10] = D * g + z * w + q * y + J * c;\n a[11] = D * n + z * x + q * l + J * m;\n D = a[12];\n z = a[13];\n q = a[14];\n J = a[15];\n a[12] = D * b + z * k + q * v + J * u;\n a[13] = D * f + z * e + q * r + J * h;\n a[14] = D * g + z * w + q * y + J * c;\n a[15] = D * n + z * x + q * l + J * m\n }\n\n function ef(a, d) {\n var b = a[0], f = a[1], g = a[2], n = a[3], k = a[4], e = a[5], w = a[6], x = a[7], v = a[8], r = a[9], y = a[10], l = a[11], u = a[12], h = a[13], c = a[14], m = a[15], D = d[0], z = d[1], q = d[2], J = d[3], C = d[4], Q = d[5], A = d[6], H = d[7], qa = d[8], ea = d[9], Ca = d[10], S = d[11], p = d[12], B = d[13], t = d[14], G = d[15];\n a[0] = D * b + z * k + q * v + J * u;\n a[1] = D * f + z * e + q * r + J * h;\n a[2] = D * g + z * w + q * y + J * c;\n a[3] = D * n + z * x + q * l + J * m;\n a[4] = C * b + Q * k + A * v + H * u;\n a[5] = C * f + Q * e + A * r + H * h;\n a[6] = C * g + Q * w + A * y + H * c;\n a[7] = C * n + Q * x + A * l + H * m;\n a[8] = qa * b + ea * k + Ca * v + S * u;\n a[9] = qa * f + ea * e + Ca * r + S * h;\n a[10] = qa * g + ea * w + Ca * y + S * c;\n a[11] = qa * n + ea * x + Ca * l + S * m;\n a[12] = p * b + B * k + t * v + G * u;\n a[13] = p * f + B * e + t * r + G * h;\n a[14] = p * g + B * w + t * y + G * c;\n a[15] = p * n + B * x + t * l + G * m\n }\n\n function ye(a, d, b, f) {\n xe(a, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, d, b, f, 1)\n }\n\n function Yd(a, d, b, f) {\n var g, n, k;\n g = b * Y;\n b = Math.cos(g);\n n = Math.sin(g);\n g = -(d - 90) * Y;\n d = Math.cos(g);\n k = Math.sin(g);\n g = -f * Y;\n f = Math.cos(g);\n g = Math.sin(g);\n Hc(a, d * f - k * n * g, d * g + k * n * f, -k * b, -b * g, b * f, n, k * f + d * n * g, k * g - d * n * f, d * b)\n }\n\n function Zd(a, d) {\n var b = d[0], f = d[1], g = d[2], n = d[4], k = d[5], e = d[6], w = d[8], x = d[9], v = d[10], r = 1 / (b * k * v + f * e * w + n * x * g - w * k * g - n * f * v - x * e * b);\n Hc(a, (k * v - x * e) * r, (-f * v + x * g) * r, (f * e - k * g) * r, (-n * v + w * e) * r, (b * v - w * g) * r, (-b * e + n * g) * r, (n * x - w * k) * r, (-b * x + w * f) * r, (b * k - n * f) * r)\n }\n\n function nb(a, d) {\n var b = d.x, f = d.y, g = d.z;\n d.x = b * a[0] + f * a[4] + g * a[8];\n d.y = b * a[1] + f * a[5] + g * a[9];\n d.z = b * a[2] + f * a[6] + g * a[10]\n }\n\n function Fd(a, d) {\n var b = d[0], f = d[1], g = d[2];\n d[0] = b * a[0] + f * a[4] + g * a[8];\n d[1] = b * a[1] + f * a[5] + g * a[9];\n d[2] = b * a[2] + f * a[6] + g * a[10]\n }\n\n function Jc(a) {\n \"\" != a.loader.src && (a.loader = Ja(1), a.loader.kobject = a)\n }\n\n function hc(a) {\n return b.fractionalscaling ? Math.round(a * (b.pixelratio + 1E-7)) / b.pixelratio : Math.round(a)\n }\n\n function Ib(a, d, b, f) {\n a = (\"\" + a).split(b);\n f = f ? f : [0, 0, 0, 0];\n b = a.length;\n 4 == b ? (f[0] = a[0] * d + .5 | 0, f[1] = a[1] * d + .5 | 0, f[2] = a[2] * d + .5 | 0, f[3] = a[3] * d + .5 | 0) : 3 == b ? (f[0] = a[0] * d + .5 | 0, f[1] = f[3] = a[1] * d + .5 | 0, f[2] = a[2] * d + .5 | 0) : 2 == b ? (f[0] = f[2] = a[0] * d + .5 | 0, f[1] = f[3] = a[1] * d + .5 | 0) : f[0] = f[1] = f[2] = f[3] = a[0] * d + .5 | 0;\n return f\n }\n\n function Gd(a) {\n var d = a && a._poly;\n d && (d.setAttribute(\"fill\", !0 === a.polyline ? \"none\" : ca(a.fillcolor, a.fillalpha)), d.setAttribute(_[510], ca(a.bordercolor, a.borderalpha)), d.setAttribute(_[312], a.borderwidth * X))\n }\n\n function ze(a) {\n var d = p.r_rmatrix, b = p.r_zoom, f = p.r_zoff, g = .5 * Qa, n = .5 * ya + p.r_yoff, k = p._stereographic ? 10 - f : 1 - f * (1 - Math.min(p.fisheye * p.fisheye, 1)), e = a._poly;\n if (!e) {\n var w = V.svglayer;\n w || (w = document.createElementNS(_[77], \"svg\"), w.setAttribute(_[49], \"100%\"), w.setAttribute(_[28], \"100%\"), w.style.position = _[0], w.style.left = 0, w.style.top = 0, w.style.display = ja.stereo ? \"none\" : \"\", V.svglayer = w, V.hotspotlayer.appendChild(w));\n e = document.createElementNS(_[77], pa(a.polyline) ? _[121] : _[444]);\n w.appendChild(e);\n e.kobject = a;\n a._poly = e;\n Gd(a);\n e.style.opacity = Number(a._alpha) * (a.keep ? 1 : qc);\n a._assignEvents(e);\n setTimeout(function () {\n a.loading = !1;\n a.loaded = !0;\n da.callaction(a.onloaded, a)\n }, 7)\n }\n var w = a.point.getArray(), x = w.length, v = [];\n if (1 < x && a._visible && 0 == ja.stereo) {\n var r, y, l, u = new Hb, h = new Hb, c;\n y = w[x - 1];\n l = (180 - Number(y.ath)) * Y;\n y = Number(y.atv) * Y;\n u.x = 1E3 * Math.cos(y) * Math.cos(l);\n u.z = 1E3 * Math.cos(y) * Math.sin(l);\n u.y = 1E3 * Math.sin(y);\n nb(d, u);\n for (r = 0; r < x; r++)y = w[r], l = (180 - Number(y.ath)) * Y, y = Number(y.atv) * Y, h.x = 1E3 * Math.cos(y) * Math.cos(l), h.z = 1E3 * Math.cos(y) * Math.sin(l), h.y = 1E3 * Math.sin(y), nb(d, h), h.z >= k ? (u.z >= k || (c = (k - u.z) / (h.z - u.z), y = b / (k + f), l = (u.x + (h.x - u.x) * c) * y + g, y = (u.y + (h.y - u.y) * c) * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))), y = b / (h.z + f), l = h.x * y + g, y = h.y * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))) : u.z >= k && (c = (k - h.z) / (u.z - h.z), y = b / (k + f), l = (h.x + (u.x - h.x) * c) * y + g, y = (h.y + (u.y - h.y) * c) * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))), u.x = h.x, u.y = h.y, u.z = h.z;\n 0 == a.polyline && 2 < v.length && v.push(v[0]);\n e.style.pointerEvents = a._enabled ? _[264] : \"none\";\n e.style.cursor = a._handcursor ? _[18] : _[5];\n e.style.visibility = a._visible ? _[12] : _[6]\n }\n e.setAttribute(_[506], v.join(\" \"))\n }\n\n function Ae(a, d) {\n if (a && d) {\n var b = a.zorder, f = d.zorder;\n if (b < f)return -1;\n if (b > f)return 1\n }\n return 0\n }\n\n function ob(a, d) {\n if (Wc) {\n var E = Ua.getArray();\n E.sort(Ae);\n var f = E.length, g;\n for (g = 0; g < f; g++) {\n var n = E[g];\n n && (n.index = g)\n }\n Wc = !1\n }\n var E = Ua.getArray(), f = E.length, k;\n g = p.r_rmatrix;\n var n = Qa, e = ya, w = X, x = .5 * n, v = .5 * e, r = p.r_zoom, y = p.r_hlookat, l = p.r_vlookat, u = p.r_vlookatA, h = p.r_yoff, c = p.r_zoff, m = p._camroll;\n k = p._stereographic;\n var D;\n D = 1 * (1 + c / 1E3);\n var z = 50;\n 0 < c && (k ? z -= c : (z = 20 - c, -125 > z && (z = -125)));\n var q = 0, J = 0;\n k = 0;\n void 0 !== d && (k = d, f = k + 1);\n var C = ic, Q = b.realDesktop && 250 > r ? 1.5 : 0, A = ub;\n ub = !1;\n var H = Be, qa = Ce;\n H[1] = x;\n H[5] = $d;\n H[9] = sa(y);\n H[15] = C + \",\" + C + \",\" + C;\n for (var ea = ib, Ca = new Hb, S = (\"\" + ja.hotspotrenderer).toLowerCase(), S = b.webgl && _[30] == S && \"both\" != S || ja.stereo, Z = null; k < f; k++) {\n var B = E[k];\n if (B && (Z = B.sprite))if (Z = Z.style, S)\"none\" != Z.display && (Z.display = \"none\"); else {\n B._GL_onDestroy && (B._GL_onDestroy(), B.GL = null);\n if (A = !0, B.sprite)A = Number(B._alpha) * (B.keep ? 1 : qc), Z.opacity = A, B._poly && (B._poly.style.opacity = A);\n A = a || B.poschanged || B.forceupdate;\n if (null == B._url && 0 < B.point.count && A)ze(B), B.poschanged = !1; else if (B._visible && B.loaded && A) {\n B.poschanged = !1;\n A = Number(B._flying);\n q = (1 - A) * Number(B._ath);\n J = (1 - A) * Number(B._atv);\n 0 < A && (q += A * nc(y, B._ath), J += A * nc(l, B._atv));\n var t = !1, G = (180 - q) * Y, Ba = J * Y;\n Ca.x = 1E3 * Math.cos(Ba) * Math.cos(G);\n Ca.z = 1E3 * Math.cos(Ba) * Math.sin(G);\n Ca.y = 1E3 * Math.sin(Ba);\n nb(g, Ca);\n var P = !1, Fa = Ca.x, wa = Ca.y, G = Ca.z;\n if (G >= z - c)var ta = r / (G + c), Fa = Fa * ta, wa = wa * ta + h, P = 8E3 > Math.abs(Fa) && 8E3 > Math.abs(wa), Fa = Fa + x, wa = wa + v;\n if (B._distorted) {\n Z.pointerEvents = 50 <= G + c && B._enabled ? \"auto\" : \"none\";\n t = !0;\n G = (Ba = B._scale) ? B._scale : 1;\n B._hszscale = G;\n 1 == B.scaleflying && (G = G * (1 - A) + G / (r / (e / 2)) * D * A);\n B._scale = 1;\n B.updatepluginpos();\n B._scale = Ba;\n var W = B.pixelwidth, F = B.pixelheight, Da = Ba = 1;\n B._use_css_scale && (Ba = W / B.imagewidth, Da = F / B.imageheight);\n var L = .5 * -F, Va = String(B._edge), Fa = wa = 0, O = B._oxpix, $b = B._oypix, wa = wa + .5 * -W / Ba, Fa = Fa + L / Da;\n 0 <= Va.indexOf(\"left\") ? wa += +W / 2 / Ba : 0 <= Va.indexOf(_[3]) && (wa += -W / 2 / Ba);\n 0 <= Va.indexOf(\"top\") ? Fa += +F / 2 / Da : 0 <= Va.indexOf(_[2]) && (Fa += -F / 2 / Da);\n F = -500;\n W = B._deepscale;\n Va = B._depth;\n isNaN(Va) && (Va = 1E3);\n L = 1;\n 0 == (Va | 0) ? (F = 0, W = 1) : L = 1E3 / Va;\n 2 == Nb && (W *= 15);\n W /= 1 + A + Q;\n if (b.firefox || 6 < b.iosversion && .1 > B.scale)W = 10 / (1 + A);\n 0 < c && (W = 1);\n G = G * W * L;\n F *= W;\n O = O * W * L;\n $b = $b * W * L;\n if (0 < c || b.firefox)t = P;\n P = W * L * C / 2;\n P = _[274] + P * B.tx + \"px,\" + P * B.ty + \"px,\" + -P * B.tz + \"px) \";\n H[3] = sa(v + h * (1 - A));\n H[7] = sa(-(u * (1 - A) + l * A));\n H[11] = P + _[125] + sa(-q);\n H[13] = sa(J);\n H[17] = F;\n H[19] = sa(B._rotate + A * m);\n H[21] = O;\n H[23] = $b;\n B.inverserotation ? (H[25] = \"Y(\" + sa(B.ry), H[27] = \"X(\" + sa(B.rx), H[29] = \"Z(\" + sa(-B.rz)) : (H[25] = \"Z(\" + sa(B.rz), H[27] = \"X(\" + sa(-B.rx), H[29] = \"Y(\" + sa(-B.ry));\n H[31] = G * Ba;\n H[33] = G * Da;\n H[35] = wa;\n H[37] = Fa;\n Z[ea] = H.join(\"\")\n } else if (G >= z && (G = 1, P)) {\n if (B.zoom || B.distorted)G *= Number(2 * (1 - A) * ta + A * X) / X;\n B.updatepluginpos();\n W = B.pixelwidth;\n F = B.pixelheight;\n Da = Ba = 1;\n B._use_css_scale && (Ba = W / B.imagewidth, Da = F / B.imageheight);\n q = Fa;\n J = wa;\n 0 == B.accuracy && (q = Math.round(q), J = Math.round(J));\n Va = String(B._edge);\n Fa = wa = 0;\n O = B._oxpix * G;\n $b = B._oypix * G;\n 0 <= Va.indexOf(\"left\") ? wa += +W / 2 / Ba : 0 <= Va.indexOf(_[3]) && (wa += -W / 2 / Ba);\n 0 <= Va.indexOf(\"top\") ? Fa += +F / 2 / Da : 0 <= Va.indexOf(_[2]) && (Fa += -F / 2 / Da);\n P = 2 * G * (Math.max(W, F) * B._scale + Math.max(O, $b));\n if (0 < q + P || 0 < J + P || q - P < n || J - P < e)B._use_css_scale ? G *= w : (W *= w, F *= w, wa *= w, Fa *= w), t = -(W / Ba) / 2, P = -(F / Da) / 2, B._istextfield && 0 == B.accuracy && (q |= 0, J |= 0, t |= 0, P |= 0, O |= 0, $b |= 0, wa |= 0, Fa |= 0), qa[1] = sa(q), qa[3] = sa(J), qa[5] = sa(t), qa[7] = sa(P), qa[9] = sa(B._rotate - m * (1 - A)), qa[11] = O, qa[13] = $b, qa[15] = G * Ba, qa[17] = G * Da, qa[19] = sa(wa), qa[21] = sa(Fa), A = qa.join(\"\"), A = Kc && 2 > Nb && .5 < Number(B.zorder2) ? _[325] + (999999999E3 + B._zdeep) + \"px) \" + A : _[263] + A, Z[ib] = A, t = !0\n }\n 0 == B.forceupdate && (A = t ? \"\" : \"none\", A != Z.display && (Z.display = A));\n B.forceupdate = !1\n }\n }\n }\n }\n\n function De(a, d, E, f) {\n function g() {\n var c = Ja(), C = c.style;\n C.marginTop = C.marginBottom = l[17] * p + \"px\";\n C.height = \"1px\";\n C.backgroundColor = ca(l[18]);\n \"none\" != l[19] && (C.borderBottom = _[350] + ca(l[19]));\n D.appendChild(c)\n }\n\n function n(c) {\n var C = c.changedTouches;\n return (C && 0 < C.length ? C[0] : c).pageY\n }\n\n function k(C, a, d) {\n var Q = Ja(), A = Q.style;\n A.padding = l[20] * p + \"px\";\n A.border = l[21] + _[23] + ca(l[22]);\n A.borderRadius = l[23] * p + \"px\";\n A.marginTop = l[24] * p + \"px\";\n A.marginBottom = l[24] * p + \"px\";\n b.androidstock && (A[_[76]] = _[36]);\n Pa.touch && R(Q, b.browser.events.touchstart, function (C) {\n function A(C) {\n C = n(C) - H;\n if (h > ya) {\n var a = v + C | 0;\n a < ya - h - 10 ? a = ya - h - 10 : 10 < a && (a = 10);\n c.style.top = a + \"px\"\n }\n 15 < Math.abs(C) && (Q.onmouseout(), r = !0)\n }\n\n function t() {\n ba(L, qa, A, !0);\n ba(L, g, t, !0);\n if (0 == r)Q.onclick()\n }\n\n Aa(C);\n C.stopPropagation();\n if (d && a) {\n Q.onmouseover();\n var H = n(C), v = parseInt(c.style.top) | 0, r = !1, qa = b.browser.events.touchmove, g = b.browser.events.touchend;\n R(L, qa, A, !0);\n R(L, g, t, !0)\n }\n }, !0);\n d && a ? (A.cursor = _[18], Q.onmousedown = function (c) {\n c.stopPropagation()\n }, Q.onmouseover = function () {\n A = this.style;\n A.background = ca(l[25]);\n A.border = l[21] + _[23] + ca(l[26]);\n A.color = ca(l[27])\n }, Q.onmouseout = function () {\n A = this.style;\n A.background = \"none\";\n A.border = l[21] + _[23] + ca(l[22]);\n A.color = ca(l[4])\n }, Q.oncontextmenu = function (c) {\n Aa(c);\n c.stopPropagation();\n Q.onclick()\n }, Q.onclick = function (C) {\n f ? (A = c.style, A.opacity = 1, A.transition = _[98], A.opacity = 0, setTimeout(E, 300)) : E();\n da.callaction(d)\n }) : (0 == a && (A.color = ca(l[5])), A.cursor = _[5]);\n var H = Ja();\n H.style.marginLeft = l[28] * p + \"px\";\n H.style.marginRight = l[29] * p + \"px\";\n H.innerHTML = C;\n Q.appendChild(H);\n D.appendChild(Q);\n return H\n }\n\n function e() {\n function c() {\n return .4 > Math.random() ? \" \" : _[139]\n }\n\n var C = k(\"About\" + c() + \"the\" + c() + _[46] + c() + _[414] + c() + _[385], !0, function () {\n da.openurl(_[220])\n });\n try {\n (new MutationObserver(function (c) {\n c = L.getComputedStyle(C);\n 9 > Math.min(parseInt(c.width) | 0, parseInt(c.height) | 0) && (m = {}, Ea(_[97]))\n })).observe(C, {attributes: !1, childList: !0, characterData: !0, subtree: !0})\n } catch (a) {\n }\n }\n\n function w() {\n k(V.fullscreen ? y.exitfs : y.enterfs, !0, function () {\n m.fullscreen = !m.fullscreen\n })\n }\n\n function x() {\n var c = b.android, C = b.infoString, C = C.split(_[431]).join(\"\");\n k((qa ? \"\" : _[128] + m.version + _[240] + m.build + _[261]) + (c ? _[481] : \"\") + C + Oa.infoString + (c ? _[443] : \"\"), !0, null)\n }\n\n function v() {\n Na && Na[2] && k(Na[2], !0, function () {\n da.openurl(Na[3])\n })\n }\n\n function r() {\n var C = c.getBoundingClientRect(), b = C.width, C = C.height, Q = d;\n if (0 < b && 0 < C) {\n h = C;\n f && (a -= b >> 1, a + b > Qa && (a = Qa - b - 10), 10 > a && (a = 10));\n for (; a + b > Qa;)a -= b / 2;\n 0 > a && (a = 0);\n d + C > ya && (d = f ? ya - C - 10 : d - C);\n 0 > d && (f ? d = ya - C >> 1 : Q > ya / 2 ? (d = Q - C, 0 > d && (d = 4)) : (d = Q, d + C > ya && (d = ya - 4 - C)));\n u = c.style;\n u.left = (a | 0) + \"px\";\n u.top = (d | 0) + \"px\";\n f && (u.transition = _[98], u.opacity = 1)\n } else 10 > ++B && setTimeout(r, 32)\n }\n\n var y = m.contextmenu;\n if (f && 0 == y.touch)return null;\n var l = null;\n y.customstyle && (_[109] == b.browser.domain || 0 == b.realDesktop || b.realDesktop && 0 != (Ya & 16)) && (l = F(y.customstyle).split(\"|\"), 30 != l.length && (l = null));\n null == l && (l = (b.mac ? \"default|14|default|0xFFFFFF|0x000000|0xBBBBBB|0|0|5|2|2|8|0x66000000|0|0|1|4|5|0xEEEEEE|none|1|0|0|0|3|0xEEEEEE|0|0|20|12\" : b.desktop ? \"default|default|150%|0xFFFFFF|0x000000|0xBBBBBB|1|0xBBBBBB|0|2|2|8|0x66000000|0|0|2|2|5|0xE0E0E0|none|4|0|0|0|3|0xEEEEEE|0|0|18|12\" : \"Helvetica|16|default|0x55000000|0xFFFFFF|0x555555|1|0xFFFFFF|8|0|0|8|0x44000000|0|0|4|4|6|0x555555|none|4|0|0|0|3|0xEEEEEE|0|0|12|12\").split(\"|\"));\n var u = null, h = 0, c = Ja();\n c.onselectstart = _[266];\n b.desktop && b.chrome && (c.style.opacity = .999);\n if (b.linux || b.android)l[1] = 12;\n u = c.style;\n u.position = _[0];\n u.zIndex = 99999999999;\n var p = 1;\n b.androidstock ? p = b.pixelratio : b.chrome && 40 > b.chromeversion && (u[ib] = _[20]);\n _[5] != l[0] ? u.fontFamily = l[0] : b.ios ? (u.fontFamily = _[38], u.fontWeight = _[484], _[5] == l[1] && (l[1] = 14)) : u.font = \"menu\";\n _[5] != l[1] && (u.fontSize = l[1] * p * (b.android ? 1.2 : 1) + \"px\");\n _[5] != l[2] && (u.lineHeight = l[2]);\n u.background = ca(l[3]);\n u.color = ca(l[4]);\n u.border = l[6] + _[23] + ca(l[7]);\n u.borderRadius = l[8] * p + \"px\";\n u.minWidth = \"150px\";\n u.textAlign = \"left\";\n u[pc] = l[9] + \"px \" + l[10] + \"px \" + l[11] + \"px \" + ca(l[12]);\n var D = Ja(), u = D.style;\n u.border = l[13] + _[23] + ca(l[14]);\n u.paddingTop = l[15] * p + \"px\";\n u.paddingBottom = l[16] * p + \"px\";\n Pa.touch && R(D, b.browser.events.touchstart, function (c) {\n Aa(c);\n c.stopPropagation()\n }, !1);\n c.appendChild(D);\n var z = y.item.getArray(), q, J, C = 0, Q, A = z.length, H, qa = 0 != (Ya & 16), ea = qa, Ca = qa, S = !1, Z = !1;\n for (H = 0; H < A; H++)if (q = z[H])if (J = q.caption)J = Ed(unescape(J)), q.separator && 0 < C && g(), Q = F(J), _[46] == Q ? 0 == ea && (ea = !0, e(), C++) : Na && _[430] == Q ? 0 == Ca && (Ca = !0, v(), C++) : _[110] == Q ? (S = !0, b.fullscreensupport && (w(), C++)) : _[334] == Q ? (Z = !0, x(), C++) : (Q = q.visible && (!q.showif || da.calc(null, q.showif))) ? (k(J, q.enabled, q.onclick), C++) : 0 == Q && q.separator && 0 < C && D.removeChild(D.lastChild);\n Na && 0 == Ca && (0 < C && (g(), C = 0), v());\n 0 == ea && (0 < C && g(), e(), C++);\n 0 == S && 1 == y.fullscreen && b.fullscreensupport && (w(), C++);\n 0 == Z && 1 == y.versioninfo && (0 < C && g(), x(), C++);\n if (0 == C)return null;\n u = c.style;\n u.left = _[122];\n u.top = \"10px\";\n var B = 0;\n f && (u.opacity = 0);\n setTimeout(r, 16);\n return c\n }\n\n function qf() {\n function a(a, d, b) {\n a.__defineGetter__(d, b)\n }\n\n m = new Fb;\n m.set = I;\n m.get = U;\n m.call = Zb;\n m.trace = la;\n m[\"true\"] = !0;\n m[_[31]] = !1;\n m.strict = !1;\n m.version = _[432];\n m.build = _[348];\n m.buildversion = m.version;\n m.debugmode = !1;\n m.tweentypes = ac;\n m.basedir = _[349];\n m.showtext = function () {\n };\n m.bgcolor = 0;\n m[rc[0]] = m[rc[1]] = !0;\n m.haveexternalinterface = !0;\n m.havenetworkaccess = !0;\n m.device = b;\n m.browser = b.browser;\n m._have_top_access = b.topAccess;\n m._isrealdesktop = b.realDesktop;\n m.iosversion = b.iosversion;\n m.isphone = b.iphone;\n m.ispad = b.ipad;\n m.isandroid = b.android;\n m.ishtml5 = !0;\n m.isflash = !1;\n m.ismobile = b.mobile;\n m.istablet = b.tablet;\n m.isdesktop = b.desktop;\n m.istouchdevice = b.touchdevice;\n m.isgesturedevice = b.gesturedevice;\n a(m, _[351], function () {\n return bc / X\n });\n a(m, _[326], function () {\n return vb / X\n });\n ha(m, _[352], function () {\n return X\n }, function (a) {\n a = Number(a);\n isNaN(a) && (a = 1);\n 1E-4 < Math.abs(a - X) && (X = a, V.onResize(null, !0))\n });\n pb = m.area = new rf;\n m.wheeldelta = 0;\n m.wheeldelta_raw = Number.NaN;\n m.wheeldelta_touchscale = 0;\n m.keycode = 0;\n m.idletime = .5;\n m.__defineGetter__(_[397], Ta);\n m.__defineGetter__(_[500], Math.random);\n ha(m, _[110], function () {\n return V.fullscreen\n }, function (a) {\n V.setFullscreen(pa(a))\n });\n ha(m, _[389], function () {\n return ra.swfpath\n }, function (a) {\n ra.swfpath = a\n });\n m.hlookat_moveforce = 0;\n m.vlookat_moveforce = 0;\n m.fov_moveforce = 0;\n m.multireslevel = 0;\n m.lockmultireslevel = \"-1\";\n m.downloadlockedlevel = !1;\n O = m.mouse = {};\n O.down = !1;\n O.up = !1;\n O.moved = !1;\n O.downx = 0;\n O.downy = 0;\n O.x = 0;\n O.y = 0;\n a(O, _[495], function () {\n return O.x + pb.pixelx\n });\n a(O, _[493], function () {\n return O.y + pb.pixely\n });\n a(O, \"dd\", function () {\n var a = O.x - O.downx, d = O.y - O.downy;\n return Math.sqrt(a * a + d * d)\n });\n p = m.view = new sf;\n m.screentosphere = p.screentosphere;\n m.spheretoscreen = p.spheretoscreen;\n m.loadFile = ra.loadfile;\n m.decodeLicense = ra.decodeLicense;\n m.haveLicense = gc(function (a) {\n var d = !1, b = Ya;\n switch (a.toLowerCase().charCodeAt(0)) {\n case 107:\n d = 0 != (b & 1);\n break;\n case 109:\n d = 0 != (b & 128);\n break;\n case 98:\n d = 0 != (b & 16)\n }\n return d\n });\n m.parsepath = m.parsePath = ra.parsePath;\n m.contextmenu = new tf;\n ia = m.control = new uf;\n ae = m.cursors = new vf;\n N = m.image = {};\n xa = m.plugin = new bb(Ob);\n m.layer = xa;\n Ua = m.hotspot = new bb(wf);\n Yb = m.events = new bb(null, !0);\n Yb.dispatch = Ka;\n ja = m.display = {\n currentfps: 60,\n r_ft: 16,\n FRM: 0,\n _framebufferscale: 1,\n mipmapping: \"auto\",\n loadwhilemoving: b.realDesktop ? \"true\" : \"auto\",\n _stereo: !1,\n stereooverlap: 0,\n hotspotrenderer: \"auto\",\n hardwarelimit: b.realDesktop && b.safari && \"6\" > b.safariversion ? 2E3 : b.realDesktop && !b.webgl ? 2560 : b.iphone && b.retina && !b.iphone5 ? 800 : b.iphone && !b.retina ? 600 : b.ipod && b.retina ? 640 : b.mobile || b.tablet ? 1024 : 4096\n };\n ha(ja, _[491], function () {\n return ja._stereo\n }, function (a) {\n a = pa(a);\n ja._stereo != a && (ja._stereo = a, V.svglayer && (V.svglayer.style.display = a ? \"none\" : \"\"))\n });\n ha(ja, _[383], function () {\n var a = ja.FRM | 0;\n return 0 == a ? \"auto\" : \"\" + a\n }, function (a) {\n a |= 0;\n 0 > a && (a = 0);\n ja.FRM = a\n });\n ha(ja, _[231], function () {\n return ja._framebufferscale\n }, function (a) {\n a = Number(a);\n if (isNaN(a) || 0 == a)a = 1;\n ja._framebufferscale = a;\n pb.haschanged = !0;\n V.resizeCheck(!0)\n });\n m.memory = {maxmem: b.realDesktop ? Math.min(Math.max(150, 48 * screen.availWidth * screen.availHeight >> 20), 400) : b.ios && 7.1 > b.iosversion || b.iphone && !b.iphone5 ? 40 : 50};\n m.network = {retrycount: 2};\n sc = m.progress = {};\n sc.progress = 0;\n Ra = new Ob;\n Ra.name = \"STAGE\";\n Za = new Ob;\n Za.name = _[480];\n xa.alpha = 1;\n Ua.alpha = 1;\n Ua.visible = !0;\n ha(xa, _[12], function () {\n return \"none\" != V.pluginlayer.style.display\n }, function (a) {\n V.pluginlayer.style.display = pa(a) ? \"\" : \"none\"\n });\n m.xml = {};\n m.xml.url = \"\";\n m.xml.content = null;\n m.xml.scene = null;\n var d = m.security = {};\n ha(d, \"cors\", function () {\n return Tc\n }, function (a) {\n Tc = a\n });\n za = m.autorotate = {};\n za.enabled = !1;\n za.waittime = 1.5;\n za.accel = 1;\n za.speed = 10;\n za.horizon = 0;\n za.tofov = null;\n za.currentmovingspeed = 0;\n m.math = function () {\n function a(d) {\n return function (a, b) {\n void 0 === b ? I(a, Math[d](n(a))) : I(a, Math[d](n(b)))\n }\n }\n\n var d = {}, b = _[157].split(\" \"), n = function (a) {\n var d = U(a);\n return Number(null !== d ? d : a)\n }, k;\n for (k in b) {\n var e = b[k];\n d[e] = a(e)\n }\n d.pi = Ga;\n d.atan2 = function (a, d, b) {\n I(a, Math.atan2(n(d), n(b)))\n };\n d.min = function () {\n var a = arguments, d = a.length, b = 3 > d ? 0 : 1, r = n(a[b]);\n for (b++; b < d; b++)r = Math.min(r, n(a[b]));\n I(a[0], r)\n };\n d.max = function () {\n var a = arguments, d = a.length, b = 3 > d ? 0 : 1, r = n(a[b]);\n for (b++; b < d; b++)r = Math.max(r, n(a[b]));\n I(a[0], r)\n };\n d.pow = da.pow;\n return d\n }();\n m.action = new bb;\n m.scene = new bb;\n m.data = new bb;\n m.addlayer = m.addplugin = function (a) {\n if (!Uc(a, _[204] + a + \")\"))return null;\n a = xa.createItem(a);\n if (!a)return null;\n null == a.sprite && (a._dyn = !0, a.create(), null == a._parent && V.pluginlayer.appendChild(a.sprite));\n return a\n };\n m.removelayer = m.removeplugin = function (a, d) {\n var b = xa.getItem(a);\n if (b) {\n if (pa(d)) {\n var n = b._childs;\n if (n)for (; 0 < n.length;)m.removeplugin(n[0].name, !0)\n }\n b.visible = !1;\n b.parent = null;\n b.sprite && V.pluginlayer.removeChild(b.sprite);\n b.destroy();\n xa.removeItem(a)\n }\n };\n m.addhotspot = function (a) {\n if (!Uc(a, _[321] + a + \")\"))return null;\n a = Ua.createItem(a);\n if (!a)return null;\n null == a.sprite && (a._dyn = !0, a.create(), V.hotspotlayer.appendChild(a.sprite));\n ld = !0;\n return a\n };\n m.removehotspot = function (a) {\n var d = Ua.getItem(a);\n if (d) {\n d.visible = !1;\n d.parent = null;\n if (d.sprite) {\n try {\n V.hotspotlayer.removeChild(d.sprite)\n } catch (b) {\n }\n if (d._poly) {\n try {\n V.svglayer.removeChild(d._poly)\n } catch (n) {\n }\n d._poly.kobject = null;\n d._poly = null\n }\n }\n d.destroy();\n Ua.removeItem(a)\n }\n }\n }\n\n function xf() {\n var a = p.haschanged, d = !1;\n jc++;\n ja.frame = jc;\n Oa.fps();\n var m = V.resizeCheck(), f = da.processAnimations(), a = a | p.haschanged;\n if (b.webgl || !b.ios || b.ios && 5 <= b.iosversion)f = !1;\n f |= ld;\n ld = !1;\n f && (p._hlookat += ((jc & 1) - .5) / (1 + p.r_zoom), a = !0);\n a |= Xa.handleloading();\n 0 == da.blocked && (a |= Pa.handleFrictions(), Xa.checkautorotate(p.haschanged) && (a = d = !0));\n p.continuousupdates && (a = d = !0);\n a || m ? (Oa.startFrame(), Xa.updateview(d, !0), Oa.finishFrame()) : (p.haschanged && p.updateView(), ob(!1));\n Xa.updateplugins(m);\n b.desktop && Xa.checkHovering()\n }\n\n var Jb = this;\n try {\n !Object.prototype.__defineGetter__ && Object.defineProperty({}, \"x\", {\n get: function () {\n return !0\n }\n }).x && (Object.defineProperty(Object.prototype, _[233], {\n enumerable: !1,\n configurable: !0,\n value: function (a, d) {\n Object.defineProperty(this, a, {get: d, enumerable: !0, configurable: !0})\n }\n }), Object.defineProperty(Object.prototype, _[234], {\n enumerable: !1,\n configurable: !0,\n value: function (a, d) {\n Object.defineProperty(this, a, {set: d, enumerable: !0, configurable: !0})\n }\n }))\n } catch (Bf) {\n }\n\n var jb = navigator, aa = document, L = window, Ga = Math.PI, Y = Ga / 180, tc = Number.NaN, md = 0, Ta = L.performance && L.performance.now ? function () {\n return L.performance.now() - md\n } : function () {\n return (new Date).getTime() - md\n }, md = Ta(), Xc = String.fromCharCode, m = null, bc = 0, vb = 0, Qa = 0, ya = 0, X = 1, Yc = 1, uc = 0, pb = null, za = null, ia = null, ae = null, ja = null, Yb = null, sc = null, Ua = null, N = null, O = null, xa = null, p = null, Ra = null, Za = null, jc = 0, nd = 60, Ya = 14, od = null, rc = [_[362], _[489]], Na = null, Tc = \"\", vc = null, ld = !1, kc = 0, Kc = !0, b = {\n runDetection: function (a) {\n function d() {\n var a = screen.width, c = screen.height, C = b.topAccess ? top : L, d = C.innerWidth, Q = C.innerHeight, C = C.orientation | 0, A = a / (c + 1), h = d / (Q + 1);\n if (1 < A && 1 > h || 1 > A && 1 < h)A = a, a = c, c = A;\n v.width = a;\n v.height = c;\n v.orientation = C;\n b.window = {width: d, height: Q};\n a /= d;\n return b.pagescale = a\n }\n\n function m(a, c) {\n for (var C = [\"ms\", \"Moz\", _[494], \"O\"], d = 0; 5 > d; d++) {\n var b = 0 < d ? C[d - 1] + a.slice(0, 1).toUpperCase() + a.slice(1) : a;\n if (void 0 !== t.style[b])return b\n }\n return null\n }\n\n var f = \"multires flash html5 html mobile tablet desktop ie edge webkit ios iosversion iphone ipod ipad retina hidpi android androidstock blackberry touchdevice gesturedevice fullscreensupport windows mac linux air standalone silk\".split(\" \"), g, n, k, e, w = aa.documentElement, x = a.mobilescale;\n isNaN(x) && (x = .5);\n n = f.length;\n for (g = 0; g < n; g++)k = f[g], b[k] = !1;\n b.html5 = b.html = !0;\n b.iosversion = 0;\n b.css3d = !1;\n b.webgl = !1;\n b.topAccess = !1;\n b.simulator = !1;\n b.multiressupport = !1;\n b.panovideosupport = !1;\n var v = b.screen = {};\n try {\n top && top.document && (b.topAccess = !0)\n } catch (r) {\n }\n var y = jb.platform, f = F(y), l = jb.userAgent, u = F(l), h = n = \"\";\n 0 <= f.indexOf(\"win\") ? b.windows = !0 : 0 <= f.indexOf(\"mac\") ? b.mac = !0 : 0 <= f.indexOf(\"linux\") && (b.linux = !0);\n var c = L.devicePixelRatio, p = 2 <= c;\n g = 1;\n var D = 0 <= f.indexOf(\"ipod\"), z = 0 <= f.indexOf(_[41]), q = 0 <= f.indexOf(\"ipad\"), J = z || D || q;\n e = u.indexOf(\"silk/\");\n var C = 0 <= u.indexOf(_[469]) || 0 <= u.indexOf(_[145]), Q = 0 > e && !C && 0 <= u.indexOf(_[464]), A = k = !1, H = !1, qa = l.indexOf(_[147]), ea = L.chrome && !C, Ca = l.indexOf(_[460]), S = !1, Z = (J || Q || e) && (b.windows || b.mac);\n C && (qa = Ca = -1);\n var f = !1, B = 0;\n Yc = d();\n if (J) {\n if (b.ios = !0, n = y, e = l.indexOf(\"OS \"), 0 < e && (e += 3, B = l.slice(e, l.indexOf(\" \", e)).split(\"_\").join(\".\"), n += _[457] + B, b.iosversion = parseFloat(B), \"6.0\" <= B && (z && !p || D && p) && (b._iOS6_canvas_bug = !0)), k = z || D, A = q, B = Math.max(screen.width, screen.height), b.iphone = z || D, b.iphone5 = z && 500 < B, b.ip6p = z && 735 < B, b.ipod = D, b.ipad = q, b.retina = p, z || D)g *= x\n } else if (Q)if (e = l.indexOf(_[454]), B = parseFloat(l.slice(e + 8)), b.android = !0, b.linux = !1, b.androidversion = B, n = l.slice(e, l.indexOf(\";\", e)), k = 0 < u.indexOf(_[44]), ea && 0 < u.indexOf(_[275]) && (k = 480 > Math.min(screen.width, screen.height)), A = !k, B = l.indexOf(\")\"), 5 < B && (e = l.slice(0, B).lastIndexOf(\";\"), 5 < e && (p = l.indexOf(_[511], e), 0 < p && (B = p), n += \" (\" + l.slice(e + 2, B) + \")\")), 0 < Ca && isNaN(c) && (c = Yc), A && 1 < c) {\n if (b.hidpi = !0, g = c, 0 <= qa || 0 < Ca)b.hidpi = !1, g = 1\n } else k && (b.hidpi = 1 < c, g = c * x, .5 > g && (g = .5), 0 <= qa || 0 < Ca || Z) && (b.hidpi = !1, g = x); else {\n if (0 <= u.indexOf(_[345]) || 0 <= u.indexOf(_[344]) || 0 <= u.indexOf(\"bb10\"))S = !0, b.blackberry = !0, n = _[336], f = !0;\n 0 <= e ? (S = !0, b.silk = !0, n = _[297] + parseFloat(u.slice(e + 5)).toFixed(2), H = !1, k = 0 <= u.indexOf(_[44]), A = !k, f = !0) : 0 <= u.indexOf(\"ipad\") || 0 <= u.indexOf(_[41]) ? H = S = !0 : 0 <= u.indexOf(_[138]) ? (A = !0, n += _[513]) : 0 <= u.indexOf(_[44]) ? (k = !0, n += _[518], g = x) : H = !0\n }\n D = jb.vendor && 0 <= jb.vendor.indexOf(\"Apple\");\n z = L.opera;\n p = !1;\n H && (n = _[285]);\n e = l.indexOf(_[451]);\n 0 < e && (D || z || Q) && (e += 8, B = l.slice(e, l.indexOf(\" \", e)), D ? (b.safari = !0, b.safariversion = B, h = _[520]) : (Q && (h = _[238], f = !0), z && (b.opera = !0, b.operaversion = B, h = \"Opera\")), h += \" \" + B);\n J && (e = l.indexOf(_[521]), 0 < e && (b.safari = !0, e += 6, B = parseFloat(l.slice(e, l.indexOf(\" \", e))), b.crios = B, h = _[449] + B.toFixed(1)));\n e = qa;\n if (0 <= e || ea)B = parseFloat(l.slice(e + 7)), b.chrome = !0, b.chromeversion = B, h = _[147] + (isNaN(B) ? \"\" : \" \" + B.toFixed(1)), e = u.indexOf(\"opr/\"), 0 < e && (h = _[517] + parseFloat(l.slice(e + 4)).toFixed(1) + _[378]), Q && 28 > B && (f = !0), Q && 1 < c && 20 > B && !Z && (b.hidpi = !0, g = c, k && (g *= x)); else if (e = Ca, 0 > e && (e = l.indexOf(_[514])), 0 <= e && (B = parseFloat(l.slice(1 + l.indexOf(\"/\", e))), b.firefox = !0, b.firefoxversion = B, h = _[434] + (isNaN(B) ? \"\" : B.toFixed(1)), Q && 35 > B && (f = !0)), e = l.indexOf(\"MSIE \"), p = 0 <= e || C)H = b.ie = !0, A = !1, h = _[224], 0 < u.indexOf(_[436]) || 0 < u.indexOf(_[289]) ? (k = !0, H = !1, h = _[445] + h, g = x) : 0 < u.indexOf(\"arm;\") && 1 < jb.msMaxTouchPoints && (A = !0, H = !1, h = _[447] + h, f = !0, g = 1), 0 <= e ? (B = l.slice(e + 4, l.indexOf(\";\", e)), b.ieversion = parseFloat(B), h += B) : (e = l.indexOf(\"rv:\"), 0 <= e ? (B = parseFloat(l.slice(e + 3)), !isNaN(B) && 10 <= B && 100 > B && (b.ieversion = B, h += \" \" + B.toFixed(1))) : (e = u.indexOf(_[145]), 0 <= e && (h = _[260], b.edge = !0, Kc = !1, B = parseFloat(l.slice(e + 6)), isNaN(B) || (b.ieversion = B, h += \" \" + (B + 8).toFixed(5))))), n = h, h = \"\";\n b.android && (b.androidstock = !(b.chrome || b.firefox || b.opera));\n 0 == b.ie && 0 < (e = u.indexOf(_[448])) && (B = parseFloat(u.slice(e + 7)), !isNaN(B) && 0 < B && (b.webkit = !0, b.webkitversion = B));\n b.pixelratio = isNaN(c) ? 1 : c;\n b.fractionalscaling = 0 != b.pixelratio % 1;\n var c = {}, t = Ja();\n c.find = m;\n c.prefix = p ? \"ms\" : b.firefox ? \"moz\" : b.safari || b.chrome || b.androidstock ? _[70] : \"\";\n c.perspective = m(_[335]);\n c.transform = m(_[387]);\n c.backgroundsize = m(_[256]);\n c.boxshadow = m(_[388]);\n c.boxshadow_style = _[252] == c.boxshadow ? _[212] : _[292] == c.boxshadow ? _[249] : _[342];\n Q && \"4.0\" > b.androidversion && (c.perspective = null);\n c.perspective && (b.css3d = !0, _[217] == c.perspective && L.matchMedia && (u = L.matchMedia(_[195]))) && (b.css3d = 1 == u.matches);\n t = null;\n b.webgl = function () {\n var a = null;\n try {\n for (var c = Ja(2), C = 0; 4 > C && !(a = c.getContext([_[30], _[83], _[116], _[112]][C])); C++);\n } catch (d) {\n }\n return null != a\n }();\n u = {};\n u.useragent = l;\n u.platform = y;\n u.domain = null;\n u.location = L.location.href;\n y = u.events = {};\n u.css = c;\n if (J || Q || void 0 !== w.ontouchstart || S)b.touchdevice = !0, b.gesturedevice = !0;\n J = 0;\n (jb.msPointerEnabled || jb.pointerEnabled) && b.ie && (Q = jb.msMaxTouchPoints || jb.maxTouchPoints, jb.msPointerEnabled && (J = 2), jb.pointerEnabled && (J = 1), b.touchdevice = 0 < Q, b.gesturedevice = 1 < Q);\n y.touchstart = [_[343], _[331], _[290]][J];\n y.touchmove = [_[115], _[330], _[283]][J];\n y.touchend = [_[118], _[390], _[328]][J];\n y.touchcancel = [_[327], _[280], _[236]][J];\n y.gesturestart = [_[300], _[96], _[96]][J];\n y.gesturechange = [_[276], _[91], _[91]][J];\n y.gestureend = [_[355], _[99], _[99]][J];\n y.pointerover = [_[8], _[8], _[34]][J];\n y.pointerout = [_[9], _[9], _[35]][J];\n b.pointerEvents = b.opera || b.ie && 11 > b.ieversion ? !1 : !0;\n h && (n += \" - \" + h);\n b.realDesktop = H;\n h = a.vars ? F(a.vars.simulatedevice) : null;\n _[392] == h && (0 <= l.indexOf(_[146]) || 0 <= l.indexOf(\"iPod\") ? h = _[41] : 0 <= l.indexOf(\"iPad\") && (h = \"ipad\"));\n b.touchdeviceNS = b.touchdevice;\n l = _[41] == h ? 1 : \"ipad\" == h ? 2 : 0;\n 0 < l && (b.simulator = !0, b.crios = 0, n += \" - \" + (1 == l ? _[146] : \"iPad\") + _[356], g = l * x, k = 1 == l, A = 2 == l, H = !1, b.ios = !0, b.iphone = k, b.ipad = A, b.touchdevice = !0, b.gesturedevice = !0);\n b.browser = u;\n b.infoString = n;\n a = F(a.fakedevice);\n _[44] == a ? (k = !0, A = H = !1) : _[138] == a ? (A = !0, k = H = !1) : _[465] == a && (H = !0, k = A = !1);\n b.mobile = k;\n b.tablet = A;\n b.desktop = H;\n b.normal = A || H;\n b.touch = b.gesturedevice;\n b.mouse = H;\n b.getViewportScale = d;\n X = g;\n 0 == b.simulator && 0 != aa.fullscreenEnabled && 0 != aa.mozFullScreenEnabled && 0 != aa.webkitFullScreenEnabled && 0 != aa.webkitFullscreenEnabled && 0 != aa.msFullscreenEnabled && (a = [_[223], _[201], _[194], _[191], _[209]], x = -1, g = null, n = _[228], w[a[0]] ? (g = \"\", x = 0) : w[a[1]] ? (g = \"moz\", x = 1) : w[a[2]] ? (g = _[70], x = 2) : w[a[3]] ? (g = _[70], x = 3) : w[a[4]] && (g = \"MS\", n = _[229], x = 4), 0 <= x && 0 == f && (b.fullscreensupport = !0, y.fullscreenchange = g + n, y.requestfullscreen = a[x]));\n b.buildList();\n delete b.runDetection\n }, buildList: function () {\n var a, d = \"|all\";\n for (a in b)a == F(a) && b[a] && (d += \"|\" + a);\n b.haveList = d + \"|\"\n }, checkSupport: function (a) {\n a = F(a).split(\"no-\").join(\"!\").split(\".or.\").join(\"|\").split(\".and.\").join(\"+\").split(\"|\");\n var d, m, f = a.length;\n for (d = 0; d < f; d++) {\n var g = a[d].split(\"+\"), n = !1;\n for (m = 0; m < g.length; m++) {\n var n = g[m], k = !1;\n 33 == n.charCodeAt(0) && (n = n.slice(1), k = !0);\n if (0 == n.indexOf(\"ios\") && b.ios)if (3 == n.length || b.iosversion >= parseFloat(n.slice(3)))if (k) {\n n = !1;\n break\n } else n = !0; else if (k)n = !0; else {\n n = !1;\n break\n } else if (0 <= b.haveList.indexOf(\"|\" + n + \"|\"))if (k) {\n n = !1;\n break\n } else n = !0; else if (k)n = !0; else {\n n = !1;\n break\n }\n }\n if (n)return !0\n }\n return !1\n }\n }, cb = 0, Kb = 0, Hd = 0, Nb = 0, Lc = 0, be = 0, jd = !1, ib = null, Id = null, pd = null, Zc = null, pc = null, ce = !1, Lb = 0, Fb = function () {\n var a = this;\n a._type = \"base\";\n a.registerattribute = function (d, b, f, g) {\n d = F(d);\n f && g ? (a.hasOwnProperty(d) && (b = ga(a[d], typeof b)), a.__defineGetter__(d, g), a.__defineSetter__(d, f), f(b)) : a.hasOwnProperty(d) ? a[d] = ga(a[d], typeof b) : a[d] = b\n };\n a.createobject = function (d) {\n d = F(d);\n try {\n return a.hasOwnProperty(d) ? a[d] : a[d] = new Fb\n } catch (b) {\n }\n return null\n };\n a.removeobject = a.removeattribute = function (d) {\n d = F(d);\n try {\n a[d] = null, delete a[d]\n } catch (b) {\n }\n };\n a.createarray = function (d) {\n d = F(d);\n return a[d] && a[d].isArray ? a[d] : a[d] = new bb(Fb)\n };\n a.removearray = function (d) {\n d = F(d);\n a[d] && a[d].isArray && (a[d] = null, delete a[d])\n };\n a.getattributes = function () {\n var d = [], b = [\"index\", _[438]], f;\n for (f in a)_[11] != typeof a[f] && -1 == b.indexOf(f) && \"_\" != f.charAt(0) && d.push(f);\n return d\n }\n }, bb = function (a, d) {\n var b = [], f = {};\n this.isArray = !0;\n this.isDynArray = 1 == d;\n this.__defineGetter__(\"count\", function () {\n return b.length\n });\n this.__defineSetter__(\"count\", function (a) {\n 0 == a ? (b = [], f = {}) : b.length = a\n });\n this.createItem = function (d, n) {\n var k = -1, e = null, k = String(d).charCodeAt(0);\n if (48 <= k && 57 >= k) {\n if (n)return null;\n k = parseInt(d, 10);\n e = b[k];\n if (null == e || void 0 == e)e = null != a ? new a : {}, e.name = \"n\" + k, e.index = k, b[k] = e, f[e.name] = e\n } else if (d = F(d), e = f[d], null == e || void 0 == e)e = n ? n : null != a ? new a : {}, k = b.push(e) - 1, e.index = k, e.name = d, b[k] = e, f[d] = e;\n return e\n };\n this.getItem = function (a) {\n var d = -1, d = String(a).charCodeAt(0);\n 48 <= d && 57 >= d ? (d = parseInt(a, 10), a = b[d]) : a = f[F(a)];\n return a\n };\n this.getArray = function () {\n return b\n };\n this.renameItem = function (a, d) {\n var k = -1, k = String(a).charCodeAt(0);\n 48 <= k && 57 >= k ? (k = parseInt(a, 10), k = b[k]) : k = f[F(a)];\n k && (delete f[k.name], d = F(d), k.name = d, f[d] = k)\n };\n this.removearrayitem = this.removeItem = function (a) {\n var d = -1, d = null;\n a = String(a);\n d = String(a).charCodeAt(0);\n 48 <= d && 57 >= d ? (d = parseInt(a, 10), d = b[d]) : d = f[F(a)];\n if (d) {\n f[d.name] = null;\n delete f[d.name];\n b.splice(d.index, 1);\n var k;\n k = b.length;\n for (a = d.index; a < k; a++)b[a].index--\n }\n return d\n };\n this.sortby = function (a, d) {\n var f, e, w = !1 === d ? -1 : 1;\n e = b.length;\n if (1 < e)for (b.sort(function (d, b) {\n var r = d[a], e = b[a];\n return void 0 === r && void 0 !== e ? +w : void 0 !== r && void 0 === e || r < e ? -w : r > e ? +w : 0\n }), f = 0; f < e; f++)b[f].index = f\n }\n }, ra = {};\n (function () {\n function a(a) {\n for (var d = w, b = [], e, g, h, c, f, n = a.length, k = 0, q = 0; k < n;)e = d.indexOf(a.charAt(k++)), g = d.indexOf(a.charAt(k++)), c = d.indexOf(a.charAt(k++)), f = d.indexOf(a.charAt(k++)), e = e << 2 | g >> 4, g = (g & 15) << 4 | c >> 2, h = (c & 3) << 6 | f, b[q++] = e, 64 != c && (b[q++] = g), 64 != f && (b[q++] = h);\n return b\n }\n\n function d(a, d) {\n var b, e, g, h = [];\n h.length = 256;\n if (80 == d || 82 == d) {\n e = 15;\n var c = _[89];\n 82 == d && od && (e = 127, c = od);\n b = a[65] & 7;\n for (g = 0; 128 > g; g++)h[2 * g] = a[g], h[2 * g + 1] = String(c).charCodeAt(g & e);\n e = a.length - 128 - b;\n b += 128\n } else if (71 == d) {\n b = a[4];\n e = (a[b] ^ b) & 15 | ((a[2 + b] ^ b) >> 2 & 63) << 4 | ((a[1 + b] ^ b) >> 1 & 63) << 10 | ((a[3 + b] ^ b) & 63) << 16;\n for (g = 0; 256 > g; g++)h[g] = a[g] ^ a[256 + e + b + 2 * g];\n b = 256\n }\n x.srand(h, 256);\n return x.flip(a, b, e)\n }\n\n function p(a, d, b) {\n if (null == a)return null;\n a = \"\" + a;\n 1 == d && m.basedir && 0 > a.indexOf(\"://\") && 0 != a.indexOf(\"/\") && _[74] != a.slice(0, 5) && (a = m.basedir + a);\n a = a.split(\"\\\\\").join(\"/\");\n null == e.firstxmlpath && (e.firstxmlpath = \"\");\n null == e.currentxmlpath && (e.currentxmlpath = \"\");\n null == e.swfpath && (e.swfpath = \"\");\n null == e.htmlpath && (e.htmlpath = \"\");\n for (d = a.indexOf(\"%\"); 0 <= d;) {\n var g = a.indexOf(\"%\", d + 1);\n if (g > d) {\n var f = a.slice(d + 1, g), h = null;\n if (36 == f.charCodeAt(0)) {\n if (f = U(f.slice(1)), null != f) {\n f = \"\" + f;\n a = 47 == f.charCodeAt(0) || 0 < f.indexOf(\"://\") ? f + a.slice(g + 1) : a.slice(0, d) + f + a.slice(g + 1);\n d = a.indexOf(\"%\");\n continue\n }\n } else switch (f) {\n case _[437]:\n h = 1 == b ? \"\" : e.firstxmlpath;\n break;\n case _[361]:\n h = e.currentxmlpath;\n break;\n case _[475]:\n h = 1 == b ? \"\" : e.swfpath;\n break;\n case _[422]:\n h = 1 == b ? \"\" : e.htmlpath;\n break;\n case _[473]:\n h = 1 == b ? \"\" : m.basedir\n }\n null != h ? (g++, \"/\" == a.charAt(g) && g++, a = h + a.slice(g), d = a.indexOf(\"%\")) : d = a.indexOf(\"%\", d + 1)\n } else d = -1\n }\n return a\n }\n\n function f(b, e, f) {\n var l, n;\n 0 <= (l = e.indexOf(_[333])) ? (n = e.indexOf(_[309])) > l && (e = e.slice(l + 11, n), l = e.indexOf(_[393]), 0 <= l && (e = e.slice(l + 9, -3))) : f && 0 <= (l = e.indexOf('\"[[KENC')) && (n = e.lastIndexOf(']]\"')) > l && (e = e.slice(l + 3, n));\n var h;\n n = null;\n h = e.slice(0, 8);\n l = e.slice(8);\n f = !0 === f && Ya & 64 || !f && Ya & 32;\n if (\"KENC\" != h.slice(0, 4))return f ? (b && Ea(b + _[32]), null) : e;\n var c = !1, k = e = 0, k = 0, w = !1;\n e = String(h).charCodeAt(4);\n if (80 == e || 82 == e || 71 == e)if (k = String(h).charCodeAt(5), 85 == k && (k = String(h).charCodeAt(6), w = 90 == k, 66 == k || w))c = !0;\n if (!c)return b && la(3, b + _[170]), null;\n if (f && 80 == e)return b && Ea(b + _[32]), null;\n b = null;\n if (w) {\n b = e;\n n = String.fromCharCode;\n h = 1;\n f = l.length;\n var m = e = null, q = k = c = w = 0, x = 0, C = 0, Q = 0;\n try {\n n.apply(null, (new Uint8Array(4)).subarray(2))\n } catch (A) {\n h = 0\n }\n n = h ? Uint8Array : Array;\n for (e = new n(4 * f / 5); w < f;)k = l.charCodeAt(w++) - 35, q = l.charCodeAt(w++) - 35, x = l.charCodeAt(w++) - 35, C = l.charCodeAt(w++) - 35, Q = l.charCodeAt(w++) - 35, 56 < k && k--, 56 < q && q--, 56 < x && x--, 56 < C && C--, 56 < Q && Q--, Q += 85 * (85 * (85 * (85 * k + q) + x) + C), e[c++] = Q >> 24 & 255, e[c++] = Q >> 16 & 255, e[c++] = Q >> 8 & 255, e[c++] = Q & 255;\n e = d(e, b);\n m = new n(e[2] << 16 | e[1] << 8 | e[0]);\n f = 8 + (e[6] << 16 | e[5] << 8 | e[4]);\n w = 8;\n for (c = 0; w < f;) {\n k = e[w++];\n q = k >> 4;\n for (x = q + 240; 255 === x; q += x = e[w++]);\n for (C = w + q; w < C;)m[c++] = e[w++];\n if (w === f)break;\n Q = c - (e[w++] | e[w++] << 8);\n q = k & 15;\n for (x = q + 240; 255 === x; q += x = e[w++]);\n for (C = c + q + 4; c < C;)m[c++] = m[Q++]\n }\n e.length = 0;\n n = l = g(m)\n } else b = a(l), b = d(b, e), null != b && (n = g(b));\n return n\n }\n\n function g(a) {\n for (var d = \"\", b = 0, e = 0, g = 0, h = 0, c = a.length; b < c;)e = a[b], 128 > e ? (0 < e && (d += Xc(e)), b++) : 191 < e && 224 > e ? (g = a[b + 1], d += Xc((e & 31) << 6 | g & 63), b += 2) : (g = a[b + 1], h = a[b + 2], e = (e & 15) << 12 | (g & 63) << 6 | h & 63, 65279 != e && (d += Xc(e)), b += 3);\n return d\n }\n\n function n(a, d, b) {\n void 0 !== d ? d(a, b) : Ea(a + _[80] + b + \")\")\n }\n\n function k(a, d, g, f, k) {\n if (0 == e.DMcheck(a))n(a, k, _[227]); else {\n var h = null, c = !1;\n if (b.ie && \"\" == aa.domain)try {\n h = new ActiveXObject(_[218]), c = !0\n } catch (w) {\n h = null\n }\n null == h && (h = new XMLHttpRequest);\n void 0 !== h.overrideMimeType && d && h.overrideMimeType(d);\n h.onreadystatechange = function () {\n if (4 == h.readyState) {\n var d = h.status, b = h.responseText;\n if (0 == d && b || 200 == d || 304 == d)if (g) {\n var e = null, e = c ? (new DOMParser).parseFromString(b, _[25]) : h.responseXML;\n f(a, e, d)\n } else f(a, b); else n(a, k, h.status)\n }\n };\n try {\n h.open(\"GET\", a, !0), h.send(null)\n } catch (m) {\n n(a, k, m)\n }\n }\n }\n\n var e = ra, w = _[183], w = w + (F(w) + _[273]);\n e.firstxmlpath = null;\n e.currentxmlpath = null;\n e.swfpath = null;\n e.htmlpath = null;\n e.parsePath = p;\n e.DMcheck = function (a) {\n var d;\n if (Ya & 256 && (d = aa.domain) && vc) {\n a = a.toLowerCase();\n var b = a.indexOf(\"://\");\n if (0 < b) {\n var b = b + 3, e = a.indexOf(\"/\", b);\n if (0 < e)return a = a.slice(b, e), b = a.indexOf(\":\"), 1 < b && (a = a.slice(0, b)), a == d\n } else return d == vc\n }\n return !0\n };\n var x = new function () {\n var a, d, b;\n this.srand = function (e, g) {\n var h, c, f, n, k = [];\n k.length = 256;\n for (h = 0; 256 > h; h++)k[h] = h;\n for (c = h = 0; 256 > h; h++)c = c + k[h] + e[h % g] & 255, n = k[h], k[h] = k[c], k[c] = n;\n for (f = c = h = 0; 256 > f; f++)h = h + 1 & 255, c = c + k[h] & 255, n = k[h], k[h] = k[c], k[c] = n;\n a = k;\n d = h;\n b = c\n };\n this.flip = function (e, g, h) {\n var c = [], f, n;\n c.length = h;\n var k = a, q = d, w = b;\n for (f = 0; f < h; f++, g++)q = q + 1 & 255, w = w + k[q] & 255, c[f] = e[g] ^ a[k[q] + k[w] & 255], n = k[q], k[q] = k[w], k[w] = n;\n d = q;\n b = w;\n return c\n }\n };\n e.loadimage = function (a, d, b) {\n var e = Ja(1);\n e.addEventListener(\"load\", function () {\n d && d(e)\n });\n e.addEventListener(_[48], function () {\n b && b(null, !1)\n }, !1);\n e.addEventListener(\"abort\", function () {\n b && b(null, !0)\n }, !1);\n e.src = a;\n return e\n };\n e.loadfile = function (a, d, b) {\n e.loadfile2(a, null, d, b)\n };\n e.loadxml = function (a, d, b) {\n e.loadfile2(a, _[25], d, b, !0)\n };\n e.loadfile2 = function (a, d, b, e, g) {\n g = !0 === g;\n var h = {errmsg: !0};\n h.rqurl = a;\n a = p(a);\n h.url = a;\n k(a, d, g, function (a, n, k) {\n !0 === g ? b(n, k) : (n = f(a, n, _[92] == d), h.data = n, null != n ? b && b(h) : e && e(h))\n }, g ? e : function (d, b) {\n e && e(h);\n h.errmsg && la(3, a + _[80] + b + \")\")\n })\n };\n e.resolvecontentencryption = f;\n e.b64u8 = function (d) {\n return g(a(d))\n };\n e.decodeLicense = function (a) {\n return null\n }\n })();\n\n var T = {};\n (function () {\n function a(d) {\n var b, e, g = d.childNodes, f;\n e = g.length;\n for (b = 0; b < e; b++)if (f = g.item(b))switch (f.nodeType) {\n case 1:\n a(f);\n break;\n case 8:\n d.removeChild(f), b--, e--\n }\n }\n\n function d(a, d) {\n var b, e, g = a.childNodes, f = -1;\n e = g.length;\n if (1 <= e)for (b = 0; b < e; b++)if (F(g[b].nodeName) == d) {\n f = b;\n break\n }\n return 0 <= f ? g[f] : null\n }\n\n function p(d, e, g, f, n) {\n var k, u, h, c = null, K = null, D, z;\n z = 0;\n var q, J = d.length, C = new XMLSerializer, Q = !1;\n f || (Q = !0, f = [], n = [], m.xml.parsetime = Ta());\n for (var A = 0; A < J; A++)if ((k = d[A]) && k.nodeName && \"#text\" != k.nodeName && (u = k.nodeName, u = F(u), _[129] != u)) {\n u = null == e && _[46] == u ? null : e ? e + \".\" + u : u;\n if (h = k.attributes)if (h.devices && 0 == b.checkSupport(h.devices.value))continue; else if (h[\"if\"] && 0 == da.calc(null, h[\"if\"].value))continue;\n q = (K = h && h.name ? h.name.value : null) ? !0 : !1;\n if (g) {\n if (_[462] == u && g & 16)continue;\n if ((_[29] == u || \"layer\" == u) && g & 4)continue;\n if (_[1] == u && g & 128)continue;\n if (_[75] == u && g & 65536)continue;\n if (g & 64 && K)if (_[29] == u || \"layer\" == u) {\n if ((c = xa.getItem(K)) && c._pCD && c.keep)continue\n } else if (_[1] == u && (c = Ua.getItem(K)) && c._pCD && c.keep)continue\n }\n if (u)if (q) {\n if (_[14] == u || \"data\" == u || \"scene\" == u) {\n a(k);\n q = null;\n if ((_[14] == u || \"data\" == u) && k.childNodes && 1 <= k.childNodes.length)for (c = 0; c < k.childNodes.length; c++)if (4 == k.childNodes[c].nodeType) {\n q = k.childNodes[c].nodeValue;\n break\n }\n null == q && (q = C.serializeToString(k), q = q.slice(q.indexOf(\">\") + 1, q.lastIndexOf(\"</\")), _[14] == u && (q = q.split(_[497]).join('\"').split(_[499]).join(\"'\").split(_[139]).join(String.fromCharCode(160)).split(\"&amp;\").join(\"&\")));\n I(u + \"[\" + K + _[61], q);\n if (h) {\n var H;\n q = h.length;\n for (H = 0; H < q; H++)if (D = h[H], c = F(D.nodeName), D = D.value, \"name\" != c) {\n z = c.indexOf(\".\");\n if (0 < z)if (b.checkSupport(c.slice(z + 1)))c = c.slice(0, z); else continue;\n z = u + \"[\" + K + \"].\" + F(c);\n I(z, D)\n }\n }\n continue\n }\n u = u + \"[\" + K + \"]\";\n if (!Uc(K, u))continue;\n I(u + \".name\", K)\n } else(K = U(u)) && K.isArray && !K.isDynArray && (K = \"n\" + String(K.count), u = u + \"[\" + K + \"]\", I(u + \".name\", K));\n if (h) {\n var qa = \"view\" == u, c = u ? U(u) : null, K = null;\n q = h.length;\n c && (c._lateBinding && (K = c._lateBinding), (D = h.style) && (D = D.value) && null == K && (c.style = D, n.push(u), K = c._lateBinding = {}));\n for (H = 0; H < q; H++) {\n D = h[H];\n c = F(D.nodeName);\n D = D.value;\n var ea = u ? u + \".\" : \"\";\n if (\"name\" != c && \"style\" != c) {\n z = c.indexOf(\".\");\n if (0 < z)if (b.checkSupport(c.slice(z + 1)))c = c.slice(0, z).toLowerCase(); else continue;\n z = ea + c;\n K ? K[c] = D : !D || _[13] != typeof D || \"get:\" != D.slice(0, 4) && \"calc:\" != D.slice(0, 5) ? (I(z, D), qa && I(\"xml.\" + z, D)) : (f.push(z), f.push(D))\n }\n }\n }\n k.childNodes && 0 < k.childNodes.length && p(k.childNodes, u, g, f, n)\n }\n if (Q) {\n J = f.length;\n for (A = 0; A < J; A += 2)I(f[A], f[A + 1]);\n J = n.length;\n for (A = 0; A < J; A++)if (u = n[A], da.assignstyle(u, null), c = U(u))if (K = c._lateBinding)da.copyattributes(c, K), c._lateBinding = null;\n m.xml.parsetime = Ta() - m.xml.parsetime\n }\n }\n\n function f(a, d) {\n var b = null, e, g;\n g = a.length;\n for (e = 0; e < g; e++)if (b = a[e], !b || !b.nodeName || _[14] != F(b.nodeName)) {\n var k = b.attributes;\n if (k) {\n var n, h = k.length, c;\n for (n = 0; n < h; n++) {\n var m = k[n];\n c = F(m.nodeName);\n var p = c.indexOf(\".\");\n 0 < p && (c = c.slice(0, p));\n if (_[435] == c) {\n c = m.value;\n var p = c.split(\"|\"), z, q;\n q = p.length;\n for (z = 0; z < q; z++)c = p[z], \"\" != c && 0 > c.indexOf(\"://\") && 47 != c.charCodeAt(0) && (p[z] = d + c);\n m.value = p.join(\"|\")\n } else if (p = c.indexOf(\"url\"), 0 == p || 0 < p && p == c.length - 3)if (c = m.value)p = c.indexOf(\":\"), 47 == c.charCodeAt(0) || 0 < p && (\"//\" == c.substr(p + 1, 2) || 0 <= _[94].indexOf(c.substr(0, p + 1))) || (c = d + c), m.value = c\n }\n }\n b.childNodes && 0 < b.childNodes.length && f(b.childNodes, d)\n }\n }\n\n function g(a, d) {\n var b = Gc(d), e = b.lastIndexOf(\"/\"), g = b.lastIndexOf(\"\\\\\");\n g > e && (e = g);\n 0 < e && (b = b.slice(0, e + 1), f(a, b))\n }\n\n function n(a, b) {\n var e = d(a, _[374]);\n if (e) {\n var g = \"\", f, k;\n k = e.childNodes.length;\n for (f = 0; f < k; f++)g += e.childNodes[f].nodeValue;\n if (e = ra.resolvecontentencryption(b, g))return (e = (new DOMParser).parseFromString(e, _[25])) && e.documentElement && _[22] == e.documentElement.nodeName ? (la(3, b + _[21]), null) : e;\n Ea(b + _[32]);\n return null\n }\n return Ya & 32 ? (Ea(b + _[32]), null) : a\n }\n\n function k(a, d) {\n var b, e;\n switch (a.nodeType) {\n case 1:\n var g = T.xmlDoc.createElement(a.nodeName);\n if (a.attributes && 0 < a.attributes.length)for (b = 0, e = a.attributes.length; b < e;)g.setAttribute(a.attributes[b].nodeName, a.getAttribute(a.attributes[b++].nodeName));\n if (d && a.childNodes && 0 < a.childNodes.length)for (b = 0, e = a.childNodes.length; b < e;)g.appendChild(k(a.childNodes[b++], d));\n return g;\n case 3:\n case 4:\n case 8:\n return T.xmlDoc.createTextNode(a.nodeValue)\n }\n }\n\n function e(a, d) {\n var f, r, m;\n if (null != T.xmlIncludeNode) {\n m = Gc(a.url);\n if ((r = a.responseXML) && r.documentElement && _[22] == r.documentElement.nodeName) {\n Ea(m + _[21]);\n return\n }\n r = n(r, a.url);\n if (null == r)return;\n g(r.childNodes, m);\n f = r.childNodes;\n var l = T.xmlIncludeNode.parentNode;\n if (null != l.parentNode) {\n var u = 0;\n m = f.length;\n if (1 < m)for (r = 0; r < m; r++)if (_[46] == F(f[r].nodeName)) {\n u = r;\n break\n }\n r = null;\n r = void 0 === T.xmlDoc.importNode ? k(f[u], !0) : T.xmlDoc.importNode(f[u], !0);\n l.insertBefore(r, T.xmlIncludeNode);\n l.removeChild(T.xmlIncludeNode)\n } else T.xmlDoc = r;\n T.xmlAllNodes = [];\n T.addNodes(T.xmlDoc.childNodes);\n T.xmlIncludeNode = null\n }\n l = !1;\n m = T.xmlAllNodes.length;\n for (r = 0; r < m; r++)if (f = T.xmlAllNodes[r], u = null, null != f.nodeName) {\n u = F(f.nodeName);\n if (_[129] == u) {\n var u = f.attributes, h, c = u.length, p = !1;\n for (h = 0; h < c; h++) {\n var D = u[h];\n _[483] == D.nodeName ? 0 == b.checkSupport(D.value) && (p = !0) : \"if\" == D.nodeName && 0 == da.calc(null, D.value) && (p = !0)\n }\n if (0 == p)for (h = 0; h < c; h++)if (D = u[h], \"url\" == F(D.nodeName)) {\n l = !0;\n p = D.value;\n D = p.indexOf(\":\");\n 0 < D && 0 <= _[94].indexOf(p.substr(0, D + 1)) && (p = da.calc(null, p.substr(D + 1)));\n T.xmlIncludeNode = f;\n var z = ra.parsePath(p);\n z ? ra.loadxml(z, function (a, c) {\n a ? e({url: z, responseXML: a}, d) : Ea(z + \" - \" + (200 == c ? _[208] : _[184]))\n }) : d()\n }\n }\n if (l)break\n }\n 0 == l && d()\n }\n\n T.resolvexmlencryption = n;\n T.resolvexmlincludes = function (a, d) {\n var b = a.childNodes;\n T.xmlDoc = a;\n T.xmlAllNodes = [];\n T.addNodes(b);\n g(b, m.xml.url);\n T.xmlIncludeNode = null;\n e(null, d)\n };\n T.parsexml = p;\n T.xmlDoc = null;\n T.xmlAllNodes = null;\n T.xmlIncludeNode = null;\n T.addNodes = function (a) {\n var d, b, e;\n e = a.length;\n for (b = 0; b < e; b++)(d = a[b]) && d.nodeName && _[14] != F(d.nodeName) && (T.xmlAllNodes.push(d), d.childNodes && 0 < d.childNodes.length && T.addNodes(d.childNodes))\n };\n T.findxmlnode = d\n })();\n\n var ac = {};\n (function () {\n var a = ac;\n a.linear = function (a, b, f) {\n return f * a + b\n };\n a.easeinquad = function (a, b, f) {\n return f * a * a + b\n };\n a.easeoutquad = function (a, b, f) {\n return -f * a * (a - 2) + b\n };\n a[_[5]] = a.easeoutquad;\n a.easeinoutquad = function (a, b, f) {\n return (1 > (a /= .5) ? f / 2 * a * a : -f / 2 * (--a * (a - 2) - 1)) + b\n };\n a.easeinback = function (a, b, f) {\n return f * a * a * (2.70158 * a - 1.70158) + b\n };\n a.easeoutback = function (a, b, f) {\n return f * (--a * a * (2.70158 * a + 1.70158) + 1) + b\n };\n a.easeinoutback = function (a, b, f) {\n var g = 1.70158;\n return 1 > (a *= 2) ? f / 2 * a * a * (((g *= 1.525) + 1) * a - g) + b : f / 2 * ((a -= 2) * a * (((g *= 1.525) + 1) * a + g) + 2) + b\n };\n a.easeincubic = function (a, b, f) {\n return f * a * a * a + b\n };\n a.easeoutcubic = function (a, b, f) {\n return f * (--a * a * a + 1) + b\n };\n a.easeinquart = function (a, b, f) {\n return f * a * a * a * a + b\n };\n a.easeoutquart = function (a, b, f) {\n return -f * ((a = a / 1 - 1) * a * a * a - 1) + b\n };\n a.easeinquint = function (a, b, f) {\n return f * a * a * a * a * a + b\n };\n a.easeoutquint = function (a, b, f) {\n return f * ((a = a / 1 - 1) * a * a * a * a + 1) + b\n };\n a.easeinsine = function (a, b, f) {\n return -f * Math.cos(Ga / 2 * a) + f + b\n };\n a.easeoutsine = function (a, b, f) {\n return f * Math.sin(Ga / 2 * a) + b\n };\n a.easeinexpo = function (a, b, f) {\n return 0 == a ? b : f * Math.pow(2, 10 * (a - 1)) + b - .001 * f\n };\n a.easeoutexpo = function (a, b, f) {\n return 1 == a ? b + f : 1.001 * f * (-Math.pow(2, -10 * a) + 1) + b\n };\n a.easeincirc = function (a, b, f) {\n return -f * (Math.sqrt(1 - a * a) - 1) + b\n };\n a.easeoutcirc = function (a, b, f) {\n return f * Math.sqrt(1 - (a = a / 1 - 1) * a) + b\n };\n a.easeoutbounce = function (a, b, f) {\n return a < 1 / 2.75 ? 7.5625 * f * a * a + b : a < 2 / 2.75 ? f * (7.5625 * (a -= 1.5 / 2.75) * a + .75) + b : a < 2.5 / 2.75 ? f * (7.5625 * (a -= 2.25 / 2.75) * a + .9375) + b : f * (7.5625 * (a -= 2.625 / 2.75) * a + .984375) + b\n };\n a.easeinbounce = function (b, m, f) {\n return f - a.easeoutbounce(1 - b, 0, f) + m\n };\n a.getTweenfu = function (b) {\n b = F(b);\n \"\" == b || \"null\" == b ? b = _[56] : void 0 === a[b] && (b = _[56]);\n return a[b]\n }\n })();\n\n var da = {};\n (function () {\n function a(a, b, c) {\n var d, h = a.length;\n c = 1 != c;\n for (d = 0; d < h; d++) {\n var e = \"\" + a[d], g = e.toLowerCase();\n c && \"null\" == g ? a[d] = null : 41 == e.charCodeAt(e.length - 1) && (g = g.slice(0, 4), \"get(\" == g ? a[d] = U(Ha(e.slice(4, e.length - 1)), b) : \"calc\" == g && 40 == e.charCodeAt(4) && (a[d] = U(e, b)))\n }\n }\n\n function b(a, c) {\n var d, e, h, g = 0, f = 0, k = 0;\n h = \"\";\n d = 0;\n for (e = a.length; d < e;) {\n h = a.charCodeAt(d);\n if (!(32 >= h))if (34 == h)0 == k ? k = 1 : 1 == k && (k = 0); else if (39 == h)0 == k ? k = 2 : 2 == k && (k = 0); else if (0 == k)if (91 == h)0 == f && (f = d + 1), g++; else if (93 == h && 0 < g && (g--, 0 == g)) {\n if (h = oc(a, f, d, c))a = a.slice(0, f) + h + a.slice(d), d = f + h.length + 1, e = a.length;\n f = 0\n }\n d++\n }\n return a\n }\n\n function E(a, b) {\n var c = \"\", d, h, e, g, f;\n e = a.length;\n f = b.length;\n for (h = 0; h < e; h++)d = a.charAt(h), \"%\" == d ? (h++, d = a.charCodeAt(h) - 48, 0 <= d && 9 >= d ? (h + 1 < e && (g = a.charCodeAt(h + 1) - 48, 0 <= g && 9 >= g && (h++, d = 10 * d + g)), c = d < f ? c + (\"\" + b[d]) : c + \"null\") : c = -11 == d ? c + \"%\" : c + (\"%\" + a.charAt(h))) : c += d;\n return c\n }\n\n function f(a, b, c, d) {\n c = Array.prototype.slice.call(c);\n c.splice(0, 0, a);\n b = E(b, c);\n h.callaction(b, d, !0)\n }\n\n function g(a, b, c) {\n var krpano = m;\n var caller = c;\n var args = b;\n var resolve = y;\n var actions = h;\n try {\n eval(a, c)\n } catch (d) {\n la(3, b[0] + \" - \" + d)\n }\n }\n\n function n(a) {\n var b = c, d = b.length, h;\n for (h = 0; h < d; h++)if (b[h].id == a) {\n b.splice(h, 1);\n break\n }\n }\n\n function k(a) {\n var b = a.length;\n if (2 == b || 3 == b) {\n var c = U(a[b - 2], h.actioncaller), d = U(a[b - 1], h.actioncaller);\n null == c && (c = a[b - 2]);\n null == d && (d = a[b - 1]);\n return [a[0], parseFloat(c), parseFloat(d)]\n }\n return null\n }\n\n function e(a, b, c) {\n var d = 1 == b.length ? U(b[0], c) : b[1], d = 0 == a ? escape(d) : unescape(d);\n I(b[0], d, !1, c, !0)\n }\n\n function w(a) {\n if (1 == a.length)return a[0];\n var b, c = null, d = null, h = null, c = !1;\n for (b = 0; b < a.length; b++)if (c = \"\" + a[b], 0 < c.length && 0 <= _[442].indexOf(c)) {\n if (0 == b || b >= a.length - 1)throw _[33];\n d = a[b - 1];\n h = a[b + 1];\n switch (c) {\n case \"===\":\n case \"==\":\n c = d == h;\n break;\n case \"!==\":\n case \"!=\":\n c = d != h;\n break;\n case \"<\":\n c = d < h;\n break;\n case \"<=\":\n c = d <= h;\n break;\n case \">\":\n c = d > h;\n break;\n case \">=\":\n c = d >= h;\n break;\n default:\n throw _[33];\n }\n a.splice(b - 1, 3, c);\n b -= 2\n }\n if (1 == a.length)return a[0];\n for (b = 0; b < a.length; b++)if (c = a[b], \"&&\" == c || \"||\" == c) {\n if (0 == b || b >= a.length - 1)throw _[33];\n d = a[b - 1];\n h = a[b + 1];\n c = \"&&\" == c ? d && h : d || h;\n a.splice(b - 1, 3, c);\n b -= 2\n }\n if (5 == a.length && \"?\" == a[1] && \":\" == a[3])return a[0] ? a[2] : a[4];\n if (1 < a.length)throw _[33];\n return a[0]\n }\n\n function x(a) {\n var b = void 0, b = F(a), c = b.charCodeAt(0), d, e = 0, g = !1;\n 64 == c && (g = !0, a = a.slice(1), b = b.slice(1), c = b.charCodeAt(0));\n if (39 == c || 34 == c)return Ha(a);\n if (33 == c || 43 == c || 45 == c)e = c, a = a.slice(1), b = b.slice(1), c = b.charCodeAt(0);\n d = b.charCodeAt(b.length - 1);\n 40 == c && 41 == d ? b = v(a.slice(1, -1)) : 37 == d ? b = a : (b = \"null\" != b ? U(a, h.actioncaller, !0) : null, void 0 === b ? (c = Number(a), isNaN(c) || isNaN(parseFloat(a)) ? g && (b = a) : b = c) : _[13] == typeof b && (a = F(b), \"true\" == a ? b = !0 : _[31] == a ? b = !1 : \"null\" == a ? b = null : (a = Number(b), isNaN(a) || (b = a))));\n 33 == e ? b = !b : 45 == e && (b = -b);\n return b\n }\n\n function v(a) {\n var b;\n if (\"\" == a || null === a)return a;\n try {\n var c, d = a.length, h = 0, e = 0, g = !1, f = !1, k = 0, n = 0, t = 0, G = !1, q = [], l = 0, r = 0;\n for (c = 0; c < d; c++)if (r = a.charCodeAt(c), 0 == G && 32 >= r)0 < e && (q[l++] = a.substr(h, e), e = 0), g = !1; else if (0 == G && (61 == r || 33 == r && 61 == a.charCodeAt(c + 1) || 62 == r || 60 == r))0 == g && (0 < e ? (q[l++] = a.substr(h, e), e = 0) : 0 == l && 0 == m.strict && (q[l++] = \"\"), g = !0, f = !1, h = c), e++; else if (0 != G || 43 != r && 45 != r && 42 != r && 47 != r && 94 != r && 63 != r && 58 != r) {\n if (0 == t)if (91 == r)k++, G = !0; else if (93 == r)k--, 0 == k && 0 == n && (G = !1); else if (40 == r)n++, G = !0; else if (41 == r)n--, 0 == n && 0 == k && (G = !1); else {\n if (39 == r || 34 == r)t = r, G = !0\n } else r == t && (t = 0, 0 == k && 0 == n && (G = !1));\n if (g || f)0 < e && (q[l++] = a.substr(h, e), e = 0), f = g = !1, h = c;\n 0 == e && (h = c);\n e++\n } else 0 < e && (q[l++] = a.substr(h, e)), g = !1, f = !0, h = c, e = 1;\n 0 < e && (q[l++] = a.substr(h, e));\n 2 == l && g && 0 == m.strict && (q[l++] = \"\");\n if (0 == m.strict) {\n var u = q.length;\n if (!(3 > u)) {\n var p, v;\n for (p = 1; p < u - 1; p++)if (v = q[p], \"==\" == v || \"!=\" == v) {\n q[p - 1] = \"@\" + q[p - 1];\n v = q[p + 1];\n if (\"+\" == v || \"-\" == v)for (p++, v = q[p + 1]; \"+\" == v || \"-\" == v;)p++, v = q[p + 1];\n q[p + 1] = \"@\" + v\n }\n }\n }\n var J = q.length, z, y, D;\n if (1 == J)q[0] = x(q[0]); else for (z = 0; z < J; z++)if (y = q[z], !(0 <= \"<=>=!===+-*/^||&&?:\".indexOf(y))) {\n switch (y) {\n case \"AND\":\n D = \"&&\";\n break;\n case \"OR\":\n D = \"||\";\n break;\n case \"GT\":\n D = \">\";\n break;\n case \"GE\":\n D = \">=\";\n break;\n case \"LT\":\n D = \"<\";\n break;\n case \"LE\":\n D = \"<=\";\n break;\n case \"EQ\":\n D = \"==\";\n break;\n case \"LSHT\":\n D = \"<<\";\n break;\n case \"RSHT\":\n D = \">>\";\n break;\n case \"BAND\":\n D = \"~&\";\n break;\n case \"BOR\":\n D = \"~|\";\n break;\n default:\n D = x(y)\n }\n q[z] = D\n }\n var F = q.length;\n if (!(2 > F)) {\n var E, K;\n c = null;\n for (E = 0; E < q.length; E++)if (c = q[E], \"+\" == c || \"-\" == c)if (0 == E || 0 <= \".<.<<.<=.==.===.=>.>.>>.!=.!==.+.-.*./.^.&&.||.?.:.~|.~&.\".indexOf(\".\" + q[E - 1] + \".\")) {\n K = 45 == c.charCodeAt(0) ? -1 : 1;\n F = 1;\n for (c = \"\" + q[E + F]; \"+\" == c || \"-\" == c;)K *= 45 == c.charCodeAt(0) ? -1 : 1, F++, c = \"\" + q[E + F];\n c && 40 == c.charCodeAt(0) && (c = x(c));\n c = c && 37 == c.charCodeAt(c.length - 1) ? parseFloat(c) * K + \"%\" : Number(c) * K;\n q.splice(E, 1 + F, c);\n --E\n }\n for (E = 1; E < q.length - 1; E++)c = q[E], \"*\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) * Number(q[E + 1])), E -= 3) : \"/\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) / Number(q[E + 1])), E -= 3) : \"^\" == c ? (q.splice(E - 1, 3, Math.pow(Number(q[E - 1]), Number(q[E + 1]))), E -= 3) : \"<<\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) << Number(q[E + 1])), E -= 3) : \">>\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) >> Number(q[E + 1])), E -= 3) : \"~&\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) & Number(q[E + 1])), E -= 3) : \"~|\" == c && (q.splice(E - 1, 3, Number(q[E - 1]) | Number(q[E + 1])), E -= 3);\n for (E = 1; E < q.length - 1; E++)c = q[E], \"+\" == c ? (q.splice(E - 1, 3, q[E - 1] + q[E + 1]), E -= 3) : \"-\" == c && (q.splice(E - 1, 3, Number(q[E - 1]) - Number(q[E + 1])), E -= 3)\n }\n b = w(q)\n } catch (L) {\n la(3, L + \": \" + a)\n }\n return b\n }\n\n function r(a) {\n var b = a.position;\n 1 == a.motionmode ? (b *= a.Tmax, b <= a.T1 ? b *= a.accelspeed / 2 * b : b > a.T1 && b <= a.T1 + a.T2 ? b = a.S1 + (b - a.T1) * a.Vmax : (b -= a.T1 + a.T2, b = a.Vmax * b + a.breakspeed / 2 * b * b + a.S1 + a.S2), b = 0 != a.Smax ? b / a.Smax : 1) : 2 == a.motionmode && (b = a.tweenfu(b, 0, 1));\n p.hlookat = a.startH + b * (a.destH - a.startH);\n p.vlookat = a.startV + b * (a.destV - a.startV);\n p.fov = a.startF + b * (a.destF - a.startF)\n }\n\n function y(a, b) {\n var c = U(a, b);\n null == c && (c = a);\n return c\n }\n\n function l(a) {\n var b = a.waitfor;\n \"load\" == b ? Xa.isLoading() && (a.position = 0) : _[73] == b && Xa.isBlending() && (a.position = 0)\n }\n\n function u(a) {\n var b = a.varname, c = parseFloat(a.startval), d = parseFloat(a.endval), e = null != a.startval ? 0 < String(a.startval).indexOf(\"%\") : !1, g = null != a.endval ? 0 < String(a.endval).indexOf(\"%\") : !1;\n g ? e || (c = 0) : e && 0 == d && (g = !0);\n var e = 0, e = a.position, f = a.tweenmap;\n 0 <= b.indexOf(_[47], b.lastIndexOf(\".\") + 1) ? (c = parseInt(a.startval), d = parseInt(a.endval), 1 <= e ? e = d : (e = f(e, 0, 1), e = Math.min(Math.max((c >> 24) + e * ((d >> 24) - (c >> 24)), 0), 255) << 24 | Math.min(Math.max((c >> 16 & 255) + e * ((d >> 16 & 255) - (c >> 16 & 255)), 0), 255) << 16 | Math.min(Math.max((c >> 8 & 255) + e * ((d >> 8 & 255) - (c >> 8 & 255)), 0), 255) << 8 | Math.min(Math.max((c & 255) + e * ((d & 255) - (c & 255)), 0), 255))) : e = 1 <= e ? d : f(e, c, d - c);\n I(b, g ? e + \"%\" : e, !0, a.actioncaller);\n null != a.updatefu && h.callaction(a.updatefu, a.actioncaller)\n }\n\n var h = da;\n h.busy = !1;\n h.blocked = !1;\n h.queue = [];\n h.actioncaller = null;\n var c = [], K = [], D = null, z = 0, q = function () {\n this.id = null;\n this.blocking = !1;\n this.position = this.maxruntime = this.starttime = 0;\n this.updatefu = this.actioncaller = this.donecall = this.process = null\n };\n h.copyattributes = function (a, b) {\n for (var c in b) {\n var d = F(c);\n if (\"name\" != d && \"index\" != d && \"_type\" != d) {\n var e = b[c];\n if (_[11] !== typeof e) {\n if (e && _[13] == typeof e) {\n var h = e.slice(0, 4);\n \"get:\" == h ? e = U(e.slice(4)) : \"calc\" == h && 58 == e.charCodeAt(4) && (e = v(e.slice(5)))\n }\n a[d] = _[67] == typeof a[d] ? pa(e) : e\n }\n }\n }\n };\n h.assignstyle = function (a, b) {\n var c = U(a);\n if (c && (null == b && (b = c.style), b)) {\n c.style = b;\n var d = b.split(\"|\"), e, g;\n g = d.length;\n for (e = 0; e < g; e++) {\n var f = U(_[515] + d[e] + \"]\");\n f ? h.copyattributes(c, f) : la(3, a + _[198] + d[e])\n }\n }\n };\n h.isblocked = function () {\n if (h.blocked) {\n var a = D;\n if (a)D = null, h.stopall(), \"break\" != F(a) && h.callaction(a), h.processactions(); else return !0\n }\n return !1\n };\n h.actions_autorun = function (a, b) {\n var c = m.action.getArray(), d = [], e, g, f = null;\n g = c.length;\n for (e = 0; e < g; e++)(f = c[e]) && f.autorun == a && !f._arDone && (f._arDone = !0, d.push(f));\n g = d.length;\n if (0 < g) {\n c = \"\";\n for (e = 0; e < g; e++)f = d[e], c += _[452] + f.name + \");\";\n h.callaction(c, null, b);\n h.processactions()\n }\n };\n h.callwith = function (a, b) {\n var c = U(a, h.actioncaller);\n if (c) {\n var d = c._type;\n _[29] != d && _[1] != d || h.callaction(b, c)\n }\n };\n\n //sohow_base64\n h.callaction = function (a, b, c) {\n if (a && \"null\" != a && \"\" != a) {\n var d = typeof a;\n if (_[11] === d)\n a();\n else if (_[144] !== d && (a = Gb(a, b))) {\n var d = a.length, e = 0 < h.queue.length, g = !1;\n for (b = 0; b < d; b++) {\n var f = a[b];\n _[314] == f.cmd && (g = !0);\n f.breakable = g;\n 1 == c ? h.queue.splice(b, 0, f) : h.queue.push(f)\n }\n 0 == e && h.processactions()\n }\n }\n };\n var J = !1;\n h.processactions = function () {\n if (!J) {\n J = !0;\n for (var b = null, c = null, d = null, e = null, f = 0, q = h.queue; null != q && 0 < q.length;) {\n if (h.busy || h.blocked) {\n J = !1;\n return\n }\n f++;\n if (1E5 < f) {\n la(2, _[89]);\n q.length = 0;\n break\n }\n b = q.shift();\n c = String(b.cmd);\n d = b.args;\n b = b.caller;\n h.actioncaller = b;\n if (!(b && b._busyonloaded && b._destroyed) && \"//\" != c.slice(0, 2))if (\"call\" == c && (c = F(d.shift())), a(d, b, \"set\" == c), void 0 !== h[c])h[c].apply(h[c], d); else if (b && void 0 !== b[c])e = b[c], _[11] === typeof e ? e.apply(e, d) : h.callaction(b[c], b, !0); else {\n if (_[14] == c || \"call\" == c)c = F(d.shift());\n e = null;\n if (null != (e = U(c))) {\n var k = typeof e;\n _[11] === k ? e.apply(e, d) : _[144] === k ? la(2, _[87] + id(c)) : _[13] === typeof e && (d.splice(0, 0, c), e = E(e, d), h.callaction(e, b, !0))\n } else if (k = U(_[453] + c + \"]\")) {\n if (e = k.content)d.splice(0, 0, c), _[372] === F(k.type) ? g(e, d, b) : (e = E(e, d), h.callaction(e, b, !0))\n } else la(2, _[87] + id(c))\n }\n }\n h.blocked || (D = null);\n h.actioncaller = null;\n J = !1\n }\n };\n h.processAnimations = function (a) {\n var b = !1, d = c, e = d.length, g, f = Ta();\n a = 1 == a;\n for (g = 0; g < e; g++) {\n var q = d[g];\n if (q) {\n var k = 0 < q.maxruntime ? (f - q.starttime) / 1E3 / q.maxruntime : 1;\n isNaN(k) && (k = 1);\n 1 < k && (k = 1);\n q.position = k;\n null != q.process && (b = !0, q.process(q), k = q.position);\n if (1 <= k || a)d.splice(g, 1), e--, g--, q.blocking ? (h.blocked = !1, h.processactions()) : q.donecall && 0 == a && h.callaction(q.donecall, q.actioncaller)\n }\n }\n h.blocked && (b = !1);\n return b\n };\n h.fromcharcode = function () {\n var a = arguments;\n 2 == a.length && I(a[0], String.fromCharCode(y(a[1], h.actioncaller)), !1, h.actioncaller)\n };\n h.stopmovements = function () {\n Pa.stopFrictions(4)\n };\n h.stopall = function () {\n var a, b, d = h.queue;\n b = d.length;\n for (a = 0; a < b; a++) {\n var e = d[a];\n e && e.breakable && (e.cmd = \"//\")\n }\n c = [];\n h.blocked = !1\n };\n h.breakall = function () {\n h.processAnimations(!0)\n };\n h.oninterrupt = function (a) {\n D = a\n };\n h.delayedcall = function () {\n var a = arguments, b = a.length, d = 0;\n 3 == b && (d++, b--);\n 2 == b && (b = new q, b.maxruntime = Number(a[d]), b.donecall = a[d + 1], b.starttime = Ta(), b.actioncaller = h.actioncaller, b.id = 0 < d ? \"ID\" + F(a[0]) : \"DC\" + ++z, n(b.id), c.push(b))\n };\n h.stopdelayedcall = function (a) {\n n(\"ID\" + F(a))\n };\n h.set = function () {\n var a = arguments;\n 2 == a.length && I(a[0], a[1], !1, h.actioncaller)\n };\n h.copy = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = U(a[1], h.actioncaller);\n I(a[0], void 0 === b ? null : b, !1, h.actioncaller)\n }\n };\n h.push = function () {\n var a = arguments;\n 1 == a.length && K.push(U(a[0], h.actioncaller))\n };\n h.pop = function () {\n var a = arguments;\n 1 == a.length && I(a[0], K.pop(), !1, h.actioncaller)\n };\n h[_[508]] = function () {\n var a = arguments, b = a.length, c = a[0], d = F(U(c, h.actioncaller));\n if (1 == b)I(c, !pa(d), !0, h.actioncaller); else if (3 <= b) {\n var e;\n b--;\n for (e = 1; e <= b; e++) {\n var g = F(a[e]), f = !1;\n isNaN(Number(d)) || isNaN(Number(g)) ? d == g && (f = !0) : Number(d) == Number(g) && (f = !0);\n if (f) {\n e++;\n e > b && (e = 1);\n I(c, a[e], !0, h.actioncaller);\n break\n }\n }\n }\n };\n h.roundval = function () {\n var a = arguments;\n if (1 <= a.length) {\n var b = Number(U(a[0], h.actioncaller)), c = 2 == a.length ? parseInt(a[1]) : 0, b = 0 == c ? Math.round(b).toString() : b.toFixed(c);\n I(a[0], b, !1, h.actioncaller, !0)\n }\n };\n h.tohex = function () {\n var a = arguments, b = a.length;\n if (0 < b) {\n var c = parseInt(U(a[0], h.actioncaller)).toString(16).toUpperCase();\n 2 < b && (c = (_[419] + c).slice(-parseInt(a[2])));\n 1 < b && (c = a[1] + c);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.tolower = function () {\n var a = arguments;\n 1 == a.length && I(a[0], F(U(a[0], h.actioncaller)), !1, h.actioncaller, !0)\n };\n h.toupper = function () {\n var a = arguments;\n 1 == a.length && I(a[0], (\"\" + U(a[0], h.actioncaller)).toUpperCase(), !1, h.actioncaller, !0)\n };\n h.inc = function () {\n var a = arguments, b = a.length;\n if (1 <= b) {\n var c = Number(U(a[0], h.actioncaller)) + (1 < b ? Number(a[1]) : 1);\n 3 < b && c > Number(a[2]) && (c = Number(a[3]));\n I(a[0], c, !0, h.actioncaller)\n }\n };\n h.dec = function () {\n var a = arguments, b = a.length;\n if (1 <= b) {\n var c = Number(U(a[0], h.actioncaller)) - (1 < b ? Number(a[1]) : 1);\n 3 < b && c < Number(a[2]) && (c = Number(a[3]));\n I(a[0], c, !0, h.actioncaller)\n }\n };\n h.add = function () {\n var a = k(arguments);\n a && I(a[0], a[1] + a[2], !1, h.actioncaller)\n };\n h.sub = function () {\n var a = k(arguments);\n a && I(a[0], a[1] - a[2], !1, h.actioncaller)\n };\n h.mul = function () {\n var a = k(arguments);\n a && I(a[0], a[1] * a[2], !1, h.actioncaller)\n };\n h.div = function () {\n var a = k(arguments);\n a && I(a[0], a[1] / a[2], !1, h.actioncaller)\n };\n h.mod = function () {\n var a = k(arguments);\n if (a) {\n var b = a[1], c = b | 0, b = b + (-c + c % (a[2] | 0));\n I(a[0], b, !1, h.actioncaller)\n }\n };\n h.pow = function () {\n var a = k(arguments);\n a && I(a[0], Math.pow(a[1], a[2]), !1, h.actioncaller)\n };\n h.clamp = function () {\n var a = arguments;\n if (3 == a.length) {\n var b = h.actioncaller, c = Number(U(a[0], b)), d = Number(a[1]), e = Number(a[2]);\n c < d && (c = d);\n c > e && (c = e);\n I(a[0], c, !1, b)\n }\n };\n h.remapfovtype = function () {\n var a = arguments, b = a.length;\n if (3 == b || 5 == b) {\n var c = h.actioncaller, d = Number(U(a[0], c)), e = 3 == b ? m.area.pixelwidth : Number(U(a[3], c)), b = 3 == b ? m.area.pixelheight : Number(U(a[4], c)), d = p.fovRemap(d, a[1], a[2], e, b);\n I(a[0], d, !1, c)\n }\n };\n h.screentosphere = function () {\n var a = arguments;\n if (4 == a.length) {\n var b = h.actioncaller, c = p.screentosphere(Number(U(a[0], b)), Number(U(a[1], b)));\n I(a[2], c.x, !1, b);\n I(a[3], c.y, !1, b)\n }\n };\n h.spheretoscreen = function () {\n var a = arguments;\n if (4 == a.length) {\n var b = h.actioncaller, c = p.spheretoscreen(Number(U(a[0], b)), Number(U(a[1], b)));\n I(a[2], c.x, !1, b);\n I(a[3], c.y, !1, b)\n }\n };\n h.screentolayer = function () {\n var a = arguments;\n if (5 == a.length) {\n var b = h.actioncaller, c = xa.getItem(a[0]);\n if (c) {\n var d = Number(U(a[1], b)), e = Number(U(a[2], b)), g = tc, f = tc, q = c.sprite;\n if (q) {\n var k = X, f = V.viewerlayer.getBoundingClientRect(), n = q.getBoundingClientRect(), g = d * k - (n.left - f.left + q.clientLeft + q.scrollLeft), f = e * k - (n.top - f.top + q.clientTop + q.scrollTop);\n c.scalechildren && (k = 1);\n g /= c._finalxscale * k;\n f /= c._finalyscale * k\n }\n I(a[3], g, !1, b);\n I(a[4], f, !1, b)\n }\n }\n };\n h.layertoscreen = function () {\n var a = arguments;\n if (5 == a.length) {\n var b = h.actioncaller, c = xa.getItem(a[0]);\n if (c) {\n var d = Number(U(a[1], b)), e = Number(U(a[2], b)), g = tc, f = tc, q = c.sprite;\n if (q)var f = X, k = c.scalechildren ? f : 1, n = V.viewerlayer.getBoundingClientRect(), t = q.getBoundingClientRect(), g = d * c._finalxscale / k + (t.left - n.left + q.clientLeft + q.scrollLeft) / f, f = e * c._finalyscale / k + (t.top - n.top + q.clientTop + q.scrollTop) / f;\n I(a[3], g, !1, b);\n I(a[4], f, !1, b)\n }\n }\n };\n h.escape = function () {\n e(0, arguments, h.actioncaller)\n };\n h.unescape = function () {\n e(1, arguments, h.actioncaller)\n };\n h.txtadd = function () {\n var a = arguments, b, c = a.length, d = 2 == c ? String(U(a[0], h.actioncaller)) : \"\";\n \"null\" == d && (d = \"\");\n for (b = 1; b < c; b++)d += a[b];\n I(a[0], d, !1, h.actioncaller, !0)\n };\n h.subtxt = function () {\n var a = arguments, b = a.length;\n if (2 <= b) {\n var c = U(a[1], h.actioncaller), c = null == c ? String(a[1]) : String(c), c = c.substr(2 < b ? Number(a[2]) : 0, 3 < b ? Number(a[3]) : void 0);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.indexoftxt = function () {\n var a = arguments, b = a.length;\n 3 <= b && (b = String(a[1]).indexOf(String(a[2]), 3 < b ? Number(a[3]) : 0), I(a[0], b, !1, h.actioncaller, !0))\n };\n h.txtreplace = function () {\n var a = arguments, b = a.length;\n if (3 == b || 4 == b) {\n var b = 3 == b ? 0 : 1, c = U(a[b], h.actioncaller);\n if (c)var d = a[b + 2], c = c.split(a[b + 1]).join(d);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.txtsplit = function () {\n var a = arguments, b = a.length;\n if (3 <= b) {\n var c = (\"\" + y(a[0], h.actioncaller)).split(\"\" + a[1]), d;\n if (3 == b)for (d = 0; d < c.length; d++)I(a[2] + \"[\" + d + _[455], c[d], !1, h.actioncaller, !0); else for (d = 2; d < b; d++)I(a[d], c[d - 2], !1, h.actioncaller, !0)\n }\n };\n h.showlog = function () {\n var a = arguments, a = !(1 == a.length && 0 == pa(a[0]));\n V.showlog(a)\n };\n h.trace = function () {\n var a = arguments, b, c = a.length, d = \"\", e = h.actioncaller;\n for (b = 0; b < c; b++)var g = a[b], f = U(g, e), d = null != f ? d + f : d + g;\n la(1, d)\n };\n h[_[507]] = function () {\n var a = arguments, b, c = a.length, d = h.actioncaller;\n for (b = 0; b < c; b++)a:{\n var e = d, g = void 0, f = void 0, q = void 0, k = Vc(a[b]), f = k.length;\n if (1 == f && e && (q = k[0], e.hasOwnProperty(q))) {\n e[q] = null;\n delete e[q];\n break a\n }\n for (var n = m, g = 0; g < f; g++) {\n var q = k[g], t = g == f - 1, G = null, l = q.indexOf(\"[\");\n 0 < l && (G = oc(q, l + 1, q.length - 1, e), q = q.slice(0, l));\n if (void 0 !== n[q]) {\n if (null != G && (l = n[q], l.isArray))if (q = l.getItem(G))if (t)break a; else {\n n = q;\n continue\n } else break;\n if (t) {\n n[q] = null;\n delete n[q];\n break a\n } else n = n[q]\n } else break\n }\n }\n };\n h.error = function () {\n 1 == arguments.length || !1 !== pa(arguments[1]) ? Ea(arguments[0]) : la(3, arguments[0])\n };\n h.openurl = function () {\n var a = arguments;\n L.open(a[0], 0 < a.length ? a[1] : _[504])\n };\n h.loadscene = function () {\n var a = arguments;\n if (0 < a.length) {\n var b = a[0], c = U(_[72] + b + _[61]), d = U(_[72] + b + _[394]);\n d && (d += \";\");\n null == c ? la(3, 'loadscene() - scene \"' + b + '\" not found') : (m.xml.scene = b, m.xml.view = {}, Xa.loadxml(_[124] + c + _[117], a[1], a[2], a[3], d))\n }\n };\n h.jsget = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = a[0], c = a[1], d = null;\n try {\n (function () {\n var krpano = V.viewerlayer;\n d = eval(c)\n })()\n } catch (e) {\n la(3, \"js\" + (b ? \"get\" : \"call\") + '() - calling Javascript \"' + c + '\" failed: ' + e)\n }\n b && I(b, d, !1, h.actioncaller)\n }\n };\n h.jscall = function () {\n var a = arguments;\n 1 == a.length && h.jsget(null, a[0])\n };\n h.parseFunction = function (b) {\n var c = null;\n if (b = Gb(b, null, !0))b = b[0], a(b.args, h.actioncaller), c = [b.cmd].concat(b.args);\n return c\n };\n h.js = function (b) {\n b = \"\" + b;\n var c = Gb(b, null, !0);\n if (c) {\n c = c[0];\n a(c.args, h.actioncaller);\n var d = !1;\n if (_[11] == typeof L[c.cmd]) {\n d = !0;\n try {\n L[c.cmd].apply(L[c.cmd], c.args)\n } catch (e) {\n d = !1\n }\n }\n if (0 == d) {\n c = c.cmd + (0 < c.args.length ? \"('\" + c.args.join(\"','\") + \"');\" : \"();\");\n try {\n eval(c)\n } catch (g) {\n la(2, 'js() - calling Javascript \"' + b + '\" failed: ' + g)\n }\n }\n }\n };\n h.setfov = function () {\n var a = arguments;\n 1 == a.length && (p.fov = Number(a[0]))\n };\n h.lookat = function () {\n var a = arguments;\n if (2 <= a.length) {\n var b;\n b = Number(a[0]);\n isNaN(b) || (p.hlookat = b);\n b = Number(a[1]);\n isNaN(b) || (p.vlookat = b);\n b = Number(a[2]);\n isNaN(b) || (p.fov = b);\n b = Number(a[3]);\n isNaN(b) || (p.distortion = b);\n b = Number(a[4]);\n isNaN(b) || (p.architectural = b);\n b = Number(a[5]);\n isNaN(b) || (p.pannini = \"\" + b)\n }\n };\n h.adjusthlookat = function () {\n var a = arguments;\n 1 == a.length && (p.hlookat = nc(p.hlookat, Number(a[0])))\n };\n h.adjust360 = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = h.actioncaller;\n I(a[0], nc(U(a[0], b), Number(y(a[1], b))), !1, b)\n }\n };\n h.loop = function () {\n f(\"loop\", _[192], arguments, h.actioncaller)\n };\n h.asyncloop = function () {\n f(_[402], _[164], arguments, h.actioncaller)\n };\n h[\"for\"] = function () {\n f(\"for\", _[155], arguments, h.actioncaller)\n };\n h.asyncfor = function () {\n f(_[409], \"if('%5'!='NEXTLOOP',%1);if(%2,%4;%3;delayedcall(0,asyncfor(%1,%2,%3,%4,NEXTLOOP)););\", arguments, h.actioncaller)\n };\n h.calc = function () {\n var a, b = arguments;\n 2 == b.length && (a = v(b[1]), b[0] && I(b[0], a, !1, h.actioncaller));\n return a\n };\n h.resolvecondition = function () {\n var a = h.actioncaller, b = arguments, c = b.length, d = null, e = null, e = !1;\n if (2 == c || 3 == c) {\n d = F(b[0]);\n e = 2 == c ? b[1] : b[2];\n if (\"null\" == d || \"\" == d)d = null;\n e = null == e || \"\" == e ? !1 : v(e);\n null != d && (3 == c && (b = F(b[1]), c = pa(U(d, a)), \"and\" == b ? e = c && e : \"or\" == b ? e = c || e : \"xor\" == b && (e = !(c && e) && (c || e))), I(d, e, !1, a))\n }\n return e\n };\n h[\"if\"] = function () {\n var a = arguments, b = h.actioncaller;\n 2 <= a.length && (v(a[0]) ? h.callaction(a[1], b, !0) : 3 == a.length && h.callaction(a[2], b, !0))\n };\n h.ifnot = function () {\n var a = arguments;\n h[\"if\"](a[0], a[2], a[1])\n };\n h.stoplookto = function () {\n n(_[69])\n };\n h.lookto = function () {\n var b = arguments, d = b.length;\n if (2 <= d) {\n var e = h.actioncaller, g = new q;\n h.stopmovements();\n n(_[69]);\n g.id = _[69];\n g.actioncaller = e;\n 1 == pa(b[5]) ? (g.blocking = !1, g.donecall = b[6]) : (g.blocking = !0, h.blocked = !0);\n 4 < d && void 0 === b[4] && d--;\n 3 < d && void 0 === b[3] && d--;\n 2 < d && void 0 === b[2] && d--;\n var f = Number(b[0]), k = Number(b[1]), l = 2 < d ? Number(b[2]) : p.fov, m = 3 < d ? b[3] : null, u = 4 < d ? pa(b[4]) : !0;\n if (!(isNaN(f) || isNaN(k) || isNaN(l))) {\n var B = 1, b = 720, d = -720, t = 720, G = p.hlookat, w = G, P = p.vlookat, v = p.fov;\n if (u) {\n for (; -90 > k || 90 < k;)-90 > k ? (k = -180 - k, f += 180) : 90 < k && (k = 180 - k, f -= 180);\n for (; 0 > G;)G += 360;\n for (; 360 < G;)G -= 360;\n for (; 0 > f;)f += 360;\n for (; 360 < f;)f -= 360;\n for (; -180 > P;)P += 360;\n for (; 180 < P;)P -= 360;\n G = nc(G, f);\n P = nc(P, k);\n u = G - w;\n G -= u;\n f -= u\n }\n g.startH = G;\n g.startV = P;\n g.startF = v;\n g.destH = f;\n g.destV = k;\n g.destF = l;\n f = Math.sqrt((f - G) * (f - G) + (k - P) * (k - P) + (l - v) * (l - v));\n m && ((m = Gb(m)) && (m = m[0]), m && (k = m.cmd, l = m.args, a(l, e), _[43] == k ? (B = 0, t = 360, 1 == m.args.length && (t = parseFloat(l[0]))) : _[496] == k ? (B = 1, 0 < m.args.length && (b = parseFloat(l[0])), 1 < m.args.length && (d = parseFloat(l[1])), 2 < m.args.length && (t = parseFloat(l[2])), b = +Math.abs(b), d = -Math.abs(d), t = +Math.abs(t)) : \"tween\" == k && (B = 2, g.tweenfu = ac.getTweenfu(l[0]), g.maxruntime = parseFloat(l[1]), isNaN(g.maxruntime) && (g.maxruntime = .5))));\n g.motionmode = B;\n 0 == B ? g.maxruntime = f / t : 1 == B && (e = f, B = t * t / (2 * b), m = t / b, f = -(t * t) / (2 * d), k = -t / d, l = e - (B + f), G = l / t, 0 > G && (t = Math.sqrt(2 * e * b * d / (d - b)), B = t * t / (2 * b), m = t / b, f = -(t * t) / (2 * d), k = -t / d, G = l = 0), P = m + G + k, g.accelspeed = b, g.breakspeed = d, g.Vmax = t, g.Tmax = P, g.Smax = e, g.T1 = m, g.T2 = G, g.T3 = k, g.S1 = B, g.S2 = l, g.S3 = f, g.maxruntime = P);\n g.starttime = Ta();\n g.process = r;\n c.push(g)\n }\n }\n };\n h.looktohotspot = function () {\n var a = arguments, b = h.actioncaller, c = Ua.getItem(1 > a.length ? b ? b.name : \"\" : a[0]);\n if (c) {\n var b = c.ath, d = c.atv, e = 30, e = c.getcenter(), b = e.x, d = e.y, e = e.z, c = Number(a[1]);\n isNaN(c) || (e = c);\n c = p.fovmin;\n e < c && (e = c);\n h.lookto(b, d, e, a[2], a[3])\n }\n };\n h.moveto = function () {\n var a = arguments;\n 2 <= a.length && h.lookto(a[0], a[1], p.fov, a[2])\n };\n h.zoomto = function () {\n var a = arguments;\n 1 <= a.length && h.lookto(p.hlookat, p.vlookat, a[0], a[1])\n };\n h.getlooktodistance = function () {\n var a = arguments, b = a.length;\n if (3 <= b) {\n var c = h.actioncaller, d = Number(y(a[1], c)), e = Number(y(a[2], c)), g = p.hlookat, f = p.vlookat;\n 5 == b && (g = Number(y(a[3], c)), f = Number(y(a[4], c)));\n if (!(isNaN(d) || isNaN(e) || isNaN(g) || isNaN(f))) {\n var b = Math.PI, q = b / 180, d = b - d * q, g = b - g * q, f = f * q, e = e * q, d = Math.acos(Math.cos(f) * Math.cos(g) * Math.cos(e) * Math.cos(d) + Math.sin(f) * Math.sin(e) + Math.cos(f) * Math.sin(g) * Math.cos(e) * Math.sin(d)) / q;\n I(a[0], d, !1, c)\n }\n }\n };\n h.wait = function () {\n var a = arguments;\n if (1 == a.length) {\n var a = a[0], b = F(a);\n if (\"load\" == b || _[73] == b)a = 0; else {\n b = \"time\";\n a = Number(a);\n if (isNaN(a))return;\n 0 >= a && (b = _[73], a = 0)\n }\n var d = new q;\n d.waitfor = b;\n d.maxruntime = a;\n d.process = l;\n d.starttime = Ta();\n d.actioncaller = h.actioncaller;\n d.id = \"WAIT\" + ++z;\n d.blocking = !0;\n h.blocked = !0;\n c.push(d)\n }\n };\n h.tween = function () {\n var a = arguments, e = a.length;\n if (2 <= e) {\n var g = h.actioncaller, f = new q, k = F(a[0]);\n if (0 < k.indexOf(\"|\")) {\n var e = (\"\" + a[0]).split(\"|\"), g = (\"\" + a[1]).split(\"|\"), f = a[3] ? (\"\" + a[3]).split(\"|\") : [a[3]], l = e.length, m = g.length, r = f.length, p = parseFloat(a[2]);\n if (0 > p || isNaN(p))p = .5;\n for (k = 0; k < m; k++)g[k] = Ha(g[k]);\n for (k = 0; k < r; k++)f[k] = Ha(f[k]);\n for (k = 0; k < l; k++)h.tween(Ha(e[k]), g[k % m], p, f[k % r], k == l - 1 ? a[4] : null, k == l - 1 ? a[5] : null)\n } else {\n l = k;\n r = a[1];\n m = !1;\n g && 0 > k.indexOf(\".\") && g.hasOwnProperty(k) && (l = g._type + \"[\" + g.name + \"].\" + k, m = !0);\n 0 == m && 0 < k.indexOf(\"[\") && (l = k = b(k, g), l = l.split(_[134]).join(_[127]));\n f.id = l;\n f.varname = k;\n f.actioncaller = g;\n f.startval = m ? g[k] : U(k, g);\n if (null == f.startval || \"\" == f.startval)f.startval = 0;\n f.endval = r;\n k = 2 < e ? String(a[2]) : \"0.5\";\n if (0 < k.indexOf(\"(\") && (p = Gb(k))) {\n var B = p[0];\n _[427] == B.cmd && (p = Number(B.args[0]), k = Number(B.args[1]), r = Math.abs(parseFloat(r) - parseFloat(f.startval)), k = k * r / p)\n }\n k = parseFloat(k);\n isNaN(k) && (k = .5);\n f.maxruntime = k;\n f.tweenmap = ac.getTweenfu(3 < e ? a[3] : _[56]);\n if (4 < e)if (\"wait\" == F(a[4]))f.blocking = !0, h.blocked = !0; else if (r = a[4])0 == m && 0 < r.indexOf(\"[\") && (r = b(r, g)), f.donecall = r;\n 5 < e && (f.updatefu = a[5]);\n f.starttime = Ta();\n f.process = u;\n n(l);\n c.push(f)\n }\n }\n };\n h.stoptween = function () {\n var a = h.actioncaller, c = arguments, e = c.length, g;\n for (g = 0; g < e; g++) {\n var f = F(c[g]);\n if (0 < f.indexOf(\"|\"))h.stoptween.apply(h.stoptween, f.split(\"|\")); else {\n if (a && 0 > f.indexOf(\".\")) {\n if (n(a._type + \"[\" + a.name + \"].\" + f))continue\n } else 0 < f.indexOf(\"[\") && (f = b(f, a)), f = f.split(_[134]).join(_[127]);\n n(f)\n }\n }\n };\n h.invalidatescreen = function () {\n Kb = Ta();\n p.haschanged = !0\n };\n h.updatescreen = function () {\n p.haschanged = !0\n };\n h.updateobject = function () {\n M && M.updateFOV && M.updateFOV(M, [Number(N.hfov), Number(N.vfov), Number(N.voffset)]);\n p.haschanged = !0\n };\n h.loadpano = function (a, b, c, d, e) {\n m.xml.scene = null;\n m.xml.view = {};\n Xa.loadpano(a, b, c, d, e)\n };\n h.loadpanoscene = function (a, b, c, d, e, h) {\n m.xml.scene = b;\n m.xml.view = {};\n m._loadpanoscene_name = b;\n Xa.loadpano(a, c, d, e, h)\n };\n h.loadxml = function (a, b, c, d, e) {\n m.xml.scene = null;\n m.xml.view = {};\n Xa.loadxml(a, b, c, d, e)\n };\n h.fscommand = function () {\n };\n h.freezeview = function () {\n };\n h.reloadpano = function () {\n };\n h.addlensflare = function () {\n };\n h.removelensflare = function () {\n };\n h.SAcall = function (a) {\n var b = U(_[14]);\n if ((a = Gb(a)) && b) {\n var c, d;\n d = a.length;\n for (c = 0; c < d; c++) {\n var e = a[c];\n if (e) {\n var g = e.cmd, f = b.getItem(g);\n f && 1 == pa(f.secure) ? (e = e.args, e.splice(0, 0, g), h.callaction(E(f.content, e))) : la(2, _[428] + g + _[282])\n }\n }\n }\n }\n })();\n var V = {};\n (function () {\n function a(a) {\n a = _[189] + a;\n L.console ? L.console.log(a) : alert(a)\n }\n\n function d(a, b, c, d, e, h) {\n var g = Ja(), f = g.style;\n f.position = _[0];\n \"LT\" == a ? (f.left = b, f.top = c) : (f.left = b, f.bottom = c);\n f.width = d;\n f.height = e;\n f.overflow = _[6];\n !1 === h && (f.webkitUserSelect = f.MozUserSelect = f.msUserSelect = f.oUserSelect = f.userSelect = \"none\");\n return g\n }\n\n function p(a) {\n if (r.fullscreen = a)L.activekrpanowindow = c.id;\n Ka(1 == a ? _[221] : _[225])\n }\n\n function f(a) {\n l && (Aa(a), r.onResize(a), setTimeout(e, 250))\n }\n\n function g(a, b) {\n for (var c = a.style, d = b.length, e = 0, e = 0; e < d; e += 2)c[b[e]] = b[e + 1]\n }\n\n function n(a) {\n p(!!(aa.fullscreenElement || aa.mozFullScreenElement || aa.webkitIsFullScreen || aa.webkitFullscreenElement || aa.msFullscreenElement))\n }\n\n function k(a) {\n if (l) {\n a = L.innerHeight;\n var b = vb;\n a < b ? r.__scrollpage_yet = !0 : r.__scrollpage_yet && (r.__scrollpage_yet = !1, e());\n if (a != b)r.onResize(null)\n }\n }\n\n function e() {\n var a = L.innerWidth, c = L.innerHeight;\n r.__scrollpage_yet && c == vb && (r.__scrollpage_yet = !1);\n var d = screen.height - 64, e = 268;\n 26 <= b.crios && (d += 44, e = 300);\n (320 == a && c != d || a == screen.height && c != e) && L.scrollTo(0, 0)\n }\n\n function w() {\n if (8 == b.iosversion && b.ipad) {\n var a = screen.width, d = screen.height, e = L.innerWidth, f = L.innerHeight, g = c.clientHeight;\n if (Math.min(e, f) == Math.min(a, d) && Math.max(e, f) == Math.max(a, d) || g > f)qa ^= 1, L.scrollTo(0, qa), setTimeout(w, 60)\n }\n }\n\n function x(a, b) {\n Aa(a);\n var c = \"none\" == D.style.display ? \"\" : \"none\";\n void 0 !== b && (c = 1 == b ? \"\" : \"none\");\n D.style.display = c;\n z.scrollTop = z.scrollHeight\n }\n\n function v() {\n Ca && (K.removeChild(Ca), Ca = null);\n var a, c = Ja();\n a = 25;\n b.androidstock && (a *= b.pixelratio);\n g(c, [_[65], _[0], \"left\", \"50%\", \"top\", \"50%\", _[47], _[40], _[120], a + \"px\", _[51], \"none\", _[148], _[5], _[267], \"none\"]);\n a = c.style;\n a.zIndex = 999999;\n a.opacity = .67;\n a = Ja();\n g(a, \"position;relative;left;-50%;top;-25px;fontFamily;sans-serif;textShadow;#000000 1px 1px 2px;lineHeight;110%\".split(\";\"));\n a.innerHTML = _[433] + (Na && Na[1] && 6 < Ha(Na[1], !1).length ? Na[1] : _[169]) + _[375];\n c.appendChild(a);\n K.appendChild(c);\n Ca = c\n }\n\n var r = V;\n r.fullscreen = !1;\n var y = !0, l = !1, u = !1;\n r.__scrollpage_yet = !1;\n var h = null, c = null, K = null;\n r.htmltarget = null;\n r.viewerlayer = null;\n r.controllayer = null;\n r.panolayer = null;\n r.pluginlayer = null;\n r.hotspotlayer = null;\n var D = r.svglayer = null, z = null, q = null, J = null, C = 0, Q = 0, A = !1, H = !1;\n r.build = function (e) {\n function h(a) {\n x(null, !1)\n }\n\n var l = e.target, t = e.id, G = aa.getElementById(l);\n if (!G)return a(_[172] + l), !1;\n for (var l = null, p = t, C = 1; ;)if (l = aa.getElementById(t))if (_[254] == p)C++, t = p + C; else return a(_[165] + t), !1; else break;\n l = Ja();\n l.id = t;\n l.style.position = _[119];\n l.style.overflow = _[6];\n l.style.lineHeight = _[45];\n l.style.fontWeight = _[45];\n l.style.fontStyle = _[45];\n l.tabIndex = -1;\n l.style.outline = 0;\n t = _[26];\n e.bgcolor && (t = e.bgcolor);\n e = F(e.wmode);\n if (_[36] == e || _[142] == e)t = null, m.bgcolor = 4278190080;\n null != t && (l.style.background = t, m.bgcolor = parseInt(t.slice(1), 16));\n G.appendChild(l);\n c = l;\n r.htmltarget = G;\n r.viewerlayer = l;\n K = d(\"LT\", 0, 0, \"100%\", \"100%\", !1);\n g(K, \"msTouchAction none touchAction none msContentZooming none contentZooming none -webkit-tap-highlight-color transparent\".split(\" \"));\n r.controllayer = K;\n t = d(\"LT\", 0, 0, \"100%\", \"100%\");\n r.panolayer = t;\n g(t, [_[258], \"none\"]);\n G = d(\"LT\", 0, 0, \"100%\", \"100%\", !1);\n 0 == b.ie && 0 == b.firefox && g(G, [Id, _[59]]);\n e = G;\n b.android && b.firefox && Kc && (p = d(\"LT\", 0, 0, \"1px\", \"1px\"), p.style.background = _[226], p.style.pointerEvents = \"none\", p.style.zIndex = 999999999, p.style[ib] = _[20], G.appendChild(p));\n var p = b.androidstock ? b.pixelratio : 1, C = 156 * p, u = (b.mobile ? 8 : 13) * p, w = b.androidstock || b.android && b.chrome ? 6 : 8;\n D = d(\"LB\", 0, 0, \"100%\", C + \"px\", !0);\n D.style.display = \"none\";\n !0 !== b.opera && Kc && (2 > Nb && (D.style[ib] = _[20]), b.ios && 0 == b.simulator || b.android && b.chrome) && (D.style[ib] = _[20]);\n D.style.zIndex = 999999999;\n var A = d(\"LT\", 0, 0, \"100%\", \"100%\", !0);\n A.style.opacity = .67;\n b.android && b.opera && (A.style.borderTop = _[179]);\n g(A, [_[255], _[26], pc, _[441] + w + _[373], _[114], w + \"px\", _[482], .67]);\n z = aa.createElement(\"pre\");\n w = null;\n b.mac && (w = _[270] + (L.chrome ? \"1px\" : \"0\"));\n b.realDesktop ? (z.style.fontFamily = _[55], z.style.fontSize = \"11px\", w && (z.style.fontSize = \"13px\", z.style.textShadow = w)) : (z.style.fontFamily = _[38], z.style.fontSize = u + \"px\");\n g(z, [_[65], _[0], \"left\", \"5px\", \"top\", \"0px\", _[50], \"left\", _[329], 0, _[296], b.realDesktop ? \"16px\" : 0, _[346], 0, _[286], 0, _[107], \"none\", _[71], 0, _[114], (b.realDesktop ? 10 : 8) + \"px\", _[49], \"100%\", _[28], C - 10 + \"px\", _[421], \"auto\", _[210], \"none\", _[471], \"block\", _[395], \"left\", _[338], _[411], _[51], \"none\", _[47], _[40]]);\n q = Ja();\n w && (q.style.textShadow = w);\n g(q, [_[65], _[0], _[3], 0, _[2], 0, _[132], \"0 4px\", _[28], C - 10 + \"px\", _[230], \"none\", _[279], \"none\", _[148], _[18], _[76], _[36], _[347], b.realDesktop ? _[55] : _[38], _[120], (b.realDesktop ? 10 : 9 * p | 0) + \"px\", _[47], _[40]]);\n q.innerHTML = \"CLOSE\";\n R(q, _[115], Aa, !0);\n R(q, _[118], h, !0);\n R(q, _[7], h, !0);\n D.appendChild(A);\n D.appendChild(z);\n D.appendChild(q);\n l.appendChild(K);\n K.appendChild(t);\n 0 < b.iosversion && 5 > b.iosversion && (e = Ja(), e.style.position = _[0], G.appendChild(e), K.style.webkitTransformStyle = _[59], G.style.webkitTransformStyle = \"flat\");\n K.appendChild(G);\n b.ios && (t = Ja(), t.style.position = _[0], t.style.webkitTransformStyle = _[59], e.appendChild(t));\n l.appendChild(D);\n r.pluginlayer = G;\n r.hotspotlayer = e;\n b.fullscreensupport && R(aa, b.browser.events.fullscreenchange, n);\n J = [l.style.width, l.style.height];\n r.onResize(null);\n R(L, _[137], r.onResize, !1);\n b.iphone && b.safari && R(L, _[133], k, !1);\n R(L, _[84], f, !1);\n return !0\n };\n r.setFullscreen = function (a) {\n if (b.fullscreensupport)if (a)c[b.browser.events.requestfullscreen](); else try {\n aa.exitFullscreen ? aa.exitFullscreen() : aa.mozCancelFullScreen ? aa.mozCancelFullScreen() : aa.webkitCancelFullScreen ? aa.webkitCancelFullScreen() : aa.webkitExitFullscreen ? aa.webkitExitFullscreen() : aa.msExitFullscreen && aa.msExitFullscreen()\n } catch (d) {\n } else {\n var e = aa.body, f = e.style, h = c.style;\n if (a)r.fsbkup = [f.padding, f.margin, f.overflow, e.scrollTop, e.scrollLeft, L.pageYOffset], f.padding = \"0 0\", f.margin = \"0 0\", f.overflow = _[6], e.scrollTop = \"0\", e.scrollLeft = \"0\", e.appendChild(c), h.position = _[0], h.left = 0, h.top = 0, h.width = \"100%\", h.height = \"100%\", Pa.domUpdate(), L.scrollTo(0, 0), p(!0); else if (a = r.fsbkup)r.htmltarget.appendChild(c), f.padding = a[0], f.margin = a[1], f.overflow = a[2], e.scrollTop = a[3], e.scrollLeft = a[4], h.position = _[119], Pa.domUpdate(), L.scrollTo(0, a[5]), r.fsbkup = null, p(!1)\n }\n };\n var qa = 0;\n r.onResize = function (a, d) {\n A = d;\n Aa(a);\n var f = c, g = \"100%\", k = \"100%\";\n null == J && (J = [f.style.width, f.style.height]);\n J && (g = J[0], k = J[1], \"\" == g && (g = \"100%\"), \"\" == k && (k = \"100%\"), J = null);\n var q = Jb.so;\n q && (q.width && (g = q.width), q.height && (k = q.height));\n r.fullscreen && (g = k = \"100%\");\n var n = f.parentNode, m = 0, p = f;\n do if (m = p.offsetHeight, b.ie && r.fullscreen && 20 > m && (m = 0), 1 >= m) {\n if (p = p.parentNode, null == p) {\n m = L.innerHeight;\n break\n }\n } else break; while (1);\n q = 0;\n for (p = f; p && \"body\" != F(p.nodeName);)q++, p = p.parentNode;\n var n = n ? n.offsetHeight : L.innerHeight, C = f.clientWidth, p = g, f = k;\n 0 < String(g).indexOf(\"%\") ? g = parseFloat(g) * C / 100 : (g = parseFloat(g), p = g + \"px\");\n 0 < String(k).indexOf(\"%\") ? k = parseFloat(k) * m / 100 : (k = parseFloat(k), f = k + \"px\");\n 1 > k && (k = 100);\n m = screen.width;\n C = screen.height;\n b.iphone && 320 == m && 4 > b.iosversion && 480 > C && (C = 480);\n var v = L.innerWidth, x = L.innerHeight;\n b.ios && 2 >= q && 0 == r.fullscreen && (26 <= b.crios && n > x && (x = k = n), w(), 7 <= b.iosversion && k > x && (k = x, l = u = !0, setTimeout(e, 10)));\n y && (y = !1, b.iphone ? (320 == v && x >= C - 124 ? x = C - 124 : v == C && 208 <= x && (x = 208), 2 >= q && (v == g && x && (320 == g && k == C - 124 || g == C && (208 == k || 320 == k)) && (l = !0), 26 <= b.crios && (320 == g || g == C) && (l = !0))) : b.ipad && 28 <= b.crios && 2 >= q && (g > k != m > C && (q = m, m = C, C = q), g == m && k == C - 20 && (u = l = !0)));\n l && (u ? (g = v, k = x) : 320 == L.innerWidth ? (g = 320, k = C - 64, b.crios && (k += 44)) : (g = C, k = 320 == L.innerHeight ? 320 : 268, 26 <= b.crios && (k = 300)), p = g + \"px\", f = k + \"px\");\n b.getViewportScale();\n q = p;\n Pa && Pa.focusLoss();\n l && null == h && (h = setInterval(e, 4E3), setTimeout(e, 250));\n n = !1;\n if (bc != g || vb != k || A)n = !0, A = !1, bc = g, vb = k;\n Ra && (Ra._pxw = Ra.pixelwidth = Ra.imagewidth = bc / X, Ra._pxh = Ra.pixelheight = Ra.imageheight = vb / X);\n Za && (Za._pxw = Za.pixelwidth = Za.imagewidth = bc / X, Za._pxh = Za.pixelheight = Za.imageheight = vb / X);\n n && (pb && pb.calc(bc, vb), Ka(_[63]), n = !1);\n pb ? (n |= pb.calc(bc, vb), K.style.left = pb.pixelx * X + \"px\", K.style.top = pb.pixely * X + \"px\", K.style.width = Qa + \"px\", K.style.height = ya + \"px\", g = Qa, k = ya) : (Qa = bc, ya = vb);\n uc = Math.max(4 * k / 3, g);\n c.style.width = q;\n c.style.height = f;\n b.desktop && (q = L.devicePixelRatio, isNaN(q) || (b.pixelratio = q, b.fractionalscaling = 0 != q % 1));\n Oa.size(g, k);\n H = !0;\n n && Ka(_[63]);\n Xa.updateview(!1, !0);\n r.resizeCheck(!0);\n A = !1\n };\n r.resizeCheck = function (a) {\n var b = !1, d = c, e = d.clientWidth, d = d.clientHeight;\n if (e != C || d != Q || a || pb && pb.haschanged)if (C = e, Q = d, b = !0, 1 == a)b = !1; else r.onResize(null);\n H && !0 !== a && (b = !0, H = !1);\n 255 == (jc & 511) && 0 == (Ya & 1) && v();\n return b\n };\n var ea = \"\";\n r.log = function (a) {\n if (\"cls\" == a)z.innerHTML = \"\"; else if (\"d\" == a)v(); else {\n var c = 4 > b.firefoxversion ? 4096 : 1E4, d = a.slice(0, 6);\n _[140] == d || _[135] == d ? (c = _[200] + (69 == d.charCodeAt(0) ? \"F\" : \"0\") + _[416] + a + _[417], ea += c + \"\\n\", z.innerHTML += \"\\n\" + c) : (ea += a + \"\\n\", ea.length > c ? (ea = ea.slice(-c / 2, -1), z.innerHTML = ea) : z.lastChild ? z.lastChild.nodeValue += \"\\n\" + a : z.innerHTML += a);\n z.scrollTop = z.scrollHeight;\n Jb.so.vars && pa(Jb.so.vars.consolelog) && (c = L.console) && c.log && (b.firefox || b.chrome ? c.log(\"%c\" + a, _[135] == d ? _[259] : _[140] == d ? _[178] : _[420] == d ? _[257] : _[262]) : c.log(a))\n }\n };\n r.showlog = function (a) {\n x(null, a)\n };\n r.togglelog = x;\n r.getMousePos = function (a, b) {\n var c;\n c = {};\n var d = b ? b : K, e = d.getBoundingClientRect();\n c.x = Math.round(a.clientX - e.left - d.clientLeft + d.scrollLeft);\n c.y = Math.round(a.clientY - e.top - d.clientTop + d.scrollTop);\n return c\n };\n r.remove = function () {\n null != h && (clearInterval(h), h = null);\n try {\n ba(L, _[137], r.onResize, !1), b.iphone && b.safari && ba(L, _[133], k, !1), ba(L, _[84], f, !1), b.fullscreensupport && ba(aa, b.browser.events.fullscreenchange, n), r.htmltarget.removeChild(c), r.htmltarget = null, r.viewerlayer = null, r.controllayer = null, r.panolayer = null, r.pluginlayer = null, K = c = q = z = D = r.hotspotlayer = null\n } catch (a) {\n }\n };\n var Ca = null\n })();\n var Pa = {};\n (function () {\n function a(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n a = a.changedTouches ? a.changedTouches : [a];\n var b = a.length, c, d, e;\n for (c = 0; c < b; c++)if (d = a[c], e = d.pointerId ? d.pointerId : d.identifier, void 0 !== e) {\n d = wa(d);\n d = {id: e, lx: d.x / X, ly: d.y / X};\n var f, g;\n g = ka.length;\n for (f = 0; f < g; f++)if (ka[f].id == e) {\n ka[f] = d;\n return\n }\n ka.push(d)\n }\n }\n }\n\n function d(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n a = a.changedTouches ? a.changedTouches : [a];\n var b = a.length, c, d;\n for (c = 0; c < b; c++)if (d = a[c], d = d.pointerId ? d.pointerId : d.identifier, void 0 !== d) {\n var e, f;\n f = ka.length;\n for (e = 0; e < f; e++)if (ka[e].id == d) {\n ka.splice(e, 1);\n break\n }\n }\n }\n }\n\n function E() {\n var a = F(ia.usercontrol);\n return _[19] == a || \"all\" == a\n }\n\n function f(a) {\n return a && (a = a.pointerType, 4 == a || _[19] == a) ? !0 : !1\n }\n\n function g(a, b, c, d) {\n for (var e = jc; 0 < wb.length && !(c - wb[0].t <= Sa) && !(1 >= e - wb[0].f);)wb.shift();\n e = wb.length - 1;\n 0 <= e && a == wb[e].x && b == wb[e].y ? wb[e].t = c : wb.push({x: a, y: b, t: c, f: d})\n }\n\n function n(a, b, c, d) {\n b = p.inverseProject(a, b);\n var e = p.inverseProject(c, d);\n d = (Math.atan2(e.z, e.x) - Math.atan2(b.z, b.x)) / Y;\n b = -(Math.atan2(b.y, Math.sqrt(b.x * b.x + b.z * b.z)) - Math.atan2(e.y, Math.sqrt(e.x * e.x + e.z * e.z))) / Y;\n -180 > d ? d += 360 : 180 < d && (d -= 360);\n if (c < a && 0 > d || c > a && 0 < d)d = -d;\n return {h: d, v: b}\n }\n\n function k(a, b, c, d) {\n E() ? (a = n(a, b, c, d), ga = !1, ca = a.h, oa = a.v, a = p.hlookat + ca, b = p.vlookat + oa, T += ca, ya += oa, c = p._limits, ia.bouncinglimits && c && (360 > c[0] && (a < c[1] ? (Na = !0, a = .5 * T + .5 * c[1]) : a > c[2] && (Na = !0, a = .5 * T + .5 * c[2])), b < c[4] ? (Na = !0, b = .5 * ya + .5 * c[4]) : b > c[5] && (Na = !0, b = .5 * ya + .5 * c[5])), p.hlookat = a, p.vlookat = b, Xa.updateview(), p.haschanged = !0) : oa = ca = 0\n }\n\n function e(a) {\n (aa.hidden || aa.webkitHidden || aa.mozHidden || aa.msHidden) && w(a)\n }\n\n function w(a) {\n K();\n a && (_[64] == a.type && !1 === a.persisted && (jd = !0), O.down && C(a));\n for (var b in N)1 == N[b] && (m.keycode = b, Ka(_[130]), N[b] = !1);\n m.keycode = 0;\n x()\n }\n\n function x() {\n m.hlookat_moveforce = m.vlookat_moveforce = m.fov_moveforce = 0;\n Oa = sa = ga = !1;\n Ga = za = Qa = La = ca = oa = Ea = Ua = Ra = Bb = 0\n }\n\n function v(a) {\n var c = 0;\n if (1 != ia.disablewheel && (Aa(a), cb = Ta(), E())) {\n a.wheelDelta ? c = a.wheelDelta / -120 : a.detail && (c = a.detail, 0 == b.mac && (c /= 3));\n var d = c * ia.mousefovchange;\n ia.zoomtocursor ? (Ma = !0, u(a), Ha = O.x, va = O.y, 0 < d && 0 == ia.zoomoutcursor && (Ma = !1)) : Ma = !1;\n Oa = !0;\n ha = 0;\n Ga += .001 * d;\n m.wheeldelta_raw = -c;\n m.wheeldelta = 3 * -c;\n Ka(_[100])\n }\n }\n\n function r(a) {\n var c = V.viewerlayer;\n aa.activeElement == c != 0 && L.activekrpanowindow == c.id && (c = a.keyCode, 0 == (a.altKey || a.ctrlKey || a.shiftKey || 32 > c || 111 < c && 124 > c) && Aa(a), m.keycode = c, N[c] = !0, Ka(_[384]), 79 != c || !m.logkey && Ya & 1 || V.togglelog(), l(c, 1), 27 == c && (K(), V.fullscreen && (V.fsbkup || b.opera) && V.setFullscreen(!1)))\n }\n\n function y(a) {\n var b = V.viewerlayer;\n aa.activeElement == b != 0 && L.activekrpanowindow == b.id && (a = a.keyCode, m.keycode = a, N[a] = !1, Ka(_[130]), l(a, 0))\n }\n\n function l(a, b) {\n var c = F(ia.usercontrol);\n if (\"all\" == c || \"keyb\" == c)a = \",\" + a + \",\", 0 <= (\",\" + ia.keycodesin + \",\").indexOf(a) ? m.fov_moveforce = -b : 0 <= (\",\" + ia.keycodesout + \",\").indexOf(a) ? m.fov_moveforce = +b : 0 <= (\",\" + ia.keycodesleft + \",\").indexOf(a) ? m.hlookat_moveforce = -b : 0 <= (\",\" + ia.keycodesright + \",\").indexOf(a) ? m.hlookat_moveforce = +b : 0 <= (\",\" + ia.keycodesup + \",\").indexOf(a) ? m.vlookat_moveforce = ia.keybinvert ? +b : -b : 0 <= (\",\" + ia.keycodesdown + \",\").indexOf(a) && (m.vlookat_moveforce = ia.keybinvert ? -b : +b)\n }\n\n function u(a) {\n cb = Ta();\n a = wa(a);\n O.x = a.x / X;\n O.y = a.y / X;\n O.moved = !0\n }\n\n function h(a) {\n cb = Ta();\n var d, e, g = a.changedTouches ? a.changedTouches : [a];\n e = g.length;\n var h = F(a.type), k = 0 <= h.indexOf(\"start\") || 0 <= h.indexOf(\"down\");\n -99 != fa && k && (ra = !0);\n for (d = 0; d < e; d++) {\n var h = g[d], q = h.pointerId ? h.pointerId : h.identifier;\n -99 == fa && k && (fa = q);\n if (fa == q) {\n e = wa(h);\n O.x = e.x / X;\n O.y = e.y / X;\n O.moved = !0;\n 0 == (Ya & 16) && (0 == b.realDesktop || 10 <= b.ieversion && !f(a)) && O.x > bc / X - 22 && O.y > vb / X - 32 && a.type == ta.touchstart && (U = h.pageY, R(W, ta.touchend, c, !0));\n break\n }\n }\n }\n\n function c(a) {\n a = a.changedTouches ? a.changedTouches : [a];\n ba(W, ta.touchend, c, !0);\n -120 > a[0].pageY - U && V.showlog(!0)\n }\n\n function K() {\n if (Za) {\n try {\n W.removeChild(Za), W.removeChild(bb)\n } catch (a) {\n }\n bb = Za = null\n }\n }\n\n function D(a) {\n if (Za)K(); else {\n Aa(a);\n a.stopPropagation();\n var c = wa(a.changedTouches ? a.changedTouches[0] : a);\n Za = De(c.x, c.y, K, 0 <= F(a.type).indexOf(\"touch\"));\n null != Za && (bb = Ja(), a = bb.style, a.position = _[0], b.androidstock || (a.zIndex = 99999999998, a[ib] = _[20]), a.width = \"100%\", a.height = \"100%\", W.appendChild(bb), W.appendChild(Za))\n }\n }\n\n function z(a, c) {\n var d = a.timeStamp | 0;\n 500 < d && 500 > d - kc ? kc = 0 : (L.activekrpanowindow = V.viewerlayer.id, V.viewerlayer.focus(), cb = Ta(), Aa(a), da.isblocked() || 0 != (a.button | 0) || (K(), 1 != c ? (R(L, _[10], q, !0), R(L, _[4], J, !0), b.topAccess && R(top, _[4], C, !0)) : R(b.topAccess ? top : L, ta.touchend, Ca, !0), d = wa(a), ab = d.x, $a = d.y, kb = a.timeStamp, T = p.hlookat, ya = p.vlookat, xa = 0, O.down = !0, O.up = !1, O.moved = !1, O.downx = O.x = d.x / X, O.downy = O.y = d.y / X, ae.update(), Ka(_[103])))\n }\n\n function q(a) {\n Aa(a);\n var b = wa(a);\n O.x = b.x / X;\n O.y = b.y / X;\n O.moved = !0;\n if (_[27] == F(ia.mousetype)) {\n sa = !0;\n var c = n(ab, $a, b.x, b.y).h;\n xa += c\n } else k(ab, $a, b.x, b.y);\n ab = b.x;\n $a = b.y;\n kb = a.timeStamp;\n (0 === a.buttons || void 0 === a.buttons && 0 === a.which) && J(a, !0)\n }\n\n function J(a, c) {\n cb = Ta();\n Aa(a);\n ba(L, _[10], q, !0);\n ba(L, _[4], J, !0);\n b.topAccess && ba(top, _[4], C, !0);\n ga = !0;\n O.down = !1;\n ae.update();\n 0 == O.up && (O.up = !0, Ka(_[113]), !0 !== c && (0 == O.moved || 5 > Math.abs(O.x - O.downx) && 5 > Math.abs(O.y - O.downy)) && Ka(_[131]))\n }\n\n function C(a) {\n J(a, !0)\n }\n\n function Q(a) {\n 1 == m.control.preventTouchEvents && Aa(a)\n }\n\n function A(a) {\n Ia && (xb++, 2 == xb && (qd = 1), Pb.addPointer(a.pointerId), W.setPointerCapture ? W.setPointerCapture(a.pointerId) : W.msSetPointerCapture && W.msSetPointerCapture(a.pointerId))\n }\n\n function H(a) {\n xb--;\n 0 > xb && (xb = 0);\n return 2 > xb && Da ? (t(a), !0) : !1\n }\n\n function qa(c) {\n kc = c.timeStamp | 0;\n Sa = b.ios ? 100 : 49 > nd ? 200 : 100;\n a(c);\n if (ua) {\n if (0 == m.control.preventTouchEvents)return;\n if (f(c)) {\n c.currentPoint && c.currentPoint.properties && 0 == c.currentPoint.properties.isLeftButtonPressed && (c.button = 0);\n kc = 0;\n z(c, !0);\n return\n }\n A(c)\n }\n L.activekrpanowindow = V.viewerlayer.id;\n cb = Ta();\n 0 == V.__scrollpage_yet && Q(c);\n K();\n if (!(Da || 0 == Va && 1 < ka.length || da.isblocked())) {\n var d = c.changedTouches ? c.changedTouches[0] : c, e = wa(d);\n la = d.pointerId ? d.pointerId : d.identifier;\n ab = e.x;\n $a = e.y;\n kb = c.timeStamp;\n wb = [];\n T = p.hlookat;\n ya = p.vlookat;\n xa = 0;\n O.down = !0;\n O.up = !1;\n O.moved = !1;\n O.downx = O.x = e.x / X;\n O.downy = O.y = e.y / X;\n Fa = {t: kc};\n Ka(_[103])\n }\n }\n\n function ea(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n var b = a.changedTouches ? a.changedTouches : [a], c = b.length, d, e, h;\n for (d = 0; d < c; d++)if (e = b[d], h = e.pointerId ? e.pointerId : e.identifier, void 0 !== h) {\n var t, l;\n l = ka.length;\n for (t = 0; t < l; t++)if (ka[t].id == h) {\n e = wa(e);\n h = e.y / X;\n t = ka[t];\n t.lx = e.x / X;\n t.ly = h;\n break\n }\n }\n }\n if (ua) {\n if (f(a)) {\n O.down && q(a);\n return\n }\n if (1 < xb)return\n }\n if ((b = E()) && 0 == Va && 1 < ka.length) {\n var m;\n l = e = ka[0].lx;\n m = h = ka[0].ly;\n t = ka.length;\n for (d = 1; d < t; d++)b = ka[d].lx, c = ka[d].ly, b < e && (e = b), b > l && (l = b), c < h && (h = c), c > m && (m = c);\n b = l - e;\n c = m - h;\n b = Math.sqrt(b * b + c * c);\n 1 > b && (b = 1);\n 0 == M ? (M = !0, I = b, Z(a)) : B(a, b / I)\n } else cb = Ta(), 0 == V.__scrollpage_yet && Q(a), Da || 0 == b || (b = a.changedTouches ? a.changedTouches[0] : a, la == (b.pointerId ? b.pointerId : b.identifier) && (b = wa(b), _[27] == F(ia.touchtype) ? (sa = !0, c = n(ab, $a, b.x, b.y).h, -180 > c ? c = 360 + c : 180 < c && (c = -360 + c), xa += c) : k(ab, $a, b.x, b.y), ab = b.x, $a = b.y, kb = a.timeStamp, g(ab, $a, kb, jc), -99 == fa && (O.x = b.x / X, O.y = b.y / X), Fa && 16 < O.dd && (Fa = null), Aa(a)))\n }\n\n function Ca(a) {\n d(a);\n fa = -99;\n ra = !1;\n if (ua) {\n ba(b.topAccess ? top : L, ta.touchend, Ca, !0);\n if (H(a))return;\n if (f(a)) {\n J(a);\n return\n }\n }\n M && (t(a), M = !1);\n 0 == V.__scrollpage_yet && Q(a);\n if (Da)la = -99; else {\n var c = a.changedTouches ? a.changedTouches[0] : a;\n if (la == (c.pointerId ? c.pointerId : c.identifier)) {\n la = -99;\n c = wa(c);\n O.x = c.x / X;\n O.y = c.y / X;\n ab = c.x;\n $a = c.y;\n kb = a.timeStamp;\n g(ab, $a, kb, jc);\n if (_[27] != F(ia.touchtype))if (E() && 1 < wb.length) {\n var e = wb[0], h = wb[wb.length - 1], c = (h.t - e.t) / 15;\n 0 < c && (e = n(e.x, e.y, h.x, h.y), ga = !0, ca = e.h / c, oa = e.v / c)\n } else ga = !1, oa = ca = 0;\n O.down = !1;\n 0 == O.up && (O.up = !0, Fa && (c = 52800 / (Math.min(Math.max(ja.currentfps, 10), 60) + 35), 32 > O.dd && (a.timeStamp | 0) - Fa.t > c && D(a)), Ka(_[113]), (0 == O.moved || 5 > Math.abs(O.x - O.downx) && 5 > Math.abs(O.y - O.downy)) && Ka(_[131]));\n Fa = null\n }\n }\n }\n\n function S(a) {\n d(a);\n M = !1;\n fa = la = -99;\n Da = !1;\n xb = 0;\n Fa = null\n }\n\n function Z(a) {\n 0 == m.control.preventTouchEvents || Ia && 2 > xb || (Aa(a), Da = !0, Fa = null, pa = p.fov, la = -99, O.down = !1)\n }\n\n function B(a, b) {\n if (0 != m.control.preventTouchEvents) {\n var c = void 0 !== b ? b : a.scale;\n if (Ia) {\n if (2 > xb)return;\n 0 == Da && Z(a);\n c = qd *= c\n }\n Aa(a);\n cb = Ta();\n if (E()) {\n oa = ca = 0;\n var d = 2 / Y, e = 1 / Math.tan(pa / d), d = Math.atan(1 / (e * c)) * d, e = d > p.fov ? -3 : 3;\n m.wheeldelta = e;\n m.wheeldelta_raw = e / 3;\n m.wheeldelta_touchscale = c;\n 0 == ia.touchzoom && (d = p.fov);\n ia.bouncinglimits && (d < p.fovmin ? (d = G(d), c = G(p.fovmin), Ga = .5 * -(d - c), Oa = !0, ha = 1, d += Ga, Ga = 1E-9, d = Ba(d)) : d > p.fovmax && (d = G(d), c = G(p.fovmax), Ga = .75 * -(d - c), Oa = !0, ha = 1, d += Ga, Ga = 1E-9, d = Ba(d)));\n if (ia.zoomtocursor && (0 < e || 1 == ia.zoomoutcursor)) {\n if (e = ka.length, 0 < e) {\n Ma = !0;\n for (c = va = Ha = 0; c < e; c++) {\n var f = ka[c];\n Ha += f.lx;\n va += f.ly\n }\n Ha /= e;\n va /= e;\n p.updateView();\n e = p.screentosphere(Ha, va);\n p.fov = d;\n p.updateView();\n c = p.screentosphere(Ha, va);\n d = p.hlookat + (e.x - c.x);\n e = p.vlookat + (e.y - c.y);\n if (c = p._limits)360 > c[0] && (d < c[1] ? d = c[1] : d > c[2] && (d = c[2])), e < c[4] ? e = c[4] : e > c[5] && (e = c[5]);\n p.hlookat = d;\n p.vlookat = e\n }\n } else p.fov = d, p.updateView();\n Ka(_[100]);\n p.haschanged = !0\n }\n }\n }\n\n function t(a) {\n 0 != m.control.preventTouchEvents && (Da && (Da = !1), ra = !1, ka = [], Aa(a))\n }\n\n function G(a) {\n return pb * Math.log(1 / Math.tan(.5 * a * Y))\n }\n\n function Ba(a) {\n return 2 * Math.atan(1 / Math.exp(a / pb)) / Y\n }\n\n var P = Pa;\n P.mouse = !1;\n P.touch = !1;\n var Fa = null, wa = null, ta = null, W = null, N = [], Da = !1, U = 0, Va = !1, M = !1, I = 1, pa = 90, la = -99, T = 0, ya = 0, ab = 0, $a = 0, kb = 0, wb = [], fa = -99, ra = !1, Sa = 100, ka = [], ua = !1, Ia = !1, Pb = null, xb = 0, qd = 1, ga = !1, ca = 0, oa = 0, sa = !1, Qa = 0, La = 0, za = 0, xa = 0, Oa = !1, Ga = 0, ha = 0, Ma = !1, Ha = 0, va = 0, Ea = 0, Ua = 0, Na = !1, Ra = 0, Bb = 0, Za = null, bb = null;\n P.registerControls = function (a) {\n W = a;\n ta = b.browser.events;\n wa = V.getMousePos;\n b.ie && (Ia = (ua = jb.msPointerEnabled || jb.pointerEnabled) && (1 < jb.msMaxTouchPoints || 1 < jb.maxTouchPoints));\n Va = Ia || 0 == b.simulator && b.ios || void 0 !== aa.documentElement.ongesturestart;\n if (b.chrome || b.android)Va = !1;\n a = !(0 == b.simulator && b.ios || b.android || 10 <= b.ieversion && b.touchdeviceNS);\n var c = b.touchdeviceNS;\n c && (b.mobile || b.tablet) && 0 == b.simulator && (a = !1);\n P.mouse = a;\n P.touch = c;\n ta.mouse = a;\n ta.touch = c;\n R(aa, _[126], r, !1);\n R(aa, \"keyup\", y, !1);\n R(b.topAccess ? top : L, _[37], w, !0);\n R(b.topAccess ? top : L, _[64], w, !0);\n R(aa, _[52], e);\n R(aa, _[79], e);\n R(aa, _[81], e);\n R(aa, _[82], e);\n if (a || ua)R(W, _[95], v, !1), R(W, _[108], v, !1);\n (a || ua) && R(L, _[10], u, !0);\n a && R(W, _[7], z, !1);\n (a && b.realDesktop || b.ie) && R(W, _[37], D, !0);\n c && (R(W, ta.touchstart, h, !0), R(W, ta.touchmove, h, !0), R(W, ta.touchstart, qa, !1), R(W, ta.touchmove, ea, !0), R(W, ta.touchend, Ca, !0), R(W, ta.touchcancel, S, !0), Va && (R(W, ta.gesturestart, Z, !1), R(W, ta.gesturechange, B, !1), R(W, ta.gestureend, t, !0), Ia && (R(W, _[93], t, !0), Pb = new MSGesture, Pb.target = W)))\n };\n P.domUpdate = function () {\n if (Pb) {\n var a = W;\n xb = 0;\n P.unregister();\n P.registerControls(a)\n }\n };\n P.unregister = function () {\n Pb && (Pb = Pb.target = null);\n ba(aa, _[126], r, !1);\n ba(aa, \"keyup\", y, !1);\n ba(b.topAccess ? top : L, _[37], w, !0);\n ba(b.topAccess ? top : L, _[64], w, !0);\n b.topAccess && ba(top, _[4], C, !0);\n ba(aa, _[52], e);\n ba(aa, _[79], e);\n ba(aa, _[81], e);\n ba(aa, _[82], e);\n ba(L, _[10], u, !0);\n ba(L, _[10], q, !0);\n ba(L, _[4], J, !0);\n ba(W, _[95], v, !1);\n ba(W, _[108], v, !1);\n ba(W, _[7], z, !1);\n ba(W, _[37], D, !1);\n ba(W, ta.touchstart, h, !0);\n ba(W, ta.touchmove, h, !0);\n ba(W, ta.touchstart, qa, !1);\n ba(W, ta.touchmove, ea, !0);\n ba(W, ta.touchend, Ca, !0);\n ba(W, ta.touchcancel, S, !0);\n ba(W, ta.gesturestart, Z, !1);\n ba(W, ta.gesturechange, B, !1);\n ba(W, ta.gestureend, t, !0);\n ba(W, _[93], t, !0);\n wa = ta = W = null\n };\n P.handleFrictions = function () {\n var a, b = a = !1, c = m.hlookat_moveforce, d = m.vlookat_moveforce, e = m.fov_moveforce;\n if (0 != e) {\n var f = ia.keybfovchange;\n Ma = !1;\n Oa = !0;\n ha = 0;\n Ga += f * e * .001\n }\n if (0 != c || 0 != d || 0 != Ea || 0 != Ua) {\n var g = ia.keybfriction, b = ia.keybspeed, e = p.hlookat, f = p.vlookat, h = ia.keybaccelerate * Math.tan(Math.min(.5 * Number(p.fov), 45) * Y);\n Ea += c * h;\n c = Ua += d * h;\n d = Ea;\n Ea *= g;\n Ua *= g;\n g = Math.sqrt(c * c + d * d);\n 0 < g ? (c /= g, d /= g) : d = c = 0;\n g > b && (g = b);\n d *= g;\n e = 180 >= (Math.floor(f) % 360 + 450) % 360 ? e + d : e - d;\n f += c * g;\n p.hlookat = e;\n p.vlookat = f;\n g < .05 * h && (Ua = Ea = 0);\n b = !0\n }\n a |= b;\n if (ga)c = Math.pow(ia.touchfriction, .92), ca *= c, oa *= c, c = Math.sqrt(oa * oa + ca * ca), d = Math.min(.04 * uc / p.r_zoom, .5), 0 != c && (p.hlookat += ca, p.vlookat += oa), c < d && (ga = !1, oa = ca = 0), a |= 1; else if (sa) {\n var c = O, d = za, b = Qa, e = La, g = .025 * ia.mouseaccelerate, k = ia.mousespeed, h = ia.mousefriction, f = !1;\n if (E()) {\n if (c.down && (c.x != c.downx || c.y != c.downy)) {\n var q = n(c.downx, c.downy, c.x, c.y);\n q.h = xa;\n b = d * b - q.h * g;\n e = d * e - q.v * g;\n d = Math.sqrt(b * b + e * e);\n 0 < d && (b /= d, e /= d, d > k && (d = k))\n }\n g = p.hlookat;\n k = p.vlookat;\n k += d * e * ia.mouseyfriction;\n p.hlookat = g + d * b;\n p.vlookat = k;\n d *= h;\n h = Math.min(.04 * uc / p.r_zoom, .5);\n 0 == c.down && d < h && (f = !0)\n } else f = !0;\n f && (sa = !1, xa = e = b = d = 0);\n za = d;\n Qa = b;\n La = e;\n a |= 1\n }\n if (Oa) {\n a:{\n d = c = p.fov;\n b = Ga;\n e = !1;\n if (0 < Math.abs(b)) {\n h = b;\n g = ia.fovspeed;\n e = p.fovmin;\n f = p.fovmax;\n b *= ia.fovfriction;\n Math.abs(h) > g && (h = g * (h / Math.abs(h)));\n c = G(c);\n c = Ba(c + h);\n if (ia.bouncinglimits && 0 < ha)if (0 == Da)h = G(c), c < e ? (b = G(e), b = .25 * -(h - b)) : c > f && (b = G(f), b = .25 * -(h - b)); else {\n c = void 0;\n break a\n } else c < e && (c = e, b = 0), c > f && (c = f, b = 0);\n p.fov = c;\n Ga = b;\n e = !0;\n Ma && (p.fov = d, p.updateView(), d = p.screentosphere(Ha, va), p.fov = c, p.updateView(), c = p.screentosphere(Ha, va), b = p.vlookat + (d.y - c.y), p.hlookat += d.x - c.x, p.vlookat = b)\n }\n 1E-5 > Math.abs(Ga) && (ha = Ga = 0, Oa = !1);\n c = e\n }\n a |= c\n }\n Na && (c = !1, O.down ? c = !1 : (d = p.hlookat, b = p.vlookat, d += Ra, b += Bb, p.hlookat = d, p.vlookat = b, c = !0, Ra *= .95, Bb *= .95, e = p._limits, ia.bouncinglimits && e && (360 > e[0] && (d < e[1] ? Ra = .15 * -(d - e[1]) : d > e[2] && (Ra = .15 * -(d - e[2]))), b < e[4] ? Bb = .15 * -(b - e[4]) : b > e[5] && (Bb = .15 * -(b - e[5]))), d = .15 * Math.min(.04 * uc / p.r_zoom, .5), Math.sqrt(Ra * Ra + Bb * Bb) < d && (Ra = Bb = 0, Na = !1)), a |= c);\n return a\n };\n P.stopFrictions = function (a) {\n 0 == (0 | a) && (a = 3);\n a & 1 && (Qa = ca = 0);\n a & 2 && (La = oa = 0);\n a & 4 && (x(), O.down = !1)\n };\n P.isMultiTouch = function () {\n return Da || M || 1 < xb || ra\n };\n P.isBouncing = function () {\n return 0 < ha || Na\n };\n P.focusLoss = w;\n P.trackTouch = function (b) {\n if (0 == Va || Ia) {\n var c = b.type;\n c == ta.touchstart ? ua ? A(b) : a(b) : c == ta.touchend && (ua ? H(b) : d(b))\n }\n };\n var pb = -.1\n })();\n var fa = null, M = null, Cb = !1, $c = !1, Db = 0, Wa = !1, ad = !1, Eb = -1, Xa = {};\n (function () {\n function a(a, b) {\n if (!0 !== b)p.haschanged = !0; else {\n !0 !== a && (Kb = Ta());\n var c = m.webVR;\n c && c.enabled && c.updateview();\n Ka(_[299]);\n p.updateView();\n fa && Oa.renderpano(fa, 2);\n M && Oa.renderpano(M, 1);\n z && (z = Oa.rendersnapshot(z, M));\n ob(!0);\n Ka(_[278])\n }\n }\n\n function d(a, b, c, d, e) {\n h.count++;\n h.id = h.count;\n if (f()) {\n da.busy = !0;\n m.xml.url = \"\";\n m.xml.content = a;\n var g = (new DOMParser).parseFromString(a, _[25]);\n T.resolvexmlincludes(g, function () {\n g = T.xmlDoc;\n n(g, b, c, d, e)\n })\n }\n }\n\n function E(a) {\n var b = 0 != (c & 64) && 0 == (c & 256), d;\n !0 === a && (c = b = 0);\n if (0 == (c & 4)) {\n var e = xa.getArray();\n a = e.length;\n for (d = 0; d < a; d++) {\n var g = e[d];\n !g || 0 != b && 0 != g.keep || (g.sprite && (g.visible = !1, g.parent = null, V.pluginlayer.removeChild(g.sprite)), g.destroy(), xa.removeItem(d), d--, a--)\n }\n }\n if (0 == (c & 128))for (e = Ua.getArray(), a = e.length, d = 0; d < a; d++)if ((g = e[d]) && (0 == b || 0 == g.keep)) {\n if (g.sprite) {\n g.visible = !1;\n g.parent = null;\n try {\n V.hotspotlayer.removeChild(g.sprite)\n } catch (f) {\n }\n if (g._poly) {\n try {\n V.svglayer.removeChild(g._poly)\n } catch (h) {\n }\n g._poly.kobject = null;\n g._poly = null\n }\n }\n g.destroy();\n Ua.removeItem(d);\n d--;\n a--\n }\n b = Yb.getArray();\n a = b.length;\n for (d = 0; d < a; d++)(e = b[d]) && 0 == pa(e.keep) && (Yb.removeItem(d), d--, a--)\n }\n\n function f() {\n return 1 < h.count && h.removeid != h.id && (h.removeid = h.id, Ka(_[301], !0), h.removeid != h.id) ? !1 : !0\n }\n\n function g(a) {\n var b, c, d = \"\";\n a = Gc(a);\n b = a.lastIndexOf(\"/\");\n c = a.lastIndexOf(\"\\\\\");\n c > b && (b = c);\n 0 <= b && (d = a.slice(0, b + 1));\n return d\n }\n\n function n(a, d, e, g, f) {\n za.currentmovingspeed = 0;\n K = !1;\n c = M ? 64 : 0;\n e && (e = F(e), 0 <= e.indexOf(_[323]) && (c |= 4), 0 <= e.indexOf(_[306]) && (c |= 128), 0 <= e.indexOf(_[391]) && (c |= 16), 0 <= e.indexOf(_[418]) && (c |= 32), 0 <= e.indexOf(\"merge\") && (c |= 16448), 0 <= e.indexOf(_[354]) && (c |= 256), 0 <= e.indexOf(_[412]) && (c |= 4), 0 <= e.indexOf(_[459]) && (c |= 36), 0 <= e.indexOf(_[400]) && (K = !0, c |= 65536), 0 <= e.indexOf(_[310]) && I(_[102], 0), 0 <= e.indexOf(_[360]) && (c |= 1056));\n 0 == K && (Db = 0, g && (g = F(g), e = g.indexOf(_[490]), 0 <= e && (Db = parseFloat(g.slice(e + 6)), isNaN(Db) || 0 > Db)) && (Db = 2), M && (e = 0 != (c & 1024), b.webgl ? (e && (fa || z) && (fa && (z = Oa.snapshot(z, fa)), e = !1), fa && (fa.destroy(), fa = null), 0 == e ? (M.stop(), z = Oa.snapshot(z, M), M.destroy(), M = null) : (M.suspended = !0, fa = M, M = null, Oa.renderpano(fa, 2)), Oa.setblendmode(g), Eb = -1, Wa = !1) : (0 == Wa ? (fa && (fa.destroy(), fa = null), fa = M, 0 == e ? fa.stop() : fa.suspended = !0, M = null) : (g = (Ta() - Eb) / 1E3 / Db, g = y(g), .5 < g ? M && (M.destroy(), M = null) : (fa && (fa.destroy(), fa = null), fa = M, 0 == e ? fa.stop() : fa.suspended = !0, M = null), Wa = !1), fa && fa.stopped && Oa.renderpano(fa, 2))), c & 32 && (u[0] = p.hlookat, u[1] = p.vlookat, u[2] = p.camroll, u[3] = p.fov, u[4] = p.fovtype, u[5] = p.fovmin, u[6] = p.fovmax, u[7] = p.maxpixelzoom, u[8] = p.fisheye, u[9] = p.fisheyefovlink, u[10] = p.stereographic, u[12] = p.pannini, u[13] = p.architectural, u[14] = p.architecturalonlymiddle), 0 == (c & 16384) && p.defaults(), p.limitview = \"auto\", p.hlookatmin = Number.NaN, p.hlookatmax = Number.NaN, p.vlookatmin = Number.NaN, p.vlookatmax = Number.NaN, m.preview && delete m.preview, m.image && delete m.image, m.onstart = null, N = m.image = {}, N.type = null, N.multires = !1, N.multiresthreshold = .025, N.cubelabels = \"l|f|r|b|u|d\", N.stereo = !1, N.stereoformat = \"TB\", N.stereolabels = \"1|2\", N.tiled = !1, N.tilesize = 0, N.tiledimagewidth = 0, N.tiledimageheight = 0, N.baseindex = 1, N.level = new bb, N.hfov = 0, N.vfov = 0, N.voffset = 0, N.hres = 0, N.vres = 0, N.haschanged = !1, va(N, \"frame\", 1), N.frames = 1);\n E();\n if (a && a.documentElement && _[22] == a.documentElement.nodeName)Ea(a.baseURI + _[21]); else {\n T.parsexml(a.childNodes, null, c);\n if (null != m._loadpanoscene_name) {\n var h = U(_[72] + m._loadpanoscene_name + \"]\");\n h && (g = _[124] + h.content + _[117], m.xml.url = \"\", m.xml.scene = m._loadpanoscene_name, m.xml.content = g, m.onstart = null, g = (new DOMParser).parseFromString(g, _[25]), T.resolvexmlincludes(g, function () {\n (a = T.xmlDoc) && a.documentElement && _[22] == a.documentElement.nodeName ? Ea(a.baseURI + _[21]) : (T.parsexml(a.childNodes, null, c), f = h.onstart)\n }));\n m._loadpanoscene_name = null\n }\n m.xmlversion = m.version;\n m.version = m.buildversion;\n D = f;\n Wd(d);\n k()\n }\n }\n\n function k() {\n var a, b, d = m.plugin.getArray();\n m.hotspot.getArray();\n var g;\n b = d.length;\n for (a = 0; a < b; a++) {\n var f = d[a];\n if (f && f.layer && f.layer.isArray) {\n var k = f.layer.getArray();\n g = k.length;\n for (b = 0; b < g; b++) {\n var n = k[b];\n n && (n.parent = f.name, n.keep = f.keep, xa.createItem(n.name, n))\n }\n f.plugin = null;\n f.layer = null;\n a--;\n b = d.length\n }\n }\n if (0 != e(!0)) {\n if (0 == K) {\n c & 32 && (p.hlookat = u[0], p.vlookat = u[1], p.camroll = u[2], p.fov = u[3], p.fovtype = u[4], p.fovmin = u[5], p.fovmax = u[6], p.maxpixelzoom = u[7], p.fisheye = u[8], p.fisheyefovlink = u[9], p.stereographic = u[10], p.pannini = u[12], p.architectural = u[13], p.architecturalonlymiddle = u[14]);\n Xa.updateview();\n fa && fa.removemainpano();\n for (a = 0; 4100 > a; a++);\n void 0 !== ja.hardwarelimit && (Lb = parseFloat(ja.hardwarelimit), isNaN(Lb) && (Lb = 0));\n void 0 !== ja.usedesktopimages && (ce = pa(ja.usedesktopimages));\n Cb = !0;\n sc.progress = 0;\n M = Oa.createPano(N);\n M.addToLayer(V.panolayer);\n 0 <= Db && (ad = !0, M.setblend(0), ub = !0, qc = 0)\n }\n da.busy = !1;\n da.actions_autorun(_[466], !0);\n a = m.onstart;\n D && (a = D, D = null);\n d = h.id;\n da.callaction(a, null, !0);\n if (d == h.id && (da.actions_autorun(_[467], !1), Ka(_[287]), m.xml && m.xml.scene && Ka(_[369]), d == h.id)) {\n 0 == K && x();\n a = Ua.getArray();\n d = a.length;\n for (f = 0; f < d; f++)(b = a[f]) && null == b.sprite && (b.create(), V.hotspotlayer.appendChild(b.sprite));\n e();\n Ka(_[63]);\n Xa.updateview();\n da.processactions()\n }\n }\n }\n\n function e(a) {\n var b = xa.getArray(), c = b.length, d, e = !0;\n for (d = 0; d < c; d++) {\n var g = b[d];\n if (g) {\n var f = !1;\n 1 == a ? 1 == g.preload && _[15] != g.type && 0 == g.loaded && (g.onloaded = k, g.altonloaded = null, f = !0, e = !1) : (1 == g.preload && (g.preload = !1, g.onloaded = null), f = !0);\n f && null == g.sprite && (g.create(), null == g._parent && V.pluginlayer.appendChild(g.sprite))\n }\n }\n return e\n }\n\n function w() {\n Ka(_[216])\n }\n\n function x() {\n var c = b.desktop || ce, d = !1, e = N.type, g = parseFloat(N.hfov), f = parseFloat(N.vfov), h = parseFloat(N.voffset);\n isNaN(g) && (g = 0);\n isNaN(f) && (f = 0);\n isNaN(h) && (h = 0);\n var k = !!(N.multires && N.level && 0 < N.level.count), n = !!N.mobile, l = !!N.tablet;\n c || 0 != k || !n && !l || (e = \"cube\", d = !0);\n if (null == e)if (N.left || N.cube)e = \"cube\"; else if (N.cubestrip)e = _[39]; else if (N.sphere)e = _[42]; else if (N.cylinder)e = _[24]; else if (N.flat)e = \"flat\"; else {\n if (n || l)e = \"cube\", d = !0\n } else e = F(e);\n var m = _[42] == e || _[24] == e, p = 0 < g && 1 >= g && 45 >= f && m || \"flat\" == e, u = \"cube\" == e || _[39] == e || null == e && 0 == m && 0 == p, c = !1, t = null;\n if (u)g = 360, f = 180; else if (m || p)if (t = ra.parsePath(U(_[487] + e + \".url\"))) {\n var G = 0;\n 0 <= (G = F(t).indexOf(_[478])) && (m = c = !0, k = p = !1, b.panovideosupport && (t = t.slice(G + 7)))\n }\n N.type = e;\n N.hfov = g;\n N.vfov = f;\n N.voffset = h;\n h = (\"\" + N.cubelabels).split(\"|\");\n 6 == h.length && (M.cubelabels = h);\n M.stereo = b.webgl ? N.stereo : !1;\n M.stereoformat = \"sbs\" == F(N.stereoformat) ? 0 : 1;\n h = (\"\" + N.stereolabels).split(\"|\");\n 2 == h.length && (M.stereolabels = h);\n G = F(U(_[294]));\n if (h = U(_[322])) {\n h = ra.parsePath(h);\n if (_[39] == G || \"null\" == G && u) {\n G = U(_[211]);\n if (null != G) {\n var G = F(G), x = [0, 1, 2, 3, 4, 5];\n x[G.indexOf(\"l\")] = 0;\n x[G.indexOf(\"f\")] = 1;\n x[G.indexOf(\"r\")] = 2;\n x[G.indexOf(\"b\")] = 3;\n x[G.indexOf(\"u\")] = 4;\n x[G.indexOf(\"d\")] = 5;\n G = x\n }\n M.addCubestripPreview(h, G)\n } else(\"flat\" == G || (\"null\" == G || _[42] == G || _[24] == G) && p) && M.addFlatLevel(h, g, f, 0, 0, 0, N.baseindex, !0);\n a(!1, !0)\n } else if (0 == G.indexOf(\"grid\")) {\n if (h = Gb(G))if (h = h[0], \"grid\" == h.cmd) {\n var P = h.args, h = void 0 == P[1] ? 64 : parseInt(P[1]), G = void 0 == P[2] ? 64 : parseInt(P[2]), x = void 0 == P[3] ? 512 : parseInt(P[3]), z = void 0 == P[4] ? 6710886 : parseInt(P[4]), y = void 0 == P[5] ? 2236962 : parseInt(P[5]), P = void 0 == P[6] ? void 0 == P[4] ? 16777215 : z : parseInt(P[6]), z = ca(z), y = ca(y), P = ca(P);\n M.addGridPreview(x, h, G, y, z, P);\n a(!1, !0);\n w()\n }\n } else w();\n h = !1;\n G = b.androidstock && !b.webgl;\n if (p || u) {\n if (d || u && G)l ? h = r(_[311]) : n && (h = r(_[313]));\n if (0 == h)if (\"cube\" == e) {\n if (k)if (n = N.level.getArray(), d = n.length, n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), 0 == b.multiressupport || G) {\n f = b.iphone && b.retina || b.tablet || b.android ? 1100 : b.iphone ? 512 : 2560;\n 0 < Lb && (f = Lb + 256);\n for (k = d - 1; 0 <= k && !(g = n[k].tiledimagewidth, g <= f); k--);\n 0 <= k && (h = r(_[54] + k + \"]\", !0))\n } else for (n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), k = 0; k < d; k++)if (n = _[54] + k + \"]\", l = U(n), f = v(n))n = l.tilesize ? l.tilesize : N.tilesize, g = parseInt(l.tiledimagewidth, 10), 0 < n && 0 < g && (M.addCubeLevel(f, g, n, N.baseindex), h = !0);\n 0 == h && (h = r(_[75]))\n } else if (_[39] == e && N.cubestrip)M.addCubestripPano(ra.parsePath(\"\" + N.cubestrip.url)), h = !0; else if ((_[42] == e || _[24] == e) && 1 >= g && 45 >= f || \"flat\" == e) {\n if (b.multiressupport && k)for (n = N.level.getArray(), d = n.length, n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), k = 0; k < d; k++)if (n = _[54] + k + \"]\", l = U(n), c = U(n + \".\" + e + \".url\"), c = ra.parsePath(c))n = l.tilesize ? l.tilesize : N.tilesize, t = parseInt(l.tiledimagewidth, 10), l = parseInt(l.tiledimageheight, 10), 0 < n && 0 < t && 0 < l && (M.addFlatLevel(c, g, f, t, l, n, N.baseindex, !1), h = !0);\n 0 == h && (d = N[e]) && d.url && (M.addFlatLevel(ra.parsePath(\"\" + d.url), g, f, 0, 0, 0, N.baseindex, !1), h = !0)\n }\n } else m && 0 == k && b.webgl && t && ((g = [Number(N.hfov), Number(N.vfov), Number(N.voffset)], c) ? b.panovideosupport && (f = xa.getItem(t)) && (f.renderToBitmap = !0, f.visible = !1, M.addRoundPano(e, null, g, f), h = !0) : (M.addRoundPano(e, t, g), h = !0));\n h && (Cb = $c = !0);\n M.finalize();\n 0 == h && null != e && la(2, _[171]);\n a(!1, !0)\n }\n\n function v(a) {\n var b = _[174].split(\" \"), c = Array(6), d, e;\n if (d = U(a + \".\" + b[6] + \".url\")) {\n if (d = ra.parsePath(d))for (e = 0; 6 > e; e++)c[e] = d.split(\"%s\").join(M.cubelabels[e])\n } else for (e = 0; 6 > e; e++)if (d = ra.parsePath(U(a + \".\" + b[e] + \".url\")))c[e] = d; else return null;\n return c\n }\n\n function r(a, b) {\n var c = v(a);\n if (!c)return !1;\n if (b) {\n var d = U(a), e = d.tilesize ? d.tilesize : N.tilesize, d = parseInt(d.tiledimagewidth, 10);\n M.addCubeLevel(c, d, e, N.baseindex)\n } else M.addCubeLevel(c, 0, 0, 1);\n return !0\n }\n\n function y(a) {\n 1 < a && (a = 1);\n 0 == b.webgl && (a *= a * a);\n a = 1 - a;\n 0 > a && (a = 0);\n return a\n }\n\n var l = Xa;\n l.loadpano = function (a, b, c, e, k) {\n h.count++;\n h.id = h.count;\n if (f())if (0 > F(c).indexOf(_[358]) && I(_[102], 0), \"null\" == F(a) && (a = null), m.xml.content = null, m.xml.scene = null, a) {\n da.busy = !0;\n null == ra.firstxmlpath ? ra.firstxmlpath = g(a) : a = ra.parsePath(a, !0);\n ra.currentxmlpath = g(a);\n m.xml.url = a;\n var l = h.id;\n ra.loadxml(a, function (d, g) {\n if (l == h.id) {\n if (d && d.childNodes) {\n var f = d.childNodes, m = f.length;\n 0 == m ? d = null : 2 == m && f[1] && _[22] == f[1].nodeName && (d = null)\n }\n d ? (d = T.resolvexmlencryption(d, a), null != d && T.resolvexmlincludes(d, function () {\n d = T.xmlDoc;\n n(d, b, c, e, k)\n })) : 200 == g ? Ea(a + _[21]) : Ea(a + _[181])\n }\n })\n } else m.xml.url = \"\", d(_[219], b, c, e, k)\n };\n l.loadxml = d;\n l.loadxmldoc = n;\n l.updateview = a;\n l.updateplugins = function (a) {\n var b = xa.getArray(), c = b.length, d;\n for (d = 0; d < c; d++) {\n var e = b[d];\n e && (a || e.poschanged) && e.loaded && e.updatepos()\n }\n };\n l.checkautorotate = function (a) {\n var b = Ta();\n a && (Kb = b);\n Kb > cb && (cb = Kb);\n a = b - cb;\n a > 1E3 * m.idletime && cb != Hd && (Hd = cb, Ka(_[492]));\n a = b - Kb;\n if (za.enabled && a > 1E3 * za.waittime) {\n cb = Kb = 0;\n var c = p._hlookat;\n a = p._vlookat;\n var b = p._fov, d = Math.tan(Math.min(.5 * b, 45) * Y), e = za.accel, g = za.speed, f = za.currentmovingspeed, e = e / 60, g = g / 60;\n 0 < g ? (f += e * e, f > g && (f = g)) : (f -= e * e, f < g && (f = g));\n za.currentmovingspeed = f;\n c += d * f;\n d = Math.abs(d * f);\n p._hlookat = c;\n c = parseFloat(za.horizon);\n isNaN(c) || (c = (c - a) / 60, e = Math.abs(c), 0 < e && (e > d && (c = d * c / e), a += c, p._vlookat = a));\n a = parseFloat(za.tofov);\n isNaN(a) || (a < p.fovmin && (a = p.fovmin), a > p.fovmax && (a = p.fovmax), a = (a - b) / 60, c = Math.abs(a), 0 < c && (c > d && (a = d * a / c), b += a, p._fov = b));\n return !0\n }\n za.currentmovingspeed = 0;\n return !1\n };\n l.previewdone = w;\n l.havepanosize = function (a) {\n M && M.id == a.id && (N.hfov = a.hfov, N.vfov = a.vfov, N.hres = a.hres, N.vres = a.vres, Ka(_[405]), p.haschanged = !0)\n };\n l.removeelements = E;\n l.isLoading = function () {\n return Cb\n };\n l.isBlending = function () {\n return ad || Wa\n };\n var u = [], h = {count: 0, id: 0}, c = 0, K = !1, D = null, z = null;\n l.checkHovering = function () {\n if (1 != (jc & 1) && !da.blocked) {\n var a = [xa.getArray(), Ua.getArray()], b, c, d, e, g;\n for (g = 0; 2 > g; g++)for (b = a[g], d = b.length, e = 0; e < d; e++)(c = b[e]) && c._visible && c.hovering && c.onhover && da.callaction(c.onhover, c)\n }\n };\n l.handleloading = function () {\n var a = !1;\n 0 == Wa && (fa && (a |= fa.doloading()), M && (a |= M.doloading()));\n Cb = M && M.isloading();\n var b = Oa.handleloading();\n $c && 1 != Cb && ($c = !1, Ka(_[265]));\n b & 1 && (Cb = !0);\n b & 2 && (a = !0);\n M && (fa || z) && (0 == Wa ? M.previewcheck() && (Wa = !0, Eb = -1) : (a = 0, 0 <= Db && (-1 == Eb ? Eb = Ta() : (a = (Ta() - Eb) / 1E3, a = 0 < Db ? a / Db : 1), a = y(a), ad = !0, M.setblend(1 - a), ub = !0, qc = 1 - a), 0 == a && (Db = 0, fa && (fa.destroy(), fa = null), ad = Wa = !1), a = !0));\n return a\n }\n })();\n var Oa = {};\n (function () {\n var a, d;\n\n function E(a) {\n if (!1 === document.hidden && ka) {\n var b = parseInt(ka.style.height);\n 0 < b && (ka.style.height = b + 1 + \"px\", setTimeout(function () {\n ka && parseInt(ka.style.height) == b + 1 && (ka.style.height = b + \"px\")\n }, 100))\n }\n }\n\n function f(a) {\n return \"#ifdef GL_ES\\n#ifdef GL_FRAGMENT_PRECISION_HIGH\\nprecision highp float;\\n#else\\nprecision mediump float;\\n#endif\\n#endif\\nuniform float aa;uniform sampler2D sm;varying vec2 tt;void main(){vec4 c=texture2D(sm,vec2(tt.s,tt.t)\" + (a ? \",-1.0\" : \"\") + \");gl_FragColor=vec4(c.rgb,c.a*aa);}\"\n }\n\n function g(a, b, c) {\n var d = ua;\n null == a && (a = \"attribute vec2 vx;varying vec2 tx;void main(){gl_Position=vec4(vx.x*2.0-1.0,-1.0+vx.y*2.0,0.0,1.0);tx=vx;}\");\n var e = d.createShader(d.VERTEX_SHADER);\n d.shaderSource(e, a);\n d.compileShader(e);\n if (!d.getShaderParameter(e, d.COMPILE_STATUS))return la(0, _[185] + d.getShaderInfoLog(e)), null;\n a = d.createShader(d.FRAGMENT_SHADER);\n d.shaderSource(a, b);\n d.compileShader(a);\n if (!d.getShaderParameter(a, d.COMPILE_STATUS))return la(0, _[186] + d.getShaderInfoLog(a)), null;\n b = d.createProgram();\n d.attachShader(b, e);\n d.attachShader(b, a);\n d.linkProgram(b);\n if (!d.getProgramParameter(b, d.LINK_STATUS))return la(0, _[162]), null;\n d.useProgram(b);\n d.uniform1i(d.getUniformLocation(b, \"sm\"), 0);\n e = d.getAttribLocation(b, \"vx\");\n d.enableVertexAttribArray(e);\n e = {prg: b, vxp: e};\n c = c.split(\",\");\n var g, f;\n g = c.length;\n for (a = 0; a < g; a++)f = c[a], e[f] = d.getUniformLocation(b, f);\n return e\n }\n\n function n(a) {\n var b = ua;\n a ? (ob = Cb, Cb = a) : (a = Cb = ob, ob = null);\n a && b.useProgram(a)\n }\n\n function k() {\n var c = ua;\n try {\n var e = c.createBuffer();\n c.bindBuffer(lb, e);\n c.bufferData(lb, new Float32Array([0, 0, 0, 1, 1, 1, 1, 0]), wc);\n var h = c.createBuffer();\n c.bindBuffer(Qb, h);\n c.bufferData(Qb, new Uint16Array([0, 1, 2, 0, 2, 3]), wc);\n a = e;\n d = h;\n var k;\n for (k = 0; 6 > k; k++) {\n var e = _[159], t = h = \"\", l = \"\";\n 0 == k ? t = _[168] : 1 == k ? (l = \"cc\", h = _[88], t = _[158]) : 2 == k ? (l = \"cc\", h = _[88], t = _[153]) : 3 == k ? (l = \"ct,zf\", h = _[176], t = _[152]) : 4 == k ? (l = \"fp,bl\", h = _[175], t = \"float t=(tx.x*fp.x+tx.y*fp.y+fp.z)*(1.0-2.0*bl)+bl;gl_FragColor=vec4(texture2D(sm,tx).rgb,smoothstep(t-bl,t+bl,aa));\") : 5 == k && (l = _[439], h = _[163], t = \"float t=(1.0-sqrt(2.0)*sqrt((ap.x*(tx.x-0.5)*(tx.x-0.5)+ap.y*(tx.y-0.5)*(tx.y-0.5))/(0.5*(ap.x+ap.y))))*(1.0-2.0*bl)+bl;gl_FragColor=vec4(texture2D(sm,(tx-vec2(0.5,0.5))*mix(1.0,aa,zf)+vec2(0.5,0.5)).rgb,smoothstep(t-bl,t+bl,aa));\");\n e = _[187] + e + h + \"void main(){\" + t + \"}\";\n ha[k] = g(null, e, \"aa,\" + l);\n if (null == ha[k])return !1\n }\n var m = c.createShader(c.VERTEX_SHADER);\n c.shaderSource(m, \"attribute vec3 vx;attribute vec2 tx;uniform float sh;uniform float ch;uniform mat4 mx;uniform mat4 ot;uniform mat3 tm;varying vec2 tt;void main(){vec3 vr=vec3(ot*vec4(vx,1));vec3 vs=1000.0*normalize(vr);vec2 c2=vec2(vr.x,vr.z);c2=c2/max(1.0,length(c2));vec3 vc=1000.0*vec3(c2.x,clamp(vr.y*inversesqrt(1.0+vr.x*vr.x+vr.z*vr.z),-30.0,+30.0),c2.y);vec3 vv=vr*(1.0-sh)+sh*(vs*(1.0-ch)+vc*ch);gl_Position=mx*vec4(vv,1);tt=(vec3(tx,1)*tm).xy;}\");\n c.compileShader(m);\n if (!c.getShaderParameter(m, c.COMPILE_STATUS))return !1;\n var q = c.createShader(c.FRAGMENT_SHADER);\n c.shaderSource(q, f(!0));\n c.compileShader(q);\n if (!c.getShaderParameter(q, c.COMPILE_STATUS))if (b.ie) {\n if (c.shaderSource(q, f(!1)), c.compileShader(q), !c.getShaderParameter(q, c.COMPILE_STATUS))return !1\n } else return !1;\n var p = c.createProgram();\n c.attachShader(p, m);\n c.attachShader(p, q);\n c.linkProgram(p);\n if (!c.getProgramParameter(p, c.LINK_STATUS))return !1;\n n(p);\n Pa = c.getAttribLocation(p, \"vx\");\n Ra = c.getAttribLocation(p, \"tx\");\n Ya = c.getUniformLocation(p, \"sh\");\n Za = c.getUniformLocation(p, \"ch\");\n bb = c.getUniformLocation(p, \"aa\");\n pb = c.getUniformLocation(p, \"sm\");\n jb = c.getUniformLocation(p, \"mx\");\n Bb = c.getUniformLocation(p, \"ot\");\n vb = c.getUniformLocation(p, \"tm\");\n c.enableVertexAttribArray(Pa);\n c.enableVertexAttribArray(Ra);\n Ia.sh = p;\n Ia.vs = m;\n Ia.ps = q\n } catch (G) {\n return la(0, _[288] + G), !1\n }\n return !0\n }\n\n function e(a) {\n if (a) {\n var b = ua;\n b.deleteBuffer(a.vx);\n b.deleteBuffer(a.tx);\n b.deleteBuffer(a.ix);\n a.vx = null;\n a.tx = null;\n a.ix = null;\n a.vxd = null;\n a.txd = null;\n a.ixd = null;\n a.tcnt = 0\n }\n }\n\n function w(a, b, c, d) {\n this.tcnt = a;\n this.vxd = b;\n this.txd = c;\n this.ixd = d;\n this.ix = this.tx = this.vx = null\n }\n\n function x(a) {\n var b = ua;\n b.bindBuffer(lb, a.vx = b.createBuffer());\n b.bufferData(lb, a.vxd, wc);\n b.bindBuffer(lb, a.tx = b.createBuffer());\n b.bufferData(lb, a.txd, wc);\n b.bindBuffer(Qb, a.ix = b.createBuffer());\n b.bufferData(Qb, a.ixd, wc)\n }\n\n function v(a, b) {\n var c, d = 2 * (b + 1) * (b + 1);\n c = 6 * b * b;\n var e = new Float32Array(3 * (b + 1) * (b + 1)), g = new Float32Array(d), f = new Uint16Array(c);\n if (isNaN(b) || 0 >= b)b = 1;\n var h, k, t, n, l;\n a *= 2;\n for (k = c = d = 0; k <= b; k++)for (h = 0; h <= b; h++)t = h / b, n = k / b, g[d] = t, g[d + 1] = n, d += 2, e[c] = a * (t - .5), e[c + 1] = a * (n - .5), e[c + 2] = 0, c += 3;\n for (k = c = 0; k < b; k++)for (h = 0; h < b; h++)d = h + k * (b + 1), t = d + 1, n = d + (b + 1), l = n + 1, f[c] = d, f[c + 1] = t, f[c + 2] = n, f[c + 3] = t, f[c + 4] = l, f[c + 5] = n, c += 6;\n return new w(6 * b * b, e, g, f)\n }\n\n function r(a) {\n var c = ua;\n null == a && (a = {\n have: !1,\n fb: null,\n tex: null,\n w: 0,\n h: 0,\n alpha: 1,\n havepano: -1,\n drawcalls: 0\n }, a.fb = c.createFramebuffer(), a.tex = c.createTexture(), c.bindTexture(ma, a.tex), c.texParameteri(ma, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE), c.texParameteri(ma, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE), c.texParameteri(ma, c.TEXTURE_MAG_FILTER, qb), c.texParameteri(ma, c.TEXTURE_MIN_FILTER, qb));\n var d = b.gl.width * xa + .5 | 0, e = b.gl.height * xa + .5 | 0;\n if (a.w != d || a.h != e)a.w = d, a.h = e, c.bindTexture(ma, a.tex), c.texImage2D(ma, 0, mb, d, e, 0, mb, Nc, null), c.bindFramebuffer(Ab, a.fb), c.framebufferTexture2D(Ab, c.COLOR_ATTACHMENT0, ma, a.tex, 0), c.bindTexture(ma, null), c.bindFramebuffer(Ab, null);\n return a\n }\n\n function y(c, e, g) {\n var f = ua;\n if (0 >= c.drawcalls || null == e)return !1;\n var h = b.gl.width * xa + .5 | 0, k = b.gl.height * xa + .5 | 0;\n if (0 < h && 0 < k)return n(e.prg), f.viewport(0, 0, h, k), e.aa && (Aa && (g = 1 - Aa(1 - g, 0, 1), 0 > g ? g = 0 : 1 < g && (g = 1)), f.uniform1f(e.aa, g)), e.sz && f.uniform2f(e.sz, h, k), f.bindBuffer(lb, a), f.vertexAttribPointer(e.vxp, 2, Oc, !1, 0, 0), f.bindBuffer(Qb, d), f.activeTexture(Mc), f.bindTexture(ma, c.tex), f.drawElements(Kb, 6, Gb, 0), R++, !0\n }\n\n function l(a, b, c, d, e, g) {\n var f = !1;\n 0 == d && (b = c = d = 1024, Da = f = !0);\n this.type = 0;\n this.stereo = g;\n this.preview = !1;\n this.needsize = f;\n this.w = b;\n this.h = c;\n this.mp = b * c * a >> 20;\n this.tilesize = d;\n this.htiles = (b + d - 1) / d | 0;\n this.vtiles = (c + d - 1) / d | 0;\n this.loadedtiles = [0, 0];\n this.addedtiles = [0, 0];\n this.totaltiles = a * this.htiles * this.vtiles;\n this.i = e;\n this.planeurls = Array(a);\n this.planemapping = 6 == a ? [0, 1, 2, 3, 4, 5] : [1];\n this.invplanemapping = 6 == a ? [0, 1, 2, 3, 4, 5] : [0, 0, 0, 0, 0, 0];\n this.completelyadded = this.complete = !1;\n this.vfov = this.hfov = 90;\n this.voffset = this.hoffset = 0;\n this.vscale = 1\n }\n\n function u(a, b) {\n return a.preview ? -1 : b.preview ? 1 : a.w - b.w\n }\n\n function h(a, b, d, e, g, f, h) {\n f = 0 < f ? e * h / f : 1;\n 0 >= e && (e = 1);\n 0 >= g && (g = f);\n f = g / f;\n b.hfov = e;\n b.vfov = g;\n b.hoffset = 0;\n b.voffset = e / 2 - g / f / 2;\n b.vscale = 1;\n h = a.levels;\n d && h.push(b);\n h.sort(u);\n b = h.length - 1;\n for (d = g = 0; d <= b; d++)h[d].needsize || (g = h[d].vfov);\n if (0 < g) {\n for (d = 0; d <= b; d++)h[d].needsize || (h[d].vscale = g / h[d].vfov * f);\n a.fovlimits = [-e / 2, +e / 2, -g / 2, +g / 2]\n }\n c(a)\n }\n\n function c(a) {\n var b = null, c = 0 == a.type, d = c || null != a.fovlimits, e = a.levels;\n if (e) {\n var g = e.length;\n 0 < g && (e = e[g - 1], 0 == e.preview && 0 == e.needsize && d && (b = e))\n }\n b && a.done && 0 == a.ready && (a.ready = !0, a.hfov = c ? 360 : b.hfov, a.vfov = c ? 180 : b.vfov, a.hres = b.w, a.vres = b.h, Xa.havepanosize(a))\n }\n\n function K() {\n this.h = this.w = 0;\n this.imgfov = null;\n this.loading = !0;\n this.texture = this.obj = null;\n this.texvalid = !1;\n this.mx = Ma()\n }\n\n function D() {\n this.layer = null;\n this.tiles = [];\n this.mx = this.texture = this.csobj = this.csobj0 = null\n }\n\n function z(a) {\n function d(a, b, c, e) {\n f(a);\n if (0 == a.type) {\n var g = ua;\n c || (c = [0, 1, 2, 3, 4, 5]);\n var h, k, t, n;\n if (b) {\n h = b.naturalWidth;\n k = b.naturalHeight;\n n = 1;\n if (3 * h == 2 * k)t = h / 2; else if (2 * h == 3 * k)t = h / 3; else if (1 * h == 6 * k)t = h / 6; else if (6 * h == 1 * k)t = h / 1; else {\n 0 == a.type && la(2, _[247] + b.src + _[190]);\n return\n }\n h /= t;\n k /= t\n } else e && (t = e.width, n = 0, h = 1, k = 6, b = e);\n e = Sa ? 0 : G;\n var m = t, p = new D, zf = new l(6, m, m, m, 1, !1), r, u, w, v = [2, 0, 3, 1, 4, 5];\n 0 == Sa && (r = Ja(), r.style.position = _[0], r.style.pointerEvents = \"none\", p.layer = r);\n p.tiles = Array(6);\n for (u = 0; u < k; u++)for (r = 0; r < h; r++) {\n var x = c[u * h + r], P = new q(\"prev\" + a.id + \"s\" + Yb[x], 0, x, 0, 0, zf, \"\", a);\n w = v[x];\n var B = 1 == x || 3 == x ? e : 0, z = 3 >= x ? e : 0, y = Ja(2);\n y.width = m + 2 * B;\n y.height = m + 2 * z;\n y.style.position = _[0];\n y.style[Zc] = \"0 0\";\n var E = y.getContext(\"2d\");\n E && (0 < z && (E.drawImage(b, n * r * t, n * u * t, t, 1, B, 0, t, z), E.drawImage(b, n * r * t, n * u * t + t - 1, t, 1, B, m + z, t, z)), 0 < B && (E.drawImage(b, n * r * t + 0, n * u * t + 0, 1, t, 0, B, B, t), E.drawImage(b, n * r * t + t - 1, n * u * t + 0, 1, t, m + B, B, B, t)), E.drawImage(b, n * r * t, n * u * t, t, t, B, z, m, m), Ba && E.getImageData(m >> 1, m >> 1, 1, 1));\n P.canvas = y;\n 0 == Sa ? (P.elmt = y, y = -m / 2, P.transform = Fb[x] + _[53] + (y - B) + \"px,\" + (y - z) + \"px,\" + y + \"px) \") : (J(P, m, m), x = g.createTexture(), g.activeTexture(Mc), g.bindTexture(ma, x), g.texParameteri(ma, g.TEXTURE_WRAP_T, g.CLAMP_TO_EDGE), g.texParameteri(ma, g.TEXTURE_WRAP_S, g.CLAMP_TO_EDGE), g.texParameteri(ma, g.TEXTURE_MAG_FILTER, qb), g.texParameteri(ma, g.TEXTURE_MIN_FILTER, qb), g.texImage2D(ma, 0, cc, cc, Nc, y), g.bindTexture(ma, null), P.texture = x, P.mem = 0);\n P.state = 2;\n p.tiles[w] = P\n }\n Da = !0;\n a.cspreview = p\n }\n }\n\n function e(a, b) {\n t.imagefov = b;\n var c = a.rppano, d = c.w, g = c.h;\n a.stereo && (0 == a.stereoformat ? d >>= 1 : g >>= 1);\n var f = b[0], h = b[1], k = b[2];\n 0 >= f && (f = 360);\n if (0 >= h) {\n var h = f, n = d, l = g, m = 180, m = 4 == a.type ? 2 * Math.atan(h / 2 * (l / n) * Y) / Y : h * l / n;\n 180 < m && (m = 180);\n h = m\n }\n a.hfov = f;\n a.vfov = h;\n a.hres = d;\n a.vres = g;\n c.imgfov = [f, h, k];\n c = -h / 2 + k;\n d = +h / 2 + k;\n 4 == a.type && (d = Math.tan(.5 * h * Y), k = Math.sin(k * Y), c = Math.atan(-d + k) / Y, d = Math.atan(+d + k) / Y);\n a.fovlimits = [-f / 2, +f / 2, c, d]\n }\n\n function g(a, c, d, e) {\n c = ua;\n var f = a.rppano, h = c.createTexture();\n c.activeTexture(Mc);\n c.bindTexture(ma, h);\n c.texParameteri(ma, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE);\n c.texParameteri(ma, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE);\n c.texParameteri(ma, c.TEXTURE_MAG_FILTER, qb);\n c.texParameteri(ma, c.TEXTURE_MIN_FILTER, qb);\n if (d) {\n var t;\n e = d.naturalWidth;\n t = d.naturalHeight;\n f.w = e;\n f.h = t;\n var k = !1, n = !1, l = Q(e) << 1 | Q(t), n = b.opera ? \"\" : F(ja.mipmapping);\n if (n = \"force\" == n || \"auto\" == n && 3 == l)0 == (l & 2) && (k = !0, e = A(e)), 0 == (l & 1) && (k = !0, t = A(t)), c.texParameteri(ma, c.TEXTURE_MIN_FILTER, c.LINEAR_MIPMAP_LINEAR);\n e > ga && (k = !0, e = ga);\n t > ga && (k = !0, t = ga);\n if (k) {\n k = Ja(2);\n k.width = e;\n k.height = t;\n l = k.getContext(\"2d\");\n l.drawImage(d, 0, 0, e, t);\n if (b.ios) {\n var m;\n m = t;\n for (var p = l.getImageData(0, 0, 1, m).data, q = 0, r = m, G = m; G > q;)0 == p[4 * (G - 1) + 3] ? r = G : q = G, G = r + q >> 1;\n m = G / m;\n 0 < m && 1 > m && l.drawImage(d, 0, 0, e, t / m)\n }\n c.texImage2D(ma, 0, cc, cc, Nc, k)\n } else c.texImage2D(ma, 0, cc, cc, Nc, d);\n n && c.generateMipmap(ma);\n f.texvalid = !0\n } else e && (f.videoplugin = e, f.videoready = !1);\n c.bindTexture(ma, null);\n f.texture = h;\n a.rppano = f;\n Da = !0\n }\n\n function f(a) {\n var b = ua, c = a.cspreview;\n if (c)if (a.cspreview = null, b)for (a = 0; 6 > a; a++) {\n var d = c.tiles[a], e = d.texture;\n e && (b.deleteTexture(e), d.texture = null)\n } else a.previewadded && (a.layer.removeChild(c.layer), a.previewadded = !1)\n }\n\n var k = ++X, t = this;\n t.id = k;\n t.image = a;\n t.panoview = null;\n t.type = 0;\n t.cubelabels = _[519].split(\"\");\n t.stereo = !1;\n t.stereoformat = 0;\n t.stereolabels = [\"1\", \"2\"];\n t.done = !1;\n t.ready = !1;\n t.fovlimits = null;\n t.hfov = 0;\n t.vfov = 0;\n t.hres = 0;\n t.vres = 0;\n t.levels = [];\n t.frame = 0;\n t.currentlevel = -1;\n t.viewloaded = !1;\n t.stopped = !1;\n t.suspended = !1;\n t.suspended_h = 0;\n t.alpha = 1;\n t.cspreview = null;\n t.rppano = null;\n t.previewadded = !1;\n t.previewloading = !1;\n t.addToLayer = function (a) {\n if (0 == Sa) {\n var b = Ja(), c = b.style;\n c.position = _[0];\n c.left = 0;\n c.top = 0;\n t.layer = b;\n a.appendChild(b)\n }\n };\n t.addGridPreview = function (a, c, e, g, f, h) {\n a += 1;\n var k = b.desktop ? 1023 : b.tablet || b.webgl ? 511 : 255, n = a < k ? a : k, l = Ja(2);\n l.width = n;\n l.height = n;\n k = n / a;\n e *= k;\n c *= k;\n k = l.getContext(\"2d\");\n k.fillStyle = g;\n k.fillRect(0, 0, n, n);\n k.fillStyle = f;\n for (g = 0; g < a; g += e)k.fillRect(0, g, a, 1);\n for (g = 0; g < a; g += c)k.fillRect(g, 0, 1, a);\n if (h != f)for (k.fillStyle = h, f = 0; f < a; f += e)for (g = 0; g < a; g += c)k.fillRect(g, f, 1, 1);\n setTimeout(function () {\n d(t, null, null, l)\n }, 10)\n };\n t.addCubestripPreview = function (a, b) {\n t.previewloading = !0;\n ra.loadimage(a, function (a) {\n d(t, a, b);\n t.previewloading = !1;\n Xa.previewdone()\n }, function (b) {\n la(3, _[58] + a + _[62]);\n t.previewloading = !1\n })\n };\n t.addCubestripPano = function (a) {\n ra.loadimage(a, function (a) {\n d(t, a, null)\n }, function (b) {\n la(3, _[58] + a + _[62])\n })\n };\n t.addCubeLevel = function (a, b, d, e) {\n b = new l(6, b, b, d, e, t.stereo);\n b.planeurls[0] = a[0];\n b.planeurls[1] = a[1];\n b.planeurls[2] = a[2];\n b.planeurls[3] = a[3];\n b.planeurls[4] = a[4];\n b.planeurls[5] = a[5];\n a = t.levels;\n a.push(b);\n a.sort(u);\n c(t)\n };\n t.addFlatLevel = function (a, b, c, d, e, g, f, k) {\n t.type = 1;\n g = new l(1, d, e, g, f, t.stereo);\n g.planeurls[0] = a;\n g.type = 1;\n g.preview = k;\n h(t, g, !0, b, c, d, e)\n };\n t.addRoundPano = function (a, b, c, d) {\n _[24] == F(a) ? t.type = 4 : t.type = 3;\n t.rppano = new K;\n if (d) {\n if (t.updateFOV = e, g(t, a, null, d), d._panoid = t.id, t.imagefov = c, d.onvideoreadyCB = function () {\n var a = t.rppano;\n a.w = d.videowidth;\n a.h = d.videoheight;\n e(t, t.imagefov);\n p.updateView();\n Xa.havepanosize(t);\n t.ready = !0;\n t.rppano.loading = !1;\n a.videoready = !0\n }, d.havevideosize)d.onvideoreadyCB()\n } else b && ra.loadimage(b, function (b) {\n g(t, a, b);\n e(t, c);\n p.updateView();\n Xa.havepanosize(t);\n t.rppano.loading = !1\n })\n };\n t.finalize = function () {\n t.done = !0;\n c(t)\n };\n t.setblend = function (a) {\n Sa ? t.alpha = a : t.layer && (t.layer.style.opacity = a)\n };\n t.removemainpano = function () {\n };\n t.stop = function () {\n t.stopped = !0\n };\n t.destroy = function () {\n var a = ua;\n f(t);\n if (a) {\n var b = t.rppano;\n if (b) {\n var c = b.texture;\n c && a.deleteTexture(c);\n b.texture = null\n }\n }\n for (var d in ab)(b = ab[d]) && b.pano === t && ea(b);\n a || (t.layer.parentNode.removeChild(t.layer), t.layer = null)\n };\n t.previewcheck = function () {\n var a = t.rppano;\n return a && a.videoplugin ? a.texvalid : t.previewloading || 0 == t.type && null == t.cspreview && 0 < t.levels.length && !t.viewloaded ? !1 : !0\n };\n t.doloading = function () {\n return !1\n };\n t.isloading = function () {\n if (t.previewloading)return !0;\n var a = t.levels, b = a.length;\n if (0 < b) {\n if (0 == t.type && (b = a[0].preview && 1 < b ? 1 : 0, 9 > a[b].mp && !a[b].complete) || !t.viewloaded)return !0\n } else if (a = t.rppano)return a.videoplugin ? a.texvalid : a.loading;\n return !1\n }\n }\n\n function q(a, b, c, d, e, g, f, h) {\n this.id = a;\n this.pano = h;\n this.cubeside = c;\n this.stereo = f;\n this.levelindex = b;\n this.level = g;\n this.h = d;\n this.v = e;\n this.draworder = g ? Yb[c] * g.htiles * g.vtiles + e * g.htiles + d : Yb[c];\n this.url = null;\n this.sh = this.ch = this.sv = 0;\n this.mx = this.texture = this.canvas = this.image = this.elmt = null;\n this.lastusage_on_frame = this.mem = this.retries = this.state = 0;\n this.overlap = this.transform = null;\n g && (a = 2 * ((d + .5) / g.htiles - .5), e = 2 * ((e + .5) / g.vtiles - .5), a += .5 / g.htiles, e += .5 / g.vtiles, 1 == h.type && (a *= Math.tan(.5 * g.hfov * Y), e *= Math.tan(.5 * g.vfov * Y)), 0 == c ? (c = 1, g = e, h = -a) : 1 == c ? (c = -a, g = e, h = -1) : 2 == c ? (c = -1, g = e, h = a) : 3 == c ? (c = a, g = e, h = 1) : 4 == c ? (c = -a, h = -e, g = -1) : (c = -a, h = e, g = 1), a = -Math.atan2(c, h), e = -Math.atan2(-g, Math.sqrt(c * c + h * h)), this.sv = Math.sin(e), e = Math.cos(e), this.ch = Math.cos(a) * e, this.sh = Math.sin(a) * e)\n }\n\n function J(a, b, c) {\n var d = Jc[a.cubeside], e = a.level, g = e.w / 2, f = e.tilesize, h = 1E3 / g, k = 1, t = e.vscale;\n 1 == e.type && (k = Math.tan(.5 * e.hfov * Y));\n var n = (-g + a.h * f + b / 2 + 2 * e.hoffset * g / 90) * h * k, e = (-g + a.v * f + c / 2 + 2 * e.voffset * g / e.hfov) * h * k * t, g = g * h;\n Hc(rd, b / 1E3 * k, 0, 0, 0, c / 1E3 * k * t, 0, 0, 0, 1);\n ye(Zb, n, e, g);\n Ic(rd, Zb);\n b = Zb;\n k = d[1];\n t = -d[0] * Y;\n d = Math.cos(t);\n c = Math.sin(t);\n t = -k * Y;\n k = Math.cos(t);\n t = Math.sin(t);\n Hc(b, k, 0, -t, c * t, d, c * k, d * t, -c, d * k);\n Ic(rd, Zb);\n d = Ma();\n Hc(d, h, 0, 0, 0, h, 0, 0, 0, h);\n Ic(d, rd);\n a.mx = d\n }\n\n function C(a, b, c, d, e, g) {\n var f = [], h = a.length, k, t = !1, n = 0, l;\n for (k = 0; k < h; k++) {\n var m = a.charAt(k), p = m.charCodeAt(0);\n if (37 == p)t = !0, n = 0; else if (48 == p)t ? n++ : f.push(m); else if (t) {\n t = !1;\n l = null;\n 65 <= p && 84 >= p && (p += 32);\n if (108 == p)l = c; else if (115 == p)l = b; else if (116 == p)l = g; else if (117 == p || 120 == p || 99 == p || 104 == p)l = d; else if (118 == p || 121 == p || 114 == p)l = e;\n if (null != l) {\n for (; l.length <= n;)l = \"0\" + l;\n f.push(l)\n } else f.push(\"%\" + m)\n } else t = !1, f.push(m)\n }\n return f.join(\"\")\n }\n\n function Q(a) {\n return 0 == (a & a - 1)\n }\n\n function A(a) {\n a--;\n a |= a >> 1;\n a |= a >> 2;\n a |= a >> 4;\n a |= a >> 8;\n a |= a >> 16;\n a++;\n return a\n }\n\n function H(a, b, c, d, e, g) {\n if (0 < g)setTimeout(function () {\n try {\n H(null, b, c, d, e, 0)\n } catch (a) {\n }\n }, g); else {\n null == a && (a = b.getContext(\"2d\"));\n g = e[0];\n var f = e[1], h = e[2], k = e[3];\n 0 < g && a.drawImage(c, 0, 0, 1, d[1], 0, f, g, d[3]);\n 0 < f && a.drawImage(c, 0, 0, d[0], 1, g, 0, d[2], f);\n 0 < h && a.drawImage(c, d[0] - 1, 0, 1, d[1], g + d[2], f, h, d[3]);\n 0 < k && a.drawImage(c, 0, d[1] - 1, d[0], 1, g, f + d[3], d[2], k)\n }\n }\n\n function qa(a) {\n function d() {\n if (0 < I)Da = !0, setTimeout(d, 0); else if (aa--, null != g && null != g.naturalWidth) {\n var e = g.naturalWidth, f = g.naturalHeight, k = e * f * 4, t = !1;\n 0 == k && (t = !0);\n if (t)a.state = 0, Da = !0; else {\n var n = a.level;\n if (n) {\n n.needsize && (n.w = e, n.h = f, n.tilesize = e > f ? e : f, n.needsize = !1, 1 == n.type ? h(a.pano, n, !1, N.hfov, N.vfov, e, f) : c(a.pano), n.preview && Xa.previewdone());\n n.loadedtiles[a.stereo - 1]++;\n n.complete = n.stereo && ja.stereo ? n.loadedtiles[0] == n.totaltiles && n.loadedtiles[1] == n.totaltiles : n.loadedtiles[0] == n.totaltiles;\n t = 1 == n.htiles * n.vtiles;\n a.state = 2;\n a.lastusage_on_frame = M;\n if (Sa) {\n J(a, e, f);\n var l = ua, m = b.opera ? \"\" : F(ja.mipmapping), p = \"force\" == m;\n if (m = p || \"auto\" == m) {\n if (!Q(e) || !Q(f)) {\n m = 1024;\n t ? (m = 0, p && (m = ga)) : p || Q(n.tilesize) || (m = 0);\n var t = A(e), q = A(f);\n t < m && q < m && (n = Ja(2), n.width = t, n.height = q, m = n.getContext(\"2d\"), m.drawImage(g, 0, 0, t, q), g = n, e = t, f = q)\n }\n m = Q(e) && Q(f)\n }\n m && 0 == p && !b.realDesktop && a.level && 2500 < a.level.h && (m = !1);\n e = l.createTexture();\n l.activeTexture(Mc);\n l.bindTexture(ma, e);\n l.texParameteri(ma, l.TEXTURE_WRAP_T, l.CLAMP_TO_EDGE);\n l.texParameteri(ma, l.TEXTURE_WRAP_S, l.CLAMP_TO_EDGE);\n l.texParameteri(ma, l.TEXTURE_MAG_FILTER, qb);\n l.texParameteri(ma, l.TEXTURE_MIN_FILTER, m ? l.LINEAR_MIPMAP_LINEAR : qb);\n l.texImage2D(ma, 0, cc, cc, Nc, g);\n m && l.generateMipmap(ma);\n l.bindTexture(ma, null);\n a.texture = e;\n a.image = g = null\n } else {\n l = [e, f, e, f];\n p = !1;\n e == f && 1 == n.htiles && (m = ja.hardwarelimit, e + 2 * G > m && (n.w = n.h = l[2] = l[3] = e = f = m - 2 * G, p = !0));\n var r = [0, 0, 0, 0], u = G, w = a.h, v = a.v, n = a.cubeside, x = a.level, P = x.tilesize, m = x.vscale, B = -x.w / 2, y = q = 1;\n 1 == x.type && (q = Math.tan(.5 * x.hfov * Y), n = 6, 2 < u && (u = 2), b.ie || b.desktop && b.safari) && (y = 252);\n 1E3 < -B && 4 < u && (u = 4);\n var z = B, D = z;\n r[2] = u;\n r[3] = u;\n 0 == n || 2 == n ? 0 == w && (r[0] = u) : 1 != n && 3 != n || w != x.vtiles - 1 || (r[2] = 0);\n 0 <= n && 3 >= n ? 0 == v && (r[1] = u) : (w == x.htiles - 1 && (r[2] = 0), v == x.vtiles - 1 && (r[3] = 0));\n a.overlap = r;\n z -= r[0];\n D -= r[1];\n r = (z + w * P) * q;\n v = (D + v * P - 2 * x.voffset * B / x.hfov) * q * m;\n x = q;\n P = q * m;\n 1 < y && (r *= y, v *= y, B *= y, x *= y, P *= y);\n y = \"\" + r;\n r = 0 < y.indexOf(\"e-\") ? r = r.toFixed(18) : y;\n y = \"\" + v;\n v = 0 < y.indexOf(\"e-\") ? v = v.toFixed(18) : y;\n y = \"\" + B;\n B = 0 < y.indexOf(\"e-\") ? B = B.toFixed(18) : y;\n a.transform = Fb[n] + _[53] + r + \"px,\" + v + \"px,\" + B + \"px) \";\n if (1 != q || 1 != m)a.transform += _[429] + x + \",\" + P + \",1) \";\n (q = a.overlap) ? (n = Ja(2), n.width = e + q[0] + q[2], n.height = f + q[1] + q[3], n.style.overflow = _[6], k = n.width * n.height * 4, B = y = 0, m = n.getContext(\"2d\"), q && (y = q[0], B = q[1], H(m, n, g, l, q, t ? 0 : 250)), p ? m.drawImage(g, 0, 0, l[0], l[1], y, B, e, f) : m.drawImage(g, y, B), Ba && m.getImageData(l[0] >> 1, l[1] >> 1, 1, 1), a.canvas = n, a.elmt = n, a.image = g = null) : a.elmt = g;\n a.elmt.style.position = _[0];\n a.elmt.style[Zc] = \"0 0\"\n }\n a.mem = k;\n kb += k;\n if (kb > ca) {\n Da = !0;\n I++;\n for (var E, e = null, f = 0; ;) {\n for (E in ab)f++, k = ab[E], 0 < k.levelindex && 2 <= k.state && k.lastusage_on_frame < M - 1 && (!e || k.lastusage_on_frame < e.lastusage_on_frame) && (e = k);\n if (e) {\n if (ea(e), e = null, kb < ca - 2097152)break\n } else break\n }\n if (f > Math.max(2 * $a.length, 100)) {\n e = {};\n for (E in ab)if (k = ab[E])(0 < k.levelindex || 8 < k.level.mp) && 0 == k.state && k.lastusage_on_frame < M - 2 ? (k.pano = null, k.level = null) : e[E] = k;\n ab = e\n }\n kb > ca && (ia = !0)\n }\n Da = !0;\n I++\n }\n }\n }\n }\n\n function e(b, c) {\n aa--;\n c ? a.state = 4 : a.retries < m.network.retrycount ? (a.retries++, a.state = 0, Da = !0) : (a.state = 4, la(3, _[58] + a.url + _[62]))\n }\n\n if (null != a.pano) {\n null == a.url && (a.url = C(a.level.planeurls[a.level.invplanemapping[a.cubeside]], a.pano.cubelabels[a.cubeside], a.levelindex, String(a.h + a.level.i), String(a.v + a.level.i), a.pano.stereolabels[a.stereo - 1]));\n a.state = 1;\n var g = ra.loadimage(a.url, d, e);\n a.image = g;\n aa++\n }\n }\n\n function ea(a) {\n var b = ua, c = a.texture;\n b && c && b.deleteTexture(c);\n (b = a.elmt) && (c = b.parentNode) && c.removeChild(b);\n c = $a.length;\n for (b = 0; b < c; b++)if ($a[b] == a) {\n $a.splice(b, 1);\n break\n }\n b = a.id;\n ab[b] = null;\n delete ab[b];\n if (b = a.level)b.addedtiles[a.stereo - 1]--, b.completelyadded = b.stereo && ja.stereo ? b.addedtiles[0] == b.totaltiles && b.addedtiles[1] == b.totaltiles : b.addedtiles[0] == b.totaltiles;\n kb -= a.mem;\n a.state = 0;\n a.image = null;\n a.canvas = null;\n a.texture = null;\n a.elmt = null;\n a.pano = null;\n a.level = null\n }\n\n function Ca(a) {\n if (Sa) {\n var b = ua, c = xb, d = a.texture;\n c && d && (b.uniformMatrix4fv(Bb, !1, a.mx), b.bindBuffer(lb, c.vx), b.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0), b.bindBuffer(lb, c.tx), b.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0), b.bindBuffer(Qb, c.ix), b.activeTexture(Mc), b.bindTexture(ma, d), b.drawElements(Kb, c.tcnt, Gb, 0), R++)\n } else a.elmt.style[ib] = pc + a.transform\n }\n\n function S(a, b) {\n var c = new Hb;\n c.x = a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n c.y = a[0] * b[3] + a[1] * b[4] + a[2] * b[5];\n c.z = -2 * (a[0] * b[6] + a[1] * b[7] + a[2] * b[8]);\n return c\n }\n\n function Z(a, c) {\n var d = a.panoview, g = a.id, f, h, k, t, n, l, r, G, u, P, y, z, D, E, C, A, Ba, F, H, J, K, S, Q = !1, L, ea, Z, N, I, V, X, ba, ka, kb, T, ca, ga, ia, ha = !1, oa = !1, va = !0, sa = Ta();\n if (Sa) {\n var ra = ua, za = Qa, Ha = ya, Ea = a.panoview, La = Ea.z, Aa = b.gl.width * xa + .5 | 0, Ka = b.gl.height * xa + .5 | 0;\n if (0 < c) {\n var Na = Aa, Aa = Aa >> 1, za = za >> 1;\n ra.viewport(2 == c ? Aa : 0, 0, 1 == c ? Aa : Na - Aa, Ka)\n } else ra.viewport(0, 0, Aa, Ka);\n var wb = 1 / (.5 * za), Oa = -1 / (.5 * Ha), Ma = Ea.zf, $b = 0 < c ? Number(ja.stereooverlap) * za * .5 * (1 == c ? 1 : -1) : 0, qd = Ea.yf, Xa = Math.min(Ma / 200, 1), ib = 0 < Ma ? Ea.ch : 0;\n xe(Tc, wb, 0, 0, 0, 0, Oa, 0, 0, 0, 0, 65535 / 65536, 1, 0, 0, 65535 / 65536 - 1, 0);\n xe(Kd, La, 0, 0, 0, 0, La, 0, 0, $b, qd, 1, 0, Ma * $b, Ma * qd, Ma, 1);\n Ic(Kd, Tc);\n if (0 < c) {\n var Ee = m.webVR;\n Ee && Ee.enabled && Ee.prjmatrix(c, Kd)\n }\n ra.uniform1i(pb, 0);\n ra.uniform1f(bb, 1);\n ra.uniform1f(Ya, Xa);\n ra.uniform1f(Za, ib);\n kd(Gc, tc);\n Ic(Gc, Kd);\n ra.uniformMatrix4fv(jb, !1, Gc);\n ra.uniformMatrix3fv(vb, !1, Db);\n var Jd = Ia.obj0, Pb = Ia.obj;\n null == Jd && (Jd = v(500, 1), Pb = v(500, 19), x(Jd), x(Pb), Ia.obj0 = Jd, Ia.obj = Pb);\n xb = 10 < Ma ? Pb : Jd\n }\n var Wa = c;\n 0 == Wa && (Wa = 1);\n a.stereo && (g += \"t\" + Wa);\n f = +d.h;\n h = -d.v;\n k = d.z;\n t = Ga - f * Y;\n n = -h * Y;\n l = Math.sin(n);\n r = Math.cos(n);\n G = Math.cos(t) * r;\n u = Math.sin(t) * r;\n if (Ib) {\n var cb = [G, l, u];\n Zd(rd, Ib);\n Fd(rd, cb);\n G = cb[0];\n l = cb[1];\n u = cb[2]\n }\n P = a.levels;\n z = P.length;\n D = a.currentlevel;\n a.viewloaded = !1;\n if (5E3 > k) {\n var ff = 1 / Math.max(100, k), mb = Math.abs(Math.cos(f * Y)), Ab = Math.cos(.25 * Ga);\n if (1E-14 > mb || mb > Ab - 1E-14 && mb < Ab + 1E-14 || mb > 1 - 1E-14 || 1E-14 > r || r > 1 - 1E-14)f += (.5 + .5 * Math.random()) * ff * (.5 > Math.random() ? -1 : 1), h += (.5 + .5 * Math.random()) * ff * (.5 > Math.random() ? -1 : 1);\n b.firefox && (l < -(1 - 1E-14) && (h += .5), l > +(1 - 1E-14) && (h -= .5))\n }\n pc = _[53] + Qa / 2 + \"px,\" + ya / 2 + _[207] + d.yf.toFixed(16) + _[232] + k.toFixed(16) + (0 < b.iosversion && 5 > b.iosversion ? \"\" : \"px\") + _[106] + (-d.r).toFixed(16) + _[86] + k.toFixed(16) + _[295] + h.toFixed(16) + _[284] + f.toFixed(16) + \"deg) \" + hc;\n if (0 < z) {\n var qb = 1 == pa(ja.loadwhilemoving) ? !0 : 0 == a.hasmoved || wa, ob = D;\n 7 <= aa && (qb = !1);\n if (a.stopped)qb = !1; else {\n 9 > P[0].mp && (0 == P[0].complete && (ob = 0, Q = !0), 0 == qb && 0 == P[0].completelyadded && (ob = 0, qb = Q = !0));\n var Cb = m.lockmultireslevel | 0;\n m.downloadlockedlevel && 0 <= Cb && Cb < z && (Q = !0, 0 == P[Cb].complete && (qb = !0))\n }\n ta && 5 < ob && (ob -= 3, ta = !1, Da = !0);\n if (qb) {\n Fa = sa;\n wa = !1;\n ca = null;\n ia = 1E6;\n for (E = ob; 0 <= E; E--) {\n y = P[E];\n Ba = y.w;\n F = y.h;\n H = y.tilesize;\n J = y.htiles;\n K = y.vtiles;\n var ha = !0, Zb = y.planeurls.length;\n for (A = 0; A < Zb; A++)if (C = y.planemapping[A], S = Q ? [0, 0, 1, 1] : d.vr[C]) {\n kb = \"p\" + g + \"l\" + E + \"s\" + Yb[C] + \"h\";\n var Fb = 1, Hb = 1;\n 1 == a.type && (Fb = 1 / Math.tan(.5 * y.hfov * Y), Hb = 1 / Math.tan(.5 * y.vfov * Y));\n L = Math.floor((Fb * (S[0] - .5) + .5) * Ba / H);\n ea = Math.ceil((Fb * (S[2] - .5) + .5) * Ba / H);\n 0 > L && (L = 0);\n ea > J && (ea = J);\n Z = Math.floor((Hb * (S[1] - .5) + .5) * F / H);\n N = Math.ceil((Hb * (S[3] - .5) + .5) * F / H);\n 0 > Z && (Z = 0);\n N > K && (N = K);\n for (ba = Z; ba < N; ba++)for (X = L; X < ea; X++) {\n ka = kb + X + \"v\" + ba;\n T = ab[ka];\n T || (T = new q(ka, E, C, X, ba, y, Wa, a), ab[ka] = T, ha = !1);\n if (0 == T.state)ga = Math.acos(G * T.ch + u * T.sh + l * T.sv), ga < ia && (ca = T, ia = ga), ha = !1; else if (1 == T.state)ha = !1; else if (2 == T.state) {\n 0 == Sa && Ca(T);\n var nb = T, ub = null, Eb = null;\n 0 == Sa && (ub = nb.elmt, Eb = a.layer);\n if (0 != Sa || ub.parentNode != Eb) {\n for (var gc = $a.length, Jb = -1, Ob = void 0, Lb = void 0, Fc = nb.pano, Hc = nb.levelindex, Jc = nb.draworder, qc = 0, uc = 0, Lb = 0; Lb < gc; Lb++)if (Ob = $a[Lb], Ob.pano === Fc && (qc = Ob.levelindex, uc = Ob.draworder, qc >= Hc && uc >= Jc)) {\n Jb = Lb;\n break\n }\n 0 > Jb ? (ub && Eb.appendChild(ub), $a.push(nb)) : (ub && Eb.insertBefore(ub, $a[Jb].elmt), $a.splice(Jb, 0, nb));\n var xc = nb.level;\n xc.addedtiles[nb.stereo - 1]++;\n xc.completelyadded = xc.stereo && ja.stereo ? xc.addedtiles[0] == xc.totaltiles && xc.addedtiles[1] == xc.totaltiles : xc.addedtiles[0] == xc.totaltiles\n }\n T.state = 3\n }\n T.lastusage_on_frame = M\n }\n }\n 0 == ta && 0 == ha && E == ob && 1E3 < sa - W && (ta = !0, W = sa);\n if (ha) {\n a.viewloaded = !0;\n break\n }\n }\n ca && qa(ca)\n }\n }\n 1 != a.viewloaded ? (oa = !0, U = sa) : 0 < U && 200 > sa - U && (oa = !0);\n Sa && 10 < d.zf && (oa = !0);\n if (oa) {\n var ac = a.cspreview;\n if (ac) {\n var Ec = ac.layer;\n for (I = 0; 6 > I; I++) {\n var sc = ac.tiles[I];\n Ca(sc);\n 0 == Sa && 2 == sc.state && (Ec.appendChild(sc.elmt), sc.state = 3)\n }\n 0 != Sa || a.previewadded || (0 == a.layer.childNodes.length ? a.layer.appendChild(Ec) : a.layer.insertBefore(Ec, a.layer.childNodes[0]), a.previewadded = !0)\n }\n } else 0 == Sa && a.previewadded && ((ac = a.cspreview) && a.layer.removeChild(ac.layer), a.previewadded = !1);\n a.previewloading && (va = !1);\n if (va)for (V = $a.length, I = 0; I < V; I++)if (T = $a[I], !(T.pano !== a || a.stereo && T.stereo != Wa))if (T.levelindex > D) {\n 0 == Sa && T.pano.layer.removeChild(T.elmt);\n T.state = 2;\n $a.splice(I, 1);\n I--;\n V--;\n var yc = T.level;\n yc.addedtiles[T.stereo - 1]--;\n yc.completelyadded = yc.stereo && ja.stereo ? yc.addedtiles[0] == yc.totaltiles && yc.addedtiles[1] == yc.totaltiles : yc.addedtiles[0] == yc.totaltiles\n } else Ca(T);\n if (0 == z && Sa) {\n var yb = a.rppano;\n if (2 < a.type && yb) {\n var Xc = yb.texture, vc = yb.imgfov, Rb = yb.videoplugin, Mb = null, Lc = !1;\n Rb && (Rb._panoid != a.id ? Rb = yb.videoplugin = null : Da = p.haschanged = !0);\n if (Xc && vc) {\n var Zc = vc[0], ad = vc[1], gd = vc[2];\n Lc = Rb ? (Mb = Rb.videoDOM) ? yb.videoready : yb.texvalid : !0;\n if (Lc) {\n var Pc = Ia.objS, hd = a.type + \"/\" + Zc + \"x\" + ad + \"/\" + gd;\n if (hd != Ia.objS_i) {\n var id = a.type, Uc = Zc, sd = ad, Qc = gd, zc = Pc, bd = 15453, td = 10302, dc = 3E4;\n zc && zc.tcnt != dc && (zc = null);\n var de = zc ? zc.vxd : new Float32Array(bd), Vc = zc ? zc.txd : new Float32Array(td), cd = zc ? zc.ixd : new Uint16Array(dc), Ac, Bc, jd, Wc, ld, md, Yc, ud, ee, nd, od, pd, Ld, fe, Uc = Uc * Y, sd = sd * Y, Qc = Qc * Y;\n 4 == id ? (sd = 1E3 * Math.tan(.5 * sd), Qc = 500 * Math.sin(1 * Qc)) : Qc = -Qc + .5 * Ga;\n for (Bc = bd = td = 0; 50 >= Bc; Bc++)for (Yc = 1 - Bc / 50, 4 == id ? (ee = 1, Wc = sd * (Yc - .5) + Qc) : (ud = (Bc / 50 - .5) * sd + Qc, ee = Math.sin(ud), nd = Math.cos(ud), Wc = 500 * nd), Ac = 0; 100 >= Ac; Ac++)ud = (Ac / 100 - .5) * Uc + Ga, od = Math.sin(ud), pd = Math.cos(ud), jd = 500 * pd * ee, ld = 500 * od * ee, md = 1 - Ac / 100, de[bd] = jd, de[bd + 1] = Wc, de[bd + 2] = ld, bd += 3, Vc[td] = md, Vc[td + 1] = Yc, td += 2;\n for (Bc = dc = 0; 50 > Bc; Bc++)for (Ac = 0; 100 > Ac; Ac++)Ld = 101 * Bc + Ac, fe = Ld + 101, cd[dc] = Ld, cd[dc + 1] = Ld + 1, cd[dc + 2] = fe, cd[dc + 3] = fe, cd[dc + 4] = Ld + 1, cd[dc + 5] = fe + 1, dc += 6;\n var Pc = new w(3E4, de, Vc, cd), dd = Ia.objS, ec = Pc;\n if (dd && dd.tcnt == ec.tcnt) {\n ec.vx = dd.vx;\n ec.tx = dd.tx;\n ec.ix = dd.ix;\n var vd = ua;\n vd.bindBuffer(lb, ec.vx);\n vd.bufferData(lb, ec.vxd, wc);\n vd.bindBuffer(lb, ec.tx);\n vd.bufferData(lb, ec.txd, wc);\n vd.bindBuffer(Qb, ec.ix);\n vd.bufferData(Qb, ec.ixd, wc)\n } else dd && e(dd), x(ec);\n Ia.objS = Pc;\n Ia.objS_i = hd\n }\n var fc = ua;\n fc.uniformMatrix4fv(Bb, !1, yb.mx);\n a.stereo && fc.uniformMatrix3fv(vb, !1, 0 == a.stereoformat ? 1 >= Wa ? jc : kc : 1 >= Wa ? Nb : bc);\n fc.bindBuffer(lb, Pc.vx);\n fc.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0);\n fc.bindBuffer(lb, Pc.tx);\n fc.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0);\n fc.bindBuffer(Qb, Pc.ix);\n var ge = null;\n if (Mb) {\n var Fe = 60 * Mb.currentTime, Ge = Fe != Mb._uf || b.android && b.chrome && 0 == Mb.paused;\n Rb.isseeking && 0 == Rb.iPhoneMode && (Ge = !1);\n 4 > Mb.readyState && (Ge = !1, Mb._uf = -1);\n if (Ge && 0 == Va)if (Va++, Mb._uf = 4 > Mb.readyState ? -1 : Fe, b.ie && b.desktop) {\n null == fa && (fa = Ja(2));\n if (fa.width != yb.w || fa.height != yb.h)fa.width = yb.w, fa.height = yb.h;\n fa.getContext(\"2d\").drawImage(Mb, 0, 0, yb.w, yb.h);\n ge = fa\n } else ge = Mb && Mb.paused && 5 > (Fe | 0) && Rb.posterDOM ? Rb.posterDOM : Mb\n }\n fc.activeTexture(Mc);\n fc.bindTexture(ma, Xc);\n if (ge)try {\n fc.texImage2D(ma, 0, cc, cc, Nc, ge), yb.texvalid = !0\n } catch (Md) {\n Md = \"\" + Md, Rb && Rb.error != Md && (Rb.error = Md, la(3, Md))\n }\n yb.texvalid && (fc.drawElements(Kb, Pc.tcnt, Gb, 0), R++)\n }\n }\n }\n }\n if (Sa) {\n var $c = (\"\" + ja.hotspotrenderer).toLowerCase();\n if (\"both\" == $c || _[30] == $c || \"auto\" == $c && 0 < c) {\n var Sb = ua, he = xb, ie = m.webVR, He = ie && ie.enabled, Ed = He ? ie.getcursor() : null, Nd = a.panoview, Vd = Nd.h, Wd = Nd.v, Xd = Nd.r, Yd = Nd.z / (He ? 2E3 : ya) * 2, Ie = 1, Ie = Ie * (1 + Nd.zf / 1E3), Gd = Ua.getArray(), $d = Gd.length, je, na, Od, Hd = 2 > c, Je = null;\n if (0 < c) {\n var be = He ? ie.eyetranslt(c) : 0;\n ye(rc, -be, 0, 0);\n kd(oc, ic);\n Ic(oc, rc);\n ye(rc, -p.tz, p.ty, -p.tx);\n ef(oc, rc);\n Je = oc\n }\n Sb.uniformMatrix4fv(jb, !1, Kd);\n Sb.bindBuffer(lb, he.vx);\n Sb.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0);\n Sb.bindBuffer(lb, he.tx);\n Sb.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0);\n Sb.bindBuffer(Qb, he.ix);\n for (je = 0; je < $d; je++)if ((na = Gd[je]) && na._visible && na.loaded && na._distorted && (0 != na.keep || !a.suspended)) {\n var ke = na.GL;\n ke || (na.GL = ke = {tex: null});\n var Id = !0;\n if (Hd) {\n var ed = na._scale, Pd = na._depth;\n isNaN(Pd) && (Pd = 1E3, Id = !1);\n na === Ed && (Pd = Ed.hit_depth, ed *= Pd / 1E3);\n var Cc = na._flying, Ke = (1 - Cc) * na._ath, Le = (1 - Cc) * na._atv, Me = (1 - Cc) * na.rotate;\n 0 < Cc && (Ke += Cc * nc(Vd, na._ath), Le += Cc * nc(Wd, na._atv), Me += Cc * nc(Xd, na.rotate));\n 1 == na.scaleflying && (ed = ed * (1 - Cc) + ed / Yd * Cc * Ie);\n var zb = wd, Ne = na._width / 1E3 * ed * 2, Oe = na._height / 1E3 * ed * 2, ce = na.rz, yf = na.ry, Pe = 2 * na.ox, Qe = 2 * na.oy, Re = Pd, ve = -Me, we = -Ke + 90, ze = Le, Ae = -na.tz, Be = na.ty, Ce = na.tx, rb = void 0, Qd = void 0, xd = void 0, yd = void 0, zd = void 0, Ad = void 0, Bd = void 0, sb = void 0, db = void 0, eb = void 0, fb = void 0, gb = void 0, hb = void 0, rb = na.rx * Y, Qd = Math.cos(rb), xd = Math.sin(rb), rb = yf * Y, yd = Math.cos(rb), zd = Math.sin(rb), rb = ce * Y, Ad = Math.cos(rb), Bd = Math.sin(rb), rb = -ze * Y, sb = Math.cos(rb), db = Math.sin(rb), rb = -we * Y, eb = Math.cos(rb), fb = Math.sin(rb), rb = -ve * Y, gb = Math.cos(rb), hb = Math.sin(rb), Tb = void 0, Ub = void 0, Vb = void 0, Tb = Ne * (yd * Ad - zd * xd * Bd), Ub = Ne * (yd * Bd + zd * xd * Ad), Vb = Ne * zd * Qd;\n zb[0] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) - Vb * sb * fb;\n zb[1] = Tb * hb * sb + Ub * gb * sb + Vb * db;\n zb[2] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) - Vb * sb * eb;\n zb[3] = 0;\n Tb = -Oe * Qd * Bd;\n Ub = Oe * Qd * Ad;\n Vb = Oe * xd;\n zb[4] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) + Vb * sb * fb;\n zb[5] = Tb * hb * sb + Ub * gb * sb - Vb * db;\n zb[6] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) + Vb * sb * eb;\n zb[7] = 0;\n Tb = zd * Ad + yd * xd * Bd;\n Ub = zd * Bd - yd * xd * Ad;\n Vb = yd * Qd;\n zb[8] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) + Vb * sb * fb;\n zb[9] = Tb * hb * sb + Ub * gb * sb - Vb * db;\n zb[10] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) + Vb * sb * eb;\n zb[11] = 0;\n zb[12] = Pe * (gb * eb + hb * db * fb) + Qe * (gb * db * fb - hb * eb) + Re * sb * fb + Ae;\n zb[13] = Pe * hb * sb + Qe * gb * sb - Re * db + Be;\n zb[14] = Pe * (hb * db * eb - gb * fb) + Qe * (hb * fb + gb * db * eb) + Re * sb * eb + Ce;\n zb[15] = 1;\n kd(na.MX, wd)\n } else kd(wd, na.MX);\n if (!(.01 > na._alpha)) {\n Je && Id ? Ic(wd, Je) : Ic(wd, ic);\n Sb.uniformMatrix4fv(Bb, !1, wd);\n var Rc = Db, Cd = na.crop;\n na.pressed && na._ondowncrop ? Cd = na._ondowncrop : na.hovering && na._onovercrop && (Cd = na._onovercrop);\n if (Cd)if (Cd != na.C_crop) {\n na.C_crop = Cd;\n var le = (\"\" + Cd).split(\"|\"), gf = na.loader.naturalWidth, hf = na.loader.naturalHeight, Rc = [1, 0, 0, 0, 1, 0, 0, 0, 0];\n Rc[0] = (1 * le[2] - 1) / gf;\n Rc[2] = (1 * le[0] + .5) / gf;\n Rc[4] = (1 * le[3] - 1) / hf;\n Rc[5] = (1 * le[1] + .5) / hf;\n na.C_crop_matrix = Rc\n } else Rc = na.C_crop_matrix;\n Sb.uniformMatrix3fv(vb, !1, Rc);\n Sb.uniform1f(bb, na._alpha);\n Sb.activeTexture(Mc);\n if (Od = ke.tex)Sb.bindTexture(ma, Od); else if (Od = B(na))ke.tex = Od;\n Od && (Sb.drawElements(Kb, he.tcnt, Gb, 0), R++)\n }\n }\n if (Hd && M & 1) {\n var Se = m.webVR, jf = Se && Se.enabled, lc = jf ? Se.getcursor() : null, Te = Ua.getArray(), kf = Te.length, Sc, tb, lf = !jf, Rd = [0, 0, 1], mf = !1, me = lc ? lc.depth : 2E3, nf = lc && lc.enabled;\n if (lf) {\n var nf = !0, mc = O.x, De = O.y;\n if (ja.stereo) {\n var ne = Qa >> 1, of = ne * Number(ja.stereooverlap);\n mc < ne ? (mc += ne >> 1, mc -= of >> 1) : (mc -= ne >> 1, mc += of >> 1)\n }\n var Ue = p.inverseProject(mc, De), Rd = [-Ue.x, -Ue.y, -Ue.z]\n }\n var Wb = Kc, Dd = Rd, Ve = Dd[0], We = Dd[1], Xe = Dd[2];\n Dd[0] = Ve * Wb[0] + We * Wb[4] + Xe * Wb[8] + Wb[12];\n Dd[1] = Ve * Wb[1] + We * Wb[5] + Xe * Wb[9] + Wb[13];\n Dd[2] = Ve * Wb[2] + We * Wb[6] + Xe * Wb[10] + Wb[14];\n for (Sc = kf - 1; 0 <= Sc; Sc--)if ((tb = Te[Sc]) && tb._visible && tb.loaded && tb._distorted && tb !== lc && (tb._hit = !1, nf && tb._enabled)) {\n var Ye, Dc = tb.MX, pf = 0, Xb = 1E3, Ze = Rd[0], $e = Rd[1], af = Rd[2], oe = Xb * Dc[0], pe = Xb * Dc[1], qe = Xb * Dc[2], re = Xb * Dc[4], se = Xb * Dc[5], te = Xb * Dc[6], bf = Dc[12] - (oe + re) / 2, cf = Dc[13] - (pe + se) / 2, df = Dc[14] - (qe + te) / 2, Sd = $e * te - af * se, Td = af * re - Ze * te, Ud = Ze * se - $e * re, fd = oe * Sd + pe * Td + qe * Ud;\n if (-1E-6 > fd || 1E-6 < fd)fd = 1 / fd, Xb = (bf * Sd + cf * Td + df * Ud) * -fd, 0 <= Xb && 1 >= Xb && (Sd = df * pe - cf * qe, Td = bf * qe - df * oe, Ud = cf * oe - bf * pe, Xb = (Ze * Sd + $e * Td + af * Ud) * fd, 0 <= Xb && 1 >= Xb && (pf = (re * Sd + se * Td + te * Ud) * fd));\n Ye = pf;\n if (1 < Ye) {\n mf = tb._hit = !0;\n me = Ye;\n break\n }\n }\n lc && (me = Math.max(me, 200) - 100, lc.hit_depth = me);\n for (Sc = 0; Sc < kf; Sc++)if (tb = Te[Sc]) {\n var ue = tb._hit;\n ue != tb.hovering && (tb.hovering = ue, da.callaction(ue ? tb.onover : tb.onout, tb), lc && da.callaction(ue ? lc.onover : lc.onout, tb))\n }\n 0 == O.down && ae.update(!1, lf && mf)\n }\n }\n }\n }\n\n function B(a) {\n var b = a.loader, c = null;\n if (a.jsplugin)b = null; else if (c = b.src, 1 > b.naturalWidth || 1 > b.naturalHeight)b = null;\n if (!b)return null;\n var d = ua, e = null;\n if (e = Ec[c])e.cnt++, e = e.tex; else {\n e = d.createTexture();\n d.bindTexture(ma, e);\n d.texParameteri(ma, d.TEXTURE_WRAP_T, d.CLAMP_TO_EDGE);\n d.texParameteri(ma, d.TEXTURE_WRAP_S, d.CLAMP_TO_EDGE);\n d.texParameteri(ma, d.TEXTURE_MAG_FILTER, qb);\n d.texParameteri(ma, d.TEXTURE_MIN_FILTER, qb);\n try {\n d.texImage2D(ma, 0, mb, mb, Nc, b), Ec[c] = {cnt: 1, tex: e}\n } catch (g) {\n la(3, g)\n }\n }\n a._GL_onDestroy || (a._GL_onDestroy = function () {\n var b = a.loader;\n if (b && !a.jsplugin) {\n var c = ua, b = b.src, d = Ec[b];\n d && 0 == --d.cnt && (c.deleteTexture(d.tex), d.tex = null, Ec[b] = null, delete Ec[b]);\n a._GL_onDestroy = null\n }\n });\n return e\n }\n\n var t = Oa, G = 0, Ba = !1, P = 0, Fa = 0, wa = !1, ta = !1, W = 0, U = 0, Da = !1, M = 0, Va = 0, R = 0, I = 0, X = 0, aa = 0, ba = 0, T = 16.666, ab = {}, $a = [], kb = 0, ca = 52428800, ia = !1, fa = null, Sa = !1, ka = null, ua = null, Ia = null, ga = 0, xb = null, sa = !1, xa = 1, Ha = !1, oa = null, va = null;\n d = a = null;\n var ha = [], La = null, Aa = null, Ea = !1, za = null, Ka = null, Na = [], Pa, Ra, Ya, Za, bb, pb, jb, Bb, vb, Db = [1, 0, 0, 0, 1, 0, 0, 0, 0], Nb = [1, 0, 0, 0, .5, 0, 0, 0, 0], bc = [1, 0, 0, 0, .5, .5, 0, 0, 0], jc = [.5, 0, 0, 0, 1, 0, 0, 0, 0], kc = [.5, 0, .5, 0, 1, 0, 0, 0, 0], ma, Wa, Ab, Mc, lb, Qb, mb, cc, Nc, Gb, Oc, Kb, wc, qb, Yb = [1, 3, 0, 2, 4, 5, 6], Fb = \"rotateY(90deg) ;;rotateY(-90deg) ;rotateY(180deg) ;rotateX(-90deg) ;rotateX(90deg) ;\".split(\";\"), pc = \"\", hc = \"\", Ib = null;\n t.requiereredraw = !1;\n t.isloading = !1;\n t.setup = function (a) {\n var c, d = null;\n if (2 == a) {\n var e = {};\n if (0 <= F(Jb.so.html5).indexOf(_[196]) || b.mac && b.firefox)e.preserveDrawingBuffer = !0;\n b.mobile && (e.antialias = !1);\n e.depth = !1;\n e.stencil = !1;\n var f = Jb.so.webglsettings;\n f && (!0 === f.preserveDrawingBuffer && (e.preserveDrawingBuffer = !0), !0 === f.depth && (e.depth = !0), !0 === f.stencil && (e.stencil = !0));\n f = F(Jb.so.wmode);\n _[36] == f || _[142] == f ? (sa = !0, e.alpha = !0, e.premultipliedAlpha = !1) : e.alpha = !1;\n try {\n for (ka = Ja(2), ka.style.position = _[0], ka.style.left = 0, c = ka.style.top = 0; 4 > c && !(d = ka.getContext([_[30], _[83], _[116], _[112]][c], e)); c++);\n } catch (h) {\n }\n ka && d && (ua = d, Ia = {}, ma = d.TEXTURE_2D, Wa = d.COLOR_BUFFER_BIT | d.DEPTH_BUFFER_BIT | d.STENCIL_BUFFER_BIT, Ab = d.FRAMEBUFFER, Mc = d.TEXTURE0, lb = d.ARRAY_BUFFER, Qb = d.ELEMENT_ARRAY_BUFFER, mb = d.RGBA, cc = d.RGB, Nc = d.UNSIGNED_BYTE, Gb = d.UNSIGNED_SHORT, Oc = d.FLOAT, Kb = d.TRIANGLES, wc = d.STATIC_DRAW, qb = d.LINEAR, k() && (c = m.bgcolor, d.clearColor((c >> 16 & 255) / 255, (c >> 8 & 255) / 255, (c & 255) / 255, 1 - (c >> 24) / 255, sa ? 1 : 0), d.disable(d.DEPTH_TEST), d.depthFunc(d.NEVER), d.enable(d.BLEND), d.blendFunc(d.SRC_ALPHA, d.ONE_MINUS_SRC_ALPHA), d.enable(d.CULL_FACE), d.cullFace(d.FRONT), ga = d.getParameter(d.MAX_TEXTURE_SIZE), !b.desktop && 4096 < ga && (ga = 4096), 2048 >= ga && b.firefox && !b.mac && !b.android && (b.css3d = !1), b.ios && (ga = 2048), V.panolayer.appendChild(ka), t.infoString = _[423], m.webGL = {\n canvas: ka,\n context: d,\n ppshaders: Na,\n createppshader: function (a, b) {\n return g(null, a, b)\n },\n useProgram: n\n }, Sa = !0));\n 0 == Sa && (Ia = ua = ka = null, a = 1)\n }\n 1 == a && (t.infoString = \"\", b.webgl = !1);\n G = b._tileOverlap | 0;\n if (6 < b.iosversion || b.mac && \"7\" <= b.safariversion)Ba = !0;\n b.multiressupport = b.androidstock && 0 == b.webgl ? !1 : !0;\n (a = b.webgl) && b.android && (b.androidstock ? a = !1 : b.chrome && 38 > b.chromeversion && (a = !1));\n 9 <= b.iosversion && document.addEventListener(_[52], E, !1);\n b.panovideosupport = a;\n b.buildList()\n };\n t.reset = function () {\n M = 0\n };\n var ob = null, Cb = null;\n t.unload = function () {\n var b;\n m.webGL && (m.webGL.canvas = null, m.webGL.context = null, m.webGL = null);\n var c = ua;\n if (c && Ia) {\n c.bindTexture(ma, null);\n c.bindBuffer(lb, null);\n c.bindBuffer(Qb, null);\n c.bindFramebuffer(Ab, null);\n c.deleteProgram(Ia.sh);\n c.deleteShader(Ia.vs);\n c.deleteShader(Ia.ps);\n Ia.obj0 && (e(Ia.obj0), e(Ia.obj));\n Ia.objS && e(Ia.objS);\n Ia = null;\n for (b = 0; 6 > b; b++)ha[b] && ha[b].prg && (c.deleteProgram(ha[b].prg), ha[b].prg = null, ha[b] = null);\n c.deleteBuffer(a);\n c.deleteBuffer(d);\n var g = [oa, va, za, Ka];\n for (b = 0; b < g.length; b++)g[b] && (g[b].fb && c.deleteFramebuffer(g[b].fb), g[b].tex && c.deleteTexture(g[b].tex), g[b] = null)\n }\n Sa = !1;\n ua = ka = null\n };\n t.size = function (a, c) {\n if (Sa) {\n var d = (b.android && 0 == b.androidstock || b.blackberry || b.silk || b.mac) && 0 == b.hidpi ? b.pixelratio : 1;\n if (b.desktop || b.ios || b.ie)d = L.devicePixelRatio;\n isNaN(d) && (d = 1);\n if (!b.desktop && 1 != d)a:{\n var e = d, d = [320, 360, 400, 480, 640, 720, 768, 800, 1024, 1080, 1280, 1366, 1440, 1920, 2560], g, f, h = a * e;\n f = d.length;\n for (g = 0; g < f; g++)if (2 > Math.abs(d[g] - h)) {\n d = d[g] / a;\n break a\n }\n d = e\n }\n d *= 1;\n e = a * d + .25 | 0;\n d = c * d + .25 | 0;\n if (g = m.webVR)if (g = g.getsize(e, d))e = g.w, d = g.h;\n e *= ja.framebufferscale;\n d *= ja.framebufferscale;\n ka.style.width = a + \"px\";\n ka.style.height = c + \"px\";\n if (ka.width != e || ka.height != d) {\n ka.width = e;\n ka.height = d;\n g = ua.drawingBufferWidth | 0;\n f = ua.drawingBufferHeight | 0;\n b.desktop && b.chrome && 300 == g && 150 == f && (g = f = 0);\n if (0 >= g || 0 >= f)g = e, f = d;\n ua.viewport(0, 0, g, f);\n b.gl = {width: g, height: f}\n }\n } else b.gl = {width: 0, height: 0}\n };\n t.fps = function () {\n var a = Ta();\n if (0 < ba) {\n var b = a - ba;\n if (5 < b && 500 > b) {\n var c = Math.min(b / 160, .75);\n T = T * (1 - c) + b * c;\n 0 < T && (nd = 1E3 / T, ja.currentfps = nd)\n }\n 0 == I && (ja.r_ft = .9 * ja.r_ft + .1 * b)\n }\n ba = a\n };\n var Fc = !1;\n t.startFrame = function () {\n Da = !1;\n R = Va = 0;\n Fc = !0;\n ca = m.memory.maxmem << 20;\n if (Sa) {\n var a = ua;\n (Ea = 0 < Na.length) ? (a.clear(Wa), za = r(za), a.bindFramebuffer(Ab, za.fb), a.clear(Wa), R = 0) : a.clear(Wa)\n }\n };\n t.finishFrame = function () {\n M++;\n I = 0;\n if (Sa) {\n var a = ua;\n if (Ea) {\n var c, d = Na.length, e = za, g = null;\n 1 < d && (g = Ka = r(Ka));\n a.disable(a.BLEND);\n for (c = 0; c < d; c++)e.drawcalls = R, R = 0, a.bindFramebuffer(Ab, g ? g.fb : null), a.clear(Wa), y(e, Na[c], 1), e = g, g = c + 1 == d - 1 ? null : c & 1 ? Ka : za;\n a.enable(a.BLEND)\n }\n b.androidstock && a.finish()\n }\n m.memory.usage = kb >> 20;\n Fc = !1\n };\n t.createPano = function (a) {\n return new z(a)\n };\n var Eb = 0, gc = 0, nb = 0, ic = Ma(), Kc = Ma(), Ob = Ma(), tc = Ma(), Lb = Ma(), Tc = Ma(), Kd = Ma(), Gc = Ma(), oc = Ma(), rd = Ma(), Zb = Ma();\n t.setblendmode = function (a) {\n if (Sa) {\n var c = ua;\n La = null;\n var d = !0, e = null, g = null, f = 1, h = da.parseFunction(a);\n if (h)switch (h[0].toUpperCase()) {\n case \"BLEND\":\n (e = h[2]) || (e = _[324]);\n La = ha[0];\n break;\n case _[359]:\n g = Number(h[2]);\n f = Number(h[3]);\n (e = h[4]) || (e = _[319]);\n isNaN(g) && (g = 16777215);\n isNaN(f) && (f = 2);\n La = ha[1];\n n(La.prg);\n break;\n case _[363]:\n g = Number(h[2]);\n (e = h[3]) || (e = _[317]);\n isNaN(g) && (g = 0);\n La = ha[2];\n n(La.prg);\n break;\n case _[365]:\n var d = !1, k = Number(h[2]);\n a = Number(h[3]);\n e = h[4];\n isNaN(k) && (k = 0);\n isNaN(a) && (a = .2);\n a = 0 > a ? 0 : 1 < a ? 1 : a;\n e || (e = _[43]);\n var t = h = 0, l = Math.cos(k * Y), m = Math.sin(k * Y);\n 0 > m && (t = 1, k += 90);\n 0 > l && (h = 1, k += 0 > m ? 90 : -90);\n k = Math.sqrt(2) * Math.cos((45 - k) * Y);\n l *= k;\n m *= k;\n k = 1 / (l * l + m * m);\n La = ha[4];\n n(La.prg);\n c.uniform3f(La.fp, l * k, m * k, (-h * l - t * m) * k);\n c.uniform1f(La.bl, .5 * a);\n break;\n case _[404]:\n d = !1;\n a = Number(h[2]);\n (e = h[3]) || (e = _[272]);\n isNaN(a) && (a = 2);\n La = ha[3];\n n(La.prg);\n c.uniform2f(La.ct, .5, .5);\n c.uniform1f(La.zf, a);\n break;\n case _[399]:\n d = !1, a = Number(h[2]), k = Number(h[3]), t = Number(h[4]), (e = h[5]) || (e = _[43]), isNaN(a) && (a = .2), isNaN(k) && (k = .2), isNaN(t) && (t = 0), a = -1 > a ? -1 : 1 < a ? 1 : a, k = 0 > k ? 0 : 1 < k ? 1 : k, t = 0 > t ? 0 : 1 < t ? 1 : t, h = b.gl.width / b.gl.height, l = 1, isNaN(h) && (h = 1), h *= h, 0 > a ? h *= 1 + a : l *= 1 - a, La = ha[5], n(La.prg), c.uniform2f(La.ap, h, l), c.uniform1f(La.bl, .5 * k), c.uniform1f(La.zf, t)\n }\n if (null == La || 0 == d && ja.stereo)La = ha[0], g = null;\n null !== g && c.uniform3f(La.cc, f * (g >> 16 & 255) / 255, f * (g >> 8 & 255) / 255, f * (g & 255) / 255);\n null == e && (e = _[43]);\n Aa = ac.getTweenfu(e);\n Ha = 0 == b.realDesktop && 1 < b.pixelratio || 33 < ja.r_ft\n }\n };\n t.snapshot = function (a, b) {\n if (Sa) {\n var c = ua;\n if (a) {\n var d = oa;\n oa = va;\n va = d\n }\n Ha && (xa = .707);\n va = r(va);\n c.bindFramebuffer(Ab, va.fb);\n R = 0;\n c.clear(Wa);\n d = 0;\n b && (d = Fc, Fc = !0, t.renderpano(b, 1), Fc = d, d = 1 - b.alpha);\n a && y(oa, La, b ? 1 - b.alpha : a.alpha) && R++;\n va.drawcalls = R;\n c.bindFramebuffer(Ab, Ea ? za.fb : null);\n xa = 1;\n null == a && (a = {});\n a.alpha = d;\n return a\n }\n return null\n };\n t.rendersnapshot = function (a, b) {\n if (0 == Fc)return a;\n if (null == ua || null == va || b && 1 <= b.alpha)return null;\n var c = a.alpha = b ? 1 - b.alpha : a.alpha;\n y(va, La, c);\n return a\n };\n t.renderpano = function (a, c) {\n if (0 != Fc) {\n a.frame = M;\n var d = !1, e = ua;\n if (2 == c && e) {\n if (a.stopped && oa && oa.done && oa.pano == a.id) {\n oa.have = !0;\n return\n }\n Ha && (xa = .707);\n if (oa = r(oa))d = !0, oa.have = !0, oa.pano = a.id, oa.done = !1, oa.alpha = a.alpha, oa.drawcalls = 0, e.bindFramebuffer(Ab, oa.fb), e.clear(Wa)\n }\n var g = a.panoview = a.stopped && a.panoview ? a.panoview : p.getState(a.panoview), f = g.h, h = g.v, k = g.r, t = g.z, l = a.hasmoved = f != Eb || h != gc || t != nb;\n t != nb && (ia = !1);\n var q = Ta();\n if (l) {\n if (\"auto\" == F(ja.loadwhilemoving)) {\n var G = q - cb;\n 200 < q - Fa && 0 == O.down && 200 < G && (wa = !0)\n }\n P = q\n } else 10 > q - P && (a.hasmoved = l = !0);\n Da = l;\n Eb = f;\n gc = h;\n nb = t;\n l = ic;\n t = Kc;\n Yd(l, f, h, k);\n kd(tc, l);\n hc = \"\";\n Ib = null;\n if (a.image && a.image.prealign && (f = (\"\" + a.image.prealign).split(\"|\"), 3 == f.length)) {\n var h = Number(f[0]), u = -Number(f[1]), k = -Number(f[2]);\n if (!isNaN(h) && !isNaN(u) && !isNaN(k)) {\n hc = _[125] + u.toFixed(4) + _[271] + k.toFixed(4) + _[269] + h.toFixed(4) + \"deg) \";\n Ib = Ob;\n Zd(t, l);\n l = tc;\n t = Lb;\n kd(l, ic);\n var f = Ib, w, G = -k * Y, k = Math.cos(G), q = Math.sin(G), G = -u * Y, u = Math.cos(G);\n w = Math.sin(G);\n G = -h * Y;\n h = Math.cos(G);\n G = Math.sin(G);\n Hc(f, h * u + G * q * w, G * k, -h * w + G * q * u, -G * u + h * q * w, h * k, G * w + h * q * u, k * w, -q, k * u);\n ef(l, Ib)\n }\n }\n Zd(t, l);\n l = (b.android && 0 == b.androidstock || b.blackberry || b.ios) && 0 == b.hidpi ? b.pixelratio : 1;\n b.ios && b.retina && (l = 1.5);\n 1.4 < l && (l = 1.4);\n h = 1 / (g.z / (.5 * ya));\n f = g.zf;\n 200 < f && (h = Math.atan(h), f = Math.min(h + Math.asin(f / 1E3 * Math.sin(h)), 1), isNaN(f) && (f = 1), h = Math.tan(f));\n .5 > h && (l = 1);\n b.desktop && (l = b.pixelratio);\n l = .25 * Ga * (Qa * l / Math.sin(Math.atan(Qa / ya * h)) + ya * l / h);\n 0 == a.type ? l *= 2 / Ga : 1 == a.type && (f = a.levels, l *= 2 / Ga, l *= Math.tan(.5 * f[f.length - 1].vfov * Y));\n h = l;\n l = 0;\n k = a.levels;\n f = k.length;\n q = 1 + (N ? parseFloat(N.multiresthreshold) : 0);\n isNaN(q) && (q = 1);\n .1 > q && (q = .1);\n h = Math.ceil(h * q);\n if (0 < f) {\n for (; !(0 == k[l].preview && k[l].h >= h);)if (l++, l >= f) {\n l = f - 1;\n break\n }\n ia && 0 < l && --l;\n h = m.lockmultireslevel;\n _[470] == F(h) && (m.lockmultireslevel = h = \"\" + l);\n h |= 0;\n 0 <= h && h < f && (l = h);\n a.currentlevel != l && (a.currentlevel = l)\n }\n 1 == c && (l = a.currentlevel, m.multireslevel = 0 < l && a.levels[0].preview ? l - 1 : l);\n a:{\n k = t;\n t = g.zf;\n h = 1 / (g.z / (.5 * uc));\n if (0 < t && (l = Math.atan(h), h = Math.tan(l + Math.asin(t / 1E3 * Math.sin(l))), isNaN(h) || 0 >= h)) {\n t = [0, 0, 1, 1];\n g.vr = [t, t, t, t, t, t];\n break a\n }\n q = h * ya / Qa;\n G = g.yf / ya * 2 * q;\n t = [h, q + G, -1];\n l = [-h, q + G, -1];\n f = [-h, -q + G, -1];\n h = [h, -q + G, -1];\n Fd(k, t);\n Fd(k, l);\n Fd(k, f);\n Fd(k, h);\n for (var q = 1, v = null, G = Array(40), u = [null, null, null, null, null, null], k = 0; 6 > k; k++) {\n var x = [], B = [];\n x.push(S(t, ub[k]));\n x.push(S(l, ub[k]));\n x.push(S(f, ub[k]));\n x.push(S(h, ub[k]));\n var z = 0, E = 0, D = 0, C = 0;\n for (w = E = 0; 4 > w; w++)v = x[w], E = v.x, D = v.y, C = v.z / 2, E = 1 * (E > -C) + 8 * (E < C) + 64 * (D < C) + 512 * (D > -C) + 4096 * (-.1 > -C), G[w] = E, z += E;\n w = 0 != (z & 18724);\n if (0 == z)for (w = 0; 4 > w; w++)v = x[w], B.push(v.x / v.z), B.push(v.y / v.z); else if (w)continue; else {\n for (var z = 4, v = G, A = 0, Ba = [], W = [], H, J = 0, J = 0; 5 > J; J++) {\n var ta = 1 << 3 * J;\n for (w = 0; w < z; w++) {\n var D = (w + z - 1) % z, E = x[D], K = x[w], D = v[D], Q = v[w], L = 0;\n 0 == (Q & ta) ? (L |= 2, D & ta && (L |= 1)) : 0 == (D & ta) && (L |= 1);\n L & 1 && (4 == J ? q = (.1 - E.z / 2) / (K.z - E.z) / 2 : 3 == J ? q = (-E.y - E.z / 2) / (K.y - E.y + (K.z - E.z) / 2) : 2 == J ? q = (E.z / 2 - E.y) / (K.y - E.y - (K.z - E.z) / 2) : 1 == J ? q = (E.z / 2 - E.x) / (K.x - E.x - (K.z - E.z) / 2) : 0 == J && (q = (-E.z / 2 - E.x) / (K.x - E.x + (K.z - E.z) / 2)), H = new Hb, H.x = E.x + (K.x - E.x) * q, H.y = E.y + (K.y - E.y) * q, H.z = E.z + (K.z - E.z) * q, E = H.x, D = H.y, C = H.z / 2, E = 1 * (E > -C) + 8 * (E < C) + 64 * (D < C) + 512 * (D > -C) + 4096 * (-.1 > -C), Ba.push(H), W.push(E), A++);\n L & 2 && (Ba.push(K), W.push(Q), A++)\n }\n z = A;\n x = Ba;\n v = W;\n A = 0;\n Ba = [];\n W = []\n }\n for (w = 0; w < z; w++)v = x[w], B.push(v.x / v.z), B.push(v.y / v.z)\n }\n x = z = 9;\n A = v = -9;\n Ba = B.length;\n if (4 < Ba) {\n for (w = 0; w < Ba; w++)B[w] += .5;\n for (w = 0; w < Ba; w += 2)B[w + 0] < z && (z = B[w + 0]), B[w + 1] < x && (x = B[w + 1]), B[w + 0] > v && (v = B[w + 0]), B[w + 1] > A && (A = B[w + 1]);\n z > v || 0 > z && 0 > v || 1 < z && 1 < v || x > A || 0 > x && 0 > A || 1 < x && 1 < A || (0 > z && (z = 0), 0 > x && (x = 0), 1 < v && (v = 1), 1 < A && (A = 1), u[k] = [z, x, v, A])\n }\n }\n g.vr = u\n }\n Ia && (n(Ia.sh), e.blendFunc(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA), sa && e.colorMask(!0, !0, !0, !0));\n ja.stereo ? (Z(a, 1), Z(a, 2)) : Z(a, 0);\n g = 0;\n m.downloadlockedlevel && 0 < (m.lockmultireslevel | 0) && (g = m.lockmultireslevel | 0);\n t = a.levels;\n 0 < t.length && (g = t[g], sc.progress = g.stereo && ja.stereo ? (g.loadedtiles[0] + g.loadedtiles[1]) / (2 * g.totaltiles) : g.loadedtiles[0] / g.totaltiles);\n d && (e.bindFramebuffer(Ab, Ea ? za.fb : null), e.clear(Wa), oa.drawcalls = R, oa.done = !0, xa = 1);\n 1 == c && e && oa && 0 < oa.drawcalls && oa.done && oa.have && (oa.have = !1, y(oa, La, 1 - qc));\n sa && e.colorMask(!0, !0, !0, !1)\n }\n };\n t.handleloading = function () {\n return Da ? 2 : 0\n };\n var Jc = [[0, 180], [0, 90], [0, 0], [0, 270], [-90, 90], [90, 90]], ub = [[-1, 0, 0, 0, 1, 0, 0, 0, 1], [0, 0, 1, 0, 1, 0, 1, 0, 0], [1, 0, 0, 0, 1, 0, 0, 0, -1], [0, 0, -1, 0, 1, 0, -1, 0, 0], [0, 0, 1, -1, 0, 0, 0, 1, 0], [0, 0, 1, 1, 0, 0, 0, -1, 0]], Ec = {}, wd = Ma(), rc = Ma()\n })();\n var sf = function () {\n function a(a, b, f) {\n a = F(a).charCodeAt(0);\n return 118 == a ? f : 104 == a ? b : 100 == a ? Math.sqrt(b * b + f * f) : Math.max(b, f * d.mfovratio)\n }\n\n var d = this;\n d.haschanged = !1;\n d.r_rmatrix = Ma();\n (function () {\n var a = \"hlookat vlookat camroll fov maxpixelzoom fisheye fisheyefovlink architectural tx ty tz\".split(\" \"), b = [_[268], _[193]], f;\n for (f in a)va(d, a[f], 0);\n for (f in b)va(d, b[f], !1);\n va(d, _[474], \"VFOV\");\n d.continuousupdates = !1;\n ha(d, _[477], function () {\n return \"\" + d._pannini\n }, function (a) {\n var b = Number(a), b = isNaN(b) ? pa(a) ? 1 : 0 : 0 > b ? 0 : 1 < b ? 1 : b;\n d._pannini = b;\n d.haschanged = !0\n });\n ha(d, _[364], function () {\n return d._fisheye\n }, function (a) {\n d.fisheye = a\n });\n ha(d, _[215], function () {\n return d._fisheyefovlink\n }, function (a) {\n d.fisheyefovlink = a\n });\n ha(d, _[305], function () {\n var a = d.hlookatmax, b = d.hlookatmin, g = M && M.fovlimits;\n isNaN(b) && (b = g ? g[0] : -180);\n isNaN(a) && (a = g ? g[1] : 180);\n return a - b\n }, function (a) {\n });\n ha(d, _[304], function () {\n var a = d.vlookatmax, b = d.vlookatmin, g = M && M.fovlimits;\n isNaN(b) && (b = g ? g[2] : -90);\n isNaN(a) && (a = g ? g[3] : 90);\n return a - b\n }, function (a) {\n })\n })();\n d.defaults = function () {\n d._hlookat = 0;\n d._vlookat = 0;\n d._architectural = 0;\n d._architecturalonlymiddle = !0;\n d._fov = 90;\n d._fovtype = b.desktop ? \"VFOV\" : \"MFOV\";\n d._camroll = 0;\n d.mfovratio = 4 / 3;\n d._maxpixelzoom = Number.NaN;\n d._stereographic = !0;\n d._pannini = 0;\n d._fisheye = 0;\n d._fisheyefovlink = .5;\n d.fovmin = 1;\n d.fovmax = 179;\n d.r_zoom = 1;\n d.r_yoff = 0;\n d.r_zoff = 0;\n d.haschanged = !1;\n d.limitview = \"auto\";\n d.hlookatmin = Number.NaN;\n d.hlookatmax = Number.NaN;\n d.vlookatmin = Number.NaN;\n d.vlookatmax = Number.NaN;\n d._limits = null\n };\n d.inverseProject = function (a, b) {\n var f, e, m, p, v, r, y, l;\n m = -1E3;\n v = m / d.r_zoom;\n f = (a - Qa / 2) * v;\n e = (b - ya / 2 - d.r_yoff) * v;\n v = 1 / Math.sqrt(f * f + e * e + m * m);\n f *= v;\n e *= v;\n m *= v;\n p = d.r_zoff;\n 0 < p && (0 == d._stereographic && (l = Math.atan(1E3 / p) / Y - 1, (1 > -m ? Math.acos(-m) / Y : 0) > l && (r = -e, y = f, v = r * r + y * y, 0 < v && (v = 1 / Math.sqrt(v), r *= v, y *= v), l *= Y, v = Math.sin(l), f = v * y, e = -v * r, m = -Math.cos(l))), r = p * m, y = r * r - (p * p - 1E6), 0 < y && (v = -r + Math.sqrt(y), f *= v, e *= v, m = m * v - -p, v = 1 / Math.sqrt(f * f + e * e + m * m), f *= v, e *= v, m *= v));\n p = new Hb;\n p.x = f;\n p.y = e;\n p.z = m;\n return p\n };\n var m = d.fovRemap = function (b, d, f, e, m) {\n e || (e = Qa);\n m || (m = ya);\n b = Math.tan(b / 360 * Ga);\n d = a(d, e, m);\n f = a(f, e, m);\n return b = 360 * Math.atan(b * f / d) / Ga\n }, f = Ma();\n d.screentosphere = function (a, b) {\n var k = new Hb;\n if (ja.stereo) {\n var e = Qa / 2, m = e / 2 * (1 - Number(ja.stereooverlap));\n a = a < e ? a + m : a - m\n }\n e = d.inverseProject(a * X, b * X);\n Zd(f, d.r_rmatrix);\n nb(f, e);\n e = [Math.atan2(e.x, e.z) / Y + 270, Math.atan2(-e.y, Math.sqrt(e.x * e.x + e.z * e.z)) / Y];\n 180 < e[0] && (e[0] -= 360);\n k.x = e[0];\n k.y = e[1];\n k.z = 0;\n return k\n };\n d.spheretoscreen = function (a, b) {\n var f = new Hb, e = (180 - a) * Y, m = b * Y;\n f.x = 1E3 * Math.cos(m) * Math.cos(e);\n f.z = 1E3 * Math.cos(m) * Math.sin(e);\n f.y = 1E3 * Math.sin(m);\n nb(d.r_rmatrix, f);\n var e = f.z + d.r_zoff, p = m = tc;\n 10 <= e && (e = d.r_zoom / e, m = (f.x * e + .5 * Qa) / X, p = (f.y * e + .5 * ya) / X + d.r_yoff);\n f.x = m;\n f.y = p;\n return f\n };\n d.updateView = function () {\n var a = d._maxpixelzoom;\n if (!isNaN(a) && 0 != a) {\n var f = 1E-6;\n if (M && M.ready) {\n var k = M.vres, e = M.vfov;\n 0 == M.type && (k = k * Math.PI * .5);\n if (50 < k && 0 < e) {\n var f = Qa, w = ya, a = 360 / Math.PI * Math.atan(Math.tan(2 * Math.atan(1 / (2 / Math.PI * k * a / (e / 180) / (.5 * f)))) / (f / w));\n if (isNaN(a) || 1E-4 > a)a = d.fovmax;\n 90 < a && (a = 90);\n f = m(a, \"VFOV\", d._fovtype)\n }\n }\n d.fovmin = f\n }\n var e = d._fov, f = d._hlookat, w = d._vlookat, a = d._camroll, x = b.webgl ? d._fisheye : 0, v = d._fisheyefovlink, r = d._stereographic, k = 0, y = 0 == ia.bouncinglimits || 0 == Pa.isBouncing();\n y && (e < d.fovmin && (e = d.fovmin), e > d.fovmax && (e = d.fovmax));\n 179 < e && (e = 179);\n if (0 < x) {\n var l = m(e, d._fovtype, \"VFOV\");\n r ? (170 < e && (e = 170), k = 1E3 * x * Math.sin(Math.pow(Math.min(l / 130, 1), 2 * v) * Ga * .5)) : (x += Math.pow(Math.min(x, 1), 10) / 10, k = x * Math.sin(Math.pow(l / 180, v) * Ga * .5), k *= 3E3 * k)\n }\n var u = F(d.limitview), h = M && M.fovlimits, c = 0, K = 0, D = 0, v = Number(d.hlookatmin), l = Number(d.hlookatmax), z = Number(d.vlookatmin), q = Number(d.vlookatmax);\n \"auto\" == u && (v = l = z = q = Number.NaN);\n isNaN(v) && (v = h ? h[0] : -180);\n isNaN(l) && (l = h ? h[1] : 180);\n isNaN(z) && (z = h ? h[2] : -90);\n isNaN(q) && (q = h ? h[3] : 90);\n \"auto\" == u && (p.hlookatmin = v, p.hlookatmax = l, p.vlookatmin = z, p.vlookatmax = q, u = \"range\");\n q < z && (h = z, z = q, q = h);\n l < v && (h = v, v = l, l = h);\n var J = !1, C = !1, L = _[123] != u, A = !0, A = 180, h = l - v, H = q - z;\n switch (u) {\n case \"off\":\n case _[31]:\n h = 360;\n v = -180;\n l = 180;\n z = -1E5;\n q = 1E5;\n L = !1;\n break;\n case _[379]:\n L = !0;\n case _[123]:\n C = !0;\n case \"range\":\n if ((J = 360 > h) || 180 > H)D = m(e, d._fovtype, \"HFOV\"), D > h && (A = !0, C && m(h, \"HFOV\", \"VFOV\") < H && (A = J = !1), D = h, L && A && (e = m(D, \"HFOV\", d._fovtype))), c = m(e, d._fovtype, \"VFOV\"), c > H && (A = !0, C && m(H, \"VFOV\", \"HFOV\") < h && (A = J = !1), c = H, L && A && (e = m(c, \"VFOV\", d._fovtype))), m(e, d._fovtype, \"HFOV\"), A = c, K = c *= .5, D *= .5, -89.9 >= z && (c = 0), 89.9 <= q && (K = 0)\n }\n u = [360, -180, 180, c + K, z + c, q - K];\n y && (w - c < z ? (w = z + c, Pa.stopFrictions(2)) : w + K > q && (w = q - K, Pa.stopFrictions(2)));\n J && (D = -w * Y, K = .5 * Qa, c = .5 * ya, z = c / Math.tan(A * Y * .5), 0 < D && (c = -c), K = 1 / Math.sqrt(1 + (K * K + c * c) / (z * z)), c = c / z * K, z = Math.acos(-K * Math.sin(D) + c * Math.cos(D)) - Ga / 2, isNaN(z) && (z = -Ga / 2), K = Math.acos((K * Math.cos(D) + c * Math.sin(D)) / Math.sin(z + Ga / 2)), isNaN(K) && (K = 0), D = 180 * K / Ga, 2 * D >= h && (L && (D = m(h, \"HFOV\", d._fovtype), D < e && (e = D)), D = h / 2));\n 360 > h && (L = !1, u[0] = h, u[1] = v + D, u[2] = l - D, y && (f - D < v ? (f = v + D, L = !0) : f + D > l && (f = l - D, L = !0)), L && (Pa.stopFrictions(1), 0 != za.currentmovingspeed && (za.currentmovingspeed = 0, za.speed *= -1)));\n d._limits = u;\n d._fov = e;\n d._hlookat = f;\n d._vlookat = w;\n e = m(e, d._fovtype, \"MFOV\");\n 0 < x && 0 == r ? (l = m(e, \"MFOV\", \"VFOV\"), x = Math.asin(1E3 * Math.sin(l * Y * .5) / (1E3 + .72 * k)), x = .5 * ya / Math.tan(x)) : x = .5 * uc / Math.tan(e / 114.591559);\n d.hfov = m(e, \"MFOV\", \"HFOV\");\n d.vfov = m(e, \"MFOV\", \"VFOV\");\n d.r_fov = e;\n d.r_zoom = x;\n d.r_zoff = k;\n d.r_vlookat = w;\n r = Number(d._architectural);\n y = 0;\n 0 < r && (1 == d._architecturalonlymiddle && (y = Math.abs(w / 90), 1 < y && (y = 1), y = Math.tan(y * Ga * .25), r *= 1 - y), y = r * (-w * (ya / Math.tan(m(e, \"MFOV\", \"VFOV\") / 114.591559)) / 90), w *= 1 - r);\n d.r_yoff = y;\n Yd(d.r_rmatrix, f, w, a);\n d.r_hlookat = f;\n d.r_vlookatA = w;\n d.r_roll = a;\n e = 0 == b.realDesktop && b.ios && 5 > b.iosversion || b.androidstock || be ? \"\" : \"px\";\n ic = 0 == b.simulator && (b.iphone || b.ipad) ? .25 : 1;\n b.ie && (ic = p.r_zoom / 1E3 * 10);\n if (b.androidstock || b.android && b.chrome || b.blackberry)ic = p.r_zoom / 1E3 / 4;\n $d = _[303] + x + e + _[106] + -a + _[86] + (x - k / 2 * ic) + \"px) \";\n d.haschanged = !1\n };\n d.getState = function (a) {\n null == a && (a = {h: 0, v: 0, z: 0, r: 0, zf: 0, yf: 0, ch: 0, vr: null});\n a.h = d._hlookat;\n a.v = d.r_vlookatA;\n a.z = d.r_zoom;\n a.r = d._camroll;\n a.zf = d.r_zoff;\n a.yf = d.r_yoff;\n a.ch = d._pannini;\n return a\n };\n d.defaults()\n }, uf = function () {\n var a = this;\n a.defaults = function () {\n a.usercontrol = \"all\";\n a.mousetype = _[27];\n a.touchtype = _[485];\n a.mouseaccelerate = 1;\n a.mousespeed = 10;\n a.mousefriction = .8;\n a.mouseyfriction = 1;\n a.mousefovchange = 1;\n a.keybaccelerate = .5;\n a.keybspeed = 10;\n a.keybfriction = .9;\n a.keybfovchange = .75;\n a.keybinvert = !1;\n a.fovspeed = 3;\n a.fovfriction = .9;\n a.camrollreset = !0;\n a.keycodesleft = \"37\";\n a.keycodesright = \"39\";\n a.keycodesup = \"38\";\n a.keycodesdown = \"40\";\n a.keycodesin = \"\";\n a.keycodesout = \"\";\n a.touchfriction = .87;\n a.touchzoom = !0;\n a.zoomtocursor = !1;\n a.zoomoutcursor = !0;\n a.disablewheel = !1;\n a.bouncinglimits = !1;\n a.preventTouchEvents = !0\n };\n a.defaults()\n }, vf = function () {\n var a = this;\n a.standard = _[5];\n a.dragging = \"move\";\n a.moving = \"move\";\n a.hit = _[18];\n a.update = function (b, m) {\n void 0 === b && (b = O.down);\n var f = F(ia.mousetype);\n V.controllayer.style.cursor = b ? _[27] == f ? a.moving : a.dragging : m ? a.hit : a.standard\n }\n }, rf = function () {\n var a = this;\n a.haschanged = !1;\n a.mode = _[50];\n a.pixelx = 0;\n a.pixely = 0;\n a.pixelwidth = 0;\n a.pixelheight = 0;\n va(a, _[50], _[66]);\n va(a, \"x\", \"0\");\n va(a, \"y\", \"0\");\n va(a, _[49], \"100%\");\n va(a, _[28], \"100%\");\n va(a, \"left\", \"0\");\n va(a, \"top\", \"0\");\n va(a, _[3], \"0\");\n va(a, _[2], \"0\");\n a.calc = function (b, m) {\n var f = 1 / X, g = _[71] == F(a.mode), n = g ? a._left : a._x, k = g ? a._top : a._y, e = g ? a._right : a._width, p = g ? a._bottom : a._height, n = 0 < n.indexOf(\"%\") ? parseFloat(n) / 100 * b * f : Number(n), e = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * b * f : Number(e), k = 0 < k.indexOf(\"%\") ? parseFloat(k) / 100 * m * f : Number(k), p = 0 < p.indexOf(\"%\") ? parseFloat(p) / 100 * m * f : Number(p), n = n / f, k = k / f, e = e / f, p = p / f;\n g ? (e = b - n - e, p = m - k - p) : (g = F(a._align), 0 <= g.indexOf(\"left\") || (n = 0 <= g.indexOf(_[3]) ? b - e - n : (b - e) / 2 + n), 0 <= g.indexOf(\"top\") || (k = 0 <= g.indexOf(_[2]) ? m - p - k : (m - p) / 2 + k));\n a.pixelx = Math.round(n * f);\n a.pixely = Math.round(k * f);\n g = !1;\n n = Math.round(e);\n e = Math.round(p);\n if (Qa != n || ya != e)g = !0, Qa = n, ya = e;\n a.pixelwidth = n * f;\n a.pixelheight = e * f;\n a.haschanged = !1;\n return g\n }\n }, Wc = !1, Ob = function () {\n function a() {\n var a = c._alpha;\n _[1] == c._type && (a *= qc);\n var b = 255 * a | 0;\n b == c._aa || c.GL || (c.sprite && (c.sprite.style.opacity = a, c._aa = b), c._poly && (c._poly.style.opacity = a, c._aa = b));\n c._autoalpha && (a = 0 < a, a != c._visible && (c.visible = a))\n }\n\n function d() {\n if (c.sprite && null != c._zorder) {\n var a = parseInt(c._zorder);\n !isNaN(a) && 0 <= a ? (c.sprite.style.zIndex = J + a, c._zdeep = a, c._deepscale = 100 / (200 + a)) : (c._zdeep = 0, c._deepscale = .5)\n }\n _[1] == c._type && (Wc = !0)\n }\n\n function p() {\n c.sprite && (c.sprite.style.overflow = c._maskchildren ? _[6] : _[12], z && b.safari && u())\n }\n\n function f(a, b) {\n b && (b = a._enabled) && _[15] == a.type && (b = 0 != a.bgcapture);\n a._enabledstate = 1 * b + 2 * a._handcursor;\n var c = a.sprite.style;\n c.cursor = b && a._handcursor ? _[18] : _[5];\n c.pointerEvents = b ? \"auto\" : \"none\";\n 0 == b && a.hovering && (a.hovering = !1);\n if (c = a._childs) {\n var d, e, g;\n e = c.length;\n for (d = 0; d < e; d++)(g = c[d]) && g.sprite && f(g, b)\n }\n }\n\n function g() {\n if (c.sprite) {\n var a = c._enabled;\n z && (a &= c.bgcapture);\n if (a && c._parent)a:{\n for (a = n(c._parent); a;) {\n if (0 == a._enabled || 0 == a.children) {\n a = !1;\n break a\n }\n if (a._parent)a = n(a._parent); else break\n }\n a = !0\n }\n 1 * a + 2 * c._handcursor != c._enabledstate && f(c, a)\n }\n }\n\n function n(a) {\n var b = null;\n if (a) {\n var b = a = F(a), c = xa, d = a.indexOf(\"[\");\n 0 < d && (b = a.slice(0, d), _[1] == b && (c = Ua), a = a.slice(d + 1, a.indexOf(\"]\")));\n if (\"stage\" == b)return null == Ra.sprite && (Ra.sprite = V.viewerlayer, Ra.loaded = !0), Ra;\n if (_[468] == b)return null == Za.sprite && (a = Ja(), b = a.style, b.position = _[0], b.width = \"100%\", b.height = \"100%\", b.overflow = _[6], b.zIndex = \"0\", b.pointerEvents = \"none\", V.controllayer.parentNode.insertBefore(a, V.controllayer), Za.sprite = a, Za.loaded = !0), Za;\n b = c.getItem(a)\n }\n return b\n }\n\n function k(a) {\n if (c._parent != a) {\n if (c._parent) {\n var b = n(c._parent);\n if (b) {\n var d = b._childs;\n if (d) {\n var e, f;\n f = d.length;\n for (e = 0; e < f; e++)if (d[e] === c) {\n d.splice(e, 1);\n f--;\n break\n }\n 0 == f && (d = null);\n b._childs = d;\n b.poschanged = !0\n }\n }\n }\n a && ((b = n(a)) ? b.sprite ? (null == b._childs && (b._childs = []), b._use_css_scale = !1, c._use_css_scale = !1, b._childs.push(c), b.sprite.appendChild(c.sprite), b.poschanged = !0) : setTimeout(function () {\n c._parent = null;\n k(a)\n }, 16) : a = null);\n null == a && V.pluginlayer.appendChild(c.sprite);\n c._parent = a;\n c.poschanged = !0;\n g()\n }\n }\n\n function e(a) {\n (a = this.kobject) && 0 == D && (a = a.url, 0 < F(a).indexOf(\".swf\") ? la(2, c._type + \"[\" + c.name + _[78] + Vd(a)) : (a && _[74] == a.slice(0, 5) && 50 < a.length && (a = a.slice(0, 50) + \"...\"), la(3, c._type + \"[\" + c.name + _[85] + a)))\n }\n\n function w(a) {\n if (S && (Pa.trackTouch(a), ba(L, a.type, w, !0), _[4] == a.type ? (aa.body.style.webkitUserSelect = aa.body.style.backupUserSelect, ba(L, _[10], x, !0), ba(L, _[4], w, !0)) : (ba(L, b.browser.events.touchmove, x, !0), ba(L, b.browser.events.touchend, w, !0)), S.pressed)) {\n S.pressed = !1;\n if (S._ondowncrop || S._onovercrop)S.hovering && S._onovercrop ? h(S, S._onovercrop) : h(S, S._crop);\n da.callaction(S.onup, S);\n K || da.blocked || da.callaction(S.onclick, S)\n }\n }\n\n function x(a, c) {\n var d = a.changedTouches && 0 < a.changedTouches.length ? a.changedTouches[0] : a, e = d.pageX, d = d.pageY;\n !0 === c ? I = [e, d] : I ? 0 == K && (e -= I[0], d -= I[1], Math.sqrt(e * e + d * d) >= (b.touchdevice ? 11 : 4) && (K = !0)) : (I = null, ba(L, a.type, x, !0))\n }\n\n function v(a, d) {\n var e = a.timeStamp | 0, f = !0;\n switch (a.type) {\n case _[34]:\n case _[8]:\n case _[16]:\n 1 == d && (e = _[15] == S.type, y(S) && (!e || e && S.bgcapture) && S._handcursor && (c.sprite.style.cursor = _[18]));\n e = S.sprite;\n for (f = 0; e;) {\n var g = e.kobject;\n if (g) {\n var k = g._enabled;\n 0 == b.pointerEvents && (k = y(g));\n if (0 == k || 0 < f && 0 == g.children)return;\n f++;\n e = e.parentNode\n } else break\n }\n for (f = S.sprite; f;) {\n if (g = f.kobject)g.enabled && 0 == g.hovering && (g.hovering = !0, 0 == g.pressed && g._onovercrop && h(g, g._onovercrop), da.blocked || da.callaction(g.onover, g)); else break;\n f = f.parentNode\n }\n break;\n case _[35]:\n case _[9]:\n case _[17]:\n for (e = (f = a.relatedTarget) ? f.kobject : null; f && null == e;)if (f = f.parentNode)e = f.kobject; else break;\n for (f = S.sprite; f;) {\n if (g = f.kobject) {\n for (var k = !1, l = e; l;) {\n if (g == l) {\n k = !0;\n break\n }\n if (l.sprite && l.sprite.parentNode)l = l.sprite.parentNode.kobject; else break\n }\n if (0 == k)1 == g.hovering && (g.hovering = !1, 0 == g.pressed && g._onovercrop && h(g, g._crop), da.callaction(g.onout, g)); else break\n } else break;\n f = f.parentNode\n }\n break;\n case _[7]:\n if (500 < e && 500 > e - kc) {\n kc = 0;\n break\n }\n if (f = 0 == (a.button | 0))aa.body.style.backupUserSelect = aa.body.style.webkitUserSelect, aa.body.style.webkitUserSelect = \"none\", x(a, !0), R(L, _[4], w, !0), R(L, _[10], x, !0), K = !1, S.pressed = !0, S._ondowncrop && h(S, S._ondowncrop), da.blocked || da.callaction(S.ondown, S);\n break;\n case b.browser.events.touchstart:\n kc = e;\n Pa.trackTouch(a);\n if (Pa.isMultiTouch())break;\n K = !1;\n if (f = 0 == (a.button | 0))x(a, !0), R(L, b.browser.events.touchend, w, !0), R(L, b.browser.events.touchmove, x, !0), S.pressed = !0, S._ondowncrop && h(S, S._ondowncrop), da.blocked || da.callaction(S.ondown, S)\n }\n }\n\n function r(a, b) {\n if (a === b)return !1;\n for (; b && b !== a;)b = b.parentNode;\n return b === a\n }\n\n function y(a) {\n if (a._enabled) {\n for (a = a.sprite; a;)if ((a = a.parentNode) && a.kobject && 0 == a.kobject._enabled)return !1;\n return !0\n }\n return !1\n }\n\n function l(a) {\n cb = Ta();\n var d = a.type;\n if (_[7] != d && d != b.browser.events.touchstart || !da.isblocked()) {\n var e = a.target.kobject;\n _[34] == d ? d = _[8] : _[35] == d && (d = _[9]);\n null == e && (e = c);\n if ((_[8] != d && _[9] != d || 4 == a.pointerType || _[19] == a.pointerType) && e) {\n var e = a.timeStamp, f = c._eP;\n e != c._eT && (f = 0);\n if (_[16] == d || _[8] == d) {\n var h = a.relatedTarget;\n if (this === h || r(this, h))return\n } else if (_[17] == d || _[9] == d)if (h = a.relatedTarget, this === h || r(this, h))return;\n 0 == e && (_[16] == d && 0 == c.hovering ? f = 0 : _[17] == d && 1 == c.hovering && (f = 0));\n d = c._enabled;\n 0 == b.pointerEvents && (d = y(c));\n if (d && (!z || z && c.bgcapture))0 == c.children && a.stopPropagation(), 0 == f && (0 == c.children && 1 == a.eventPhase || 2 <= a.eventPhase) && (f = 1, c.jsplugin && c.jsplugin.hittest && (d = V.getMousePos(a.changedTouches ? a.changedTouches[0] : a, c.sprite), c.jsplugin.hittest(d.x * c.imagewidth / c.pixelwidth, d.y * c.imageheight / c.pixelheight) || (f = 2)), 1 == f && (S = c, v(a), c.capture && (null != c.jsplugin && r(V.controllayer, c.sprite) || 0 == (a.target && \"A\" == a.target.nodeName) && Aa(a), a.stopPropagation()))); else if (0 == b.pointerEvents && aa.msElementsFromPoint && 0 == f && 2 == a.eventPhase && (h = a.type, d = _[4] == h || _[17] == h || _[35] == h || _[9] == h || h == b.browser.events.touchend, _[7] == h || _[16] == h || _[34] == h || _[8] == h || h == b.browser.events.touchstart || d) && (h = aa.msElementsFromPoint(a.clientX, a.clientY))) {\n var k = [], l, n, m = null, m = null;\n for (l = 0; l < h.length; l++)if (m = h[l], m = m.kobject)k.push(m); else break;\n d && g();\n if (d && Z)for (l = 0; l < Z.length; l++) {\n var m = Z[l], p = !1;\n for (n = 0; n < k.length; n++)k[n] === m && (p = !0);\n 0 == p && (f = 1, S = m, v(a, !0), m.capture && (null == c.jsplugin && Aa(a), a.stopPropagation()))\n }\n for (l = 0; l < h.length; l++)if (m = h[l], m = m.kobject) {\n if (n = _[15] == m.type, 1 == (y(m) && (!n || n && m.bgcapture)) || d)if (f = 1, S = m, v(a, !0), m.capture) {\n null == c.jsplugin && Aa(a);\n a.stopPropagation();\n break\n }\n } else break;\n Z = k\n }\n c._eT = e;\n c._eP = f\n }\n }\n }\n\n function u() {\n var a = c.sprite;\n if (a) {\n var a = a.style, d = Number(c._bgcolor), e = Number(c._bgalpha), f = X;\n isNaN(d) && (d = 0);\n isNaN(e) && (e = 0);\n var g = (\"\" + c._bgborder).split(\" \"), h = Ib(g[0], f, \",\"), k = g[1] | 0, g = Number(g[2]);\n isNaN(g) && (g = 1);\n if (h[0] != q[0] || h[3] != q[3])q = h, c.poschanged = !0;\n 0 == e ? a.background = \"none\" : a.backgroundColor = ca(d, e);\n var d = Ib(c.bgroundedge, f * c._scale, \" \"), e = \"\", l = c.bgshadow;\n if (l) {\n var n = (\"\" + l).split(\",\"), m, p;\n p = n.length;\n for (m = 0; m < p; m++) {\n var r = Ha(n[m]).split(\" \"), u = r.length;\n if (4 < u) {\n var v = 5 < u ? 1 : 0;\n \"\" != e && (e += \", \");\n e += r[0] * f + \"px \" + r[1] * f + \"px \" + r[2] * f + \"px \" + (v ? r[3] * f : 0) + \"px \" + ca(r[3 + v] | 0, r[4 + v]) + (6 < u ? \" \" + r[6] : \"\")\n }\n }\n }\n if (b.safari || b.ios)a.webkitMaskImage = c._maskchildren && !l && 0 < d[0] + d[1] + d[2] + d[3] ? _[167] : \"\";\n a[pc] = e;\n a.borderStyle = \"solid\";\n a.borderColor = ca(k, g);\n a.borderWidth = h.join(\"px \") + \"px\";\n a.borderRadius = d.join(\"px \") + \"px\"\n }\n }\n\n function h(a, b) {\n var c = 0, d = 0, e = a.loader;\n e && (c = e.naturalWidth, d = e.naturalHeight);\n b && (b = String(b).split(\"|\"), 4 == b.length && (c = b[2], d = b[3]));\n null == a.jsplugin && 0 == a._isNE() && (a.imagewidth = c, a.imageheight = d, e = a._gOSF(), e & 1 && (a._width = String(c)), e & 2 && (a._height = String(d)));\n a.updatepos()\n }\n\n var c = this;\n c.prototype = Fb;\n this.prototype.call(this);\n c._type = _[29];\n c.layer = c.plugin = new bb(Ob);\n c.createvar = function (a, b, d) {\n var e = \"_\" + a;\n c[e] = void 0 === b ? null : b;\n c.__defineGetter__(a, function () {\n return c[e]\n });\n void 0 !== d ? c.__defineSetter__(a, function (a) {\n c[e] = a;\n d()\n }) : c.__defineSetter__(a, function (a) {\n c[e] = a;\n c.poschanged = !0\n })\n };\n var K = !1, D = !1, z = !1, q = [0, 0, 0, 0], J = 0, C = 3, Q = !1;\n c._isNE = function () {\n return D\n };\n c._gOSF = function () {\n return C\n };\n c.haveUserWidth = function () {\n return 0 == (C & 1)\n };\n c.haveUserHeight = function () {\n return 0 == (C & 2)\n };\n c.sprite = null;\n c.loader = null;\n c.jsplugin = null;\n c._use_css_scale = !1;\n c._finalxscale = 1;\n c._finalyscale = 1;\n c._hszscale = 1;\n c._eT = 0;\n c._eP = 0;\n c._pCD = !1;\n c.MX = Ma();\n c.__defineGetter__(\"type\", function () {\n return _[57] == c.url ? _[15] : _[75]\n });\n c.__defineSetter__(\"type\", function (a) {\n _[15] == F(a) && (c.url = _[57])\n });\n c.imagewidth = 0;\n c.imageheight = 0;\n c.pixelwidth = 0;\n c.pixelheight = 0;\n c._pxw = 0;\n c._pxh = 0;\n c.pressed = !1;\n c.hovering = !1;\n c.loading = !1;\n c.loaded = !1;\n c.loadedurl = null;\n c.loadingurl = null;\n c.preload = !1;\n c._ispreload = !1;\n c.keep = !1;\n c.poschanged = !1;\n c.style = null;\n c.capture = !0;\n c.children = !0;\n c.pixelx = 0;\n c.pixely = 0;\n c._deepscale = .5;\n c._zdeep = 0;\n c.accuracy = 0;\n c._dyn = !1;\n c.onloaded = null;\n c.altonloaded = null;\n c.maxwidth = 0;\n c.minwidth = 0;\n c.maxheight = 0;\n c.minheight = 0;\n c.onover = null;\n c.onhover = null;\n c.onout = null;\n c.onclick = null;\n c.ondown = null;\n c.onup = null;\n c.onloaded = null;\n var A = c.createvar, H = function (a, b) {\n var d = \"_\" + a;\n c[d] = null;\n c.__defineGetter__(a, function () {\n return c[d]\n });\n c.__defineSetter__(a, b)\n };\n A(_[472], !0, g);\n A(_[353], !0, g);\n A(_[302], !1, p);\n A(_[415], null, function () {\n var a = c._jsborder;\n 0 >= parseInt(a) && (c._jsborder = a = null);\n c.sprite && (c.sprite.style.border = a);\n null != a && (c._use_css_scale = !1)\n });\n A(_[512], null, function () {\n if (null != c.sprite) {\n var a = c._alturl;\n c._alturl = null;\n c.url = a\n }\n });\n A(\"url\", null, function () {\n if (\"\" == c._url || \"null\" == c._url)c._url = null;\n null != c._url ? c.reloadurl() : (c.jsplugin && c.jsplugin.unloadplugin && c.jsplugin.unloadplugin(), c.jsplugin = null, c.loadedurl = null, c.loadingurl = null, c.loading = !1, c.loaded = !1)\n });\n A(\"scale\", 1, function () {\n c.poschanged = !0;\n z && u()\n });\n A(_[277], !1, function () {\n Q = !0\n });\n A(_[516], 0);\n A(\"alpha\", 1, a);\n A(_[403], !1, a);\n A(_[503], null, d);\n H(_[12], function (a) {\n a = pa(a);\n if (c._visible != a && (c._visible = a, c._poly && (c._poly.style.visibility = a ? _[12] : _[6]), c.sprite)) {\n var b = !0;\n c.jsplugin && c.jsplugin.onvisibilitychanged && (b = !0 !== c.jsplugin.onvisibilitychanged(a));\n b && (0 == a ? c.sprite.style.display = \"none\" : c.poschanged = !0)\n }\n });\n c._visible = !0;\n A(\"crop\", null, function () {\n h(c, c._crop)\n });\n c._childs = null;\n c._parent = null;\n c.__defineGetter__(_[149], function () {\n return c._parent\n });\n c.__defineSetter__(_[149], function (a) {\n if (null == a || \"\" == a || \"null\" == F(a))a = null;\n c.sprite ? k(a) : c._parent = a\n });\n for (var N = [_[50], \"edge\", _[341], _[339]], ea = 0; ea < N.length; ea++)A(N[ea]);\n H(_[49], function (a) {\n 0 == 0 * parseFloat(a) ? C &= 2 : a && \"prop\" == a.toLowerCase() ? (a = \"prop\", C &= 2) : (a = null, C |= 1);\n c._width = a;\n c.poschanged = !0\n });\n H(_[28], function (a) {\n 0 == 0 * parseFloat(a) ? C &= 1 : a && \"prop\" == a.toLowerCase() ? (a = \"prop\", C &= 1) : (a = null, C |= 2);\n c._height = a;\n c.poschanged = !0\n });\n H(\"x\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._x = a;\n c.poschanged = !0\n });\n H(\"y\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._y = a;\n c.poschanged = !0\n });\n H(\"ox\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._ox = a;\n c.poschanged = !0\n });\n H(\"oy\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._oy = a;\n c.poschanged = !0\n });\n c.loadstyle = function (a) {\n da.assignstyle(c.getfullpath(), a)\n };\n c.getmouse = function (a) {\n var b = 0, d = 0, d = V.controllayer, e = c.sprite, f = d.getBoundingClientRect(), g = e.getBoundingClientRect(), b = O.x - g.left - e.clientLeft + f.left + d.clientLeft, d = O.y - g.top - e.clientTop + f.top + d.clientTop;\n a && (b = b * c.imagewidth / c.pixelwidth, d = d * c.imageheight / c.pixelheight);\n return {x: b, y: d}\n };\n c._assignEvents = function (a) {\n Pa.touch && (R(a, b.browser.events.touchstart, l, !0), R(a, b.browser.events.touchstart, l, !1));\n Pa.mouse && (R(a, _[7], l, !0), R(a, _[7], l, !1));\n b.desktop && (Pa.mouse || b.ie) && (0 == Pa.mouse && b.ie ? (R(a, b.browser.events.pointerover, l, !0), R(a, b.browser.events.pointerover, l, !1), R(a, b.browser.events.pointerout, l, !0), R(a, b.browser.events.pointerout, l, !1)) : (R(a, _[16], l, !0), R(a, _[16], l, !1), R(a, _[17], l, !0), R(a, _[17], l, !1)))\n };\n c.create = function () {\n c._pCD = !0;\n c.alturl && (c.url = c.alturl, c._alturl = null);\n c.altscale && (c.scale = c.altscale, delete c.altscale);\n var b = c.sprite = Ja(), f = c.loader = Ja(1);\n b.kobject = c;\n f.kobject = c;\n b.style.display = \"none\";\n b.style.position = _[0];\n J = _[29] == c._type ? 3001 : 2001;\n b.style.zIndex = J;\n p();\n g();\n a();\n d();\n c._jsborder && (c.jsborder = c._jsborder);\n c._assignEvents(b);\n R(f, _[48], e, !0);\n R(f, \"load\", c.loadurl_done, !1);\n if (b = c._parent)c._parent = null, k(b);\n null != c._url && c.reloadurl()\n };\n c.destroy = function () {\n c.jsplugin && c.jsplugin.unloadplugin && c.jsplugin.unloadplugin();\n c._GL_onDestroy && c._GL_onDestroy();\n c.jsplugin = null;\n c.loaded = !1;\n c._destroyed = !0;\n c.parent = null;\n var a = c._childs;\n if (a) {\n var b, d, a = a.slice();\n d = a.length;\n for (b = 0; b < d; b++)a[b].parent = null;\n c._childs = null\n }\n };\n c.getfullpath = function () {\n return c._type + \"[\" + c.name + \"]\"\n };\n c.changeorigin = function () {\n var a = arguments, b = null, d = null;\n if (0 < a.length) {\n var e = null, f = 0, g = 0, h = 0, k = 0, l = X, m = Qa / l, p = ya / l, q = c._parent;\n q && (q = n(q)) && (0 == c._use_css_scale ? (m = q._pxw * l, p = q._pxh * l) : (m = q.imagewidth * l, p = q.imageheight * l));\n l = c.imagewidth;\n q = c.imageheight;\n b = 0;\n e = String(c._width);\n \"\" != e && null != e && (0 < e.indexOf(\"%\") ? l = parseFloat(e) / 100 * m : \"prop\" == e.toLowerCase() ? b = 1 : l = e);\n e = String(c._height);\n \"\" != e && null != e && (0 < e.indexOf(\"%\") ? q = parseFloat(e) / 100 * p : \"prop\" == e.toLowerCase() ? b = 2 : q = e);\n 1 == b ? l = q * c.imagewidth / c.imageheight : 2 == b && (q = l * c.imageheight / c.imagewidth);\n b = d = F(a[0]);\n 1 < a.length && (d = F(a[1]));\n var a = String(c._align), r = c._edge ? F(c._edge) : \"null\";\n if (\"null\" == r || _[498] == r)r = a;\n (e = String(c._x)) && (f = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * m : parseFloat(e));\n isNaN(f) && (f = 0);\n (e = String(c._y)) && (g = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * p : parseFloat(e));\n isNaN(g) && (g = 0);\n if (e = a)h = 0 <= e.indexOf(\"left\") ? 0 + f : 0 <= e.indexOf(_[3]) ? m - f : m / 2 + f, k = 0 <= e.indexOf(\"top\") ? 0 + g : 0 <= e.indexOf(_[2]) ? p - g : p / 2 + g;\n 1 != c._scale && (l *= c._scale, q *= c._scale);\n h = 0 <= r.indexOf(\"left\") ? h + 0 : 0 <= r.indexOf(_[3]) ? h + -l : h + -l / 2;\n k = 0 <= r.indexOf(\"top\") ? k + 0 : 0 <= r.indexOf(_[2]) ? k + -q : k + -q / 2;\n e = a = 0;\n a = 0 <= b.indexOf(\"left\") ? 0 + f : 0 <= b.indexOf(_[3]) ? m - f : m / 2 + f;\n e = 0 <= b.indexOf(\"top\") ? 0 + g : 0 <= b.indexOf(_[2]) ? p - g : p / 2 + g;\n a = 0 <= d.indexOf(\"left\") ? a + 0 : 0 <= d.indexOf(_[3]) ? a + -l : a + -l / 2;\n e = 0 <= d.indexOf(\"top\") ? e + 0 : 0 <= d.indexOf(_[2]) ? e + -q : e + -q / 2;\n c._align = b;\n c._edge = d;\n 0 <= b.indexOf(_[3]) ? c._x = String(f + a - h) : c._x = String(f - a + h);\n 0 <= b.indexOf(_[2]) ? c._y = String(g + e - k) : c._y = String(g - e + k)\n }\n };\n c.resetsize = function () {\n c.loaded && (c._width = String(c.imagewidth), c._height = String(c.imageheight), C = 3, c.poschanged = !0)\n };\n c.registercontentsize = function (a, b) {\n null != a && (c.imagewidth = Number(a), C & 1 && (c._width = String(a)));\n null != b && (c.imageheight = Number(b), C & 2 && (c._height = String(b)));\n c.poschanged = !0\n };\n var I = null, S = null, Z = null;\n\n\n\n\n /**\n * Created by sohow on 16-6-15.\n */\n\n var krpanoplugin2 = function () {\n function Er(e) {\n return \".yes.on.true.1\"[s]((\".\" + e)[c]()) >= 0\n }\n\n function Sr(e) {\n }\n\n function xr() {\n ar = 0;\n if (Tn[at] || _n)if (Tn[_]) {\n var e = (\"\" + navigator.userAgent)[c]()[s](\"ucbrowser\") > 0;\n Tn.chrome || Tn[Ht] ? ar = 2 : e && (ar = 2)\n } else ar = 2;\n if (ar > 0) {\n Vn == 0 && (ar = 1);\n if (Tn[E] && _n)setTimeout(Nr, 10); else {\n window[u](ar == 1 ? f : h, Cr, t);\n var i = Nn[l] != \"\" && Nn[l] != n;\n setTimeout(Nr, Tn[E] ? 10 : i ? 1500 : 3e3)\n }\n } else sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Tr() {\n sr == t && (sr = r, er = r, tr = r, nr = r, rr = t, Rr(), xn[J](Nn[O], Nn))\n }\n\n function Nr() {\n window[o](f, Cr, t), window[o](h, Cr, t), Tn[E] && _n ? Tr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Cr(e) {\n window[o](e.type, Cr, t), e.type == f || e.type == h && e[K] && e.rotationRate ? (sr = r, er = r, tr = r, Tn[E] && (nr = r), Rr(), xn[J](Nn[O], Nn)) : Tn[E] && _n ? Tr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function jr(e) {\n var i;\n for (i = 0; i < e[kt]; i++)if (e[i] instanceof HMDVRDevice) {\n kr = e[i], kr[F] ? (Dr = kr[F](mt), Pr = kr[F](Tt), Ar = Dr[pn], Or = Pr[pn], Mr = Dr[Et], _r = Pr[Et]) : kr[$] && kr[C] && (Ar = kr[$](mt), Or = kr[$](Tt), Mr = kr[C](mt), _r = kr[C](Tt));\n var s = 2 * Math.max(Mr.leftDegrees, Mr.rightDegrees), o = 2 * Math.max(Mr.upDegrees, Mr.downDegrees);\n Br = Math.max(s, o);\n break\n }\n for (i = 0; i < e[kt]; i++)if (e[i] instanceof PositionSensorVRDevice)if (kr == n || kr[vn] == e[i][vn]) {\n Lr = e[i];\n break\n }\n kr || Lr ? (er = r, Xn == t && Tn[_] && (rr = r), xn[J](Nn[O], Nn)) : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Ir(e) {\n Zn = e;\n if (e) {\n Fr = {\n imagehfov: xn.image.hfov,\n continuousupdates: xn[p][g],\n usercontrol: xn[y][it],\n mousetype: xn[y][St],\n contextmenu_touch: xn[Rt].touch,\n loadwhilemoving: xn[m][A],\n stereo: xn[m][Ct],\n stereooverlap: xn[m][j],\n hlookat: xn[p][V],\n vlookat: xn[p][jt],\n camroll: xn[p][an],\n fovmin: xn[p][ft],\n fovmax: xn[p][ht],\n fisheye: xn[p][X],\n fov: xn[p].fov,\n maxpixelzoom: xn[p][d],\n fovtype: xn[p][G],\n stereographic: xn[p][x],\n fisheyefovlink: xn[p][b],\n pannini: xn[p][nt],\n architectural: xn[p][v],\n limitview: xn[p][T],\n area_mode: xn[Lt].mode,\n area_align: xn[Lt].align,\n area_x: xn[Lt].x,\n area_y: xn[Lt].y,\n area_width: xn[Lt][Y],\n area_height: xn[Lt][N],\n maxmem: xn.memory[en]\n }, xn[Lt].mode = \"align\", xn[Lt].align = \"lefttop\", xn[Lt].x = \"0\", xn[Lt].y = \"0\", xn[Lt][Y] = \"100%\", xn[Lt][N] = \"100%\", xn[Rt].touch = t, xn[p][g] = r, nr && Tn[E] && !mr ? xn[y][St] = \"drag2d\" : xn[y][it] = \"off\", xn[m][Ct] = r, xn[m][A] = r, xn[p][T] = \"off\", xn[p][nt] = 0, xn[p][v] = 0, xn[p][G] = \"VFOV\", xn[p][ft] = 0, xn[p][ht] = 179, xn[p][X] = 0, xn[p].fov = Br, xn[p][d] = 0, xn[p][x] = r, xn[p][b] = 0, cr = xn[p][V], ci = 0, Tn[E] || (cr -= Ci()), ui();\n if (tr || rr)zr(0, 0), nr && Tn[E] && !mr || (xn[yt] = r);\n ri(), Dn && oi(r), xn.set(\"events[__webvr].keep\", r), xn.set(\"events[__webvr].onnewpano\", ii), xn.set(\"events[__webvr].onresize\", si), (tr || rr) && Ko(r), xn[J](Nn.onentervr, Nn)\n } else if (Fr) {\n xn.set(\"events[__webvr].name\", n), xn[p][g] = Fr[g], xn[y][it] = Fr[it], xn[y][St] = Fr[St], xn[Rt].touch = Fr.contextmenu_touch, xn[m][A] = Fr[A], xn[m][Ct] = Fr[Ct], xn[m][j] = Fr[j], xn[p][an] = 0;\n if (Fr.imagehfov == xn.image.hfov)xn[p][ft] = Fr[ft], xn[p][ht] = Fr[ht], xn[p].fov = Fr.fov, xn[p][d] = Fr[d], xn[p][G] = Fr[G], xn[p][T] = Fr[T], xn[p][X] = Fr[X], xn[p][x] = Fr[x], xn[p][b] = Fr[b], xn[p][nt] = Fr[nt], xn[p][v] = Fr[v]; else {\n var i = xn.xml[p];\n xn[p][ft] = i && !isNaN(Number(i[ft])) ? Number(i[ft]) : 1, xn[p][ht] = i && !isNaN(Number(i[ht])) ? Number(i[ht]) : 140, xn[p].fov = i && !isNaN(Number(i.fov)) ? Number(i.fov) : 90, xn[p][X] = i && !isNaN(Number(i[X])) ? Number(i[X]) : 0, xn[p][nt] = i && !isNaN(Number(i[nt])) ? Number(i[nt]) : 0, xn[p][v] = i && !isNaN(Number(i[v])) ? Number(i[v]) : 0, xn[p][d] = i && !isNaN(Number(i[d])) ? Number(i[d]) : 2, xn[p][G] = i && i[G] ? i[G] : \"MFOV\", xn[p][T] = i && i[T] ? i[T] : pt, xn[p][x] = r, xn[p][b] = .5\n }\n xn[Lt].mode = Fr.area_mode, xn[Lt].align = Fr.area_align, xn[Lt].x = Fr.area_x, xn[Lt].y = Fr.area_y, xn[Lt][Y] = Fr.area_width, xn[Lt][N] = Fr.area_height, xn[W] = -1, xn[D] = t, xn.memory[en] = Fr[en], Fr = n, Qn && (ji(Qn, t), Qn = n), Ko(t), oi(t), ui(), xn[J](Nn.onexitvr, Nn)\n }\n }\n\n function Rr() {\n if (qr)return qr;\n var e = \"Unknown\", t = 0, n = 1536, r = Math.min(screen[Y], screen[N]), i = Math.max(screen[Y], screen[N]), o = window.devicePixelRatio || 1;\n if (Tn.iphone)if (i == 568) {\n var u = xn.webGL.context, a = \"\" + u.getParameter(u.VERSION);\n a[s](\"A8 GPU\") > 0 ? (e = ln, t = 4.7) : (e = \"iPhone 5\", t = 4, n = 1024)\n } else i == 667 ? o == 2 ? (e = ln, t = 4.7) : (e = on, t = 5.5) : i == 736 && (e = on, t = 5.5); else {\n var f = navigator.userAgent[c]();\n f[s](\"gt-n710\") >= 0 ? (t = 5.5, e = \"Note 2\") : f[s](\"sm-n900\") >= 0 ? (t = 5.7, e = \"Note 3\") : f[s](\"sm-n910\") >= 0 ? (t = 5.7, e = \"Note 4\") : f[s](\"gt-i930\") >= 0 || f[s](sn) >= 0 ? (t = 4.7, e = \"Galaxy S3\") : f[s](\"gt-i950\") >= 0 || f[s](sn) >= 0 ? (t = 5, e = \"Galaxy S4\") : f[s](\"sm-g900\") >= 0 || f[s](\"sc-04f\") >= 0 || f[s](\"scl23\") >= 0 ? (t = 5.1, e = \"Galaxy S5\") : f[s](\"sm-g920\") >= 0 || f[s](\"sm-g925\") >= 0 ? (t = 5.1, e = \"Galaxy S6\") : f[s](\"lg-d85\") >= 0 || f[s](\"vs985\") >= 0 || f[s](\"lgls990\") >= 0 || f[s](\"lgus990\") >= 0 ? (t = 5.5, e = \"LG G3\") : f[s](\"lg-h810\") >= 0 || f[s](\"lg-h815\") >= 0 || f[s](\"lgls991\") >= 0 ? (t = 5.5, e = \"LG G4\") : f[s](\"xt1068\") >= 0 || f[s](\"xt1069\") >= 0 || f[s](\"xt1063\") >= 0 ? (t = 5.5, e = \"Moto G 2g\") : f[s](\"xt1058\") >= 0 ? (t = 5.2, e = \"Moto X 2g\") : f[s](\"d6653\") >= 0 || f[s](\"d6603\") >= 0 ? (t = 5.2, e = \"Xperia Z3\") : f[s](\"xperia z4\") >= 0 ? (t = 5.5, e = \"Xperia Z4\") : f[s](\"htc_p4550\") >= 0 || f[s](\"htc6525lv\") >= 0 || f[s](\"htc_pn071\") >= 0 ? (t = 5, e = \"One M8\") : f[s](\"nexus 4\") >= 0 ? (t = 4.7, e = \"Nexus 4\") : f[s](\"nexus 5\") >= 0 ? (t = 5, e = \"Nexus 5\") : f[s](\"nexus 6\") >= 0 ? (t = 6, e = \"Nexus 6\") : f[s](\"lumia 930\") >= 0 && (t = 5, e = \"Lumia 930\")\n }\n t == 0 && (xn[J](Nn[Nt], Nn), t = 5);\n var l = Math[Bt](t * t / (1 + r / i * (r / i))) * 25.4, h = l * r / i;\n return qr = {\n screendiagonal_inch: t,\n screenwidth_mm: l,\n screenheight_mm: h,\n screenwidth_px: i * o,\n screenheight_px: r * o,\n devicename: e,\n best_res: n\n }, qr\n }\n\n function Ur() {\n Fn < 1 ? Fn = 1 : Fn > 179.9 && (Fn = 179.9), In < 0 ? In = 0 : In > 5 && (In = 5);\n var e = qn[mn](\"|\"), t;\n for (t = 0; t < 4; t++) {\n var n = Number(e[t]);\n isNaN(n) && (n = t == 0 ? 1 : 0), Rn[t] = n\n }\n Un = Rn[0] != 1 || Rn[1] != 0 || Rn[2] != 0 || Rn[3] != 0, or[a] && (tr || rr) && (zr(0, 0), Ko(r))\n }\n\n function zr(e, n) {\n var i = Rr(), s = 0, o = 0, u = xn.webGL.canvas;\n if (u) {\n var a = Number(xn[m].framebufferscale);\n s = u[Y], o = u[N], !isNaN(a) && a != 0 && (s /= a, o /= a)\n }\n if (e <= 0 || n <= 0)e = s, n = o;\n var f = Fn, l = In;\n f = Math.tan(f * .5 * br), l = Math.exp(l) - 1;\n var c = Math.atan(f) * 2 / 2, h = l * 1e3, p = 1e3, d = p * Math.sin(c), v = p * Math.cos(c), g = 2 * Math.atan(d / (h + v));\n f = Math.tan(g / 2);\n var y = l, b = Hn;\n b /= jn;\n var w = i.screenwidth_mm, E = i.screenheight_mm;\n if (Bn > 0) {\n var S = Math.min(screen[Y], screen[N]), x = Math.max(screen[Y], screen[N]);\n w = Math[Bt](Bn * Bn / (1 + S / x * (S / x))) * 25.4, E = w * S / x\n }\n var T = w / 2 - b, C = 2 * (T / w), k = e, L = n, A = i.screenwidth_px, O = i.screenheight_px, M = r;\n if (nr || Tn.tablet || n > e)M = t;\n k <= 0 && (k = s), L <= 0 && (L = o);\n var _ = E / 70.9, D = f;\n D *= _, hr = _ / .69, M && (D *= L / O, C = 2 * (w * (k / A) / 2 - b) / (w * (k / A)));\n var P = 2 * Math.atan(D) * wr;\n pr = P, dr = y, vr = C, Wr()\n }\n\n function Wr() {\n var e = xn[p];\n pr > 0 && (e[X] = dr, e.fov = pr, e[ft] = pr, e[ht] = pr, e[d] = 0, e[G] = \"VFOV\", e[x] = r, e[b] = 0, e[T] = \"off\", xn[m][j] = vr)\n }\n\n function Xr() {\n return Tn[E] && kr && kr.deviceName ? kr.deviceName : (Rr(), qr ? qr[Gt] : \"\")\n }\n\n function Vr() {\n return qr ? qr.screendiagonal_inch : 0\n }\n\n function $r(e) {\n if ((\"\" + e)[c]() == pt)Bn = 0, Ur(); else {\n var t = parseFloat(e);\n if (isNaN(t) || t <= 0)t = 0;\n Bn = t, Ur()\n }\n }\n\n function Jr() {\n var e = Bn;\n return e <= 0 ? pt : e\n }\n\n function Kr() {\n return Tn[_] ? xn[m].viewerlayer : xn.webGL.canvas\n }\n\n function Qr() {\n xn.trace(0, \"update - stereo=\" + xn[m][Ct]), or[a] && (tr || rr) && (zr(0, 0), Ko(r))\n }\n\n function Gr() {\n if (er && Zn == t)if (tr == t) {\n var e = Kr();\n Sn[u](Tn[w][k][Yt], li), or[a] = r, Ir(r), ur = r, rr = t, Xn == t && Tn[_] && (rr = r), rr && (ur = t), e[Tn[w][k].requestfullscreen]({\n vrDisplay: kr,\n vrDistortion: ur\n }), Tn[at] && ei(xn[p][V]), ur == t && zr()\n } else {\n Sn[u](Tn[w][k][Yt], li), or[a] = r, Ir(r);\n if (Tn[at] || Tn.tablet)ar == 1 ? window[u](f, Mi, r) : ar == 2 && window[u](h, Bs, r);\n nr == t && Tn[w][k].touch && xn[y][$t][u](Tn[w][k][Kt], ni, t)\n }\n }\n\n function Yr() {\n or[a] = t, xn.get(yt) && xn.set(yt, t), window[o](f, Mi, r), window[o](h, Bs, r), Tn[w][k].touch && xn[y][$t][o](Tn[w][k][Kt], ni, t), Ir(t), xn[p].haschanged = r\n }\n\n function Zr() {\n er && (Zn ? Yr() : Gr())\n }\n\n function ei(e) {\n e === undefined ? e = 0 : (e = Number(e), isNaN(e) && (e = 0));\n var t = xn[p][V];\n if (Lr) {\n try {\n Lr.resetSensor !== undefined && Lr.resetSensor()\n } catch (n) {\n }\n try {\n Lr.zeroSensor !== undefined && Lr.zeroSensor()\n } catch (n) {\n }\n t = 0, cr = 0\n }\n nr && (xn[p][V] = e), cr = cr - t + e, ci = 0\n }\n\n function ni(e) {\n var i = t;\n if (Mn == t)i = r; else {\n var s = xn[y].getMousePos(e[fn] ? e[fn][0] : e);\n s.x /= xn.stagescale, s.y /= xn.stagescale;\n if (e.type == Tn[w][k][Kt])ti == n ? (ti = s, xn[y][$t][u](Tn[w][k][un], ni, r), xn[y][$t][u](Tn[w][k][gn], ni, r)) : i = r; else if (e.type == Tn[w][k][gn])i = r; else if (e.type == Tn[w][k][un] && ti) {\n var a = ti.x, f = s.x;\n if (xn[m][Ct]) {\n var l = xn.stagewidth * .5;\n (a >= l || f >= l) && (a < l || f < l) && (f = a)\n }\n var c = xn[cn](a, ti.y, t), h = xn[cn](f, s.y, t), p = h.x - c.x;\n ti = s, cr -= p\n }\n }\n i && (ti = n, xn[y][$t][o](Tn[w][k][un], ni, r), xn[y][$t][o](Tn[w][k][gn], ni, r))\n }\n\n function ri() {\n if (An == t)xn[W] = -1, xn[D] = t; else if (xn.image.type == \"cube\" && xn.image.multires) {\n var e = Rr().best_res, n = 0, s = -1, o = 0, u = xn.image.level.getArray(), a = u[kt];\n if (a > 0)for (i = 0; i < a; i++) {\n var f = u[i].tiledimagewidth, l = Math.abs(f - e);\n if (s == -1 || l < s)n = f, s = l, o = i\n }\n if (s > 0) {\n xn[W] = o, xn[D] = r;\n if (n > 0) {\n var c = 4 + 8 * (n * n * 6 + 1048575 >> 20);\n c > xn.memory[en] && (xn.memory[en] = c)\n }\n }\n }\n }\n\n function ii() {\n or[a] && ri()\n }\n\n function si() {\n ii(), Ur()\n }\n\n function ui() {\n fr = 0, ki.t = 0, Li.t = 0, yo(), So = 0, go = t, Ls = n\n }\n\n function fi(e) {\n ai == 1 ? (yr.apply(document), ai = 0) : (gr.apply(Kr()), ai = 1)\n }\n\n function li(e) {\n var n = Kr(), i = !!(Sn[Jt] || Sn[Mt] || Sn[zt] || Sn[gt] || Sn[qt]);\n if (i && or[a]) {\n try {\n Tn[E] && mr && (gr.apply(n), nr && (ai = 1, xn[y][$t][u](nn, fi, t)))\n } catch (s) {\n }\n Tn[E] && n[u](rn, hi, t)\n } else window[o](f, Mi, r), window[o](h, Bs, r), n[o](rn, hi, t), xn[y][$t][o](nn, fi, t), or[a] = t, Ir(t)\n }\n\n function hi(e) {\n var t = Kr();\n if (Sn.pointerLockElement === t || Sn.mozPointerLockElement === t) {\n var n = e.movementX || e.mozMovementX, r = e.movementY || e.mozMovementY;\n if (!isNaN(n)) {\n ci += n * kn;\n while (ci < 0)ci += Math.PI * 2;\n while (ci >= Math.PI * 2)ci -= Math.PI * 2\n } else n = 0;\n nr && (isNaN(r) && (r = 0), xn[p][V] += n * kn * wr, xn[p][jt] = Math.max(Math.min(xn[p][jt] + r * kn * wr, 120), -120))\n }\n }\n\n function pi(e, t, n, r) {\n this.x = e, this.y = t, this.z = n, this.w = r\n }\n\n function di(e) {\n var t = Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z + e.w * e.w);\n t === 0 ? (e.x = e.y = e.z = 0, e.w = 1) : (t = 1 / t, e.x *= t, e.y *= t, e.z *= t, e.w *= t)\n }\n\n function vi(e) {\n e.x *= -1, e.y *= -1, e.z *= -1, di(e)\n }\n\n function mi(e, t) {\n return e.x * t.x + e.y * t.y + e.z * t.z + e.w * t.w\n }\n\n function gi(e) {\n return Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z + e.w * e.w)\n }\n\n function yi(e, t) {\n var n = e.x, r = e.y, i = e.z, s = e.w, o = t.x, u = t.y, a = t.z, f = t.w;\n e.x = n * f + s * o + r * a - i * u, e.y = r * f + s * u + i * o - n * a, e.z = i * f + s * a + n * u - r * o, e.w = s * f - n * o - r * u - i * a\n }\n\n function bi(e, t) {\n var n = t.x, r = t.y, i = t.z, s = t.w, o = e.x, u = e.y, a = e.z, f = e.w;\n e.x = n * f + s * o + r * a - i * u, e.y = r * f + s * u + i * o - n * a, e.z = i * f + s * a + n * u - r * o, e.w = s * f - n * o - r * u - i * a\n }\n\n function wi(e, t, n) {\n var r = e.x, i = e.y, s = e.z, o = e.w, u = r * t.x + i * t.y + s * t.z + o * t.w;\n u < 0 ? (u = -u, e.x = -t.x, e.y = -t.y, e.z = -t.z, e.w = -t.w) : (e.x = t.x, e.y = t.y, e.z = t.z, e.w = t.w);\n if (u >= 1) {\n e.w = o, e.x = r, e.y = i, e.z = s;\n return\n }\n var a = Math.acos(u), f = Math[Bt](1 - u * u);\n if (Math.abs(f) < .001) {\n e.w = .5 * (o + e.w), e.x = .5 * (r + e.x), e.y = .5 * (i + e.y), e.z = .5 * (s + e.z);\n return\n }\n var l = Math.sin((1 - n) * a) / f, c = Math.sin(n * a) / f;\n e.w = o * l + e.w * c, e.x = r * l + e.x * c, e.y = i * l + e.y * c, e.z = s * l + e.z * c\n }\n\n function Ei(e, t, n) {\n var r = n / 2, i = Math.sin(r);\n e.x = t.x * i, e.y = t.y * i, e.z = t.z * i, e.w = Math.cos(r)\n }\n\n function Si(e, t, n, r, i) {\n var s = Math.cos(t / 2), o = Math.cos(n / 2), u = Math.cos(r / 2), a = Math.sin(t / 2), f = Math.sin(n / 2), l = Math.sin(r / 2);\n return i === \"XYZ\" ? (e.x = a * o * u + s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u - a * f * l) : i === Wt ? (e.x = a * o * u + s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u + a * f * l) : i === \"ZXY\" ? (e.x = a * o * u - s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u - a * f * l) : i === \"ZYX\" ? (e.x = a * o * u - s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u + a * f * l) : i === \"YZX\" ? (e.x = a * o * u + s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u - a * f * l) : i === \"XZY\" && (e.x = a * o * u - s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u + a * f * l), e\n }\n\n function xi(e, t, n) {\n var r, i, s, o, u, a, f, l, c, h, p, d;\n i = t.x, s = t.y, o = t.z, u = Math[Bt](i * i + s * s + o * o), u > 0 && (i /= u, s /= u, o /= u), a = n.x, f = n.y, l = n.z, c = Math[Bt](a * a + f * f + l * l), c > 0 && (a /= c, f /= c, l /= c), r = i * a + s * f + o * l + 1, r < 1e-6 ? (r = 0, Math.abs(i) > Math.abs(o) ? (h = -s, p = i, d = 0) : (h = 0, p = -o, d = s)) : (h = s * l - o * f, p = o * a - i * l, d = i * f - s * a), e.x = h, e.y = p, e.z = d, e.w = r, di(e)\n }\n\n function Ti(e, t, n) {\n function r(e, t, n) {\n return e < t ? t : e > n ? n : e\n }\n\n if (!t || isNaN(t.x) || isNaN(t.y) || isNaN(t.z) || isNaN(t.w))return;\n var i = t.x * t.x, s = t.y * t.y, o = t.z * t.z, u = t.w * t.w;\n if (n === \"XYZ\")e[0] = Math[tt](2 * (t.x * t.w - t.y * t.z), u - i - s + o), e[1] = Math.asin(r(2 * (t.x * t.z + t.y * t.w), -1, 1)), e[2] = Math[tt](2 * (t.z * t.w - t.x * t.y), u + i - s - o); else if (n === Wt)e[0] = Math.asin(r(2 * (t.x * t.w - t.y * t.z), -1, 1)), e[1] = Math[tt](2 * (t.x * t.z + t.y * t.w), u - i - s + o), e[2] = Math[tt](2 * (t.x * t.y + t.z * t.w), u - i + s - o); else if (n === \"ZXY\")e[0] = Math.asin(r(2 * (t.x * t.w + t.y * t.z), -1, 1)), e[1] = Math[tt](2 * (t.y * t.w - t.z * t.x), u - i - s + o), e[2] = Math[tt](2 * (t.z * t.w - t.x * t.y), u - i + s - o); else if (n === \"ZYX\")e[0] = Math[tt](2 * (t.x * t.w + t.z * t.y), u - i - s + o), e[1] = Math.asin(r(2 * (t.y * t.w - t.x * t.z), -1, 1)), e[2] = Math[tt](2 * (t.x * t.y + t.z * t.w), u + i - s - o); else if (n === \"YZX\")e[0] = Math[tt](2 * (t.x * t.w - t.z * t.y), u - i + s - o), e[1] = Math[tt](2 * (t.y * t.w - t.x * t.z), u + i - s - o), e[2] = Math.asin(r(2 * (t.x * t.y + t.z * t.w), -1, 1)); else {\n if (n !== \"XZY\")return;\n e[0] = Math[tt](2 * (t.x * t.w + t.y * t.z), u - i + s - o), e[1] = Math[tt](2 * (t.x * t.z + t.y * t.w), u + i - s - o), e[2] = Math.asin(r(2 * (t.z * t.w - t.x * t.y), -1, 1))\n }\n }\n\n function Ni(e, t) {\n var r, i, s, o;\n e == n ? (r = Math.tan(50 * br), i = Math.tan(50 * br), s = Math.tan(45 * br), o = Math.tan(45 * br)) : (r = Math.tan(e.upDegrees * br), i = Math.tan(e.downDegrees * br), s = Math.tan(e.leftDegrees * br), o = Math.tan(e.rightDegrees * br));\n var u = 2 / (s + o), a = 2 / (r + i);\n t[0] = u, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = -a, t[6] = 0, t[7] = 0, t[8] = (s - o) * u * .5, t[9] = -((r - i) * a * .5), t[10] = 65535 / 65536, t[11] = 1, t[12] = 0, t[13] = 0, t[14] = 65535 / 65536 - 1, t[15] = 1\n }\n\n function Ci() {\n var e = Number.NaN, t = screen[Y] > screen[N], n = screen[st] || screen.msOrientation || screen.mozOrientation;\n if (n) {\n n = (\"\" + n)[c]();\n var r = n[s](\"portrait\") >= 0, i = n[s](\"landscape\") >= 0, o = n[s](\"primary\") >= 0, u = n[s](\"secondary\") >= 0;\n r && o ? e = 0 : i && o ? e = 90 : i && u ? e = -90 : r && u && (e = 180), !isNaN(e) && !Tn[at] && (e -= 90)\n }\n return isNaN(e) && (e = xn._have_top_access ? top[st] : window[st]), isNaN(e) && (Tn[at] ? e = t ? 90 : 0 : e = t ? 0 : 90), Tn.tablet && Tn[Ht] && (e += 90), e\n }\n\n function Mi(e) {\n if (!or[a])return;\n var t = xn[B], r = t - Hs;\n Hs = t;\n var i = Ci() * br, s = e.alpha * br, o = e.beta * br, u = e.gamma * br;\n Oi === n && (Oi = s), s = s - Oi + Math.PI;\n var f = Math.cos(s), l = Math.sin(s), c = Math.cos(o), h = Math.sin(o), p = Math.cos(u), d = Math.sin(u);\n s = Math[tt](-l * h * p - f * d, l * d - f * h * p), o = -Math.asin(c * p), u = Math[tt](c * d, -h) - Math.PI, ki.q.x = Li.q.x, ki.q.y = Li.q.y, ki.q.z = Li.q.z, ki.q.w = Li.q.w, ki.t = Li.t;\n var v = Li.q;\n Li.t = t, fr++, Si(v, o, s + i, u - i, Wt)\n }\n\n function _i() {\n if (or[a]) {\n xn[p][g] = r;\n var e = [0, 0, 0];\n if (Lr) {\n Hr = Lr.getState();\n if (Hr) {\n rr && Wr();\n if (Ln) {\n var t = Hr.position;\n if (t) {\n ci = 0;\n var i = 400;\n xn[p].tx = t.x * i, xn[p].ty = t.y * i, xn[p].tz = t.z * i\n }\n }\n Ti(e, Hr[st], Wt);\n var s = 0;\n Tn[_] && (s = Ci()), s += cr, xn[p][V] = (-e[1] + ci) * wr + s, xn[p][jt] = -e[0] * wr, xn[p][an] = -e[2] * wr\n }\n } else if (tr) {\n Wr();\n if (fr > lr) {\n var o = n;\n if ($n == 0)o = Li.q; else if (($n == 4 || $n >= 6) && ar == 2)o = Li.q, Ds(o); else if ($n <= 3 || $n == 5 || ar == 1)if (ki.t > 0 && Li.t > 0) {\n var u = xn[B], f = Li.t - ki.t, l = 0, c = 0, h = 1;\n $n == 1 || $n == 2 ? l = u - Li.t : (l = u - ki.t, h = 2), f <= 0 ? c = 1 : (c = l / f, c > h && (c = h)), Ai.x = ki.q.x, Ai.y = ki.q.y, Ai.z = ki.q.z, Ai.w = ki.q.w, wi(Ai, Li.q, c), o = Ai\n }\n if (o) {\n Ti(e, o, Wt);\n var s = Ci();\n xn[p][V] = cr + (-e[1] + ci) * wr + s, xn[p][jt] = -e[0] * wr, xn[p][an] = -e[2] * wr\n }\n }\n }\n }\n }\n\n function Di(e, n) {\n tr == t && ur == r && Ni(e == 1 ? Mr : _r, n)\n }\n\n function Pi(e) {\n var t = 0;\n return e == 1 ? Ar && Ar.x ? t = Ar.x : t = -0.03 : e == 2 && (Or && Or.x ? t = Or.x : t = .03), t *= 320 / Cn, t\n }\n\n function Hi(e, i) {\n var s = !!(Sn[Jt] || Sn[Mt] || Sn[zt] || Sn[gt] || Sn[qt]);\n if (or[a] && s && tr == t && ur == r) {\n var o = 0, u = 0;\n if (Dr)o = Dr[lt][Y] + Pr[lt][Y], u = Math.max(Dr[lt][N], Pr[lt][N]); else if (S in kr) {\n var f = kr[S](mt), l = kr[S](Tt);\n o = f[Y] + l[Y], u = Math.max(f[N], l[N])\n } else if (H in kr) {\n var c = kr[H]();\n o = c[Y], u = c[N]\n } else z in kr ? (o = kr[z][Y], u = kr[z][N]) : (o = 2e3, u = 1056);\n if (o > 0 && u > 0) {\n var h = 1;\n return o *= h, u *= h, {w: o, h: u}\n }\n } else or[a] && (tr || ur == t) && zr(e, i);\n return n\n }\n\n function Bi(e) {\n var e = (\"\" + e)[c](), i = e[s](dn), o = e.lastIndexOf(\"]\");\n if (i >= 0 && o > i) {\n var u = e[It](i + 8, o), a = dn + u + \"]\";\n a != Jn && (Jn = a, Qn && (ji(Qn, t), Qn = n), Qn = xn.get(Jn), Qn && ji(Qn, r))\n }\n }\n\n function ji(e, i) {\n if (i == r)e[Vt] = {\n visible: e[Ft],\n enabled: e[a],\n flying: e.flying,\n scaleflying: e[ot],\n distorted: e[xt],\n zorder: e.zorder,\n scale: e.scale,\n depth: e.depth,\n onover: e.onover,\n onout: e.onout\n }, e[a] = t, e.flying = 1, e[ot] = t, e[xt] = r, e.zorder = 999999999; else {\n var s = e[Vt];\n s && (e[Ft] = s[Ft], e[a] = s[a], e.flying = s.flying, e[ot] = s[ot], e[xt] = s[xt], e.zorder = s.zorder, e.scale = s.scale, e.depth = s.depth, e.onover = s.onover, e.onout = s.onout, e[Vt] = s = n)\n }\n }\n\n function Fi() {\n if (Jn) {\n var e = Qn;\n e == n && (e = xn.get(Jn), e && (ji(e, r), Qn = e));\n if (e) {\n if (!or[a])return e[Ft] = t, n;\n e.onover = Gn, e.onout = Yn, e[a] = Kn, e[Ft] = r\n }\n return e\n }\n return n\n }\n\n function Ii() {\n this.x = 0, this.y = 0, this.z = 0\n }\n\n function qi(e, t, n, r) {\n e.x = t, e.y = n, e.z = r\n }\n\n function Ri(e, t) {\n e.x = t.x, e.y = t.y, e.z = t.z\n }\n\n function Ui(e) {\n e.x = 0, e.y = 0, e.z = 0\n }\n\n function zi(e, t, n) {\n t == 0 ? e.x = n : t == 1 ? e.y = n : e.z = n\n }\n\n function Wi(e) {\n return Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z)\n }\n\n function Xi(e) {\n var t = Wi(e);\n t > 0 ? Vi(e, 1 / t) : (e.x = 0, e.y = 0, e.z = 0)\n }\n\n function Vi(e, t) {\n e.x *= t, e.y *= t, e.z *= t\n }\n\n function $i(e, t, n) {\n qi(n, e.x - t.x, e.y - t.y, e.z - t.z)\n }\n\n function Ji(e, t, n) {\n qi(n, e.y * t.z - e.z * t.y, e.z * t.x - e.x * t.z, e.x * t.y - e.y * t.x)\n }\n\n function Ki(e, t) {\n return e.x * t.x + e.y * t.y + e.z * t.z\n }\n\n function Qi() {\n var e;\n return typeof Float64Array != \"undefined\" ? e = new Float64Array(9) : e = new Array(9), Yi(e), e\n }\n\n function Gi(e) {\n e[0] = e[1] = e[2] = e[3] = e[4] = e[5] = e[6] = e[7] = e[8] = 0\n }\n\n function Yi(e) {\n e[0] = e[4] = e[8] = 1, e[1] = e[2] = e[3] = e[5] = e[6] = e[7] = 0\n }\n\n function Zi(e, t) {\n e[0] = e[4] = e[8] = t\n }\n\n function es(e, t) {\n e[0] *= t, e[1] *= t, e[2] *= t, e[3] *= t, e[4] *= t, e[5] *= t, e[6] *= t, e[7] *= t, e[8] *= t\n }\n\n function ts(e, t) {\n var n = e[1], r = e[2], i = e[5];\n t[0] = e[0], t[1] = e[3], t[2] = e[6], t[3] = n, t[4] = e[4], t[5] = e[7], t[6] = r, t[7] = i, t[8] = e[8]\n }\n\n function ns(e, t, n) {\n e[t] = n.x, e[t + 3] = n.y, e[t + 6] = n.z\n }\n\n function rs(e, t) {\n e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e[4] = t[4], e[5] = t[5], e[6] = t[6], e[7] = t[7], e[8] = t[8]\n }\n\n function is(e, t) {\n var n = e[0] * (e[4] * e[8] - e[7] * e[5]) - e[1] * (e[3] * e[8] - e[5] * e[6]) + e[2] * (e[3] * e[7] - e[4] * e[6]);\n n != 0 && (n = 1 / n, t[0] = (e[4] * e[8] - e[7] * e[5]) * n, t[1] = -(e[1] * e[8] - e[2] * e[7]) * n, t[2] = (e[1] * e[5] - e[2] * e[4]) * n, t[3] = -(e[3] * e[8] - e[5] * e[6]) * n, t[4] = (e[0] * e[8] - e[2] * e[6]) * n, t[5] = -(e[0] * e[5] - e[3] * e[2]) * n, t[6] = (e[3] * e[7] - e[6] * e[4]) * n, t[7] = -(e[0] * e[7] - e[6] * e[1]) * n, t[8] = (e[0] * e[4] - e[3] * e[1]) * n)\n }\n\n function ss(e, t) {\n e[0] -= t[0], e[1] -= t[1], e[2] -= t[2], e[3] -= t[3], e[4] -= t[4], e[5] -= t[5], e[6] -= t[6], e[7] -= t[7], e[8] -= t[8]\n }\n\n function os(e, t) {\n e[0] += t[0], e[1] += t[1], e[2] += t[2], e[3] += t[3], e[4] += t[4], e[5] += t[5], e[6] += t[6], e[7] += t[7], e[8] += t[8]\n }\n\n function us(e, t, n) {\n var r = t[0], i = t[1], s = t[2], o = t[3], u = t[4], a = t[5], f = t[6], l = t[7], c = t[8], h = e[0], p = e[1], d = e[2];\n n[0] = h * r + p * o + d * f, n[1] = h * i + p * u + d * l, n[2] = h * s + p * a + d * c, h = e[3], p = e[4], d = e[5], n[3] = h * r + p * o + d * f, n[4] = h * i + p * u + d * l, n[5] = h * s + p * a + d * c, h = e[6], p = e[7], d = e[8], n[6] = h * r + p * o + d * f, n[7] = h * i + p * u + d * l, n[8] = h * s + p * a + d * c\n }\n\n function as(e, t, n) {\n var r = e[0] * t.x + e[1] * t.y + e[2] * t.z, i = e[3] * t.x + e[4] * t.y + e[5] * t.z, s = e[6] * t.x + e[7] * t.y + e[8] * t.z;\n n.x = r, n.y = i, n.z = s\n }\n\n function fs(e, t, n) {\n n[0] = e[0] + t[0], n[1] = e[1] + t[1], n[2] = e[2] + t[2], n[3] = e[3] + t[3], n[4] = e[4] + t[4], n[5] = e[5] + t[5], n[6] = e[6] + t[6], n[7] = e[7] + t[7], n[8] = e[8] + t[8]\n }\n\n function bs(e, t, n) {\n Ji(e, t, cs);\n if (Wi(cs) == 0)Yi(n); else {\n Ri(hs, e), Ri(ps, t), Xi(cs), Xi(hs), Xi(ps);\n var r = vs, i = ms;\n Ji(cs, hs, ls), r[0] = hs.x, r[1] = hs.y, r[2] = hs.z, r[3] = cs.x, r[4] = cs.y, r[5] = cs.z, r[6] = ls.x, r[7] = ls.y, r[8] = ls.z, Ji(cs, ps, ls), i[0] = ps.x, i[3] = ps.y, i[6] = ps.z, i[1] = cs.x, i[4] = cs.y, i[7] = cs.z, i[2] = ls.x, i[5] = ls.y, i[8] = ls.z, us(i, r, n)\n }\n }\n\n function ws(e, t) {\n var n = Ki(e, e), r = Math[Bt](n), i, s;\n if (n < 1e-8)i = 1 - 1 / 6 * n, s = .5; else if (n < 1e-6)s = .5 - .25 * (1 / 6) * n, i = 1 - n * (1 / 6) * (1 - .05 * n); else {\n var o = 1 / r;\n i = Math.sin(r) * o, s = (1 - Math.cos(r)) * o * o\n }\n Ss(e, i, s, t)\n }\n\n function Es(e, t) {\n var n = (e[0] + e[4] + e[8] - 1) * .5;\n qi(t, (e[7] - e[5]) / 2, (e[2] - e[6]) / 2, (e[3] - e[1]) / 2);\n var r = Wi(t);\n if (n > Math.SQRT1_2)r > 0 && Vi(t, Math.asin(r) / r); else if (n > -Math.SQRT1_2) {\n var i = Math.acos(n);\n Vi(t, i / r)\n } else {\n var i = Math.PI - Math.asin(r), s = e[0] - n, o = e[4] - n, u = e[8] - n, a = gs;\n s * s > o * o && s * s > u * u ? qi(a, s, (e[3] + e[1]) / 2, (e[2] + e[6]) / 2) : o * o > u * u ? qi(a, (e[3] + e[1]) / 2, o, (e[7] + e[5]) / 2) : qi(a, (e[2] + e[6]) / 2, (e[7] + e[5]) / 2, u), Ki(a, t) < 0 && Vi(a, -1), Xi(a), Vi(a, i), Ri(t, a)\n }\n }\n\n function Ss(e, t, n, r) {\n var i = e.x * e.x, s = e.y * e.y, o = e.z * e.z;\n r[0] = 1 - n * (s + o), r[4] = 1 - n * (i + o), r[8] = 1 - n * (i + s);\n var u = t * e.z, a = n * e.x * e.y;\n r[1] = a - u, r[3] = a + u, u = t * e.y, a = n * e.x * e.z, r[2] = a + u, r[6] = a - u, u = t * e.x, a = n * e.y * e.z, r[5] = a - u, r[7] = a + u\n }\n\n function xs(e, t, n, r) {\n t *= br, n *= br, r *= br;\n var i = Math.cos(t), s = Math.sin(t), o = Math.cos(n), u = Math.sin(n), a = Math.cos(r), f = Math.sin(r), l = i * u, c = s * u;\n e[0] = o * a, e[1] = l * a + i * f, e[2] = -c * a + s * f, e[3] = -o * f, e[4] = -l * f + i * a, e[5] = c * f + s * a, e[6] = u, e[7] = -s * o, e[8] = i * o\n }\n\n function Ts(e, t) {\n var n = e[0] + e[4] + e[8], r;\n n > 0 ? (r = Math[Bt](1 + n) * 2, t.x = (e[5] - e[7]) / r, t.y = (e[6] - e[2]) / r, t.z = (e[1] - e[3]) / r, t.w = .25 * r) : e[0] > e[4] && e[0] > e[8] ? (r = Math[Bt](1 + e[0] - e[4] - e[8]) * 2, t.x = .25 * r, t.y = (e[3] + e[1]) / r, t.z = (e[6] + e[2]) / r, t.w = (e[5] - e[7]) / r) : e[4] > e[8] ? (r = Math[Bt](1 + e[4] - e[0] - e[8]) * 2, t.x = (e[3] + e[1]) / r, t.y = .25 * r, t.z = (e[7] + e[5]) / r, t.w = (e[6] - e[2]) / r) : (r = Math[Bt](1 + e[8] - e[0] - e[4]) * 2, t.x = (e[6] + e[2]) / r, t.y = (e[7] + e[5]) / r, t.z = .25 * r, t.w = (e[1] - e[3]) / r)\n }\n\n function Ds(e) {\n if (js) {\n var t = Ci();\n t != Ls && (Ls = t, xs(Os, 0, 0, -t), xs(As, -90, 0, +t));\n var n;\n if ($n <= 1 || $n == 3)n = To(); else {\n var r = xn[B], i = (r - Ns) / 1e3, s = i;\n $n == 2 ? s += 2 / 60 : $n == 6 ? s += 1 / 60 : $n == 7 && (s += 2 / 60), n = Lo(s)\n }\n us(Os, n, _s), us(_s, As, Ms), Ts(Ms, e)\n }\n }\n\n function Bs(e) {\n if (!or[a])return;\n var i = xn[B], s = i - Hs;\n Hs = i, s > 5e3 && (ui(), s = .16), fr++;\n if (fr < lr)return;\n go == t && (go = r, yo());\n var o = e[K], u = o.x, f = o.y, l = o.z;\n u == n && (u = 0), f == n && (f = 9.81), l == n && (l = 0);\n var c = e.acceleration;\n if (c) {\n var h = c.x, p = c.y, d = c.z;\n h == n && (h = 0), p == n && (p = 0), d == n && (d = 0), u -= h, f -= p, l -= d\n }\n if (Tn.ios || Tn.ie)u *= -1, f *= -1, l *= -1;\n var v = e.rotationRate, m = v.alpha, g = v.beta, y = v.gamma;\n m == n && (m = 0), g == n && (g = 0), y == n && (y = 0);\n if (Tn.ios || Tn[Ht] || Tn.ie) {\n m *= br, g *= br, y *= br;\n if (Tn.ie) {\n var b = m, w = g, E = y;\n m = w, g = E, y = b\n }\n }\n Uo ? Jo(s, m, g, y) : Pn && Ps(m, g, y, i);\n var S = zo;\n m -= S.rx, g -= S.ry, y -= S.rz, qi(Cs, u, f, l), Eo(Cs, s), Ns = i, qi(ks, m, g, y), xo(ks, i);\n if ($n <= 3 || $n == 5)ki.q.x = Li.q.x, ki.q.y = Li.q.y, ki.q.z = Li.q.z, ki.q.w = Li.q.w, ki.t = Li.t, Ds(Li.q), Li.t = i\n }\n\n function yo() {\n Yi(Qs), Yi(Gs), Gi(Zs), Zi(Zs, ho), Gi(Ys), Zi(Ys, 1), Gi(ro), Zi(ro, po), Gi(to), Gi(eo), Gi(no), Ui(Ws), Ui(Us), Ui(Rs), Ui(zs), Ui(qs), qi(Is, 0, 0, vo), js = t\n }\n\n function bo(e, t) {\n as(e, Is, Rs), bs(Rs, Us, co), Es(co, t)\n }\n\n function wo() {\n ts(Gs, fo), us(Zs, fo, lo), us(Gs, lo, Zs), Yi(Gs)\n }\n\n function Eo(e, t) {\n Ri(Us, e);\n if (js) {\n bo(Qs, Ws), t < 5 && (t = 5);\n var n = 1e3 / 60 / t, i = mo * n, s = 1 / mo, o = Xs;\n for (var u = 0; u < 3; u++)Ui(o), zi(o, u, s), ws(o, io), us(io, Qs, so), bo(so, Vs), $i(Ws, Vs, $s), Vi($s, i), ns(eo, u, $s);\n ts(eo, oo), us(Zs, oo, uo), us(eo, uo, ao), fs(ao, ro, to), is(to, oo), ts(eo, uo), us(uo, oo, ao), us(Zs, ao, no), as(no, Ws, qs), us(no, eo, oo), Yi(uo), ss(uo, oo), us(uo, Zs, oo), rs(Zs, oo), ws(qs, Gs), us(Gs, Qs, Qs), wo()\n } else bs(Is, Us, Qs), js = r\n }\n\n function xo(e, t) {\n if (So != 0) {\n var n = (t - So) / 1e3;\n n > 1 && (n = 1), Ri(zs, e), Vi(zs, -n), ws(zs, Gs), rs(Js, Qs), us(Gs, Qs, Js), rs(Qs, Js), wo(), rs(Ks, Ys), es(Ks, n * n), os(Zs, Ks)\n }\n So = t, Ri(Fs, e)\n }\n\n function To() {\n return Qs\n }\n\n function Lo(e) {\n var t = No;\n Ri(t, Fs), Vi(t, -e);\n var n = Co;\n ws(t, n);\n var r = ko;\n return us(n, Qs, r), r\n }\n\n function Ho(e) {\n var t = e[s](\"://\");\n if (t > 0) {\n var r = e[s](\"/\", t + 3), i = e[It](0, t)[c](), o = e[It](t + 3, r), u = e[It](r);\n return [i, o, u]\n }\n return n\n }\n \n function local_storage() {\n // krpano WebVR Plugin - cross-domain localstorage - server page\n // - save the WebVR cardboard settings (IPD, screensize, lens-settings, gyro-calibration)\n\n var ls = window.localStorage;\n if (ls)\n {\n if (false) //parent === window\n {\n // direct call - show stored settings\n var vals = ls.getItem(\"krpano.webvr.4\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals)\n {\n vals = (\"\"+vals).split(\",\")\n if (vals.length >= 6)\n {\n document.body.innerHTML =\n \"<div style='font-family:Arial;font-size:14px;'>\"+\n \"krpano WebVR Settings (v4): \"+\n \"ipd=\"+Number(vals[0]).toFixed(2)+\"mm, \"+\n \"screensize=\"+(vals[1] == 0 ? \"auto\" : Number(vals[1]).toFixed(1)+\" inch\")+\", \"+\n \"fov=\"+Number(vals[2]).toFixed(1)+\", \"+\n \"distortion=\"+Number(vals[3]).toFixed(2)+\", \"+\n \"distortion2=\"+(vals[10] ? vals[10] : \"none\")+\", \"+\n \"ca=\"+(!isNaN(Number(vals[11])) ? Number(vals[11]) : \"0.0\")+\", \"+\n \"vignette=\"+Number(vals[4]).toFixed(1)+\", \"+\n \"sensormode=\"+Number(vals[5]).toFixed(0)+\", \"+\n \"overlap=\"+(vals.length >= 10 ? Number(vals[9]) : 1.0).toFixed(2)+\n (vals.length >= 9 ? \", gyro-calibration=\"+Number(vals[6]).toFixed(4)+\"/\"+Number(vals[7]).toFixed(4)+\"/\"+Number(vals[8]).toFixed(4) : \"\")+\n \"</div>\";\n }\n }\n }\n else\n {\n // handle messages from the parent frame\n window.addEventListener(\"message\", function(event)\n {\n var request = (\"\"+event.data).toLowerCase();\n var vals;\n\n if ( request == \"load.1\" )\n {\n // load.1 => ipd,size,fov,dist,vig,ssm\n vals = ls.getItem(\"krpano.webvr.1\");\n if (vals)\n {\n if ((\"\"+vals).split(\",\").length == 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n }\n else if ( request == \"load.2\" )\n {\n // load.2 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz\n vals = ls.getItem(\"krpano.webvr.2\");\n if (vals)\n {\n if ((\"\"+vals).split(\",\").length == 9)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else\n {\n // use older version data: load.2 => ipd,size,fov,dist,vig,ssm,0,0,0\n vals = ls.getItem(\"krpano.webvr.1\");\n if (vals && (\"\"+vals).split(\",\").length == 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals+\",0,0,0\", event.origin);\n }\n }\n }\n else if ( request == \"load.3\" )\n {\n // load.3 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap\n vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals && (\"\"+vals).split(\",\").length >= 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else if ( request == \"load.4\" )\n {\n // load.4 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap,dist2,ca\n vals = ls.getItem(\"krpano.webvr.4\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals && (\"\"+vals).split(\",\").length >= 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else if ( request.slice(0,7) == \"save.1:\" )\n {\n // save.1:ipd,size,fov,dist,vig,ssm\n vals = request.slice(7).split(\",\");\n if (vals.length == 6)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10\n )\n {\n ls.setItem(\"krpano.webvr.1\", vals.join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.2:\" )\n {\n // save.2:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz\n vals = request.slice(7).split(\",\");\n if (vals.length == 9)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz)\n )\n {\n ls.setItem(\"krpano.webvr.2\", vals.join(\",\"));\n\n // save settings also for older versions\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.3:\" )\n {\n // save.3:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap\n vals = request.slice(7).split(\",\");\n if (vals.length == 10)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n var olp = Number(vals[9]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz) &&\n !isNaN(olp) && olp > 0 && olp < 2\n )\n {\n ls.setItem(\"krpano.webvr.3\", vals.join(\",\"));\n\n // save the settings also for older versions\n ls.setItem(\"krpano.webvr.2\", vals.slice(0,9).join(\",\"));\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.4:\" )\n {\n // save.4:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap,dist2,ca\n vals = request.slice(7).split(\",\");\n if (vals.length == 12)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n var olp = Number(vals[9]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz) &&\n !isNaN(olp) && olp > 0 && olp < 2\n )\n {\n ls.setItem(\"krpano.webvr.4\", vals.join(\",\"));\n\n // save the settings also for older versions\n ls.setItem(\"krpano.webvr.3\", vals.slice(0,10).join(\",\"));\n ls.setItem(\"krpano.webvr.2\", vals.slice(0,9).join(\",\"));\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n }\n , false);\n }\n }\n }\n\n function Bo(e) {\n if (Mo == n) {\n var i = Ho(Ao), s = Ho(window[wn].href);\n if (s[0] == \"http\" || s[0] == \"https\") {\n _o = s[0] + \"://\" + i[1], Do = _o + i[2];\n var o = document[bn](\"iframe\");\n o.style.cssText = \"position:absolute;width:1px;height:1px;left:-9999px;visibility:hidden;\",\n xn[m].viewerlayer.appendChild(o),\n Mo = o,\n o[u](\"load\", function () {\n Oo = r, e(Mo)\n }, true),\n window[u](\"message\", Fo, true);\n //o.src = Do\n local_storage();\n }\n } else Oo && e(Mo)\n }\n\n function jo(e) {\n Bo(function (t) {\n try {\n t.contentWindow.postMessage(e, _o)\n } catch (n) {\n }\n })\n }\n\n function Fo(e) {\n alert(233);\n if (e.origin == _o) {\n var t = \"\" + e.data;\n t[It](0, 15) == \"webvr_settings:\" && Io(t[It](15))\n }\n }\n\n function Io(e) {\n var t = e[mn](bt), n = Number(t[0]), i = Number(t[1]), s = Number(t[2]), o = Number(t[3]), u = Number(t[4]), a = Number(t[5]), f = Number(t[6]), l = Number(t[7]), c = Number(t[8]), h = Number(t[9]), p = \"\" + t[10], d = Number(t[11]);\n isNaN(f) && (f = 0), isNaN(l) && (l = 0), isNaN(c) && (c = 0), isNaN(h) && (h = 1), isNaN(d) && (d = 0), p[mn](\"|\")[kt] != 4 && (p = Qt), !isNaN(n) && n >= 30 && n < 90 && !isNaN(i) && i >= 0 && i < 12 && !isNaN(s) && s >= 1 && s < 180 && !isNaN(o) && o >= 0 && o < 10 && !isNaN(u) && u >= 1 && u < 500 && !isNaN(a) && a >= 0 && a < 10 && !isNaN(h) && h > 0 && h < 2 && (Hn = n, Bn = i, Fn = s, In = o, Wn = u, $n = a, zo.rx = f, zo.ry = l, zo.rz = c, jn = h, qn = p, zn = d, ir = r)\n }\n\n function qo(e) {\n if (tr || rr) {\n if (Po)try {\n var t = window.localStorage;\n if (t) {\n var n = t[tn](Pt);\n n || (n = t[tn](Dt)), n || (n = t[tn](At)), n || (n = t[tn](Ot)), n && Io(n)\n }\n } catch (r) {\n }\n (\"\" + e)[c]() != \"local\" && jo(\"load.4\")\n }\n }\n\n function Ro(e) {\n if (tr || rr) {\n var t = Hn + bt + Bn + bt + Fn + bt + In + bt + Wn + bt + $n + bt + zo.rx + bt + zo.ry + bt + zo.rz + bt + jn + bt + qn + bt + zn;\n if (Po)try {\n var n = window.localStorage;\n n && (n[Zt](Pt, t), n[Zt](Dt, t[mn](bt)[It](0, 10).join(bt)), n[Zt](At, t[mn](bt)[It](0, 9).join(bt)), n[Zt](Ot, t[mn](bt)[It](0, 6).join(bt)))\n } catch (r) {\n }\n (\"\" + e)[c]() != \"local\" && jo(\"save.4:\" + t)\n }\n }\n\n function Vo(e, n) {\n Zn && tr && !nr && (Uo = r, Pn = t, Wo = e, Xo = n, Jo(-1))\n }\n\n function $o() {\n Uo = t, zo.rx = 0, zo.ry = 0, zo.rz = 0\n }\n\n var e = \"registerattribute\", t = !1, n = null, r = !0, s = \"indexOf\", o = \"removeEventListener\", u = \"addEventListener\", a = \"enabled\", f = \"deviceorientation\", l = \"onunavailable\", c = \"toLowerCase\", h = \"devicemotion\", p = \"view\", d = \"maxpixelzoom\", v = \"architectural\", m = \"display\", g = \"continuousupdates\", y = \"control\", b = \"fisheyefovlink\", w = \"browser\", E = \"desktop\", S = \"getRecommendedEyeRenderRect\", x = \"stereographic\", T = \"limitview\", N = \"height\", C = \"getCurrentEyeFieldOfView\", k = \"events\", L = \"#ifdef GL_FRAGMENT_PRECISION_HIGH\\n\", A = \"loadwhilemoving\", O = \"onavailable\", M = \"float b = texture2D(sm,vB).b;\", _ = \"android\", D = \"downloadlockedlevel\", P = \"float r = texture2D(sm,vR).r;\", H = \"getRecommendedRenderTargetSize\", B = \"timertick\", j = \"stereooverlap\", F = \"getEyeParameters\", I = \"uniform1f\", q = \"vec2 vR = center + v * ca;\", R = \"vec2 vB = center + v / ca;\", U = \"precision mediump float;\\n\", z = \"renderTargetSize\", W = \"lockmultireslevel\", X = \"fisheye\", V = \"hlookat\", $ = \"getEyeTranslation\", J = \"call\", K = \"accelerationIncludingGravity\", Q = \"documentElement\", G = \"fovtype\", Y = \"width\", Z = \"#endif\\n\", et = \"precision highp float;\\n\", tt = \"atan2\", nt = \"pannini\", rt = \"uniform sampler2D sm;\", it = \"usercontrol\", st = \"orientation\", ot = \"scaleflying\", ut = \"vec2 v = tx - center;\", at = \"mobile\", ft = \"fovmin\", lt = \"renderRect\", ct = \"useProgram\", ht = \"fovmax\", pt = \"auto\", dt = \"uniform float ca;\", vt = \"uniform float ol;\", mt = \"left\", gt = \"webkitFullscreenElement\", yt = \"fullscreen\", bt = \",\", wt = \"varying vec2 tx;\", Et = \"recommendedFieldOfView\", St = \"mousetype\", xt = \"distorted\", Tt = \"right\", Nt = \"onunknowndevice\", Ct = \"stereo\", kt = \"length\", Lt = \"area\", At = \"krpano.webvr.2\", Ot = \"krpano.webvr.1\", Mt = \"mozFullScreenElement\", _t = \"#ifdef GL_ES\\n\", Dt = \"krpano.webvr.3\", Pt = \"krpano.webvr.4\", Ht = \"firefox\", Bt = \"sqrt\", jt = \"vlookat\", Ft = \"visible\", It = \"slice\", qt = \"msFullscreenElement\", Rt = \"contextmenu\", Ut = \"mozGetVRDevices\", zt = \"webkitIsFullScreen\", Wt = \"YXZ\", Xt = \"void main()\", Vt = \"_VR_backup\", $t = \"layer\", Jt = \"fullscreenElement\", Kt = \"touchstart\", Qt = \"1|0|0|0\", Gt = \"devicename\", Yt = \"fullscreenchange\", Zt = \"setItem\", en = \"maxmem\", tn = \"getItem\", nn = \"mousedown\", rn = \"mousemove\", sn = \"galaxy s4\", on = \"iPhone 6+\", un = \"touchmove\", an = \"camroll\", fn = \"changedTouches\", ln = \"iPhone 6\", cn = \"screentosphere\", hn = \"createppshader\", pn = \"eyeTranslation\", dn = \"hotspot[\", vn = \"hardwareUnitId\", mn = \"split\", gn = \"touchend\", yn = \"#else\\n\", bn = \"createElement\", wn = \"location\", En = this, Sn = document, xn = n, Tn = n, Nn = n, Cn = 1, kn = .00125, Ln = t, An = r, On = r, Mn = t, _n = t, Dn = r, Pn = t, Hn = 63.5, Bn = pt, jn = 1, Fn = 96, In = .6, qn = Qt, Rn = [1, 0, 0, 0], Un = t, zn = 0, Wn = 100, Xn = t, Vn = 1, $n = 3, Jn = \"\", Kn = r, Qn = n, Gn = n, Yn = n, Zn = t, er = t, tr = t, nr = t, rr = t, ir = t, sr = t, or = {\n enabled: t,\n eyetranslt: Pi,\n updateview: _i,\n prjmatrix: Di,\n getsize: Hi,\n getcursor: Fi\n }, ur = r, ar = 0, fr = 0, lr = 6, cr = 0, hr = 1, pr = 0, dr = 0, vr = 0, mr = t, gr = n, yr = n, br = Math.PI / 180, wr = 180 / Math.PI;\n En.registerplugin = function (i, s, o) {\n xn = i, Nn = o;\n if (xn.version < \"1.19\" || xn.build < \"2015-07-09\") {\n xn.trace(3, \"WebVR plugin - too old krpano version (min. 1.19)\");\n return\n }\n if (xn.webVR)return;\n Tn = xn.device, Nn[e](\"worldscale\", Cn, function (e) {\n var t = Number(e);\n isNaN(t) || (Cn = Math.max(t, .1))\n }, function () {\n return Cn\n }), Nn[e](\"mousespeed\", kn, function (e) {\n var t = Number(e);\n isNaN(t) || (kn = t)\n }, function () {\n return kn\n }), Nn[e](\"pos_tracking\", Ln, function (e) {\n Ln = Er(e)\n }, function () {\n return Ln\n }), Nn[e](\"multireslock\", An, function (e) {\n An = Er(e), or[a] && ri()\n }, function () {\n return An\n }), Nn[e](\"mobilevr_support\", On, function (e) {\n On = Er(e)\n }, function () {\n return On\n }), Nn[e](\"mobilevr_touch_support\", Mn, function (e) {\n Mn = Er(e)\n }, function () {\n return Mn\n }), Nn[e](\"mobilevr_fake_support\", _n, function (e) {\n _n = Er(e)\n }, function () {\n return _n\n }), Nn[e](\"mobilevr_ipd\", Hn, function (e) {\n var t = Number(e);\n isNaN(t) || (Hn = t), Ur()\n }, function () {\n return Hn\n }), Nn[e](\"mobilevr_screensize\", Bn, function (e) {\n $r(e)\n }, function () {\n return Jr()\n }), Nn[e](\"mobilevr_lens_fov\", Fn, function (e) {\n var t = Number(e);\n isNaN(t) || (Fn = t, Ur())\n }, function () {\n return Fn\n }), Nn[e](\"mobilevr_lens_overlap\", jn, function (e) {\n var t = Number(e);\n isNaN(t) || (jn = t, Ur())\n }, function () {\n return jn\n }), Nn[e](\"mobilevr_lens_dist\", In, function (e) {\n var t = Number(e);\n isNaN(t) || (In = t, Ur())\n }, function () {\n return In\n }), Nn[e](\"mobilevr_lens_dist2\", qn, function (e) {\n qn = e, Ur()\n }, function () {\n return qn\n }), Nn[e](\"mobilevr_lens_ca\", zn, function (e) {\n var t = Number(e);\n isNaN(t) || (zn = t, Ur())\n }, function () {\n return zn\n }), Nn[e](\"mobilevr_lens_vign\", Wn, function (e) {\n var t = Number(e);\n isNaN(t) || (Wn = t, Ur())\n }, function () {\n return Wn\n }), Nn[e](\"mobilevr_webvr_dist\", Xn, function (e) {\n Xn = Er(e)\n }, function () {\n return Xn\n }), Nn[e](\"mobilevr_wakelock\", Dn, function (e) {\n Dn = Er(e)\n }, function () {\n return Dn\n }), Nn[e](\"mobilevr_autocalibration\", Pn, function (e) {\n Pn = Er(e)\n }, function () {\n return Pn\n }), Nn[e](\"mobilevr_sensor\", Vn, function (e) {\n Vn = parseInt(e) & 1\n }, function () {\n return Vn\n }), Nn[e](\"mobilevr_sensor_mode\", $n, function (e) {\n var t = parseInt(e);\n t >= 0 && t <= 7 && ($n = t), fr = 0\n }, function () {\n return $n\n }), Nn[e](\"vr_cursor\", Jn, function (e) {\n Bi(e)\n }, function () {\n return Jn\n }), Nn[e](\"vr_cursor_enabled\", Kn, function (e) {\n Kn = Er(e)\n }, function () {\n return Kn\n }), Nn[e](\"vr_cursor_onover\", Gn, function (e) {\n Gn = e\n }, function () {\n return Gn\n }), Nn[e](\"vr_cursor_onout\", Yn, function (e) {\n Yn = e\n }, function () {\n return Yn\n }), Nn[e](\"isavailable\", er, function (e) {\n }, function () {\n return er\n }), Nn[e](\"isenabled\", Zn, function (e) {\n }, function () {\n return Zn\n }), Nn[e](\"iswebvr\", !tr, function (e) {\n }, function () {\n return !tr || rr\n }), Nn[e](\"ismobilevr\", tr, function (e) {\n }, function () {\n return tr || rr\n }), Nn[e](\"isfake\", nr, function (e) {\n }, function () {\n return nr\n }), Nn[e](\"havesettings\", ir, function (e) {\n }, function () {\n return ir\n }), Nn[e](Gt, \"\", function (e) {\n }, function () {\n return Xr()\n }), Nn[e](\"devicesize\", \"\", function (e) {\n }, function () {\n return Vr()\n }), Nn[e](O, n), Nn[e](l, n), Nn[e](Nt, n), Nn[e](\"onentervr\", n), Nn[e](\"onexitvr\", n), Nn.entervr = Gr, Nn.exitvr = Yr, Nn.togglevr = Zr, Nn.resetsensor = ei, Nn.loadsettings = qo, Nn.savesettings = Ro, Nn.calibrate = Vo, Nn.resetcalibration = $o, Nn.update = Qr;\n if (xn.webGL) {\n xn.webVR = or;\n var u = Tn[_] && Tn[Ht], f = document[Q].requestPointerLock || document[Q].mozRequestPointerLock || document[Q].webkitRequestPointerLock, c = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock;\n f && c && (mr = r, gr = f, yr = c);\n try {\n u == t && navigator.getVRDevices ? navigator.getVRDevices().then(jr) : u == t && navigator[Ut] ? navigator[Ut](jr) : On ? xr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n } catch (h) {\n }\n } else sr == t && (sr = r, xn[J](Nn[l], Nn))\n }, En.unloadplugin = function () {\n Yr(), oi(t, r), xn.webVR = n\n };\n var kr = n, Lr = n, Ar = n, Or = n, Mr = n, _r = n, Dr = n, Pr = n, Hr = n, Br = 100, Fr = n, qr = n, ti = n, oi = function () {\n var e = n, r = n;\n return function (i, s) {\n if (Tn[at] && nr == t)if (i)Tn.ios ? e = window.setInterval(function () {\n window[wn] = window[wn], window.setTimeout(window.stop, 0)\n }, 15e3) : Tn[_] && (r == n && (r = document[bn](\"video\"), r.setAttribute(\"loop\", \"\"), r.canPlayType(\"video/webm\") != \"\" && (r.src = Qo)), r.play()); else {\n e && (window.clearInterval(e), e = n);\n if (r && s) {\n r.pause();\n try {\n r.src = \"\", r.removeAttribute(\"src\")\n } catch (o) {\n }\n r = n\n }\n }\n }\n }(), ai = 0, ci = 0, ki = {q: new pi(0, 0, 0, 1), t: 0}, Li = {\n q: new pi(0, 0, 0, 1),\n t: 0\n }, Ai = new pi(0, 0, 0, 1), Oi = n, ls = new Ii, cs = new Ii, hs = new Ii, ps = new Ii, ds = new Ii, vs = Qi(), ms = Qi(), gs = new Ii, ys = new Ii, Ns = 0, Cs = new Ii, ks = new Ii, Ls = n, As = Qi(), Os = Qi(), Ms = Qi(), _s = Qi(), Ps = function () {\n var e = 0, t = 0, n = 0, r = 0, i = 0, s = 0, o = 0, u = 0, a = 0, f = 0, l = 1, c = 0, h = 0, p = 0, d = .03;\n return function (c, h, p, v) {\n var m = c - e, g = h - t, y = p - n, b = v - r;\n e = c, t = h, n = p, r = v;\n var w = Math[Bt](m * m + g * g + y * y);\n if (b > 500) {\n i = 0;\n return\n }\n if (i == 0) {\n i = b, s = w;\n return\n }\n i = i * .95 + .05 * b;\n var E = Math.min(15 * i / 1e3, .5);\n s = s * (1 - E) + E * w;\n var S = zo;\n s < d ? (o++, u += c, a += h, f += p, o > 19 && (S.rx = S.rx * (1 - l) + l * (u / o), S.ry = S.ry * (1 - l) + l * (a / o), S.rz = S.rz * (1 - l) + l * (f / o), l > .5 && (l *= .9), s = 10, d *= .5)) : (o = 1, u = c, a = h, f = p)\n }\n }(), Hs = 0, js = t, Fs = new Ii, Is = new Ii, qs = new Ii, Rs = new Ii, Us = new Ii, zs = new Ii, Ws = new Ii, Xs = new Ii, Vs = new Ii, $s = new Ii, Js = Qi(), Ks = Qi(), Qs = Qi(), Gs = Qi(), Ys = Qi(), Zs = Qi(), eo = Qi(), to = Qi(), no = Qi(), ro = Qi(), io = Qi(), so = Qi(), oo = Qi(), uo = Qi(), ao = Qi(), fo = Qi(), lo = Qi(), co = Qi(), ho = 20, po = .5, vo = 9.81, mo = 1e7, go = t, So = 0, No = new Ii, Co = Qi(), ko = Qi(), Ao = \"http://d8d913s460fub.cloudfront.net/krpanocloud/webvr_localstorage.html?v=114\", Oo = t, Mo = n, _o = n, Do = n, Po = r, Uo = t, zo = {\n rx: 0,\n ry: 0,\n rz: 0\n }, Wo = n, Xo = n, Jo = function () {\n function i() {\n var t = 0, r = n * 3, i = 0, s = 0, o = 0, u = 0, a = 0, f = 0, l = 0, c = 0, h = 0, p = 0;\n for (t = 0; t < r; t += 3)i += e[t | 0], s += e[t + 1 | 0], o += e[t + 2 | 0];\n i /= n, s /= n, o /= n;\n for (t = 0; t < r; t += 3)l = e[t | 0] - i, c = e[t + 1 | 0] - s, h = e[t + 2 | 0] - o, u += l * l, a += c * c, f += h * h;\n u = Math[Bt](u / n), a = Math[Bt](a / n), f = Math[Bt](f / n), p = Math[Bt](u * u + a * a + f * f);\n if (p < .05) {\n var d = zo;\n d.rx = i, d.ry = s, d.rz = o, Wo && xn[J](Wo, Nn)\n } else Xo && xn[J](Xo, Nn)\n }\n\n var e = new Array(300), n = 0, r = 0;\n return function (s, o, u, a) {\n if (s < 0) {\n n = 0, r = xn[B];\n return\n }\n var f = xn[B] - r;\n if (f > 500) {\n var l = n * 3;\n e[l | 0] = o, e[l + 1 | 0] = u, e[l + 2 | 0] = a, n++;\n if (n > 100 || f > 2500)Uo = t, i()\n }\n }\n }(), Ko = function () {\n function u(t) {\n for (i = 0; i < t[kt]; i++)if (e && t[i] === e || s && t[i] === s)t.splice(i, 1), i--\n }\n\n var e = n, r = \"\" + _t + L + et + yn + U + Z + Z + rt + wt + dt + vt + Xt + \"{\" + \"float g = texture2D(sm,tx).g;\" + \"vec2 center = vec2(0.5 + (0.5 - ol)*(step(0.5,tx.x) - 0.5), 0.5);\" + ut + q + P + R + M + \"gl_FragColor=vec4(r,g,b,1.0);\" + \"}\", s = n, o = \"\" + _t + L + et + yn + U + Z + Z + rt + wt + \"uniform vec2 sz;\" + \"uniform float ss;\" + dt + vt + \"uniform float vg;\" + \"uniform vec4 dd;\" + Xt + \"{\" + \"float vig = 0.015;\" + \"float side = step(0.5,tx.x) - 0.5;\" + \"float aspect = (sz.x / sz.y);\" + \"vec2 center = vec2(0.5 + (0.5 - ol)*side, 0.5);\" + ut + \"v.x = v.x * aspect;\" + \"v *= 2.0 * ss;\" + \"float rs = dot(v,v);\" + \"v = v * (dd.x + rs*(dd.y + rs*(dd.z + rs*dd.w)));\" + \"v /= 2.0 * ss;\" + \"v.x = v.x / aspect;\" + \"vec2 vG = center + v;\" + \"float a = (1.0 - smoothstep(vG.x-vig - side*ol, vG.x - side*ol, center.x - 0.25)) * \" + \"(1.0 - smoothstep(center.x + 0.25 - vG.x + side*ol - vig, center.x + 0.25 - vG.x + side*ol, 0.0)) * \" + \"(1.0 - smoothstep(vG.y-vig, vG.y, 0.0)) * \" + \"(1.0 - smoothstep(1.0 - vG.y-vig,1.0 - vG.y, 0.0));\" + \"a *= smoothstep(rs-vig, rs+vig, vg);\" + q + R + P + \"float g = texture2D(sm,vG).g;\" +\n M + \"gl_FragColor=vec4(a*r,a*g,a*b,1.0);\" + \"}\";\n return function (i) {\n var a = xn.webGL;\n if (a) {\n var f, l = a.context, c = a.ppshaders, h = 1 - zn * .1 / hr;\n Un == t && h > .999999 && h < 1.000001 && (i = t), xn[m][Ct] == t && (i = t);\n if (i)if (Un) {\n s == n && (s = a[hn](o, \"ss,ca,dd,ol,sz,vg\"));\n if (s) {\n var p = 1 / Rn[0], d = Rn[1], v = Rn[2], g = Rn[3];\n a[ct](s.prg), l[I](s.ss, hr), l[I](s.ca, h), l.uniform4f(s.dd, p, p * d, p * v, p * g), l[I](s.ol, .5 * vr * (1 + (jn - 1) * .1)), l[I](s.vg, Wn / 30), a[ct](n), u(c), c.push(s)\n }\n } else e == n && (e = a[hn](r, \"ca,ol\")), e && (a[ct](e.prg), l[I](e.ca, h), l[I](e.ol, .5 * vr * (1 + (jn - 1) * .1)), a[ct](n), u(c), c.push(e)); else u(c)\n }\n }\n }(), Qo = \"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4ECQoWBAhhTgGcBAAAAAAABzRFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEuTbuMU6uEHFO7a1OsggGw7AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEMq17GDD0JATYCMTGF2ZjU2LjMuMTAwV0GMTGF2ZjU2LjMuMTAwc6SQC+JFWnEfyt4nOD98NcnLDESJiAAAAAAAAAAAFlSuawEAAAAAAABCrgEAAAAAAAA514EBc8WBAZyBACK1nIN1bmSGhVZfVlA4g4EBI+ODgw9CQOABAAAAAAAADrCBCLqBCFSwgQhUuoEIH0O2dQEAAAAAAAAo54EAo6OBAACAEAIAnQEqCAAIAABHCIWFiIWEiAICAAwNYAD+/6PeABxTu2sBAAAAAAAAEbuPs4EAt4r3gQHxggF88IED\"\n };\n\n\n\n c.reloadurl = function () {\n if (c.sprite) {\n var a = ra.parsePath(c.url), b = a, d = \"\", f = b.indexOf(\"?\");\n 0 < f && (b = b.slice(0, f));\n f = b.indexOf(\"#\");\n 0 < f && (b = b.slice(0, f));\n f = b.lastIndexOf(\".\");\n 0 < f && (d = F(b.slice(f + 1)));\n if (c.loading) {\n if (c.loadingurl == a)return;\n c.loader.kobject = null;\n ba(c.loader, _[48], e, !0);\n ba(c.loader, \"load\", c.loadurl_done, !1);\n Jc(c);\n R(c.loader, _[48], e, !0);\n R(c.loader, \"load\", c.loadurl_done, !1)\n }\n if (c.loadedurl != a)\n if (D = !1, c.loadedurl = null, _[57] == b) {\n z = D = !0;\n Jc(c);\n c.loadedurl = a;\n c.createvar(_[456], c.bgcolor ? Number(c.bgcolor) : 0, u);\n c.createvar(_[463], c.bgalpha ? Number(c.bgalpha) : 0, u);\n c.createvar(_[337], c.bgroundedge ? c.bgroundedge : \"0\", u);\n c.createvar(_[406], c.bgborder ? c.bgborder : \"0\", u);\n c.createvar(_[413], c.bgshadow ? c.bgshadow : \"\", u);\n c.createvar(_[386], pa(c.bgcapture), g);\n g();\n u();\n var h = {};\n h.ss = X;\n h.onresize = function (a, b) {\n a = c.pixelwidth;\n b = c.pixelheight;\n c.imagewidth = a / c.scale;\n c.imageheight = b / c.scale;\n h.ss != X && (h.ss = X, u());\n Q = !0;\n return !1\n };\n c.jsplugin = h;\n c.loadurl_done()\n } \n else if (0 <= a.indexOf(_[281])) {\n D = !0;\n Jc(c);\n c.loadedurl = a;\n var k = new Af;\n k.registerplugin(m, c.getfullpath(), c);\n c.jsplugin = k;\n 0 == c._dyn ? (k.updatehtml(), c.loadurl_done()) : setTimeout(function () {\n k.updatehtml();\n c.loadurl_done()\n }, 7)\n } \n else\"js\" == d ? \n (D = !0, Jc(c), c.loading = !0, c.loaded = !1, c.loadingurl = a, ra.loadfile2(a, _[92], function (b) {\n c.loading = !1;\n c.loaded = !0;\n c.loadedurl = a;\n b = b.data;\n if (null != b) {\n var d = 'the file \"' + a + '\" is not a krpano plugin!';\n try {\n eval(b + \";\")\n } catch (e) {\n d = 'parsing \"' + a + '\" failed: ' + e\n }\n _[11] == typeof krpanoplugin2 ? (b = new krpanoplugin2, b.registerplugin(m, c.getfullpath(), c), c._nativeelement = !0, c.jsplugin = b, c.loadurl_done()) : la(3, d)\n }\n })) : \"swf\" == d ? la(2, c._type + \"[\" + c.name + _[78] + Vd(a)) : c.loader.src != a && (c.loaded && c.preload && (c._ispreload = !0, c.preload = !1, c.onloaded = null), ra.DMcheck(a) ? (c.loading = !0, c.loaded = !1, c.loadingurl = a, c.loader.src = a) : (c.loading = !1, la(3, c._type + \"[\" + c.name + _[85] + a)))\n }\n };\n c.loadurl_done = function () {\n 1 != c._destroyed && (0 == D && (c.sprite.style.backgroundImage = 'url(\"' + c.loader.src + '\")'), h(c, c._crop), c.loading = !1, Q = c.loaded = !0, 0 == D && (c.loadedurl = c.loadingurl), c.poschanged = !0, 0 == (b.iphone && b.retina && 7 > b.iosversion) && null == c.jsborder && 0 == D && null == c.parent && null == c._childs && (c._use_css_scale = !0), 0 == c.preload && 0 == c._ispreload && (c._busyonloaded = da.busy || da.blocked, c._busyonloaded && da.callaction(_[188], c, !0)), da.callaction(null != c.altonloaded ? c.altonloaded : c.onloaded, c, !0))\n };\n var B = null;\n c.updatepluginpos = c.updatepos = function () {\n var a = _[1] == c._type;\n c.poschanged = !1;\n var d = c.sprite, e = c.loader;\n if (d && (e || 0 != D)) {\n D && (e = null);\n var f = c._align, g = c._scale;\n f || (f = _[66]);\n var h = c._use_css_scale, k = c.imagewidth, l = c.imageheight, m = !1, p = c._crop;\n c.pressed && c._ondowncrop ? p = c._ondowncrop : c.hovering && c._onovercrop && (p = c._onovercrop);\n p && (p = String(p).split(\"|\"), 4 == p.length ? (p[0] |= 0, p[1] |= 0, p[2] |= 0, p[3] |= 0) : p = null);\n var r = c.scale9grid;\n r && (r = String(r).split(\"|\"), 4 <= r.length ? (r[0] |= 0, r[1] |= 0, r[2] |= 0, r[3] |= 0, h = c._use_css_scale = !1, c._scalechildren = !1) : r = null);\n var u = X, v = Qa, w = ya;\n a && c.distorted && (u = 1, v = w = 1E3);\n var x = 1, y = 1, z = c._parent, E = !0;\n if (z) {\n var C = n(z);\n C ? (C.poschanged && C.updatepos(), 0 == h ? (v = C._pxw * u, w = C._pxh * u) : (v = C.imagewidth * u, w = C.imageheight * u), C._scalechildren ? (x = 0 != C.imagewidth ? v / u / C.imagewidth : 1, y = 0 != C.imageheight ? w / u / C.imageheight : 1) : (x *= C._finalxscale, y *= C._finalyscale), 0 == C.loaded && (E = !1, d.style.display = \"none\")) : la(3, 'no parent \"' + z + '\" found')\n }\n var A = c._width, F = c._height, H = c._x, J = c._y, z = c._ox, K = c._oy;\n isNaN(k) && (k = 0);\n isNaN(l) && (l = 0);\n A && 0 < String(A).indexOf(\"%\") ? A = parseFloat(A) * (v / u) / (100 * x) : null == A && (A = k);\n F && 0 < String(F).indexOf(\"%\") ? F = parseFloat(F) * (w / u) / (100 * y) : null == F && (F = l);\n var S = \"prop\" == A | (\"prop\" == F) << 1, A = Number(A) * u, F = Number(F) * u;\n 0 > A && (A = v / x + A, 0 > A && (A = 0));\n 0 > F && (F = w / y + F, 0 > F && (F = 0));\n S && (S & 1 ? A = 0 != l ? Number(F) * k / l : 0 : F = 0 != k ? Number(A) * l / k : 0);\n 0 < c.maxwidth && A > u * c.maxwidth && (A = u * c.maxwidth);\n 0 < c.minwidth && A < u * c.minwidth && (A = u * c.minwidth);\n 0 < c.maxheight && F > u * c.maxheight && (F = u * c.maxheight);\n 0 < c.minheight && F < u * c.minheight && (F = u * c.minheight);\n A = A * x * g;\n F = F * y * g;\n H && 0 < String(H).indexOf(\"%\") ? H = parseFloat(H) * (v / u) / (100 * x) : null == H && (H = 0);\n J && 0 < String(J).indexOf(\"%\") ? J = parseFloat(J) * (w / u) / (100 * y) : null == J && (J = 0);\n H = Number(H) * u * x;\n J = Number(J) * u * y;\n g = c._hszscale;\n z = z && 0 < String(z).indexOf(\"%\") ? parseFloat(z) * A * g / 100 / u : null == z ? 0 : z * x;\n K = K && 0 < String(K).indexOf(\"%\") ? parseFloat(K) * F * g / 100 / u : null == K ? 0 : K * y;\n z = Number(z) * u;\n K = Number(K) * u;\n 0 != c.accuracy || a || (A = hc(A), F = hc(F));\n var g = 0 != k ? A / k : 0, S = 0 != l ? F / l : 0, ea = A / u, Z = F / u;\n if (ea != c._pxw || Z != c._pxh)c._pxw = ea, c._pxh = Z, c.pixelwidth = ea / x, c.pixelheight = Z / y, m = !0;\n this._scalechildren ? (c._finalxscale = g, c._finalyscale = S) : (c._finalxscale = x, c._finalyscale = y);\n h ? (d.style.width = k + \"px\", d.style.height = l + \"px\") : (d.style.width = A + \"px\", d.style.height = F + \"px\");\n if (r) {\n var Z = r, O = A, N = F, I = p, p = c.sprite, l = c.loader, M;\n M = X;\n 5 == Z.length && (M *= Number(Z[4]));\n e = l.naturalWidth;\n k = l.naturalHeight;\n null == I && (I = [0, 0, e, k]);\n l = 'url(\"' + l.src + '\")';\n if (null == B)for (B = Array(9), x = 0; 9 > x; x++)r = Ja(), r.kobject = c, r.imgurl = null, r.style.position = _[0], r.style.overflow = _[6], B[x] = r, p.appendChild(r);\n for (var x = [I[0] + 0, I[0] + Z[0], I[0] + Z[0] + Z[2], I[0] + I[2]], y = [I[1] + 0, I[1] + Z[1], I[1] + Z[1] + Z[3], I[1] + I[3]], ea = [Z[0], Z[2], I[2] - Z[0] - Z[2]], Z = [Z[1], Z[3], I[3] - Z[1] - Z[3]], O = [ea[0] * M | 0, O - ((ea[0] + ea[2]) * M | 0), ea[2] * M | 0], R = [Z[0] * M | 0, N - ((Z[0] + Z[2]) * M | 0), Z[2] * M | 0], T = [0, O[0], O[0] + O[1]], U = [0, R[0], R[0] + R[1]], qa, V, I = 0; 3 > I; I++)for (M = 0; 3 > M; M++)r = B[3 * I + M], N = r.style, qa = 0 != ea[M] ? O[M] / ea[M] : 0, V = 0 != Z[I] ? R[I] / Z[I] : 0, r.imgurl != l && (r.imgurl = l, N.backgroundImage = l), r = b.mac && b.firefox ? L.devicePixelRatio : 1, N[pd] = (e * qa * r | 0) / r + \"px \" + (k * V * r | 0) / r + \"px\", N.backgroundPosition = (-x[M] * qa * r | 0) / r + \"px \" + (-y[I] * V * r | 0) / r + \"px\", N.left = T[M] + \"px\", N.top = U[I] + \"px\", N.width = O[M] + \"px\", N.height = R[I] + \"px\";\n p.style.background = \"none\"\n } else {\n if (B) {\n try {\n for (k = 0; 9 > k; k++)B[k].kobject = null, d.removeChild(B[k])\n } catch (Ca) {\n }\n B = null;\n c.sprite && c.loader && (c.sprite.style.backgroundImage = 'url(\"' + c.loader.src + '\")')\n }\n p ? (k = -p[0], p = -p[1], h || (k *= g, p *= S), d.style.backgroundPosition = k + \"px \" + p + \"px\") : d.style.backgroundPosition = \"0 0\";\n e && (d.style[pd] = 0 == h ? e.naturalWidth * g + \"px \" + e.naturalHeight * S + \"px\" : e.naturalWidth + \"px \" + e.naturalHeight + \"px\")\n }\n c.jsplugin && c.jsplugin.onresize && (c._pxw != c.imagewidth || c._pxh != c.imageheight) && (p = [c.imagewidth, c.imageheight], c.imagewidth = c._pxw, c.imageheight = c._pxh, !0 === c.jsplugin.onresize(c._pxw, c._pxh) && (c.imagewidth = p[0], c.imageheight = p[1]));\n c._oxpix = z;\n c._oypix = K;\n l = \"\";\n e = p = 0;\n if (0 == a) {\n p = c._edge;\n if (null == p || \"\" == p)p = f;\n a = k = 0;\n k = 0 <= p.indexOf(\"left\") ? k + 0 : 0 <= p.indexOf(_[3]) ? k + -A : k + -A / 2;\n a = 0 <= p.indexOf(\"top\") ? a + 0 : 0 <= p.indexOf(_[2]) ? a + -F : a + -F / 2;\n p = 0 <= f.indexOf(\"left\") ? H + k : 0 <= f.indexOf(_[3]) ? v - H + k : v / 2 + H + k;\n e = 0 <= f.indexOf(\"top\") ? J + a : 0 <= f.indexOf(_[2]) ? w - J + a : w / 2 + J + a;\n c.pixelx = (p + z) / u;\n c.pixely = (e + K) / u;\n p -= q[3];\n e -= q[0];\n 0 == c.accuracy && (p = hc(p), e = hc(e));\n h && (u = f = 1, v = c.imagewidth / 2, w = c.imageheight / 2, J = H = 0, C && 0 == C._scalechildren && (f /= C.pixelwidth / C.imagewidth, u /= C.pixelheight / C.imageheight, H = -k * (1 - f), J = -a * (1 - u)), l = _[60] + (-v + H) + \"px,\" + (-w + J) + _[340] + g * f + \",\" + S * u + _[293] + v + \"px,\" + w + \"px) \");\n 0 == c.accuracy && (p = hc(p), e = hc(e));\n C = A / 2 + k;\n F = F / 2 + a;\n h && (0 != g && (C /= g, z /= g), 0 != S && (F /= S, K /= S));\n l = _[60] + p + \"px,\" + e + \"px) \" + l + _[60] + -C + \"px,\" + -F + _[332] + c._rotate + _[245] + (C + z) + \"px,\" + (F + K) + \"px)\";\n Kc && 2 > Nb && !0 !== b.opera ? l = _[182] + l : b.androidstock && (l = _[199] + l);\n ib ? d.style[ib] = l : (d.style.left = p + \"px\", d.style.top = e + \"px\");\n h = c._visible && E ? \"\" : \"none\";\n h != d.style.display && (d.style.display = h)\n }\n if (m || Q) {\n if (d = c._childs)for (m = d.length, k = 0; k < m; k++)d[k].updatepos();\n Q = !1\n }\n }\n }\n }, Af = function () {\n function a(a, b, c, e) {\n v.registerattribute(b, c, function (c) {\n r[b] != c && (r[b] = c, null != e ? e(b, c) : d(a))\n }, function () {\n return r[b]\n })\n }\n\n function d(a) {\n l |= a;\n v && null == y && (y = setTimeout(m, 0))\n }\n\n function m() {\n y = null;\n if (v) {\n var a = !1;\n 2 == l && (a = e());\n 0 == a && p();\n l = 0\n }\n }\n\n function f(a) {\n a && 0 == a.indexOf(_[74]) && ((a = U(\"data[\" + a.slice(5) + _[61])) || (a = \"\"));\n return a\n }\n\n function g(a) {\n if (a && a.parentNode)try {\n a.parentNode.removeChild(a)\n } catch (b) {\n }\n }\n\n function n(a) {\n a && (a.style.left = _[122], a.style.visibility = _[6], V.viewerlayer.appendChild(a))\n }\n\n function k(a) {\n a.ontouchend = function () {\n a.click()\n }\n }\n\n function e() {\n var a = !1;\n if (H) {\n var b = H.childNodes[0];\n if (b) {\n var a = b.style, b = pa(r.background), c = pa(r.border), d = parseInt(r.backgroundcolor), e = parseFloat(r.backgroundalpha);\n isNaN(e) && (e = 1);\n var f = parseFloat(r.borderwidth);\n isNaN(f) && (f = 1);\n var g = r.bordercolor, g = g ? parseInt(g) : 0, h = parseFloat(r.borderalpha);\n isNaN(h) && (h = 1);\n var k = Number(r.shadow);\n isNaN(k) && (k = 0);\n var l = Number(r.textshadow);\n isNaN(l) && (l = 0);\n var m = 1 == Lc ? .78 : .8, n = r.shadowangle * Y, p = r.textshadowangle * Y;\n a.backgroundColor = b ? ca(d, e) : \"\";\n a.borderColor = c && 0 < f ? ca(g, e * h) : \"\";\n a.borderRadius = 0 < D[0] + D[1] + D[2] + D[3] ? D.join(\"px \") + \"px\" : \"\";\n a[pc] = 0 < k ? Math.round(k * Math.cos(n)) + \"px \" + Math.round(k * Math.sin(n)) + \"px \" + m * r.shadowrange + \"px \" + ca(r.shadowcolor, e * r.shadowalpha) : \"\";\n a.textShadow = 0 < l ? Math.round(l * Math.cos(p)) + \"px \" + Math.round(l * Math.sin(p)) + \"px \" + m * r.textshadowrange + \"px \" + ca(r.textshadowcolor, e * r.textshadowalpha) : \"\";\n a = !0\n }\n }\n return a\n }\n\n function p() {\n if (v) {\n y && (clearTimeout(y), y = null);\n var a = 2 == u || 1 == u && 0 == v.haveUserWidth(), d = 2 == h || 1 == h && 0 == v.haveUserHeight(), g = r.html, m = r.css, g = g ? f(g) : \"\", m = m ? f(m) : \"\";\n pa(r.background);\n var w = pa(r.border), t = parseFloat(r.borderwidth);\n isNaN(t) && (t = 1);\n var g = Ed(g), m = m.split(\"0x\").join(\"#\"), E = m.split(\"}\").join(\"{\").split(\"{\");\n if (1 < E.length) {\n for (var D = [], m = 1; m < E.length; m += 2) {\n var J = Ha(E[m - 1]), L = E[m], M = \"p\" == F(J) ? \"div\" : J, g = g.split(\"<\" + J).join(\"<\" + M + _[407] + L + \"' \"), g = g.split(\"</\" + J + \">\").join(\"</\" + M + \">\");\n D.push(E[m])\n }\n m = \"\"\n }\n g = _[206] + K[0] + \"px \" + K[1] + \"px \" + K[2] + \"px \" + K[3] + \"px;\" + m + \"'>\" + g + _[68];\n 1 == r.vcenter && 0 == d && (g = \"<table style='width:100%;height:100%;border-collapse:collapse;text-decoration:inherit;'><tr style='vertical-align:middle;'><td style='padding:0;'>\" + g + _[214]);\n g = g.split(\"<p\").join(_[161]);\n g = g.split(\"</p>\").join(_[68]);\n m = _[213];\n if (1 == a || 0 == pa(r.wordwrap))m += _[205];\n 0 == d && (m += _[308]);\n z = 1;\n w && 0 < t ? (z = t * X, m += _[450] + Math.ceil(t) + _[197]) : z = 0;\n 0 == a && (m += _[505] + v.imagewidth + _[202]);\n g = unescape(g);\n g = '<div style=\"' + m + '\">' + g + _[68];\n v.sprite.style.color = _[26];\n v.sprite.style[_[51]] = \"none\";\n H && H.parentNode == v.sprite && (A = H, H = null);\n null == H && (H = Ja(), I = H.style, pa(r.selectable) && (I.webkitUserSelect = I.MozUserSelect = I.msUserSelect = I.oUserSelect = I.userSelect = \"text\", I.cursor = \"text\"), I.position = _[0], I.left = I.top = -z + \"px\", _[1] == v._type && 1 == v._distorted ? (I.width = \"100%\", I.height = \"100%\", I[ib] = \"\") : (I[Zc] = \"0 0\", I[ib] = _[141] + X + \")\", I.width = 100 / X + \"%\", I.height = 100 / X + \"%\"), I.fontSize = \"12px\", I.fontFamily = \"Arial\", I.lineHeight = _[45]);\n H.innerHTML = g;\n e();\n if (a = H.getElementsByTagName(\"a\"))if (d = a.length, 0 < d)for (m = 0; m < d; m++)if (g = a[m])w = \"\" + g.href, _[509] == w.toLowerCase().slice(0, 6) && (g.href = _[173] + V.viewerlayer.id + _[376] + w.slice(6).split(\"'\").join('\"') + \"','\" + v.getfullpath() + \"');\"), b.touch && k(g);\n _[1] == v._type && (v.forceupdate = !0, ob(!0, v.index));\n n(H);\n c = !1;\n v.loaded = !0;\n v.scalechildren = v.scalechildren;\n C = 0;\n null == q && (q = setTimeout(x, 10));\n l = 0\n }\n }\n\n function x() {\n q = null;\n c = !1;\n if (v && H) {\n var a = 2 == u || 1 == u && 0 == v.haveUserWidth(), b = 2 == h || 1 == h && 0 == v.haveUserHeight();\n J = !0;\n var d = H && H.parentNode == v.sprite, e = 0, f = 0;\n if (0 == a && 0 == b)f = v.imageheight, 1 > f && (f = 1); else {\n try {\n e = H.childNodes[0].clientWidth, f = H.childNodes[0].clientHeight, 3 > f && (f = 0)\n } catch (k) {\n }\n if (1 > f && d && H.parentNode && 1 > H.parentNode.clientHeight) {\n n(H);\n C = 0;\n null == q && (q = setTimeout(x, 10));\n J = !1;\n return\n }\n }\n if (0 < f) {\n if (v._enabledstate = null, v.enabled = v._enabled, I.top = I.left = -z + \"px\", c = !0, A && A.parentNode == v.sprite ? (I.visibility = _[12], v.sprite.replaceChild(H, A), A = null) : (g(A), A = null, I.visibility = _[12], v.sprite.appendChild(H)), 0 != a || 0 != b)if (e = a ? Math.round(e) : v.imagewidth, f = b ? Math.round(f) : v.imageheight, e != v._width || f != v._height)a && (v._width = e), b && (v._height = f), v.poschanged = !0, _[1] == v._type ? ob(!0, v.index) : v.updatepluginpos(), v.onautosized && da.callaction(v.onautosized, v, !0)\n } else C++, 10 > C ? null == q && (q = setTimeout(x, 20)) : (A && A.parentNode == v.sprite && (v.sprite.replaceChild(H, A), A = null), v.height = 0);\n J = !1\n }\n }\n\n var v = null, r = {}, y = null, l = 0, u = 1, h = 1, c = !1, K = [0, 0, 0, 0], D = [0, 0, 0, 0], z = 1, q = null, J = !1, C = 0, L = X, A = null, H = null, I = null;\n this.registerplugin = function (b, c, e) {\n v = e;\n b = v.html;\n c = v.css;\n delete v.html;\n delete v.css;\n v._istextfield = !0;\n v.accuracy = 0;\n v.registerattribute(_[377], \"auto\", function (a) {\n u = \"auto\" == F(a) ? 1 : 2 * pa(a);\n d(1)\n }, function () {\n return 1 == u ? \"auto\" : 2 == u ? \"true\" : _[31]\n });\n v.registerattribute(_[357], \"auto\", function (a) {\n h = \"auto\" == F(a) ? 1 : 2 * pa(a);\n d(1)\n }, function () {\n return 1 == h ? \"auto\" : 2 == h ? \"true\" : _[31]\n });\n a(1, _[446], !1);\n a(1, _[132], \"2\", function (a, b) {\n Ib(b, 1, \" \", K);\n d(1)\n });\n a(2, _[107], !0);\n a(2, _[235], 1);\n a(2, _[237], 16777215);\n a(1, _[71], !1);\n a(1, _[105], 1);\n a(2, _[104], 1);\n a(2, _[101], 0);\n a(2, _[380], \"0\", function (a, b) {\n Ib(b, 1, \" \", D);\n d(2)\n });\n a(2, _[522], 0);\n a(2, _[320], 4);\n a(2, _[318], 45);\n a(2, _[316], 0);\n a(2, _[315], 1);\n a(2, _[366], 0);\n a(2, _[241], 4);\n a(2, _[242], 45);\n a(2, _[243], 0);\n a(2, _[244], 1);\n a(1, _[370], !1);\n a(1, _[410], !0);\n a(1, _[502], \"\");\n v.registerattribute(\"blur\", 0);\n v.registerattribute(_[408], 0);\n v.registerattribute(_[440], null, function (a) {\n null != a && \"\" != a && \"none\" != (\"\" + a).toLowerCase() && (h = 2, d(1))\n }, function () {\n return 2 == h ? _[136] : \"none\"\n });\n v.registercontentsize(400, 300);\n v.sprite.style.pointerEvents = \"none\";\n a(1, \"html\", b ? b : \"\");\n a(1, \"css\", c ? c : \"\")\n };\n this.unloadplugin = function () {\n v && (v.loaded = !1, q && clearTimeout(q), y && clearTimeout(y), g(A), g(H));\n v = y = q = I = H = A = null\n };\n this.onvisibilitychanged = function (a) {\n a && _[1] == v._type && (v.forceupdate = !0, ob(!0, v.index));\n return !1\n };\n this.onresize = function (a, b) {\n if (L != X)return L = X, Ib(r.padding, 1, \" \", K), Ib(r.roundedge, 1, \" \", D), p(), !1;\n if (J)return !1;\n if (v) {\n var d = 2 == u || 1 == u && 0 == v.haveUserWidth(), e = 2 == h || 1 == h && 0 == v.haveUserHeight();\n v.registercontentsize(a, b);\n H && (_[1] != v._type || 1 != v._distorted ? (I[ib] = _[141] + X + \")\", I.width = 100 / X + \"%\", I.height = 100 / X + \"%\") : (I[ib] = \"\", I.width = \"100%\", I.height = \"100%\"), c && (I.left = I.top = -z + \"px\"), 0 == d && (H.childNodes[0].style.width = a + \"px\"), 0 == e && (H.childNodes[0].style.height = b + \"px\"), d || e ? (c = !1, d && (v.sprite.style.width = 0), e && (v.sprite.style.height = 0), C = 0, null == q && (q = setTimeout(x, 10))) : (0 == d && (I.width = a + 2 * z + \"px\"), 0 == e && (I.height = b + \"px\")))\n }\n return !1\n };\n this.updatehtml = p\n }, ub = !1, qc = 1, wf = function () {\n function a() {\n 0 == b.css3d && d._distorted && (d._distorted = !1, d.zoom = !0);\n d.poschanged = !0;\n d.jsplugin && d.jsplugin.onresize && (d.forceupdate = !0, d.imagewidth = d.imageheight = 0);\n d.sprite && (d._visible && d.loaded && ob(!0, d.index), d.sprite.style[ib + _[143]] = d._distorted ? \"0 0\" : _[461])\n }\n\n var d = this;\n d.prototype = Ob;\n this.prototype.call(this);\n d._type = _[1];\n var m = d.createvar;\n m(\"ath\", 0);\n m(\"atv\", 0);\n m(\"depth\", 1E3);\n m(_[501], 0);\n d.scaleflying = !0;\n m(\"zoom\", !1);\n m(\"rx\", 0);\n m(\"ry\", 0);\n m(\"rz\", 0);\n m(\"tx\", 0);\n m(\"ty\", 0);\n m(\"tz\", 0);\n m(_[401], !1, a);\n d.accuracy = 1;\n d.zorder2 = 0;\n d.inverserotation = !1;\n d.forceupdate = !1;\n d._hit = !1;\n d.point = new bb(null);\n var f = d.create;\n d.create = function () {\n function b() {\n Gd(d)\n }\n\n f();\n d.createvar(_[121], d.polyline ? pa(d.polyline) : !1, b);\n d.createvar(_[398], d.fillcolor ? Number(d.fillcolor) : 11184810, b);\n d.createvar(_[396], d.fillalpha ? Number(d.fillalpha) : .5, b);\n d.createvar(_[105], d.borderwidth ? Number(d.borderwidth) : 3, b);\n d.createvar(_[101], d.bordercolor ? Number(d.bordercolor) : 11184810, b);\n d.createvar(_[104], d.borderalpha ? Number(d.borderalpha) : 1, b);\n a()\n };\n d.updatepos = function () {\n d.poschanged = !0\n };\n d.getcenter = function () {\n var a = 0, b = 0, f = 25;\n if (d._url)a = d._ath, b = d._atv, f = 25 * Number(d.scale); else {\n for (var e = d.point.getArray(), m = 0, p = e.length, v, r, y, l = 5E4, u = -5E4, h = 5E4, c = -5E4, E = 5E4, D = -5E4, z = 0, q = 0, F = 0, m = 0; m < p; m++)r = e[m], v = Number(r.ath), y = Number(r.atv), r = 0 > v ? v + 360 : v, v < l && (l = v), v > u && (u = v), r < h && (h = r), r > c && (c = r), y < E && (E = y), y > D && (D = y), v = (180 - v) * Y, y *= Y, z += Math.cos(y) * Math.cos(v), F += Math.cos(y) * Math.sin(v), q += Math.sin(y);\n 0 < p && (z /= p, q /= p, F /= p, a = 90 + Math.atan2(z, F) / Y, b = -Math.atan2(-q, Math.sqrt(z * z + F * F)) / Y, 180 < a && (a -= 360), v = u - l, y = D - E, 170 < v && (v = c - h), f = v > y ? v : y)\n }\n 1 > f ? f = 1 : 90 < f && (f = 90);\n e = new Hb;\n e.x = a;\n e.y = b;\n e.z = f;\n f = arguments;\n 2 == f.length && (I(f[0], a, !1, this), I(f[1], b, !1, this));\n return e\n }\n }, $d = \"\", ic = 1, Be = \"translate3D(;;px,;;px,0px) ;;rotateX(;;deg) rotateY(;;deg) ;;deg) rotateX(;;deg) scale3D(;;) translateZ(;;px) rotate(;;deg) translate(;;px,;;px) rotate;;deg) rotate;;deg) rotate;;deg) scale(;;,;;) translate(;;px,;;px)\".split(\";\"), Ce = \"translate(;;px,;;px) translate(;;px,;;px) rotate(;;deg) translate(;;px,;;px) scale(;;,;;) translate(;;px,;;px)\".split(\";\"), tf = function () {\n this.fullscreen = b.fullscreensupport;\n this.touch = this.versioninfo = !0;\n this.customstyle = null;\n this.enterfs = _[371];\n this.exitfs = _[246];\n this.item = new bb(function () {\n this.visible = this.enabled = !0;\n this.caption = null;\n this.separator = !1;\n this.onclick = null\n })\n }, Xd = function () {\n function a(a) {\n var b = ja.FRM;\n if (0 == b && n)n(a); else {\n 0 == b && (b = 60);\n var d = 1E3 / b, b = (new Date).getTime(), d = Math.max(0, d - (b - g));\n L.setTimeout(a, d);\n g = b + d\n }\n }\n\n function d() {\n m && (f(), a(d))\n }\n\n var m = !0, f = null, g = 0, n = L.requestAnimationFrame || L.webkitRequestAnimationFrame || L.mozRequestAnimationFrame || L.oRequestAnimationFrame || L.msRequestAnimationFrame;\n return {\n start: function (g) {\n if (b.ios && 9 > b.iosversion || b.linux && b.chrome)n = null;\n m = !0;\n f = g;\n a(d)\n }, stop: function () {\n m = !1;\n f = null\n }\n }\n }();\n Jb.init = function (a) {\n Jb.so = a;\n b.runDetection(a);\n if (b.css3d || b.webgl)ib = b.browser.css.transform, Id = ib + \"Style\", Zc = ib + _[143];\n pd = b.browser.css.backgroundsize;\n pc = b.browser.css.boxshadow;\n var d = b.webkit && 534 > b.webkitversion, E = 0;\n b.ios && 0 == b.simulator ? (Nb = 0, 5 <= b.iosversion && 1 != Yc && (Nb = 1, E = b._cubeOverlap = 4)) : b.android ? (Nb = 2, b._cubeOverlap = 0, E = 4, b.chrome ? (Nb = 1, Lc = 0, b._cubeOverlap = 4) : b.firefox && (E = 0)) : (b.windows || b.mac) && d ? (be = 1, Lc = Nb = 0, b._cubeOverlap = 4) : (Nb = 1, Lc = 0, E = 2, b.desktop && b.safari && (E = 8), b.chrome && (22 <= b.chromeversion && 25 >= b.chromeversion ? (b._cubeOverlap = 64, E = 16) : b._cubeOverlap = 1), b.ie && (E = 8));\n b._tileOverlap = E;\n qf();\n if (!V.build(a))return !1;\n ia.layer = V.controllayer;\n ia.panoControl = Pa;\n ia.getMousePos = V.getMousePos;\n ja.htmltarget = V.htmltarget;\n ja.viewerlayer = V.viewerlayer;\n la(1, _[128] + m.version + _[426] + m.build + (m.debugmode ? _[476] : \")\"));\n d = !(b.android && b.firefox && 22 > b.firefoxversion);\n a.html5 && (E = F(a.html5), 0 <= E.indexOf(_[30]) ? d = !0 : 0 <= E.indexOf(\"css3d\") && (d = !1));\n b.webgl && d ? Oa.setup(2) : Oa.setup(1);\n la(1, b.infoString + Oa.infoString);\n a && a.basepath && \"\" != a.basepath && (ra.swfpath = a.basepath);\n V.onResize(null);\n Pa.registerControls(V.controllayer);\n Xd.start(xf);\n if (!b.css3d && !b.webgl && 0 > F(a.html5).indexOf(_[488]))Ea(_[156]); else {\n var f, g, n = [], d = !0, E = 0, k = [], e = _[150].split(\" \"), w = _[151].split(\" \"), x = null, v = null, r = Xc(100), y = F(_[160]).split(\";\"), l, u;\n if (null != mb && \"\" != mb) {\n var h = ra.b64u8(mb), c = h.split(\";\");\n if (l = c[0] == y[0])if (h = F(h), 0 <= h.indexOf(y[6]) || 0 <= h.indexOf(y[7]) || 0 <= h.indexOf(y[8]))l = !1;\n var h = mb = null, h = c.length, h = h - 2, K = c[h], D = 0;\n 0 == K.indexOf(\"ck=\") ? K = K.slice(3) : l = !1;\n if (l)for (l = 0; l < h; l++) {\n var z = c[l], q = z.length;\n for (u = 0; u < q; u++)D += z.charCodeAt(u) & 255;\n if (!(4 > q) && (u = z.slice(3), \"\" != u))switch (_[177].indexOf(z.slice(0, 3)) / 3 | 0) {\n case 1:\n Ya = parseInt(u);\n d = 0 == (Ya & 1);\n break;\n case 2:\n f = u;\n n.push(y[1] + \"=\" + u);\n break;\n case 3:\n g = u;\n n.push(y[2] + u);\n break;\n case 4:\n k.push(u);\n n.push(y[3] + \"=\" + u);\n break;\n case 5:\n z = parseInt(u);\n x = new Date;\n x.setFullYear(z >> 16, (z >> 8 & 15) - 1, z & 63);\n break;\n case 6:\n v = u;\n break;\n case 7:\n q = z = u.length;\n if (128 > z)for (; 128 > q;)u += u.charAt(q % z), q++;\n od = u;\n break;\n case 8:\n break;\n case 9:\n Na = u.split(\"|\");\n 4 != Na.length && (Na = null);\n break;\n case 10:\n break;\n default:\n n.push(z)\n }\n }\n D != parseInt(K) && (E = 1);\n l = aa.location;\n l = F(l.search || l.hash);\n if (0 < l.indexOf(_[90])) {\n Ea(n.join(\", \"), F(_[90]).toUpperCase());\n return\n }\n 0 < l.indexOf(_[248]) && (null == a.vars && (a.vars = {}), a.vars.consolelog = !0, Ya = Ya & 1 | 14);\n c = null\n }\n vc = n = F(aa[y[3]]);\n try {\n throw Error(\"path\");\n } catch (J) {\n l = \"\" + J.stack, c = l.indexOf(\"://\"), 0 < c && (c += 3, h = l.indexOf(\"/\", c), l = l.slice(c, h), h = l.indexOf(\":\"), 0 < h && (l = l.slice(0, h)), vc = l)\n }\n 0 == n.indexOf(_[524]) && (n = n.slice(4));\n y = \"\" == n || _[382] == n || _[381] == n || 0 == n.indexOf(y[4]);\n b.browser.domain = y ? null : n;\n if (0 == (Ya & 2) && y)E = 3; else if (!y) {\n l = n.indexOf(\".\") + 1;\n 0 > n.indexOf(\".\", l) && (l = 0);\n y = n;\n n = n.slice(l);\n 0 == n.indexOf(_[479]) && _[109] != n && (E = 2);\n for (l = 0; l < e.length; l++)if (e[l] == n) {\n E = 2;\n break\n }\n if (0 == E && 0 < k.length)for (E = 2, l = 0; l < k.length; l++)if (n == k[l] || gd(k[l], y)) {\n E = 0;\n break\n }\n }\n if (f || g)for (g = (\".\" + f + \".\" + g).toLowerCase(), l = 0; l < w.length; l++)0 <= g.indexOf(w[l]) && (E = 1);\n if (null != x && new Date > x)Ea(_[250]), null != v && setTimeout(function () {\n L.location = v\n }, 500); else if (0 < E)Ea(_[97] + [\"\", _[251], _[222]][E - 1]); else {\n Na && (Ya &= -129, la(1, Na[0]));\n 0 == d && (f ? la(1, _[253] + f) : d = !0);\n (d || 0 == (Ya & 1)) && V.log(r);\n f = null;\n a.xml && (f = a.xml);\n a.vars && (a.vars.xml && (f = a.vars.xml), f || (f = a.vars.pano));\n 0 == (Ya & 4) && (a.vars = null);\n Ya & 16 && (m[rc[0]] = m[rc[1]] = !1);\n g = V.viewerlayer;\n Ya & 8 ? (g.get = gc(U), g.set = gc(I), g.call = hd) : (g.set = function () {\n la(2, _[180])\n }, g.get = Na ? gc(U) : g.set, g.call = gc(da.SAcall));\n g.screentosphere = p.screentosphere;\n g.spheretoscreen = p.spheretoscreen;\n g.unload = ve;\n a.initvars && Wd(a.initvars);\n da.loadpano(f, a.vars);\n if (a.onready)a.onready(g);\n return !0\n }\n }\n }\n }\n\n var _ = function () {\n // var F = mb;\n // mb = null;\n // var Ha = F.length - 3, pa, ga, sa, ha = \"\", va = \"\", Aa = 1, R = 0, ba = [], Ja = [1, 48, 55, 53, 38, 51, 52, 3];\n // sa = F.charCodeAt(4);\n // for (pa = 5; pa < Ha; pa++)ga = F.charCodeAt(pa), 92 <= ga && ga--, 34 <= ga && ga--, ga -= 32, ga = (ga + 3 * pa + 59 + Ja[pa & 7] + sa) % 93, sa = (23 * sa + ga) % 32749, ga += 32, 124 == ga ? 0 == Aa ? R ^= 1 : 1 == R ? R = 0 : (ba.push(ha), ha = \"\", Aa = 0) : (ga = String.fromCharCode(ga), 0 == R ? ha += ga : va += ga, Aa++);\n // 0 < Aa && ba.push(ha);\n // ga = 0;\n // for (Ha += 3; pa < Ha;)ga = ga << 5 | F.charCodeAt(pa++) - 53;\n // ga != sa && (ba = null);\n // mb = va;\n\n\n //sohow\n // var ba_json = window.JSON.stringify(ba);\n var ba = new Array(\"absolute\",\"hotspot\",\"bottom\",\"right\",\"mouseup\",\"default\",\"hidden\",\"mousedown\",\"pointerover\",\"pointerout\",\"mousemove\",\"function\",\"visible\",\"string\",\"action\",\"container\",\"mouseover\",\"mouseout\",\"pointer\",\"mouse\",\"translateZ(+2000000000000px)\",\" - xml parsing failed!\",\"parsererror\",\"px solid \",\"cylinder\",\"text/xml\",\"#000000\",\"moveto\",\"height\",\"plugin\",\"webgl\",\"false\",\" - wrong encryption!\",\"Invalid expression\",\"MSPointerOver\",\"MSPointerOut\",\"transparent\",\"contextmenu\",\"sans-serif\",\"cubestrip\",\"#FFFFFF\",\"iphone\",\"sphere\",\"linear\",\"mobile\",\"normal\",\"krpano\",\"color\",\"error\",\"width\",\"align\",\"-webkit-text-size-adjust\",\"visibilitychange\",\"translate3D(\",\"image.level[\",\"Courier New\",\"easeoutquad\",\"<container>\",\"loading of \",\"preserve-3d\",\"translate(\",\"].content\",\" failed!\",\"onresize\",\"pagehide\",\"position\",\"lefttop\",\"boolean\",\"</div>\",\"LOOKTO\",\"webkit\",\"border\",\"scene[\",\"blend\",\"data:\",\"image\",\"-webkit-tap-highlight-color\",\"http://www.w3.org/2000/svg\",\"] skipped flash file: \",\"webkitvisibilitychange\",\" - loading failed! (\",\"mozvisibilitychange\",\"msvisibilitychange\",\"experimental-webgl\",\"orientationchange\",\"] loading error: \",\"deg) translateZ(\",\"unknown action: \",\"uniform vec3 cc;\",\"actions overflow\",\"showlicenseinfo\",\"MSGestureChange\",\"text/javascript\",\"MSInertiaStart\",\"get:calc:data:\",\"DOMMouseScroll\",\"MSGestureStart\",\"LICENSE ERROR\",\"opacity 0.25s\",\"MSGestureEnd\",\"onmousewheel\",\"bordercolor\",\"scene.count\",\"onmousedown\",\"borderalpha\",\"borderwidth\",\") rotateZ(\",\"background\",\"mousewheel\",\"krpano.com\",\"fullscreen\",\"undefined\",\"webkit-3d\",\"onmouseup\",\"marginTop\",\"touchmove\",\"moz-webgl\",\"</krpano>\",\"touchend\",\"relative\",\"fontSize\",\"polyline\",\"-10000px\",\"offrange\",\"<krpano>\",\"rotateY(\",\"keydown\",\"plugin[\",\"krpano \",\"include\",\"onkeyup\",\"onclick\",\"padding\",\"scroll\",\"layer[\",\"DEBUG:\",\"center\",\"resize\",\"tablet\",\"&nbsp;\",\"ERROR:\",\"scale(\",\"opaque\",\"Origin\",\"object\",\" edge/\",\"iPhone\",\"Chrome\",\"cursor\",\"parent\",\"360etours.net clickcwb.com.br afu360.com realtourvision.com webvr.net webvr.cn round.me aero-scan.ru shambalaland.com littlstar.com d3uo9a4kiyu5sk.cloudfront.net youvisit.com vrvideo.com\",\"panofree freeuser figgler teameat eatusebuy no-mail chen44 .lestra. gfreidinger an37almk\",\"gl_FragColor=vec4(texture2D(sm,(tx-ct)/mix(1.0,zf,1.0-aa)+ct).rgb,aa);\",\"gl_FragColor=vec4(mix(texture2D(sm,tx).rgb,cc,2.0*(1.0-aa)),aa*2.0);\",\" - invalid name! Names need to begin with an alphabetic character!\",\"if(\\'%5\\'!=\\'NEXTLOOP\\',%1);if(%2,%4;%3;for(%1,%2,%3,%4,NEXTLOOP););\",\"A Browser with CSS 3D Transforms or WebGL support is required!\",\"abs acos asin atan ceil cos exp floor log round sin sqrt tan\",\"gl_FragColor=vec4(texture2D(sm,tx).rgb+(1.0-aa)*cc,aa);\",\"uniform sampler2D sm;varying vec2 tx;uniform float aa;\",\"kr;user;mail=;domain;file:;id;chen4490;teameat;figgler\",\"<div style=\\'padding-top:2.5px; padding-bottom:5px;\\' \",\"WebGL-Error shaderProgram: could not link shaders!\",\"uniform vec2 ap;uniform float zf;uniform float bl;\",\"if(%1,%2;delayedcall(0,asyncloop(%1,%2,%3));,%3);\",\"there is already a html element with this id: \",\"<div style=\\'padding:8px; text-align:center;\\'>\",\"-webkit-radial-gradient(circle, white, black)\",\"gl_FragColor=vec4(texture2D(sm,tx).rgb,aa);\",\"<i><b>krpano</b><br/>demo&nbsp;version</i>\",\" - invalid or unsupported xml encryption!\",\"No device compatible image available...\",\"there is no html element with this id: \",\"javascript:document.getElementById(\\'\",\"left front right back up down cube\",\"uniform vec3 fp;uniform float bl;\",\"uniform vec2 ct;uniform float zf;\",\"xx=lz=rg=ma=dm=ed=eu=ek=rd=pt=id=\",\"color:#FF0000;font-weight:bold;\",\"1px solid rgba(255,255,255,0.5)\",\"Javascript Interface disabled!\",\" - loading or parsing failed!\",\"translateZ(+1000000000000px) \",\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\"loading or parsing failed!\",\"WebGL-Error vertexShader: \",\"WebGL-Error pixelShader: \",\"precision mediump float;\",\"set(_busyonloaded,false)\",\"krpano embedding error: \",\" (not a cubestrip image)\",\"webkitRequestFullScreen\",\"if(%1,%2;loop(%1,%2););\",\"architecturalonlymiddle\",\"webkitRequestFullscreen\",\"(-webkit-transform-3d)\",\"preservedrawingbuffer\",\"px solid transparent;\",\" - style not found: \",\"translateZ(+1000px) \",\"<span style=\\'color:#\",\"mozRequestFullScreen\",\"px;overflow:hidden;\",\"0px 0px 8px #FFFFFF\",\"addlayer/addplugin(\",\"white-space:nowrap;\",\"<div style=\\'margin:\",\"px,0px) translateY(\",\"xml parsing failed!\",\"msRequestFullscreen\",\"-ms-overflow-style\",\"preview.striporder\",\"-webkit-box-shadow\",\"position:absolute;\",\"</td></tr></table>\",\"distortionfovlink\",\"onpreviewcomplete\",\"WebkitPerspective\",\"Microsoft.XMLHTTP\",\"<krpano></krpano>\",\"http://krpano.com\",\"onenterfullscreen\",\" - NO LOCAL USAGE\",\"requestFullscreen\",\"Internet Explorer\",\"onexitfullscreen\",\"rgba(0,0,0,0.01)\",\"access permitted\",\"fullscreenchange\",\"FullscreenChange\",\"webkitUserSelect\",\"framebufferscale\",\"px) perspective(\",\"__defineGetter__\",\"__defineSetter__\",\"backgroundalpha\",\"MSPointerCancel\",\"backgroundcolor\",\"Android Browser\",\"1px solid white\",\" <small>(build \",\"textshadowrange\",\"textshadowangle\",\"textshadowcolor\",\"textshadowalpha\",\"deg) translate(\",\"Exit Fullscreen\",\"ignoring image \",\"consolelog=true\",\"-moz-box-shadow\",\"LICENSE EXPIRED\",\" - WRONG DOMAIN\",\"WebkitBoxShadow\",\"Registered to: \",\"krpanoSWFObject\",\"backgroundColor\",\"backgroundSize\",\"color:#AA7700;\",\"pointer-events\",\"color:#007700;\",\"Microsoft Edge\",\")</small><br/>\",\"color:#333333;\",\"translateZ(0) \",\"visiblePainted\",\"onloadcomplete\",\"return false;\",\"pointerEvents\",\"stereographic\",\"deg) rotateX(\",\"#FFF 0px 0px \",\"deg) rotateZ(\",\"easeInOutSine\",\"0123456789+/=\",\" translate3D(\",\"mobile safari\",\"gesturechange\",\"scalechildren\",\"onviewchanged\",\"mozUserSelect\",\"pointercancel\",\"textfield.swf\",\" not allowed!\",\"MSPointerMove\",\"deg) rotateY(\",\"HTML5/Desktop\",\"paddingBottom\",\"onxmlcomplete\",\"WebGL-Error: \",\"windows phone\",\"MSPointerDown\",\" FATAL ERROR:\",\"MozBoxShadow\",\") translate(\",\"preview.type\",\"px) rotateX(\",\"paddingRight\",\"Amazon Silk \",\"&nbsp;</div>\",\"onviewchange\",\"gesturestart\",\"onremovepano\",\"maskchildren\",\"perspective(\",\"vlookatrange\",\"hlookatrange\",\"keephotspots\",\"actioncaller\",\"height:100%;\",\"</encrypted>\",\"removescenes\",\"image.tablet\",\"stroke-width\",\"image.mobile\",\"oninterrupt\",\"shadowalpha\",\"shadowcolor\",\"easeoutsine\",\"shadowangle\",\"easeincubic\",\"shadowrange\",\"addhotspot(\",\"preview.url\",\"keepplugins\",\"easeInCubic\",\"translateZ(\",\"stageheight\",\"touchcancel\",\"MSPointerUp\",\"paddingLeft\",\"pointermove\",\"pointerdown\",\"px) rotate(\",\"<encrypted>\",\"versioninfo\",\"perspective\",\"BlackBerry \",\"bgroundedge\",\"whiteSpace\",\"onovercrop\",\"px) scale(\",\"ondowncrop\",\"box-shadow\",\"touchstart\",\"rim tablet\",\"blackberry\",\"paddingTop\",\"fontFamily\",\"2015-08-04\",\"%FIRSTXML%\",\"1px solid \",\"stagewidth\",\"stagescale\",\"handcursor\",\"ignorekeep\",\"gestureend\",\" Simulator\",\"autoheight\",\"keepscenes\",\"LIGHTBLEND\",\"keepmoving\",\"CURRENTXML\",\"showerrors\",\"COLORBLEND\",\"distortion\",\"SLIDEBLEND\",\"textshadow\",\"FATALERROR\",\"yesontrue1\",\"onnewscene\",\"selectable\",\"Fullscreen\",\"javascript\",\"px #FFFFFF\",\"encrypted\",\"</center>\",\"\\').call(\\'\",\"autowidth\",\" (Chrome)\",\"fullrange\",\"roundedge\",\"127.0.0.1\",\"localhost\",\"framerate\",\"onkeydown\",\"Viewer...\",\"bgcapture\",\"transform\",\"boxShadow\",\"__swfpath\",\"pointerup\",\"nopreview\",\"useragent\",\"<![CDATA[\",\"].onstart\",\"textAlign\",\"fillalpha\",\"timertick\",\"fillcolor\",\"OPENBLEND\",\"keepimage\",\"distorted\",\"asyncloop\",\"autoalpha\",\"ZOOMBLEND\",\"onnewpano\",\"bgborder\",\" style=\\'\",\"textblur\",\"asyncfor\",\"wordwrap\",\"pre-line\",\"keepbase\",\"bgshadow\",\"Panorama\",\"jsborder\",\"FFF00;\\'>\",\"</span> \",\"keepview\",\"00000000\",\"WARNING:\",\"overflow\",\"HTMLPATH\",\" - WebGL\",\"__fte1__\",\"__fte2__\",\" (build \",\"distance\",\"Calling \",\"scale3D(\",\"panotour\",\"SAMSUNG \",\"1.19-pr3\",\"<center>\",\"Firefox \",\"videourl\",\"iemobile\",\"FIRSTXML\",\"jsplugin\",\"ap,zf,bl\",\"autosize\",\"0px 0px \",\"<=>=!===\",\"</small>\",\"polygon\",\"Mobile \",\"vcenter\",\"Tablet \",\"webkit/\",\"Chrome \",\"border:\",\"Version\",\"action(\",\"action[\",\"Android\",\"].value\",\"bgcolor\",\" - iOS:\",\"WARNING\",\"keepall\",\"Firefox\",\"50% 50%\",\"preview\",\"bgalpha\",\"android\",\"desktop\",\"preinit\",\"onstart\",\"bglayer\",\"trident\",\"current\",\"display\",\"enabled\",\"BASEDIR\",\"fovtype\",\"SWFPATH\",\" debug)\",\"pannini\",\"plugin:\",\"krpano.\",\"BGLAYER\",\"<small>\",\"opacity\",\"devices\",\"lighter\",\"drag2d\",\"canvas\",\"image.\",\"always\",\"logkey\",\"blend(\",\"stereo\",\"onidle\",\"stagey\",\"Webkit\",\"stagex\",\"smooth\",\"&quot;\",\"origin\",\"&apos;\",\"random\",\"flying\",\"effect\",\"zorder\",\"_blank\",\"width:\",\"points\",\"delete\",\"switch\",\"event:\",\"stroke\",\" Build\",\"alturl\",\"Tablet\",\"Gecko/\",\"style[\",\"rotate\",\"Opera \",\"Mobile\",\"lfrbud\",\"Safari\",\"CriOS/\",\"shadow\",\"number\",\"www.\",\"\");\n mb = 'a3I7aWQ9NDk5ODEzMDAzLzIwMTUtMTEtMDk7bHo9MTU5O3JnPeWkqea0peaegeedv+i9r+S7tuaKgOacr+W8gOWPkeaciemZkOWFrOWPuDttYT10ZXJhQGdlZXJlaS5jb207ZWs9Mm5vM3JuM2xlM2x0M3RwMnNyM2hlM2xwMnNlMmlpM2xnM2tpMmZwMmlzZGJZYlhQWVlZYllaTFhhYWRNTk5OTE1MTE1kTExMTUtMTEtMTmQyc3AyZ3BIM3BzZDJoazJzcDJzZjJzbDJtaDJoczNsaDJpaDNnbzNrbTJscE5NS047cmQ9SlBLR1E7Y2s9MTc2MTI7';\n\n return ba\n }();\n\n _ && _[111] != typeof krpanoJS && (new hd).init(gd)\n }", "function AppMeasurement_Module_ActivityMap(f) {\n function g(a, d) {\n var b, c, n;\n if (a && d && (b = e.c[d] || (e.c[d] = d.split(\",\"))))\n for (n = 0; n < b.length && (c = b[n++]) ;)\n if (-1 < a.indexOf(c)) return null;\n p = 1;\n return a;\n }\n\n function q(a, d, b, c, e) {\n var g, h;\n if (a.dataset && (h = a.dataset[d])) g = h;\n else if (a.getAttribute)\n if (h = a.getAttribute(\"data-\" + b)) g = h;\n else if (h = a.getAttribute(b)) g = h;\n if (!g && f.useForcedLinkTracking && e && (g = \"\", d = a.onclick ? \"\" + a.onclick : \"\")) {\n b = d.indexOf(c);\n var l, k;\n if (0 <= b) {\n for (b += 10; b < d.length && 0 <= \"= \\t\\r\\n\".indexOf(d.charAt(b)) ;) b++;\n if (b < d.length) {\n h = b;\n for (l = k = 0; h < d.length && (\";\" != d.charAt(h) || l) ;) l ? d.charAt(h) != l || k ? k = \"\\\\\" == d.charAt(h) ? !k : 0 : l = 0 : (l = d.charAt(h), '\"' != l && \"'\" != l && (l = 0)), h++;\n if (d = d.substring(b, h)) a.e = new Function(\"s\", \"var e;try{s.w.\" + c + \"=\" + d + \"}catch(e){}\"), a.e(f);\n }\n }\n }\n return g || e && f.w[c];\n }\n\n function r(a, d, b) {\n var c;\n return (c = e[d](a, b)) && (p ? (p = 0, c) : g(k(c), e[d + \"Exclusions\"]));\n }\n\n function s(a, d, b) {\n var c;\n if (a && !(1 === (c = a.nodeType) && (c = a.nodeName) && (c = c.toUpperCase()) && t[c]) && (1 === a.nodeType && (c = a.nodeValue) && (d[d.length] = c), b.a ||\n b.t || b.s || !a.getAttribute || ((c = a.getAttribute(\"alt\")) ? b.a = c : (c = a.getAttribute(\"title\")) ? b.t = c : \"IMG\" == (\"\" + a.nodeName).toUpperCase() && (c = a.getAttribute(\"src\") || a.src) && (b.s = c)), (c = a.childNodes) && c.length))\n for (a = 0; a < c.length; a++) s(c[a], d, b);\n }\n\n function k(a) {\n if (null == a || void 0 == a) return a;\n try {\n return a.replace(RegExp(\"^[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+\", \"mg\"), \"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]+$\",\n \"mg\"), \"\").replace(RegExp(\"[\\\\s\\\\n\\\\f\\\\r\\\\t\\t-\\r \\u00a0\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u205f\\u3000\\ufeff]{1,}\", \"mg\"), \" \").substring(0, 254);\n } catch (d) { }\n }\n var e = this;\n e.s = f;\n var m = window;\n m.s_c_in || (m.s_c_il = [], m.s_c_in = 0);\n e._il = m.s_c_il;\n e._in = m.s_c_in;\n e._il[e._in] = e;\n m.s_c_in++;\n e._c = \"s_m\";\n e.c = {};\n var p = 0,\n t = {\n SCRIPT: 1,\n STYLE: 1,\n LINK: 1,\n CANVAS: 1\n };\n e._g = function () {\n var a, d, b, c = f.contextData,\n e = f.linkObject;\n (a = f.pageName || f.pageURL) && (d = r(e, \"link\", f.linkName)) && (b = r(e, \"region\")) && (c[\"a.activitymap.page\"] = a.substring(0,\n 255), c[\"a.activitymap.link\"] = 128 < d.length ? d.substring(0, 128) : d, c[\"a.activitymap.region\"] = 127 < b.length ? b.substring(0, 127) : b, c[\"a.activitymap.pageIDType\"] = f.pageName ? 1 : 0);\n };\n e.link = function (a, d) {\n var b;\n if (d) b = g(k(d), e.linkExclusions);\n else if ((b = a) && !(b = q(a, \"sObjectId\", \"s-object-id\", \"s_objectID\", 1))) {\n var c, f;\n (f = g(k(a.innerText || a.textContent), e.linkExclusions)) || (s(a, c = [], b = {\n a: void 0,\n t: void 0,\n s: void 0\n }), (f = g(k(c.join(\"\")))) || (f = g(k(b.a ? b.a : b.t ? b.t : b.s ? b.s : void 0))) || !(c = (c = a.tagName) && c.toUpperCase ? c.toUpperCase() :\n \"\") || (\"INPUT\" == c || \"SUBMIT\" == c && a.value ? f = g(k(a.value)) : a.src && \"IMAGE\" == c && (f = g(k(a.src)))));\n b = f;\n }\n return b;\n };\n e.region = function (a) {\n for (var d, b = e.regionIDAttribute || \"id\"; a && (a = a.parentNode) ;) {\n if (d = q(a, b, b, b)) return d;\n if (\"BODY\" == a.nodeName) return \"BODY\";\n }\n };\n }", "static private protected internal function m118() {}", "static transient final protected internal function m47() {}", "function vc() {\n if (\"undefined\" == typeof atob) throw new T(E.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function t(e, r, i) {\n this.name = e, this.version = r, this.Tt = i, \n // NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the\n // bug we're checking for should exist in iOS >= 12.2 and < 13, but for\n // whatever reason it's much harder to hit after 12.2 so we only proactively\n // log on 12.2.\n 12.2 === t.It(Object(_firebase_util__WEBPACK_IMPORTED_MODULE_1__[\"getUA\"])()) && S(\"Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.\");\n }", "transient protected internal function m189() {}", "function gc() {\n if (\"undefined\" == typeof atob) throw new S(_.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function googleError(){\n alert(\"Google API failed to load.\");\n //console.log(\"error\");\n}", "function initializeApi() {\n gapi.client.load('storage', API_VERSION);\n}", "function tt() {\n if (\"undefined\" == typeof atob) throw new c(a.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "function firebase_setup(){\n /*\n var firebaseConfig = {\n apiKey: \"AIzaSyB0ZY93KxJK4UIRVnyXWqNm2V1l1M-4j_4\",\n authDomain: \"office-inventory-12f99.firebaseapp.com\",\n databaseURL: \"https://office-inventory-12f99.firebaseio.com\",\n projectId: \"office-inventory-12f99\",\n storageBucket: \"office-inventory-12f99.appspot.com\",\n messagingSenderId: \"147848186588\",\n appId: \"1:147848186588:web:33dbc8d727af1de4\"\n };\n // Initialize Firebase\n firebase.initializeApp(firebaseConfig);\n db = firebase.firestore();\n */\n}", "refreshCacheTTL() {\n // This comment is here to please Sonarqube. It requires a comment\n // explaining why a function is empty, but there is no sense\n // duplicating what has been just said in the JSDoc.\n // So, instead, here are the lyrics or Daft Punk's \"Around the world\":\n //\n // Around the world, around the world\n // Around the world, around the world\n // Around the world, around the world\n // Around the world, around the world\n // Around the world, around the world\n // [repeat 66 more times]\n // Around the world, around the world.\n }", "function onApiLoaded() {\n GMapApi.gmapApi = {}\n return window.google\n }", "static transient final protected public internal function m46() {}", "getGoogleId(){\n return this.google_id;\n }", "function googleError(){\r\n alert('Could not fetch data');\r\n}", "async function main() {\n const bucketName = process.env.BUCKET_NAME;\n const objectName = process.env.OBJECT_NAME;\n // Defines a credential access boundary that grants objectViewer access in\n // the specified bucket.\n const cab = {\n accessBoundary: {\n accessBoundaryRules: [\n {\n availableResource: `//storage.googleapis.com/projects/_/buckets/${bucketName}`,\n availablePermissions: ['inRole:roles/storage.objectViewer'],\n availabilityCondition: {\n expression:\n \"resource.name.startsWith('projects/_/buckets/\" +\n `${bucketName}/objects/${objectName}')`,\n },\n },\n ],\n },\n };\n\n const googleAuth = new GoogleAuth({\n scopes: 'https://www.googleapis.com/auth/cloud-platform',\n });\n const projectId = await googleAuth.getProjectId();\n // Obtain an authenticated client via ADC.\n const client = await googleAuth.getClient();\n // Use the client to generate a DownscopedClient.\n const cabClient = new DownscopedClient(client, cab);\n\n // OAuth 2.0 Client\n const authClient = new OAuth2Client();\n // Define a refreshHandler that will be used to refresh the downscoped token\n // when it expires.\n authClient.refreshHandler = async () => {\n const refreshedAccessToken = await cabClient.getAccessToken();\n return {\n access_token: refreshedAccessToken.token,\n expiry_date: refreshedAccessToken.expirationTime,\n };\n };\n\n const storageOptions = {\n projectId,\n authClient: new GoogleAuth({authClient}),\n };\n\n const storage = new Storage(storageOptions);\n const downloadFile = await storage\n .bucket(bucketName)\n .file(objectName)\n .download();\n console.log('Successfully retrieved file. Contents:');\n console.log(downloadFile.toString('utf8'));\n}", "function Ec() {\n if (\"undefined\" == typeof atob) throw new G(j.UNIMPLEMENTED, \"Blobs are unavailable in Firestore in this environment.\");\n}", "transient final private internal function m170() {}", "function startFirebase() {\n// Initialize Firebase\n var config = {\n apiKey: \"AIzaSyDAraVHUUUkR4L0yNE3P2n2jiF2jTNy6Kg\",\n authDomain: \"rps-multiplayer-e8125.firebaseapp.com\",\n databaseURL: \"https://rps-multiplayer-e8125.firebaseio.com\",\n projectId: \"rps-multiplayer-e8125\",\n storageBucket: \"rps-multiplayer-e8125.appspot.com\",\n messagingSenderId: \"763015821378\"\n };\n\n firebase.initializeApp(config);\n\n}", "function init() {\n gapi.client.setApiKey(\"AIzaSyCIL7jjwmYLVQW8XHqn6zBX9pp0264RJoM\");\n gapi.client.load(\"civicinfo\", \"v2\")\n .then( () => {\n console.log(\"loaded\");\n })\n .then(addSearchListener());\n}", "function getGAauthenticationToken(email, password) {\n password = encodeURIComponent(password);\n var response = UrlFetchApp.fetch(\"https://www.google.com/accounts/ClientLogin\", {\n method: \"post\",\n payload: \"accountType=GOOGLE&Email=\" + email + \"&Passwd=\" + password + \"&service=fusiontables&Source=testing\"\n });\n \n\tvar responseStr = response.getContentText();\n\tresponseStr = responseStr.slice(responseStr.search(\"Auth=\") + 5, responseStr.length);\n\tresponseStr = responseStr.replace(/\\n/g, \"\");\n\treturn responseStr;\n}", "transient final private protected public internal function m166() {}", "static transient final private internal function m43() {}", "protected internal function m252() {}", "function heyGoogle( name ) {\n // console.log(\"Yes Jacob?\");\n console.log(`Yes ${ name }?`);\n}", "static transient final private protected internal function m40() {}", "static hd() {\n return firebase.storage();\n }", "function metadataStaticView() {\n html= HtmlService\n .createTemplateFromFile('staticMetadata')\n .evaluate()\n .setSandboxMode(HtmlService.SandboxMode.IFRAME);\n DocumentApp.getUi().showSidebar(html);\n }", "function supportedGeolocAPI () {\n if (window.navigator.geolocation) {\n return \"w3c\";\n } else {\n return \"none\";\n }\n}", "getGoogleResponse() {\n return this.getNormalResponse();\n }", "function setupChromeApis() {\n new MockChromeStorageAPI();\n}", "static final private public function m104() {}", "function getGoogleData () {\n var googleIds = main(1)\n for (var googleObject in googleIds) {\n var gId = googleIds[googleObject].cellValue\n gStore.app({appId: gId}).then((data) => {\n console.log({\n dataId: data.appId, \n price: data.price,\n versionText: data.androidVersionText, \n developer: data.developer, \n developerWebsite: data.developerWebsite\n }) \n console.log(\"\")\n }).catch( (err) => {\n });\n }\n}", "function googleMapAPIScript() {\n\t// https://maps.google.com/maps?q=225+delaware+avenue,+Buffalo,+NY&hl=en&sll=42.746632,-75.770041&sspn=5.977525,8.591309&t=h&hnear=225+Delaware+Ave,+Buffalo,+Erie,+New+York+14202&z=16\n\t// API key console\n\t// https://code.google.com/apis/console\n\t// BfloFRED API Key : key=AIzaSyBMSezbmos0W2n6BQutkFvNjkF5NTPd0-Q\n\n\tvar script = document.createElement(\"script\");\n\t// Load the Google Maps API : required\n\t// https://developers.google.com/maps/documentation/javascript/tutorial\n\tscript.src = \"http://maps.googleapis.com/maps/api/js?v=3&key=AIzaSyBMSezbmos0W2n6BQutkFvNjkF5NTPd0-Q&sensor=true\";\n\tdocument.head.appendChild(script);\n}", "transient final private protected internal function m167() {}" ]
[ "0.57512176", "0.5345903", "0.52893716", "0.5242048", "0.5074461", "0.50543845", "0.50521696", "0.5051502", "0.5051502", "0.5027637", "0.4989611", "0.498545", "0.49730507", "0.49567991", "0.4916299", "0.48886392", "0.4876151", "0.48606881", "0.48606881", "0.48490617", "0.48490617", "0.48435485", "0.48295322", "0.48123735", "0.47831675", "0.4768704", "0.47340217", "0.4720092", "0.47187722", "0.4709046", "0.4693696", "0.46882945", "0.46855348", "0.46846828", "0.46788326", "0.4678405", "0.46775785", "0.46773046", "0.46752015", "0.46745238", "0.46729264", "0.46707234", "0.4664581", "0.46463197", "0.46441376", "0.46361956", "0.46249402", "0.46208033", "0.46192744", "0.46104193", "0.46062222", "0.46045882", "0.45942646", "0.45928755", "0.45910943", "0.45833793", "0.45830405", "0.45809963", "0.45779058", "0.4577811", "0.45748523", "0.45707053", "0.45573023", "0.4547042", "0.45421642", "0.45365164", "0.45328885", "0.45308247", "0.45239997", "0.45184344", "0.45129567", "0.44994783", "0.4498293", "0.448557", "0.44852275", "0.4481251", "0.44732192", "0.44666508", "0.4465513", "0.44496667", "0.44484794", "0.44476423", "0.4446629", "0.44436583", "0.443799", "0.4437923", "0.4434733", "0.4430508", "0.44291753", "0.44167104", "0.44139627", "0.44126382", "0.44071183", "0.44064862", "0.4404661", "0.44035488", "0.43892667", "0.43881297", "0.43878698", "0.43864462", "0.43859112" ]
0.0
-1
"off" means `display: none;`, as opposed to "hidden", which means `visibility: hidden;`. getComputedStyle accurately reflects visiblity in context but not "off" state, so we need to recursively check parents.
function isOff(node, nodeComputedStyle) { if (node === elementDocument.documentElement) return false; // Find the cached node (Array.prototype.find not available in IE9) for (var i = 0, length = isOffCache.length; i < length; i++) { if (isOffCache[i][0] === node) return isOffCache[i][1]; } nodeComputedStyle = nodeComputedStyle || elementDocument.defaultView.getComputedStyle(node); var result = false; if (nodeComputedStyle.display === 'none') { result = true; } else if (node.parentNode) { result = isOff(node.parentNode); } isOffCache.push([node, result]); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isOff(node, nodeComputedStyle) {\n if (node === document.documentElement) return false;\n\n // Find the cached node (Array.prototype.find not available in IE9)\n for (var i = 0, length = isOffCache.length; i < length; i++) {\n if (isOffCache[i][0] === node) return isOffCache[i][1];\n }\n\n nodeComputedStyle = nodeComputedStyle || window.getComputedStyle(node);\n\n var result = false;\n\n if (nodeComputedStyle.display === 'none') {\n result = true;\n } else if (node.parentNode) {\n result = isOff(node.parentNode);\n }\n\n isOffCache.push([node, result]);\n\n return result;\n }", "function isOff(node, nodeComputedStyle) {\n if (node === elementDocument.documentElement) return false; // Find the cached node (Array.prototype.find not available in IE9)\n\n for (var i = 0, length = isOffCache.length; i < length; i++) {\n if (isOffCache[i][0] === node) return isOffCache[i][1];\n }\n\n nodeComputedStyle = nodeComputedStyle || elementDocument.defaultView.getComputedStyle(node);\n var result = false;\n\n if (nodeComputedStyle.display === 'none') {\n result = true;\n } else if (node.parentNode) {\n result = isOff(node.parentNode);\n }\n\n isOffCache.push([node, result]);\n return result;\n }", "_getVisibleStyle() {\n var invisible = this.props.invisible;\n if(invisible) {\n return 'hide';\n }\n return '';\n }", "function On(t){return getComputedStyle(t)}", "function visible(element){var visibility=element.css(\"visibility\");while(visibility===\"inherit\"){element=element.parent();visibility=element.css(\"visibility\");}return visibility!==\"hidden\";}", "function visible(element){var visibility=element.css(\"visibility\");while(visibility===\"inherit\"){element=element.parent();visibility=element.css(\"visibility\");}return visibility!==\"hidden\";}", "function visible(element){var visibility=element.css(\"visibility\");while(visibility===\"inherit\"){element=element.parent();visibility=element.css(\"visibility\");}return visibility!==\"hidden\";}", "function visible(element){var visibility=element.css(\"visibility\");while(visibility === \"inherit\") {element = element.parent();visibility = element.css(\"visibility\");}return visibility !== \"hidden\";}", "async function tangible(node) {\n return (\n // exists\n !!node &&\n // is visible\n node.evaluate(node => {\n for (let anc = node; anc instanceof Element; anc = anc.parentNode) {\n const styles = getComputedStyle(anc);\n if (\n styles.opacity === \"0\" ||\n styles.display === \"none\" ||\n styles.visibility === \"hidden\"\n ) {\n return false;\n }\n }\n return true;\n })\n );\n}", "function n(e){return getComputedStyle(e)}", "function isStyleVisible(element) {\r\n if (!(element instanceof HTMLElement) && !(element instanceof SVGElement)) {\r\n return false;\r\n }\r\n var _a = getComputedStyle(element), display = _a.display, visibility = _a.visibility, opacity = _a.opacity;\r\n return (display !== 'none' &&\r\n visibility !== 'hidden' &&\r\n visibility !== 'collapse' &&\r\n opacity !== '0');\r\n}", "function isVisible(elem) {\n let element = elem;\n let visibility = element.css('visibility');\n while (visibility === 'inherit') {\n element = element.parent();\n visibility = element.css('visibility');\n }\n return visibility !== 'hidden';\n }", "function i(e){return getComputedStyle(e)}", "function v(e){var o=q(e).offsetParent();var O=false;var $=q(e).parents().filter(function(){if(this===o){O=true;}return O;});return!q(e).add($).filter(function(){return q.css(this,\"visibility\")===\"hidden\"||q.expr.pseudos.hidden(this);}).length;}", "function gi(e){return getComputedStyle(e)}", "function getHiddenProp(){var e=[\"webkit\",\"moz\",\"ms\",\"o\"];if(\"hidden\"in document)return\"hidden\";for(var t=0;t<e.length;t++){if(e[t]+\"Hidden\"in document)return e[t]+\"Hidden\"}return null}", "function Le(e){return getComputedStyle(e)}", "function n(t){return getComputedStyle(t)}", "function n(t){return getComputedStyle(t)}", "function n(t){return getComputedStyle(t)}", "function n(t){return getComputedStyle(t)}", "function n(t){return getComputedStyle(t)}", "function n(t){return getComputedStyle(t)}", "function e(t){return getComputedStyle(t)}", "function e(t){return getComputedStyle(t)}", "function e(t){return getComputedStyle(t)}", "function e(t){return getComputedStyle(t)}", "function e(t){return getComputedStyle(t)}", "function e(t){return getComputedStyle(t)}", "function e(t){return getComputedStyle(t)}", "function t(e){return getComputedStyle(e)}", "function s(e){return getComputedStyle(e)}", "function visible(element) {\r\n if(getComputedStyle(element).getPropertyValue(\"visibility\") == \"hidden\") {\r\n return false;\r\n } else {\r\n if(element.parentNode != document) {\r\n return visible(element.parentNode);\r\n } else {\r\n return true;\r\n }\r\n }\r\n}", "function v(e){var o=jQuery(e).offsetParent();var O=false;var $=jQuery(e).parents().filter(function(){if(this===o){O=true}return O});return!jQuery(e).add($).filter(function(){return jQuery.css(this,\"visibility\")===\"hidden\"||jQuery.expr.filters.hidden(this)}).length}", "get _isVisible(){return!!(this.offsetWidth||this.offsetHeight)}", "function i(t){return getComputedStyle(t)}", "function i(t){return getComputedStyle(t)}", "function i(t){return getComputedStyle(t)}", "function handleVisibilityChange() {\n if (!document.webkitHidden) {\n checkUpdate();\n }\n }", "function Qe(e){return getComputedStyle(e)}", "function get(e){return getComputedStyle(e)}", "function a(e){return getComputedStyle(e)}", "static get styles() {\n return css `\n :host {\n display: inline-block;\n }\n [part=check] {\n visibility: hidden;\n }\n :host([checked]) [part=check] {\n visibility: inherit;\n }\n [part=label],\n [part=container] {\n display: inline-block;\n white-space: nowrap;\n vertical-align: middle;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n :host(:empty) [part=label], [part=label]:empty {\n display: none;\n }\n `;\n }", "function L(t){return getComputedStyle(t)}", "function plugin_hidden_isHidden(elem){\n return jQuery(elem.parentNode).children('div.hiddenBody')[0].style.display === \"none\";\n}", "function fetchComputedStyle(el, prop, pseudo) {\n return window.getComputedStyle(el, (pseudo || null)).getPropertyValue(prop);\n }", "function isHidden(el) {\n var style = window.getComputedStyle(el);\n return ((style.display === 'none') || (style.visibility === 'hidden'))\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function isVisible (o) {\n\tif (o === null || !(o instanceof Element)) {\n\t\treturn true;\n\t}\n\tlet style = window.getComputedStyle (o);\n\tif ('parentNode' in o) {\n\t\treturn style.display !== 'none' && isVisible (o.parentNode);\n\t} else {\n\t\treturn style.display !== 'none';\n\t}\n}", "doHidden( root ) {\n root.style.display = 'none';\n }", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "function r(e){return getComputedStyle(e)}", "get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight);}", "function computeVisibility(){var computedVisibility=(_audioOnly&&_displayMode==='auto'||_displayMode==='on')&&_displayAroundLoading;if(_lastComputedVisibility!==computedVisibility){_lastComputedVisibility=computedVisibility;_eventEmitter.emit('visibilityChanged',computedVisibility);}}", "get visible(){ return this.filter(_elementIsVisible); }", "function v(e) {\n var o = q(e).offsetParent();\n var O = false;\n var $ = q(e).parents().filter(function() {\n if (this === o) {\n O = true;\n }\n return O;\n });\n return !q(e).add($).filter(function() {\n return q.css(this, \"visibility\") === \"hidden\" || q.expr.filters.hidden(this);\n }).length;\n }", "function isHidden(element) {\n let style = window.getComputedStyle(element);\n return ((style.display === \"none\") || (style.visibility === \"hidden\"))\n}", "function rc(e){return getComputedStyle(e)}", "function Pr(e){return getComputedStyle(e)}", "function toggleElementVis (node) {\n if(node.style.display) {\n node.style.display = '';\n } else {\n node.style.display = 'none';\n }\n}", "get hidden() {\n return !this.mcVisible && !this.animationState;\n }", "prefixVisibilityChange() {\n if (typeof document.hidden !== \"undefined\") { // Opera 12.10 and Firefox 18 and later support\n this.set('hidden', 'hidden');\n this.set('visibilityChange', 'visibilitychange');\n } else if (typeof document.mozHidden !== \"undefined\") {\n this.set('hidden', 'mozHidden');\n this.set('visibilityChange', 'mozvisibilitychange');\n } else if (typeof document.msHidden !== \"undefined\") {\n this.set('hidden', 'msHidden');\n this.set('visibilityChange', 'msvisibilitychange');\n } else if (typeof document.webkitHidden !== \"undefined\") {\n this.set('hidden', 'webkitHidden');\n this.set('visibilityChange', 'webkitvisibilitychange');\n }\n }", "function showVRHiddenNodes() {\n\t Array.prototype.forEach.call(document.styleSheets, function (stylesheet) {\n\t Array.prototype.forEach.call(stylesheet.cssRules, function (rule) {\n\t if (rule.selectorText && rule.selectorText.indexOf('.vr-only') >= 0) rule.style['display'] = '';\n\t });\n\t });\n\t}", "isVisible(element) {\n return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n }", "function GetCurrentVisibility(klass)\n{\n for(let elem of document.getElementsByClassName(klass)){\n let vis = elem.getAttribute('visibility')\n return vis != 'hidden';\n }\n\n return false;// no elems at all\n}", "static get styles() {\n return [\n css`\n :host {\n display: none;\n }\n `,\n ];\n }", "function getVisibilityState() {\n var prefixes = ['webkit', 'moz', 'ms', 'o'];\n if ('visibilityState' in document) return 'visibilityState';\n for (var i = 0; i < prefixes.length; i++) {\n if ((prefixes[i] + 'VisibilityState') in document)\n return prefixes[i] + 'VisibilityState';\n }\n // otherwise it's not supported\n return null;\n}", "_restoreNodeVisibility(domNode, oldVisibility) {\n if (domNode.style) {\n domNode.style.display = oldVisibility.visibility;\n }\n let j = 0;\n for (let i = 0; i < domNode.childNodes.length; i++) {\n if (j < oldVisibility.children.length) {\n let node = domNode.children.item(i);\n if (node instanceof HTMLElement) {\n this._restoreNodeVisibility(node, oldVisibility.children[j++]);\n }\n }\n }\n }", "function shouldPreviewElemBeHidden($elem) {\n var thisVisibility = $elem.attr('data-visibility');\n var parentVisibility = $elem.attr('data-parent-visibility');\n return thisVisibility === 'hidden' || thisVisibility === 'unset' && parentVisibility === 'hidden';\n}", "function getComputedStyles(elem) {\n return ownerDocument(elem).defaultView.getComputedStyle(elem, null);\n}", "get _isVisible() {\n return Boolean(this.offsetWidth || this.offsetHeight);\n }" ]
[ "0.6937995", "0.6845413", "0.65879923", "0.6131329", "0.60554206", "0.60554206", "0.60554206", "0.5934719", "0.5715506", "0.5696938", "0.56792223", "0.56587917", "0.5654031", "0.56177247", "0.55592096", "0.553895", "0.551403", "0.5508968", "0.5508968", "0.5508968", "0.5508968", "0.5508968", "0.5508968", "0.5507778", "0.5507778", "0.5507778", "0.5507778", "0.5507778", "0.5507778", "0.5507778", "0.55000514", "0.5489757", "0.5489091", "0.54648495", "0.54426104", "0.5435573", "0.5435573", "0.5435573", "0.5434411", "0.5418306", "0.54086757", "0.54007846", "0.537662", "0.5372651", "0.5357843", "0.53503263", "0.5331385", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.53078043", "0.5306649", "0.5305834", "0.53007585", "0.53007585", "0.53007585", "0.53007585", "0.53007585", "0.53007585", "0.53007585", "0.53007585", "0.53007585", "0.5282072", "0.52734375", "0.52495164", "0.5244286", "0.5217839", "0.5215853", "0.5215045", "0.5212738", "0.5212346", "0.52077556", "0.5204425", "0.52027315", "0.51872754", "0.51844144", "0.51733667", "0.5171516", "0.5166919", "0.5159847", "0.5129571" ]
0.6900937
3
Remap touch events to pointer events, if the browser doesn't support touch events.
function remapEvent(eventName) { var globalObj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window; if (!('ontouchstart' in globalObj.document)) { switch (eventName) { case 'touchstart': return 'pointerdown'; case 'touchmove': return 'pointermove'; case 'touchend': return 'pointerup'; default: return eventName; } } return eventName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function usePointerEvent(){ // TODO\n // pointermove event dont trigger when using finger.\n // We may figger it out latter.\n return false; // return env.pointerEventsSupported\n // In no-touch device we dont use pointer evnets but just\n // use mouse event for avoiding problems.\n // && window.navigator.maxTouchPoints;\n }", "function onPointerMove(event) {\n\n if (event.pointerType === event.MSPOINTER_TYPE_TOUCH) {\n event.touches = [{clientX: event.clientX, clientY: event.clientY}];\n onTouchMove(event);\n }\n\n }", "function onPointerMove( event ) {\r\n\r\n\t\tevent.preventDefault();\r\n\r\n\t\tswitch ( event.pointerType ) {\r\n\r\n\t\t\tcase 'mouse':\r\n\t\t\tcase 'pen':\r\n\t\t\t\tonMouseMove( event );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t// TODO touch\r\n\r\n\t\t}\r\n\r\n\t}", "function onPointerDown(event) {\n\n if (event.pointerType === event.MSPOINTER_TYPE_TOUCH) {\n event.touches = [{clientX: event.clientX, clientY: event.clientY}];\n onTouchStart(event);\n }\n\n }", "function getPointerEvent(event) {\n return event.originalEvent.targetTouches ? event.originalEvent.targetTouches[0] : event;\n }", "function emulateTouch (event)\n\t\t\t{\n\t\t\t\tif (options.preventDefault)\n\t\t\t\t{\n\t\t\t\t\t// Pas d'action par défaut (bouger la page par exemple)\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\n\t\t\t\t// Récupérer les pointes\n\t\t\t\tvar touches = event.changedTouches;\n\n\t\t\t\t// Le type de l'event\n\t\t\t\tvar type = event.type;\n\n\t\t\t\t// Si on doit dispatcher direct\n\t\t\t\tif (options.dispatchOnStart)\n\t\t\t\t{\n\t\t\t\t\tif (type == \"touchstart\")\n\t\t\t\t\t\tdispatchMouseEvent(\"click\", touches[0]);\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Si on doit utiliser les fastTap\n\t\t\t\telse if (options.fastTap)\n\t\t\t\t{\n\t\t\t\t\t// Vérifier les mouvements pour émuler les clics\n\t\t\t\t\tif (type == \"touchstart\")\n\t\t\t\t\t\tmoved = false;\n\t\t\t\t\telse if (type == \"touchmove\")\n\t\t\t\t\t\tmoved = true;\n\t\t\t\t\telse if (type == \"touchend\" && !moved)\n\t\t\t\t\t\tdispatchMouseEvent(\"click\", touches[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Séléctionner le type de MouseEvent selon le TouchEvent\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase 'touchtap':\n\t\t\t\t\t\ttype = 'click';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'touchstart':\n\t\t\t\t\t\ttype = 'mousedown';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'touchmove':\n\t\t\t\t\t\ttype = 'mousemove';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'touchend':\n\t\t\t\t\t\ttype = 'mouseup';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn;\n\t\t\t\t};\n\n\t\t\t\t// Dispatcher l'équivalent mouseEvent\n\t\t\t\tdispatchMouseEvent(type, touches[0]);\n\t\t\t}", "function PointerEventsPolyfill(t){if(this.options={selector:\"*\",mouseEvents:[\"click\",\"dblclick\",\"mousedown\",\"mouseup\"],usePolyfillIf:function(){if(\"Microsoft Internet Explorer\"==navigator.appName){var t=navigator.userAgent;if(null!=t.match(/MSIE ([0-9]{1,}[\\.0-9]{0,})/)){var e=parseFloat(RegExp.$1);if(11>e)return!0}}return!1}},t){var e=this;$.each(t,function(t,n){e.options[t]=n})}this.options.usePolyfillIf()&&this.register_mouse_events()}", "function PointerEventsPolyfill(t){if(this.options={selector:\"*\",mouseEvents:[\"click\",\"dblclick\",\"mousedown\",\"mouseup\"],usePolyfillIf:function(){if(\"Microsoft Internet Explorer\"==navigator.appName){var t=navigator.userAgent;if(null!=t.match(/MSIE ([0-9]{1,}[\\.0-9]{0,})/)){var e=parseFloat(RegExp.$1);if(11>e)return!0}}return!1}},t){var e=this;$.each(t,function(t,n){e.options[t]=n})}this.options.usePolyfillIf()&&this.register_mouse_events()}", "function PointerGestureEvent(a, b) {\r\n var c = b || {}, d = document.createEvent(\"Event\"),\r\n e = {\r\n bubbles: Boolean(c.bubbles) === c.bubbles || !0,\r\n cancelable: Boolean(c.cancelable) === c.cancelable || !0\r\n };\r\n d.initEvent(a, e.bubbles, e.cancelable);\r\n for (var f, g = Object.keys(c), h = 0; h < g.length; h++) f = g[h], d[f] = c[f];\r\n return d.preventTap = this.preventTap, d\r\n}", "function addTouchHandler(){\n if(isTouch){\n //Microsoft pointers\n var MSPointer = getMSPointer();\n\n container.off('touchstart ' + MSPointer.down).on('touchstart ' + MSPointer.down, touchStartHandler);\n container.off('touchmove ' + MSPointer.move).on('touchmove ' + MSPointer.move, touchMoveHandler);\n }\n }", "function addTouchHandler(){\n \t\t\tif(isTouchDevice || isTouch){\n \t\t\t\t//Microsoft pointers\n \t\t\t\tMSPointer = getMSPointer();\n\n \t\t\t\t$(document).off('touchstart ' + MSPointer.down).on('touchstart ' + MSPointer.down, touchStartHandler);\n \t\t\t\t$(document).off('touchmove ' + MSPointer.move).on('touchmove ' + MSPointer.move, touchMoveHandler);\n \t\t\t}\n \t\t}", "function fixEvent ( e, pageOffset, target ) {\n\n\t\t// Filter the event to register the type, which can be\n\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t// made on an event specific basis.\n\t\tvar touch = e.type.indexOf('touch') === 0;\n\t\tvar mouse = e.type.indexOf('mouse') === 0;\n\t\tvar pointer = e.type.indexOf('pointer') === 0;\n\n\t\tvar x;\n\t\tvar y;\n\n\t\t// IE10 implemented pointer events with a prefix;\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\n\t\t\tpointer = true;\n\t\t}\n\n\n\t\t// In the event that multitouch is activated, the only thing one handle should be concerned\n\t\t// about is the touches that originated on top of it.\n\t\tif ( touch && options.multitouch ) {\n\t\t\t// Returns true if a touch originated on the target.\n\t\t\tvar isTouchOnTarget = function (touch) {\n\t\t\t\treturn touch.target === target || target.contains(touch.target);\n\t\t\t};\n\t\t\t// In the case of touchstart events, we need to make sure there is still no more than one\n\t\t\t// touch on the target so we look amongst all touches.\n\t\t\tif (e.type === 'touchstart') {\n\t\t\t\tvar targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\t\t\t\t// Do not support more than one touch per handle.\n\t\t\t\tif ( targetTouches.length > 1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tx = targetTouches[0].pageX;\n\t\t\t\ty = targetTouches[0].pageY;\n\t\t\t} else {\n\t\t\t// In the other cases, find on changedTouches is enough.\n\t\t\t\tvar targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\t\t\t\t// Cancel if the target touch has not moved.\n\t\t\t\tif ( !targetTouch ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tx = targetTouch.pageX;\n\t\t\t\ty = targetTouch.pageY;\n\t\t\t}\n\t\t} else if ( touch ) {\n\t\t\t// Fix bug when user touches with two or more fingers on mobile devices.\n\t\t\t// It's useful when you have two or more sliders on one page,\n\t\t\t// that can be touched simultaneously.\n\t\t\t// #649, #663, #668\n\t\t\tif ( e.touches.length > 1 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// noUiSlider supports one movement at a time,\n\t\t\t// so we can select the first 'changedTouch'.\n\t\t\tx = e.changedTouches[0].pageX;\n\t\t\ty = e.changedTouches[0].pageY;\n\t\t}\n\n\t\tpageOffset = pageOffset || getPageOffset(scope_Document);\n\n\t\tif ( mouse || pointer ) {\n\t\t\tx = e.clientX + pageOffset.x;\n\t\t\ty = e.clientY + pageOffset.y;\n\t\t}\n\n\t\te.pageOffset = pageOffset;\n\t\te.points = [x, y];\n\t\te.cursor = mouse || pointer; // Fix #435\n\n\t\treturn e;\n\t}", "function fixEvent ( e, pageOffset, target ) {\n\n\t\t// Filter the event to register the type, which can be\n\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t// made on an event specific basis.\n\t\tvar touch = e.type.indexOf('touch') === 0;\n\t\tvar mouse = e.type.indexOf('mouse') === 0;\n\t\tvar pointer = e.type.indexOf('pointer') === 0;\n\n\t\tvar x;\n\t\tvar y;\n\n\t\t// IE10 implemented pointer events with a prefix;\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\n\t\t\tpointer = true;\n\t\t}\n\n\n\t\t// In the event that multitouch is activated, the only thing one handle should be concerned\n\t\t// about is the touches that originated on top of it.\n\t\tif ( touch && options.multitouch ) {\n\t\t\t// Returns true if a touch originated on the target.\n\t\t\tvar isTouchOnTarget = function (touch) {\n\t\t\t\treturn touch.target === target || target.contains(touch.target);\n\t\t\t};\n\t\t\t// In the case of touchstart events, we need to make sure there is still no more than one\n\t\t\t// touch on the target so we look amongst all touches.\n\t\t\tif (e.type === 'touchstart') {\n\t\t\t\tvar targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\t\t\t\t// Do not support more than one touch per handle.\n\t\t\t\tif ( targetTouches.length > 1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tx = targetTouches[0].pageX;\n\t\t\t\ty = targetTouches[0].pageY;\n\t\t\t} else {\n\t\t\t// In the other cases, find on changedTouches is enough.\n\t\t\t\tvar targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\t\t\t\t// Cancel if the target touch has not moved.\n\t\t\t\tif ( !targetTouch ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tx = targetTouch.pageX;\n\t\t\t\ty = targetTouch.pageY;\n\t\t\t}\n\t\t} else if ( touch ) {\n\t\t\t// Fix bug when user touches with two or more fingers on mobile devices.\n\t\t\t// It's useful when you have two or more sliders on one page,\n\t\t\t// that can be touched simultaneously.\n\t\t\t// #649, #663, #668\n\t\t\tif ( e.touches.length > 1 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// noUiSlider supports one movement at a time,\n\t\t\t// so we can select the first 'changedTouch'.\n\t\t\tx = e.changedTouches[0].pageX;\n\t\t\ty = e.changedTouches[0].pageY;\n\t\t}\n\n\t\tpageOffset = pageOffset || getPageOffset(scope_Document);\n\n\t\tif ( mouse || pointer ) {\n\t\t\tx = e.clientX + pageOffset.x;\n\t\t\ty = e.clientY + pageOffset.y;\n\t\t}\n\n\t\te.pageOffset = pageOffset;\n\t\te.points = [x, y];\n\t\te.cursor = mouse || pointer; // Fix #435\n\n\t\treturn e;\n\t}", "function fixEvent ( e, pageOffset, target ) {\n\n\t\t// Filter the event to register the type, which can be\n\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t// made on an event specific basis.\n\t\tvar touch = e.type.indexOf('touch') === 0;\n\t\tvar mouse = e.type.indexOf('mouse') === 0;\n\t\tvar pointer = e.type.indexOf('pointer') === 0;\n\n\t\tvar x;\n\t\tvar y;\n\n\t\t// IE10 implemented pointer events with a prefix;\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\n\t\t\tpointer = true;\n\t\t}\n\n\n\t\t// In the event that multitouch is activated, the only thing one handle should be concerned\n\t\t// about is the touches that originated on top of it.\n\t\tif ( touch && options.multitouch ) {\n\t\t\t// Returns true if a touch originated on the target.\n\t\t\tvar isTouchOnTarget = function (touch) {\n\t\t\t\treturn touch.target === target || target.contains(touch.target);\n\t\t\t};\n\t\t\t// In the case of touchstart events, we need to make sure there is still no more than one\n\t\t\t// touch on the target so we look amongst all touches.\n\t\t\tif (e.type === 'touchstart') {\n\t\t\t\tvar targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\t\t\t\t// Do not support more than one touch per handle.\n\t\t\t\tif ( targetTouches.length > 1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tx = targetTouches[0].pageX;\n\t\t\t\ty = targetTouches[0].pageY;\n\t\t\t} else {\n\t\t\t// In the other cases, find on changedTouches is enough.\n\t\t\t\tvar targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\t\t\t\t// Cancel if the target touch has not moved.\n\t\t\t\tif ( !targetTouch ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tx = targetTouch.pageX;\n\t\t\t\ty = targetTouch.pageY;\n\t\t\t}\n\t\t} else if ( touch ) {\n\t\t\t// Fix bug when user touches with two or more fingers on mobile devices.\n\t\t\t// It's useful when you have two or more sliders on one page,\n\t\t\t// that can be touched simultaneously.\n\t\t\t// #649, #663, #668\n\t\t\tif ( e.touches.length > 1 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// noUiSlider supports one movement at a time,\n\t\t\t// so we can select the first 'changedTouch'.\n\t\t\tx = e.changedTouches[0].pageX;\n\t\t\ty = e.changedTouches[0].pageY;\n\t\t}\n\n\t\tpageOffset = pageOffset || getPageOffset(scope_Document);\n\n\t\tif ( mouse || pointer ) {\n\t\t\tx = e.clientX + pageOffset.x;\n\t\t\ty = e.clientY + pageOffset.y;\n\t\t}\n\n\t\te.pageOffset = pageOffset;\n\t\te.points = [x, y];\n\t\te.cursor = mouse || pointer; // Fix #435\n\n\t\treturn e;\n\t}", "function convertMouseToTouchEvents(evt) {\n\t\tif ( (evt === \"mouseup\" || evt === \"click\") && Events.touchSupported() === true)\n\t\t\tevt = \"touchend\";\n\t\telse if (evt === \"mousedown\" && Events.touchSupported() === true)\n\t\t\tevt = \"touchstart\";\n\t\telse if (evt === \"mousemove\" && Events.touchSupported() === true)\n\t\t\tevt = \"touchmove\";\n\t\t\n\t\treturn evt;\n\t}", "touchHandler(event) {\n const touches = event.changedTouches\n const first = touches[0]\n let type = ''\n switch (event.type) {\n case 'touchstart':\n type = 'mousedown'\n break\n case 'touchmove':\n type = 'mousemove'\n break\n case 'touchend':\n type = 'mouseup'\n break\n default:\n return\n }\n // initMouseEvent(type, canBubble, cancelable, view, clickCount, \n // screenX, screenY, clientX, clientY, ctrlKey, \n // altKey, shiftKey, metaKey, button, relatedTarget)\n const simulatedEvent = document.createEvent('MouseEvent')\n simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0, null)\n first.target.dispatchEvent(simulatedEvent)\n event.preventDefault()\n }", "function pointerDown(event) {\n\t\t\tif (event.pointerType === 'touch') {\n\t\t\t\ttouchStart();\n\t\t\t}\n\t\t}", "function addInitialPointerMoveListeners(){document.addEventListener('mousemove',onInitialPointerMove);document.addEventListener('mousedown',onInitialPointerMove);document.addEventListener('mouseup',onInitialPointerMove);document.addEventListener('pointermove',onInitialPointerMove);document.addEventListener('pointerdown',onInitialPointerMove);document.addEventListener('pointerup',onInitialPointerMove);document.addEventListener('touchmove',onInitialPointerMove);document.addEventListener('touchstart',onInitialPointerMove);document.addEventListener('touchend',onInitialPointerMove);}", "function fixEvent(e, pageOffset, target) {\n\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf('touch') === 0;\n var mouse = e.type.indexOf('mouse') === 0;\n var pointer = e.type.indexOf('pointer') === 0;\n\n var x;\n var y;\n\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf('MSPointer') === 0) {\n pointer = true;\n }\n\n\n // In the event that multitouch is activated, the only thing one handle should be concerned\n // about is the touches that originated on top of it.\n if (touch && options.multitouch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function (touch) {\n return touch.target === target || target.contains(touch.target);\n };\n // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n if (e.type === 'touchstart') {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n // Do not support more than one touch per handle.\n if (targetTouches.length > 1) {\n return false;\n }\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n } else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n // Cancel if the target touch has not moved.\n if (!targetTouch) {\n return false;\n }\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n } else if (touch) {\n // Fix bug when user touches with two or more fingers on mobile devices.\n // It's useful when you have two or more sliders on one page,\n // that can be touched simultaneously.\n // #649, #663, #668\n if (e.touches.length > 1) {\n return false;\n }\n\n // noUiSlider supports one movement at a time,\n // so we can select the first 'changedTouch'.\n x = e.changedTouches[0].pageX;\n y = e.changedTouches[0].pageY;\n }\n\n pageOffset = pageOffset || getPageOffset(scope_Document);\n\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n\n return e;\n }", "function isReallyTouch(e) {\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function e(){var e,t={},i=[\"touchstart\",\"touchmove\",\"touchend\"],n=document.createElement(\"div\");try{for(e=0;e<i.length;e++){var r=i[e];r=\"on\"+r;var s=r in n;s||(n.setAttribute(r,\"return;\"),s=\"function\"==typeof n[r]),t[i[e]]=s}return t.touchstart&&t.touchend&&t.touchmove}catch(a){return!1}}", "function fixEvent(e, pageOffset, eventTarget) {\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf(\"touch\") === 0;\n var mouse = e.type.indexOf(\"mouse\") === 0;\n var pointer = e.type.indexOf(\"pointer\") === 0;\n\n var x;\n var y;\n\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf(\"MSPointer\") === 0) {\n pointer = true;\n }\n\n // The only thing one handle should be concerned about is the touches that originated on top of it.\n if (touch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function(checkTouch) {\n return checkTouch.target === eventTarget || eventTarget.contains(checkTouch.target);\n };\n\n // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n if (e.type === \"touchstart\") {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n // Do not support more than one touch per handle.\n if (targetTouches.length > 1) {\n return false;\n }\n\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n } else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n // Cancel if the target touch has not moved.\n if (!targetTouch) {\n return false;\n }\n\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n }\n\n pageOffset = pageOffset || getPageOffset(scope_Document);\n\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n\n return e;\n }", "touchHandler(e) {\n var touches = e.changedTouches, first = touches[0], type = \"\";\n switch (e.type){\n case \"touchstart\":\n type = \"mousedown\";\n break;\n case \"touchmove\":\n type = \"mousemove\";\n break;\n case \"touchend\":\n type = \"mouseup\";\n break;\n case \"touchcancel\":\n type = \"mouseup\";\n break;\n default:\n return;\n }\n var simulatedEvent = document.createEvent(\"MouseEvent\");\n simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null);\n first.target.dispatchEvent(simulatedEvent);\n e.preventDefault();\n }", "function isReallyTouch(e) {\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function fixEvent(e, pageOffset, eventTarget) {\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf(\"touch\") === 0;\n var mouse = e.type.indexOf(\"mouse\") === 0;\n var pointer = e.type.indexOf(\"pointer\") === 0;\n\n var x;\n var y;\n\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf(\"MSPointer\") === 0) {\n pointer = true;\n }\n\n // The only thing one handle should be concerned about is the touches that originated on top of it.\n if (touch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function(checkTouch) {\n return (\n checkTouch.target === eventTarget ||\n eventTarget.contains(checkTouch.target) ||\n (checkTouch.target.shadowRoot && checkTouch.target.shadowRoot.contains(eventTarget))\n );\n };\n\n // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n if (e.type === \"touchstart\") {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n // Do not support more than one touch per handle.\n if (targetTouches.length > 1) {\n return false;\n }\n\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n } else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n // Cancel if the target touch has not moved.\n if (!targetTouch) {\n return false;\n }\n\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n }\n\n pageOffset = pageOffset || getPageOffset(scope_Document);\n\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n\n return e;\n }", "function fixEvent(e, pageOffset, eventTarget) {\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf(\"touch\") === 0;\n var mouse = e.type.indexOf(\"mouse\") === 0;\n var pointer = e.type.indexOf(\"pointer\") === 0;\n\n var x;\n var y;\n\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf(\"MSPointer\") === 0) {\n pointer = true;\n }\n\n // The only thing one handle should be concerned about is the touches that originated on top of it.\n if (touch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function(checkTouch) {\n return (\n checkTouch.target === eventTarget ||\n eventTarget.contains(checkTouch.target) ||\n (checkTouch.target.shadowRoot && checkTouch.target.shadowRoot.contains(eventTarget))\n );\n };\n\n // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n if (e.type === \"touchstart\") {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n // Do not support more than one touch per handle.\n if (targetTouches.length > 1) {\n return false;\n }\n\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n } else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n // Cancel if the target touch has not moved.\n if (!targetTouch) {\n return false;\n }\n\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n }\n\n pageOffset = pageOffset || getPageOffset(scope_Document);\n\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n\n return e;\n }", "function fixEvent(e, pageOffset, eventTarget) {\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf(\"touch\") === 0;\n var mouse = e.type.indexOf(\"mouse\") === 0;\n var pointer = e.type.indexOf(\"pointer\") === 0;\n\n var x;\n var y;\n\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf(\"MSPointer\") === 0) {\n pointer = true;\n }\n\n // The only thing one handle should be concerned about is the touches that originated on top of it.\n if (touch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function(checkTouch) {\n return (\n checkTouch.target === eventTarget ||\n eventTarget.contains(checkTouch.target) ||\n (checkTouch.target.shadowRoot && checkTouch.target.shadowRoot.contains(eventTarget))\n );\n };\n\n // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n if (e.type === \"touchstart\") {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n // Do not support more than one touch per handle.\n if (targetTouches.length > 1) {\n return false;\n }\n\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n } else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n // Cancel if the target touch has not moved.\n if (!targetTouch) {\n return false;\n }\n\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n }\n\n pageOffset = pageOffset || getPageOffset(scope_Document);\n\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n\n return e;\n }", "handletouchmove(e) {\n var touch = e.touches[0];\n var mouseEvent = new MouseEvent(\"mousemove\", {\n clientX: touch.clientX,\n clientY: touch.clientY\n });\n this.canvas.dispatchEvent(mouseEvent);\n e.preventDefault();\n }", "function gestureMove(ev){if(!pointer||!typesMatch(ev,pointer))return;updatePointerState(ev,pointer);runHandlers('move',ev);}", "function remapEvent(eventName) {\n var globalObj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window;\n\n if (!('ontouchstart' in globalObj.document)) {\n switch (eventName) {\n case 'touchstart':\n return 'pointerdown';\n\n case 'touchmove':\n return 'pointermove';\n\n case 'touchend':\n return 'pointerup';\n\n default:\n return eventName;\n }\n }\n\n return eventName;\n } // Choose the correct transform property to use on the current browser.", "function addTouchHandler(){\n if(isTablet){\n $(document).off('touchstart MSPointerDown').on('touchstart MSPointerDown', touchStartHandler);\n $(document).off('touchmove MSPointerMove').on('touchmove MSPointerMove', touchMoveHandler);\n }\n }", "function addTouchHandler(){\n if(isTouchDevice || isTouch){\n //Microsoft pointers\n var MSPointer = getMSPointer();\n\n $(WRAPPER_SEL).off('touchstart ' + MSPointer.down).on('touchstart ' + MSPointer.down, touchStartHandler);\n $(WRAPPER_SEL).off('touchmove ' + MSPointer.move).on('touchmove ' + MSPointer.move, touchMoveHandler);\n }\n }", "function addTouchHandler(){\n if(isTouchDevice || isTouch){\n //Microsoft pointers\n var MSPointer = getMSPointer();\n\n $(WRAPPER_SEL).off('touchstart ' + MSPointer.down).on('touchstart ' + MSPointer.down, touchStartHandler);\n $(WRAPPER_SEL).off('touchmove ' + MSPointer.move).on('touchmove ' + MSPointer.move, touchMoveHandler);\n }\n }", "_setupTouches () {\n const body = document.querySelector('body')\n this._events['touchmove'] = {event: this._handleTouchMove, disable: document, context: body}\n this._events['touchstart'] = {event: this._handleTouchStart, disable: document, context: body}\n this._events['touchend'] = {event: this._handleTouchEnd, disable: document, context: body}\n }", "function onTouchMove(event) {\n\n // Each touch should only trigger one action\n if (!touch.handled) {\n var currentX = event.touches[0].clientX;\n var currentY = event.touches[0].clientY;\n\n // If the touch started off with two points and still has\n // two active touches; test for the pinch gesture\n if (event.touches.length === 2 && touch.startCount === 2 && config.overview) {\n\n // The current distance in pixels between the two touch points\n var currentSpan = distanceBetween({\n x: event.touches[1].clientX,\n y: event.touches[1].clientY\n }, {\n x: touch.startX,\n y: touch.startY\n });\n\n // If the span is larger than the desire amount we've got\n // ourselves a pinch\n if (Math.abs(touch.startSpan - currentSpan) > touch.threshold) {\n touch.handled = true;\n\n if (currentSpan < touch.startSpan) {\n activateOverview();\n }\n else {\n deactivateOverview();\n }\n }\n\n event.preventDefault();\n\n }\n // There was only one touch point, look for a swipe\n else if (event.touches.length === 1 && touch.startCount !== 2) {\n\n var deltaX = currentX - touch.startX,\n deltaY = currentY - touch.startY;\n\n if (deltaX > touch.threshold && Math.abs(deltaX) > Math.abs(deltaY)) {\n touch.handled = true;\n navigateLeft();\n }\n else if (deltaX < -touch.threshold && Math.abs(deltaX) > Math.abs(deltaY)) {\n touch.handled = true;\n navigateRight();\n }\n else if (deltaY > touch.threshold) {\n touch.handled = true;\n navigateUp();\n }\n else if (deltaY < -touch.threshold) {\n touch.handled = true;\n navigateDown();\n }\n\n event.preventDefault();\n\n }\n }\n // There's a bug with swiping on some Android devices unless\n // the default action is always prevented\n else if (navigator.userAgent.match(/android/gi)) {\n event.preventDefault();\n }\n\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function onTouchMove(event){\n var xPos = event.touches[0].pageX;\n var yPos = event.touches[0].pageY;\n if(typeof(touchMoveEvent) == \"function\"){\n touchMoveEvent(xPos, yPos);\n }\n}", "function isReallyTouch(e){\r\n //if is not IE || IE is detecting `touch` or `pen`\r\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\r\n }", "function isReallyTouch(e){\r\n //if is not IE || IE is detecting `touch` or `pen`\r\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\r\n }", "function isReallyTouch(e){\r\n //if is not IE || IE is detecting `touch` or `pen`\r\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\r\n }", "function isReallyTouch(e){\r\n //if is not IE || IE is detecting `touch` or `pen`\r\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\r\n }", "function isReallyTouch(e){\r\n //if is not IE || IE is detecting `touch` or `pen`\r\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\r\n }", "function fixEvent ( e, pageOffset, eventTarget ) {\n\n\t\t// Filter the event to register the type, which can be\n\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t// made on an event specific basis.\n\t\tvar touch = e.type.indexOf('touch') === 0;\n\t\tvar mouse = e.type.indexOf('mouse') === 0;\n\t\tvar pointer = e.type.indexOf('pointer') === 0;\n\n\t\tvar x;\n\t\tvar y;\n\n\t\t// IE10 implemented pointer events with a prefix;\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\n\t\t\tpointer = true;\n\t\t}\n\n\t\t// In the event that multitouch is activated, the only thing one handle should be concerned\n\t\t// about is the touches that originated on top of it.\n\t\tif ( touch ) {\n\n\t\t\t// Returns true if a touch originated on the target.\n\t\t\tvar isTouchOnTarget = function (checkTouch) {\n\t\t\t\treturn checkTouch.target === eventTarget || eventTarget.contains(checkTouch.target);\n\t\t\t};\n\n\t\t\t// In the case of touchstart events, we need to make sure there is still no more than one\n\t\t\t// touch on the target so we look amongst all touches.\n\t\t\tif (e.type === 'touchstart') {\n\n\t\t\t\tvar targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n\t\t\t\t// Do not support more than one touch per handle.\n\t\t\t\tif ( targetTouches.length > 1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tx = targetTouches[0].pageX;\n\t\t\t\ty = targetTouches[0].pageY;\n\n\t\t\t} else {\n\n\t\t\t\t// In the other cases, find on changedTouches is enough.\n\t\t\t\tvar targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n\t\t\t\t// Cancel if the target touch has not moved.\n\t\t\t\tif ( !targetTouch ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tx = targetTouch.pageX;\n\t\t\t\ty = targetTouch.pageY;\n\t\t\t}\n\t\t}\n\n\t\tpageOffset = pageOffset || getPageOffset(scope_Document);\n\n\t\tif ( mouse || pointer ) {\n\t\t\tx = e.clientX + pageOffset.x;\n\t\t\ty = e.clientY + pageOffset.y;\n\t\t}\n\n\t\te.pageOffset = pageOffset;\n\t\te.points = [x, y];\n\t\te.cursor = mouse || pointer; // Fix #435\n\n\t\treturn e;\n\t}", "function fixEvent ( e, pageOffset, eventTarget ) {\n\n\t\t// Filter the event to register the type, which can be\n\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t// made on an event specific basis.\n\t\tvar touch = e.type.indexOf('touch') === 0;\n\t\tvar mouse = e.type.indexOf('mouse') === 0;\n\t\tvar pointer = e.type.indexOf('pointer') === 0;\n\n\t\tvar x;\n\t\tvar y;\n\n\t\t// IE10 implemented pointer events with a prefix;\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\n\t\t\tpointer = true;\n\t\t}\n\n\t\t// In the event that multitouch is activated, the only thing one handle should be concerned\n\t\t// about is the touches that originated on top of it.\n\t\tif ( touch ) {\n\n\t\t\t// Returns true if a touch originated on the target.\n\t\t\tvar isTouchOnTarget = function (checkTouch) {\n\t\t\t\treturn checkTouch.target === eventTarget || eventTarget.contains(checkTouch.target);\n\t\t\t};\n\n\t\t\t// In the case of touchstart events, we need to make sure there is still no more than one\n\t\t\t// touch on the target so we look amongst all touches.\n\t\t\tif (e.type === 'touchstart') {\n\n\t\t\t\tvar targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n\t\t\t\t// Do not support more than one touch per handle.\n\t\t\t\tif ( targetTouches.length > 1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tx = targetTouches[0].pageX;\n\t\t\t\ty = targetTouches[0].pageY;\n\n\t\t\t} else {\n\n\t\t\t\t// In the other cases, find on changedTouches is enough.\n\t\t\t\tvar targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n\t\t\t\t// Cancel if the target touch has not moved.\n\t\t\t\tif ( !targetTouch ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tx = targetTouch.pageX;\n\t\t\t\ty = targetTouch.pageY;\n\t\t\t}\n\t\t}\n\n\t\tpageOffset = pageOffset || getPageOffset(scope_Document);\n\n\t\tif ( mouse || pointer ) {\n\t\t\tx = e.clientX + pageOffset.x;\n\t\t\ty = e.clientY + pageOffset.y;\n\t\t}\n\n\t\te.pageOffset = pageOffset;\n\t\te.points = [x, y];\n\t\te.cursor = mouse || pointer; // Fix #435\n\n\t\treturn e;\n\t}", "function fixEvent ( e, pageOffset, eventTarget ) {\n\n\t\t// Filter the event to register the type, which can be\n\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t// made on an event specific basis.\n\t\tvar touch = e.type.indexOf('touch') === 0;\n\t\tvar mouse = e.type.indexOf('mouse') === 0;\n\t\tvar pointer = e.type.indexOf('pointer') === 0;\n\n\t\tvar x;\n\t\tvar y;\n\n\t\t// IE10 implemented pointer events with a prefix;\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\n\t\t\tpointer = true;\n\t\t}\n\n\t\t// In the event that multitouch is activated, the only thing one handle should be concerned\n\t\t// about is the touches that originated on top of it.\n\t\tif ( touch ) {\n\n\t\t\t// Returns true if a touch originated on the target.\n\t\t\tvar isTouchOnTarget = function (checkTouch) {\n\t\t\t\treturn checkTouch.target === eventTarget || eventTarget.contains(checkTouch.target);\n\t\t\t};\n\n\t\t\t// In the case of touchstart events, we need to make sure there is still no more than one\n\t\t\t// touch on the target so we look amongst all touches.\n\t\t\tif (e.type === 'touchstart') {\n\n\t\t\t\tvar targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n\t\t\t\t// Do not support more than one touch per handle.\n\t\t\t\tif ( targetTouches.length > 1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tx = targetTouches[0].pageX;\n\t\t\t\ty = targetTouches[0].pageY;\n\n\t\t\t} else {\n\n\t\t\t\t// In the other cases, find on changedTouches is enough.\n\t\t\t\tvar targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n\t\t\t\t// Cancel if the target touch has not moved.\n\t\t\t\tif ( !targetTouch ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tx = targetTouch.pageX;\n\t\t\t\ty = targetTouch.pageY;\n\t\t\t}\n\t\t}\n\n\t\tpageOffset = pageOffset || getPageOffset(scope_Document);\n\n\t\tif ( mouse || pointer ) {\n\t\t\tx = e.clientX + pageOffset.x;\n\t\t\ty = e.clientY + pageOffset.y;\n\t\t}\n\n\t\te.pageOffset = pageOffset;\n\t\te.points = [x, y];\n\t\te.cursor = mouse || pointer; // Fix #435\n\n\t\treturn e;\n\t}", "function remapEvent(eventName, globalObj = window) {\n if (!('ontouchstart' in globalObj.document)) {\n switch (eventName) {\n case 'touchstart':\n return 'pointerdown';\n case 'touchmove':\n return 'pointermove';\n case 'touchend':\n return 'pointerup';\n default:\n return eventName;\n }\n }\n\n return eventName;\n}", "function remapEvent(eventName, globalObj = window) {\n if (!('ontouchstart' in globalObj.document)) {\n switch (eventName) {\n case 'touchstart':\n return 'pointerdown';\n case 'touchmove':\n return 'pointermove';\n case 'touchend':\n return 'pointerup';\n default:\n return eventName;\n }\n }\n\n return eventName;\n}", "function fixEvent(e, pageOffset, eventTarget) {\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf(\"touch\") === 0;\n var mouse = e.type.indexOf(\"mouse\") === 0;\n var pointer = e.type.indexOf(\"pointer\") === 0;\n var x = 0;\n var y = 0;\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf(\"MSPointer\") === 0) {\n pointer = true;\n }\n // Erroneous events seem to be passed in occasionally on iOS/iPadOS after user finishes interacting with\n // the slider. They appear to be of type MouseEvent, yet they don't have usual properties set. Ignore\n // events that have no touches or buttons associated with them. (#1057, #1079, #1095)\n if (e.type === \"mousedown\" && !e.buttons && !e.touches) {\n return false;\n }\n // The only thing one handle should be concerned about is the touches that originated on top of it.\n if (touch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function (checkTouch) {\n var target = checkTouch.target;\n return (target === eventTarget ||\n eventTarget.contains(target) ||\n (e.composed && e.composedPath().shift() === eventTarget));\n };\n // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n if (e.type === \"touchstart\") {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n // Do not support more than one touch per handle.\n if (targetTouches.length > 1) {\n return false;\n }\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n }\n else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n // Cancel if the target touch has not moved.\n if (!targetTouch) {\n return false;\n }\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n }\n pageOffset = pageOffset || getPageOffset(scope_Document);\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n return e;\n }", "function touch_supported(e) {\n // Do something after the element is touched\n }", "function pointerMove(event) {\n // This is important to prevent scrolling the page instead of moving layers around\n event.preventDefault();\n // Only run this if touch or mouse click has started\n if (moving === true) {\n let current_x = 0;\n let current_y = 0;\n // Check if this is a touch event\n if (event.type === \"touchmove\") {\n // Current position of touch\n current_x = event.touches[0].clientX;\n current_y = event.touches[0].clientY;\n // Check if this is a mouse event\n } else if (event.type === \"mousemove\") {\n // Current position of mouse cursor\n current_x = event.clientX;\n current_y = event.clientY;\n }\n // Set pointer position to the difference between current position and initial position\n pointer.x = current_x - pointer_initial.x;\n pointer.y = current_y - pointer_initial.y;\n }\n}", "function touchHandler(event){\n var touches = event.changedTouches,\n first = touches[0],\n type = \"\";\n switch(event.type)\n {\n case \"touchstart\": type = \"mousedown\"; break;\n case \"touchmove\": type=\"mousemove\"; break; \n case \"touchend\": type=\"mouseup\"; break;\n default: return;\n }\n\n //initMouseEvent(type, canBubble, cancelable, view, clickCount, \n // screenX, screenY, clientX, clientY, ctrlKey, \n // altKey, shiftKey, metaKey, button, relatedTarget);\n \n var simulatedEvent = document.createEvent(\"MouseEvent\");\n simulatedEvent.initMouseEvent(type, true, true, window, 1, \n first.screenX, first.screenY, \n first.clientX, first.clientY, false, \n false, false, false, 0/*left*/, null);\n first.target.dispatchEvent(simulatedEvent);\n event.preventDefault();\n}", "function pointerStart(event) {\n // Ok, you touched the screen or clicked, now things can move until you stop doing that\n moving = true;\n // Check if this is a touch event\n if (event.type === \"touchstart\") {\n // set initial touch position to the coordinates where you first touched the screen\n pointer_initial.x = event.touches[0].clientX;\n pointer_initial.y = event.touches[0].clientY;\n // Check if this is a mouse click event\n } else if (event.type === \"mousedown\") {\n // set initial mouse position to the coordinates where you first clicked\n pointer_initial.x = event.clientX;\n pointer_initial.y = event.clientY;\n }\n}", "function removeTouchHandler(){\n if(isTouch){\n //Microsoft pointers\n var MSPointer = getMSPointer();\n\n container.off('touchstart ' + MSPointer.down);\n container.off('touchmove ' + MSPointer.move);\n }\n }", "function handleTouchEvent(event) {\n /* from http://jasonkuhn.net/mobile/jqui/js/jquery.iphoneui.js\n but changed a bit*/\n \n var touches = event.changedTouches;\n var first = touches[0];\n var type = '';\n \n \n // only want to do this for the drag handles\n if ( !first.target || !first.target.className || first.target.className.indexOf(\"handle\") == -1 ) {\n return;\n }\n \n switch(event.type) {\n case 'touchstart':\n type = 'mousedown';\n break;\n \n case 'touchmove':\n type = 'mousemove';\n break; \n \n case 'touchend':\n type = 'mouseup';\n break;\n \n default:\n return;\n }\n \n var simulatedEvent = document.createEvent('MouseEvent');\n simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null);\n \n first.target.dispatchEvent(simulatedEvent);\n \n if ( event.type == 'touchmove' ) {\n event.preventDefault();\n }\n }", "function addTouchSupport (callback) {\n const el = canvas\n const position = ({ touches }) => ({ x: touches[0].screenX, y: touches[0].screenY })\n const init = (event) => event ? position(event) : { x: 0, y: 0 }\n const endTouch = _ => callback({ x: 0, y: 0 })\n \n let model = init()\n el.addEventListener(\"touchstart\", (event) => {\n model = init(event)\n }, false)\n el.addEventListener(\"touchend\", endTouch, false)\n el.addEventListener(\"touchcancel\", endTouch, false)\n el.addEventListener(\"touchmove\", (event) => {\n const point = position(event)\n const x = Math.abs(point.x - model.x)\n const y = Math.abs(point.y - model.y)\n const max = Math.max(x, y)\n const normalized = {\n x: x / max * (point.x > model.x ? 1 : -1),\n y: y / max * (point.y > model.y ? 1 : -1)\n }\n callback(normalized)\n }, false)\n}", "pointerX(e) {\n if (/touch/.test(e.type)) {\n return e.changedTouches[0].pageX;\n }\n else {\n return (e.pageX || e.clientX);\n }\n }", "function touchHandler(event)\r\n{\r\n var touches = event.changedTouches,\r\n first = touches[0],\r\n type = \"\";\r\n switch(event.type)\r\n {\r\n case \"touchstart\": type=\"mousedown\"; break;\r\n case \"touchmove\": type=\"mousemove\"; break; \r\n case \"touchend\": type=\"mouseup\"; break;\r\n default: return;\r\n }\r\n\r\n //initMouseEvent(type, canBubble, cancelable, view, clickCount, \r\n // screenX, screenY, clientX, clientY, ctrlKey, \r\n // altKey, shiftKey, metaKey, button, relatedTarget);\r\n \r\n var simulatedEvent = document.createEvent(\"MouseEvent\");\r\n simulatedEvent.initMouseEvent(type, true, true, window, 1, \r\n first.screenX, first.screenY, \r\n first.clientX, first.clientY, false, \r\n false, false, false, 0/*left*/, null);\r\n\r\n first.target.dispatchEvent(simulatedEvent);\r\n event.preventDefault();\r\n}", "function canvasTouchHandler(){\n canvas.addEventListener('touchstart', function(event){\n event.preventDefault();},false);\n canvas.addEventListener('touchmove', function(event){\n event.preventDefault();},false);\n}", "function supportsPointerEventsFn() {\n // check cache\n if (_supportsPointerEvents !== undefined) return _supportsPointerEvents;\n \n var element = document.createElement('x');\n element.style.cssText = 'pointer-events:auto';\n _supportsPointerEvents = (element.style.pointerEvents === 'auto');\n return _supportsPointerEvents;\n}", "_bindMouseAndTouchEvents() {\n var self = this;\n\n /* Mouse events */\n this._element.addEventListener(\"mousedown\", (ev) => {\n self._onMouseDown(ev);\n }, false);\n this._element.addEventListener(\"mouseup\", (ev) => {\n self._onMouseUp(ev);\n }, false);\n this._element.addEventListener(\"mouseleave\", (ev) => {\n self._onMouseUp(ev);\n }, false);\n this._element.addEventListener(\"mousemove\", (ev) => {\n self._onMouseMove(ev);\n }, false);\n\n /* Scroll event */\n this._element.addEventListener(\"wheel\", (ev) => {\n self._onWheel(ev);\n }, false);\n\n /* Touch events */\n this._element.addEventListener(\"touchstart\", (ev) => {\n self._onTouchStart(ev);\n }, false);\n this._element.addEventListener(\"touchend\", (ev) => {\n self._onTouchEnd(ev);\n }, false);\n this._element.addEventListener(\"touchmove\", (ev) => {\n self._onTouchMove(ev);\n }, false);\n\n /* Context menu event, this will cause the context menu\n to no longer pop up on right clicks. */\n this._element.oncontextmenu = (ev) => {\n ev.preventDefault();\n return false;\n }\n }", "function _mozTouchEvents() {\n element.addEventListener('MozTouchDown',function(e){\n var t = e.touches[0];\n swipe_line.startX = t.screenX; \n swipe_line.startY = t.screenY;\n },false);\n element.addEventListener('MozTouchMove',function(e){\n e.preventDefault();\n var t = e.touches[0];\n swipe_line.endX = t.screenX;\n swipe_line.endY = t.screenY;\n if (optional.sticky) {\n element.style.top = (Number(element.style.top) + (swipe_line.endY - swipe_line.startY)).toString();\n element.style.left = (Number(element.style.top) + (swipe_line.endY - swipe_line.startY)).toString();\n }\n },false);\n element.addEventListener('MozTouchUp',function(e){\n let deltaX = swipe_line.endX - swipe_line.startX;\n let deltaY = swipe_line.endY - swipe_line.startY;\n\n // Minimum swipe distance\n if (deltaX ** 2 + deltaY ** 2 < deltaMin ** 2) {\n return\n }\n // detect horizontal\n if (deltaY === 0 || Math.abs(deltaX / deltaY) > 1) {\n direction = deltaX > 0 ? 'r' : 'l';\n }\n else {\n direction = deltaY > 0 ? 'u' : 'd';\n }\n\n if (direction && typeof callback === 'function') {\n if (direction == swipeDirection) {\n callbackFn(elementId, direction);\n }\n }\n\n direction = null;\n },false); \n }", "function touchHandler(event)\n{\n\tvar touches = event.changedTouches,\n\tfirst = touches[0],\n\ttype = \"\";\n\tswitch(event.type)\n\t{\n\t\tcase \"touchstart\": type = \"mousedown\"; break;\n\t\tcase \"touchmove\": type = \"mousemove\"; break; \n\t\tcase \"touchend\": type = \"mouseup\"; break;\n\t\tdefault: return;\n\t} \n\tif (touches.length > 1)\n\t{\n\t\ttype = \"mousedown\";\n\t}\n\tvar simulatedEvent = document.createEvent(\"MouseEvent\");\n\tsimulatedEvent.initMouseEvent(type, true, true, window, 1, \n\t\tfirst.screenX, first.screenY, \n\t\tfirst.clientX, first.clientY, false, \n\t\tfalse, false, false, touches.length-1, null);\n\tfirst.target.dispatchEvent(simulatedEvent);\n\tevent.preventDefault();\n}", "function reactionTouchMove (e) { \n if (!drag) return; // Abbrechen, falls Zugmodus nicht aktiviert\n var obj = e.changedTouches[0]; // Liste der neuen Fingerpositionen \n reactionMove(obj.clientX,obj.clientY); // Position ermitteln, rechnen und neu zeichnen\n e.preventDefault(); // Standardverhalten verhindern \n }", "function reactionTouchMove (e) { \n if (!drag) return; // Abbrechen, falls Zugmodus nicht aktiviert\n var obj = e.changedTouches[0]; // Liste der neuen Fingerpositionen \n reactionMove(obj.clientX,obj.clientY); // Position ermitteln, rechnen und neu zeichnen\n e.preventDefault(); // Standardverhalten verhindern \n }", "function reactionTouchMove (e) { \r\n if (!drag) return; // Abbrechen, falls Zugmodus nicht aktiviert\r\n var obj = e.changedTouches[0]; // Liste der neuen Fingerpositionen \r\n reactionMove(obj.clientX,obj.clientY); // Position ermitteln, rechnen und neu zeichnen\r\n e.preventDefault(); // Standardverhalten verhindern \r\n }", "function removeTouchHandler(){\n \t\t\tif(isTouchDevice || isTouch){\n \t\t\t\t//Microsoft pointers\n \t\t\t\tMSPointer = getMSPointer();\n\n \t\t\t\t$(document).off('touchstart ' + MSPointer.down);\n \t\t\t\t$(document).off('touchmove ' + MSPointer.move);\n \t\t\t}\n \t\t}", "attachPointerEvents() {\n var paneElement = this._pane.getContentElement();\n paneElement.addListener(\"pointerdown\", this.handlePointerDown, this);\n paneElement.addListener(\"tap\", this.handleTap, this);\n paneElement.addListener(\"pointerover\", this.handlePointerOver, this);\n paneElement.addListener(\"pointermove\", this.handlePointerMove, this);\n paneElement.addListener(\"losecapture\", this.handleLoseCapture, this);\n }", "function reactionTouchMove (e) { \r\n if (!drag) return; // Abbrechen, falls Zugmodus nicht aktiviert\r\n var obj = e.changedTouches[0]; // Liste der neuen Fingerpositionen, erster Punkt \r\n reactionMove(obj.clientX,obj.clientY); // Hilfsroutine aufrufen\r\n e.preventDefault(); // Standardverhalten verhindern \r\n }", "function touchMoved() {\n return false;\n}", "function removeTouchHandler(){\n if(isTouchDevice || isTouch){\n //Microsoft pointers\n var MSPointer = getMSPointer();\n\n $(WRAPPER_SEL).off('touchstart ' + MSPointer.down);\n $(WRAPPER_SEL).off('touchmove ' + MSPointer.move);\n }\n }", "function removeTouchHandler(){\n if(isTouchDevice || isTouch){\n //Microsoft pointers\n var MSPointer = getMSPointer();\n\n $(WRAPPER_SEL).off('touchstart ' + MSPointer.down);\n $(WRAPPER_SEL).off('touchmove ' + MSPointer.move);\n }\n }", "function remapEvent(eventName, globalObj) {\n if (globalObj === void 0) { globalObj = window; }\n if (!(\"ontouchstart\" in globalObj.document)) {\n switch (eventName) {\n case \"touchstart\":\n return \"pointerdown\";\n case \"touchmove\":\n return \"pointermove\";\n case \"touchend\":\n return \"pointerup\";\n default:\n return eventName;\n }\n }\n return eventName;\n}", "function listenAndPostTouchMessages_() {\n document.addEventListener('touchstart', copyTouchAndPostMessage_, false);\n document.addEventListener('touchend', copyTouchAndPostMessage_, false);\n document.addEventListener('touchmove', copyTouchAndPostMessage_, false);\n}", "function addInitialPointerMoveListeners() {\n document.addEventListener('mousemove', onInitialPointerMove);\n document.addEventListener('mousedown', onInitialPointerMove);\n document.addEventListener('mouseup', onInitialPointerMove);\n document.addEventListener('pointermove', onInitialPointerMove);\n document.addEventListener('pointerdown', onInitialPointerMove);\n document.addEventListener('pointerup', onInitialPointerMove);\n document.addEventListener('touchmove', onInitialPointerMove);\n document.addEventListener('touchstart', onInitialPointerMove);\n document.addEventListener('touchend', onInitialPointerMove);\n }", "handletouchstart(e) {\n var touch = e.touches[0];\n var mouseEvent = new MouseEvent(\"mousedown\", {\n clientX: touch.clientX,\n clientY: touch.clientY\n })\n this.canvas.dispatchEvent(mouseEvent);\n e.preventDefault();\n }", "function onTouch(elementSelector, callback) {\n elementSelector.addEventListener('touchend', function(evt) {\n evt.stopImmediatePropagation();\n evt.preventDefault();\n callback()});\n}", "function addInitialPointerMoveListeners() {\n document.addEventListener('mousemove', onInitialPointerMove);\n document.addEventListener('mousedown', onInitialPointerMove);\n document.addEventListener('mouseup', onInitialPointerMove);\n document.addEventListener('pointermove', onInitialPointerMove);\n document.addEventListener('pointerdown', onInitialPointerMove);\n document.addEventListener('pointerup', onInitialPointerMove);\n document.addEventListener('touchmove', onInitialPointerMove);\n document.addEventListener('touchstart', onInitialPointerMove);\n document.addEventListener('touchend', onInitialPointerMove);\n }", "function addInitialPointerMoveListeners() {\n document.addEventListener('mousemove', onInitialPointerMove);\n document.addEventListener('mousedown', onInitialPointerMove);\n document.addEventListener('mouseup', onInitialPointerMove);\n document.addEventListener('pointermove', onInitialPointerMove);\n document.addEventListener('pointerdown', onInitialPointerMove);\n document.addEventListener('pointerup', onInitialPointerMove);\n document.addEventListener('touchmove', onInitialPointerMove);\n document.addEventListener('touchstart', onInitialPointerMove);\n document.addEventListener('touchend', onInitialPointerMove);\n }", "function addInitialPointerMoveListeners() {\n document.addEventListener('mousemove', onInitialPointerMove);\n document.addEventListener('mousedown', onInitialPointerMove);\n document.addEventListener('mouseup', onInitialPointerMove);\n document.addEventListener('pointermove', onInitialPointerMove);\n document.addEventListener('pointerdown', onInitialPointerMove);\n document.addEventListener('pointerup', onInitialPointerMove);\n document.addEventListener('touchmove', onInitialPointerMove);\n document.addEventListener('touchstart', onInitialPointerMove);\n document.addEventListener('touchend', onInitialPointerMove);\n }", "function addTouchHandler(canvas) {\n canvas.addEventListener('touchmove', onTouchMove, false);\n canvas.addEventListener('touchend', onTouchEnd, false);\n canvas.addEventListener('touchstart', onTouchStart, false);\n canvas.addEventListener('touchleave', onTouchEnd, false);\n}", "function _touchEvents() {\n element.addEventListener('touchstart',function(e){\n var t = e.touches[0];\n swipe_line.startX = t.screenX; \n swipe_line.startY = t.screenY;\n },false);\n\n element.addEventListener('touchmove',function(e){\n e.preventDefault();\n var t = e.touches[0];\n swipe_line.endX = t.screenX;\n swipe_line.endY = t.screenY;\n if (optional.sticky) {\n element.style.top = (Number(element.style.top) + (swipe_line.endY - swipe_line.startY)).toString();\n element.style.left = (Number(element.style.top) + (swipe_line.endY - swipe_line.startY)).toString();\n }\n },false);\n\n element.addEventListener('touchend',function(e){\n let deltaX = swipe_line.endX - swipe_line.startX;\n let deltaY = swipe_line.endY - swipe_line.startY;\n\n // Minimum swipe distance\n if (deltaX ** 2 + deltaY ** 2 < deltaMin ** 2) {\n return\n }\n // detect horizontal\n if (deltaY === 0 || Math.abs(deltaX / deltaY) > 1) {\n direction = deltaX > 0 ? 'r' : 'l';\n }\n else {\n direction = deltaY > 0 ? 'u' : 'd';\n }\n\n if (direction && typeof callback === 'function') {\n callbackFn(elementId, direction);\n }\n\n direction = null;\n },false); \n\n\n // touch events for Firefox\n function _mozTouchEvents() {\n element.addEventListener('MozTouchDown',function(e){\n var t = e.touches[0];\n swipe_line.startX = t.screenX; \n swipe_line.startY = t.screenY;\n },false);\n element.addEventListener('MozTouchMove',function(e){\n e.preventDefault();\n var t = e.touches[0];\n swipe_line.endX = t.screenX;\n swipe_line.endY = t.screenY;\n if (optional.sticky) {\n element.style.top = (Number(element.style.top) + (swipe_line.endY - swipe_line.startY)).toString();\n element.style.left = (Number(element.style.top) + (swipe_line.endY - swipe_line.startY)).toString();\n }\n },false);\n element.addEventListener('MozTouchUp',function(e){\n let deltaX = swipe_line.endX - swipe_line.startX;\n let deltaY = swipe_line.endY - swipe_line.startY;\n\n // Minimum swipe distance\n if (deltaX ** 2 + deltaY ** 2 < deltaMin ** 2) {\n return\n }\n // detect horizontal\n if (deltaY === 0 || Math.abs(deltaX / deltaY) > 1) {\n direction = deltaX > 0 ? 'r' : 'l';\n }\n else {\n direction = deltaY > 0 ? 'u' : 'd';\n }\n\n if (direction && typeof callback === 'function') {\n if (direction == swipeDirection) {\n callbackFn(elementId, direction);\n }\n }\n\n direction = null;\n },false); \n }\n\n _touchEvents();\n _mozTouchEvents();\n }", "function touchMove(e) {\n if (e.target == canvas) {\n e.preventDefault();\n putPoint(e);\n }\n }", "function onPointerUp(event) {\n\n if (event.pointerType === event.MSPOINTER_TYPE_TOUCH) {\n event.touches = [{clientX: event.clientX, clientY: event.clientY}];\n onTouchEnd(event);\n }\n\n }", "function fixEvent ( e, pageOffset ) {\n\n\t\t// Filter the event to register the type, which can be\n\t\t// touch, mouse or pointer. Offset changes need to be\n\t\t// made on an event specific basis.\n\t\tvar touch = e.type.indexOf('touch') === 0;\n\t\tvar mouse = e.type.indexOf('mouse') === 0;\n\t\tvar pointer = e.type.indexOf('pointer') === 0;\n\n\t\tvar x;\n\t\tvar y;\n\n\t\t// IE10 implemented pointer events with a prefix;\n\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\n\t\t\tpointer = true;\n\t\t}\n\n\t\tif ( touch ) {\n\n\t\t\t// Fix bug when user touches with two or more fingers on mobile devices.\n\t\t\t// It's useful when you have two or more sliders on one page,\n\t\t\t// that can be touched simultaneously.\n\t\t\t// #649, #663, #668\n\t\t\tif ( e.touches.length > 1 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// noUiSlider supports one movement at a time,\n\t\t\t// so we can select the first 'changedTouch'.\n\t\t\tx = e.changedTouches[0].pageX;\n\t\t\ty = e.changedTouches[0].pageY;\n\t\t}\n\n\t\tpageOffset = pageOffset || getPageOffset(scope_Document);\n\n\t\tif ( mouse || pointer ) {\n\t\t\tx = e.clientX + pageOffset.x;\n\t\t\ty = e.clientY + pageOffset.y;\n\t\t}\n\n\t\te.pageOffset = pageOffset;\n\t\te.points = [x, y];\n\t\te.cursor = mouse || pointer; // Fix #435\n\n\t\treturn e;\n\t}", "function touchMoved() {\n // do some stuff\n return false;\n}", "function touchMoved() {\n // do some stuff\n return false;\n}", "function touchMoved() {\n // do some stuff\n return false;\n}", "function hasTouchSupport(){var support={},events=['touchstart','touchmove','touchend'],el=document.createElement('div'),i;try{for(i=0;i<events.length;i++){var eventName=events[i];eventName='on'+eventName;var isSupported=eventName in el;if(!isSupported){el.setAttribute(eventName,'return;');isSupported=typeof el[eventName]=='function';}support[events[i]]=isSupported;}return support.touchstart&&support.touchend&&support.touchmove;}catch(err){return false;}}", "function isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n} // ==============================", "function isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n} // ==============================", "function isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n} // ==============================" ]
[ "0.73415434", "0.68891567", "0.6790321", "0.6669735", "0.6660753", "0.66408986", "0.6598859", "0.6598859", "0.6546387", "0.6529521", "0.65277207", "0.65174687", "0.65174687", "0.65174687", "0.6510102", "0.6507102", "0.6498997", "0.64864516", "0.6477503", "0.6437029", "0.64297324", "0.64170665", "0.641678", "0.638621", "0.6370811", "0.6370811", "0.6370811", "0.6364569", "0.6361466", "0.6358037", "0.6350425", "0.6347317", "0.6347317", "0.63348454", "0.63084924", "0.62878084", "0.62878084", "0.62878084", "0.62878084", "0.62878084", "0.62878084", "0.62878084", "0.62878084", "0.6275482", "0.6260138", "0.6260138", "0.6260138", "0.6260138", "0.6260138", "0.6255452", "0.6255452", "0.6255452", "0.62537444", "0.62537444", "0.62206566", "0.62180144", "0.62000954", "0.6177205", "0.61649257", "0.6151016", "0.61466986", "0.61465955", "0.6146325", "0.6135939", "0.6130065", "0.61228365", "0.6090473", "0.60878", "0.6087677", "0.6071925", "0.6071925", "0.6054886", "0.60522896", "0.6046416", "0.60317457", "0.602564", "0.6022113", "0.6022113", "0.6017847", "0.6016676", "0.6005912", "0.60002786", "0.59955335", "0.59844196", "0.59844196", "0.59844196", "0.5983578", "0.59834135", "0.59736466", "0.5960488", "0.5952917", "0.5951725", "0.5951725", "0.5951725", "0.5936549", "0.59345406", "0.59345406", "0.59345406" ]
0.62038547
58
Choose the correct transform property to use on the current browser.
function getTransformPropertyName() { var globalObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window; var forceRefresh = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; if (storedTransformPropertyName_ === undefined || forceRefresh) { var el = globalObj.document.createElement('div'); var transformPropertyName = 'transform' in el.style ? 'transform' : '-webkit-transform'; storedTransformPropertyName_ = transformPropertyName; } return storedTransformPropertyName_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detectTransformProperty() {\n var transformProperty = 'transform',\n safariPropertyHack = 'webkitTransform';\n if (typeof document.body.style[transformProperty] !== 'undefined') {\n\n ['webkit', 'moz', 'o', 'ms'].every(function (prefix) {\n var e = '-' + prefix + '-transform';\n if (typeof document.body.style[e] !== 'undefined') {\n transformProperty = e;\n return false;\n }\n return true;\n });\n } else if (typeof document.body.style[safariPropertyHack] !== 'undefined') {\n transformProperty = '-webkit-transform';\n } else {\n transformProperty = undefined;\n }\n return transformProperty;\n }", "function detectTransformProperty() {\n var transformProperty = 'transform',\n safariPropertyHack = 'webkitTransform';\n if (typeof document.body.style[transformProperty] !== 'undefined') {\n\n ['webkit', 'moz', 'o', 'ms'].every(function (prefix) {\n var e = '-' + prefix + '-transform';\n if (typeof document.body.style[e] !== 'undefined') {\n transformProperty = e;\n return false;\n }\n return true;\n });\n } else if (typeof document.body.style[safariPropertyHack] !== 'undefined') {\n transformProperty = '-webkit-transform';\n } else {\n transformProperty = undefined;\n }\n return transformProperty;\n }", "function getTransformProperty(element)\n {\n // Try transform first for forward compatibility\n // In some versions of IE9, it is critical for msTransform to be in\n // this list before MozTranform.\n var properties = ['transform', 'WebkitTransform', 'msTransform', 'MozTransform', 'OTransform'];\n var p;\n while (p = properties.shift())\n {\n if (typeof element.style[p] != 'undefined')\n {\n return p;\n }\n }\n\n // Default to transform also\n return 'transform';\n }", "function getTransformProperty(element)\n {\n // Try transform first for forward compatibility\n // In some versions of IE9, it is critical for msTransform to be in\n // this list before MozTranform.\n var properties = ['transform', 'WebkitTransform', 'msTransform', 'MozTransform', 'OTransform'];\n var p;\n while (p = properties.shift())\n {\n if (typeof element.style[p] != 'undefined')\n {\n return p;\n }\n }\n \n // Default to transform also\n return 'transform';\n }", "function getTransformProperty(element)\n {\n // Try transform first for forward compatibility\n // In some versions of IE9, it is critical for msTransform to be in\n // this list before MozTranform.\n var properties = ['transform', 'WebkitTransform', 'msTransform', 'MozTransform', 'OTransform'];\n var p;\n while (p = properties.shift())\n {\n if (typeof element.style[p] != 'undefined')\n {\n return p;\n }\n }\n \n // Default to transform also\n return 'transform';\n }", "function getTransformProperty(element)\n {\n // Try transform first for forward compatibility\n var properties = ['transform', 'WebkitTransform', 'MozTransform'];\n var p;\n while (p = properties.shift())\n {\n if (typeof element.style[p] != 'undefined')\n {\n return p;\n }\n }\n \n // Default to transform also\n return 'transform';\n }", "function transform(el, value) {\n el.style['transform'] = value;\n el.style['webkitTransform'] = value;\n}", "function getTransform() {\n \n if(\"WebkitTransform\" in temp) {\n \n return \"WebkitTransform\";\n \n }\n else if(\"MozTransform\" in temp) {\n \n return \"MozTransform\";\n \n }\n else if(\"msTransform\" in temp) {\n \n return \"msTransform\";\n \n }\n else if(\"transform\" in temp) {\n \n return \"transform\";\n \n }\n \n return null;\n \n }", "function setTransform(element, value) {\n element.style[\"WebkitTransform\"] = value;\n element.style[\"webkitTransform\"] = value; // I'm not even sure if it's `Webkit` or `webkit`\n element.style[\"MozTransform\"] = value;\n element.style[\"MSTransform\"] = value;\n element.style[\"OTransform\"] = value;\n element.style.transform = value;\n }", "function getTransformProperty(element) {\n\t var properties = [\n\t 'transform',\n\t 'WebkitTransform',\n\t 'msTransform',\n\t 'MozTransform',\n\t 'OTransform'\n\t ];\n\t var p;\n\t while (p = properties.shift()) {\n\t if (typeof element.style[p] != 'undefined') {\n\t return p;\n\t }\n\t }\n\t return false;\n\t}", "function Browser_SetRotationTransformOrigin(theHTML, strTransformOrigin)\n{\n\t//switch according to browser\n\tswitch (window.__BROWSER_TYPE)\n\t{\n\t\tcase __BROWSER_IE:\n\t\t\t//use the ms transform\n\t\t\ttheHTML.style.msTransformOrigin = strTransformOrigin;\n\t\t\ttheHTML.style.transformOrigin = strTransformOrigin;\n\t\t\tbreak;\n\t\tcase __BROWSER_FF:\n\t\t\t//use the moz transform\n\t\t\ttheHTML.style.MozTransformOrigin = strTransformOrigin;\n\t\t\tbreak;\n\t\tcase __BROWSER_CHROME:\n\t\tcase __BROWSER_SAFARI:\n\t\t\t//use the webkit transform\n\t\t\ttheHTML.style.webkitTransformOrigin = strTransformOrigin;\n\t\t\tbreak;\n\t\tcase __BROWSER_OPERA:\n\t\t\t//use the transform\n\t\t\ttheHTML.style.OTransformOrigin = strTransformOrigin;\n\t\t\tbreak;\n\t}\n}", "_setTransform(transform){\n this._element.setAttribute('transform',transform);\n }", "function transform( el, value ) {\n\tvar style = el.style;\n\n\tstyle.transform = value;\n\tstyle.webkitTransform = value;\n\tstyle.oTransform = value;\n\tstyle.msTransform = value;\n}", "function setOrigin()\n {\n vm.moverStyle['-webkit-transform'] =\n vm.moverStyle['-ms-transform'] =\n vm.moverStyle.transform =\n vm.themeStyle.transform;\n //vm.element.tag == 'text' ? vm.element.style.transform : vm.themeStyle.transform;\n }", "function getTransformFloat (transformProperty) {\n\t\t return parseFloat(CSS.getPropertyValue(element, transformProperty));\n\t\t }", "function ripple_transform(el, value) {\n el.style['transform'] = value;\n el.style['webkitTransform'] = value;\n}", "function getTransformPropertyName(globalObj = window, forceRefresh = false) {\n if (storedTransformPropertyName_ === undefined || forceRefresh) {\n const el = globalObj.document.createElement('div');\n const transformPropertyName = ('transform' in el.style ? 'transform' : '-webkit-transform');\n storedTransformPropertyName_ = transformPropertyName;\n }\n\n return storedTransformPropertyName_;\n}", "function getTransformPropertyName(globalObj = window, forceRefresh = false) {\n if (storedTransformPropertyName_ === undefined || forceRefresh) {\n const el = globalObj.document.createElement('div');\n const transformPropertyName = ('transform' in el.style ? 'transform' : '-webkit-transform');\n storedTransformPropertyName_ = transformPropertyName;\n }\n\n return storedTransformPropertyName_;\n}", "function getTransformFloat (transformProperty) {\n\t return parseFloat(CSS.getPropertyValue(element, transformProperty));\n\t }", "function getTransformFloat (transformProperty) {\n\t return parseFloat(CSS.getPropertyValue(element, transformProperty));\n\t }", "function getTransformFloat (transformProperty) {\n\t return parseFloat(CSS.getPropertyValue(element, transformProperty));\n\t }", "function Browser_SetRotationTransform(theHTML, nRotation)\n{\n\t//switch according to browser\n\tswitch (window.__BROWSER_TYPE)\n\t{\n\t\tcase __BROWSER_IE:\n\t\t\t//bad browser\n\t\t\tif (window.__BROWSER_IE8_OR_LESS)\n\t\t\t{\n\t\t\t\t{\n\t\t\t\t\t//convert to rads\n\t\t\t\t\tnRotation = nRotation * Math.PI * 2 / 360;\n\t\t\t\t\t//get the values\n\t\t\t\t\tvar m11 = Math.cos(nRotation);\n\t\t\t\t\tvar m12 = -Math.sin(nRotation);\n\t\t\t\t\tvar m21 = Math.sin(nRotation);\n\t\t\t\t\tvar m22 = Math.cos(nRotation);\n\t\t\t\t\t//use a filter\n\t\t\t\t\ttheHTML.style.filter = \"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand',Dx=232, Dy=22, M11=\" + m11 + \", M12=\" + m12 + \", M21=\" + m21 + \", M22=\" + m22 + \")\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t//good browser?\n\t\t\telse\n\t\t\t{\n\t\t\t\t//use the ms transform\n\t\t\t\ttheHTML.style.msTransform = \"rotate(\" + nRotation + \"deg)\";\n\t\t\t\ttheHTML.style.transform = \"rotate(\" + nRotation + \"deg)\";\n\t\t\t}\n\t\t\tbreak;\n\t\tcase __BROWSER_FF:\n\t\t\t//use the moz transform\n\t\t\ttheHTML.style.MozTransform = \"rotate(\" + nRotation + \"deg)\";\n\t\t\tbreak;\n\t\tcase __BROWSER_CHROME:\n\t\tcase __BROWSER_SAFARI:\n\t\t\t//use the webkit transform\n\t\t\ttheHTML.style.webkitTransform = \"rotate(\" + nRotation + \"deg)\";\n\t\t\tbreak;\n\t\tcase __BROWSER_OPERA:\n\t\t\t//use the transform\n\t\t\ttheHTML.style.OTransform = \"rotate(\" + nRotation + \"deg)\";\n\t\t\tbreak;\n\t}\n}", "function setRotation()\n {\n vm.moverStyle['-ms-transform'] = vm.moverStyle['-webkit-transform'] = vm.moverStyle.transform = vm.themeStyle.transform;\n }", "function setTransform(svgId, transform) {\n if (isMsiBrowser()) {\n $(svgId).css(\"transform-origin\", \"top left\");\n $(svgId).css(\"transform\", transform);\n } else {\n $(svgId).attr(\"transform-origin\", \"top left\");\n $(svgId).attr(\"transform\", transform);\n }\n}", "function getTransformFloat (transformProperty) {\n return parseFloat(CSS.getPropertyValue(element, transformProperty));\n }", "function getTransformFloat (transformProperty) {\n return parseFloat(CSS.getPropertyValue(element, transformProperty));\n }", "function getTransformFloat (transformProperty) {\n return parseFloat(CSS.getPropertyValue(element, transformProperty));\n }", "function getTransformFloat (transformProperty) {\n return parseFloat(CSS.getPropertyValue(element, transformProperty));\n }", "function getTransformFloat (transformProperty) {\n return parseFloat(CSS.getPropertyValue(element, transformProperty));\n }", "function getTransformPropertyName(globalObj, forceRefresh) {\n if (forceRefresh === void 0) { forceRefresh = false; }\n if (cachedCssTransformPropertyName_ === undefined || forceRefresh) {\n var el = globalObj.document.createElement('div');\n cachedCssTransformPropertyName_ = 'transform' in el.style ? 'transform' : 'webkitTransform';\n }\n return cachedCssTransformPropertyName_;\n}", "function getTransformFloat (transformProperty) {\n return parseFloat(CSS.getPropertyValue(element, transformProperty));\n }", "function getTransformPropertyName(globalObj, forceRefresh) {\n if (forceRefresh === void 0) { forceRefresh = false; }\n if (cachedCssTransformPropertyName_ === undefined || forceRefresh) {\n var el = globalObj.document.createElement('div');\n cachedCssTransformPropertyName_ = 'transform' in el.style ? 'transform' : 'webkitTransform';\n }\n return cachedCssTransformPropertyName_;\n }", "function transformElement( element, transform ) {\n\n element.style.WebkitTransform = transform;\n element.style.MozTransform = transform;\n element.style.msTransform = transform;\n element.style.OTransform = transform;\n element.style.transform = transform;\n\n}", "function setTransform(target, transform) {\n\n\t\t\ttarget.css({'-webkit-transform': transform, \n\t\t\t'-moz-transform': transform,\n\t\t\t'-ms-transform':transform,\n\t\t\t'-o-transform': transform,\n\t\t\t'transform': transform});\n\t\t}", "function getMatrix(obj) {\n\t\t var matrix = obj.css(\"-webkit-transform\") ||\n\t\t obj.css(\"-moz-transform\") ||\n\t\t obj.css(\"-ms-transform\") ||\n\t\t obj.css(\"-o-transform\") ||\n\t\t obj.css(\"transform\");\n\t\t return matrix;\n\t\t}", "function getMatrix(obj) {\n\t\t var matrix = obj.css(\"-webkit-transform\") ||\n\t\t obj.css(\"-moz-transform\") ||\n\t\t obj.css(\"-ms-transform\") ||\n\t\t obj.css(\"-o-transform\") ||\n\t\t obj.css(\"transform\");\n\t\t return matrix;\n\t\t}", "function getMatrix(obj) {\n\t\t var matrix = obj.css(\"-webkit-transform\") ||\n\t\t obj.css(\"-moz-transform\") ||\n\t\t obj.css(\"-ms-transform\") ||\n\t\t obj.css(\"-o-transform\") ||\n\t\t obj.css(\"transform\");\n\t\t return matrix;\n\t\t}", "cssToMatrix(elementId) {\n const element = document.getElementById(elementId),\n style = window.getComputedStyle(element)\n\n return style.getPropertyValue(\"-webkit-transform\") ||\n style.getPropertyValue(\"-moz-transform\") ||\n style.getPropertyValue(\"-ms-transform\") ||\n style.getPropertyValue(\"-o-transform\") ||\n style.getPropertyValue(\"transform\");\n\n\t }", "cssToMatrix(elementId) {\n const element = document.getElementById(elementId),\n style = window.getComputedStyle(element)\n\n return style.getPropertyValue(\"-webkit-transform\") ||\n style.getPropertyValue(\"-moz-transform\") ||\n style.getPropertyValue(\"-ms-transform\") ||\n style.getPropertyValue(\"-o-transform\") ||\n style.getPropertyValue(\"transform\");\n\n\t }", "function getTransformPropertyName(globalObj, forceRefresh) {\n if (globalObj === void 0) { globalObj = window; }\n if (forceRefresh === void 0) { forceRefresh = false; }\n if (_storedTransformPropertyName === undefined || forceRefresh) {\n var el = globalObj.document.createElement(\"div\");\n var transformPropertyName = (\"transform\" in el.style ? \"transform\" : \"-webkit-transform\");\n _storedTransformPropertyName = transformPropertyName;\n }\n return _storedTransformPropertyName;\n}", "function applyCssTransform(element, transformValue) {\n // It's important to trim the result, because the browser will ignore the set operation\n // if the string contains only whitespace.\n var value = transformValue.trim();\n element.style.transform = value;\n element.style.webkitTransform = value;\n}", "function getTransformPropertyName(globalObj) {\n var forceRefresh = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (storedTransformPropertyName_ === undefined || forceRefresh) {\n var el = globalObj.document.createElement('div');\n var transformPropertyName = 'transform' in el.style ? 'transform' : 'webkitTransform';\n storedTransformPropertyName_ = transformPropertyName;\n }\n\n return storedTransformPropertyName_;\n}", "_primaryTransform() {\n // We use a 3d transform to work around some rendering issues in iOS Safari. See #19328.\n const scale = this.value / 100;\n return { transform: `scale3d(${scale}, 1, 1)` };\n }", "function checkTransform3dSupport() {\n div.style[support.transform] = '';\n div.style[support.transform] = 'rotateY(90deg)';\n return div.style[support.transform] !== '';\n }", "function checkTransform3dSupport() {\n div.style[support.transform] = '';\n div.style[support.transform] = 'rotateY(90deg)';\n return div.style[support.transform] !== '';\n }", "function getTransform(translateTop, translateLeft, rotate, scale) {\n if (isMsiBrowser()) {\n return ( \"transform\",\n \"translate(\" + translateLeft + \"px,\" + translateTop + \"px)\" + \" scale(\" + scale + \",\" + scale + \")\" + \" rotate(\" + rotate + \"deg)\");\n } else {\n return ( \"translate(\" + translateLeft + \",\" + translateTop + \")\" + \" scale(\" + scale + \",\" + scale + \")\" + \" rotate(\" + rotate + \")\");\n }\n}", "function setBrowserSpecificProperty(prop) {\n var style = document.body.style; // No reason for this particular tag, just want the style\n var prefixes = ['Webkit', 'Moz', 'O', 'ms', 'Khtml'];\n var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1);\n var props = prefixes.map(function(prefix){return prefix + ucProp;}).concat(prop);\n\n for (var i in props) {\n if (style[props[i]] !== undefined) {\n return props[i];\n }\n }\n }", "function checkTransform3dSupport() {\n\t div.style[support.transform] = '';\n\t div.style[support.transform] = 'rotateY(90deg)';\n\t return div.style[support.transform] !== '';\n\t }", "getDomTransform() {\n return Math.ceil(getComputedStyle(this.characterChild).transform.split(',')[this.splitNum]) + this.calculateWithDif();\n }", "function getTransform(el) {\n // @ts-ignore\n var transform = window.getComputedStyle(el)[transformProperty];\n if (!transform || transform === 'none') {\n transform = 'matrix(1, 0, 0, 1, 0, 0)';\n }\n return transform.replace(/\\(|\\)|matrix|\\s+/g, '').split(',');\n}", "function checkTransform3dSupport() {\n div.style[support.transform] = '';\n div.style[support.transform] = 'rotateY(90deg)';\n return div.style[support.transform] !== '';\n }", "function checkTransform3dSupport() {\n div.style[support.transform] = '';\n div.style[support.transform] = 'rotateY(90deg)';\n return div.style[support.transform] !== '';\n }", "getElemTransformMatrix(elem) {\n const matrix =\n elem.css('-webkit-transform') ||\n elem.css('-moz-transform') ||\n elem.css('-ms-transform') ||\n elem.css('-o-transform') ||\n elem.css('transform');\n\n // JavaScript returns a \"none\" string if there is not transform... so\n // let's return null instead so we can check for existence later.\n if (matrix !== 'none') {\n return matrix;\n } else {\n return null;\n }\n }", "function getTransform(elem) {\r\n const computedStyle = getComputedStyle(elem, null);\r\n const val = computedStyle.transform;\r\n const matrix = parseMatrix(val);\r\n const rotateY = Math.asin(-matrix.m13)\r\n const rotateX = Math.atan2(matrix.m23, matrix.m33);\r\n const rotateZ = Math.atan2(matrix.m12, matrix.m11);\r\n return {\r\n transformStyle: val,\r\n matrix: matrix,\r\n rotate: {\r\n x: rotateX,\r\n y: rotateY,\r\n z: rotateZ\r\n },\r\n translate: {\r\n x: matrix.m41,\r\n y: matrix.m42,\r\n z: matrix.m43\r\n }\r\n };\r\n}", "function getTransform(x, y) {\n // Round the transforms since some browsers will\n // blur the elements for sub-pixel transforms.\n return \"translate3d(\".concat(Math.round(x), \"px, \").concat(Math.round(y), \"px, 0)\");\n }", "_applyTransform() {\n this.wrapper.style.transform = [\n 'translateX(-50%)',\n `translateX(${this._translate})`,\n ].join(' ');\n }", "getTransform(){return this.__transform}", "set transform(value) {}", "set transform(value) {}", "set transform(value) {}", "set transform(value) {}", "function setTransform(el, offset, scale) {\n var pos = offset || new Point(0, 0);\n el.style[TRANSFORM] = (ie3d ? 'translate(' + pos.x + 'px,' + pos.y + 'px)' : 'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') + (scale ? ' scale(' + scale + ')' : '');\n } // @function setPosition(el: HTMLElement, position: Point)", "function setTransform(which,x,y){\n\tdocument.getElementById(which).setAttributeNS(null,'transform','translate('+x+','+y+')');\n}", "function set_translation(elem, x, y)\n{\n elem.style.OTransform =\n elem.style.MozTransform =\n \"translate({0}px, {1}px)\".fmt(x, y);\n elem.style.WebkitTransform = \"translate3d({0}px, {1}px, 0)\".fmt(x, y);\n}", "setTransform() {\n var plus = (1 + Math.cos(this.turnover * Math.PI / 2)) / 2;\n var minus = (-1 + Math.cos(this.turnover * Math.PI / 2)) / 2;\n var cos = Math.cos(this.deg / 180 * Math.PI);\n var sin = Math.sin(this.deg / 180 * Math.PI);\n var a = plus * cos - minus * sin;\n var b = plus * sin + minus * cos;\n var c = minus * cos - plus * sin;\n var d = minus * sin + plus * cos;\n var s = 'matrix(' + a + ', ' + b + ', ' + c + ', ' + d + ', 0, 0)';\n this.canvas.style.transform = s;\n this.back.style.transform = s;\n }", "function getTranslate(element) {\n var transform = element.css('-webkit-transform') || element.css('-ms-transform') || element.css('-moz-transform') || \n element.css('-o-transform') || element.css('transform');\n var matrix = transform.substr(7, transform.length - 8).split(', ');\n\n return { x: parseFloat(matrix[4]) || 0, y: parseFloat(matrix[5]) || 0 };\n }", "function testProp(props) {\n var style = document.documentElement.style;\n\n for (var i = 0; i < props.length; i++) {\n if (props[i] in style) {\n return props[i];\n }\n }\n\n return false;\n } // @function setTransform(el: HTMLElement, offset: Point, scale?: Number)", "function getTransforms(translate3d){\r\n return {\r\n '-webkit-transform': translate3d,\r\n '-moz-transform': translate3d,\r\n '-ms-transform':translate3d,\r\n 'transform': translate3d\r\n };\r\n }", "function getTransforms(translate3d){\r\n return {\r\n '-webkit-transform': translate3d,\r\n '-moz-transform': translate3d,\r\n '-ms-transform':translate3d,\r\n 'transform': translate3d\r\n };\r\n }", "function getTransforms(translate3d){\r\n return {\r\n '-webkit-transform': translate3d,\r\n '-moz-transform': translate3d,\r\n '-ms-transform':translate3d,\r\n 'transform': translate3d\r\n };\r\n }", "function getTransforms(translate3d){\r\n return {\r\n '-webkit-transform': translate3d,\r\n '-moz-transform': translate3d,\r\n '-ms-transform':translate3d,\r\n 'transform': translate3d\r\n };\r\n }", "function getTransforms(translate3d){\r\n return {\r\n '-webkit-transform': translate3d,\r\n '-moz-transform': translate3d,\r\n '-ms-transform':translate3d,\r\n 'transform': translate3d\r\n };\r\n }", "function getTransformValues(el) {\r\n var st = window.getComputedStyle(el, null); // sometimes returns null\r\n var tr = st && st.getPropertyValue(\"-webkit-transform\") ||\r\n st && st.getPropertyValue(\"-moz-transform\") ||\r\n st && st.getPropertyValue(\"-ms-transform\") ||\r\n st && st.getPropertyValue(\"-o-transform\") ||\r\n st && st.getPropertyValue(\"transform\") ||\r\n \"fail...\";\r\n \r\n // rotation matrix - http://en.wikipedia.org/wiki/Rotation_matrix\r\n if (tr === undefined || tr == \"none\" || tr == \"fail...\") {\r\n return {\r\n scale: 1.0,\r\n angle: 0\r\n }\r\n }\r\n var values = tr.split('(')[1];\r\n values = values.split(')')[0];\r\n values = values.split(',');\r\n var a = values[0];\r\n var b = values[1];\r\n var c = values[2];\r\n var d = values[3];\r\n \r\n return {\r\n scale: Math.sqrt(a*a + b*b),\r\n angle: Math.round(Math.atan2(b,a) * (180/Math.PI))\r\n }\r\n }", "function transform3dTest() {\n var mqProp = \"transform-3d\",\n vendors = [ \"Webkit\", \"Moz\", \"O\" ],\n // Because the `translate3d` test below throws false positives in Android:\n ret = media(\"(-\" + vendors.join(\"-\" + mqProp + \"),(-\") + \"-\" + mqProp + \"),(\" + mqProp + \")\");\n\n if (ret) {\n return !!ret;\n }\n\n var el = $window.document.createElement(\"div\"),\n transforms = {\n // We’re omitting Opera for the time being; MS uses unprefixed.\n 'MozTransform': '-moz-transform',\n 'transform': 'transform'\n };\n\n fakeBody.append(el);\n\n for (var t in transforms) {\n if (el.style[ t ] !== undefined) {\n el.style[ t ] = 'translate3d( 100px, 1px, 1px )';\n ret = window.getComputedStyle(el).getPropertyValue(transforms[ t ]);\n }\n }\n return ( !!ret && ret !== \"none\" );\n }", "function transElem(element, transform) {\n element.css('-webkit-transform', transform);\n element.css('-moz-transform', transform);\n element.css('-o-transform', transform);\n element.css('transform', transform);\n element.css('-ms-transform', transform);\n }", "static getTransform ({ x = null, y = null, zoom = null }) {\n const transforms = []\n if (x !== null || y !== null) {\n transforms.push(`translate3d(${x || 0}px,${y || 0}px,0)`)\n }\n if (zoom !== null) {\n transforms.push(`scale3d(${zoom},${zoom},1)`)\n }\n return { transform: transforms.length === 0 ? 'none' : transforms.join(' ') }\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function getTransforms(translate3d){\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform':translate3d,\n 'transform': translate3d\n };\n }", "function getTransform(elem) {\n var transform = elem.getAttribute('transform');\n if (transform === null) {\n return null;\n }\n return transformFromString(transform);\n}", "get transform() {}", "get transform() {}", "get transform() {}", "get transform() {}", "function testTransformsSupport() {\n var div = create('div');\n return typeof div.style.perspective !== 'undefined' || typeof div.style.webkitPerspective !== 'undefined';\n }", "function getTransX(elem) {\n var style = elem.style.transform || elem.style['-webkit-transform'];\n if (!style) return false;\n return Number(style.match(/translate3d\\((-?\\d+)px,/)[1]);\n}", "function getTransforms(translate3d) {\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform': translate3d,\n 'transform': translate3d\n };\n }", "function getTransforms(translate3d) {\n return {\n '-webkit-transform': translate3d,\n '-moz-transform': translate3d,\n '-ms-transform': translate3d,\n 'transform': translate3d\n };\n }", "function transform3dTest() {\n\tvar prop = \"transform-3d\";\n\treturn validStyle( 'perspective', '10px', 'moz' ) || $.mobile.media( \"(-\" + vendors.join( \"-\" + prop + \"),(-\" ) + \"-\" + prop + \"),(\" + prop + \")\" );\n}", "function fixTransforms(props, el) {\n // clone props at this state\n var propsCopy = {};\n for (var k in props) {\n propsCopy[k] = props[k];\n }\n\n var propVal;\n for (var p in props) {\n propVal = props[p];\n\n // if not a transform: translate, just move on\n if (p != 'transform' || !isTranslate(propVal)) {\n continue;\n }\n\n var x = null;\n var y = null;\n var xy = null;\n var xyz = null;\n\n propVal = propVal.substr(0, propVal.indexOf(')') + 1);\n\n if (startsWith(propVal, 'translateX(')) {\n x = propVal.match(/translateX\\((.*)\\)/)[1].trim();\n } else if (startsWith(propVal, 'translateY(')) {\n y = propVal.match(/translateY\\((.*)\\)/)[1].trim();\n } else if (startsWith(propVal, 'translate(')) {\n xy = propVal.match(/translate\\((.*)\\)/)[1].replace(' ', '').split(',');\n x = xy[0];\n y = xy[1];\n } else { // translate3d( --> X,Y,Z\n xyz = propVal.match(/translate3d\\((.*)\\)/)[1].replace(' ', '').split(',');\n x = xyz[0];\n y = xyz[1];\n }\n\n if (x) {\n var xVal = parseInt(x);\n var xUnits = x.replace(xVal.toString(), '');\n\n if (props.left && props.right && props.left != 'auto' && props.right != 'auto') {\n continue;\n }\n\n if (props.left && props.left != 'auto') {\n var left = props.left.trim();\n var leftVal = parseInt(left);\n var leftUnits = left.replace(leftVal.toString(), '');\n\n if (leftVal == 0|| isNaN(leftVal) || xUnits != leftUnits) {\n continue;\n }\n\n if (xUnits == 'px') {\n propsCopy.left = leftVal + xVal + 'px';\n } else if (xUnits == '%') {\n propsCopy.left = computeNewPctPos(el, 'left', leftVal, xVal);\n }\n } else if (props.right && props.right != 'auto') {\n var right = props.right.trim();\n var rightVal = parseInt(right);\n var rightUnits = right.replace(rightVal.toString(), '');\n\n if (rightVal == 0|| isNaN(rightVal) || xUnits != rightUnits) {\n continue;\n }\n\n xVal = -1 * xVal; // swap around signs\n\n if (xUnits == 'px') {\n propsCopy.right = rightVal + xVal + 'px';\n } else if (xUnits == '%') {\n propsCopy.right = computeNewPctPos(el, 'right', rightVal, xVal);\n }\n } else {\n propsCopy.left = x;\n }\n }\n\n if (y) {\n var yVal = parseInt(y);\n var yUnits = y.replace(yVal.toString(), '');\n\n if (props.top && props.bottom && props.top != 'auto' && props.bottom != 'auto') {\n continue;\n }\n\n if (props.top) {\n var top = props.top.trim();\n var topVal = parseInt(top);\n var topUnits = top.replace(topVal.toString(), '');\n\n if (topVal == 0|| isNaN(topVal) || yUnits != topUnits) {\n continue;\n }\n\n if (yUnits == 'px') {\n propsCopy.top = topVal + yVal + 'px';\n } else if (yUnits == '%') {\n propsCopy.top = computeNewPctPos(el, 'top', topVal, yVal);\n }\n } else if (props.bottom) {\n var bottom = props.bottom.trim();\n var bottomVal = parseInt(bottom);\n var bottomUnits = bottom.replace(bottomVal.toString(), '');\n\n if (bottomVal == 0|| isNaN(bottomVal) || yUnits != bottomUnits) {\n continue;\n }\n\n yVal = -1 * yVal; // swap around signs\n\n if (yUnits == 'px') {\n propsCopy.bottom = bottomVal + yVal + 'px';\n } else if (yUnits == '%') {\n propsCopy.bottom = computeNewPctPos(el, 'bottom', bottomVal, yVal);\n }\n } else {\n propsCopy.top = y;\n }\n }\n\n if (['relative', 'absolute', 'fixed'].indexOf(props['position']) == -1) {\n propsCopy.position = 'relative';\n }\n\n if (x || y) {\n continue;\n }\n }\n\n return propsCopy;\n}", "function recalcTransforms() {\n var fiftyPercent = Math.round(window.innerWidth / 2) + 'px';\n pointingRight = 'translateZ(-'+fiftyPercent+') rotateY(+90deg) translateZ(+'+fiftyPercent+')';\n pointingLeft = 'translateZ(-'+fiftyPercent+') rotateY(-90deg) translateZ(+'+fiftyPercent+')';\n pointingFront = 'translateZ(-'+fiftyPercent+') rotateY(0deg) translateZ(+'+fiftyPercent+')';\n}", "_setTransformOrigin(position) {\n if (!this._transformOriginSelector) {\n return;\n }\n const elements = this._boundingBox.querySelectorAll(this._transformOriginSelector);\n let xOrigin;\n let yOrigin = position.overlayY;\n if (position.overlayX === 'center') {\n xOrigin = 'center';\n }\n else if (this._isRtl()) {\n xOrigin = position.overlayX === 'start' ? 'right' : 'left';\n }\n else {\n xOrigin = position.overlayX === 'start' ? 'left' : 'right';\n }\n for (let i = 0; i < elements.length; i++) {\n elements[i].style.transformOrigin = `${xOrigin} ${yOrigin}`;\n }\n }", "_setTransformations() {\n\t\t// traverse items in the reversed order\n\t\tvar currentIndex = this._browserifyTransformations.length - 1;\n\n\t\twhile (currentIndex >= 0) {\n\t\t\tconst currentTransformation = this._browserifyTransformations[currentIndex];\n\t\t\tcurrentIndex--;\n\t\t\tif (!currentTransformation ||\n\t\t\t\ttypeof (currentTransformation) !== 'object' ||\n\t\t\t\ttypeof (currentTransformation.transform) !== 'function') {\n\t\t\t\tthis._eventBus.emit('warn', 'The browserify transformation has an incorrect interface, skipping...');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._appBundler.transform(\n\t\t\t\tcurrentTransformation.transform, currentTransformation.options\n\t\t\t);\n\t\t}\n\t}", "function getVendorPrefix() {\n var result;\n var properties = [\"transform\", \"msTransform\", \"webkitTransform\", \"mozTransform\", \"oTransform\"];\n\n for (var i = 0; i < properties.length; i++) {\n if (typeof document.body.style[properties[i]] != \"undefined\") {\n result = properties[i];\n break;\n }\n }\n\n switch (result) {\n case \"msTransform\": {\n return \"-ms-\";\n break;\n }\n case \"webkitTransform\": {\n return \"-webkit-\";\n break;\n }\n case \"mozTransform\": {\n return \"-moz-\";\n break;\n }\n case \"oTransform\": {\n return \"-o-\";\n break;\n }\n default: {\n return \"\";\n break;\n }\n }\n }" ]
[ "0.76651937", "0.7623907", "0.71992314", "0.7189445", "0.7189445", "0.7156891", "0.68114096", "0.67538077", "0.67418593", "0.6720166", "0.66730136", "0.6490674", "0.64602256", "0.6443263", "0.64069873", "0.6356389", "0.6317209", "0.6317209", "0.63117766", "0.63117766", "0.63117766", "0.63071287", "0.63045645", "0.6290767", "0.62179345", "0.62179345", "0.62179345", "0.62179345", "0.62179345", "0.6207752", "0.6181684", "0.6167897", "0.6153098", "0.6128817", "0.61086446", "0.61086446", "0.61086446", "0.6088107", "0.6088107", "0.6073088", "0.60359985", "0.6033038", "0.60033554", "0.58743185", "0.58743185", "0.5869163", "0.5859902", "0.58545226", "0.5848052", "0.5833918", "0.5821348", "0.5821348", "0.57656515", "0.5712951", "0.5686962", "0.5683887", "0.5674838", "0.56684506", "0.56684506", "0.56684506", "0.56684506", "0.5663121", "0.5659611", "0.565613", "0.5653584", "0.5648502", "0.56461376", "0.56448185", "0.56448185", "0.56448185", "0.56448185", "0.56448185", "0.56408715", "0.5639845", "0.5638302", "0.5637896", "0.5633021", "0.5633021", "0.5633021", "0.5633021", "0.5633021", "0.5633021", "0.5633021", "0.56282073", "0.56022274", "0.56022274", "0.56022274", "0.56022274", "0.5601387", "0.5580046", "0.55742705", "0.5545785", "0.55283993", "0.5492807", "0.5484814", "0.5482874", "0.545941", "0.5458479" ]
0.6318661
18
Determine whether the current browser supports CSS properties.
function supportsCssCustomProperties() { var globalObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window; if ('CSS' in globalObj) { return globalObj.CSS.supports('(--color: red)'); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isSupported() {\n const isSupported = CSS.supports(\"--custom-properties\", \"custom\");\n if (!isSupported && this.debug) {\n console.warn(\"Your browser does not support custom CSS properties.\");\n }\n return isSupported;\n }", "function supportsProperty(props) {\n for (var i in props) {\n if (p.guineapig.style[props[i]] !== undefined) { return true; }\n }\n return false;\n } // Thanks modernizr!", "function supportsCssCustomProperties(globalObj = window) {\n if ('CSS' in globalObj) {\n return globalObj.CSS.supports('(--color: red)');\n }\n return false;\n}", "function supportsCssCustomProperties(globalObj = window) {\n if ('CSS' in globalObj) {\n return globalObj.CSS.supports('(--color: red)');\n }\n return false;\n}", "function browser() {\n\t\n\tvar isOpera = !!(window.opera && window.opera.version); // Opera 8.0+\n\tvar isFirefox = testCSS('MozBoxSizing'); // FF 0.8+\n\tvar isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;\n\t // At least Safari 3+: \"[object HTMLElementConstructor]\"\n\tvar isChrome = !isSafari && testCSS('WebkitTransform'); // Chrome 1+\n\t//var isIE = /*@cc_on!@*/false || testCSS('msTransform'); // At least IE6\n\n\tfunction testCSS(prop) {\n\t return prop in document.documentElement.style;\n\t}\n\t\n\tif (isOpera) {\n\t\t\n\t\treturn false;\n\t\t\n\t}else if (isSafari || isChrome) {\n\t\t\n\t\treturn true;\n\t\t\n\t} else {\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\t\n}", "function checkCssSupported() {\n // First, check if the 'perspective' CSS property or a vendor-prefixed\n // variant is available.\n var perspectiveProperty = prefixProperty('perspective');\n var el = document.createElement('div');\n var supported = typeof el.style[perspectiveProperty] !== 'undefined';\n\n // Certain versions of Chrome disable 3D transforms even though the CSS\n // property exists. In those cases, we use the following media query,\n // which only succeeds if the feature is indeed enabled.\n if (supported && perspectiveProperty === 'WebkitPerspective') {\n var id = '__marzipano_test_css3d_support__';\n var st = document.createElement('style');\n st.textContent = '@media(-webkit-transform-3d){#' + id + '{height: 3px;})';\n document.getElementsByTagName('head')[0].appendChild(st);\n el.id = id;\n document.body.appendChild(el);\n // The offsetHeight seems to be different than 3 at some zoom levels on\n // Chrome (and maybe other browsers). Test for > 0 instead.\n supported = el.offsetHeight > 0;\n st.parentNode.removeChild(st);\n el.parentNode.removeChild(el);\n }\n\n return supported;\n}", "function supportsCssCustomProperties(globalObj) {\n if (globalObj === void 0) { globalObj = window; }\n if (\"CSS\" in globalObj) {\n return globalObj.CSS.supports(\"(--color: red)\");\n }\n return false;\n}", "function Util() {\n\n // retain scope\n var self = this;\n\n /**\n * Check if this browser supports a CSS property.\n *\n * Adapted from <https://gist.github.com/jackfuchs/556448>\n *\n * @author JohnG <[email protected]>\n *\n * @param str p The property name.\n *\n * @return bool Whether or not the property is supported\n */\n this.supportsCssProp = function(prop) {\n\n // get a testable element and the style attribute\n var b = document.body || document.documentElement;\n var s = b.style;\n\n // No css support detected\n if (typeof s === \"undefined\") {\n return false;\n }\n\n // Tests for standard prop\n if (typeof s[prop] === \"string\") {\n return true;\n }\n\n // Tests for vendor specific prop\n var v = [\"Moz\", \"Webkit\", \"Khtml\", \"O\", \"ms\", \"Icab\"];\n prop = prop.charAt(0).toUpperCase() + prop.substr(1);\n\n for (var i = 0; i < v.length; i++) {\n if (typeof s[v[i] + prop] === \"string\") { \n return true;\n }\n }\n\n // no support found\n return false;\n };\n\n /**\n * Test for IE browsers.\n * @var bool ieTouch\n * @var bool ie10\n */\n this.ieTouch = /MSIE.*Touch/.test(navigator.userAgent);\n this.ie10 = /MSIE 10/.test(navigator.userAgent);\n\n /**\n * Test whether or not this is a touch event compatible device.\n * @var bool touch\n */\n this.touch = /Android|BlackBerry|iPad|iPhone|iPod|Opera Mini/\n .test(navigator.userAgent) || self.ieTouch;\n\n }", "function checkCSSsupport(){\n\t\tvar isSupported = true;\n\t\n\t\t\tswitch(testNumber){\n\t\t\t\tcase 0:\n\t\t\t\tif (typeof document.body.style.boxShadow == \"undefined\" && typeof document.body.style.WebkitBoxShadow == \"undefined\")\n\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tif (typeof document.body.style.borderRadius == \"undefined\" && typeof document.body.style.WebkitBorderRadius == \"undefined\")\n\t\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tif ((typeof document.body.style.boxShadow == \"undefined\" && typeof document.body.style.WebkitBoxShadow == \"undefined\") || (typeof document.body.style.borderRadius == \"undefined\" && typeof document.body.style.WebkitBorderRadius == \"undefined\"))\n\t\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tif (typeof document.body.style.opacity == \"undefined\")\n\t\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tif (typeof document.body.style.visibility == \"undefined\")\n\t\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tif (typeof document.body.style.width == \"undefined\" || typeof document.body.style.height == \"undefined\")\n\t\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tif (typeof document.body.style.overflow == \"undefined\")\n\t\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\n\t\t\t\tcase 7:\n\t\t\t\tvar elem = document.createElement('canvas');\n\t\t\t\tif (!(elem.getContext && elem.getContext('2d')))\n\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tvar elem = document.createElement('canvas');\n\t\t\t\t\tif (!(elem.getContext && elem.getContext('2d')))\n\t\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\n\t\t\t\tcase 9:\n\t\t\t\tif (typeof document.body.style.transform == \"undefined\" && typeof document.body.style.webkitTransform == \"undefined\")\n\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\t\tif (typeof document.body.style.transform == \"undefined\" && typeof document.body.style.webkitTransform == \"undefined\")\n\t\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\t\tif (typeof document.body.style.transform == \"undefined\" && typeof document.body.style.webkitTransform == \"undefined\")\n\t\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\tcase 12:\n\t\t\t\t\tif (typeof document.body.style.transform == \"undefined\" && typeof document.body.style.webkitTransform == \"undefined\")\n\t\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\tcase 13:\n\t\t\t\t\tif (typeof document.body.style.transition == \"undefined\" && typeof document.body.style.webkitTransition == \"undefined\")\n\t\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\n\t\t\t\tcase 14:\n\t\t\t\tif ((typeof document.body.style.animationName == \"undefined\" && typeof document.body.style.webkitAnimationName == \"undefined\")|| typeof document.body.style.position == \"undefined\")\n\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\tcase 15:\n\t\t\t\t\tif ((typeof document.body.style.animationName == \"undefined\" && typeof document.body.style.webkitAnimationName == \"undefined\")|| typeof document.body.style.position == \"undefined\")\n\t\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t\t\tcase 16:\n\t\t\t\t\tif ((typeof document.body.style.animationName == \"undefined\" && typeof document.body.style.webkitAnimationName == \"undefined\") || typeof document.body.style.position == \"undefined\" || (typeof window.requestAnimationFrame == \"undefined\" && typeof window.webkitRequestAnimationFrame == \"undefined\"))\n\t\t\t\t\t\tisSupported = false;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn isSupported;\n\t\t\t\n\t}", "function supportsCssVariables(windowObj) {\n var supportsFunctionPresent = windowObj.CSS && typeof windowObj.CSS.supports === 'function';\n if (!supportsFunctionPresent) {\n return;\n }\n\n var explicitlySupportsCssVars = windowObj.CSS.supports('--css-vars', 'yes');\n // See: https://bugs.webkit.org/show_bug.cgi?id=154669\n // See: README section on Safari\n var weAreFeatureDetectingSafari10plus = windowObj.CSS.supports('(--css-vars: yes)') && windowObj.CSS.supports('color', '#00000000');\n return explicitlySupportsCssVars || weAreFeatureDetectingSafari10plus;\n}", "function test_props_all( prop, callback ) {\n var uc_prop = prop.charAt(0).toUpperCase() + prop.substr(1),\n \n // following spec is to expose vendor-specific style properties as:\n // elem.style.WebkitBorderRadius\n // and the following would be incorrect:\n // elem.style.webkitBorderRadius\n // Webkit and Mozilla are nice enough to ghost their properties in the lowercase\n // version but Opera does not.\n \n // see more here: http://github.com/Modernizr/Modernizr/issues/issue/21\n props = [\n prop,\n 'Webkit' + uc_prop,\n 'Moz' + uc_prop,\n 'O' + uc_prop,\n 'ms' + uc_prop,\n 'Khtml' + uc_prop\n ];\n\n return !!test_props( props, callback );\n }", "function getsupportedprop(proparray){\n var root=document.documentElement //reference root element of document\n for (var i=0; i<proparray.length; i++){ //loop through possible properties\n if (proparray[i] in root.style){ //if property exists on element (value will be string, empty string if not set)\n return proparray[i] //return that string\n }\n }\n}", "function supportsCSS3D() {\n var props = [\n 'perspectiveProperty', 'WebkitPerspective', 'MozPerspective'\n ], testDom = document.createElement('a');\n\n for (var i = 0; i < props.length; i++) {\n if (props[i] in testDom.style) {\n return true;\n }\n }\n\n return false;\n }", "function detectTransformProperty() {\n var transformProperty = 'transform',\n safariPropertyHack = 'webkitTransform';\n if (typeof document.body.style[transformProperty] !== 'undefined') {\n\n ['webkit', 'moz', 'o', 'ms'].every(function (prefix) {\n var e = '-' + prefix + '-transform';\n if (typeof document.body.style[e] !== 'undefined') {\n transformProperty = e;\n return false;\n }\n return true;\n });\n } else if (typeof document.body.style[safariPropertyHack] !== 'undefined') {\n transformProperty = '-webkit-transform';\n } else {\n transformProperty = undefined;\n }\n return transformProperty;\n }", "function supportsCSS3D() {\r\n var props = [\r\n 'perspectiveProperty', 'WebkitPerspective', 'MozPerspective'\r\n ], testDom = document.createElement('a');\r\n\r\n for(var i=0; i<props.length; i++){\r\n if(props[i] in testDom.style){\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }", "function detectTransformProperty() {\n var transformProperty = 'transform',\n safariPropertyHack = 'webkitTransform';\n if (typeof document.body.style[transformProperty] !== 'undefined') {\n\n ['webkit', 'moz', 'o', 'ms'].every(function (prefix) {\n var e = '-' + prefix + '-transform';\n if (typeof document.body.style[e] !== 'undefined') {\n transformProperty = e;\n return false;\n }\n return true;\n });\n } else if (typeof document.body.style[safariPropertyHack] !== 'undefined') {\n transformProperty = '-webkit-transform';\n } else {\n transformProperty = undefined;\n }\n return transformProperty;\n }", "function mediaQueriesSupported() {\n return (typeof window.matchMedia !== 'undefined' || typeof window.msMatchMedia !== 'undefined' || typeof window.styleMedia !== 'undefined');\n }", "function setBrowserSpecificProperty(prop) {\n var style = document.body.style; // No reason for this particular tag, just want the style\n var prefixes = ['Webkit', 'Moz', 'O', 'ms', 'Khtml'];\n var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1);\n var props = prefixes.map(function(prefix){return prefix + ucProp;}).concat(prop);\n\n for (var i in props) {\n if (style[props[i]] !== undefined) {\n return props[i];\n }\n }\n }", "function testProp(props) {\n var style = document.documentElement.style;\n\n for (var i = 0; i < props.length; i++) {\n if (props[i] in style) {\n return props[i];\n }\n }\n\n return false;\n } // @function setTransform(el: HTMLElement, offset: Point, scale?: Number)", "function cssprop(name, el){\n var supported = false,\n capitalized = name.charAt(0).toUpperCase() + name.slice(1),\n length = VENDOR_PREFIXES.length,\n style = el.style;\n\n if(typeof style[name] == \"string\"){\n supported = true;\n }else{\n while(length--){\n if(typeof style[VENDOR_PREFIXES[length] + capitalized] == \"string\"){\n supported = true;\n break;\n }\n }\n }\n return supported;\n }", "function detectCSSFeature(featureName) {\n\t'use strict';\n\n\tvar feature = false,\n\t\tdomPrefixes = 'Moz ms Webkit'.split(' '),\n\t\telm = document.createElement('div'),\n\t\tfeatureNameCapital = null;\n\n\tfeatureName = featureName.toLowerCase();\n\tif (elm.style[featureName] !== undefined) {\n\t\tfeature = true;\n\t}\n\tif (feature === false) {\n\t\tfeatureNameCapital = featureName.charAt(0).toUpperCase() + featureName.substr(1);\n\t\tfor (var i = 0; i < domPrefixes.length; i++) {\n\t\t\tif (elm.style[domPrefixes[i] + featureNameCapital] !== undefined) {\n\t\t\t\tfeature = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn feature;\n}", "function isCSS(prop){\t\n\t\treturn (('isTransition name duration loop ease delay fillMode useAll percent transform useShortHand useHacks transformOrigin direction animationTimingFunction animationPlayState play animationIterationCount backfaceVisibility filter').indexOf(prop) === -1);\n\t}", "function cssProperty(p, rp) {\n var b = document.body || document.documentElement,\n s = b.style;\n if (typeof s == 'undefined') { return false; }\n if (typeof s[p] == 'string') { return rp ? p : true; }\n var v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms', 'Icab'],\n p = p.charAt(0).toUpperCase() + p.substr(1);\n for (var i = 0; i < v.length; i++) {\n if (typeof s[v[i] + p] == 'string') { return rp ? (v[i] + p) : true; }\n }\n return false;\n }", "function xHasStyleSheets() {\r\n return document.styleSheets ? true : false ;\r\n}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n\t return true;\n\t }\n\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}", "function isValidCSSProperty(element, property) {\n if (typeof element.style[property] != \"undefined\") {\n return true;\n }\n \n return false;\n }", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n\t return true;\n\t }\n\t\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n\t return true;\n\t }\n\t\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n\t return true;\n\t }\n\t\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n\t return true;\n\t }\n\t\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}", "function detectBrowserFeatures()\n {\n var i,\n\t\t\tmimeType,\n\t\t\tpluginMap = {\n\t\t\t // document types\n\t\t\t pdf: 'application/pdf',\n\n\t\t\t // interactive multimedia\n\t\t\t fla: 'application/x-shockwave-flash',\n\n\t\t\t // RIA\n\t\t\t java: 'application/x-java-vm',\n\t\t\t ag: 'application/x-silverlight'\n\t\t\t},\n\t\t\tfeatures = {};\n\n // General plugin detection\n if (SnowPlow.navigatorAlias.mimeTypes && SnowPlow.navigatorAlias.mimeTypes.length)\n {\n for (i in pluginMap)\n {\n if (Object.prototype.hasOwnProperty.call(pluginMap, i))\n {\n mimeType = SnowPlow.navigatorAlias.mimeTypes[pluginMap[i]];\n features[i] = (mimeType && mimeType.enabledPlugin) ? '1' : '0';\n }\n }\n }\n\n // Safari and Opera\n // IE6/IE7 navigator.javaEnabled can't be aliased, so test directly\n if (typeof navigator.javaEnabled !== 'unknown' &&\n\t\t\t\tSnowPlow.isDefined(SnowPlow.navigatorAlias.javaEnabled) &&\n\t\t\t\tSnowPlow.navigatorAlias.javaEnabled())\n {\n features.java = '1';\n }\n\n // Firefox\n if (SnowPlow.isFunction(SnowPlow.windowAlias.GearsFactory))\n {\n features.gears = '1';\n }\n\n // Other browser features\n features.res = SnowPlow.screenAlias.width + 'x' + SnowPlow.screenAlias.height;\n features.cd = screen.colorDepth;\n features.cookie = hasCookies();\n\n return features;\n }", "function detectCSSFeature(featurename) {\n\n\tvar feature = false,\n\tdomPrefixes = 'Webkit Moz ms O'.split(' '),\n\telm = document.createElement('div'),\n\tfeaturenameCapital = null;\n\n\tfeaturename = featurename.toLowerCase();\n\n\tif( elm.style[featurename] !== undefined ) { feature = true; }\n\n\tif( feature === false ) {\n\t featurenameCapital = featurename.charAt(0).toUpperCase() + featurename.substr(1);\n\t for( var i = 0; i < domPrefixes.length; i++ ) {\n\t if( elm.style[domPrefixes[i] + featurenameCapital ] !== undefined ) {\n\t feature = true;\n\t break;\n\t }\n\t }\n\t}\n\treturn feature;\n}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n\t return true;\n\t }\n\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n\t}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n\t return true;\n\t }\n\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n\t}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n\t return true;\n\t }\n\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n\t return true;\n\t }\n\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n\t return true;\n\t }\n\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n\t return true;\n\t }\n\t\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n\t}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n\t return true;\n\t }\n\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (typeof window !== 'undefined' && window && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}", "function checkDevCSS(dev) {\n for (let technologies of dev.technologies) {\n if(technologies == 'CSS')\n return true\n }\n return false\n}", "function useColors() {\n\t\t// NB: In an Electron preload script, document will be defined but not fully\n\t\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t\t// explicitly\n\t\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Internet Explorer and Edge do not support colors.\n\t\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t\t// Is firefox >= v31?\n\t\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}", "function useColors() {\n\t\t// NB: In an Electron preload script, document will be defined but not fully\n\t\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t\t// explicitly\n\t\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Internet Explorer and Edge do not support colors.\n\t\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t\t// Is firefox >= v31?\n\t\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}", "function isCapable() {\n\treturn !!document.body.classList;\n}", "function mediaQueriesSupported() {\n return (typeof window.matchMedia != \"undefined\" || typeof window.msMatchMedia != \"undefined\");\n }", "function useColors() {\n\t\t // NB: In an Electron preload script, document will be defined but not fully\n\t\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t\t // explicitly\n\t\t if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n\t\t return true;\n\t\t }\n\n\t\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t\t return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t\t (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t // is firefox >= v31?\n\t\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t (typeof navigator !== 'undefined' && undefined && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t // double check webkit in userAgent just in case we are in a worker\n\t\t (typeof navigator !== 'undefined' && undefined && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t\t}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n\t return true;\n\t }\n\n\t // Internet Explorer and Edge do not support colors.\n\t if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t return false;\n\t }\n\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n\t return true;\n\t }\n\t\n\t // Internet Explorer and Edge do not support colors.\n\t if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t return false;\n\t }\n\t\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t // double check webkit in userAgent just in case we are in a worker\n\t (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window && window.console && (console.firebug || console.exception && console.table) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||\n // double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n}", "function isStyleSupported(array){\n\t\tvar p,s,fake = document.createElement('div'),list = array;\n\t\tfor(p in list){\n\t\t\ts = list[p]; \n\t\t\tif(typeof fake.style[s] !== 'undefined'){\n\t\t\t\tfake = null;\n\t\t\t\treturn [s,p];\n\t\t\t}\n\t\t}\n\t\treturn [false];\n\t}", "function test_props_all( prop, callback ) {\n var uc_prop = prop.charAt(0).toUpperCase() + prop.substr(1),\n props = [\n prop,\n 'Webkit' + uc_prop,\n 'Moz' + uc_prop,\n 'O' + uc_prop,\n 'ms' + uc_prop\n ];\n\n return !!test_props( props, callback );\n}", "function selectorSupported (selector) {\n\t\t \n\t\t var support, link, sheet, doc = document,\n\t\t root = doc.documentElement,\n\t\t head = root.getElementsByTagName('head')[0],\n\n\t\t impl = doc.implementation || {\n\t\t hasFeature: function() {\n\t\t return false;\n\t\t }\n\t\t },\n\n\t\t link = doc.createElement(\"style\");\n\t\t link.type = 'text/css';\n\n\t\t (head || root).insertBefore(link, (head || root).firstChild);\n\n\t\t sheet = link.sheet || link.styleSheet;\n\n\t\t if (!(sheet && selector)) return false;\n\n\t\t support = impl.hasFeature('CSS2', '') ?\n\t\t \n\t\t function(selector) {\n\t\t try {\n\t\t sheet.insertRule(selector + '{ }', 0);\n\t\t sheet.deleteRule(sheet.cssRules.length - 1);\n\t\t } catch (e) {\n\t\t return false;\n\t\t }\n\t\t return true;\n\t\t \n\t\t } : function(selector) {\n\t\t \n\t\t sheet.cssText = selector + ' { }';\n\t\t return sheet.cssText.length !== 0 && !(/unknown/i).test(sheet.cssText) && sheet.cssText.indexOf(selector) === 0;\n\t\t };\n\t\t \n\t\t return support(selector);\n\n\t\t}", "function Fx_WhichBrowser() {\n\n // Value will true, when the client browser is Internet Explorer 6-11\n Browser_IsIE = /*@cc_on!@*/false || !!document.documentMode;\n\n // Value will true, when the client browser is Edge 20+\n Browser_IsEdge = !Browser_IsIE && !!window.StyleMedia;\n\n // Value will true, when the client browser is Firefox 1.0+\n Browser_IsFirefox = typeof InstallTrigger !== 'undefined';\n\n // Value will true, when the client browser is Chrome 1+\n Browser_IsChrome = !!window.chrome && !!window.chrome.webstore;\n\n // Value will true, when the client browser is Opera 8.0+\n Browser_IsOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;\n\n // Value will true, when the client browser is Safari 3+\n Browser_IsSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;\n\n // Value will true, when the client browser having Blink engine\n //Browser_IsBlink = (Browser_IsChrome || Browser_IsOpera) && !!window.CSS;\n}", "function useColors() {\n\t\t\t// NB: In an Electron preload script, document will be defined but not fully\n\t\t\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t\t\t// explicitly\n\t\t\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Internet Explorer and Edge do not support colors.\n\t\t\tif (typeof navigator !== 'undefined' && undefined && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t\t\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t\t\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t\t\t// Is firefox >= v31?\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t\t\t(typeof navigator !== 'undefined' && undefined && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t\t\t(typeof navigator !== 'undefined' && undefined && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n\t\t}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // Internet Explorer and Edge do not support colors.\n if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n }", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // Internet Explorer and Edge do not support colors.\n if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n }", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // Internet Explorer and Edge do not support colors.\n if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n return false;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n }", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||\n // double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||\n // double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||\n // double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||\n // double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||\n // double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||\n // double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||\n // double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||\n // double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n}", "function useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return 'WebkitAppearance' in document.documentElement.style ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n window.console && (console.firebug || console.exception && console.table) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31;\n }", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t return (typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style) ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t (window.console && (console.firebug || (console.exception && console.table))) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n\t}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function isSupportedBrowser() {\n return !!(doc.querySelectorAll && doc.addEventListener && [].filter && [].forEach);\n}", "function supportTransitions() {\n\t\tvar b = document.body || document.documentElement;\n\t\tvar s = b.style;\n\t\tvar p = 'transition';\n\t\tif(typeof s[p] == 'string') {return true; }\n\n\t\t// Tests for vendor specific prop\n\t\tv = ['Moz', 'Webkit', 'Khtml', 'O', 'ms', 'Icab'],\n\t\tp = p.charAt(0).toUpperCase() + p.substr(1);\n\t\tfor(var i=0; i<v.length; i++) {\n\t\t if(typeof s[v[i] + p] == 'string') { return true; }\n\t\t}\n\t\treturn false;\n\t}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t return true;\n\t } // Internet Explorer and Edge do not support colors.\n\n\n\t if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t return false;\n\t } // Is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\n\n\t return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773\n\t typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker\n\t typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n\t}", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t return true;\n\t } // Internet Explorer and Edge do not support colors.\n\n\n\t if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t return false;\n\t } // Is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\n\n\t return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773\n\t typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker\n\t typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n\t}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (window && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (window && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (window && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (window && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (window && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}", "function useColors() {\n \t// NB: In an Electron preload script, document will be defined but not fully\n \t// initialized. Since we know we're in Chrome, we'll just detect this case\n \t// explicitly\n \tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n \t\treturn true;\n \t}\n\n \t// Internet Explorer and Edge do not support colors.\n \tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n \t\treturn false;\n \t}\n\n \t// Is webkit? http://stackoverflow.com/a/16459606/376773\n \t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n \treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n \t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n \t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n \t\t// Is firefox >= v31?\n \t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n \t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n \t\t// Double check webkit in userAgent just in case we are in a worker\n \t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n }", "function useColors() {\n\t // NB: In an Electron preload script, document will be defined but not fully\n\t // initialized. Since we know we're in Chrome, we'll just detect this case\n\t // explicitly\n\t if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t return true;\n\t } // Internet Explorer and Edge do not support colors.\n\t\n\t\n\t if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t return false;\n\t } // Is webkit? http://stackoverflow.com/a/16459606/376773\n\t // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t\n\t\n\t return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773\n\t typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker\n\t typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n\t}", "function useColors() {\n\t // is webkit? http://stackoverflow.com/a/16459606/376773\n\t return 'WebkitAppearance' in document.documentElement.style ||\n\t // is firebug? http://stackoverflow.com/a/398120/376773\n\t window.console && (console.firebug || console.exception && console.table) ||\n\t // is firefox >= v31?\n\t // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31;\n\t}", "function useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n } // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\n\n return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // is firebug? http://stackoverflow.com/a/398120/376773\n typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // double check webkit in userAgent just in case we are in a worker\n typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n }", "function browserSupportsAllFeatures() {\n return window.Promise && window.fetch && window.Symbol;\n}", "function useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}" ]
[ "0.79372835", "0.730472", "0.71594816", "0.71594816", "0.71409774", "0.705191", "0.6992248", "0.6936028", "0.6675497", "0.6590115", "0.6363524", "0.63524354", "0.6348435", "0.62681884", "0.6239606", "0.6217491", "0.612748", "0.60975635", "0.6061565", "0.6055758", "0.6026991", "0.59852904", "0.597438", "0.5938226", "0.59284174", "0.59183574", "0.5914132", "0.5914132", "0.5914132", "0.5914132", "0.59134763", "0.59087276", "0.59023553", "0.59023553", "0.58938724", "0.58938724", "0.58938724", "0.5893342", "0.58854675", "0.58550376", "0.58340245", "0.58340245", "0.58300394", "0.5789954", "0.57782996", "0.5751165", "0.5743911", "0.57183427", "0.5714989", "0.57086414", "0.5702815", "0.5701114", "0.5688674", "0.5685715", "0.5685715", "0.5685715", "0.56846213", "0.56846213", "0.56846213", "0.56846213", "0.56846213", "0.56846213", "0.56846213", "0.56846213", "0.5680089", "0.56760293", "0.56760293", "0.56760293", "0.56760293", "0.56760293", "0.56734204", "0.5669579", "0.56573653", "0.5650959", "0.5650959", "0.5646406", "0.5646406", "0.5646406", "0.5646406", "0.5646406", "0.5646406", "0.5646406", "0.5646406", "0.5646406", "0.5646406", "0.5646406", "0.5646406", "0.5644621", "0.5644621", "0.5644621", "0.5644621", "0.5644621", "0.56405926", "0.56304973", "0.56281966", "0.5627584", "0.56161547", "0.5603683" ]
0.7267587
3
Determine whether the current browser supports passive event listeners, and if so, use them.
function applyPassive() { var globalObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window; var forceRefresh = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; if (supportsPassive_ === undefined || forceRefresh) { var isSupported = false; try { globalObj.document.addEventListener('test', null, { get passive() { isSupported = true; } }); } catch (e) {} supportsPassive_ = isSupported; } return supportsPassive_ ? { passive: true } : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function supportsPassiveEventListeners() {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n get: () => supportsPassiveEvents = true\n }));\n }\n finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n return supportsPassiveEvents;\n}", "function supportsPassiveEventListeners() {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n get: () => supportsPassiveEvents = true\n }));\n }\n finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n return supportsPassiveEvents;\n}", "function supportsPassiveEventListeners() {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n get: () => supportsPassiveEvents = true\n }));\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n}", "function supportsPassiveEventListeners() {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n get: function get() {\n return supportsPassiveEvents = true;\n }\n }));\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n }", "function detectPassiveEvents() {\n if (isWindowDefined && typeof window.addEventListener === 'function') {\n var passive = false;\n var options = Object.defineProperty({}, 'passive', {\n get: function() { passive = true; }\n });\n // note: have to set and remove a no-op listener instead of null\n // (which was used previously), because Edge v15 throws an error\n // when providing a null callback.\n // https://github.com/rafrex/detect-passive-events/pull/3\n var noop = function() {};\n window.addEventListener('TEST_PASSIVE_EVENT_SUPPORT', noop, options);\n window.removeEventListener('TEST_PASSIVE_EVENT_SUPPORT', noop, options);\n\n return passive;\n }\n\n return false;\n }", "function supportsPassiveEvents() {\n let supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function () {\n supportsPassive = true;\n }\n });\n window.addEventListener(\"testPassive\", null, opts);\n window.removeEventListener(\"testPassive\", null, opts);\n } catch (e) {\n return supportsPassive;\n }\n return supportsPassive;\n}", "function testPassiveEventsSupport() {\n var passiveEvents = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function() {\n passiveEvents = true;\n }\n });\n window.addEventListener('test', null, opts);\n } catch (e) { /* Silence the error and continue */ }\n\n return passiveEvents;\n }", "_detectPassiveEventSupport (result) {\n\t\ttry {\n\t\t\tvar opts = Object.defineProperty({}, 'passive', {\n\t\t\t\tget: function() {\n\t\t\t\t\tresult = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\twindow.addEventListener(\"test\", null, opts);\n\t\t} catch (e) {\n\t\t\tresult = false;\n\t\t}\n\t}", "get passive() {\n /* istanbul ignore next: will never be called in JSDOM */\n passiveEventSupported = true;\n }", "get passive() {\n /* istanbul ignore next: will never be called in JSDOM */\n passiveEventSupported = true;\n }", "get passive() {\n /* istanbul ignore next: will never be called in JSDOM */\n passiveEventSupported = true;\n }", "get passive() {\n /* istanbul ignore next: will never be called in JSDOM */\n passiveEventSupported = true;\n }", "function hasPassiveSupport() {\n var passiveSupported = false;\n\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passiveSupported = true;\n }\n });\n\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (err) {\n passiveSupported = false;\n }\n\n return passiveSupported;\n}", "function hasPassiveSupport() {\n var passiveSupported = false;\n\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passiveSupported = true;\n }\n });\n\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (err) {\n passiveSupported = false;\n }\n\n return passiveSupported;\n}", "function hasPassiveSupport() {\n var passiveSupported = false;\n\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function get() {\n passiveSupported = true;\n }\n });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (err) {\n passiveSupported = false;\n }\n\n return passiveSupported;\n}", "function applyPassive$2(globalObj = window, forceRefresh = false) {\n if (supportsPassive_$2 === undefined || forceRefresh) {\n let isSupported = false;\n try {\n globalObj.document.addEventListener('test', null, {get passive() {\n isSupported = true;\n }});\n } catch (e) { }\n\n supportsPassive_$2 = isSupported;\n }\n\n return supportsPassive_$2 ? {passive: true} : false;\n}", "function applyPassive$1(globalObj = window, forceRefresh = false) {\n if (supportsPassive_$1 === undefined || forceRefresh) {\n let isSupported = false;\n try {\n globalObj.document.addEventListener('test', null, {get passive() {\n isSupported = true;\n }});\n } catch (e) { }\n\n supportsPassive_$1 = isSupported;\n }\n\n return supportsPassive_$1 ? {passive: true} : false;\n}", "function applyPassive$1(globalObj = window, forceRefresh = false) {\n if (supportsPassive_$1 === undefined || forceRefresh) {\n let isSupported = false;\n try {\n globalObj.document.addEventListener('test', null, {get passive() {\n isSupported = true;\n }});\n } catch (e) { }\n\n supportsPassive_$1 = isSupported;\n }\n\n return supportsPassive_$1 ? {passive: true} : false;\n}", "function applyPassive(globalObj, forceRefresh) {\n if (globalObj === void 0) { globalObj = window; }\n if (forceRefresh === void 0) { forceRefresh = false; }\n if (_supportsPassive === undefined || forceRefresh) {\n var isSupported_1 = false;\n try {\n var checker = {};\n Object.defineProperty(checker, \"passive\", { get: function () { isSupported_1 = true; } });\n globalObj.document.addEventListener(\"test\", null, checker);\n }\n catch (e) { }\n _supportsPassive = isSupported_1;\n }\n return _supportsPassive ? { passive: true } : false;\n}", "function applyPassive(globalObj, forceRefresh) {\n if (globalObj === void 0) { globalObj = window; }\n if (forceRefresh === void 0) { forceRefresh = false; }\n if (supportsPassive_ === undefined || forceRefresh) {\n var isSupported_1 = false;\n try {\n globalObj.document.addEventListener('test', function () { return undefined; }, {\n get passive() {\n isSupported_1 = true;\n return isSupported_1;\n },\n });\n }\n catch (e) {\n } // tslint:disable-line:no-empty cannot throw error due to tests. tslint also disables console.log.\n supportsPassive_ = isSupported_1;\n }\n return supportsPassive_ ? { passive: true } : false;\n}", "function applyPassive(globalObj, forceRefresh) {\n if (globalObj === void 0) { globalObj = window; }\n if (forceRefresh === void 0) { forceRefresh = false; }\n if (supportsPassive_ === undefined || forceRefresh) {\n var isSupported_1 = false;\n try {\n globalObj.document.addEventListener('test', function () { return undefined; }, {\n get passive() {\n isSupported_1 = true;\n return isSupported_1;\n },\n });\n }\n catch (e) {\n } // tslint:disable-line:no-empty cannot throw error due to tests. tslint also disables console.log.\n supportsPassive_ = isSupported_1;\n }\n return supportsPassive_ ? { passive: true } : false;\n }", "function applyPassive(globalObj, forceRefresh) {\n if (globalObj === void 0) { globalObj = window; }\n if (forceRefresh === void 0) { forceRefresh = false; }\n if (supportsPassive_ === undefined || forceRefresh) {\n var isSupported_1 = false;\n try {\n globalObj.document.addEventListener('test', function () { return undefined; }, {\n get passive() {\n isSupported_1 = true;\n return isSupported_1;\n },\n });\n }\n catch (e) {\n } // tslint:disable-line:no-empty cannot throw error due to tests. tslint also disables console.log.\n supportsPassive_ = isSupported_1;\n }\n return supportsPassive_ ? { passive: true } : false;\n }", "addScrollListeners () {\n window.addEventListener(\n 'scroll',\n this.onScroll,\n this.supportsPassiveListening() ? { passive: true } : false\n )\n }", "function normalizePassiveListenerOptions(options) {\n return supportsPassiveEventListeners() ? options : !!options.capture;\n}", "function normalizePassiveListenerOptions(options) {\n return supportsPassiveEventListeners() ? options : !!options.capture;\n}", "function normalizePassiveListenerOptions(options) {\n return supportsPassiveEventListeners() ? options : !!options.capture;\n}", "function normalizePassiveListenerOptions(options) {\n return supportsPassiveEventListeners() ? options : !!options.capture;\n }", "get passive() {\n passiveSupported = true;\n return false;\n }", "get passive() {\n passiveSupported = true;\n return false;\n }", "get passive() {\n passiveSupported = true;\n return false;\n }", "get passive() {\n passiveSupported = true;\n return false;\n }", "function makePassiveEventOption(passive) {\n return passive;\n}", "get passive () {\n passiveSupported = true\n }", "get passive(){return passiveSupported=!0,!1}", "function buildEventListenerOptions(options, passive) {\n if (!passiveSupported && typeof options === 'object' && options) {\n // doesn't support passive but user want to pass an object as options.\n // this will not work on some old browser, so we just pass a boolean\n // as useCapture parameter\n return !!options.capture;\n }\n if (!passiveSupported || !passive) {\n return options;\n }\n if (typeof options === 'boolean') {\n return { capture: options, passive: true };\n }\n if (!options) {\n return { passive: true };\n }\n if (typeof options === 'object' && options.passive !== false) {\n return Object.assign(Object.assign({}, options), { passive: true });\n }\n return options;\n }", "function bindGlobalEventListeners() {\n document.addEventListener('touchstart', onDocumentTouchStart, _extends({}, PASSIVE, {\n capture: true\n }));\n window.addEventListener('blur', onWindowBlur);\n}", "function supported() {\n return !!(window.DeviceMotionEvent);\n }", "function addEventListener(dom, type, listener, options) {\n //@todo proper type check for options: EventListenerOptions | boolean (TS for some reason gives error on passive parameter)\n //console.log(type, dom);\n dom.addEventListener(type, listener, options || false);\n return new _Disposer__WEBPACK_IMPORTED_MODULE_1__[\"Disposer\"](function () {\n dom.removeEventListener(type, listener, options || false);\n });\n}", "function supportsPointerEventsFn() {\n // check cache\n if (_supportsPointerEvents !== undefined) return _supportsPointerEvents;\n \n var element = document.createElement('x');\n element.style.cssText = 'pointer-events:auto';\n _supportsPointerEvents = (element.style.pointerEvents === 'auto');\n return _supportsPointerEvents;\n}", "function HasDelegatedListeners() {}", "canHandleEvent(target, type) {}", "function addEventListeners() {\n\n eventsAreBound = true;\n\n window.addEventListener('hashchange', onWindowHashChange, false);\n window.addEventListener('resize', onWindowResize, false);\n\n if (config.touch) {\n dom.wrapper.addEventListener('touchstart', onTouchStart, false);\n dom.wrapper.addEventListener('touchmove', onTouchMove, false);\n dom.wrapper.addEventListener('touchend', onTouchEnd, false);\n\n // Support pointer-style touch interaction as well\n if (window.navigator.msPointerEnabled) {\n dom.wrapper.addEventListener('MSPointerDown', onPointerDown, false);\n dom.wrapper.addEventListener('MSPointerMove', onPointerMove, false);\n dom.wrapper.addEventListener('MSPointerUp', onPointerUp, false);\n }\n }\n\n if (config.keyboard) {\n document.addEventListener('keydown', onDocumentKeyDown, false);\n }\n\n if (config.progress && dom.progress) {\n dom.progress.addEventListener('click', onProgressClicked, false);\n }\n\n if (config.controls && dom.controls) {\n ['touchstart', 'click'].forEach(function (eventName) {\n dom.controlsLeft.forEach(function (el) {\n el.addEventListener(eventName, onNavigateLeftClicked, false);\n });\n dom.controlsRight.forEach(function (el) {\n el.addEventListener(eventName, onNavigateRightClicked, false);\n });\n dom.controlsUp.forEach(function (el) {\n el.addEventListener(eventName, onNavigateUpClicked, false);\n });\n dom.controlsDown.forEach(function (el) {\n el.addEventListener(eventName, onNavigateDownClicked, false);\n });\n dom.controlsPrev.forEach(function (el) {\n el.addEventListener(eventName, onNavigatePrevClicked, false);\n });\n dom.controlsNext.forEach(function (el) {\n el.addEventListener(eventName, onNavigateNextClicked, false);\n });\n });\n }\n\n }", "function bindGlobalEventListeners() {\n document.addEventListener('touchstart', onDocumentTouch, PASSIVE);\n window.addEventListener('blur', onWindowBlur);\n}", "attachListeners () {\n if (!this.listenersAttached && typeof window !== 'undefined') {\n window.addEventListener('resize', this.handleWindowResize)\n window.addEventListener('mouseup', this.handleMouseUp)\n window.addEventListener('touchend', this.handleTouchEnd)\n window.addEventListener('touchcancel', this.handleTouchEnd)\n window.addEventListener('pointerdown', this.handlePointerEvent)\n window.addEventListener('pointermove', this.handlePointerEvent)\n window.addEventListener('pointerup', this.handlePointerEvent)\n window.addEventListener('pointercancel', this.handlePointerEvent)\n // Have to add an extra mouseup handler to catch mouseup events outside of the window\n this.listenersAttached = true\n }\n }", "_detectBrowserSupport () {\n\t\t\n\t\tvar check = true;\n\n\t\t// nothing below IE9\n\t\tif (!document.addEventListener) check = false;\n\n\t\t// nothing below IE10\n\t\t// if (!window.onpopstate) check = false;\n\n\t\treturn check;\n\t}", "function isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n} // ==============================", "function isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n} // ==============================", "function isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n} // ==============================", "function isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n} // ==============================", "function touch_supported(e) {\n // Do something after the element is touched\n }", "static get supportsPassive() {\n return this._supportsPassive;\n }", "static get supportsPassive() {\n return this._supportsPassive;\n }", "function bindGlobalEventListeners() {\n document.addEventListener('touchstart', onDocumentTouch, PASSIVE);\n window.addEventListener('blur', onWindowBlur);\n }", "function isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n}", "function isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n}", "function isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n}", "function isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n}", "function isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n}", "function isTouchCapable() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n}", "function listenerCreated() {\n if (!(listenerCnt++)) {\n window.addEventListener('touchmove', onWindowTouchMove, { passive: false });\n }\n}", "addEventListeners(){\n\t\tif(!this.document) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._triggerEvent = this.triggerEvent.bind(this);\n\n\t\tDOM_EVENTS.forEach(function(eventName){\n\t\t\tthis.document.addEventListener(eventName, this._triggerEvent, { passive: true });\n\t\t}, this);\n\n\t}", "function bindEvents() {\n element.addEventListener(\"mousemove\", onMouseMove);\n element.addEventListener(\"touchmove\", onTouchMove, { passive: true });\n element.addEventListener(\"touchstart\", onTouchMove, { passive: true });\n window.addEventListener(\"resize\", onWindowResize);\n }", "function usePointerEvent(){ // TODO\n // pointermove event dont trigger when using finger.\n // We may figger it out latter.\n return false; // return env.pointerEventsSupported\n // In no-touch device we dont use pointer evnets but just\n // use mouse event for avoiding problems.\n // && window.navigator.maxTouchPoints;\n }", "function isTouchCapable() {\n\t try {\n\t document.createEvent('TouchEvent');\n\t return true;\n\t } catch (e) {\n\t return false;\n\t }\n\t}", "function HasListeners() {}", "function isSupportedBrowser() {\n return !!(doc.querySelectorAll && doc.addEventListener && [].filter && [].forEach);\n}", "_addListeners() {\n try {\n WINDOW$1.document.addEventListener('visibilitychange', this._handleVisibilityChange);\n WINDOW$1.addEventListener('blur', this._handleWindowBlur);\n WINDOW$1.addEventListener('focus', this._handleWindowFocus);\n\n // We need to filter out dropped events captured by `addGlobalEventProcessor(this.handleGlobalEvent)` below\n overwriteRecordDroppedEvent(this._context.errorIds);\n\n // There is no way to remove these listeners, so ensure they are only added once\n if (!this._hasInitializedCoreListeners) {\n addGlobalListeners(this);\n\n this._hasInitializedCoreListeners = true;\n }\n } catch (err) {\n this._handleException(err);\n }\n\n // PerformanceObserver //\n if (!('PerformanceObserver' in WINDOW$1)) {\n return;\n }\n\n this._performanceObserver = setupPerformanceObserver(this);\n }", "function listenerCreated() {\n if (!(listenerCnt++)) {\n window.addEventListener('touchmove', onWindowTouchMove, { passive: false });\n }\n }", "function listenerCreated() {\n if (!(listenerCnt++)) {\n window.addEventListener('touchmove', onWindowTouchMove, { passive: false });\n }\n }", "function e(e) {\n return e && (\"function\" == typeof e.on || \"function\" == typeof e.addEventListener);\n }", "function hasTouchSupport(){var support={},events=['touchstart','touchmove','touchend'],el=document.createElement('div'),i;try{for(i=0;i<events.length;i++){var eventName=events[i];eventName='on'+eventName;var isSupported=eventName in el;if(!isSupported){el.setAttribute(eventName,'return;');isSupported=typeof el[eventName]=='function';}support[events[i]]=isSupported;}return support.touchstart&&support.touchend&&support.touchmove;}catch(err){return false;}}", "function listenForPHPEvents()\n{\n /* disable this stuff until i find time to integrate websockets\n // Use WebSockets if available\n if (\"WebSocket\" in window) {\n socket = new WebSocket(websockethost);\n \n // Hang an onmessage-listener to the socket to call the event handler\n socket.onmessage = _cjEventHandler;\n } else { // in case we don't have websockets: fallback on long-polling '\n clearInterval(_listenerinterval);\n _listenerinterval = setInterval(\"_cjEventListener()\", listener_interval_ms);\n }\n */\n\n clearInterval(_listenerinterval);\n _listenerinterval = setInterval(\"_cjEventListener()\", listener_interval_ms);\n}", "function addNativeEventListeners () {\n forEach(events, function (eventType) {\n document.body.addEventListener(eventType, handleEvent, true)\n })\n }", "function lstn(o, t, f)\r\n{\r\n if (o.addEventListener) {\r\n // Because MSIE only has a bubbling phase, capture will always be false.\r\n o.addEventListener(t, f, false);\r\n return true;\r\n } else if (o.attachEvent){\r\n return o.attachEvent(\"on\" + t, f);\r\n }\r\n return false;\r\n}", "function isSupported() {\n return !!$().on;\n }", "function hasTouchSupport() {\n var support = {}, events = ['touchstart', 'touchmove', 'touchend'],\n el = document.createElement('div'), i;\n\n try {\n for(i=0; i<events.length; i++) {\n var eventName = events[i];\n eventName = 'on' + eventName;\n var isSupported = (eventName in el);\n if (!isSupported) {\n el.setAttribute(eventName, 'return;');\n isSupported = typeof el[eventName] == 'function';\n }\n support[events[i]] = isSupported;\n }\n return support.touchstart && support.touchend && support.touchmove;\n }\n catch(err) {\n return false;\n }\n }", "function hasTouchSupport() {\n var support = {}, events = ['touchstart', 'touchmove', 'touchend'],\n el = document.createElement('div'), i;\n\n try {\n for(i=0; i<events.length; i++) {\n var eventName = events[i];\n eventName = 'on' + eventName;\n var isSupported = (eventName in el);\n if (!isSupported) {\n el.setAttribute(eventName, 'return;');\n isSupported = typeof el[eventName] == 'function';\n }\n support[events[i]] = isSupported;\n }\n return support.touchstart && support.touchend && support.touchmove;\n }\n catch(err) {\n return false;\n }\n }", "function hasTouchSupport() {\n var support = {},\n events = ['touchstart', 'touchmove', 'touchend'],\n el = document.createElement('div'), i;\n\n try {\n for(i=0; i<events.length; i++) {\n var eventName = events[i];\n eventName = 'on' + eventName;\n var isSupported = (eventName in el);\n if (!isSupported) {\n el.setAttribute(eventName, 'return;');\n isSupported = typeof el[eventName] == 'function';\n }\n support[events[i]] = isSupported;\n }\n return support.touchstart && support.touchend && support.touchmove;\n }\n catch(err) {\n return false;\n }\n }", "function hasTouchSupport() {\n var support = {},\n events = ['touchstart', 'touchmove', 'touchend'],\n el = document.createElement('div'),\n i;\n\n try {\n for (i = 0; i < events.length; i++) {\n var eventName = events[i];\n eventName = 'on' + eventName;\n var isSupported = (eventName in el);\n\n if (!isSupported) {\n el.setAttribute(eventName, 'return;');\n isSupported = typeof el[eventName] == 'function';\n }\n\n support[events[i]] = isSupported;\n }\n\n return support.touchstart && support.touchend && support.touchmove;\n } catch (err) {\n return false;\n }\n }", "function hasTouchSupport() {\n var support = {},\n events = ['touchstart', 'touchmove', 'touchend'],\n el = document.createElement('div'),\n i;\n\n try {\n for (i = 0; i < events.length; i++) {\n var eventName = events[i];\n eventName = 'on' + eventName;\n var isSupported = (eventName in el);\n\n if (!isSupported) {\n el.setAttribute(eventName, 'return;');\n isSupported = typeof el[eventName] == 'function';\n }\n\n support[events[i]] = isSupported;\n }\n\n return support.touchstart && support.touchend && support.touchmove;\n } catch (err) {\n return false;\n }\n }", "function hasTouchSupport() {\n\t var support = {},\n\t events = ['touchstart', 'touchmove', 'touchend'],\n\t el = document.createElement('div'),\n\t i;\n\n\t try {\n\t for (i = 0; i < events.length; i++) {\n\t var eventName = events[i];\n\t eventName = 'on' + eventName;\n\t var isSupported = eventName in el;\n\t if (!isSupported) {\n\t el.setAttribute(eventName, 'return;');\n\t isSupported = typeof el[eventName] == 'function';\n\t }\n\t support[events[i]] = isSupported;\n\t }\n\t return support.touchstart && support.touchend && support.touchmove;\n\t } catch (err) {\n\t return false;\n\t }\n\t }", "function hasTouchSupport() {\n var support = {}, events = ['touchstart', 'touchmove', 'touchend'],\n el = document.createElement('div'), i;\n\n try {\n for(i=0; i<events.length; i++) {\n var eventName = events[i];\n eventName = 'on' + eventName;\n var isSupported = (eventName in el);\n if (!isSupported) {\n el.setAttribute(eventName, 'return;');\n isSupported = typeof el[eventName] == 'function';\n }\n support[events[i]] = isSupported;\n }\n return support.touchstart && support.touchend && support.touchmove;\n }\n catch(err) {\n return false;\n }\n }", "function canUse() {\n return fsevents && Object.keys(FSEventsWatchers).length < 128;\n}", "function applyPassive(globalObj) {\n if (globalObj === void 0) {\n globalObj = window;\n }\n return supportsPassiveOption(globalObj) ? { passive: true } : false;\n}", "function detectTouchSupport() {\n msGesture = navigator && navigator.msPointerEnabled && navigator.msMaxTouchPoints > 0 && MSGesture;\n var touchSupport = ((\"ontouchstart\" in window) || msGesture || (window.DocumentTouch && document instanceof DocumentTouch));\n return touchSupport;\n}", "function detectTouchSupport() {\n msGesture = navigator && navigator.msPointerEnabled && navigator.msMaxTouchPoints > 0 && MSGesture;\n var touchSupport = ((\"ontouchstart\" in window) || msGesture || (window.DocumentTouch && document instanceof DocumentTouch));\n return touchSupport;\n}", "addEventListeners() {\n document.addEventListener('keydown', (e) => {\n this.eventListener(e, true);\n });\n document.addEventListener('keyup', (e) => {\n this.eventListener(e, false);\n });\n }", "function detectTouchSupport( ){\n msGesture = navigator && navigator.msPointerEnabled && navigator.msMaxTouchPoints > 0 && MSGesture;\n var touchSupport = ((\"ontouchstart\" in window) || msGesture || (window.DocumentTouch && document instanceof DocumentTouch));\n return touchSupport;\n}", "function checkEventSystem(){\n var eventready = true;\n \n var retTxtDebug = '';\n \n //basic DOM Level 2 event handlers\n var functionUsed = [\"addEventListener\", \"removeEventListener\"];\n \n for (var idx in functionUsed){\n if ( !(functionUsed[idx] in window) || typeof( window[functionUsed[idx]]) != \"function\"){\n retTxtDebug = retTxtDebug + functionUsed[idx] + \" function missing\\n\"; //collect all missing functions\n eventready = false;\n }\n }\n \n return eventready;\n}", "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }", "function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n }" ]
[ "0.85111904", "0.85111904", "0.85000587", "0.8482704", "0.82928735", "0.8228379", "0.8173452", "0.79817176", "0.794401", "0.794401", "0.794401", "0.794401", "0.7824472", "0.7824472", "0.78019863", "0.71393776", "0.7094613", "0.7094613", "0.6954576", "0.68344545", "0.6763579", "0.6763579", "0.673655", "0.634293", "0.634293", "0.63421667", "0.63071936", "0.6283105", "0.6283105", "0.6269011", "0.6268186", "0.6201383", "0.6152081", "0.60653365", "0.6003296", "0.5870561", "0.5845211", "0.58412886", "0.5817518", "0.5802007", "0.57772064", "0.576722", "0.57623833", "0.5756642", "0.5750836", "0.57474977", "0.57474977", "0.57474977", "0.57474977", "0.5746858", "0.5729764", "0.5729764", "0.5713454", "0.5685111", "0.5685111", "0.5685111", "0.5685111", "0.5685111", "0.5685111", "0.56220126", "0.5583682", "0.5582637", "0.5576187", "0.5564914", "0.5517897", "0.5508626", "0.54606354", "0.54590833", "0.54590833", "0.5458791", "0.5457146", "0.54526174", "0.5449268", "0.544889", "0.54468626", "0.5435522", "0.5435522", "0.5432961", "0.5425236", "0.5425236", "0.5417506", "0.5412675", "0.54090077", "0.540764", "0.53909576", "0.53909576", "0.53897256", "0.5380342", "0.53780717", "0.5377266", "0.5377266", "0.5377266", "0.5377266", "0.5377266", "0.5377266", "0.5377266", "0.5377266" ]
0.73151404
16
Save the tab state for an element.
function saveElementTabState(el) { if (el.hasAttribute('tabindex')) { el.setAttribute(TAB_DATA, el.getAttribute('tabindex')); } el.setAttribute(TAB_DATA_HANDLED, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveElementTabState(el) {\n if (el.hasAttribute(\"tabindex\")) {\n el.setAttribute(TAB_DATA, el.getAttribute(\"tabindex\"));\n }\n el.setAttribute(TAB_DATA_HANDLED, true);\n}", "function saveTab(e) {\n\n var currentTabId = $(e.target).attr('href'),\n stateObject = {\n tabID: currentTabId,\n url: window.location.pathname\n };\n\n sessionStorage.setItem('StateObject', JSON.stringify(stateObject));\n }", "function saveTab() {\n (debug?console.log(\"\\n__________saveTab \" + list.getActiveTab().getPath()):null);\n if (list.getActiveTabIndex() != undefined){\n list.saveContentActive(editor.getValue());\n\t }\n}", "save() {\n this.currentTabView.save();\n }", "function restoreElementTabState(el) {\n // Only modify elements we've already handled, in case anything was dynamically added since we saved state.\n if (el.hasAttribute(TAB_DATA_HANDLED)) {\n if (el.hasAttribute(TAB_DATA)) {\n el.setAttribute('tabindex', el.getAttribute(TAB_DATA));\n el.removeAttribute(TAB_DATA);\n } else {\n el.removeAttribute('tabindex');\n }\n el.removeAttribute(TAB_DATA_HANDLED);\n }\n}", "function restoreElementTabState(el) {\n // Only modify elements we've already handled, in case anything was dynamically added since we saved state.\n if (el.hasAttribute(TAB_DATA_HANDLED)) {\n if (el.hasAttribute(TAB_DATA)) {\n el.setAttribute('tabindex', el.getAttribute(TAB_DATA));\n el.removeAttribute(TAB_DATA);\n } else {\n el.removeAttribute('tabindex');\n }\n el.removeAttribute(TAB_DATA_HANDLED);\n }\n}", "function restoreElementTabState(el) {\n // Only modify elements we've already handled, in case anything was dynamically added since we saved state.\n if (el.hasAttribute(TAB_DATA_HANDLED)) {\n if (el.hasAttribute(TAB_DATA)) {\n el.setAttribute('tabindex', el.getAttribute(TAB_DATA));\n el.removeAttribute(TAB_DATA);\n } else {\n el.removeAttribute('tabindex');\n }\n el.removeAttribute(TAB_DATA_HANDLED);\n }\n}", "function restoreElementTabState(el) {\n // Only modify elements we've already handled, in case anything was dynamically added since we saved state.\n if (el.hasAttribute(TAB_DATA_HANDLED)) {\n if (el.hasAttribute(TAB_DATA)) {\n el.setAttribute('tabindex', el.getAttribute(TAB_DATA));\n el.removeAttribute(TAB_DATA);\n } else {\n el.removeAttribute('tabindex');\n }\n el.removeAttribute(TAB_DATA_HANDLED);\n }\n}", "function restoreElementTabState(el) {\n // Only modify elements we've already handled, in case anything was dynamically added since we saved state.\n if (el.hasAttribute(TAB_DATA_HANDLED)) {\n if (el.hasAttribute(TAB_DATA)) {\n el.setAttribute('tabindex', el.getAttribute(TAB_DATA));\n el.removeAttribute(TAB_DATA);\n } else {\n el.removeAttribute('tabindex');\n }\n el.removeAttribute(TAB_DATA_HANDLED);\n }\n}", "function restoreElementTabState(el) {\n // Only modify elements we've already handled, in case anything was dynamically added since we saved state.\n if (el.hasAttribute(TAB_DATA_HANDLED)) {\n if (el.hasAttribute(TAB_DATA)) {\n el.setAttribute(\"tabindex\", el.getAttribute(TAB_DATA));\n el.removeAttribute(TAB_DATA);\n }\n else {\n el.removeAttribute(\"tabindex\");\n }\n el.removeAttribute(TAB_DATA_HANDLED);\n }\n}", "function saveState() {\n\t\tvar cookieData;\n\t\tif (!!elToPaste) {\n\t\t\tcookieData = [escape(elToPaste.type), escape(elToPaste.name), escape(elToPaste.cmd)];\n\t\t\tcookieData = escape(cookieData.join(','));\n\t\t\tsetCookie(save_file_cookie, cookieData);\n\t\t}\n\t\tcookieData = [escape(cur_path), escape(view_type)];\n\t\tsetCookie(save_inf_cookie, escape(cookieData));\n\t}", "function setTabState() {\n for (var i = 0; i <= tabObjects.length - 1; i++) {\n // for each tab\n\n var thisTab = tabObjects[i]; // create variable for current tab object\n\n if (thisTab.tabNumber === 1) {\n // if the first tab\n thisTab.state = \"active\"; // set state to \"active\"\n currentTab = thisTab; // set initial value for variable \"currentTab\"\n }\n // apply states to elements\n if (thisTab.state === \"active\") {\n // if state is active\n thisTab.current.setAttribute(attrTab, \"active\"); // set tab attribute to active\n thisTab.panelEl.setAttribute(attrPanel, \"active\"); // set panel attribute to active\n thisTab.icon = \"minus\"; // set icon status to expanded\n } else {\n thisTab.current.setAttribute(attrTab, \"\"); // set tab attribute to empty value\n thisTab.panelEl.setAttribute(attrPanel, \"\"); // set panel attribute to empty value\n thisTab.icon = \"plus\"; // set icon status to collapsed\n }\n setIcon(); // run function \"setIcon\" to update graphic for tab status\n }\n }", "function saveCurrentTabPosition() {\n var scrollTop = 0;\n var currentTabButtonId = getCurrentTabButtonId();\n if (typeof currentTabButtonId != 'undefined') {\n scrollTop = $(window).scrollTop();\n $('#' + currentTabButtonId).attr('scrollTop', scrollTop);\n $('#' + currentTabButtonId).attr('currentTabEntryId', currentTabEntryId);\n }\n//console.log('save:' + currentTabButtonId + ',' + scrollTop); \n }", "save() {\n localStorage.setItem(\"state\", this.getStateString());\n if (this.debug) {\n console.log(\"state saved\");\n console.log(this.state);\n }\n }", "function saveState() {\n if (selectedSemName != null &&\n selectedCourse != null &&\n selectedTab != null) {\n port.postMessage({\n note: \"state\",\n state: {\n semester: selectedSemName,\n course: selectedCourse.key,\n tab: selectedTab.getAttribute(\"attribute\")\n }\n });\n }\n}", "function saveCurrentState() {\r\n console.log(document.getElementById('output').innerHTML);\r\n localStorage.setItem('currentState_BookID=' + bookID, document.getElementById('output').innerHTML);\r\n }", "function saveFAState () {\n\t\tvar data = serialize(g);\n\t\tundoStack.push(data);\n\t\tredoStack = [];\n\t\tdocument.getElementById(\"undoButton\").disabled = false;\n\t\tdocument.getElementById(\"redoButton\").disabled = true;\n\t\tif (undoStack.length > 20) {\n\t\t\tundoStack.shift();\n\t\t}\n\t}", "function saveState () {\n winston.info('Saving current state');\n jsonfile.writeFileSync(STATE_FILE, {\n subscriptions: subscriptions,\n callback: callback,\n history: history,\n version: CURRENT_VERSION\n }, {\n spaces: 4\n });\n}", "function setTabActive(tab){tabVisited[tab]=true;$(\"#\" + tab).removeClass(\"inactive\")}", "function saveState(state) {\n // Save a copy to the metadata\n utils.setCellMeta(\n cell,\n 'viewCell.outputWidgetState',\n JSON.parse(JSON.stringify(state))\n );\n }", "function saveState() {\n\tlocalStorage.setItem('toDoState', document.getElementById(\"ul-task-list\").innerHTML);\n}", "function appxSetTabElement(wori, $tag) {\r\n try {\r\n if (wori && $tag) {\r\n var saveTabElement = function saveTabElement(wdgt) {\r\n if (!wdgt || wdgt.wEnabled != false) {\r\n if (!appx_session.tablist) {\r\n appx_session.tablist = [];\r\n }\r\n var tab = appx_session.tablist;\r\n var lvl = (wdgt ? parseInt(wdgt.wTabGroup) : 0);\r\n var grp = \"grp-\" + (wdgt ? wdgt.wTabSubGroupId || '0' : '0');\r\n //if level is not a number then we assign it 0 as default\r\n if (isNaN(lvl)) {\r\n lvl = 0;\r\n }\r\n /*if item is in default group and a button then we set\r\n **its group differently to allow for different tab order*/\r\n\r\n if (grp == \"grp-0\" && wdgt.wWidgetType == WIDGET_TYPE_BUTTON) {\r\n grp = \"grp-dfltButtons\";\r\n }\r\n var obj = {\r\n 'grp': grp,\r\n 'tag': $tag\r\n };\r\n\r\n tab[lvl] = tab[lvl] || [];\r\n if (!tab[lvl][grp]) {\r\n tab[lvl][grp] = [];\r\n }\r\n tab[lvl][grp].push(obj);\r\n }\r\n };\r\n\r\n if (wori.hasOwnProperty(\"wWidgetType\")) { //button widget\r\n if (parseInt(wori.wWidgetType) == WIDGET_TYPE_BUTTON) {\r\n saveTabElement(wori);\r\n }\r\n } else if (wori.hasOwnProperty(\"widget\") && wori.widget) { //modifiable item\r\n if (appxIsModifiable(wori)) {\r\n if (!$tag.prop(\"disabled\")) {\r\n saveTabElement(wori.widget);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (ex) {\r\n console.log(\"appxSetTabElement: \" + ex);\r\n console.log(ex.stack);\r\n }\r\n}", "function saveState(name, value) {\n command_1.issueCommand(\"save-state\", { name }, value);\n }", "function saveState(key, state) {\n window.localStorage.setItem(key, JSON.stringify(state))\n}", "saveState() {\n const that = this;\n\n if (!that.id) {\n that.warn(that.localize('noId'));\n return;\n }\n\n //Save to LocalStorage\n window.localStorage.setItem('jqxDockingLayout' + that.id, JSON.stringify(that.getJSONStructure()));\n }", "static save() {\n const nodes = this._nodes;\n\n const state = {};\n\n nodes.forEach((container, index) => {\n const chart = {\n chartId: container.querySelector('.container-outer').id,\n containerId: container.id\n };\n state['chart' + index] = chart;\n });\n\n localStorage.setItem('state', JSON.stringify(state));\n }", "function saveData(){\n chrome.storage.local.set({'tabDict': myTabDict}, function() {\n console.log('Value is set to ' + myTabDict);\n });\n}", "save() {\n localStorage.setItem(\"game\", JSON.stringify(state))\n }", "function stateSaveCallback(settings, data) {\n var stado = $('#GIbuscarIdeaInnovadora').DataTable().state();\n localStorage.setItem('GIbuscarIdeaInnovadora' + window.location.pathname, JSON.stringify(stado))\n }", "function save() {\n // clear the redo stack\n redo = [];\n if (!reDo.classList.contains('disabled')) {\n reDo.classList.add('disabled');\n }\n // initial call won't have a state\n if (state) {\n undo.push(state);\n unDo.classList.remove(\"disabled\");\n }\n state = JSON.stringify(canvas);\n}", "handleTabChange(index){\n let state = Session.get('practitionerCardState');\n state[\"index\"] = index;\n Session.set('practitionerCardState', state);\n }", "save() {\n if (this.stateFilePath) {\n const state = removeUnsaved(clone(this.state()), this.unsavedSlots, this.beforeLoadAndSave);\n this.log('removeUnsaved(clone(this.state()), this.unsavedSlots, this.beforeLoadAndSave)');\n const savedState = saveState({\n stateFilePath: this.stateFilePath,\n schemaVersion: this.schemaVersion,\n state,\n lastSavedState: this.lastSavedState\n });\n\n if (savedState) {\n this.log('state did save');\n this.lastSavedState = savedState;\n } else {\n this.log('state did not save');\n }\n }\n }", "function saveState(name, value) {\n command.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command.issueCommand('save-state', { name }, value);\n}", "function save(onSaved) {\n\t\t// store as an object\n\t\tvar store = {};\n\n\t\t//required inputs\n\t\tif (!birthDateInput.value || !lifeInput.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tstore[STORAGE_BIRTH_NAME] = birthDateInput.value;\n\t\tstore[STORAGE_LIFE_NAME] = parseInt(lifeInput.value);\n\t\tstore[STORAGE_FASTCOUNT_NAME] = fastCountInput.checked;\n\t\tstore[STORAGE_COLORS_NAME] = [backColInput.value, textColInput.value, numColInput.value];\n\n\t\t//CALLBACK TO FINISH UP\n\t\tchrome.storage.sync.set({data: store}, onSaved);\n\t}", "function saveState(){\n var grid = gridState();\n var state = {grid:grid};\n state.level = $('#level').val();\n state.variant = options.variant;\n $.bbq.pushState(state);\n }", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}", "function saveText(event) {\n var saved = ( $(this).parent().children().eq(1) ).val();\n //console.log(saved);\n var index = $(this).parent().children().eq(1).attr(\"index\");\n //console.log(index);\n textStorage[index] = saved;\n \n $(this).parent().children().eq(2).attr(\"class\", \"saveBtn\");\n $(this).parent().children().eq(2).children().attr(\"class\", \"fas fa-save\");\n //console.log(save);\n //console.log(textStorage);\n localStorage.setItem(\"hour_planner\", JSON.stringify(textStorage));\n}", "function save_options() {\n var tts = \"\";\n var elements = document.getElementsByName(\"uniquetab\");\n for (var i = 0; i < elements.length; i++)\n if (elements[i].checked)\n tts = elements[i].value;\n chrome.storage.sync.set({\n time2save: tts\n });\n}", "function saveElementStyles(elem, styles) {\n lastElem = elem;\n lastElemStyle = getStyleList(elem, styles);\n}", "function saveState() {\n var elements = $('#spacegallery').find('div.dragImg');\n $.map(elements, function(ele){\n var tmpEle = $(ele);\n var eleStyle = tmpEle.attr('style').replace(/;/g, '=');\n eleStyle = eleStyle.replace(/,/g, 'lorem');\n\n var childEle = tmpEle.find('img.dragImg');\n var childStyle = childEle.attr('style').replace(/;/g, '=');\n childStyle = childStyle.replace(/,/g, 'lorem');\n imgObj = {\n id : childEle.attr('id'),\n style : childStyle,\n src : childEle.attr('src')\n };\n\n var saveObj = {\n id : tmpEle.attr('id'),\n style : eleStyle,\n childEle : imgObj\n };\n spaceEle[tmpEle.attr('id')] = saveObj; \n });\n document.cookie = 'spaceItems='+ JSON.stringify(spaceEle);\n }", "function persistActiveElement() {\n\tlet active = document.querySelector('.active');\n\tif (active) {\n\t\tsessionStorage.setItem(ACTIVE_EL_STATE_KEY, active.id);\n\t} else {\n\t\tsessionStorage.removeItem(ACTIVE_EL_STATE_KEY);\n\t}\n}", "function saveAccordionState(enabledAccordions) {\n elements.enabledAccordions = enabledAccordions;\n localStorage['sunjer_enabledAccordions'] = enabledAccordions;\n}", "function save_history () {\n\tvar ds = currHds();\n\tedit_history [edit_history_index] = JSON.stringify(ds.toJSON());\n}", "function setTab(elem) {\n\t\t for (var i = 0; i < selectors.length; i++) {\n\t\t selectors[i].className = selectors[i].className.replace('on',' ');\n\t\t }\n\t\t elem.className += ' on';\n\t\t}", "function saveInput() {\n\t$(\"button\").on(\"click\", function () {\n\t\tevent.preventDefault(event);\n\t\tvar button = $(this);\n\n\t\tlocalStorage.setItem(\n\t\t\tbutton[0].form.nextElementSibling.dataset.value,\n\t\t\tbutton[0].form[0].value\n\t\t);\n\t});\n}", "static saveState() {\n\t\t//Cookie data\n\t\tvar cdata = \"\";\n\t\t//Get the cards\n\t\tvar cards = CardManager.getCardsOrdered();\n\t\t//Check each card\n\t\tfor(var i = 0; i < cards.length; i++) {\n\t\t\t//Add the card name to the list\n\t\t\tcdata += cards[i].getAttribute(\"cardname\") + \",\";\n\t\t}\n\t\t//Save the cookie\n\t\tdocument.cookie = \"cardstate=\" + cdata.substring(0, cdata.length - 1);\n\t\t//Log\n\t\tconsole.log(\"Card state saved as \" + cdata.substring(0, cdata.length - 1));\n\t}", "function saveCurrentTab(){\n chrome.tabs.getSelected(null,function(tab) {\n // create url object\n var myURL = {\n url: tab.url,\n title: tab.title\n };\n \n var folder = document.getElementById(\"curr-folder-name\").innerHTML\n if (!myTabDict[folder].urlSet.includes(myURL.url)){\n addTabToFolder(myURL, folder)\n saveData();\n updateURLS(folder);\n } \n });\n \n}", "function saveWallet() {\n localStorage.setItem(\"currentWallet\", JSON.stringify(currentWallet));\n}", "saveToStorage() {\r\n localStorage.setItem('accountList', JSON.stringify(this._accountList));\r\n localStorage.setItem('settings', JSON.stringify(this._settings));\r\n localStorage.setItem('lastAssignedID', JSON.stringify(this._lastAssignedID));\r\n }", "function stateSaveCallback(settings, data) {\n var stado = $('#GIMitecnologialicenciada').DataTable().state();\n localStorage.setItem('GIMitecnologialicenciada' + window.location.pathname, JSON.stringify(stado))\n }", "handleTabChange(index){\n let state = Session.get('patientCardState');\n state[\"index\"] = index;\n Session.set('patientCardState', state);\n }", "function saveState(theme) {\n\t\t if (storageAvailable('sessionStorage')) {\n\t\t\t // Great! We can use sessionStorage awesomeness\n\t\t\t if (theme !== null) {\n\t\t\t\t console.log('Saving user selection to session storage.');\n\t\t\t\t sessionStorage.setItem('currentTheme', theme);\n\t\t\t }\n\t\t }\n\t\t else {\n\t\t\t // Too bad, no sessionStorage for us\n\t\t\t console.warn('Storage [sessionStorage] no available. Can\\'t store user selected theme.');\n\t\t }\n\t }", "function saveState() {\n localStorage.setItem('Game.State', JSON.stringify({\n matchingCardState: state.matchingCard !== null ? state.matchingCard.state : null,\n isMatching: state.isMatching,\n totalMoves: state.totalMoves,\n cardStates: [...cardDeck.cards.map(x => x.state)],\n elapsedSeconds: state.elapsedSeconds,\n isGameOver: state.isGameOver\n }));\n\n let remainingStars = calculateRemainingStars();\n displayStars(remainingStars);\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}", "saveState(){\n localStorage.setObj('followedCheck', this);\n }", "function saveToStorage(){\n\tchrome.storage.sync.set(settings);\n}", "function saveState() {\n if (currentView) {\n currentView.checkpoint();\n }\n ConferenceApp.State.local.navigationState = WinJS.Navigation.history;\n }", "retabinate_() {\n if (!this.inert_) {\n return;\n }\n\n const elements = this.adapter_.getFocusableElements();\n if (elements) {\n for (let i = 0; i < elements.length; i++) {\n this.adapter_.restoreElementTabState(elements[i]);\n }\n }\n\n this.inert_ = false;\n }" ]
[ "0.8104532", "0.68847257", "0.685849", "0.66187537", "0.6336098", "0.6336098", "0.6336098", "0.6336098", "0.6336098", "0.6285907", "0.6154319", "0.6047495", "0.6019238", "0.6017233", "0.5972284", "0.59678423", "0.5955725", "0.59455085", "0.59101593", "0.58185434", "0.58170676", "0.58094805", "0.5809258", "0.5778839", "0.5776888", "0.5766732", "0.5736003", "0.56893367", "0.5663614", "0.56341016", "0.5618354", "0.5594591", "0.5592706", "0.5592706", "0.55921966", "0.558331", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573101", "0.5573096", "0.5571469", "0.5568333", "0.5564419", "0.55626976", "0.5543889", "0.5512756", "0.5502551", "0.5502168", "0.5498942", "0.5493735", "0.54849285", "0.5471206", "0.546997", "0.54673386", "0.5463328", "0.5437555", "0.54350966", "0.5432581", "0.54245615", "0.54154056", "0.54133105" ]
0.81277484
2
Restore the tab state for an element, if it was saved.
function restoreElementTabState(el) { // Only modify elements we've already handled, in case anything was dynamically added since we saved state. if (el.hasAttribute(TAB_DATA_HANDLED)) { if (el.hasAttribute(TAB_DATA)) { el.setAttribute('tabindex', el.getAttribute(TAB_DATA)); el.removeAttribute(TAB_DATA); } else { el.removeAttribute('tabindex'); } el.removeAttribute(TAB_DATA_HANDLED); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restoreElementTabState(el) {\n // Only modify elements we've already handled, in case anything was dynamically added since we saved state.\n if (el.hasAttribute(TAB_DATA_HANDLED)) {\n if (el.hasAttribute(TAB_DATA)) {\n el.setAttribute(\"tabindex\", el.getAttribute(TAB_DATA));\n el.removeAttribute(TAB_DATA);\n }\n else {\n el.removeAttribute(\"tabindex\");\n }\n el.removeAttribute(TAB_DATA_HANDLED);\n }\n}", "function restoreTab() {\n var stateObject = JSON.parse(sessionStorage.getItem('StateObject')),\n storedTabId = stateObject.tabID,\n currentTab = mahara.tabnav.find('a[href^=\"'+ storedTabId +'\"]');\n\n if(currentTab.length > 0){\n currentTab.tab('show');\n }\n }", "retabinate_() {\n if (!this.inert_) {\n return;\n }\n\n const elements = this.adapter_.getFocusableElements();\n if (elements) {\n for (let i = 0; i < elements.length; i++) {\n this.adapter_.restoreElementTabState(elements[i]);\n }\n }\n\n this.inert_ = false;\n }", "retabinate_() {\n if (!this.inert_) {\n return;\n }\n\n const elements = this.adapter_.getFocusableElements();\n if (elements) {\n for (let i = 0; i < elements.length; i++) {\n this.adapter_.restoreElementTabState(elements[i]);\n }\n }\n\n this.inert_ = false;\n }", "function saveElementTabState(el) {\n if (el.hasAttribute('tabindex')) {\n el.setAttribute(TAB_DATA, el.getAttribute('tabindex'));\n }\n el.setAttribute(TAB_DATA_HANDLED, true);\n}", "function saveElementTabState(el) {\n if (el.hasAttribute('tabindex')) {\n el.setAttribute(TAB_DATA, el.getAttribute('tabindex'));\n }\n el.setAttribute(TAB_DATA_HANDLED, true);\n}", "function saveElementTabState(el) {\n if (el.hasAttribute('tabindex')) {\n el.setAttribute(TAB_DATA, el.getAttribute('tabindex'));\n }\n el.setAttribute(TAB_DATA_HANDLED, true);\n}", "function saveElementTabState(el) {\n if (el.hasAttribute('tabindex')) {\n el.setAttribute(TAB_DATA, el.getAttribute('tabindex'));\n }\n el.setAttribute(TAB_DATA_HANDLED, true);\n}", "function saveElementTabState(el) {\n if (el.hasAttribute('tabindex')) {\n el.setAttribute(TAB_DATA, el.getAttribute('tabindex'));\n }\n el.setAttribute(TAB_DATA_HANDLED, true);\n}", "function saveElementTabState(el) {\n if (el.hasAttribute(\"tabindex\")) {\n el.setAttribute(TAB_DATA, el.getAttribute(\"tabindex\"));\n }\n el.setAttribute(TAB_DATA_HANDLED, true);\n}", "restoreState($elem) {\n let data = Storages.localStorage.get(StateTogglerStorage.STORAGE_KEY_NAME);\n if (data instanceof Array)\n $elem.addClass(data.join(' '));\n }", "detabinate_() {\n if (this.inert_) {\n return;\n }\n\n const elements = this.adapter_.getFocusableElements();\n if (elements) {\n for (let i = 0; i < elements.length; i++) {\n this.adapter_.saveElementTabState(elements[i]);\n this.adapter_.makeElementUntabbable(elements[i]);\n }\n }\n\n this.inert_ = true;\n }", "detabinate_() {\n if (this.inert_) {\n return;\n }\n\n const elements = this.adapter_.getFocusableElements();\n if (elements) {\n for (let i = 0; i < elements.length; i++) {\n this.adapter_.saveElementTabState(elements[i]);\n this.adapter_.makeElementUntabbable(elements[i]);\n }\n }\n\n this.inert_ = true;\n }", "__restore() {\n this._restoreNode = this._isolatedNodes.pop(); // store the node for automation purposes\n\n // Update the options state\n this.getOptions()['isolatedNode'] =\n this._isolatedNodes.length > 0\n ? this._isolatedNodes[this._isolatedNodes.length - 1].getId()\n : null;\n\n var currentNavigable = this.getEventManager().getFocus();\n if (currentNavigable) currentNavigable.hideKeyboardFocusEffect();\n\n // after we restore the full tree, set keyboard focus on the node that was previously isolated\n this.__setNavigableIdToFocus(this._restoreNode.getId());\n\n // Update state\n this.dispatchEvent(EventFactory.newTreemapIsolateEvent());\n\n // Layout the isolated node and its children\n this._isolateRestoreLayout = true;\n this.Layout(new Rectangle(0, 0, this.Width, this.Height));\n this._isolateRestoreLayout = false;\n\n // Render the changes\n this._renderIsolateRestore(this._restoreNode);\n this._restoreNode = null;\n }", "function checkSavedTab() {\n var currentPath = window.location.pathname,\n stateObject = JSON.parse(sessionStorage.getItem('StateObject'));\n\n if(stateObject === null || stateObject.url === undefined){\n return;\n }\n\n if(currentPath === stateObject.url) {\n restoreTab();\n }\n }", "function restore_options(element) {\r\n document.getElementById(element).value = localStorage[element];\r\n}", "restoreElement(element) {\n if (!element) return;\n // FIX: it has to remember the previous values\n element.style.zIndex = 0;\n element.style.position = 'static';\n }", "restoreState() {\n const rawData = document.getElementById('rawState').value;\n localStorage.setItem('data', rawData);\n _.assign(this.$data, JSON.parse(rawData));\n this.updateNbAvailableFragsPerStage();\n }", "function restoreState() {\n\t\t if (storageAvailable('sessionStorage')) {\n\t\t\t // Great! We can use sessionStorage awesomeness\n\t\t\t console.log('Restoring user selection from session storage.');\n\t\t\t window.init.theme = sessionStorage.getItem('currentTheme');\n\n\t\t\t // toggle theme buttons\n\t\t\t // switchButtons();\n\t\t }\n\t\t else {\n\t\t\t // Too bad, no sessionStorage for us\n\t\t\t console.warn('Storage [sessionStorage] no available. Can\\'t restore user selected theme.');\n\t\t }\n\t }", "saveFocus(){\n\t\tthis.previouslyFocussedElement = document.activeElement || null;\n\t}", "function resetTab() {\n let items = [\"icon\", \"title\"];\n\n items.forEach(item =>\n localStorage.removeItem(item));\n window.location.reload();\n pageicon();\n}", "@action.bound restore() {\n const state = localStorage.getItem(this.cookieName());\n this.deserialize(state);\n }", "function saveTab() {\n (debug?console.log(\"\\n__________saveTab \" + list.getActiveTab().getPath()):null);\n if (list.getActiveTabIndex() != undefined){\n list.saveContentActive(editor.getValue());\n\t }\n}", "restore() {\r\n this.deleted = false;\r\n }", "function restoreState() {\n\t\tvar cookieData;\n\t\tif (!elToPaste) {\n\t\t\tcookieData = getCookie(save_file_cookie);\n\t\t\tif (cookieData != null) {\n\t\t\t\tcookieData = cookieData.split(',');\n\t\t\t\telToPaste = {type: unescape(unescape(cookieData[0])), name: unescape(unescape(cookieData[1])), cmd: unescape(unescape(cookieData[2]))};\n\t\t\t}\n\t\t}\n\t\tcookieData = getCookie(save_inf_cookie);\n\t\tif (cookieData != null) {\n\t\t\tcookieData = cookieData.split(',');\n\t\t\tif ((cookieData[0] != '') || (cookieData[0] != '/')) {\n\t\t\t\tcur_path = unescape(cookieData[0]);\n\t\t\t}\n\t\t\tview_type = cookieData[1];\n\t\t}\n\t}", "restore() {\n if(this.saved.caret)\n this.set(this.saved.startNodeIndex, this.saved.startOffset);\n else\n this.set(this.saved.startNodeIndex, this.saved.startOffset,\n this.saved.endNodeIndex, this.saved.endOffset);\n }", "function restoreState(){\r\n\t// Get the JSON file\r\n\tvar myFileURL = getParam(\"author\") + \"/set\" + getParam(\"hmwkSet\") + \"/\" + getParam(\"fileName\") + \".json\";//\"/webwork2/courses/\" + getParam(\"author\") + \"/set\" + getParam(\"hmwkSet\") + \"/\" + getParam(\"fileName\") + \".json\";\r\n\tif(getParam(\"author\") != \"\" && getParam(\"hmwkSet\") != \"\" && getParam(\"fileName\") != \"\")\r\n\t\talert(\"Restore JSON file from: \" + myFileURL);\r\n\t// Parse the JSON file into a JSON object\r\n\t$.getJSON(myFileURL, function(JSONObject){\r\n\t\t// Replace the fields in the form with the ones in the JSON object\r\n\t\tfor(var elementId in JSONObject){\r\n\t\t\tvar formElement = $(\"#\" + elementId);\r\n\t\t\tvar formElementType = formElement.attr(\"type\");\r\n\t\t\tvar formElementValue = JSONObject[elementId];\r\n\t\t\t// Restore the value of the test input in HTML form\r\n\t\t\tif(formElementType == \"text\"){\r\n\t\t\t\tformElement.val(formElementValue);\r\n\t\t\t}\r\n\t\t\t// Restore the value of the radio button in HTML form\r\n\t\t\telse if(formElementType == \"radio\"){\r\n\t\t\t\tif(formElementValue == \"true\")\r\n\t\t\t\t\tformElement.prop(\"checked\", true);\r\n\t\t\t}\r\n\t\t\t// Restore the value of the checkbos in HTML form\r\n\t\t\telse if(formElementType == \"checkbox\"){\r\n\t\t\t\tif(formElementValue == \"true\")\r\n\t\t\t\t\tformElement.prop(\"checked\", true);\r\n\t\t\t\telse\r\n\t\t\t\t\tformElement.prop(\"checked\", false);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}", "function _storePreviousFocus(element) {\n if (element) {\n _Overlay._Overlay._ElementWithFocusPreviousToAppBar = element;\n }\n }", "function resetState() {\n focusLaterElements = [];\n}", "restoreAll() {\n const all = window.localStorage.getItem('state');\n if (all !== null)\n this.loadAll(all);\n }", "save() {\n this.currentTabView.save();\n }", "function backt2() {\n var tabstate = JSON.parse(nsISessionStore.getTabState(tabs.getTab()));\n tabstate.index = Math.max(tabstate.index-1, 0);\n var newtabstate = JSON.stringify(tabstate);\n var newtab = gBrowser.addTab('');\n var newtab_pos = newtab._tPos;\n nsISessionStore.setTabState(tabs.getTab(newtab_pos), newtabstate);\n gBrowser.selectedTab = newtab;\n}", "function restore() {\n var i = 0;\n var list;\n while (that.data.lists[i] !== undefined) {\n list = that.data.lists[i];\n if (list.tChecked) {\n that.data.lists.splice(i, 1);\n removeListOnStorage(list.id, that.config.listKey);\n // make sure the list won't be checked if it ends in trash can again\n resetTchecked(list);\n gevent.fire(\"updateList\", list);\n } else {\n i++;\n }\n }\n }", "function _restorePreviousFocus() {\n _Overlay._Overlay._trySetActive(_Overlay._Overlay._ElementWithFocusPreviousToAppBar);\n }", "function restore() {\n\n //get the content from local storage\n const savedContent = localStorage.getItem('AutoSave' + document.location);\n\n //if it found some\n if (savedContent) {\n //grab the editor\n document.getElementById('content').innerHTML =savedContent;\n\n }\n }", "function _revert_tab(tab) {\r\n /* remove active class from all tabs */\r\n $('.js_publisher-tab').removeClass('active');\r\n /* add active class for current tab */\r\n $('.js_publisher-tab[data-tab=\"'+tab+'\"]').addClass('active');\r\n /* update textarea placeholder */\r\n $('.publisher textarea').attr('placeholder', $('.publisher textarea').data('init-placeholder')).focus();\r\n /* show photos uploader */\r\n $('.js_publisher-photos').show();\r\n /* show publisher location */\r\n $('.js_publisher-location').show();\r\n if($('.js_publisher-location').hasClass('active')) {\r\n $('.publisher-meta[data-meta=\"location\"]:hidden').show();\r\n }\r\n /* show publisher privacy */\r\n $('.js_publisher-privacy').show();\r\n /* hide & remove album meta */\r\n $('.publisher-meta[data-meta=\"album\"]').hide().find('input').val('');\r\n /* hide & remove poll meta */\r\n $('.publisher-meta[data-meta=\"poll\"]').hide().find('input').val('');\r\n /* hide & remove product meta */\r\n $('.publisher-meta[data-meta=\"product\"]').hide().find('input').val('');\r\n }", "function restore() {\n\tthis.className = 'regular';\n}", "function resetState$4() {\n focusLaterElements = [];\n}", "function undo () {\n\t\tremoveModeClasses();\n\t\tvar data = serialize(g);\n\t\tredoStack.push(data);\n\t\tdata = undoStack.pop();\n\t\tinitialize(data);\n\t\tdocument.getElementById(\"redoButton\").disabled = false;\n\t\tif(undoStack.length == 0) {\n\t\t\tdocument.getElementById(\"undoButton\").disabled = true;\n\t\t}\n\t}", "function restoreArea(navCounter)\r\n{\t\r\n\tcancelProcess();\r\n\tvar hiddenObj = getElemnt('navhidden'+navCounter);\r\n if (hiddenObj!= null && hiddenObj.value != \"\")\r\n {\r\n getElemnt('nav'+navCounter+'data'+InternalActiveTab).innerHTML = hiddenObj.value;\r\n hiddenObj.value = \"\";\r\n // clear the inner html (else scrolling will appear) the hide the navigation section\r\n getElemnt('nav'+navCounter+'views').innerHTML = \"\";\r\n hide('nav'+navCounter+'views');\r\n }\r\n //Tracker#:21129 - GLOBAL SEARCH - SEARCH BUTTON ON NON PLM SCREEN\r\n // When user clicks on any of the navigation area this function call will \r\n // reset the values set in the session for Global search.\r\n remGblSrchFromSession();\r\n}", "function undo(ele){\n\t\t\tvar instanceId = copiedStructure[1].instanceId;\n\n\t\t\tif($(\"[data-instance-id=\"+ instanceId +\"]\").length > 0){\n\t\t\t\tprotocolStructure.del(instanceId);\n\t\t\t} else {\n\t\t\t\tpaste(ele, lastDatePastedInto);\n\t\t\t}\n\t\t}", "function selectionRestore() {\n if (savedSelection) {\n rangy.restoreSelection(savedSelection);\n savedSelection = false;\n }\n}", "restore() {\n\t\tlet strData = localStorage.getItem('data');\n\t\tif (strData !== null && strData.length > 0) {\n\t\t\tlet data = JSON.parse(strData);\n\t\t\tif (data !== null) {\n\t\t\t\tlet newWFData = data.map(swfitem => new WorkflowItem(\n\t\t\t\t\tswfitem.id,\n\t\t\t\t\tswfitem.title,\n\t\t\t\t\tswfitem.parentID,\n\t\t\t\t\tswfitem.order,\n\t\t\t\t\tswfitem.done,\n\t\t\t\t\tReact.createRef()\n\t\t\t\t));\n\t\t\t\tthis.data = newWFData;\n\t\t\t\tthis.tree = this.makeTree();\n\t\t\t\tif (this.length > 0)\n\t\t\t\t\tthis.focusedRef = this.data[0].ref;\n\t\t\t}\n\t\t}\n\t}", "function reset(tab) {\n browser.tabs\n .removeCSS({file: \"view/reader.css\"})\n .then(() => {\n browser.tabs.sendMessage(tab.id, {\n command: \"reset\",\n });\n });\n}", "resetTab(name) {\n const canvas = this.#tabs[name].canvas;\n while (canvas.firstChild)\n canvas.firstChild.remove();\n }", "function resetEditor(element) {\r\n if (!element) {\r\n return;\r\n }\r\n\r\n let editor = element.querySelector(\".annotorious-editor-select\");\r\n let saveButton = element.querySelector(\".annotorious-editor-button-save\");\r\n\r\n //Check if dropdown menu was created\r\n if (!editor) {\r\n return;\r\n }\r\n\r\n // disable save button, because we reset to default (and invalid) option\r\n // just below\r\n saveButton.classList.add(\"annotorious-editor-save-disabled\");\r\n\r\n // Reset selection\r\n editor[0].selected = true;\r\n for (let option = 1; option < editor.childElementCount; option++) {\r\n editor[option].selected = false;\r\n }\r\n }", "function setTabActive(tab){tabVisited[tab]=true;$(\"#\" + tab).removeClass(\"inactive\")}", "resetLayout () {\n this.setState({layout: this.defaultLayout(this.state.editMode)}, () => this.force())\n localStorage.removeItem(this._key(this.state.editMode))\n }", "function restoreDirty( editor )\r\n\t{\r\n\t\tif ( !editor.checkDirty() )\r\n\t\t\tsetTimeout( function(){ editor.resetDirty(); }, 0 );\r\n\t}", "function delsaveButton(){\r\n localStorage.removeItem(\"save\")\r\n location.reload();\r\n}", "performAction() {\n const oldValue = this.activeId;\n const oldTab = oldValue !== undefined && oldValue !== null ? this.childItems.filter(i => i.newValue === oldValue)[0] : this.items[0];\n\n if (oldTab && this.activeItem) {\n oldTab.deactivate(this.activeItem.index);\n this.activeItem.activate(oldTab.index);\n }\n }", "restore() {\r\n this.native.restore();\r\n }", "function restoreAvatar() {\n var bookmarksObject = AvatarBookmarks.getBookmarks();\n\n if (bookmarksObject[CONFIG.STRING_BOOKMARK_NAME]) {\n AvatarBookmarks.loadBookmark(CONFIG.STRING_BOOKMARK_NAME);\n AvatarBookmarks.removeBookmark(CONFIG.STRING_BOOKMARK_NAME);\n setIsAviEnabledFalse();\n } else {\n Window.alert(\"No bookmark was saved in the avatar app.\");\n }\n }", "function restoreState() {\n resetState();\n let foundState = false\n try {\n foundState = parseState(decodeURIComponent(location.hash.substr(1)))\n } catch (e) { \n foundState = false\n }\n if (foundState) {\n console.log('Found saved state in url')\n } else {\n let name = puzzleId + '=';\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n foundState = parseState(c.substring(name.length, c.length));\n if (foundState) {\n console.log('Found saved state in cookie')\n }\n break\n }\n }\n }\n if (!foundState) {\n console.log('No saved state available')\n }\n for (let ci of allClueIndices) {\n // When restoring state, we reveal annos for fully prefilled entries.\n updateClueState(ci, true, null)\n }\n updateAndSaveState()\n}", "function restorePrevious() {\n\t\t\tif (hasSnapshot()) {\n\t\t\t\tsnap.history.pop();\n\t\t\t\tdoRollback();\n\t\t\t}\n\t\t}", "function restoreOptions() {\n var i, len, elements, elem, setting, set;\n\n elements = mainview.querySelectorAll('#skinSection input');\n for (i = 0, len = elements.length ; i < len ; i += 1) {\n elem = elements[i];\n if (elem.value === localStorage[elem.name]) {\n elem.checked = true;\n }\n else {\n elem.checked = false;\n }\n }\n\n elements = mainview.querySelectorAll('#dictSection select');\n for (i = 0, len = elements.length ; i < len ; i += 1) {\n elem = elements[i];\n elem.querySelector('option[value=' + localStorage[elem.name] + ']').selected = true;\n }\n\n\n elements = mainview.querySelectorAll('#captureSection tbody tr');\n setting = JSON.parse(localStorage.capture);\n for (i = 0, len = elements.length ; i < len ; i += 1) {\n elem = elements[i];\n set = setting[i];\n elem.querySelector('input').checked = set.status;\n elem.querySelector('select').value = set.assistKey;\n }\n }", "_reset() {\n\n this._buttonList.forEach( ( item ) => {\n if ( item.classList.contains( TabButton.CLASS.BUTTON_ACTIVE )) {\n item.classList.remove( TabButton.CLASS.BUTTON_ACTIVE );\n }\n });\n\n this._contentList.forEach( ( item ) => {\n if ( item.classList.contains( TabButton.CLASS.CONTENT_ACTIVE )) {\n item.classList.remove( TabButton.CLASS.CONTENT_ACTIVE );\n }\n });\n }", "function changed(element) {\n\telement.style.backgroundColor = 'blue';\n\telement.title = 'Unsaved changes';\n}", "function removeSaved(selectElement) {\n //if 'id' is not there, use 'name'\n var key = $(selectElement).attr('id');\n key = key ? key : $(selectElement).attr('name');\n window.localStorage.removeItem(key);\n }", "function restoreStudy(){\n $('[data-save]').each(function(){\n $(this).val(localStorage.getItem(prefix+'/'+currentTopic+'-'+$(this).attr('data-save')));\n });\n }", "function restore_options(storageName, elementId) {\n var favorite = localStorage[storageName];\n if (!favorite) {\n return;\n }\n var select = document.getElementById(elementId);\n for (var i = 0; i < select.children.length; i++) {\n var child = select.children[i];\n if (child.value == favorite) {\n child.selected = \"true\";\n break;\n }\n }\n}", "function restoreSnapshot() {\n let xmlText = localStorage.getItem(\"blockly.xml\");\n if (xmlText) {\n Blockly.mainWorkspace.clear();\n let xmlDom = Blockly.Xml.textToDom(xmlText);\n Blockly.Xml.domToWorkspace(xmlDom, Blockly.mainWorkspace);\n }\n displaySuccessNotification(\".menu\", \"Snapshot restored\");\n}", "onRestore() {\n this._updateModels();\n }", "handleResetButtonClick() {\n localStorage.removeItem('cardsState');\n window.location.reload();\n }", "function back() {\n setMode(history.pop());\n setHistory(history);\n }", "function clearTippedState() {\r\n\tupdateLocalStorage(\"firstTrans\", null, true);\r\n\tupdateLocalStorage(\"firstEnglish\", null, true);\r\n\tupdateLocalStorage(\"secondTrans\", null, true);\r\n\tupdateLocalStorage(\"secondEnglish\", null, true);\r\n}", "function restore_options() {\n // restore options for popupDisplay\n var selection = localStorage[\"popupDisplayOption\"];\n var radios = document.popupOptionsForm.tabCountRadios;\n if (!selection) {\n document.getElementById(\"defaultPopupSelection\").checked = true;\n }\n for (var i = 0; i < radios.length; i++) {\n if (radios[i].value == selection) {\n radios[i].checked = true;\n }\n }\n\n // restore options for tabDedupe\n document.getElementById(\"tabDedupe\").checked = Boolean(localStorage[\"tabDedupe\"]);\n\n // Restore tab janitor options.\n document.getElementById(\"tabJanitor\").checked = Boolean(localStorage[\"tabJanitor\"]);\n document.getElementById(\"tabJanitorDays\").value = localStorage[\"tabJanitorDays\"] || 5;\n\n}", "function saveState() {\n if (currentView) {\n currentView.checkpoint();\n }\n ConferenceApp.State.local.navigationState = WinJS.Navigation.history;\n }", "function restoreSettingValues() {\n browser.storage.local.get()\n .then(function(items) {\n document.getElementById(\"delayBeforeCleanInput\").value = items.delayBeforeClean;\n document.getElementById(\"activeModeSwitch\").checked = items.activeMode;\n\t\tdocument.getElementById(\"statLoggingSwitch\").checked = items.statLoggingSetting;\n document.getElementById(\"showNumberOfCookiesInIconSwitch\").checked = items.showNumberOfCookiesInIconSetting;\n document.getElementById(\"notifyCookieCleanUpSwitch\").checked = items.notifyCookieCleanUpSetting;\n document.getElementById(\"contextualIdentitiesEnabledSwitch\").checked = items.contextualIdentitiesEnabledSetting;\n\n });\n}", "function restore_options() {\n var curr_url = localStorage.getItem(\"sheet_url\");\n var curr_appname = localStorage.getItem(\"app_name\");\n $appName.value = curr_appname;\n\n if (curr_url === null || curr_url === \"\") {\n return false;\n } else {\n $sheet_url.value = curr_url;\n $save.textContent = \"update\";\n $sheetJump.href = curr_url;\n $sheetJump.style.display = \"block\";\n }\n }", "function saveTab(e) {\n\n var currentTabId = $(e.target).attr('href'),\n stateObject = {\n tabID: currentTabId,\n url: window.location.pathname\n };\n\n sessionStorage.setItem('StateObject', JSON.stringify(stateObject));\n }", "function undo() {\n var doc = app.activeDocument;\n var states = doc.historyStates;\n \n var curr = 0;\n for (var i=0; i<states.length; i++) {\n if (states[i] == doc.activeHistoryState) {\n curr = i;\n }\n }\n \n var prev = curr - 1;\n if (prev >= 0) {\n doc.activeHistoryState = states[prev];\n return true;\n } else {\n return false;\n }\n }", "function revertChanges() {\n if (typeof db.getItem(savedData) !== 'undefined' && db.getItem(savedData) !== 'undefined' && db.getItem(savedData) !== 'null' && db.getItem(savedData) != null && db.getItem(savedData) !== \"\") {\n mainP.innerHTML = db.getItem(savedData);\n //makeEditable();\n sanitizeItems();\n };\n }", "function refreshCurrentTab()\n{\n jsobj.swap_tabs(XPCNativeWrapper.unwrap($(\"tabs\")).down(\".tabon\").getAttribute(\"val\"));\n}", "save() {\n if (this.stateFilePath) {\n const state = removeUnsaved(clone(this.state()), this.unsavedSlots, this.beforeLoadAndSave);\n this.log('removeUnsaved(clone(this.state()), this.unsavedSlots, this.beforeLoadAndSave)');\n const savedState = saveState({\n stateFilePath: this.stateFilePath,\n schemaVersion: this.schemaVersion,\n state,\n lastSavedState: this.lastSavedState\n });\n\n if (savedState) {\n this.log('state did save');\n this.lastSavedState = savedState;\n } else {\n this.log('state did not save');\n }\n }\n }", "RevertToPreviousState()\n {\n this.ChangeState(this.m_pPreviousState);\n }", "_restoreFocus() {\n if (!this.autoFocus) {\n return;\n }\n // Note that we don't check via `instanceof HTMLElement` so that we can cover SVGs as well.\n if (this._elementFocusedBeforeDrawerWasOpened) {\n this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened, this._openedVia);\n }\n else {\n this._elementRef.nativeElement.blur();\n }\n this._elementFocusedBeforeDrawerWasOpened = null;\n this._openedVia = null;\n }", "get restoreFocus() { return this._restoreFocus; }", "function restoreExam() {\n var examStorage = getLocalStorageItem('examStorage');\n // var answer = confirm('Do you want to restore saved exam?');\n\n // if (properties['allow_quiz_restoration']) {\n // if (properties['quiz_auto_restoration'] || confirm('Do you want to restore saved exam?')) {\n if (properties['quiz_auto_restoration']) {\n console.log('Exam has been restored.');\n questions = examStorage['questions'];\n challenge = examStorage['challenge'];\n limit = examStorage['limit'];\n displayTimer = examStorage['displayTimer'];\n // allExams = examStorage['allExams'];\n // examsHashes = examStorage['examsHashes'];\n // availableExams = examStorage['availableExams'];\n \n errors = examStorage['errors'];\n exam = examStorage['exam'];\n time = examStorage['time'];\n startChallenge(null, false);\n // removeLocalStorageItem('examStorage');\n }\n // }\n}", "unregister(element) {\n const set = this.getSet(element.name);\n set.set.delete(element);\n set.ordered = null;\n if (set.selected == element) {\n set.selected = null;\n }\n }", "restoreOriginalState() {\n\n\t\tconst originalValueOffset = this.valueSize * 3;\n\t\tthis.binding.setValue( this.buffer, originalValueOffset );\n\n\t}", "function back() {\n history.pop();\n if (history.length >= 1) { setMode(history[history.length - 1]) }\n }", "revert() {\n lib.restore();\n }", "revert() {\n this._cache = this._checkpoints.pop();\n }", "function reset() {\n\t setState(null);\n\t} // in case of reload", "function restoreDefault(){\n restoreDefaultScores();\n lizardLizard();\n $(\"#outcome\").empty();\n $(\"#reset-button\").empty().hide();\n $(\".btn-primary\").bind();\n $(\".btn-primary\").show();\n bindControls();\n}", "restore() {\n this.reset();\n this.interceptorsManager.deactivate();\n }", "function CLB_RestoreTabsUI(win, tabBrowser, bubbleRoot, tabbedBrowserWatcher) {\n bindMethods(this);\n\n this.win_ = win;\n this.doc_ = win.document;\n this.tabBrowser_ = tabBrowser;\n\n // Lookup the checkbox for a tab by it's tabitem ID. Used in building the \n // final list of tabs to open. Populated by populate_().\n this.checkboxLookup_ = {};\n\n this.winMed_ = Cc[\"@mozilla.org/appshell/window-mediator;1\"]\n .getService(Ci.nsIWindowMediator);\n this.winWat_ = Cc[\"@mozilla.org/embedcomp/window-watcher;1\"]\n .getService(Ci.nsIWindowWatcher);\n\n this.toolbarButton_ = this.doc_.getElementById(\"clb-toolbarbutton\");\n\n var infoBubbleWidth = CLB_app.isLinux() ?\n CLB_RestoreTabsUI.INFO_BUBBLE_WIDTH_LINUX :\n CLB_RestoreTabsUI.INFO_BUBBLE_WIDTH ;\n\n this.infoBubble_ = new CLB_InfoBubble(bubbleRoot, tabbedBrowserWatcher, \n infoBubbleWidth);\n\n this.restoreRows_ = bubbleRoot.getElementsByTagName(\"rows\")[0];\n\n this.restoreAllButton_ = bubbleRoot.getElementsByTagName(\"button\")[0];\n this.restoreAllButton_._command = this.handleRestoreAll_;\n this.restoreAllButton_.setAttribute(\"oncommand\", \"this._command()\");\n\n this.obsSvc_ = Cc[\"@mozilla.org/observer-service;1\"]\n .getService(Ci.nsIObserverService);\n this.obsSvc_.addObserver(this, \"clb-show-restore\", true);\n\n if (!CLB_RestoreTabsUI.observingSyncMan_) {\n G_Debug(this, \"Adding static interface to syncman observer.\");\n CLB_syncMan.addObserver(CLB_RestoreTabsUI);\n CLB_RestoreTabsUI.observingSyncMan_ = true;\n }\n\n if (CLB_RestoreTabsUI.windowsToOpen_.length &&\n CLB_app.getStatus() == CLB_Application.STATUS_ONLINE &&\n !CLB_InfoBubble.allHidden) {\n this.populate_();\n this.infoBubble_.show(this.toolbarButton_);\n }\n}", "function fnRestoreWorklistStateFromIappState() {\n\t\t\tvar oWorklistState = oState.oWorklistData.oWorklistSavedData ? oState.oWorklistData.oWorklistSavedData : {};\n\t\t\tif (oState.sNavType === \"initial\") {\n\t\t\t\toState.oSmartFilterbar.setSuppressSelection(false);\n\t\t\t}\n\t\t\tif (oWorklistState.searchString) {\n\t\t\t\tfnFetchAndSaveWorklistSearchField();\n\t\t\t\toState.oWorklistData.oSearchField.setValue(oWorklistState.searchString);\n\t\t\t\toState.oWorklistData.bVariantDirty = false;\n\t\t\t\toState.oWorklistData.oSearchField.fireSearch();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\toState.oSmartFilterbar.search();\n\t\t\toState.oIappStateHandler.changeIappState(true,true);\n\t\t}", "function restoreHistory( delta ) {\n var p = historyPosition + delta;\n if ( delta === 0 || p < 0 || p >= changeHistory.length )\n return true;\n var state = changeHistory[p];\n\n self.mode.off();\n\n $(svgContainer).empty();\n $(state.svg).clone().appendTo(svgContainer);\n self.util.svgRoot = svgRoot = svgContainer.firstChild;\n self.util.mouseCoords = svgRoot.createSVGPoint();\n initDragpoint();\n $(svgRoot).click( removeEditings );\n\n if ( delta < 0 && p < changeHistory.length-1 )\n state = changeHistory[p+1];\n\n if ( state.panzoom ) {\n self.svgPanZoom( state.panzoom[0], state.panzoom[1], state.panzoom[2], state.panzoom[3] );\n boxX0 = state.panzoom[4];\n boxY0 = state.panzoom[5];\n boxW = state.panzoom[6];\n boxH = state.panzoom[7];\n svgRoot.setAttribute( 'viewBox', boxX0+' '+boxY0+' '+boxW+' '+boxH );\n }\n adjustSize();\n\n state.mode();\n if ( state.selected )\n $(state.selected).click();\n\n historyPosition += delta;\n\n for ( var n=0; n<self.cfg.onRestoreHistory.length; n++ )\n self.cfg.onRestoreHistory[n]();\n\n return false;\n }", "_restoreState() {\n this.bold(this._state.bold);\n this.italic(this._state.italic);\n this.underline(this._state.underline);\n this.invert(this._state.invert);\n\n this._queue([\n 0x1b, 0x74, this._state.codepage,\n ]);\n }", "undo() {\n if (this.owner.isReadOnlyMode || !this.canUndo() || !this.owner.enableHistoryMode) {\n return;\n }\n //this.owner.ClearTextSearchResults();\n let historyInfo = this.undoStack.pop();\n this.isUndoing = true;\n historyInfo.revert();\n this.isUndoing = false;\n this.owner.selection.checkForCursorVisibility();\n this.owner.editorModule.isBordersAndShadingDialog = false;\n }", "function reset(tabs) {\n browser.tabs.removeCSS({code: hidePage}).then(() => {\n browser.tabs.sendMessage(tabs[0].id, {\n command: \"reset\",\n });\n });\n }", "function undoStorageItem(){\n var store = JSON.parse(localStorage.getItem(\"toStorage\"));\n console.log(store);\n store.pop();\n console.log(store);\n localStorage.setItem(\"toStorage\", JSON.stringify(store));\n}", "function populateStoredTabs(tabs) {\n tabList.innerHTML = \"\";\n \n for (var i = 0; i < tabs.length; i++) {\n var row = document.createElement(\"tr\");\n \n //button which closes the tab\n var closeB = document.createElement(\"button\");\n closeB.setAttribute(\"data-tab-url\", tabs[i].url);\n closeB.setAttribute(\"class\", \"tabCloseButton\");\n closeB.onclick = function() {\n var tabUrl = this.getAttribute(\"data-tab-url\");\n //get index of tab in storage\n var pos = storedTabs.map(function(e) { return e.url; }).indexOf(tabUrl);\n \n if (pos > -1) {\n storedTabs.splice(pos, 1);\n chrome.storage.sync.set({storedTabs: storedTabs}, function() {\n backConsole.log(\"Tab unsaved\");\n });\n } else {\n backConsole.error(\"Attemped to unsave tab not found in storage\");\n }\n \n //TODO: remove row from callback\n //Remove row clicked on\n //-------------------td----------tr\n var trNode = this.parentNode.parentNode;\n trNode.parentNode.removeChild(trNode);\n backConsole.log(\"Removed row\");\n };\n var tdCloseButton = document.createElement(\"td\");\n tdCloseButton.appendChild(closeB);\n \n var loadTabButton = document.createElement(\"button\");\n loadTabButton.setAttribute(\"class\", \"tabLoadButton\");\n loadTabButton.setAttribute(\"data-tab-url\", tabs[i].url);\n loadTabButton.onclick = function() {\n chrome.tabs.create({url: this.getAttribute(\"data-tab-url\"), active: false}, function() {\n backConsole.log(\"Restored tab.\");\n //object context is different.\n //what object calls this?\n //backConsole.log(\"Restored tab: \" + this.getAttribute(\"data-tab-title\"));\n });\n };\n var tdLoadButton = document.createElement(\"td\");\n tdLoadButton.appendChild(loadTabButton);\n \n var textNode = document.createTextNode(tabs[i].title);\n var tdTitle = document.createElement(\"td\");\n tdTitle.appendChild(textNode);\n \n row.appendChild(tdCloseButton);\n row.appendChild(tdLoadButton);\n row.appendChild(tdTitle);\n \n tabList.appendChild(row);\n }\n}", "function reset() {\n save(null);\n }" ]
[ "0.734178", "0.6888347", "0.67601126", "0.67601126", "0.65665567", "0.65665567", "0.65665567", "0.65665567", "0.65665567", "0.65353525", "0.6367769", "0.6099249", "0.6099249", "0.60756177", "0.6047672", "0.585227", "0.5851256", "0.579988", "0.5799556", "0.57557887", "0.5740859", "0.5696618", "0.56772685", "0.56738245", "0.5623721", "0.5608532", "0.55872726", "0.55785656", "0.55662656", "0.5550206", "0.5544492", "0.5542849", "0.5504787", "0.5499151", "0.5473232", "0.54684055", "0.54680777", "0.5455681", "0.54463077", "0.5409379", "0.54056156", "0.53758895", "0.53756756", "0.53461254", "0.5339815", "0.52998024", "0.52945304", "0.52928907", "0.52846456", "0.5282407", "0.5280831", "0.527569", "0.5272651", "0.5269009", "0.5260366", "0.5255184", "0.52466464", "0.5241603", "0.5234027", "0.52328646", "0.52095574", "0.52071", "0.52069616", "0.52008975", "0.5199599", "0.5197625", "0.5188464", "0.5176326", "0.517417", "0.51714665", "0.5171346", "0.5163941", "0.5158117", "0.51525736", "0.5150299", "0.5137195", "0.51360285", "0.51326925", "0.5124688", "0.5122781", "0.5115636", "0.51115483", "0.51104045", "0.5105108", "0.5102757", "0.50978684", "0.5097522", "0.5087702", "0.5085532", "0.5076713", "0.50650036", "0.50629646", "0.5058092", "0.5056364", "0.5055275", "0.5044674" ]
0.73726946
2
This needs to be done on mousedown and touchstart instead of click so that it precedes the focus event
function checkPointerDown(e) { if (config.clickOutsideDeactivates && !container.contains(e.target)) { deactivate({ returnFocus: false }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onFocus() {\r\n // Stub\r\n }", "focus() {}", "focus() {}", "function focus(){}", "focus() { }", "onFocusIn() {\n this.updateFocused(true);\n }", "function mousedown(event) {\r\n\t\t\t\tactiveElement = event.target;\r\n\t\t\t}", "focus() {\n this.setFocus(0, 1);\n }", "_drawFocus()\n\t{\n\t\t\n\t}", "componentDidReceiveFocus() {}", "doFocus() {\n this.__focusOnLast();\n }", "_focusHandler(event) {\n const that = this;\n\n if (that.disabled) {\n return;\n }\n\n if (event.target === that) {\n that.$.input.focus();\n that._edgeSelect = false;\n return;\n }\n\n that.setAttribute('focus', '');\n\n if (that.selectAllOnFocus) {\n if (navigator.userAgent.match(/Edge/)) {\n const scrollTop = that.$.input.scrollTop;\n\n if (that._edgeSelect) {\n that._edgeSelect = false;\n return;\n }\n\n setTimeout(function () {\n that._edgeSelect = true;\n that.$.input.select();\n that.$.input.scrollTop = scrollTop;\n }, 5);\n }\n else {\n that.$.input.select();\n }\n }\n }", "handleFocus(event) {\n event.target.select();\n }", "activateFocus() {\n this.isFocused_ = true;\n this.styleFocused_(this.isFocused_);\n this.adapter_.activateLineRipple();\n this.notchOutline(this.shouldFloat);\n if (this.adapter_.hasLabel()) {\n this.adapter_.shakeLabel(this.shouldShake);\n this.adapter_.floatLabel(this.shouldFloat);\n }\n if (this.helperText_) {\n this.helperText_.showToScreenReader();\n }\n }", "activateFocus() {\n this.isFocused_ = true;\n this.styleFocused_(this.isFocused_);\n this.adapter_.activateLineRipple();\n this.notchOutline(this.shouldFloat);\n if (this.adapter_.hasLabel()) {\n this.adapter_.shakeLabel(this.shouldShake);\n this.adapter_.floatLabel(this.shouldFloat);\n }\n if (this.helperText_) {\n this.helperText_.showToScreenReader();\n }\n }", "focus() {\r\n this.native.focus();\r\n }", "afterOp() {\n if ( focusedNode && focusedNode.focusable ) {\n focusedNode.focus();\n }\n BrowserEvents.blockFocusCallbacks = false;\n }", "_onFocus() {\n this.__hasFocus = true;\n }", "focus() {\n if (this.isFocusable) {\n DomHelper.focusWithoutScrolling(this.focusElement);\n }\n }", "focus() {\n if (this.isFocusable) {\n DomHelper.focusWithoutScrolling(this.focusElement);\n }\n }", "function focus() {\n overlay.setFocus( true );\n}", "_onFocus() {\n if (!this.state.focus) {\n this.setState({\n focus: true,\n });\n }\n }", "handleA11yFocus(event) {\n if (!this.dragging) {\n this.props.a11yFocus(event.type === 'focus');\n this.asFocus = event.type === 'focus';\n }\n }", "onFocus(e) {\n if (this.$isFocused)\n return;\n this.$isFocused = true;\n this.renderer.showCursor();\n this.renderer.visualizeFocus();\n this._emit(\"focus\", e);\n }", "focus() {\r\n this.isFocussed = true;\r\n this.showLimits = false;\r\n }", "activeFocus() {\n var $_this = this;\n this.$originalSelect.on('focus', function () {\n $_this.$selectableUl.focus();\n });\n }", "setFocus(){\n this.getInputEle().focus();\n }", "externalTouchDown() {\n this._strikeTouchDown();\n }", "handleFocus() {\n this.adapter_.addClass(cssClasses.FOCUSED);\n this.adapter_.floatLabel(true);\n this.notchOutline(true);\n this.adapter_.activateBottomLine();\n if (this.helperText_) {\n this.helperText_.showToScreenReader();\n }\n }", "function focus_on_click() {\n\n $('.focus-on-click').on('click', function(event) {\n\n var target = $($(this).data('focus-element'));\n\n if (!$(this).hasClass('scroll-on-click') && (target.length)) {\n\n target.focus();\n\n }\n\n });\n\n }", "focus() {\n if (!this.focusElement || this.disabled) {\n return;\n }\n\n this.focusElement.focus();\n\n this._setFocused(true);\n }", "beforeOp() {\n focusedNode = FocusManager.pdomFocusedNode;\n BrowserEvents.blockFocusCallbacks = true;\n }", "onContainerClick() {\n if (!this.focused && !this.disabled) {\n if (!this._model || !this._model.selection.start) {\n this._startInput.focus();\n }\n else {\n this._endInput.focus();\n }\n }\n }", "onContainerClick() {\n if (!this.focused && !this.disabled) {\n if (!this._model || !this._model.selection.start) {\n this._startInput.focus();\n }\n else {\n this._endInput.focus();\n }\n }\n }", "_onFocus() {\n this.setState({ focused: this._containsDOMElement(document.activeElement) })\n }", "addFocusEventListener() {\n this.input.addEventListener('focus', () => this.input.select());\n }", "focus() {\n this.observer.ignore(() => {\n focusPreventScroll(this.contentDOM);\n this.docView.updateSelection();\n });\n }", "function gainFocus () {\n\t//log (\"gainFocus ()\");\n\t\n\t// Register the focus\n\twidgetFocused\t= true;\n\t\n\t// Show the tray button\n\tfadeButtonsStart ();\n}", "function focusHandler(){\r\n isWindowFocused = true;\r\n }", "function focusHandler(){\n isWindowFocused = true;\n }", "function focusHandler(){\n isWindowFocused = true;\n }", "function onMouseup(){elements.input.focus();}", "function onPointerDown(e) {\n if (hadKeyboardEvent === true) {\n removeAllFocusVisibleAttributes();\n }\n\n hadKeyboardEvent = false;\n }", "activateFocus() {\n this.isFocused_ = true;\n this.styleFocused_(this.isFocused_);\n if (this.bottomLine_) {\n this.bottomLine_.activate();\n }\n if (this.outline_) {\n this.updateOutline();\n }\n if (this.label_) {\n this.label_.styleShake(this.isValid(), this.isFocused_);\n this.label_.styleFloat(\n this.getValue(), this.isFocused_, this.isBadInput_());\n }\n if (this.helperText_) {\n this.helperText_.showToScreenReader();\n }\n }", "onFocusEnter() { }", "function onMouseup () {\n elements.input.focus();\n }", "function onMouseup () {\n elements.input.focus();\n }", "function onMouseup () {\n elements.input.focus();\n }", "function onMouseup () {\n elements.input.focus();\n }", "_focusEventHandler() {\n this.setAttribute('focus', '');\n }", "focus() {\n var self = this;\n if (self.isDisabled) return;\n self.ignoreFocus = true;\n self.control_input.focus();\n setTimeout(() => {\n self.ignoreFocus = false;\n self.onFocus();\n }, 0);\n }", "_focus(event) {\n // Depending on support for input[type=range],\n // the event.target could be either the handle or its child input.\n // Use closest() to locate the actual handle.\n event.target.closest(`.${CLASSNAME_HANDLE}`).classList.add('is-focused');\n\n events.on('touchstart.Slider', this._onInteraction);\n events.on('mousedown.Slider', this._onInteraction);\n }", "function bodyOnFocus() {}", "_onFocus(event) {\n this.focused = true;\n this.forceUpdate();\n\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n }", "function onFocus(e) {\n if (e.target instanceof Node && rootElement.contains(e.target)) {\n isFocused = true;\n }\n }", "activateFocus() {\n const {FOCUSED, LABEL_FLOAT_ABOVE, LABEL_SHAKE} = MDCTextFieldFoundation.cssClasses;\n this.adapter_.addClass(FOCUSED);\n if (this.bottomLine_) {\n this.bottomLine_.activate();\n }\n this.adapter_.addClassToLabel(LABEL_FLOAT_ABOVE);\n this.adapter_.removeClassFromLabel(LABEL_SHAKE);\n if (this.helperText_) {\n this.helperText_.showToScreenReader();\n }\n this.isFocused_ = true;\n }", "[pointerDown](e) {\n if (isTouch(e)) {\n this.show();\n }\n }", "setFocus() {\n\t\tsetTimeout(() => {\n\t\t\tif (this.state.focus) {\n\t\t\t\tthis.refs[this.state.focus].focus();\n\t\t\t\tthis.state.focus = null;\n\t\t\t}\n\t\t}, 0);\n\t}", "setFocus() {\n\t\tsetTimeout(() => {\n\t\t\tif (this.state.focus) {\n\t\t\t\tthis.refs[this.state.focus].focus();\n\t\t\t\tthis.state.focus = null;\n\t\t\t}\n\t\t}, 0);\n\t}", "focus () {\n\t\tthis.manager.focusLayer(this);\n\t}", "focus() {\n this.toggleMenuList();\n this.input.focus();\n }", "function forceFocus() {\n\tinput.trigger(\"click\").focus();\n}", "setFocus(){\n\t\tthis.$.content.focus();\n\t\tthis.domHost.playSound(\"moveCursor\", \"\", \"\");\n\t}", "function mousedown(event) {\n activeElement = event.target;\n }", "function inputMethodFocus() {\n\t\t\tif (!editor.settings.content_editable) {\n\t\t\t\t// Case 1 IME doesn't initialize if you focus the document\n\t\t\t\tdom.bind(editor.getDoc(), 'focusin', function() {\n\t\t\t\t\tselection.setRng(selection.getRng());\n\t\t\t\t});\n\n\t\t\t\t// Case 2 IME doesn't initialize if you click the documentElement it also doesn't properly fire the focusin event\n\t\t\t\t// Needs to be both down/up due to weird rendering bug on Chrome Windows\n\t\t\t\tdom.bind(editor.getDoc(), 'mousedown mouseup', function(e) {\n\t\t\t\t\tif (e.target == editor.getDoc().documentElement) {\n\t\t\t\t\t\teditor.getBody().focus();\n\n\t\t\t\t\t\tif (e.type == 'mousedown') {\n\t\t\t\t\t\t\t// Edge case for mousedown, drag select and mousedown again within selection on Chrome Windows to render caret\n\t\t\t\t\t\t\tselection.placeCaretAt(e.clientX, e.clientY);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselection.setRng(selection.getRng());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}", "onFocusGesture(event) {\n if (\n event.target === this.ownerCmp.contentElement ||\n (event.target.closest(this.itemSelector) && this.ownerCmp.itemsFocusable === false)\n ) {\n event.preventDefault();\n }\n }", "function inputMethodFocus() {\n\t\t\tif (!editor.settings.content_editable) {\n\t\t\t\t// Case 1 IME doesn't initialize if you focus the document\n\t\t\t\t// Disabled since it was interferring with the cE=false logic\n\t\t\t\t// Also coultn't reproduce the issue on Safari 9\n\t\t\t\t/*dom.bind(editor.getDoc(), 'focusin', function() {\n\t\t\t\t\tselection.setRng(selection.getRng());\n\t\t\t\t});*/\n\n\t\t\t\t// Case 2 IME doesn't initialize if you click the documentElement it also doesn't properly fire the focusin event\n\t\t\t\t// Needs to be both down/up due to weird rendering bug on Chrome Windows\n\t\t\t\tdom.bind(editor.getDoc(), 'mousedown mouseup', function(e) {\n\t\t\t\t\tvar rng;\n\n\t\t\t\t\tif (e.target == editor.getDoc().documentElement) {\n\t\t\t\t\t\trng = selection.getRng();\n\t\t\t\t\t\teditor.getBody().focus();\n\n\t\t\t\t\t\tif (e.type == 'mousedown') {\n\t\t\t\t\t\t\tif (CaretContainer.isCaretContainer(rng.startContainer)) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Edge case for mousedown, drag select and mousedown again within selection on Chrome Windows to render caret\n\t\t\t\t\t\t\tselection.placeCaretAt(e.clientX, e.clientY);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}", "function inputMethodFocus() {\n\t\t\tif (!editor.settings.content_editable) {\n\t\t\t\t// Case 1 IME doesn't initialize if you focus the document\n\t\t\t\t// Disabled since it was interferring with the cE=false logic\n\t\t\t\t// Also coultn't reproduce the issue on Safari 9\n\t\t\t\t/*dom.bind(editor.getDoc(), 'focusin', function() {\n\t\t\t\t\tselection.setRng(selection.getRng());\n\t\t\t\t});*/\n\n\t\t\t\t// Case 2 IME doesn't initialize if you click the documentElement it also doesn't properly fire the focusin event\n\t\t\t\t// Needs to be both down/up due to weird rendering bug on Chrome Windows\n\t\t\t\tdom.bind(editor.getDoc(), 'mousedown mouseup', function(e) {\n\t\t\t\t\tvar rng;\n\n\t\t\t\t\tif (e.target == editor.getDoc().documentElement) {\n\t\t\t\t\t\trng = selection.getRng();\n\t\t\t\t\t\teditor.getBody().focus();\n\n\t\t\t\t\t\tif (e.type == 'mousedown') {\n\t\t\t\t\t\t\tif (CaretContainer.isCaretContainer(rng.startContainer)) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Edge case for mousedown, drag select and mousedown again within selection on Chrome Windows to render caret\n\t\t\t\t\t\t\tselection.placeCaretAt(e.clientX, e.clientY);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}", "function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }", "function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }", "function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }", "function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }", "function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }", "function mousedown(event) {\n activeElement = event.target;\n }", "_evtFocus(event) {\n const target = event.target;\n if (!this.node.contains(target)) {\n event.stopPropagation();\n this._buttonNodes[this._defaultButton].focus();\n }\n }", "onElementMouseDown(event) {\n const me = this,\n cellData = me.getCellDataFromEvent(event);\n me.skipFocusSelection = true;\n me.triggerCellMouseEvent('mousedown', event); // Browser event unification fires a mousedown on touch tap prior to focus.\n\n if (cellData && !event.defaultPrevented) {\n me.onFocusGesture(cellData, event);\n }\n }", "unfocus() {}", "focus() {\n if (this.disabled || this.matches(':focus-within')) {\n // Don't shift focus from an element within the text field, like an icon\n // button, to the input when focus is requested.\n return;\n }\n super.focus();\n }", "function focusEvents() {\n setSuggestionBoxPosition();\n active = true;\n if ($(this).val()) {\n showSuggestions(jsonData);\n }\n }", "_recaptureFocus() {\n if (!this._containsFocus()) {\n const focusContainer = !this._config.autoFocus || !this._focusTrap.focusInitialElement();\n if (focusContainer) {\n this._elementRef.nativeElement.focus();\n }\n }\n }", "function focused() {\n\t\t\tsettings.userActivity = time();\n\n\t\t\t// Resume if suspended\n\t\t\tsettings.suspend = false;\n\n\t\t\tif ( ! settings.hasFocus ) {\n\t\t\t\tsettings.hasFocus = true;\n\t\t\t\tscheduleNextTick();\n\t\t\t}\n\t\t}", "onFocusGesture(event) {\n if (event.target === this.ownerCmp.contentElement || event.target.closest(this.itemSelector) && this.ownerCmp.itemsFocusable === false) {\n event.preventDefault();\n }\n }", "setInputFocus(){\n this.textInput.removeAttribute('disabled');//Remove disabled attrib so input is interactible again\n this.textInput.focus();\n this.textInput.select();\n }", "componentDidUpdate() {\n this.focused = false;\n this.mouseDownOnButton = false;\n }", "focusIn () {\n }", "focus() {\n this.$.input._focusableElement.focus();\n }", "function onElementFocus() {\r\n\r\n this.blur();\r\n\r\n }", "mousedownHandler(e) {\n this.shouldSkipFocus = !this.contains(document.activeElement);\n return true;\n }", "_focusHandler() {\n const i = this.shadowRoot.querySelector('anypoint-input');\n if (!i) {\n return;\n }\n i.inputElement.focus();\n }", "handleFocus (event) {\n this.setState({ focus: true }, () => {\n super.handleFocus(event)\n })\n }", "focus ( target ) {\n Editor.UI.focus(target);\n\n // DELME\n // if ( target.setFocus ) {\n // target.setFocus();\n // return;\n // }\n // Polymer.Base.fire.call(target, 'focus');\n }", "focus() {\n super.focus();\n if (this._activeFrame) {\n this._activeFrame.focus();\n }\n }", "focus() {\n\t\tthis.children.first.focus();\n\t}", "handleOnFocus() {\n this.onFocus()\n if (this.openOnFocus) {\n this.toggle(true)\n }\n }", "function handleAndroidFocus() {\n\tvar container = page.getViewById(\"container\");\n\tif (container.android) {\n\t\tcontainer.android.setFocusableInTouchMode(true);\n\t\tcontainer.android.setFocusable(true);\n\t\tusername.android.clearFocus();\n\t}\n}", "_focusHandler() {\n const that = this;\n\n if (that.disabled || that._items.length === 0) {\n return;\n }\n\n if (that._itemIsFocussed) {\n that._selectedItem.focused = false;\n }\n else {\n that._items[0].focused = false;\n }\n }", "_blur() {\n if (this.disabled) {\n return;\n }\n if (!this.focused) {\n this._keyManager.setActiveItem(-1);\n }\n // Wait to see if focus moves to an indivdual chip.\n setTimeout(() => {\n if (!this.focused) {\n this._propagateChanges();\n this._markAsTouched();\n }\n });\n }", "_blur() {\n if (this.disabled) {\n return;\n }\n if (!this.focused) {\n this._keyManager.setActiveItem(-1);\n }\n // Wait to see if focus moves to an indivdual chip.\n setTimeout(() => {\n if (!this.focused) {\n this._propagateChanges();\n this._markAsTouched();\n }\n });\n }", "_focusHandler() {\n const i = document.querySelector('paper-input');\n if (!i) {\n return;\n }\n i.inputElement.focus();\n }", "function unfocus(tar){ if(tar.blur); tar.blur();}", "handleFocus() {\n if (!this.state.hasFocus) {\n this.setState({ hasFocus: true });\n }\n }" ]
[ "0.7413799", "0.7409705", "0.7409705", "0.74048483", "0.72700703", "0.71302277", "0.71284723", "0.7115476", "0.70502996", "0.7038039", "0.70332074", "0.6975959", "0.696073", "0.6958957", "0.6958957", "0.69474006", "0.69470346", "0.6903066", "0.68763006", "0.68763006", "0.6871027", "0.6836711", "0.6823442", "0.6818224", "0.68082094", "0.6800062", "0.67772377", "0.6762946", "0.6762607", "0.6731278", "0.672565", "0.6721604", "0.67190033", "0.67190033", "0.6716646", "0.6712243", "0.67106885", "0.6703501", "0.67034054", "0.6703266", "0.6703266", "0.6680174", "0.6661267", "0.66544557", "0.66472524", "0.6632479", "0.6632479", "0.6632479", "0.6632479", "0.66250014", "0.6621347", "0.6615481", "0.66098523", "0.66089976", "0.66028386", "0.65903074", "0.6585385", "0.6583734", "0.6583734", "0.65784234", "0.6578173", "0.6576445", "0.65746725", "0.65720487", "0.6561708", "0.65594965", "0.6546859", "0.6546859", "0.6544135", "0.6544135", "0.6544135", "0.6544135", "0.6544135", "0.6538047", "0.65307343", "0.6524958", "0.6514443", "0.65131515", "0.6509809", "0.6504163", "0.65039194", "0.6502494", "0.6501474", "0.64969444", "0.64892876", "0.64891374", "0.6471506", "0.64697504", "0.6464862", "0.6459306", "0.6455972", "0.645275", "0.64495486", "0.6439655", "0.6436811", "0.64355636", "0.64355105", "0.64355105", "0.6435171", "0.64311486", "0.64304274" ]
0.0
-1
Function to add declarative opening/closing to drawer
function toggleDrawer(oldprops, newprops, drawer) { if ('open' in oldprops && 'open' in newprops && oldprops.open !== newprops.open) { drawer.open = newprops.open; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleDrawerClose() {\n setOpen(true);\n }", "function handleDrawerOpen() {\n setOpen(true);\n }", "_handleDrawer () {\n this.drawerIsOpen = !this.drawerIsOpen\n }", "open() {\n this.isOpen = true;\n if (this.__isFloating) {\n const drawer = this.shadowRoot.getElementById('drawer');\n // drawer.style.transform = \"translate3d(0, 0, 0)\";\n if (this.isReverse) {\n // drawer.style.transform = \"translate3d(\"+ width +\"px, 0, 0)\";\n drawer.style.right = 0;\n } else {\n drawer.style.left = 0;\n // drawer.style.transform = \"translate3d(-\"+ width +\"px, 0, 0)\";\n }\n const backdrop = this.shadowRoot.getElementById('backdrop');\n backdrop.style.opacity = 1;\n backdrop.style.pointerEvents = 'auto';\n\n // unregister movement tracker\n this.removeEventListener('mousemove', this.moveHandler, true);\n this.removeEventListener('touchmove', this.moveHandler, true);\n // unregister trackend\n this.removeEventListener('mouseup', this.trackEnd, { once: true });\n this.removeEventListener('touchend', this.trackEnd, { once: true });\n }\n /**\n * @event drawer-opened\n * Fired when drawer was opened.\n */\n const customEvent = new Event('drawer-opened', { composed: true, bubbles: true });\n this.dispatchEvent(customEvent);\n }", "function toggleDrawer(oldprops, newprops, drawer) {\n if (\"open\" in oldprops && \"open\" in newprops && oldprops.open !== newprops.open) {\n drawer.open = newprops.open;\n }\n}", "function onButtonClick() {\n\t\tdrawerWidget.open();\n\t}", "openDrawer() {\n this.drawer.open();\n }", "open() {\n this._drawers.forEach((drawer) => drawer.open());\n }", "function openModuleDrawer() {\n\tisModuleDrawerOpen = true;\n\tmoduleDrawer.addClass(\"modulecontaineropen\");\n}", "function toggleDrawer() {\r\n var drawerMargin = $(\"#sidebar\").width();\r\n if (drawerOpen) {\r\n $(\"#sidebar\").animate({marginLeft: -drawerMargin + \"px\"}, 300);\r\n $(\"#handle\").animate({marginLeft: \"20px\"}, 300);\r\n document.getElementById(\"handle\").innerHTML = \"Open<br />Menu\";\r\n drawerOpen = false;\r\n }\r\n else {\r\n $(\"#sidebar\").animate({marginLeft: \"0\"}, 300);\r\n $(\"#handle\").animate({marginLeft: drawerMargin + 20 + \"px\"}, 300);\r\n document.getElementById(\"handle\").innerHTML = \"Close<br />Menu\";\r\n drawerOpen = true;\r\n }\r\n}", "_handleToggle() {\n this.setState({drawerOpen: !this.state.open});\n }", "openCloseDoor() {\n if (this.open == true) {\n this.open = false;\n this.setAlpha(1);\n } else {\n this.open = true;\n this.setAlpha(0);\n }\n }", "function drawerSlide() {\n switch(drawerOpen) {\n case true:\n // Close\n $('#drawerInside').hide('slow');\n $('#show-hide').html('<span class=\"arrow\">&uarr;</span> ' + i18n.show_more.toUpperCase());\n var image = S3.Ap.concat('/static/themes/Vulnerability/img/openTabPng8.png');\n $('#risingTab').css('background-image', 'url(' + image + ')');\n $('.olPopup').fadeIn(300);\n $('#dummy_location_search').autocomplete('option', 'position', {\n my: 'left bottom',\n at: 'left top'\n });\n drawerOpen = false;\n break;\n case false:\n // Open\n $('#drawerInside').show('slow');\n $('#show-hide').html('<span class=\"arrow\">&darr;</span> ' + i18n.show_less.toUpperCase());\n var image = S3.Ap.concat('/static/themes/Vulnerability/img/closeTabPng8.png');\n $('#risingTab').css('background-image', 'url(' + image + ')');\n $('.olPopup').fadeOut(300);\n $('#dummy_location_search').autocomplete('option', 'position', {\n my: 'left top',\n at: 'left bottom'\n });\n drawerOpen = true;\n break;\n }\n}", "open() {\n this._drawers.forEach(drawer => drawer.open());\n }", "function start_drawer(){\n var show = document.getElementById(\"drawer-tray\");\n if(show.style.display !== \"block\"){\n show.style.display = \"block\";\n } else{\n show.style.display = \"none\";\n }\n}", "function onOpen() {\n createMenu();\n}", "_handleClose() {\n this.setState({drawerOpen: false});\n }", "close() {\n this.isOpen = false;\n if (this.__isFloating) {\n const drawer = this.shadowRoot.getElementById('drawer');\n const { width } = drawer.getBoundingClientRect();\n if (this.isReverse) {\n // drawer.style.transform = \"translate3d(\"+ width +\"px, 0, 0)\";\n drawer.style.right = `${-width}px`;\n } else {\n drawer.style.left = `${-width}px`;\n // drawer.style.transform = \"translate3d(-\"+ width +\"px, 0, 0)\";\n }\n const backdrop = this.shadowRoot.getElementById('backdrop');\n backdrop.style.opacity = 0;\n backdrop.style.pointerEvents = 'none';\n\n // unregister movement tracker\n this.removeEventListener('mousemove', this.moveHandler, true);\n this.removeEventListener('touchmove', this.moveHandler, true);\n // unregister trackend\n this.removeEventListener('mouseup', this.trackEnd, { once: true });\n this.removeEventListener('touchend', this.trackEnd, { once: true });\n }\n /**\n * @event drawer-closed\n * Fired when drawer was closed.\n */\n const customEvent = new Event('drawer-closed', { composed: true, bubbles: true });\n this.dispatchEvent(customEvent);\n }", "showEvent(e) {\n // if we're already opened and we get told to open again....\n // swap out the contents\n if (this.opened) {\n // wipe the slot of our drawer\n while (dom(this).firstChild !== null) {\n dom(this).removeChild(dom(this).firstChild);\n }\n setTimeout(() => {\n this.show(\n e.detail.title,\n e.detail.elements,\n e.detail.invokedBy,\n e.detail.align,\n e.detail.clone\n );\n }, 100);\n } else {\n this.show(\n e.detail.title,\n e.detail.elements,\n e.detail.invokedBy,\n e.detail.align,\n e.detail.size,\n e.detail.clone\n );\n }\n }", "static get tag() {\n return \"simple-drawer\";\n }", "get drawer () { return this.#drawer }", "onOpen() { }", "function basicMenu() {\nif (advancedMenuIsOpen)\n{closeAdvancedMenu()}\nelse {\n if (basicMenuIsOpen) {\n closeBasicMenu();\n } else {\n openBasicMenu();\n }\n}\n}", "open() {\r\n this.setAttribute('opend', '');\r\n this.isOpend = true;\r\n }", "_openedChanged(newValue, oldValue) {\n if (typeof newValue !== typeof undefined && !newValue) {\n this.animationEnded();\n const evt = new CustomEvent(\"simple-drawer-closed\", {\n bubbles: true,\n cancelable: true,\n detail: {\n opened: false,\n invokedBy: this.invokedBy\n }\n });\n this.dispatchEvent(evt);\n } else if (newValue) {\n const evt = new CustomEvent(\"simple-drawer-opened\", {\n bubbles: true,\n cancelable: true,\n detail: {\n opened: true,\n invokedBy: this.invokedBy\n }\n });\n this.dispatchEvent(evt);\n }\n }", "handleDrawer(opened) {\n if (opened !== this.drawerOpened) {\n store.dispatch(updateDrawerState(opened))\n }\n }", "function moveDrawer() {\n document.getElementById(\"sidedrawer\").classList.toggle(\"open\");\n document.getElementById(\"backdrop\").classList.toggle(\"backdrop\");\n}", "function moveDrawer() {\n document.getElementById(\"sidedrawer\").classList.toggle(\"open\");\n document.getElementById(\"backdrop\").classList.toggle(\"backdrop\");\n}", "close() {\n this.$.drawer.close();\n }", "function toggleFlyout() {\n const analyticsAction = isExpanded ? 'CloseDrawer' : 'OpenDrawer'\n analyticsService.logEvent('KnowledgeManagement', analyticsAction)\n setIsExpanded(!isExpanded)\n }", "function toggleModuleDrawer() {\n\tisModuleDrawerOpen = !isModuleDrawerOpen;\n\tmoduleDrawer.toggleClass(\"modulecontaineropen\");\n}", "function mdl_toggleDrawer() {\n var layout = document.querySelector('.mdl-layout');\n layout.MaterialLayout.toggleDrawer();\n}", "function editDrawer(buttonClicked) {\r\n\tif (buttonClicked) {\r\n\t\topenEditWindow(getTitleOfEditButton(buttonClicked))\r\n\t} else {\r\n\t\topenEditWindow(\"\")\r\n\t}\r\n}", "handleClick(e) {\n // media queries keep sidebar open unless under a certain size\n // when closed, activating will open or close\n document.querySelector('nav#drawer').classList.toggle('open');\n e.stopPropagation();\n }", "function _onOpen() {\n\tdraw();\n}", "function _onOpen() {\n\tdraw();\n}", "function open_close(){\n // from Monday to Thursday\n if (dayOfWeek > 0 && dayOfWeek < 5){\n // Open from 10 to 19\n if (h >= 10 && h < 19){\n document.getElementById('open-close-switcher').innerHTML = 'Open';\n document.getElementById('open-close-switcher').style.color = 'green';\n } else {\n document.getElementById('open-close-switcher').innerHTML = 'closed';\n document.getElementById('open-close-switcher').style.color = '#ce0000';\n }\n // from Friday to Sunday\n } else {\n // Open from 10 to 23\n if (h >= 10 && h < 23){\n document.getElementById('open-close-switcher').innerHTML = 'Open';\n document.getElementById('open-close-switcher').style.color = 'green';\n } else {\n document.getElementById('open-close-switcher').innerHTML = 'closed';\n document.getElementById('open-close-switcher').style.color = '#ce0000';\n }\n }\n }", "SetOpen(show) {\n this.open = show;\n if(show) {\n this.folderContainer.classList.remove(styles['guify-folder-closed']);\n this.arrow.innerHTML = '&#9662;'; // Down triangle\n\n }\n else {\n this.folderContainer.classList.add(styles['guify-folder-closed']);\n this.arrow.innerHTML = '&#9656;'; // Right triangle\n }\n\n }", "function openNav() {\r\n if (isDrawerEnable) {\r\n closeNav();\r\n isDrawerEnable = false;\r\n return;\r\n }\r\n document.getElementById(\"mySidenav\").style.width = \"250px\";\r\n isDrawerEnable = true;\r\n}", "function handleDrawerToggle() {\n setMenuOpen(!menuOpen)\n }", "function onDrawerButtonTap(args) {\r\n const sideDrawer = frameModule.topmost().getViewById(\"sideDrawer\");\r\n sideDrawer.showDrawer();\r\n}", "function openNotes(x){\n\tif(noteDrawerShow == true){\n\t\t//hide the drawer when clicked outside the drawer\n\t\tdocument.getElementById(\"showDrawer\").style.display = \"none\";\n\t\tnoteDrawerShow = false;\n\t}\n\t// else if(numOfNotes < 5 && noteDrawerShow == false){ //currently only allow up to 4 notes\n\telse if(noteDrawerShow == false){ //currently only allow up to 4 notes\n\t\t//show the note drawer\n\t\tdocument.getElementById(\"showDrawer\").style.display = \"block\";\n\t\tnoteDrawerShow = true;\n\t\tnotePosition = x;\n\t}\n}", "function onOpen(e) {\n DocumentApp.getUi().createAddonMenu()\n .addItem('Start', 'showSidebar')\n .addToUi();\n}", "function newOrClose(){\r\n\t\tconsole.log(self.save);\t\t\t\t\r\n\t\tif(self.save== \"saveclose\" ){\r\n\t\t\t drawerClose('.drawer') ;\r\n\t\t}\r\n\t\treset();\r\n\t}", "w3_open() {\n\t\tif (this.mySidenav.style.display === 'block') {\n\t\t\tthis.mySidenav.style.display = 'none';\n\t\t\tthis.overlayBg.style.display = \"none\";\n\t\t} else {\n\t\t\tthis.mySidenav.style.display = 'block';\n\t\t\tthis.overlayBg.style.display = \"block\";\n\t\t}\n\t}", "open() {\n this.opened = true;\n }", "function drawerClick () {\n if ($(\".drawer\").hasClass(\"drawer-open\")) {\n $('.program').css('opacity', 1.0);\n\n } else {\n $('.program').css('opacity', 0.2);\n }\n}", "function closeModuleDrawer() {\n\tisModuleDrawerOpen = false;\n\tmoduleDrawer.removeClass(\"modulecontaineropen\");\n}", "toggleDrawer(newValue){\n this.setState( { drawerOpen: newValue } );\n }", "function onDrawerButtonTap(args) {\n const sideDrawer = frameModule.topmost().getViewById(\"sideDrawer\");\n sideDrawer.showDrawer();\n}", "function closeDrawerMenu() {\n\t\t\t$('.pure-toggle-label').click();\n\t\t}", "toggle_() {\n if (this.isOpen_()) {\n this.close_();\n } else {\n this.open_();\n }\n }", "closeAllOpenDrawers() {\n let closetDrawers=this.closet.getProducts(ProductTypeEnum.DRAWER);\n for(let closetDrawer of closetDrawers)\n ThreeDrawerAnimations.close(closetDrawer);\n }", "function onOpen() {\n // Add a menu with some items, some separators, and a sub-menu.\n DocumentApp.getUi().createMenu('Utilities')\n .addItem('Insert Date', 'insertDateAtCursor')\n .addItem('Insert Time', 'insertTimeAtCursor')\n .addToUi();\n}", "open () {\n this.opened = true;\n }", "function onOpen(e) {\n // Register our add-on: this will add it to the sidebar\n DocumentApp.getUi().createAddonMenu()\n .addItem('Show Sidebar', 'showSidebar') // button + callback\n .addItem('Create Table From Selection', 'createTableFromPrefs')\n .addSeparator()\n .addItem('Clear Preferences', 'deletePreferences')\n .addToUi();\n}", "function showOrHideDrawer( currentWindowWidth, currentWindowHeight ) {\r\n\r\n\t\t\t\t\tvar calculateSecondHeaderHeight = function( page ) {\r\n\t\t\t\t\t\tvar secondHeaderHeight = 0;\r\n\t\t\t\t\t\tif ( $( page + \" .patientSummaryInfo\" ).height( ) ) {\r\n\t\t\t\t\t\t\tsecondHeaderHeight += $( page + \" .patientSummaryInfo\" ).height( );\r\n\t\t\t\t\t\t} else if ( $( page + \" .appointmentsHeader\" ).height( ) ) {\r\n\t\t\t\t\t\t\tsecondHeaderHeight += $( page + \" .appointmentsHeader\" ).height( );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn secondHeaderHeight;\r\n\t\t\t\t\t};\r\n\t\t\t\t\tvar addPadding = function( selector, paddingSelector ) {\r\n\t\t\t\t\t\t$( selector ).css( {\r\n\t\t\t\t\t\t\t\"padding-top\": ( $( paddingSelector ).height( ) + calculateSecondHeaderHeight( selector ) ) + \"px\"\r\n\t\t\t\t\t\t} );\r\n\t\t\t\t\t} ;\r\n\t\t\t\t\tvar dialogInPortrait = function( isDialog ) {\r\n\t\t\t\t\t\tvar drawer = $( \"#drawer\" );\r\n\t\t\t\t\t\tdrawer.hide( );\r\n\t\t\t\t\t\tif ( isDialog ) {\r\n\t\t\t\t\t\t\tif ( main.controller.backPage ) {\r\n\t\t\t\t\t\t\t\t$( main.controller.backPage + \",\" + main.controller.pageHeaders ).css( {\r\n\t\t\t\t\t\t\t\t\t\"width\": \"100%\",\r\n\t\t\t\t\t\t\t\t\t\"margin-left\": \"0px\"\r\n\t\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t\t\taddPadding( main.controller.backPage, main.controller.backPage + \" .ui-header\" );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$( \".ui-page-active,\" + main.controller.pageHeaders ).css( \"width\", \"100%\" );\r\n\t\t\t\t\t\t\t$( \".ui-page-active,\" + main.controller.pageHeaders ).css( \"margin-left\", \"0px\" );\r\n\t\t\t\t\t\t\taddPadding( \".ui-page-active\", \".ui-page-active .ui-header\" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\t\tvar page = \"#\" + $.mobile.activePage[0].id;\r\n\r\n\t\t\t\t\tif ( page != \"#page1\" && page != \"#authenticationToken\" ) {\r\n\t\t\t\t\t\tvar drawer = $( \"#drawer\" );\r\n\t\t\t\t\t\tvar isDialog = false;\r\n\t\t\t\t\t\tvar drawerWidth = drawer.width( );\r\n\r\n\t\t\t\t\t\tif ( $.mobile.activePage.data( \"role\" ) == \"dialog\" ) {\r\n\t\t\t\t\t\t\tisDialog = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ( main.controller.isLandscape ) {\r\n\t\t\t\t\t\t\t$( \".drawer-menu-button\" ).hide( );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$( \".drawer-menu-button\" ).show( );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ( main.controller.isLandscape || main.controller.isDrawerOpen ) {\r\n\t\t\t\t\t\t\temis.mobile.UI.updateDrawerLoggedInfo( main );\r\n\t\t\t\t\t\t\tvar drawerCaseloads = $( \"#drawer-caseloads\" );\r\n\t\t\t\t\t\t\tif ( isAppointmentsPage( ) || isCaseloadsPage( ) ) {\r\n\t\t\t\t\t\t\t\tif ( isAppointmentsPage ( ) ) {\r\n\t\t\t\t\t\t\t\t\t$( \"#drawer-appointments\" ).addClass( \"drawer-active\" );\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tdrawerCaseloads.addClass( \"drawer-active\" );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif ( ENABLE_CASELOADS ) {\r\n\t\t\t\t\t\t\t\t\tdrawerCaseloads.show();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$( \"#drawer-patient,\" + \"#drawer-patient-record,\" + \"#drawer-new-appointment,\" + \"#drawer-new-drug,\" + \"#drawer-tasks,\" + \"#drawer-contact\" ).hide( );\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$( \"#drawer-appointments\" ).removeClass( \"drawer-active\" );\r\n\t\t\t\t\t\t\t\tdrawerCaseloads.removeClass( \"drawer-active\" );\r\n\t\t\t\t\t\t\t\t$( \"#drawer li\" ).show( );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ( !isDialog ) {\r\n\t\t\t\t\t\t\t\tdrawer.css( \"z-index\", \"10000\" );\r\n\t\t\t\t\t\t\t\tvar bShowDrawer = true;\r\n\t\t\t\t\t\t\t\tif ( main.controller.isScreenKeyboard && emis.mobile.UI.isiPad ) {\r\n\t\t\t\t\t\t\t\t\tif ( main.controller.isLandscape ) {\r\n\t\t\t\t\t\t\t\t\t\t$( main.controller.pageHeaders ).css( \"margin-left\", \"0px\" );\r\n\t\t\t\t\t\t\t\t\t\t$( \".ui-page-active\" ).css( \"margin-left\", drawerWidth + \"px\" );\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tmain.controller.isDrawerOpen = false;\r\n\t\t\t\t\t\t\t\t\t\tbShowDrawer = false;\r\n\t\t\t\t\t\t\t\t\t\tdialogInPortrait( isDialog );\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$( \".ui-page-active,\" + main.controller.pageHeaders ).css( \"margin-left\", drawerWidth + \"px\" );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif ( main.controller.isLandscape ) {\r\n\t\t\t\t\t\t\t\t\t$( \".ui-page-active,\" + main.controller.pageHeaders ).width( currentWindowWidth - drawerWidth );\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$( main.controller.pageHeaders ).width( currentWindowWidth );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif ( bShowDrawer ) {\r\n\t\t\t\t\t\t\t\t\tdrawer.show( );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\taddPadding( \".ui-page-active\", \".ui-page-active .ui-header\" );\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tif ( main.controller.isLandscape ) {\r\n\t\t\t\t\t\t\t\t\tif ( !main.controller.isScreenKeyboard ) {\r\n\t\t\t\t\t\t\t\t\t\t$( main.controller.pageHeaders ).css( {\r\n\t\t\t\t\t\t\t\t\t\t\t\"margin-left\": drawerWidth,\r\n\t\t\t\t\t\t\t\t\t\t\t\"width\": ( currentWindowWidth - drawerWidth ) + \"px\"\r\n\t\t\t\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif ( main.controller.backPage ) {\r\n\t\t\t\t\t\t\t\t\t\t$( main.controller.backPage ).css( {\r\n\t\t\t\t\t\t\t\t\t\t\t\"margin-left\": drawerWidth + \"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\"width\": ( currentWindowWidth - drawerWidth ) + \"px\"\r\n\t\t\t\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tdrawer.css( \"z-index\", \"1\" );\r\n\t\t\t\t\t\t\t\t\tdrawer.show( );\r\n\t\t\t\t\t\t\t\t\tif ( main.controller.backPage ) {\r\n\t\t\t\t\t\t\t\t\t\taddPadding( main.controller.backPage, main.controller.backPage + \" .ui-header\" );\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tdialogInPortrait( isDialog );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tdialogInPortrait( isDialog );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$( \"#drawer\" ).hide( );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (!ENABLE_CASELOADS) {\r\n\t\t\t\t\t\t$('#drawer-caseloads').hide() ;\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "closeOutline() {}", "onOpen() {\n\t\t}", "function toggle() {\n setOpened(!opened);\n expandedCallback(!opened);\n }", "open() {\n this.expanded = true;\n }", "open_side_nav() {\n var navButton = document.getElementsByClassName('js-drawer-open-left')[0];\n recreate_node(navButton, true);\n this.make_logo_home();\n var navDrawer = document.getElementById('NavDrawer');\n navDrawer.style.minWidth = '0px';\n navDrawer.style.width = '0px';\n navDrawer.style.display = 'block';\n navDrawer.style.left = '0';\n var navContainer = document.getElementById('NavContainer');\n var horizontalMenu = document.createElement('ul');\n horizontalMenu.id = 'od-nav-menu';\n var menuItems = navContainer.getElementsByClassName('mobile-nav__item')\n for (var i = 0; i < menuItems.length; i++) {\n horizontalMenu.appendChild(menuItems.item(i).cloneNode(true));\n }\n navDrawer.insertBefore(horizontalMenu, document.getElementById('SearchContainer'));\n navContainer.remove();\n if (window.location.href.indexOf(\"collections\") > -1\n && window.location.href.indexOf(\"products\") < 0) {\n try {\n document.getElementsByClassName('fixed-header')[0].style.paddingTop = '0px';\n } catch (error) {\n console.log(error);\n }\n } else {\n document.getElementById('PageContainer').style.marginTop = '130px';\n }\n var logo = document.getElementsByClassName('site-header__logo')[0];\n logo.style.display = 'none';\n logo.style.height = '0px';\n }", "function displaymobile(){\n \n const togggledrawer = value=>{\n setState({...state,draweropen:value});\n console.log(draweropen)\n }\n \n function getDraweritem(){\n \n return menudata.map(({label,href})=>{\n return <Link to={href} spy={true} smooth={true} onClick={()=>togggledrawer(false)}>\n <MenuItem className={menubtn}>{label}</MenuItem>\n </Link> \n })\n\n \n }\n return <div style={{height:\"50px\",background:\"rgb(237, 249, 254)\"}}>\n <Fade top duration={1500} distance=\"40px\">\n <Toolbar>\n <IconButton className={menuicon} onClick={()=>togggledrawer(true)} >\n <MenuIcon />\n </IconButton>\n <Drawer anchor=\"top\" open={draweropen} onClose={()=>togggledrawer(false)}>\n <div className={drawerContainer}>\n \n \n {getDraweritem()}\n </div>\n </Drawer>\n </Toolbar>\n </Fade>\n </div>\n \n }", "function toggleDrawer()\n{\n if(document.getElementById('drawer').style.display === \"none\")\n {\n document.getElementById('drawer').style.animation = \"fadein .8s ease-in forwards\";\n document.getElementById('drawer').style.display = \"flex\";\n document.getElementById('blurbody').style.animation = \"filter .8s ease-in forwards\";\n document.getElementById('play').style.animation = \"playfilter .8s ease-in forwards\";\n document.getElementById('disableui').style.pointerEvents = \"none\";\n document.getElementById('play').style.pointerEvents = \"none\";\n setTimeout(function () {\n document.getElementById('blurbody').onclick = toggleDrawer;\n }, 10);\n }\n else\n {\n document.getElementById('drawer').style.animation = \"fadeout .8s ease-out forwards\";\n document.getElementById('blurbody').style.animation = \"unfilter .8s ease-out forwards\";\n document.getElementById('play').style.animation = \"playunfilter .8s ease-out forwards\";\n setTimeout(function (){\n document.getElementById('drawer').style.display = \"none\";\n document.getElementById('disableui').style.pointerEvents = \"all\";\n document.getElementById('play').style.pointerEvents = \"all\";\n document.getElementById('blurbody').onclick = null;\n }, 800);\n }\n}", "set open(data) {\n if (this._open === data) return;\n this._open = data;\n if (this._open) {\n this._$container.classList.add(\"open\");\n } else {\n this._$container.classList.remove(\"open\");\n }\n this._render();\n }", "toggleDrawer(event){\n // console.log(\"drawer click\");\n this.setState({draweropen: !this.state.draweropen})\n}", "toggleDrawer(event){\n // console.log(\"drawer click\");\n this.setState({draweropen: !this.state.draweropen})\n}", "toggleMenuDrawer(){\n this.setState({ isOpenMenuDrawer: !this.state.isOpenMenuDrawer });\n }", "open() {\n this.setAttribute('open', '');\n this._isOpen = true;\n }", "function settingsOpen(e){\r\n const item = e.target;\r\n sideBar.classList.toggle(\"openSidebar\");\r\n}", "close() {\n this._drawers.forEach((drawer) => drawer.close());\n }", "constructor() {\n super()\n this.drawer = new Components.window.Drawer({\n parent: document.body,\n id: 'drawer',\n onclose: () => {\n this.gui.drawer.hide();\n }\n });\n }", "get drawer() {\n return this.root_.querySelector(MDCPersistentDrawerFoundation.strings.DRAWER_SELECTOR);\n }", "function advancedMenu() {\n if (advancedMenuIsOpen) {\n closeAdvancedMenu();\n } else {\n openAdvancedMenu();\n }\n}", "function onOpenClose(){if(typeof this.fd==='number'){// actually close down the fd\nthis.close();}}", "function handleOpen() {\n setOpen(true)\n }", "function handleOpen() {\n setOpen(true);\n }", "toggle() {\n console.log(this.windowOpen);\n if (this.windowOpen)\n this.closeInventory();\n else\n this.openInventory();\n\n }", "function openArchive(target_element){\n var arc_table = target_element.nextSibling, arrow = target_element.firstElementChild;\n if(arc_table.classList.contains('closed-section')){\n arc_table.classList.add('open-section');\n arc_table.classList.remove('closed-section');\n arrow.innerHTML = \" &#9660;\";\n } else {\n arc_table.classList.add('closed-section');\n arc_table.classList.remove('open-section');\n arrow.innerHTML = \" &#9654;\";\n }\n }", "close() {\n this._drawers.forEach(drawer => drawer.close());\n }", "function openMenu() {\n g_IsMenuOpen = true;\n}", "showLeftDrawer() {\n return this;\n }", "function prepareForOpen() {\n actions.open = true;\n input.placeholder = \"Open what?\";\n}", "open() {\n\t\tif (this._opened) return\n\t\tthis._opened = true\n\t\tthis.addClass('open')\n\t\tthis.trigger(ToggleComponent.ToggleEvent, this, this._opened)\n\t}", "function open_panel() {\nslideIt();\nvar a = document.getElementById(\"sidebar\");\na.setAttribute(\"id\", \"sidebar1\");\na.setAttribute(\"onclick\", \"close_panel()\");\n}", "function toggleNavigationMenu() { \n\tconst nav = document.getElementById(\"nav-menu\"); // get hidden nav\n const background = document.getElementsByTagName('main')[0]; // get main part of document\n\n if (nav.style.height === \"\"){ // if nav is hidden\n \tnav.style.height = \"325px\"; // open drawer to stated size\n background.style.opacity = \".3\"; // and dim the background\n } else { // trigger if function is called and nav is already open \n \tnav.style.height = \"\"; // make drop down nav go away\n background.style.opacity = \"\"; // make opaque background go away\n } \n}", "function onOpen() {\n SpreadsheetApp.getUi()\n .createAddonMenu() // Add a new option in the Google Docs Add-ons Menu\n .addItem(\"Call the Book Hound\", \"showSidebar\")\n //.showSidebar()\n .addToUi(); // Run the showSidebar function when someone clicks the menu\n}", "function close_panel() {\nslideIn();\na = document.getElementById(\"sidebar1\");\na.setAttribute(\"id\", \"sidebar\");\na.setAttribute(\"onclick\", \"open_panel()\");\n}", "close() {\n this.opened = false;\n }", "toggle () {\n this.opened = !this.opened;\n }", "toggle () {\n this.opened = !this.opened;\n }", "function lfOpen() {\n $(\"#down-content\").style.display = \"block\";\n }", "onLoad() {\n this.openType = 'popup';\n this.opened = false;\n // this.open();\n }", "function closeNav(sidenavCase) {\n switch(sidenavCase){\n /*Side Overlay*/\n case \"SO\": document.getElementById(\"mySidenav\").style.width = \"0\";\n break;\n /*Push Content*/\n case \"PC\": \n document.getElementById(\"mySidenav\").style.width = \"0\";\n document.getElementById(\"main\").style.marginLeft = \"0\";\n document.getElementById(\"btnNav\").style.marginLeft =\"0\";\n document.getElementById(\"close\").style.display = \"none\";\n document.getElementById(\"open\").style.display = \"inline\";\n break;\n /*Full width*/\n case \"FW\":\n document.getElementById(\"mySidenav\").style.width = \"0\";\n break;\n /*Push Content with opacity*/\n default :\n document.getElementById(\"mySidenav\").style.width = \"0\";\n document.getElementById(\"main\").style.marginLeft = \"0\";\n document.body.style.backgroundColor = \"#323232\";\n break;\n }\n \n}", "function onOpen() {\n setDefaults();\n loadMenu(userProp.getProperty(g_debug_key));\n}", "get isOpen() { return this._state === Win.STATE_OPEN; }", "function toggleOpen() {\n open = !open;\n \n updateOpen();\n }", "showRightDrawer() {\n return this;\n }", "configureDoor(door)\n {\n door.animations.add('open', null, 6, false);\n door.open = false;\n }", "get drawer() {\n return this.root_.querySelector(MDCTemporaryDrawerFoundation.strings.DRAWER_SELECTOR);\n }" ]
[ "0.694324", "0.6920997", "0.6607745", "0.65974975", "0.64773864", "0.62230724", "0.6222998", "0.61897856", "0.6173693", "0.61709476", "0.6131666", "0.61242294", "0.6110677", "0.60980356", "0.6058406", "0.60550934", "0.6003932", "0.5983764", "0.5965606", "0.5949149", "0.59165657", "0.58678705", "0.58568037", "0.5856709", "0.58361673", "0.58358115", "0.5798403", "0.5798403", "0.5795718", "0.57932323", "0.578292", "0.5780878", "0.5779726", "0.57658195", "0.574963", "0.574963", "0.56966305", "0.56962687", "0.5692702", "0.56871", "0.568171", "0.56611854", "0.5634144", "0.562023", "0.5614539", "0.5610019", "0.5599073", "0.5597313", "0.5584639", "0.55785155", "0.55715966", "0.5551862", "0.5530088", "0.55261636", "0.55234176", "0.5499316", "0.5497911", "0.5494613", "0.54731333", "0.5460668", "0.54520917", "0.54323924", "0.54169285", "0.5413413", "0.540925", "0.54068375", "0.54068375", "0.5405757", "0.54", "0.5396354", "0.5394902", "0.53936803", "0.5392609", "0.53899664", "0.53876543", "0.5382382", "0.5367245", "0.5366923", "0.5366608", "0.536473", "0.53628695", "0.5361199", "0.53392255", "0.5338596", "0.5338192", "0.53367364", "0.5327711", "0.5320133", "0.530707", "0.53058654", "0.53058654", "0.5305831", "0.53038335", "0.5301397", "0.5300484", "0.529885", "0.5298813", "0.5298513", "0.5293536", "0.529292" ]
0.64519614
5
event adapters Start the data collection by sending the collection command to the active content script
function startDataCollection(event){ console.log("starting"); sendMessage({command: "start", target: tabs[0], mode: event.srcElement.id}); logUserAction("Start Visiting"); window.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterCollection(ctx) {\n\t}", "function main() {\n\tapi.getItems()\n\t\t.then((items) => {\n\t\t\titems.forEach((obj) => store.addItem(obj));\n\t\t});\n\tevents.initEvents();\n\tlist.render();\n}", "setupDataListener(){\n PubSub.subscribe('Items:item-data-loaded',(evt)=>{this.initiliaze(evt.detail)});\n }", "function startup() {\n displayItems(connection, \"SELECT * FROM products;\", operationSelect);\n}", "initData() {\n this.db.listCollections().toArray((err, info) => {\n if (err) {\n console.log(err);\n return;\n }\n console.log(\"collections\", info.length, info);\n if (info.length === 0) {\n this.seedData();\n }\n });\n }", "function start () {\n connection.query(\"SELECT * FROM products\", function(err, results){\n if (err) throw err;\n console.table(results);\n selectItem();\n })\n}", "function loadCollection() {\n // If an operation is in progress, usually involving the server, don't do it.\n if (processing) { return false; }\n // Get name of selected collection.\n var collectionName = parent.fraControl.document.getElementById(\n \"collectionsList\").value;\n // Ignore the first item, our \"dummy\" collection.\n if (collectionName == \"none\") {\n return false;\n }\n // Get rid of the initial text on the landing pad. We don't need it any more.\n document.getElementById(\"landingPadText\").style.display = \"none\";\n // Reset everything to initial states, which effectively \"closes\"\n // the current collection, if any.\n resetVars();\n setPicLocations();\n // Show the please wait floatover.\n showPleaseWait();\n // Make AJAX call.\n dojo.io.bind({\n url: \"loadCollection.action\",\n content: {collection: collectionName},\n error: function(type, errObj) { alert(\"AJAX error!\"); },\n load: function(type, data, evt) {\n // Now that we have received back the XML describing the collection,\n // we'll use JSDigester to parse it.\n var jsDigester = new JSDigester();\n jsDigester.addObjectCreate(\"collection\", \"Collection\");\n jsDigester.addSetProperties(\"collection\");\n jsDigester.addObjectCreate(\"collection/photo\", \"Photo\");\n jsDigester.addSetProperties(\"collection/photo\");\n jsDigester.addBeanPropertySetter(\"collection/photo\",\n \"setDescription\");\n jsDigester.addSetNext(\"collection/photo\", \"addPhoto\");\n currentCollection = jsDigester.parse(data);\n // Now the XML has been parsed and we have a populated Collection\n // object to play with. Now, we'll tell the collection object\n // to go load all the photos.\n currentCollection.loadPhotoImages();\n // And now, update the filmstrip.\n updatePics();\n hidePleaseWait();\n },\n mimetype: \"text/plain\",\n transport: \"XMLHTTPTransport\"\n });\n}", "function databaseInitialize() {\n /* var entries = db.getCollection(\"items\");\n if (entries === null) {\n entries = db.addCollection(\"items\");\n } */\n // kick off any program logic or start listening to external events\n runProgramLogic();\n}", "function initListableDataEvents(){\r\n\t\t\treturn {\r\n\t\t\t\tonViewChange: function(){ ctrl.parametersForCollectionsList.selectedCollections = []; }\r\n\t\t\t}\r\n\t\t}", "function theClick() {\r\n console.log('inicia')\r\n dataNodes()\r\n dataElements()\r\n backEnd()\r\n}", "function onInit() {\n loadData();\n manageBag();\n}", "function initializeDataControllers() {\n\t\tmediator.subscribe('application:menu:DatasetListPopulated', function(selectedDataset){\n\t\t\t\tmediator.publish('application:controller:LoadDataset', selectedDataset);\n\t\t\t});\n\t\tmediator.subscribe('application:menu:DatasetSelected', function(selectedDataset) {\n\t\t\t\tmediator.publish('application:controller:LoadDataset', selectedDataset);\n\t\t\t});\n\t}", "publish() {\n if (Meteor.isServer) {\n const eventDataPublications = require('./EventDataCollectionPublications.js').eventDataCollectionPublications;\n eventDataPublications();\n }\n }", "function addCollection() {\n // If an operation is in progress, usually involving the server, don't do it.\n if (processing) { return false; }\n // If photo happens to be growing, cut it short.\n snapImageToLandingPad();\n window.open(\"showAddCollection.action\", \"\", \"width=340,height=240\");\n}", "onCreatedHandler() {\n this.setSelection(this.qs_url);\n this.fetchData();\n }", "function refreshCollectionsWithExpansion(){\n $scope.rootBroadcast(constants.YANGMAN_REFRESH_AND_EXPAND_COLLECTIONS);\n }", "function start()\n{\n clear();\n console.log(\"==============================================\\n\");\n console.log(\" *** Welcome to the Interstellar Pawn Shop *** \\n\");\n console.log(\"==============================================\\n\");\n console.log(\"We carry the following items:\\n\");\n readCatalog();\n}", "function activate() {\n vm.controller.setObjectList();\n }", "function onFileLoaded(doc) {\n var collabList = doc.getModel().getRoot().get('coll_list');\n wireTextBoxes(collabList);\n \n //-------- addTask button \n var button = document.getElementById('addTask');\n button.addEventListener('click', function () {\n\n var newTask = doc.getModel().createString();\n var newTaskText = document.getElementById(\"newTaskText\");\n newTask.setText(newTaskText.value);\n newTaskText.value = '';\n newTaskText.placeholder = 'Write your text here..';\n\n collabList.push(newTask); \n });\n \n //-------- enter button handler \n var newTaskField = document.getElementById('newTaskText');\n newTaskField.addEventListener('keydown', function(e){\n if(e.keyCode == 13){\n e.preventDefault();\n var newEvent = new Event('click');\n button.dispatchEvent(newEvent);\n } \n });\n\n //-------- onValuesAdded action (draw item) \n collabList.addEventListener(gapi.drive.realtime.EventType.VALUES_ADDED, function(){\n var length1 = collabList.asArray().length;\n drawTask(length1-1, collabList);\n });\n \n //-------- onValuesRemoved action (redraw list) \n collabList.addEventListener(gapi.drive.realtime.EventType.VALUES_REMOVED, function(){redraw(collabList)}); \n}", "function startinteractive () \n{\n\tcorporal.on('load', corporal.loop);\n}", "function onCollectionsButtonTouched(e){\n\tvar view = Alloy.createController(\"media/collections\", {\n\t\t\"media\": media\n\t}).getView();\n\t\n\t// Load the collections view\n\taddViewToSections(view);\n}", "function InitAdapter() {\n // get current page\n if (!this.parent.course.currentPopupPageId)\n launchData.CurrentPage = this.parent.course.getCurrentPage();\n else\n launchData.CurrentPage = this.parent.courseController.getPageFromId(this.parent.course.currentPopupPageId);\n\n if (!launchData.CurrentPage.MagazineCourseUrl) {\n // get the item tag from the imsmanifest.xml file\n var itemTag = readManifest();\n\n // return if we could not get a valid item tag because of an imsmanifest.xml format problem\n if (!itemTag) return;\n\n // see what SCORM version we have\n if (launchData.ScormVersion == \"1.2\") {\n // we have SCORM 1.2, init the SCORM 1.2 object\n window.API = new Object;\n\n // an <item> tag may contain these tags\n /*\n <adlcp:maxtimeallowed>00:30:00</adlcp:maxtimeallowed>\n <adlcp:timelimitaction>exit,no message</adlcp:timelimitaction>\n <adlcp:datafromlms>Some information about the learning resource</adlcp:datafromlms>\n <adlcp:masteryscore>90</adlcp:masteryscore>\n */\n\n // get the data if these tags exist\n var maxtimeallowed = $(itemTag).find(\"adlcp\\\\:maxtimeallowed\").text();\n var timelimitaction = $(itemTag).find(\"adlcp\\\\:timelimitaction\").text();\n var datafromlms = $(itemTag).find(\"adlcp\\\\:datafromlms\").text();\n var masteryscore = $(itemTag).find(\"adlcp\\\\:masteryscore\").text();\n\n // init the SCORM 1.2 data\n initSCORM12API(API, launchData.UserID, launchData.FirstName, launchData.LastName, maxtimeallowed, timelimitaction, datafromlms, masteryscore);\n } else {\n // we have SCORM 2004, init the SCORM 2004 object\n window.API_1484_11 = new Object;\n\n // an <item> tag may contain these tags\n /*\n <adlcp:completionThreshold completedByMeasure=\"true\" minProgressMeasure=\"0.8\" />\n <adlcp:timeLimitAction>exit,no message</adlcp:timeLimitAction>\n <adlcp:dataFromLMS>Some SCO Information</adlcp:dataFromLMS>\n */\n\n // get the data if these tags exist\n var completionThreshold = $(itemTag).find(\"adlcp\\\\:completionThreshold\");\n if (completionThreshold.length)\n var minProgressMeasure = completionThreshold.attr(\"minProgressMeasure\");\n else\n var minProgressMeasure = \"\";\n var timeLimitAction = $(itemTag).find(\"adlcp\\\\:timeLimitAction\").text();\n var dataFromLMS = $(itemTag).find(\"adlcp\\\\:dataFromLMS\").text();\n\n // init the SCORM 1.2 data\n initSCORM2004API(API_1484_11, launchData.UserID, launchData.FirstName, launchData.LastName, minProgressMeasure, timeLimitAction, dataFromLMS);\n }\n\n // restore the SCORM data from the previous launch\n getAllLMSData();\n\n // launch the SCO\n launchIt(launchData.CourseLocation + \"/\" + launchData.LaunchURL);\n }\n else {\n // restore the SCORM data from the previous launch\n getAllLMSData();\n\n // launch the course from magazine\n launchIt(launchData.CurrentPage.MagazineCourseUrl);\n }\n}", "function Data() {\n var context = SP.ClientContext.get_current();\n var web = context.get_web();\n var lists = web.get_lists();\n //var list = context.get_web().get_lists().getByTitle('RajeshPracticeList');\n //var camlquery = new SP.CamlQuery();\n //camlquery.set_viewXml('<View><RowLimit>100</RowLimit></View>');\n\n //this.collListItem = list.getItems(camlquery);\n\n context.load(web, \"Title\", \"Description\");\n context.load(lists, \"Include(Title,Fields.Include(Title))\");\n //context.load(collListItem, 'Include(Id,DisplayName)');\n context.executeQueryAsync(success, fail);\n\n function success() {\n var info = jQuery(\"#message1\");\n info.append(web.get_title());\n\n var listEnumerator = lists.getEnumerator();\n while (listEnumerator.moveNext()) {\n var listinfo = listEnumerator.get_current();\n info.append(\"<br />\");\n info.append(listinfo.get_title());\n\n //var listFields = lists.get_fields();\n //clientContext.load(listFields);\n\n var listfiledinfo = listinfo.get_fields().getEnumerator();\n\n while (listfiledinfo.moveNext()) {\n var field = listfiledinfo.get_current();\n info.append(\"<br />&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp\");\n info.append(field.get_title());\n\n\n }\n }\n }\n function fail(sender, args) {\n alert(\"Error Occured\" + args.get_message());\n\n }\n\n\n }", "function loadData() {\n\tvar camlQuery = new SP.CamlQuery();\n\t\n\tvar query = '<View><Query><OrderBy><FieldRef Name=\"Created\" Ascending=\"False\"></FieldRef></OrderBy></Query>'+\n\t\t\t\t'<ViewFields><FieldRef Name=\"SprintProgress\"/></ViewFields><RowLimit>'+ sprintHistoryLimit +'</RowLimit></view>';\n\tcamlQuery.set_viewXml(query);\n\tcollListItem = listReference.getItems(camlQuery);\n\n\tclientContext.load(collListItem);\n\tclientContext.executeQueryAsync(\n\tFunction.createDelegate(this, this.pageInit),\n\tFunction.createDelegate(this, this.showDataError));\n}", "fetch() {\n this.collection = JSON.parse(localStorage.getItem(this.localStorage_key)) || [];\n this.bus.trigger('collectionUpdated');\n }", "function setupCollection(err, db) {\n if(err) throw err;\n collection=db.collection(\"teste02\"); //name of the collection in the database\n client=mqtt.connect({ host: 'localhost', port: 1883 }); //connecting the mqtt server with the MongoDB database\n client.subscribe(deviceRoot+\"#\"); //subscribing to the topic name\n client.on('message', insertEvent); //inserting the event\n}", "onCollectionSort() {\n let me = this;\n\n if (me.configsApplied) {\n // console.log('onCollectionSort', me.collection.items);\n // me.fire('load', me.items);\n }\n }", "onCollectionSort() {\n let me = this;\n\n if (me.configsApplied) {\n // console.log('onCollectionSort', me.collection.items);\n // me.fire('load', me.items);\n }\n }", "begin() {\n\t\tthis.items.forEach((item) => {\n\t\t\tthis.setAttributes(item);\n\t\t\tthis.createObserver(item);\n\t\t});\n\t}", "startCollecting() {\n this.collecting = true; this.collectStart = new Date().getTime();\n this.collectAccepted = 0; this.fetched.session = 0;\n }", "fetchDataStart(){\n this.hideDropDown();\n this.showLoader();\n }", "preIngestData() {}", "function start() {\n hentData();\n}", "function vistaLoggingStartCollectionDialog(stateID, grammarList) {\n var trackingData = '';\n if (grammarList == undefined) {\n trackingData = 'S';\n }\n else { \n trackingData = 'S(' + grammarList.join(',') + ')'; \n }\n vistaAppendCallTrackingData(stateID, trackingData);\n}", "function start() {\n var productListsForm = session.forms.productlists;\n\n Form.get(productListsForm).clear();\n\n\n var GetProductListsResult = new Pipelet('GetProductLists').execute({\n Customer: customer,\n Type: ProductList.TYPE_GIFT_REGISTRY\n });\n var ProductLists = GetProductListsResult.ProductLists;\n\n Form.get(productListsForm.items).copyFrom(ProductLists);\n\n var accountGiftRegistry = Content.get('myaccount-giftregistry');\n\n var pageMeta = require('~/cartridge/scripts/meta');\n pageMeta.update(accountGiftRegistry);\n\n app.getView().render('account/giftregistry/registrylist');\n}", "function sendSelections(event)\n{\n var destination = sendSelectionsMenu.val();\n sendSelectionsMenu.val(\"Send selection...\");\n datasetID = currentlySelectedDataStoreItem.file;\n\n cmd = \"userDataStoreGetDataItem\";\n callback = \"sendSelectionTo_\" + destination;\n\n payload = {\"userID\": userID,\n \"userGroups\": [\"public\", \"test\"],\n \"dataItemName\": datasetID};\n\n msg = {\"cmd\": cmd, \"status\": \"request\", \"callback\": callback, \"payload\": payload};\n hub.send(JSON.stringify(msg));\n\n} // sendSelections", "function enter() {\n fetchData(true);\n }", "function start() {\n // MongoDB connection, settings and callback\n simpledb.init({\n // MongoDB connection String.\n connectionString: 'mongodb://localhost/company',\n\n // Location of the Schemas.\n modelsDir : `${__dirname}/schemas`\n\n // Callback (errorObject, Database Object \"dbo\")\n }, (err, db) => {\n\n // Checking for errors\n if(err)\n return writeErr(err);\n\n // Adding asynchronous forEach to the dbo.\n // This allows one initialization and easy access.\n db.forEachAsync = forEachAsync;\n\n // Ruuning Service and passing the dbo,\n // Error Object and Results\n run(db, (err, results) => {\n\n // Checking for errors.\n if(err)\n return writeErr(err);\n\n // Adding the results to the response.\n response.results = results;\n\n // Response is prepared, now I am seing it.\n // Callback (str that is ready to output.\n sendRes((str) => {\n\n // Output String\n console.log(str);\n\n // Stopping.\n process.exit();\n });\n });\n // TODO: Break the callbacks up for better and easier code.\n });\n}", "function startApp() {\n //first calls, default dataset? \n }", "function wlListener(){\n\n $('.wlItem').on('click',function(e) \n {\n e.preventDefault();\n e.stopPropagation(); \n var idtofetch = $(this).attr(\"id\");\n emptyDataSets();\n runAPIs(idtofetch);\n console.log(idtofetch);\n });\n\n}", "triggerStartUpdate(collection) {\n return Promise.all(Object.keys(collection)\n .map(name => collection[name])\n .filter(variable => variable.startUpdate && variable.invoke)\n .map(variable => variable.invoke()));\n }", "_triggerCollectionAction(prefix, levels) {\n\t // Try to find prefix in collections list\n\t if (!this.loading && this._data !== null && this.error === '') {\n\t // Find matching prefix\n\t const categories = Object.keys(this._data);\n\t let found = false;\n\t for (let i = 0; i < categories.length; i++) {\n\t if (this._data[categories[i]][prefix] !== void 0) {\n\t found = true;\n\t break;\n\t }\n\t }\n\t if (!found) {\n\t return;\n\t }\n\t }\n\t // Create child view\n\t const registry = storage.getRegistry(this._instance);\n\t const router = registry.router;\n\t router.createChildView({\n\t type: 'collection',\n\t params: {\n\t provider: this.provider,\n\t prefix: prefix,\n\t },\n\t }, levels);\n\t }", "function start_loadImages()\n {\n methods.loadImages(\n function() {\n methods.getDataURI();\n run_app();\n },\n imagesRack.imgList\n );\n }", "_parseCollection()\n {\n var that = this;\n fs.readFile(this.option.path, 'utf8', function (err, data) {\n if (err) throw err;\n that.collection = JSON.parse(data);\n that._serveCollection();\n })\n }", "function init_collections(me, plugin, db_handle, cname, dbcname, next) {\n var do_coll = plugin.do_create_collection;\n me[cname] = do_coll(db_handle, dbcname, true);\n next(null, null);\n}", "function collectData (Data){ \r\n kango.console.log (\"site collected\");\r\n \r\n\t var event = Data.event;\r\n for (var i=0; i < event.length; i++ )\r\n { // browse selector of each event\r\n for (var j=0; j < event[i].selectors.length; j++ ) \r\n { \r\n if ((event[i].selectors[j].Selector==undefined) || (event[i].selectors[j].Selector==\"\"))\r\n\t\t\t\t{\r\n\t\t\t\t if ((event[i].typeObsel==undefined) || (event[i].typeObsel==\"\") )\r\n\t\t\t\t {\r\n\t\t\t\t $(document).on(event[i].type,fonction);\r\n\t\t\t\t }\r\n\t\t\t\t else \r\n\t\t\t\t {\r\n\t\t\t\t $(document).on(event[i].type,{typeO:event[i].typeObsel},fonctionT);\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t else\r\n\t\t if ((event[i].typeObsel==undefined) || (event[i].typeObsel==\"\") )\r\n\t\t\t {//kango.console.log (event[i].selectors[j].Selector);\r\n\t\t\t\t\t$(event[i].selectors[j].Selector).on (event[i].type,fonction);}\r\n\t\t\t\telse \r\n {\r\n\t\t\t\t\t //kango.console.log (event[i].selectors[j].Selector);\r\n\t\t\t\t\t $(event[i].selectors[j].Selector).on (event[i].type,{typeO:event[i].typeObsel},fonctionT);\r\n\t\t\t\t\t}\r\n\t\t } \r\n \t if (i == event.length-1 ) \r\n {\r\n ListenServer(); \r\n if (!notifV)\r\n {\r\n kango.dispatchMessage ('notification');notifV= true;} }\r\n }\r\n}", "function onRequestSucceeded() {\n\n console.log( 'success' );\n //console.log(testList.get_contentTypesEnabled());\n\n //var itemID = oList.get_id().toString();\n //console.log( program + '\\nUpdated '); \n\n }", "enqueue(item) {\n // console.log(item)\n enqueueItem(item, this.collection, 0, this.collection.length)\n // console.log(this.collection)\n }", "function sync() {\n\t\n\tvar items = {};\n\tvar destinations = [];\n\tvar collections = get_collections();\n\tvar $sync_collections = $('#sync_collections');\n\tvar $sync_destinations = $('#sync_destinations');\n\t// Items\n\tif ($sync_collections.find('.all').hasClass('clicked')) {\n\t\titems = get_imported();\n\t} else {\n\t\t$sync_collections.find('.collection:not(.all)').each(function(index) {\n\t\t\tvar $this = $(this);\n\t\t\tif (!$this.hasClass('clicked')) return;\n\t\t\t$.extend(items, collections[index].items);\n\t\t});\n\t};\n\tif ($.isEmptyObject(items)) {\n\t\talert('There are no items to import. Please select one or more collections that contain items.');\n\t\treturn;\n\t}\n\t// Destinations\n\t$sync_destinations.find('.collection').each(function(index) {\n\t\tvar $this = $(this);\n\t\tif (!$this.hasClass('clicked')) return;\n\t\tdestinations.push({'uri':rtrim($this.data('uri'),'/'),'id':$this.data('id')});\n\t});\n\tif (!destinations.length) {\n\t\talert('Please select one or more destination Scalar books.');\n\t\treturn;\n\t}\n\t// Run sync\n\tdo_sync(items, destinations);\n\t\n}", "function start() {\n if (started || !isEnabled.value)\n return;\n if (isServer && currentOptions.value.prefetch === false)\n return;\n started = true;\n loading.value = true;\n var client = resolveClient(currentOptions.value.clientId);\n query.value = client.watchQuery(__assign(__assign({ query: currentDocument, variables: currentVariables }, currentOptions.value), isServer ? {\n fetchPolicy: 'network-only'\n } : {}));\n startQuerySubscription();\n if (!isServer && (currentOptions.value.fetchPolicy !== 'no-cache' || currentOptions.value.notifyOnNetworkStatusChange)) {\n var currentResult = query.value.getCurrentResult();\n if (!currentResult.loading || currentOptions.value.notifyOnNetworkStatusChange) {\n onNextResult(currentResult);\n }\n }\n if (!isServer) {\n for (var _i = 0, subscribeToMoreItems_1 = subscribeToMoreItems; _i < subscribeToMoreItems_1.length; _i++) {\n var item = subscribeToMoreItems_1[_i];\n addSubscribeToMore(item);\n }\n }\n }", "function _start() {\r\n\t\tif (_events.length === 0) {\r\n\t\t\tconsole.log('No events found');\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t_currentEvents = _events[0];\r\n\t\t$evName.html(_currentEvents.name);\r\n\t\t_currentEvents.onCountdownStart(_currentEvents);\r\n\t\t_actions();\r\n\t\t_timer = setInterval(_actions, 1000);\r\n\t}", "function onSuccess() {\n\t\t\t\tvent.trigger(\"display:message\",\"Links succesfully imported.\");\n\t\t\t\t//TODO: use current search string to fetch collection again\n\t\t\t\tself.collection.fetch();\n\t\t\t}", "async importToTypesense(data, collectionName) {\n const chunkSize = 2000;\n for (let i = 0; i < data.length; i += chunkSize) {\n const chunk = data.slice(i, i + chunkSize);\n await this.caller.call(async () => {\n await this.client\n .collections(collectionName)\n .documents()\n .import(chunk, { action: \"emplace\", dirty_values: \"drop\" });\n });\n }\n }", "function doAfterAppAppears() {\n app = window.wrappedJSObject.App.singleton;\n if (!app) {\n setTimeout(doAfterAppAppears, 1000);\n return;\n }\n var conduits = window.wrappedJSObject.ArcheType.UserConduits;\n conduits.push( { name: 'Fotki', provides: [ 'Photo' ] } );\n conduits.PRESENTATION['ConduitFotki'] = {action: \"Insert\", stackOrder: 98, perPage: 14};\n\n\n var DOM = window.wrappedJSObject.DOM;\n var insertAsset = app.dialogs.insertAsset;\n var sourceNames = insertAsset.sourceNames;\n sourceNames.push(\"ConduitFotki\");\n var id = insertAsset.element.id + \"-conduit-fotki\";\n var element = DOM.getElement(id);\n var constructor = window.wrappedJSObject.ArcheType.InsertAsset.Conduit;\n\tvar component=new constructor(element,\"ConduitFotki\");\n\tcomponent.addObserver(insertAsset);\n\tinsertAsset.sources.push(component);\n\tinsertAsset.sourceMap[\"ConduitFotki\"]=component;\n\tinsertAsset.addComponent(component);\n list = component.list;\n list.setOption(\"singleSelect\", true);\n component.eventClick = conduitEventClick;\n component.listItemsDoubleClicked = conduitEventDoubleClick;\n component.handleCreate = handleCreate;\n}", "function wems_OnLoad() {\r\n initializeManagementData();\r\n}", "function startDatabaseQueries() {\n \n}", "async function initDatabase() {\n for (let collectionName of Object.keys(data.collections)) {\n let collectionData = data.collections[collectionName];\n // Insert entries\n let collection = db.collection(collectionName);\n await collection.insertMany(collectionData);\n }\n}", "publish() {\n if (Meteor.isServer) {\n const boxEventPublications = require('./BoxEventCollectionPublications.js').boxEventCollectionPublications;\n boxEventPublications();\n }\n }", "function Start(){//We start with no items\n\titems[0]=0;\n\titems[1]=0;\n}", "function collectionPrep() {\r\n\tif($(\".collectionNewSubmit\").hasClass(\"clicked\")){\r\n $(\".collectionNewSubmit\").removeClass(\"clicked\");\r\n }\r\n // run on page load\r\n $(\".collectionNewContainer\").hide();\r\n collectionList();\r\n getCollections();\r\n\r\n\r\n //multi-viewer, open collection modal\r\n $(\"#collection-modal-btn\").click(function () {\r\n $(\".collectionModalBackground\").show();\r\n });\r\n\r\n //search page, open collection modal\r\n $('#selected-all').click(function(){\r\n\r\n var signedIn = false;\r\n if ($('#menu').html() != 'Login / Register'){\r\n signedIn = true\r\n }\r\n\r\n if (!signedIn){\r\n $(\"#collection_permission_model\").show();\r\n }\r\n else if (parseInt($('#selected-count').html()) > 0) {\r\n $(\".collectionModalBackground\").show();\r\n }\r\n });\r\n\r\n //close the modal. unselect and get the collections list again\r\n $(\".collectionModalClose\").click(function () {\r\n $(\".collectionSearchBar\").addClass(\"first\");\r\n $(\".collectionModalBackground\").hide();\r\n $(\"#collectionModal\").show();\r\n $(\"#addedCollectionModal\").hide();\r\n var retunselect = unselect(null);\r\n });\r\n\r\n //close the collection added modal\r\n $(\".backToSearch\").click(function () {\r\n $(\".collectionModalClose\").trigger(\"click\");\r\n });\r\n\r\n function addCollectionClickEvent(){\r\n //new collection submit, creates a new one then adds the rest to that collection\r\n $(\".collectionNewSubmit\").unbind();\r\n $(\".collectionNewSubmit\").one('click', function () {\r\n var resource_kids = getAllResourceKids();\r\n var formdata = {\r\n title: $('#collectionTitle').val(),\r\n resource_kid: resource_kids.shift(),\r\n public: 1\r\n };\r\n $.ajax({\r\n url: arcs.baseURL + \"collections/add\",\r\n type: \"POST\",\r\n data: formdata,\r\n statusCode: {\r\n 201: function (data) {\r\n var collection_id = data['collection_id'];\r\n $('.viewCollection').attr('data-colId', data.collection_id);\r\n var formdata = {\r\n collection: collection_id, //a collection_id\r\n resource_kids: resource_kids\r\n }\r\n $.ajax({\r\n url: arcs.baseURL + \"collections/addToExisting\",\r\n type: \"POST\",\r\n data: formdata,\r\n statusCode: {\r\n 201: function (data) {\r\n var href = $('#resources').attr('href');\r\n href = href.split('/');\r\n href = href.pop();\r\n $('#viewCollectionLink').attr('href', arcs.baseURL+\"collections/\"+href+\"?\"+data.collection_id);\r\n $(\"#collectionName\").text($('#collectionTitle').val());\r\n $(\"#collectionMessage\")[0].childNodes[0].nodeValue = (data.new_resources+1)+' resource(s) were added to ';\r\n if( data.duplicates ){\r\n $('#collectionWarning').html('**Warning: At least one resource was a duplicate and skipped.');\r\n }\r\n $(\"#collectionModal\").hide();\r\n $(\"#addedCollectionModal\").show();\r\n getCollections();\r\n addCollectionClickEvent();\r\n }\r\n }\r\n });\r\n },\r\n 400: function () {\r\n console.log(\"Bad Request\");\r\n $(\".collectionModalBackground\").hide();\r\n },\r\n 405: function () {\r\n console.log(\"Method Not Allowed\");\r\n $(\".collectionModalBackground\").hide();\r\n }\r\n }\r\n });\r\n\r\n });\r\n }\r\n addCollectionClickEvent();\r\n\r\n //get all the resource kids being added to the collection\r\n function getAllResourceKids(){\r\n var resource_kids = [];\r\n //is a multi-viewer page collections\r\n $('.resource-container-level').find('.other-resource').each(function (){\r\n var resource_kid = $(this).attr('id');\r\n resource_kid = resource_kid.replace('identifier-', '');\r\n resource_kids.push( resource_kid );\r\n });\r\n //is a search page add to collections\r\n if( resource_kids.length == 0 ){\r\n resource_kids = JSON.parse($('#selected-resource-ids').html());\r\n }\r\n //if still no resources, then stop.\r\n if( resource_kids.length == 0 ){\r\n throw new Error(\"There are no resources selected.\");\r\n }\r\n return resource_kids;\r\n }\r\n\r\n //add the resource to an existing collection from the search tab.\r\n $(\".collectionSearchSubmit\").unbind().click(function () {\r\n var resource_kids = getAllResourceKids();\r\n var formdata = {\r\n collection: $('#collectionSearchObjects input:checked').val(), //a collection_id\r\n resource_kids: resource_kids\r\n };\r\n $.ajax({\r\n url: arcs.baseURL + \"collections/addToExisting\",\r\n type: \"POST\",\r\n data: formdata,\r\n statusCode: {\r\n 201: function (data) {\r\n var href = $('#resources').attr('href');\r\n href = href.split('/');\r\n href = href.pop();\r\n $('#viewCollectionLink').attr('href', arcs.baseURL+\"collections/\"+href+\"?\"+data.collection_id);\r\n var text = $(\"label[for=\" + lastCheckedId + \"]\").children(\":first\").text();\r\n $(\"#collectionName\").text($.trim(text));\r\n $(\"#collectionMessage\")[0].childNodes[0].nodeValue = data.new_resources+' resource(s) were added to ';\r\n if( data.duplicates ){\r\n $('#collectionWarning').html('**Warning: At least one resource was a duplicate and skipped.');\r\n }\r\n $(\"#collectionModal\").hide();\r\n $(\"#addedCollectionModal\").show();\r\n getCollections();\r\n }\r\n }\r\n });\r\n });\r\n\r\n // collection tabs\r\n $(\".collectionTabSearch\").click(function () {\r\n $(\".collectionSearchContainer\").show();\r\n $(\".collectionNewContainer\").hide();\r\n $(\".collectionTabSearch\").addClass(\"activeTab\");\r\n $(\".collectionTabNew\").removeClass(\"activeTab\");\r\n });\r\n\r\n $(\".collectionTabNew\").click(function () {\r\n $(\".collectionNewContainer\").show();\r\n $(\".collectionSearchContainer\").hide();\r\n $(\".collectionTabNew\").addClass(\"activeTab\");\r\n $(\".collectionTabSearch\").removeClass(\"activeTab\");\r\n });\r\n\r\n //new resource click.. update the details tab collections\r\n $('.resource-slider').find('.other-resource').click(function() {\r\n var resourceKid = $(this).attr('id');\r\n resourceKid = resourceKid.replace('identifier-', '');\r\n getCollections(resourceKid);\r\n });\r\n\r\n}", "function start() {\n console.log(\"Selecting all products...\\n\");\n connection.query(\"SELECT * FROM products\", function(err, res) {\n if (err) throw err;\n // Log all results of the SELECT statement\n console.log(\"Here are my items\");\n for (var i = 0; i < res.length; i++) {\n console.log(\" | \" + res[i].item_id + \" \" + res[i].product_name + \"............\" + \"$\" + res[i].price + \" Units Available: \" + res[i].stock_quantity + \"\\r\\n\");\n };\n console.log(\"-------------------------------------------------------\");\n ask();\n });\n}", "function QueryCollection() {\n\t\t}", "function start() {\n\n id = realtimeUtils.getParam('id');\n if (id) {\n // Load the document id from the URL\n realtimeUtils.load(id.replace('/', ''), onFileLoaded, onInitialize);\n init();\n } else {\n // Create a new document, add it to the URL\n realtimeUtils.createRealtimeFile('MyWebb App', function (createResponse) {\n window.history.pushState(null, null, '?id=' + createResponse.id);\n id=createResponse.id;\n realtimeUtils.load(createResponse.id, onFileLoaded, onInitialize);\n init();\n });\n \n }\n \n \n }", "function senGuiData()\n{\n\tvar datasend={\n\t\tevent:\"guidata\"\n\t}\n\tqueryDataGet(\"php/api_process.php\",datasend,function(res){\n\t\t//nhan du lieu tu server tra ve\n\t\talert_info(res);\n\t});\n\tqueryDataPost(\"php/api_process_post.php\",datasend,function(res){\n\t\t//nhan du lieu tu server tra ve\n\t\talert_info(\"Post:\"+res);\n\t});\n}", "function startApp() {\n inputDataChannels.forEach(function (dataChannel) {\n if (dataChannel) {\n dataChannel.removeEventListener(divId);\n dataChannel.addEventListener('add', newValue, divId);\n }\n });\n\n minionObject.div.appendChild(minionObject.headline);\n minionObject.config.data = d34.range(minionObject.n).map(function() {\n return 0\n });\n minionObject.headline.appendChild(minionObject.headlineText);\n\n }", "function startApp() {\n displayProducts();\n}", "function qodefOnDocumentReady() {\n\t\tqodefInitItemShowcase();\n\t}", "function start() {\n\treadStorage();\n\tdisplayAnn();\n}", "subscribe() {\n Meteor.subscribe(this.collectionName);\n }", "function Drop3_Common_DMS_Document_List(DynamicserviceURL,readRequestURL,ListId,MobId,iconType){\n\n\t//Empty List\n\tvar docArrayListEmpty = {\n };\n\t \n\t var oModelEmpty = new sap.ui.model.json.JSONModel();\n\t oModelEmpty.setData(docArrayListEmpty);\n sap.ui.getCore().byId(ListId).setModel(oModelEmpty);\n\n \nopenSplashScreen();\n\n{ \n\t{\n\t\tvar logInfo = getTimeStamp() +MobId+\":: Service: ContextSet Start\" ; \nvar serviceURL = getUrl(DynamicserviceURL);\nif(serviceURL == \"Fail\")\n{\nreturn false;\n}\n var downloadModel = new sap.ui.model.odata.ODataModel(serviceURL);\n //var readRequestURL = \"/AssetSet?$filter=Equnr eq '\"+800001+\"'&$expand=NavDocs\";\n downloadModel.read(readRequestURL, null, null, false, \n function(oData, oResponse) { \n\t if( oData.results.length >= 1)\n {\n var result = oData.results[0].NavDocs; //Getting JSON response body\n var docArrayResults = result.results;\n if( docArrayResults != \"\"){\n \t var DocArray = [];\n \t for ( var i = 0 ; i< docArrayResults.length ; i++ ){\n \t \t\n \t var sortDoc = {\n \t \t\t \"Documenttype\" : docArrayResults[i].Documenttype,\n \t \t\t \"Documentnumber\" :docArrayResults[i].Documentnumber,\n \t \t\t \"Documentpart\":docArrayResults[i].Documentpart,\n \t \t\t \"Documentversion\":docArrayResults[i].Documentversion,\n \t \t\t \"Originaltype\": docArrayResults[i].Originaltype,\n \t \t\t \"Wsapplication\":docArrayResults[i].Wsapplication,\n \t \t\t \"Description\":docArrayResults[i].Description,\n \t \t\t \"ContentDescription\":docArrayResults[i].ContentDescription,\n \t \t\t \"Objectkey\":docArrayResults[i].Objectkey,\n \t \t\t \"DocDescription\" :docArrayResults[i].DocDescription\n \t \t\t \t\t };\n \t \t\t DocArray.push(sortDoc); \n \t var docArrayList = {\n \t \t\t \"results\" : DocArray\n \t \t };\n \t \t var oModel = new sap.ui.model.json.JSONModel();\n \t oModel.setData(docArrayList);\n \t sap.ui.getCore().byId(ListId).setModel(oModel);\n \t\t \n \t }\n \t \n }\n \n else{\n\t\t var docArrayList = {\n };\n\t\t var oModel = new sap.ui.model.json.JSONModel();\n oModel.setData(docArrayList);\n sap.ui.getCore().byId(ListId).setModel(oModel);\n\t }\n }\n\t else{\n\t\t var docArrayList = {\n };\n\t\t var oModel = new sap.ui.model.json.JSONModel();\n oModel.setData(docArrayList);\n sap.ui.getCore().byId(ListId).setModel(oModel);\n\t }\n\t closeSplashScreen(); \t\n\t if( g_isDebug == true)\n\t {\n\t var logInfo1 = getTimeStamp() +MobId+\":: Service: ContextSet Finish\" ; \n var g_ServiceStartEndTime = logInfo + \"\\n\" + logInfo1;\n\t logFileUpdate(g_ServiceStartEndTime);\n\t }\n\t \n }, function(oError){\n\t\t\t closeSplashScreen();\n\t\t\t\terrorRes = true;\n\t\t\t\ttry{\n\t\t\t\t\tvar data = JSON.parse(oError.response.body);\n\t\t\t\t\tfor(var event in data){\n\t\t\t\t\tvar dataCopy = data[event];\t\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\tvar messageFromBackend = dataCopy.innererror.errordetails[0].message;\n\t\t\t\t\t\tsap.m.MessageBox.show(\n\t\t\t\t\t\tmessageFromBackend+ \" \" +\" \"+\" \",sap.m.MessageBox.Icon.ERROR,\"Error\");}\ncatch(e)\n{sap.m.MessageBox.show(e.message+ \" \" +\" \"+\" \",\nsap.m.MessageBox.Icon.ERROR,\"Error\");break;\n}}}catch(e){sap.m.MessageBox.show(\n\"Service Not Available - Please contact system administrator\" + \" \" +\" \"+\" \",\nsap.m.MessageBox.Icon.ERROR,\"Error\");\nif( g_isDebug == true)\n {\n var logInfo1 = getTimeStamp() +MobId+\":: Service: ContextSet Failed no network\" ; \n var g_ServiceStartEndTime = logInfo + \"\\n\" + logInfo1;\n\t logFileUpdate(g_ServiceStartEndTime);\n\t }}\n });}}\n\n}", "function onFileInitialize(model) {\n var string = model.createString();\n var list = model.createList();\n\n string.setText('Test task');\n list.insert(0, string);\n\n model.getRoot().set('coll_list', list);\n}", "function setBeerCollectionData() {\n shuffleArray(beer_Collection);\n}", "function runScript(){\n\tregisterTab();\t\n\tcurrentQueuePoll();\n\tregisterMsgListener();\n\tinsertAddToQueueOptionOnVideos();\n\tinsertQTubeMastHead();\n\tload(false);\n}", "function handleGetData() {\n $.ajax({\n url: `https://cdn.contentful.com//spaces/a9aj5bcg0qv1/environments/master/entries/?access_token=ySz5GlMWosH6hOorHoM5m1_luBoP3p-QC6w08NpnBAY&select=fields&content_type=${questionSet}`\n }).then(\n function (data) {\n //console.log(data)\n qData = data\n //set the first question\n setQuestion()\n }\n )\n}", "function broadcast() {\n\n $.event.trigger( 'AdManager:unitsInserted' );\n\n }", "function vms_start() {\n _.each(server_list, function(data, hostname, i) {\n vm_start(hostname, false);\n });\n //self.reset_server_list();\n }", "loadCollections(collections, tag) {\n this.dispatch(new LoadCollections(collections, tag));\n }", "_doFetch() {\n\t\tthis.emit(\"needs_data\", this);\n\t}", "function attachToDocuments(name, callback, collection) {\n\t\t\t\tvar globalDoc = CKEDITOR.document;\n\n\t\t\t\tvar listeners = [];\n\n\t\t\t\tif (!doc.equals(globalDoc)) {\n\t\t\t\t\tlisteners.push(globalDoc.on(name, callback));\n\t\t\t\t}\n\n\t\t\t\tlisteners.push(doc.on(name, callback));\n\n\t\t\t\tif (collection) {\n\t\t\t\t\tfor (var i = listeners.length; i--;) {\n\t\t\t\t\t\tcollection.push(listeners.pop());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "function addCollectionBulletsOnStart(){\n let collectionList = document.getElementById('ctitle').innerHTML;\n let collectionStorage = JSON.parse(localStorage.getItem(\"CollectionsList\"));\n let bullets = [];\n if(collectionStorage != null){\n bullets = Object.keys(collectionStorage).map(key => {\n return collectionStorage[key];\n });\n }\n bullets.forEach(elem => {\n if(elem.id.startsWith(collectionList)){\n let bullet = createDropDown();\n let bulletDropDown = addDropDownImages();\n let bulletItem = document.createElement('li');\n bulletItem.contentEditable = \"true\";\n bulletItem.innerHTML = elem.entry;\n bulletItem.classList.add(elem.bulletType);\n bullet.appendChild(bulletItem);\n bullet.appendChild(bulletDropDown);\n let list = document.getElementById(\"collectionListArea\").getElementsByTagName('ul')[0];\n bullet.id = elem.id;\n list.appendChild(bullet);\n }\n });\n}", "function onPageBeforeShow(e){\n\t\t\t\t\t\t\t\t\n\t\t\t\t//adding content from lstest data selection\n\t\t\t\tpopulateListContent(App.data.selection);\n\t\t\t\t\n\t\t\t}", "loadVehiclesList(){\n PubSub.publish('loadVehiclesList', {});\n }", "function event::onLoad()\n{\n loadChList();\n}", "on_desklet_clicked(event) {\n this.retrieveEvents();\n }", "function setupCollection(collectionName, dataArray) {\n\n print(`-------------------------------------`);\n print(`Dropping ${collectionName} collection`);\n db[collectionName].drop();\n\n print(`Inserting data in ${collectionName} collection`);\n dataArray.forEach((dataElement, index) => {\n try {\n db[collectionName].insertOne(dataElement);\n } catch (err) {\n print(`*************************************************`);\n print(`ERROR in ${collectionName} at element: ${index+1}`)\n print(`ERROR: ${err}`)\n print(`*************************************************`);\n }\n });\n \n}", "function flyatics_event(data){\n\tflybase.trigger( 'client-event', data );\n}", "function start() {\n getTodosFromLs();\n addTodoEventListeners();\n sidebar();\n updateTodaysTodoList();\n calendar();\n}", "enqueue(item) {\n this.collection.push(item);\n }", "function initData(){\n container.prepend(progressInfo);\n jQuery.get(getPageURL(0, resource)).done(function(data) {\n records = processData(data, true);\n initView(new recline.Model.Dataset({records:records}));\n numReq = getRequestNumber(data.result.total, pageSize);\n for (var i = 1; i <= numReq; i++) {\n requestData(getPageURL(i, resource));\n };\n });\n }", "onCreatedHandler() {\n this.fetchData();\n }", "function main() {\n addEventListeners();\n fetchListOfCurrencies();\n }", "function beginProcess() {\n checkArrays((checkArraysErr) => {\n if (checkArraysErr) {\n course.error(checkArraysErr);\n callback(null, course, item);\n return;\n }\n\n checkPages();\n callback(null, course, item);\n });\n }", "queryLoadSuccess(collection, action) {\n const data = this.extractData(action);\n return {\n ...this.adapter.setAll(data, collection),\n loading: false,\n loaded: true,\n changeState: {},\n };\n }", "function DataSetCollector(blob){\n\t\t\tthis.simpleDataName = blob.simpleDataName;\n\t\t\tthis.dataName = blob.dataName;\n\t\t\tthis.categories = blob.categories;\n\t\t\t/*\n\t\t\t * This is what is run for each dataset that is collected\n\t\t\t */\n\t\t\tthis.inputParser = function(input){\n\t\t\t\tconsole.log(blob.dataName);\n\t\t\t\tconsole.log(input);\n\t\t\t\tblob.inputParser(input, this);\n\t\t\t\t//When a group is done being loaded broadcast a message\n\t\t\t\t$rootScope.$broadcast( service.artifactGroupLoadedMessage, this.simpleDataName);\n\t\t\t};\n\t\t}", "function activate() {\n\t\t\tgetEmployees();\n\t\t}", "start() { \r\n enabled = true;\r\n // TODO: show PK blocklist\r\n }", "async afterConnected() {\r\n\t\t\t// await this.adapter.collection.createIndex({ name: 1 });\r\n\t\t}", "function setupCollection(err, db) {\n if (err) throw err;\n measurements = db.collection(\"measurements\"); //name of the collection in the database\n devices = db.collection(\"devices\");\n client = mqtt.connect({\n host: 'localhost',\n port: 1883\n }); //connecting the mqtt server with the MongoDB database\n client.subscribe(\"sensors/#\"); //subscribing to the topic name\n client.subscribe(\"devices/#\"); //subscribing to the topic name\n client.on('message', handleMessages); //inserting the event\n}", "async function main() {\n const client = await connectToMongodb(uri);\n\n console.log(\"Connected correctly to server\");\n\n const db = client.db();\n\n const collection = db.collection(\"items\");\n\n // await collection.insert({ name: \"apple\", stock: 10 });\n\n // Head\n const changeStream = collection.watch();\n\n // Resume After - Specific ID\n // LIMIT: https://docs.mongodb.com/manual/changeStreams/#resumeafter-for-change-streams\n\n // const lastId = {\n // _data:\n // \"825E359043000000012B022C0100296E5A100427D92284CAC5429CB753A4CA3C7A239946645F696400645E3590437F63FC1F520E0BD50004\"\n // };\n // const changeStream = collection.watch({\n // resumeAfter: lastId\n // });\n\n changeStream.on(\"change\", next => {\n console.log(\"next\", next);\n });\n\n // Iterator\n //const next = await changeStream.next();\n}", "function onCreateSpryDataSet()\n{\n\t//launch the spry xml data set\n\tvar cmdArgs = new Array();\n\tvar resArray = dwscripts.callCommand(\"SpryDataSetWizard\",cmdArgs);\n\t//refresh the data bindings \n\tdw.dbi.refresh();\n}" ]
[ "0.59915084", "0.5624836", "0.56185335", "0.5534386", "0.55321693", "0.5431491", "0.54296833", "0.54017216", "0.53511846", "0.5343947", "0.5335546", "0.5291495", "0.5265165", "0.52422214", "0.52291954", "0.5228302", "0.5226666", "0.5212098", "0.5204061", "0.51739436", "0.5171669", "0.51640755", "0.5161284", "0.51457393", "0.51370734", "0.5128933", "0.5110364", "0.5110364", "0.51068395", "0.5101016", "0.50848794", "0.5072039", "0.505949", "0.50557494", "0.5048534", "0.5021809", "0.5007301", "0.50066024", "0.4993491", "0.4981047", "0.49763203", "0.49754512", "0.4969924", "0.49684703", "0.49632025", "0.49601954", "0.4957278", "0.4949758", "0.49407354", "0.49387234", "0.49348316", "0.4925009", "0.4923171", "0.49207178", "0.49181294", "0.49093544", "0.49068967", "0.49059826", "0.49034682", "0.49023485", "0.49005175", "0.48969364", "0.48898932", "0.4882942", "0.48779315", "0.4874794", "0.4871682", "0.48701712", "0.48612338", "0.4860722", "0.48571053", "0.4845999", "0.48425868", "0.48371047", "0.4833249", "0.48307735", "0.48290205", "0.48277763", "0.4826885", "0.48252067", "0.48171863", "0.48134717", "0.48054215", "0.48012272", "0.47987852", "0.47940585", "0.47874382", "0.47861934", "0.4786128", "0.47804523", "0.4780126", "0.47742134", "0.47729817", "0.47622973", "0.47594815", "0.47567683", "0.4753906", "0.47495544", "0.4749292", "0.47469333" ]
0.7230036
0
when there's a match, emit the chat message event
callback(version) { omegga.emit('version', version); omegga.version = version; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleChat(text) {\n this.room.broadcast({\n name: this.name,\n type: 'chat',\n text: text\n });\n }", "async handle(text, senderId, chatId) {}", "function joinRoom(roomName){\n //SEND THIS ROOM NAME TO THE SERVER, SO THE SERVER CAN JOIN IT\n nsSocket.emit('joinRoom', roomName, (numMembers)=>{\n //UPDATE ROOM MEMBER TOTAL NOW THAT WE'VE JOINED\n console.log(roomName);\n document.querySelector('.curr-room-num-users').innerHTML = `${numMembers} <span class=\"glyphicon glyphicon-user\"></span>`;\n });\n\n //WHEN THE HISTORY IS PUSHED, LOAD IT\n nsSocket.on('historyLoad',(history)=>{\n //UPDATE THE DOM WITH ALL CHAT HISTORY\n const messagesUL = document.querySelector('#messages');\n messagesUL.innerHTML = \"\";\n history.forEach((msg)=>{\n const newMsg = buildHTMLMessage(msg);\n messagesUL.innerHTML += newMsg;\n });\n //WANT NEWEST MESSAGES AT BOTTOM TO BE SCROLLED TO\n messagesUL.scrollTo(0,messagesUL.scrollHeight);\n\n\n });\n //UPDATE NUMBER OF MEMBERS IN THE ROOM\n nsSocket.on('updateMembers',(numMembers)=>{\n //WHEN SOMEONE JOINS/LEAVES A ROOM, UPDATE NUMBER COUNT\n document.querySelector('.curr-room-num-users').innerHTML = `${numMembers} <span class=\"glyphicon glyphicon-user\"></span>`;\n //WHEN SOMEONE JOINS A ROOM, UPDATE ROOM NAME\n document.querySelector('.curr-room-text').innerHTML = `${roomName}`;\n\n });\n\n \n /*************************************************** */\n // ALLOW FOR SEARCHING OF MESSAGES\n /*************************************************** */\n let searchBox = document.querySelector('#search-box');\n searchBox.addEventListener('input',(e)=>{\n //console.log(e.target.value);\n let messagesTxt = Array.from(document.getElementsByClassName('message-text'));\n let messageUsers = Array.from(document.getElementsByClassName('user-message'));\n let messageIMGs = Array.from(document.getElementsByClassName('user-image'));\n //NOW CHECK IF MATCHES MESSAGE CONTENTS\n messagesTxt.forEach((msg,i)=>{\n if(msg.innerText.toLowerCase().indexOf(e.target.value.toLowerCase()) === -1){\n //THE MESSAGE DOESNT CONTAIN THE USER SEARCH TERMS\n msg.style.display = \"none\";\n messageUsers[i].style.display = \"none\";\n messageIMGs[i].style.display = \"none\";\n }\n else{\n msg.style.display = \"block\";\n messageUsers[i].style.display = \"block\";\n messageIMGs[i].style.display = \"block\";\n }\n });\n });\n\n}", "servermsg_room(text){\n console.log(`Room msg for ${this.username}: ${text}`);\n io.in(this.room).emit('chat:message', {username: '<system>', text});\n }", "function onChatMessage(msg) {\n this.broadcast.emit('chat message', msg);\n}", "sendChatMessage(data) {\n socket.emit('new-chat-message', data);\n }", "dispatchMessage() {\n console.log('handle emit message');\n\n // the double pipe || is an \"or\" operator\n // if the first value is set, use it. else use whatever comes after the \"or\" operator\n socket.emit('chat_message', {\n name: this.nickname, //|| \"anonymous\"\n content: this.message,\n \n })\n\n this.message = \"\";\n }", "async function onMessage (msg) {\n console.log(msg.toString())\n\n if (msg.age() > 3 * 60) {\n console.log('Message discarded because its TOO OLD(than 3 minute)')\n return\n }\n\n const room = msg.room()\n const from = msg.from()\n const text = msg.text()\n\n if (!from){\n return\n }\n\n try {\n\n //receive a person msg\n if( !room ){\n \tconst id = from.id\n\n //check the key word and output according to current state\n \tif(map.get(id) != null || /ohi/i.test(text)){\n\n \t\tif(map.get(id) == null){\n \t\t\tmap.set(id, new Conv)\n \t\t}\n \t\tcurr_conv = map.get(id)\n console.log(\"current session: \" + curr_conv.get_session())\n\t\t switch(curr_conv.get_session()){\n\n //output room names\n\t\t case 'groupName':\n\t\t \troomList = await bot.Room.findAll() \n\t\t \tres = \"请输入房间编号\\n\"\n\t\t \tfor( i in roomList ){\n\t\t \t\tres += ` ${i}. ${await roomList[i].topic()} \\n`\n\t\t \t}\n\t\t\t\t await from.say(res)\n curr_conv.toNext()\n console.log(curr_conv.get_session())\n\t\t break\n\n //receive a room name, output select target room \n\t\t case 'groupNum':\n roomList = await bot.Room.findAll() \n try{\n curr_conv.room = roomList[text]\n curr_conv.toNext()\n await from.say(\"请输入目标微信名\")\n }\n //back to previous state if error\n catch(e){\n //curr_conv.toPrev()\n map.delete(id)\n await from.say(\"房间号错误,会话初始化\")\n }\n\t\t \tbreak\n\n //receive a usr name, start listening\n\t\t case 'usrName':\n try{\n curr_conv.listen_id = await curr_conv.room.member({name: text})\n //start listening if found\n if(curr_conv.listen_id != null){\n await from.say(\"启动监听程序,输入任意字符停止监听\")\n //add listener function\n datas = {\n roomName: curr_conv.room.topic(),\n listenID: text,\n listener: id\n }\n var listener = onMessageListen.bind(datas)\n bot.addListener('message', listener)\n fuunc_map.set(id, listener)\n curr_conv.toNext()\n }\n else\n throw new Error('no listen_id')\n }\n catch(e){\n //urr_conv.toPrev()\n map.delete(id)\n await from.say(\"微信名错误,会话初始化\")\n }\n\t\t \tbreak\n\n\t\t case 'listening':\n //remove listener function\n map.delete(id)\n await bot.removeListener('message', await fuunc_map.get(id))\n await fuunc_map.delete(id)\n await from.say(\"监听结束,愿人类荣光永存\")\n\t\t \tbreak\n\n\t\t }\n \t}\n\n\n\n \treturn\n }\n\n } \n catch (e) {\n log.error(e)\n }\n}", "async function onMessageListen (msg) {\n //console.log(\"listening: \" + await this.roomName)\n if (msg.age() > 3 * 60) {\n console.log('Message discarded because its TOO OLD(than 3 minute)')\n return\n }\n\n const room = msg.room()\n const from = msg.from()\n const text = msg.text()\n if (!from || !room){\n return\n }\n try{\n // receive a group msg\n const topic = await room.topic()\n if( topic == await this.roomName && from.name() == await this.listenID ){\n const master = await bot.Contact.find({id: await this.listener})\n console.log(\"listening: \" + await this.listener)\n master.say(\"Msg from: \"+ from.name() + \"\\nContent: \" + text);\n }\n\n }\n catch (e) {\n log.error(e)\n }\n}", "startMatch(data){\n //assign a player to be O, this will be the second player to join a match\n if(game.id === data.id)\n {\n game.waiting = true\n game.player = \"o\"\n game.playerPieceText.setText(\"You are O\")\n game.opponent = data.challenger\n game.turnStatusText.setText(game.opponent + \"'s turn\")\n game.opponentKey = data.challengerkey\n Client.connectedToChat({\"opponent\": game.opponent});\n }\n else\n {\n game.waiting = false\n console.log(\"no longer waiting!\")\n game.player = \"x\"\n game.playerPieceText.setText(\"You are X\")\n game.opponent = data.username\n game.opponentKey = data.userkey\n game.turnStatusText.setText(\"Your Turn\")\n Client.connectedToChat({\"opponent\": game.opponent});\n }\n console.log(\"you are challenged by \" + game.opponent)\n console.log(\"you are challenged by key \" + game.opponentKey)\n\n }", "updateChatMessageList(event){\n\t\tsocket.emit('typing', 'customer typing...');\n\t\t// 13 is the Enter keycode\n\t\tif (event.keyCode === 13) {\n\t\t\tlet message = {\n\t\t\t\ttext: event.target.value,\n\t\t\t\ttype: 'sender',\n\t\t\t\thumanized_time: moment().fromNow(),\n\t\t\t\tmachine_time: moment().format('MMMM Do YYYY, hh:mm:ss') \n\n\t\t\t};\n\t\t\tthis.props.newMessage(message);\n\t\t\tsocket.emit('chat message', message);\n\t\t\tevent.target.value = \"\";\n\t\t\tevent.preventDefault();\n\t\t};\n\t}", "function emitChat(value){\n socket.emit(\"chat\",{\n receiver: sendTo,\n sender:sender,\n message:value\n });\n $(\"input:text\").val('');\n $(\"#incoming\").append($('<p class=dmout>').text(`You:${value}`));\n}", "function emitRoom(msg) {\n socket.emit(\"message\", msg);\n}", "function searchForPlayers() {\n searchingForGame = true;\n views.setSeachingPlayers();\n socket.emit('lookingForGame', authId);\n console.log(\"waiting for game \" + authId)\n socket.on('startMatch', (otherId) => {\n startMultiPlayer(otherId);\n });\n}", "handleOnUserMessage(user, message){\n\n // Message in JSON-Objekt umwandeln für Datenzugriff\n var data = JSON.parse(message);\n // Spiel-Logik hat hier nichts zu suchen, kommt dann im GameRoom noch ...\n if (data.dataType === GAME_LOGIC) return;\n\n // Chat-Nachricht\n if (data.dataType === CHAT_MESSAGE) {\n\t\t\t// Absender ergänzen, die anderen wollen ja wissen, vom wem die Nachricht war\n\t\t\tdata.sender = user.Username;\n }\n // Es hat eine Nachricht drin\n if (typeof data.message !== 'undefined'){\n /*\n * Diverse mögliche Kommando abarbeiten\n */\n //UserName soll geändert werden\n if(data.message.startsWith(\"/nick \")) {\n console.log(\"Kommando: /nick\");\n // Username überschreiben und alle User informieren\n user.setUsername(data.message.replace(\"/nick \", \"\"));\n user.room.sendDetails();\n\n // zusätzlich eine Nachricht an alle vorbereiten\n data = {\n dataType: CHAT_MESSAGE,\n sender: \"Server\",\n message: \"User [\"+data.sender + \"] heisst neu [\"+user.Username+\"]\"\n };\n }\n // Kommando /play wechselt dem Raum bei Erfolg\n else if(data.message.startsWith(\"/play \")) {\n // mit wem will aktueller User spielen?\n let otherName = data.message.replace(\"/play \", \"\");\n let otherIdx = user.room.users.findIndex(e => e.Username.trim() == otherName );\n\n console.log(\"/playResult: \" + otherIdx);\n\n // Gibt es den überhaupt?\n if(otherIdx == -1){\n //nein, nachricht vorbereiten\n data = {\n dataType: CHAT_MESSAGE,\n sender: \"Server\",\n message: \"User [\"+otherName + \"] nicht gefunden\"\n };\n // ja, es gibt ihn\n }else {\n let other = user.room.users[otherIdx];\n\n // aktuellen User und Spielpartner aus aktuellem Raum entfernen\n user.room.removeUser(user);\n user.room.removeUser(other);\n\n // neuen Raum eröffnen und beide darin zuordnen\n user.setRoom(new GameRoom(user.Username + \" vs. \" + otherName));\n other.setRoom(user.room);\n user.room.addUser(user);\n user.room.addUser(other);\n //--> Die User werden im addUser noch über die neuen Raum-Details informiert\n }\n\n\n }\n // Raum verlassen und in Lobby zurückkehren\n else if(data.message.startsWith(\"/quit\")) {\n\n console.log(\"/quit: \" + user.Username);\n //info vorbereiten und senden\n data = {\n dataType: CHAT_MESSAGE,\n sender: \"Server\",\n message: \"User [\"+user.Username + \"] quitted\"\n };\n user.room.sendAll(JSON.stringify(data));\n // user entfernen\n user.room.removeUser(user);\n // .. und an Lobby zuweisen\n user.room = user.lobby;\n user.lobby.addUser(user); // in addUser werden wieder alle informiert\n\n // Nachricht vorbereiten\n data = {\n dataType: CHAT_MESSAGE,\n sender: \"Server\",\n message: \"User [\"+user.Username + \"] joined\"\n };\n\n }\n // alles andere müssten nun Chat-Nachrichten sein\n else {\n // Aus Sicherheitsgründen werden sämtliche Zeichen durch den Code ersetzt\n // dadruch bleiben auch alle <>/*[]\" erhalten und es kann nichts \"eingeschleust\" werden\n data.message = data.message.replace(/[\\u00A0-\\u9999<>\\&]/gim, function(i) {\n return '&#'+i.charCodeAt(0)+';';\n });\n\n }\n }//message ist gesetzt\n\n // vorbereitete Nachricht an alle senden\n user.room.sendAll(JSON.stringify(data));\n\n}", "function chatBotMessage() {\r\n newBotMsg(getBotMessage())\r\n console.log(\"chatbot message\")\r\n}", "SOCKET_ONMESSAGE (state, message) {\n console.log('Message: ', message)\n if (state.activeChannel.chat_id === message.channel.is_private?message.channel.name:message.channel.chat_id) {\n state.messages.results.push(message)\n } else {\n console.log('another one')\n }\n }", "function showChat(username) {\r\n\tsocket.emit('newChatter', username);\r\n}", "function emitMsg(data) {\n // console.log('\\n\\n\\nEmitting message\\n\\n\\n')\n ioClient.emit('new message', data)\n}", "handleOnPlayerMessage(player) {\n let _this = this;\n\n // handle on message\n player.socket.on(\"message\", function (message) {\n let _data = JSON.parse(message);\n\n if (_data.messageType === MESSAGE_TYPE.CLIENT_CHAT) {\n let _playerDisplayName = player.id;\n if (player.playerName) {\n _playerDisplayName = player.playerName;\n }\n let _message = new Message(MESSAGE_TYPE.CLIENT_CHAT);\n _message.content = _playerDisplayName + \" : \" + _data.content;\n _this.sendAll(JSON.stringify(_message));\n } else if (_data.messageType === MESSAGE_TYPE.CLIENT_CARD) {\n // Karte in der Logik verarbeiten.\n scopaLogic.processPlayerMessage(_data, _this);\n } else if (_data.messageType === MESSAGE_TYPE.CLIENT_STATE) {\n // Name und ID des Spielers setzen\n player.playerName = _data.playerName;\n player.playerId = _data.playerId;\n console.log(\"Spielername: \" + _data.playerName + \" Spieler ID\" + _data.playerId);\n }else if (_data.messageType === MESSAGE_TYPE.CLIENT_RESTART) {\n scopaLogic.startGame();\n }\n });\n }", "function announce(announcement){\n tagpro.group.socket.emit(\"chat\", announcement);\n}", "function onSocketMessage(event) {\r\n\tappendContent(\"theMessages\", \"Received: \" + event.data + \"<br/>\");\r\n}", "respondToMessages() {\n let messages = rx.Observable.fromEvent(this.slack, RTM_EVENTS.MESSAGE);\n\n messages.where(e => (function(e) { let re = /kloppbot/i; return re.test(e.text) } )(e) )\n .where(e => this.fromAdmin(e))\n .subscribe((message) => this.handleNewEvent(message));\n\n messages.where(e => (function(e) { let re = /i'?(m|ll) *(in|play|playing)/i; return re.test(e.text) } )(e) )\n .subscribe((message) => this.handleNewSignup(message));\n\n messages.where(e => (function(e) { let re = /who(\\'?s| is) playing/i; return re.test(e.text) } )(e) )\n .subscribe((message) => this.handleListAttendees(message));\n\n messages.where(e => (function(e) { let re = /fixture list/i; return re.test(e.text) } )(e) )\n .subscribe((message) => this.handleListEvents(message));\n\n messages.where(e => (function(e) { let re = /next game/i; return re.test(e.text) } )(e) )\n .subscribe((message) => this.handleNextEvent(message));\n }", "function messageChangedHandler(el) {\n\n // Check if the name change is about the new messages\n if (el.name.indexOf(\"You have a new message\") > -1) {\n Narrator.say(el.name);\n }\n\n}", "function chatsend(response, postData) {\n\tvar question = querystring.parse(postData).user_input;\n\tcurrentChat.push( question);\n\tconsole.log(currentChat);\n\tvar answer = '';\n\tvar bot = new chatbot.Chatbot();\n\tbot.listening(question, function(botAnswer){\n\t\tanswer =botAnswer;\n\t\tvar data = {\"user_input\": question, \"output\": answer};\n\t\tconsole.log(data);\n\t\t//output\n\t\tdb.setHistory(data);\n\t\ttime = new Date();\n\t\tvar seconds = time.getSeconds();\n\t\tvar minute = time.getMinutes();\n\t\tvar hour = time.getHours();\n\t\tbotAnswer = (hour < 10 ? \"0\" : \"\") +hour+':'+(minute < 10 ? \"0\" : \"\") +minute+':'+(seconds < 10 ? \"0\" : \"\")+seconds+' Bot >';\n\t\t//display\t\n\t\tvar body = '<li>'+botAnswer+answer+'</li>';\n\t\tresponse.writeHead(200, {\"Content-Type\": \"text/html\"});\n\t\tresponse.write(body);\n\t\tresponse.end();\n\t});\n}", "async function onMessageHandler (target, context, msg, self) {\n // if (stream_id != context.room_id){\n // stream_id = context.room_id\n // }\n if (msg[0] !== '!') { // we are ignoring any attempts to send chatbot commands\n let words = msg.split(' ');\n for (let word of words) {\n if (currsec[word]) {currsec[word]++;}\n else {currsec[word] = 1;}\n }\n }\n} // end onMessageHandler", "function receivedMessage(event) {\n if (!event.message.is_echo) {\n var message = event.message;\n var senderId = event.sender.id;\n\n console.log(\"Received message from senderId: \" + senderId);\n console.log(\"Message is: \" + JSON.stringify(message));\n\n // You may get a text or attachment but not both\n if (message.text) {\n var formattedMsg = message.text.toLowerCase().trim();\n\n // If we receive a text message, check to see if it matches any special\n // keywords and send back the corresponding movie detail.\n // Otherwise, search for new movie.\n switch (formattedMsg) {\n case \"hla!\":\n case \"hola!\":\n case \"hi!\":\n case \"hi\":\n case \"hello\":\n case \"hola\":\n sendMessageText(senderId, \"Hola! Gracias por saludarnos\");\n break;\n\n default:\n sendMessageText(senderId, \"Hola! Ahora estamos algo ocupados! Cuéntanos tu duda o consulta. A penas podamos, te responderemos! Que tengas un estupendo día!\");\n }\n } else if (message.attachments) {\n sendMessage(senderId, {text: \"Sorry. No entiendo lo que quieres decir :(\"});\n }\n }\n}", "function listenForMsg(user){\n document.getElementById(\"message_contents\").innerHTML = \"\";\n database.ref('/'+user.uid+'/friends/'+profileId).once(\"value\").then((snapshot) => {\n var chatid = snapshot.child('chatid').val();\n\n database.ref('/messages/'+chatid).on('child_added', function (snapshot){\n var sender = snapshot.val().sender\n if(sender === user.uid && snapshot.key !== \"last\" && snapshot.key !== \"time\"){\n var html = \"\"\n html = `\n <div class=\"you\">\n <div class=\"your-chat-content\">\n ${snapshot.val().msg}<span>${snapshot.val().time}</span>\n </div>\n </div>\n `\n }else if(sender === profileId && snapshot.key !== \"last\" && snapshot.key !== \"time\"){\n var html = \"\"\n html = `\n <div class=\"friend\">\n <div class=\"chat-content\">\n ${snapshot.val().msg}<span>${snapshot.val().time}</span>\n </div>\n </div>\n `\n }else if(snapshot.key === \"last\" || snapshot.key === \"time\"){\n html = \"\"\n }\n document.getElementById(\"message_contents\").innerHTML += html;\n var element = document.getElementById(\"message_contents\");\n element.scrollTop = element.scrollHeight;\n })\n })\n}", "function startConversation(match, res)\n{\n Match.find({ robin: match.ted, ted: match.robin, preference: true }).exec(function(err, matches) {\n if(matches == null || matches.length == 0) {\n return res.json(null);\n }\n matches.forEach(function(temp) {\n\n Conversation.findOne({ participants: {$all : [ temp.barney, match.barney ]}}).exec(function(err, conversation) {\n if (err) return res.send(err);\n if (!conversation)\n {\n Conversation.create({\n robins : [{\n barney : temp.barney,\n robin : temp.robin\n }, {\n barney : match.barney,\n robin : match.robin\n }],\n participants: [ match.barney, temp.barney ],\n unread : [\n {\n user : match.barney,\n unread : false\n },\n {\n user : temp.barney,\n unread : false\n }\n ]\n }, function(err, conversation) {\n if (err) return res.send(err);\n\n // Sends a notification to the person who didn't just swipe\n User.findOne({_id: temp.ted}).exec(function(err, ted) {\n if (err) console.log(err);\n User.findOne({_id: temp.barney}).exec(function(err, barney) {\n if (err) conosle.log(err);\n notifications.send(barney.profile.first_name + \" just got a match for you!\", ted.gcmId, function(err, res) {\n console.log(\"Notification send to: \" + ted._id);\n });\n notifications.sendMatchNotification(ted.profile.first_name, conversation._id, barney.gcmId, function(err, res) {\n console.log(\"Notification send to: \" + barney._id);\n });\n });\n });\n\n User.findOne({_id : match.ted}, function(err, ted) {\n User.findOne({_id : match.barney}, function(err2, barney) {\n notifications.send(barney.profile.first_name + \" just got a match for you!\", ted.gcmId, function(err, res) {\n console.log(\"Notification send to: \" + ted._id);\n });\n })\n })\n\n return res.json({\n \"result\" : 1,\n \"match\" : match,\n \"conversation\" : conversation\n });\n });\n } else {\n return res.json({\n \"result\" : 2,\n \"match\" : match,\n \"conversation\" : conversation\n });\n }\n });\n });\n });\n}", "function emitMessage() {\n socket.emit('sendingMessage', {\n 'message': messageInput.value,\n 'username': username,\n 'userID': userID\n }, ROOM_ID);\n messageInput.value = '';\n}", "onMessages(cb, room) {\n socket.on('add-messages', function (data) {\n data.forEach((message)=> {\n if (message.room === room || message.room ===\"all\") {\n cb(message)\n }\n })\n })\n }", "onReceiveChatMessage(cb) {\n cb = cb || angular.noop;\n socket.on('new-chat-message', cb);\n }", "function addToWaiting(player) {\r\n console.log(\"Match request received\");\r\n player.emit(\"wait\", {waitMsg: \"Please wait, Looking for an opponent....\"});\r\n connRequestQueue.push(player);\r\n var res = connectPlayer(player);\r\n if (res !== null) {\r\n console.log(\"Player matched\");\r\n player.emit('matched', {matchedMsg: \"Your opponent found\"});\r\n }\r\n }", "function handleSendMessage(e, c) {\n // Disable chat if disconnected\n if (peer.disconnected) {\n e.target.disabled = true;\n document.getElementById(\"chat-message\").disabled = true;\n }\n\n // Ensure message present\n let message = document.getElementById(\"chat-message\").value;\n if (message === \"\") return;\n\n // Escape html in message\n message = message.replace(\">\", \"&gt\").replace(\"<\", \"&lt\");\n\n // Send the message\n c.send({\"type\": \"chat\", \"message\": message});\n\n // Add message to self log\n let log = document.getElementById(\"chat-log\");\n log.innerHTML = `<p class=\"chat-message\"><span class=\"from-self\">You:</span> ${message}</p><hr/>` + log.innerHTML;\n}", "reply(){\n setTimeout(() => {\n this.contacts[this.chat_index].chat.push({mex: \"ok, come vuoi\",state:\"received\",date:this.lastAccess()})\n this.updateScroll();\n }, 1000)\n\n }", "function handleMessage(){\n if(currentRoom != old){\n \n var message = $('.chat-input input').val().trim();\n if(message){\n // send the message to the server with the room name\n var msg = new Messaging.Message(JSON.stringify({nickname: nickname, message: message, timestamp: Date.now()}));\n msg.destinationName = atopicName(currentRoom);\n msg.qos = 1;\n mqttClient.send(msg);\n \n $('.chat-input input').val('');\n } \n }}", "onShowContactChat() {\n App.bus.trigger(OPEN_CONTACT_CHAT);\n }", "function afterMatchFound(result, ctx) {\n\n if(ctx.friendlies.indexOf(result.user.toLowerCase()) > -1) {\n result.relevance += ((1.0 - result.relevance) * 0.5); // up the relevance because it comes from a friendly\n }\n\n if(result.tags.length > 0) { // result.relevance\n console.debug(\"Found relevant match\" + (result.volatile ? \" [VOLATILE]\" : \"\") + \".\");\n console.debug(result.tweetid + \" [\"+result.relevance+\"]: \" + JSON.stringify(result.tags));\n // send through to InfluxDB\n saveTweetToInflux(result)\n } else {\n console.debug(\"Event not found to be relevant.\");\n }\n}", "function sendMessage() {\n\n const message = inputRef.current.value;\n inputRef.current.value = \"\";\n if (message === \"\") {\n alert(\"empty field...\");\n }\n else {\n user.socket.current.emit(\"sendMessageToVideoRoom\", { to: videoRoom['videoRoom'], name: user.name, message: message, roomName: videoRoom['videoRoom'] });\n user.socket.current.emit(\"sendMessageToRoom\", {to: videoRoom['videoRoom'], name: user.name, message: message, roomName: videoRoom['videoRoom']});\n dispatch(addChat(\"room\", videoRoom['videoRoom'], user.id, user.name, message)); \n }\n\n }", "function emitMessage() {\n socket.emit('sendingMessage', {\n 'message': messageInputBox.value,\n 'username': username,\n 'userID': userID\n }, ROOM_ID);\n messageInputBox.value = '';\n}", "function outputMessage(message){\n const divSender= document.createElement('div');\n const divReciever= document.createElement('div');\n\n divSender.classList.add('each-chat-sender');\n divReciever.classList.add('each-chat-reciever');\n if(message.username==='Chatting Bot'){\n divSender.innerHTML=`<span class=\"message-sender\">${message.username}</span>\n <span class=\"message-time \">${message.time}</span>\n <h6 class=\"message \">${message.message}</h6>`;\n document.querySelector('.container-whole-chat').appendChild(divSender);\n }\n else if(message.username===MessageSender){\n divReciever.innerHTML=`<span class=\"message-reciever\">${MessageSender}</span>\n <span class=\"message-time\">${message.time}</span>\n <h6 class=\"chat-reciever\">${message.message}</h6>`;\n document.querySelector('.container-whole-chat').appendChild(divReciever);\n }\n else{\n divSender.innerHTML=`<span class=\"message-sender\">${message.username}</span>\n <span class=\"message-time \">${message.time}</span>\n <h6 class=\"message\">${message.message}</h6>`;\n document.querySelector('.container-whole-chat').appendChild(divSender);\n\n\n }\n}", "function onMessage(event) {\n\n\t\tvar msg = JSON.parse(event.data);\n\n\t\tswitch(msg.type) {\n\n\t\tcase 'chat':\n\t\t\tdisplayChatMessage(event);\n\t\t\tbreak;\n\n\t\tcase 'attendeeCount':\n\t\t\tdisplayAttendeeCount(event);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'kudosCount':\n\t\t\tdisplayKudosCount(event);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'fanCount':\n\t\t\tdisplayFanCount(event);\n\t\t\tbreak;\n\n\t\t}\n\t}", "function messenger(socket, content) {\n socket.talk('m', content);\n }", "function roomAnounce(roomid,msg,type){\n var room = vs[roomid];\n for(var i = 0; i < room.players.length; i++){\n var player = room.players[i];\n io.to(player).emit(type,msg);\n }\n}", "function incomingChatMessage(message) {\n\t\t'use strict';\n\n\t\tif (typeof(socket) === undefined) {\n\t\t\t$('#chathistory').html($('<article>', { text: 'Sorry, but your browser doesn\\'t support WebSockets.'} ));\n\t\t\t$('#chatinput').hide();\n\t\t\t$('span').hide();\n\t\t\treturn;\n\t\t}\n\n\t\tvar type = message.type;\n\n\t\t$('#chatstatus').hide();\n\t\tif (type === 'history') {\n\t\t\tfor (var i=0; i < message.data.length; i++) {\n\t\t\t\taddMessage(message.data[i].name, message.data[i].text, new Date(message.data[i].time));\n\t\t\t}\n\t\t} else if (type === 'message') {\n\t\t\taddMessage(message.data.name, message.data.text, new Date(message.data.time));\n\t\t} else {\n\t\t\tconsole.log('Something went wrong...');\n\t\t}\n\t}", "function sendEvent(message){\n socket.emit('chat', {\n student: student.name,\n message: message\n });\n}", "emitMessage (event) {\n this.emit('on-message', event)\n }", "function onMessageArrived(message) {\n //console.log(message.destinationName\t+ \" : \"+message.payloadString);\n graph_text = replace_all(message.payloadString);\n if(message.destinationName.split('/')[0] == z2mqtt_1.value){\n render(\"fdp\");\n }\n else if(message.destinationName.split('/')[0] == z2mqtt_2.value){\n render(\"circo\");\n }\n else{\n render(\"dot\");\n }\n}", "function createMatches(json) {\n try{\n console.log(\"Matches Refresh\")\n messaging(main,'newMatch', json, user)\n }\n catch(e){\n console.log(e)\n }\n}", "function onMessage(message) {\t\n\tvar topic = message.destinationName;\n\n\t// find any matching subscriptions in our map\n\tvar matchingSubs = findMatchingSubs(topic);\n\n\t// did we find any?\n\tif (matchingSubs.length === 0) {\n\t\tconsole.log(\"don't seem to have matching sub...\");\n\t\treturn;\n\t}\t\t\n\n\t// for each matching sub we have, add the message to the\n\t// appropriate text area.\n\tfor (var i=0; i<matchingSubs.length; i++) {\n\t\t// grab the entry from the map\n\t\tvar entry = subscriptions[matchingSubs[i]];\n\t\tvar textArea = entry.text;\n\t\t// grab the current text (i.e all the messages displayed so far)\n\t\tvar current = textArea.value;\t\t\n\n\t\t// if we are already displaying 500 messages, reset...\n\t\tif (entry.msgCount === 500) {\n\t\t\tcurrent = \"\";\n\t\t\tentry.msgCount = 0;\n\t\t}\n\n\t\t// stick the most recent message at the top.\n\t\t// append a newline, so that each message is on\n\t\t// its own line.\n\t\tvar newText = message.payloadString + \"\\n\";\n\t\t// then append the existing messages\n\t\tnewText += current;\n\t\ttextArea.value = newText;\n\t\t// note how many messages we are now displaying\n\t\tentry.msgCount++;\n\t}\t\n}", "handleSendingMessages(message) {\n console.log(\"Action Recognized --> \", message)\n if (message) {\n if (this.isColorCommand(message)) {\n this.socket.emit(\"change color\", message.split(\" \")[1])\n }\n else if (this.isUsernameChangeCommand(message)) {\n this.socket.emit(\"change username\", message.slice(7, message.length-1));\n }\n else {\n console.log(\"Message from client --> \", message)\n this.socket.emit(\"chat message\", message, this.state.username, this.state.color);\n }\n }\n }", "function enterChat(source) {\r\n var message = $('.message').val();\r\n if (/\\S/.test(message)) {\r\n var html = '<div class=\"chat-content\">' + '<p>' + message + '</p>' + '</div>';\r\n $('.chat:last-child .chat-body').append(html);\r\n $('.message').val('');\r\n $('.user-chats').scrollTop($('.user-chats > .chats').height());\r\n }\r\n}", "function enterChatRoomAction(value){\n \n socket.emit(\"chatroom enter\", value)\n}", "function sendMessage()\n{\n if(message.value.length > 0 && handle.value.length > 0)\n {\n socket.emit('chat', {message: message.value, handle: handle.value});\n message.value = \"\";\n\n //keep scrollbar at bottom\n var messageBody = document.querySelector('#output');\n messageBody.scrollTop = messageBody.scrollHeight - messageBody.clientHeight;\n }\n}", "sendMessage(message, room) {\n socket.emit('post-message', {text: message, room: room})\n }", "function sendMessage() {\n \t\tvar message = data.value;\n\t\tdata.value = \"\";\n\t\t// tell server to execute 'sendchat' and send along one parameter\n\t\tsocket.emit('sendchat', message);\n\t}", "function receiveRoomMessage(event, data) {\n\n var sender = data.from;\n var room = data.room;\n\n // Add a message to the room\n addMessageToChatRoom(sender.id, room.id, data.msg);\n }", "function onMessageArrived(message) {\n var msg = message.payloadString;\n var topic = message.destinationName;\n console.log(\"onMessageArrived(\" + topic + \"):\"+msg);\n\n // response according to topic\n var topicHie = topic.split(\"/\");\n var topicType = topicHie[topicHie.length-1];\n if ( topicType == \"newChat\" ) {\n // chat message\n // append message to chat textarea\n if ( $(\"#findFriendsBtn\").hasClass(\"active\")) {\n var chatwith = topicHie[topicHie.length-2];\n // only update chat text area if the current chat user is the sender\n if ( $(\"#chat_\" + chatwith).hasClass(\"double\") ) {\n $('#chatarea').append('<p class=\"mensagem2 toggle\">'+msg+'</p>');\n scrollTextareaToEnd();\n }\n }\n\n $(\"#findFriendsBtn\").addClass('notify');\n } else if ( topicType == \"addItinerary\" ) {\n // new itinerary\n $(\"#myTripsBtn\").addClass('notify');\n } else if ( topicType == \"updateItinerary\" ) {\n // new itinerary feed/comment\n $(\"#myTripsBtn\").addClass('notify');\n } else if ( topicType == \"addFriend\" ) {\n // is added friend\n $(\"#findFriendsBtn\").addClass('notify');\n }\n\n\n }", "function emit(msg){\n\tconsole.log(msg);\n}", "parseChat(data) {\n const chats = data.continuationContents.liveChatContinuation.actions.flatMap((a) => { var _a; return ((_a = a.addChatItemAction) === null || _a === void 0 ? void 0 : _a.item.liveChatTextMessageRenderer) || []; });\n for (const rawChatData of chats) {\n const chat = new _1.Chat({ client: this.client }).load(rawChatData);\n if (this._chatQueue.find((c) => c.id === chat.id))\n continue;\n this._chatQueue.push(chat);\n setTimeout(() => {\n this.emit(\"chat\", chat);\n }, chat.timestamp / 1000 - (new Date().getTime() - this._delay));\n }\n }", "function emit(data, newmessage) {\n if (!ioClient.connected) {\n ioClient.on('connect', function() {\n if (newmessage) {\n emitBoth(data)\n } else {\n emitMsg(data)\n }\n })\n } else {\n if (newmessage) {\n emitBoth(data) \n } else {\n emitMsg(data)\n }\n }\n}", "function loadChatMatches() {\n\tvar matchesReq = new XMLHttpRequest();\n\tmatchesReq.open('GET', '/load_chat');\n\tmatchesReq.onreadystatechange = function() {\n\t\tif (matchesReq.readyState == 4 && matchesReq.status == 200) {\n\t\t\tmatches = JSON.parse(matchesReq.responseText);\n\t\t\tconsole.log(matches);\n\t\t\tfor (var match in matches) {\n\t\t\t\tif (matches.hasOwnProperty(match)) {\n\t\t\t\t\tif (matches[match].hasOwnProperty('my_id')) {\n\t\t\t\t\t\tconsole.log('my_id is ' + matches[match].my_id);\n\t\t\t\t\t\tchat_id = matches[match].my_id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.log(matches[match].username + ' has id :' + matches[match].id);\n\t\t\t\t\t\tvar itemId = 'chat_' + matches[match].id\n\t\t\t\t\t\t$('#chat_container').append($('#chatterModel').clone().prop('id', itemId));\n\t\t\t\t\t\t$('#' + itemId).text(matches[match].username);\n\t\t\t\t\t\t$('#' + itemId).on('click', matches[match], launchChat)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tmatchesReq.send();\n}", "handleMatchBegin() {\n\t\tthis.syncModelWithRemote();\n\t}", "function chatResponse(data) {\n chatId = data.chatId;\n createContent(data.result.answer, \"answer\");\n}", "function handleChat (chat) {\n\n // Return disabled chat types\n if (tagpro.settings.ui) {\n if ( !tagpro.settings.ui.allChat && chat.to == \"all\" && chat.from ) return;\n if ( !tagpro.settings.ui.teamChat && chat.to == \"team\" ) return;\n if ( !tagpro.settings.ui.groupChat && chat.to == \"group\" ) return;\n if ( chat.to == \"all\" && !chat.from ) {\n if (!tagpro.settings.ui.systemChat) return;\n if (hide_system && chat.message in system_messages) {\n chat.message = system_messages[chat.message];\n if (!chat.message) return;\n }\n }\n }\n\n\n // Create the message div\n var message = document.createElement('div');\n\n var message_span = document.createElement('span');\n message_span.className = 'message';\n\n if (chat.from) {\n\n var name_span = document.createElement('span');\n name_span.className = 'name';\n\n if ( typeof chat.from == \"number\" ) {\n var player = tagpro.players[chat.from];\n\n if (player.auth) message.classList.add('auth');\n\n if (player.team == 1) message.classList.add('red');\n else if (player.team == 2) message.classList.add('blue');\n\n name_span.innerText = player.name;\n } else name_span.innerText = chat.from;\n\n message.appendChild(name_span);\n\n } else {\n message.classList.add('system');\n }\n\n if ( chat.to == \"group\" ) {\n name_span.innerText = chat.from;\n message.classList.add('group');\n }\n\n if ( chat.from == \"ADMIN_GLOBAL_BROADCAST\" ) {\n message.classList.add('announcement');\n name_span.innerText = \"ANNOUNCEMENT\";\n }\n\n if ( chat.mod ) {\n message.classList.add('mod');\n }\n\n\n if( chat.to == \"team\") {\n message.classList.add(\"team\");\n }\n\n message_span.innerText = chat.message;\n message_span.innerHTML = autolinker.link( message_span.innerHTML );\n\n // Linkify the message, and append it\n message.appendChild(message_span);\n\n if ( chat.c ) message_span.style.color = chat.c;\n\n // Append the message and scroll the chat\n chats.appendChild(message);\n chats.scrollTop = chats.scrollHeight;\n\n chats.classList.add('shown');\n\n clearTimeout(timeout); // Remove any existing timeout\n\n timeout = setTimeout(()=>chats.classList.remove('shown'),show_time*1e3); // Set a timeout to hide the chats\n\n // Set volume according to the awesome Volume Slider®\n chat_sound.volume = left_sound.volume = join_sound.volume = 1 * tagpro.volumeCoefficient || 1;\n\n // Play a sound\n if (chat.from && sound_on_chat) chat_sound.play();\n else if (chat.message.includes(' has left ') && sound_on_left)\n left_sound.play();\n else if (chat.message.includes(' has joined ') && sound_on_join)\n join_sound.play();\n else if (sound_on_chat) chat_sound.play();\n }", "function _onMessageChat(message)\n {\n\tvar data = {\n\t contactBareJid: Strophe.getBareJidFromJid($(message).attr('from')),\n\t msg: message\n\t};\n\n\t_msgTemp.push(data);\n\tif (_initialized == true) {\n\t for (var key in _msgTemp) {\n\t\tif (typeof _msgTemp[key] != 'object')\n\t\t continue;\n\t\t_fire(BeeChat.Events.Identifiers.RECV_CHAT_MESSAGE, _msgTemp[key]);\n\t\t_msgTemp.shift();\n\t }\n\t}\n\n\treturn true;\n }", "function appendChatMessage(message) {\n\n if (myGroups.indexOf(message.receiver) < 0) {\n // this is for one-one chat\n if (message.receiver == myUser.id && message.sender == myFriend.id) {\n playNewMessageAudio();\n \n var cssClass = (message.sender == myUser.id) ? 'chatMessageRight col-8 my-message d-flex' : 'chatMessageLeft col-8 my-friend-message d-flex flex-row-reverse ml-auto';\n $('#messages').append('<div class=\"' + cssClass + '\">' + message.text + '</div>');\n } else {\n playNewMessageNotificationAudio();\n updateChatNotificationCount(message.sender);\n }\n if (allChatMessages[message.sender] != undefined) {\n allChatMessages[message.sender].push(message);\n } else {\n allChatMessages[message.sender] = new Array(message);\n }\n } else {\n\n // this is for group chat\n if (message.sender != myUser.id) {\n message.text = message.senderName + ': ' + message.text;\n if (message.receiver == myFriend.id) {\n playNewMessageAudio();\n\n var cssClass = (message.sender == myUser.id) ? 'chatMessageRight col-8 my-message d-flex' : 'chatMessageLeft col-8 my-friend-message d-flex flex-row-reverse ml-auto';\n $('#messages').append('<div class=\"' + cssClass + '\">' + message.text + '</div>');\n } else {\n playNewMessageNotificationAudio();\n updateChatNotificationCount(message.receiver);\n }\n if (allChatMessages[message.receiver] != undefined) {\n allChatMessages[message.receiver].push(message);\n } else {\n allChatMessages[message.receiver] = new Array(message);\n }\n }\n\n }\n\n}", "async function chatHistory(req, res) {\n try {\n if (!req.body.senderId || !req.body.receiverId) {\n global.apiResponder(req, res, 400, 'please fill required fields.');\n }\n // Find messages from db\n let message = await Chat.findOne({\n $or: [\n {\n $and: [\n {\n senderId: req.body.senderId\n },\n {\n receiverId: req.body.receiverId\n }\n ]\n },\n {\n $and: [\n {\n senderId: req.body.receiverId\n },\n {\n receiverId: req.body.senderId\n }\n ]\n }\n ]\n },\n {\n message: 1\n });\n global.apiResponder(req, res, 200, 'chat history.', message);\n } catch (error) {\n global.apiResponder(req, res, 400, error);\n }\n}", "function regChatInfo(message) {\n if (\n (message.chat.type === 'group') && // make sure the event originated from a group\n (message.new_chat_participant.id === telegram.getId()) // the event is about the default bot\n ) {\n // register the chat group info in the database\n // pay attention to the deletedAt field, to avoid problems with soft-deleted records\n db.Chats.upsert(merge(message.chat, { deletedAt: null }))\n .then(() => {\n // send a greeting message\n telegram.sendMessage({\n chat_id: message.chat.id,\n text: `hello, ${telegram.name()} is here`\n });\n }).catch((error) => {\n console.log('an error had occured');\n console.log(JSON.stringify(error, null, ' '));\n });\n }\n}", "function join(msg)\r\n{\r\n console.log(\"----> Client joining \" + msg[\"room\"]);\r\n web.io.emit(\"servermessage\", {\r\n \"room\": msg[\"room\"],\r\n \"command\": \"send_room\",\r\n \"data\": getRoom(msg[\"room\"])\r\n });\r\n}", "function connect(room) {\n // Handle a chat connection.\n $('#text').focus();\n const chatbox = $('<div></div>').addClass('connection').addClass('active').attr('id', room.name);\n const roomName = room.name.replace('sfu_text_', '');\n const header = $('<h1></h1>').html('Room: <strong>' + roomName + '</strong>');\n const messages = $('<div><em>Peer connected.</em></div>').addClass('messages');\n chatbox.append(header);\n chatbox.append(messages);\n // Select connection handler.\n chatbox.on('click', () => {\n chatbox.toggleClass('active');\n });\n\n $('.filler').hide();\n $('#connections').append(chatbox);\n\n room.getLog();\n room.once('log', logs => {\n for (let i = 0; i < logs.length; i++) {\n const log = JSON.parse(logs[i]);\n\n switch (log.messageType) {\n case 'ROOM_DATA':\n messages.append('<div><span class=\"peer\">' + log.message.src + '</span>: ' + log.message.data + '</div>');\n break;\n case 'ROOM_USER_JOIN':\n if (log.message.src === peer.id) {\n break;\n }\n messages.append('<div><span class=\"peer\">' + log.message.src + '</span>: has joined the room </div>');\n break;\n case 'ROOM_USER_LEAVE':\n if (log.message.src === peer.id) {\n break;\n }\n messages.append('<div><span class=\"peer\">' + log.message.src + '</span>: has left the room </div>');\n break;\n }\n }\n });\n\n room.on('data', message => {\n if (message.data instanceof ArrayBuffer) {\n const dataView = new Uint8Array(message.data);\n const dataBlob = new Blob([dataView]);\n const url = URL.createObjectURL(dataBlob);\n messages.append('<div><span class=\"file\">' +\n message.src + ' has sent you a <a target=\"_blank\" href=\"' + url + '\">file</a>.</span></div>');\n } else {\n messages.append('<div><span class=\"peer\">' + message.src + '</span>: ' + message.data + '</div>');\n }\n });\n\n room.on('peerJoin', peerId => {\n messages.append('<div><span class=\"peer\">' + peerId + '</span>: has joined the room </div>');\n });\n\n room.on('peerLeave', peerId => {\n messages.append('<div><span class=\"peer\">' + peerId + '</span>: has left the room </div>');\n });\n }", "function ajouterMessageChat(messageInput,event) {\n var texte = messageInput.value;\n\n if (event.keyCode == 13) {\n var divChat = document.getElementById(\"messageChat\");\n divChat.innerHTML += \"<p class='msg-bubble emetteur'>\" /* + mon_identifiant + \":\" */ + escapeHtml(texte) + \"</p>\";\n divChat.scrollTop = divChat.scrollHeight;\n document.getElementById(\"zone_texte_Chat\").value = \"\";\n \n socket.emit('new_message_PersonalChat', JSON.stringify({\n emetteur: mon_identifiant,\n destinataire: destinataire,\n contenu: texte\n })); \n }\n}", "function onMessage(event) {\n var newMessage = event.data; // to newMessage tha parei to input opoy exw balei to event\n var chats = document.getElementById(\"content\");\n var newHtml = chats.innerHTML+newMessage; // to newHtml tha parei oti eixe to content + to neo input\n document.getElementById(\"content\").innerHTML=newHtml; // to synoliko mhnyma tha mpei sto content\n}", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "receiveMessage() {\n\n index = this.currentChat;\n\n const cpuMessage = {\n message: 'ok',\n status: 'received',\n date: dayjs().format('DD/MM/YYYY HH:mm:ss'),\n }\n\n this.contacts[this.currentChat].messages.push(cpuMessage);\n }", "function emitMessage(message) {\n torrentAlerter.emit('message', message);\n}", "function handleMessage(evt) {\n var f = document.getElementById(\"chatbox\").contentDocument;\n var text = \"\";\n var msg = JSON.parse(evt.data);\n var time = new Date(msg.date);\n var timeStr = time.toLocaleTimeString();\n\n console.log('connection.onmessage start', msg);\n\n switch (msg.type) {\n case \"id\":\n clientID = msg.id;\n setUsername();\n break;\n case \"username\":\n text = \"<b>User <em>\" + msg.name + \"</em> signed in at \" + timeStr + \"</b><br>\";\n break;\n case \"message\":\n text = \"(\" + timeStr + \") <b>\" + msg.name + \"</b>: \" + msg.text + \"<br>\";\n break;\n case \"rejectusername\":\n text = \"<b>Your username has been set to <em>\" + msg.name + \"</em> because the name you chose is in use.</b><br>\";\n break;\n case \"userlist\":\n handleUserlistMsg(msg);\n break;\n case \"video-offer\":\n handleVideoOfferMsg(msg);\n break;\n case \"video-answer\":\n handleVideoAnswerMsg(msg);\n break;\n case \"new-ice-candidate\":\n handleNewIceCandidateMsg(msg);\n break;\n case \"hang-up\":\n hangUpCall();\n break;\n }\n\n if (text.length) {\n f.write(text);\n }\n}", "function startTheGame(){\n socket.emit('begin_chat', \"joined\");\n socketid = socket.id\n}", "function message(msg){ \n\t\t\t$('#chatLog').append(msg+'</p>'); \n\t\t}", "function onMessageHandler(target, context, msg, self)\n{\n\tif (self) { return; } // Ignore messages from the bot\n\n\t// Remove whitespace from chat message\n\tconst commandName = msg.trim();\n\n\tif (commandName.startsWith('!guess'))\n\t{\n\t\tvar guesser = context['username'];\n\t\tvar ans = commandName.substring(6).trim().substring(0, 1); //First, take '!guess' off the message. Then, take whitespace off the front. Lastly, take the first character that remains.\n\t\tif (listeningForGuesses)\n\t\t{\n\t\t\tguesses[guesser] = ans;\n\t\t\tfs.appendFile('log.txt', String(lineNumber).concat('\\t').concat(guesser).concat('\\t').concat(ans).concat('\\n'), (err) =>\n\t\t\t{\n\t\t\t\tif (err) throw err;\n\t\t\t\tconsole.log('> '.concat(guesser).concat(' guessed ').concat(ans));\n\t\t\t});\n\t\t\tlineNumber++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconsole.log('> '.concat(guesser).concat(' tried to guess ').concat(ans).concat(' but guessing isn\\'t open right now'));\n\t\t}\n\t}\n\n\telse if (commandName.startsWith('!score'))\n\t{\n\t\t/*\n\t\tconst player = context['username'];\n\t\tvar score = 0;\n\t\tvar streak = 0;\n\t\tif (scores[player] == null) //Player not in score table.\n\t\t{\n\t\t\tconsole.log('> '.concat(player).concat(\" asked for their score but they don't exist in the scoretable\"));\n\t\t\t//score = 0;\n\t\t\t//streak = 0;\n\t\t}\n\t\telse //Player IS in scoretable\n\t\t{\n\t\t\tscore = scores[player][\"score\"];\n\t\t\tstreak = scores[player][\"streak\"];\n\t\t\tconsole.log('> '.concat(player).concat(\" asked for their score, it is \").concat(score).concat( \" and their streak is \").concat(streak));\n\t\t}\n\t\tclient.action(CHAT_CHANNEL, \"@\".concat(player).concat(\" Your score is \").concat(score).concat(\" and your current streak is \").concat(streak));\n\t\t*/\n\t\tconst player = context['username'];\n\t\tconsole.log('> Score command used by '.concat(player));\n\t\tscoreRequests.push(player);\n\t\tif (scoreRequests.length == 1) //First request in a batch, so start the timer for batch posting.\n\t\t{\n\t\t\tscoreTimeoutFunc = setTimeout(batchPostScores, SCORE_REQUEST_BATCH_WAIT);\n\t\t}\n\t\telse if (scoreRequests.length >= MAX_SCORE_REQUESTS) //Batch is full, so post immediately and cancel the timer.\n\t\t{\n\t\t\tclearTimeout(scoreTimeoutFunc);\n\t\t\tbatchPostScores();\n\t\t}\n\t}\n\n\telse if (commandName.startsWith('!unguess'))\n\t{\n\t\tvar guesser = context['username'];\n\t\tif (listeningForGuesses)\n\t\t{\n\t\t\tguesses[guesser] = \"\";\n\t\t\tfs.appendFile('log.txt', String(lineNumber).concat('\\t').concat(guesser).concat('\\tcancel guess\\n'), (err) =>\n\t\t\t{\n\t\t\t\tif (err) throw err;\n\t\t\t\tconsole.log('> '.concat(guesser).concat(' unguessed '));\n\t\t\t});\n\t\t\tlineNumber++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconsole.log('> '.concat(guesser).concat(' tried to unguess ').concat(ans).concat(' but guessing isn\\'t open right now'));\n\t\t}\n\t}\n\n\telse if (commandName.startsWith('!leaders'))\n\t{\n\t\tif (leadersAvailable)\n\t\t{\n\t\t\tconsole.log('> Leaders command used');\n\t\t\tvar outString = '';\n\t\t\tfor (var i = 1; i <= 5; i++)\n\t\t\t{\n\t\t\t\toutString = outString.concat(i).concat('. ');\n\t\t\t\toutString = outString.concat(leaderNames[i - 1]).concat(': ');\n\t\t\t\toutString = outString.concat(leaderScores[i - 1]).concat(', streak ');\n\t\t\t\toutString = outString.concat(leaderStreaks[i - 1]).concat(' ||| ');\n\t\t\t}\n\t\t\tclient.action(CHAT_CHANNEL, outString);\n\t\t\tleadersAvailable = false;\n\t\t\tleadersTimeoutFunc = setTimeout(function () { leadersAvailable = true; }, LEADERS_COOLDOWN_WAIT);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconsole.log('> Leaders command used but currently on cooldown');\n\t\t}\n\t}\n\n\telse if (commandName.startsWith('!question') || commandName.startsWith('!answers'))\n\t{\n\t\tif (qaAvailable)\n\t\t{\n\t\t\tconsole.log('> Question/Answers command used');\n\t\t\tif (question == '')\n\t\t\t{\n\t\t\t\tclient.action(CHAT_CHANNEL, \"No question has been logged this round! Is Mana slacking?\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tclient.action(CHAT_CHANNEL, question);\n\t\t\t}\n\t\t\tqaAvailable = false;\n\t\t\tqaTimeoutFunc = setTimeout(function () { qaAvailable = true; }, QA_COOLDOWN_WAIT);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconsole.log('> Question/Answers command used but currently on cooldown');\n\t\t}\n\t}\n\n\telse if (commandName.startsWith('!open') && hasElevatedPermissions(context['username']))\n\t{\n\t\troundNumber++;\n\t\tguesses = {};\n\t\tlisteningForGuesses = true;\n\t\tpostFinal = false;\n\t\tquestion = \"\";\n\t\tclient.action(CHAT_CHANNEL, 'Guessing is open for round '.concat(roundNumber).concat('! Type !guess (number) to submit your answer choice.'));\n\t\tfs.appendFile('log.txt', String(lineNumber).concat('\\tROUND ').concat(roundNumber).concat(' START-- GUESSING OPEN\\n'), (err) =>\n\t\t{\n\t\t\tif (err) throw err;\n\t\t\tconsole.log('> Guessing opened');\n\t\t});\n\t\tlineNumber++;\n\t}\n\n\telse if (commandName.startsWith('!close') && hasElevatedPermissions(context['username']))\n\t{\n\t\tlisteningForGuesses = false;\n\t\tpostFinal = false;\n\t\tclient.action(CHAT_CHANNEL, 'Guessing is closed for round '.concat(roundNumber).concat('.'));\n\t\tfs.writeFile('guesses.txt', JSON.stringify(guesses), (err) => //Write main guess file\n\t\t{\n\t\t\tif (err) throw err;\n\t\t\tconsole.log('> Guess file written');\n\t\t});\n\t\tfs.writeFile('guesses-'.concat(INITIAL_TIMESTAMP).concat('-').concat(roundNumber).concat('.txt'), JSON.stringify(guesses), (err) => //Also write secondary record-keeping guess file\n\t\t{\n\t\t\tif (err) throw err;\n\t\t\tconsole.log('> Guess file written');\n\t\t});\n\t\tfs.appendFile('log.txt', String(lineNumber).concat('\\tGUESSING CLOSED FOR ROUND ').concat(roundNumber).concat(' -- IGNORE GUESSES PAST THIS POINT\\n'), (err) =>\n\t\t{\n\t\t\tif (err) throw err;\n\t\t\tconsole.log('> Guessing closed');\n\t\t});\n\t\tlineNumber++;\n\t}\n\n\telse if (commandName.startsWith('!cancelopen') && hasElevatedPermissions(context['username']))\n\t{\n\t\tif (listeningForGuesses)\n\t\t{\n\t\t\tlisteningForGuesses = false;\n\t\t\tclient.action(CHAT_CHANNEL, 'Guessing has been cancelled for round '.concat(roundNumber).concat('.'));\n\t\t\troundNumber--;\n\t\t\tfs.appendFile('log.txt', String(lineNumber).concat('\\tGUESSING CANCELLED -- IGNORE GUESSES ABOVE\\n'), (err) =>\n\t\t\t{\n\t\t\t\tif (err) throw err;\n\t\t\t\tconsole.log('> Guessing cancelled');\n\t\t\t});\n\t\t\tlineNumber++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tclient.action(CHAT_CHANNEL, 'The !cancelopen command can only be used while guessing is open.');\n\t\t}\n\t}\n\n\telse if (commandName.startsWith('!setq') && hasElevatedPermissions(context['username']))\n\t{\n\t\tvar arg = commandName.substring(6);\n\t\tquestion = arg;\n\t\tclient.action(CHAT_CHANNEL, 'Question has been logged. Anyone may review the question and answers later with !question or !answers');\n\t\tfs.appendFile('log.txt', String(lineNumber).concat('\\tQUESTION LOGGED AS FOLLOWS: ').concat(arg).concat('\\n'), (err) =>\n\t\t{\n\t\t\tif (err) throw err;\n\t\t\tconsole.log('> Question logged');\n\t\t});\n\t\tlineNumber++;\n\t}\n\n\telse if (commandName.startsWith('!final') && hasElevatedPermissions(context['username']))\n\t{\n\t\tpostFinal = true;\n\t\tvar arg = commandName.substring(7).trim();\n\t\tclient.action(CHAT_CHANNEL, 'Final answer is '.concat(arg).concat(' for round number ').concat(roundNumber).concat('.'));\n\t\tfs.appendFile('log.txt', String(lineNumber).concat('\\tGUESS DECIDED FOR ROUND ').concat(roundNumber).concat(': CORRECT ANSWER WAS ').concat(arg).concat('\\n'), (err) =>\n\t\t{\n\t\t\tif (err) throw err;\n\t\t\tconsole.log('> Final answer logged as '.concat(arg));\n\t\t});\n\t\tlineNumber++;\n\t\t//Process argument into several correct answers.\n\t\tvar answers = [];\n\t\tfor (var i = 0; i < arg.length; i++)\n\t\t{\n\t\t\tanswers.push(arg.substring(i, i + 1));\n\t\t}\n\t\tconsole.log(answers);\n\t\t//Process scores\n\t\tvar correctAnswers = 0;\n\t\tvar totalAnswers = 0;\n\t\tfor (const [player, guess] of Object.entries(guesses))\n\t\t{\n\t\t\t//If the player isn't in the score table, add them.\n\t\t\tif (scores[player] == null)\n\t\t\t{\n\t\t\t\tscores[player] = {};\n\t\t\t\tscores[player]['score'] = 0;\n\t\t\t\tscores[player]['streak'] = 0;\n\t\t\t}\n\t\t\t//Did the player get it right?\n\t\t\tif (answers.indexOf(guess) != -1 || arg == '*')\n\t\t\t{\n\t\t\t\tscores[player]['score'] += basePoints;\n\t\t\t\tconst bonus = streakBonus * scores[player]['streak'];\n\t\t\t\tscores[player]['score'] += bonus;\n\t\t\t\tscores[player]['streak']++;\n\t\t\t\tcorrectAnswers++;\n\t\t\t\ttotalAnswers++;\n\t\t\t}\n\t\t\telse if (guess != '') //An empty guess is either an incorrectly-entered guess or a retracted guess. In either case, do not break their streak.\n\t\t\t{\n\t\t\t\tscores[player]['streak'] = 0;\n\t\t\t\ttotalAnswers++;\n\t\t\t}\n\t\t}\n\t\t//Write scores to file.\n\t\tfs.writeFile('scores.txt', JSON.stringify(scores), (err) => //Write main score file\n\t\t{\n\t\t\tif (err) throw err;\n\t\t\tconsole.log('> Score file written');\n\t\t});\n\t\tfs.writeFile('scores-'.concat(INITIAL_TIMESTAMP).concat('-').concat(roundNumber).concat('.txt'), JSON.stringify(scores), (err) => //Also write secondary record-keeping score file\n\t\t{\n\t\t\tif (err) throw err;\n\t\t\tconsole.log('> Score file written');\n\t\t});\n\t\tclient.action(CHAT_CHANNEL, 'There were '.concat(correctAnswers).concat(' correct answers out of a total of ').concat(totalAnswers).concat('.'));\n\t\t//Determine leaders.\n\t\tupdateLeaders();\n\t}\n\n\telse if (commandName.startsWith('!undofinal') && hasElevatedPermissions(context['username']))\n\t{\n\t\tif (!postFinal)\n\t\t{\n\t\t\tclient.action(CHAT_CHANNEL, 'The !undofinal command is only usable at the end of a round following a !final, before the next !open.');\n\t\t\treturn;\n\t\t}\n\t\tpostFinal = false;\n\t\tfs.readFile('scores-'.concat(INITIAL_TIMESTAMP).concat('-').concat(roundNumber - 1).concat('.txt'), (err, data) =>\n\t\t{\n\t\t\tif (err) throw err;\n\t\t\tscores = JSON.parse(data);\n\t\t\tupdateLeaders();\n\t\t\tfs.appendFile('log.txt', String(lineNumber).concat('\\tINCORRECT ANSWER LOGGED FOR ROUND ').concat(roundNumber).concat(': IGNORE PREVIOUS ANSWER AND USE NEXT INSTEAD\\n'), (err) =>\n\t\t\t{\n\t\t\t\tif (err) throw err;\n\t\t\t\tconsole.log('> Undofinal command used.');\n\t\t\t});\n\t\t\tlineNumber++;\n\t\t\tclient.action(CHAT_CHANNEL, 'Previous !final command undone; now please use !final with the correct answer.');\n\t\t});\n\n\t}\n\n\telse if (commandName.startsWith('!ping') && hasElevatedPermissions(context['username']))\n\t{\n\t\tclient.action(CHAT_CHANNEL, 'Pong!');\n\t\tconsole.log('> Pong!');\n\t}\n\n\telse if (commandName.startsWith('!testcontroller') && hasElevatedPermissions(context['username']))\n\t{\n\t\tclient.action(CHAT_CHANNEL, context['username'].concat(', you are a successfully-registered bot controller.'));\n\t}\n\n\telse if (commandName.startsWith('!basepoints') && hasElevatedPermissions(context['username']))\n\t{\n\t\tvar newValue = Number(commandName.substring(12));\n\t\tif (isNaN(newValue))\n\t\t{\n\t\t\tclient.action(CHAT_CHANNEL, 'Failed to parse command argument as a number.');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbasePoints = newValue;\n\t\t\tclient.action(CHAT_CHANNEL, 'Base value for correct questions is now '.concat(newValue));\n\t\t\tfs.appendFile('log.txt', String(lineNumber).concat('\\tBASE POINT VALUE IS NOW ').concat(newValue).concat('\\n'), (err) =>\n\t\t\t{\n\t\t\t\tif (err) throw err;\n\t\t\t\tconsole.log('> Base point value changed.');\n\t\t\t});\n\t\t\tlineNumber++;\n\t\t}\n\t}\n\n\telse if (commandName.startsWith('!streakpoints') && hasElevatedPermissions(context['username']))\n\t{\n\t\tvar newValue = Number(commandName.substring(14));\n\t\tif (isNaN(newValue))\n\t\t{\n\t\t\tclient.action(CHAT_CHANNEL, 'Failed to parse command argument as a number.');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstreakBonus = newValue;\n\t\t\tclient.action(CHAT_CHANNEL, 'Streak bonus value for correct questions is now '.concat(newValue));\n\t\t\tfs.appendFile('log.txt', String(lineNumber).concat('\\tBASE POINT VALUE IS NOW ').concat(newValue).concat('\\n'), (err) =>\n\t\t\t{\n\t\t\t\tif (err) throw err;\n\t\t\t\tconsole.log('> Streak bonus point value changed.');\n\t\t\t});\n\t\t\tlineNumber++;\n\t\t}\n\t}\n\n\telse if (commandName.startsWith('!addcontroller') && context['display-name'] === BOT_CONTROLLER)\n\t{\n\t\tvar newController = commandName.substring(15);\n\t\taddedControllers.push(newController);\n\t\tconsole.log('> Added new controller: '.concat(newController));\n\t\tclient.action(CHAT_CHANNEL, 'Added new controller: '.concat(newController));\n\t}\n\n\telse if (commandName.startsWith('!removecontroller') && context['display-name'] === BOT_CONTROLLER)\n\t{\n\t\tvar newController = commandName.substring(18);\n\t\tvar index = addedControllers.indexOf(newController);\n\t\tif (index > -1)\n\t\t{\n\t\t\taddedControllers.splice(index, 1);\n\t\t\tconsole.log('> Removed controller: '.concat(newController));\n\t\t\tclient.action(CHAT_CHANNEL, 'Removed controller: '.concat(newController));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tclient.action(CHAT_CHANNEL, 'Couldn\\'t find that user in the list of added controllers.');\n\t\t}\n\t}\n\n\telse if (commandName.startsWith('!recoverguesses') && context['display-name'] === BOT_CONTROLLER)\n\t{\n\t\tconsole.log('> Used command recoverguesses');\n\t\tlisteningForGuesses = true;\n\t\tguesses = {};\n\t\tclient.action(CHAT_CHANNEL, 'The bot has recovered from a crash or reboot in the middle of guessing. Unfortunately, this round\\'s guesses could not be saved. IF YOU MADE A GUESS THIS ROUND, PLEASE SUBMIT IT AGAIN WITH !guess (number)');\n\t\tfs.appendFile('log.txt', String(lineNumber).concat('\\tRECOVERED BOT MID-GUESSING -- GUESSING OPEN -- USE GUESSES BOTH ABOVE AND BELOW THIS LINE\\n'), (err) =>\n\t\t{\n\t\t\tif (err) throw err;\n\t\t});\n\t\tlineNumber++;\n\t}\n\n\telse if (commandName.startsWith('!recoverround') && context['display-name'] === BOT_CONTROLLER)\n\t{\n\t\tconsole.log('> Used command recoverround');\n\t\tfs.readFile('guesses.txt', (err, data) => { if (err) throw err; guesses = JSON.parse(data); });\n\t\tclient.action(CHAT_CHANNEL, 'The bot has recovered from a crash or reboot in the middle of a match. Guesses were saved, however. This message is mostly to inform Mana that the guess recovery process succeeded.');\n\t\tfs.appendFile('log.txt', String(lineNumber).concat('\\tRECOVERED BOT AFTER GUESSING BUT BEFORE FINAL\\n'), (err) =>\n\t\t{\n\t\t\tif (err) throw err;\n\t\t});\n\t\tlineNumber++;\n\t}\n\n\telse if (commandName.startsWith('!calcleaders') && context['display-name'] === BOT_CONTROLLER)\n\t{\n\t\tconsole.log('> Used command calcleaders');\n\t\tclient.action(CHAT_CHANNEL, 'Rebuilding leader list.');\n\t\tupdateLeaders();\n\t}\n\n\telse if (commandName.startsWith('!debug') && context['display-name'] === BOT_CONTROLLER)\n\t{\n\t\tconsole.log(guesses);\n\t\tconsole.log(leaderNames);\n\t\tconsole.log(leaderScores);\n\t}\n}", "function sendMessage() {\n let message = data.value;\n data.value = \"\";\n // tell server to execute 'sendchat' and send along one parameter\n socket.emit(\"sendchat\", message);\n }", "function sendMessage() {\n let message = data.value;\n data.value = \"\";\n // tell server to execute 'sendchat' and send along one parameter\n socket.emit(\"sendchat\", message);\n }", "function chatOut (msg) {\n var nickname = $(\"#nickname\")[0].value;\n if (msg == \"\" || !msg)\n return;\n chatRef.push({\n id: id,\n name: (nickname ? nickname : id),\n message: msg,\n timestamp: new Date().getTime()\n })\n}", "function onMessageArrived(message) {\n // console.log(\"onMessageArrived: \" + message.payloadString);\n document.getElementById(\"messages\").innerHTML += '<span>' + message.destinationName + ' : ' + message.payloadString + '</span><br/>';\n updateScroll(); // Scroll to bottom of window\n}", "function eventTextMessage(ret, utf8Data) {\n\t\tconsole.log('[Log]eventTextMessage:', ret);\n\t\tif (ret.to) {\n\t\t\tvar node = null;\n\t\t\tif (ret.to !== 'master' && ws_connections[ret.to]) {\n\t\t\t\tnode = ws_connections[ret.to].conn;\n\t\t\t}\n\t\t\teventTextMessageNode(node, ret, utf8Data);\n\t\t} else {\n\t\t\tconsole.error('Error: Not found \"to\" id !!');\n\t\t}\n\t}", "function sendChatAction(value){\n\n socket.emit(\"chat message\", value) \n}", "sendMessage(){\n\n let subscriptions = App.cable.subscriptions.subscriptions\n let index;\n for (let i = 0; i < subscriptions.length; i++){\n let identifier = JSON.parse(subscriptions[i].identifier)\n if (identifier.channel === \"ChatChannel\"){\n index = i\n break\n }\n }\n\n let message = {\n channel_dms_id: this.props.searchDmId,\n content: this.state.content,\n sender_id: this.state.creatorId,\n created: true\n }\n \n App.cable.subscriptions.subscriptions[index].speak({ message: message})\n this.setState({\n content: \"\"\n })\n this.props.history.push(`/client/${this.props.searchDmId}`)\n }", "function emitMessage(){\n //if(count >= 10) return;\n console.log('from emitMessage');\n socket.emit('message', {\n sender: sender,\n data: {\n roomToken: roomToken,\n roomName: roomName,\n broadcaster: userToken,\n sender: sender,\n type: 'teacher'\n }\n });\n setTimeout(emitMessage, 3000);\n //count++;\n }", "function onNodeInserted(event) {\r\n\t// If we have a new incoming message cluster\r\n\t// (i.e., one that would have the 'Alan:' prefix)\r\n\tif (event.target.getAttribute('role') == 'chatMessage' &&\r\n\t\tevent.target.getAttribute('chat-dir') == 't') {\r\n\r\n\t\t// Growl using text in the last child node (it's really the only node)\r\n\t\tgrowlChatMessage(event.target.lastChild);\r\n\t\t\r\n\t// If we have a new incoming message within an existing cluster\r\n\t// (i.e., just the message, 'Alan:' already showed up previously)\r\n\t} else if (event.target.parentNode.getAttribute('role') == 'chatMessage' &&\r\n\t\t\t event.target.parentNode.getAttribute('chat-dir') == 't') {\r\n\t\t\r\n\t\t// Growl using text in the current node (message node)\r\n\t\tgrowlChatMessage(event.target);\r\n\r\n\t// If a new chat window is created by this incoming message\r\n\t} else if (event.target.getAttribute('role') == 'log' &&\r\n\t\t\t event.target.firstChild.lastChild.getAttribute('chat-dir') == 't') {\r\n\r\n\t\t// Growl using text in the latest message node\r\n\t\tgrowlChatMessage(event.target.firstChild.lastChild.lastChild);\r\n\t}\r\n}", "function processText(query,res) {\r\n // prepare the object to be pushed in messages\r\n var msgObj = {};\r\n msgObj.sender = query.id;\r\n msgObj.message = query.message;\r\n // for every client registered with the server\r\n for (client in messages) {\r\n if (client != query.id) { // except for the client that sent the message\r\n messages[client].push(msgObj); // store the message and its sender\r\n }\r\n }\r\n res.writeHead(200); // nothing to send back except success status\r\n res.end();\r\n}", "function matchUp() {\n if(searching.length > 1){\n var p2 = searching.pop();\n var p1 = searching.pop()\nmatched[p1.playerID] = makeStartState(p2.playerID,true)\nmatched[p2.playerID] = makeStartState(p1.playerID,false)\n p1.tosend.send({ \n \"playerID\": p1.playerID,\n \"oppID\": p2.playerID,\n \"youFirst\": true,\n \"success\": true,\n \"levelIndex\": randomIndex\n })\n p2.tosend.send({ \n \"playerID\": p2.playerID,\n \"oppID\": p1.playerID,\n \"youFirst\": false,\n \"success\": true,\n \"levelIndex\": randomIndex\n })\n}\n }", "function receiveChatMessage(jsonMessage) {\n var chatMessage = JSON.parse(jsonMessage);\n\n var chatHistory = $('#chat');\n var htmlChatBubble = '';\n\n htmlChatBubble = getChatMessageItem(chatMessage);\n\n if (chatMessage.score >= 0.5) {\n htmlChatBubble += '<p><span class=\"fas fa-thumbs-up\" style=\"color:#19b321;\"></span>&nbsp;';\n }\n else if (chatMessage.score > 0) {\n htmlChatBubble += '<p><span class=\"fas fa-thumbs-down\" style=\"color:#eb4034;\"></span>&nbsp;';\n } else {\n htmlChatBubble += '<p>'\n }\n\n if (chatMessage.messageType !== messageType.JOIN) {\n htmlChatBubble += '<span class=\"font-weight-bold\">' + chatMessage.username + '</span> says: ';\n }\n\n htmlChatBubble += chatMessage.message + '</p>';\n htmlChatBubble += '</div></li>';\n\n chatHistory.append(htmlChatBubble);\n }", "startListening() {\n // If this object doesn't have a uid it could potentially create problematic queries, so return.\n if (this.uid === undefined) return;\n // Get a reference to where the messages are stored.\n const ref = Fetch.getMessagesReference(this.uid).child(\"messages\");\n // Add a handler for when a message is added.\n ref.on(\"child_added\", snapshot => {\n const message = snapshot.val();\n if (!message || !message.content) return;\n this.messages = this.messages || {};\n if (!this.messages[message.uid]) {\n this.emit(\"new_message\", message);\n }\n this.messages[message.uid] = message;\n this.emit(\"message\", message);\n this.emit(\"change\", this.messages);\n });\n // Add a handler for when a message is changed, e.g. edited.\n ref.on(\"child_changed\", snapshot => {\n const message = snapshot.val();\n if (!message || !message.content) return;\n this.messages = this.messages || {};\n this.messages[message.uid] = message;\n this.emit(\"edit\", message);\n this.emit(\"change\", this.messages);\n });\n // Add a handler for when a message is deleted.\n ref.on(\"child_removed\", snapshot => {\n const message = snapshot.val();\n if (!message || !message.content) return;\n this.messages[message.uid] = null;\n delete this.messages[message.uid];\n this.emit(\"delete\", message);\n this.emit(\"change\", this.messages);\n });\n }", "listen(message, user, conversation) {\n if (conversation === this.currentConversation) {\n this.log(user + \": \" + message);\n }\n else {\n this.log('#' + conversation.name + '@' + user + \": \" + message);\n }\n }", "function handleSubmit() {\r\n const data = document.getElementById(\"chat-input\").value;\r\n if(data === \"Enter Something\"){\r\n alert(\"Enter Something to send :)\");\r\n }\r\n else{\r\n //emit event when user types in a message\r\n //get the time and date of etered message\r\n const currDate = new Date();\r\n let dateTime = `${currDate.getDate()}/${currDate.getMonth() + 1}/${currDate.getFullYear()} ${currDate.getHours()}:${currDate.getMinutes()}`;\r\n console.log(dateTime);\r\n\r\n socket.emit(\"chat-typed\",{chat_content:data,chat_dateTime:dateTime});\r\n document.getElementById(\"chat-input\").value = \"Enter Something\";\r\n }\r\n}", "sendMessage() {\n const {input} = this.elements;\n const value = input.value;\n if (value === '') {\n return;\n }\n input.value = '';\n drone.publish({\n room: selectedRoom,\n message: value,\n });\n addMessageToRoomArray(selectedRoom, me, value);\n this.addMessageToList(value, me);\n }", "function onIceCandidate(event) {\n if (event.candidate) {\n sendMessage({type: 'candidate', sdpMLineIndex: event.candidate.sdpMLineIndex, sdpMid: event.candidate.sdpMid, candidate: event.candidate.candidate});\n } else {\n logg(\"End of candidates\");\n }\n}", "function addChat(data) {\n if (data.userID == userID) {\n chats.innerHTML += '<p class=\"sent sender\">' + data.username + '</p><p class=\"sent message\">' + data.message + '</p>';\n } else {\n chats.innerHTML += '<p class=\"received sender\">' + data.username + '</p><p class=\"received message\">' + data.message + '</p>';\n }\n updateScroll();\n}", "announceWinner(player) {\n const message = `${player.getPlayerName()} wins!`;\n this.socket.emit('gameEnded', {\n room: this.getRoomId(),\n message: message\n });\n }" ]
[ "0.6433349", "0.63636315", "0.6303844", "0.6273286", "0.62396187", "0.61153334", "0.6055164", "0.60517836", "0.60078084", "0.59888405", "0.5986973", "0.5949048", "0.5934245", "0.592288", "0.59116715", "0.58969444", "0.5893675", "0.5885406", "0.58424604", "0.5832634", "0.5817816", "0.57844275", "0.57637197", "0.57453054", "0.5736311", "0.57354754", "0.57312584", "0.57253605", "0.57201976", "0.5703731", "0.5683371", "0.5666915", "0.5660104", "0.5659951", "0.5653997", "0.56506854", "0.5642266", "0.5621424", "0.56209946", "0.56106824", "0.5601967", "0.5595554", "0.559289", "0.5590877", "0.55864376", "0.5579276", "0.55702204", "0.5567385", "0.5564967", "0.55638117", "0.5549477", "0.55446976", "0.5539517", "0.55391175", "0.55312437", "0.5528415", "0.5527332", "0.5520051", "0.5511344", "0.55109036", "0.55026376", "0.5498768", "0.54986167", "0.54951036", "0.5494075", "0.54781985", "0.5478021", "0.54756147", "0.54665136", "0.5465413", "0.5464849", "0.5461313", "0.54585946", "0.54573613", "0.54573613", "0.54573613", "0.5457283", "0.54564965", "0.5449109", "0.54447526", "0.54441905", "0.54432225", "0.5442602", "0.5442602", "0.5441554", "0.5436279", "0.5431891", "0.5417672", "0.54170454", "0.5414194", "0.54116285", "0.54047537", "0.5404677", "0.540453", "0.54026437", "0.5394248", "0.53914726", "0.5391228", "0.53864783", "0.5386319", "0.53819704" ]
0.0
-1
Load user and append to req.
function load(req, res, next, id) { User.get(id) .then(user => { req.user = user; // eslint-disable-line no-param-reassign return next(); }) .error(e => next(e)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadUser(req, res, next) {\n User.findOne({ _id: req.session.user_id }, function(err, user) {\n if (err) { throw err; }\n req.user = user;\n next();\n });\n}", "function loadUser(req, res, next) {\n if (!req.session.user_id) { return next(); }\n\n User.findOne({ _id: req.session.user_id }, function(err, user) {\n req.user = user;\n next(err);\n });\n}", "function load(req, res, next, id) {\n _user2.default.get(id).then(function (user) {\n req.user = user; // eslint-disable-line\n return next();\n }).catch(function (e) {\n return next(e);\n });\n}", "function load(req, res, next, id) {\n User.get(id)\n .then((user) => {\n req.user = user; // eslint-disable-line no-param-reassign\n return next();\n })\n .catch(e => next(e));\n}", "function load(req, res, next, id) {\n User.get(id)\n .then((user) => {\n req.user = user; // eslint-disable-line no-param-reassign\n return next();\n })\n .catch(e => next(e));\n}", "function load(req, res, next, id) {\n User.get(id)\n .then((user) => {\n req.user = user; // eslint-disable-line no-param-reassign\n return next();\n })\n .catch(e => next(e));\n}", "function load (req, res, next, id) {\n User.get(id)\n .then(user => {\n req.user = user // eslint-disable-line no-param-reassign\n return next()\n })\n .catch(e => next(e))\n}", "function load(req, res, next, id) {\n User.get(id)\n .then((foundUser) => {\n req.user = foundUser; // eslint-disable-line no-param-reassign\n return next();\n }).catch(e => next(e));\n}", "function load(req, res, next, id) {\n User.get(id)\n .then((user) => {\n req.user = user;\n return next();\n })\n .catch(e => next(e));\n}", "function addUserToRequest(req, res, next) {\n // check if user is added to request\nif (req.user) return next(); \n // check to see if there is a session created\n if(req.session && req.session.userId){\n // find the user based on there id and then add them to the request object\n User.findById(req.session.userId, function(err, foundUser) {\n req.user = foundUser;\n next();\n });\n } else {\n next();\n };\n}", "function load (req, res, next, id) {\n User.get(id)\n .then((result) => {\n req.user = result;\n return next()\n })\n .catch(e => next(e))\n}", "function appendUser() {\n return compose()\n // Attach user to request\n .use(function(req, res, next) {\n validateJwt(req, res, function(val) {\n if(_.isUndefined(val)) {\n\t\t\t\t\t\n\t\t\t User.find({\n\t\t\t where: {\n\t\t\t _id: req.user._id\n\t\t\t },\n\t\t\t \t\tinclude: [{\n\t\t\t \t\t\tmodel: Role}]\n\t\t\t })\n\t\t\t .then(function(user) {\n\t\t\t if (!user) {\n req.user = undefined;\n return next();\n\t\t\t } else {\n\t\t\t req.user = user;\n\t\t\t next();\n\t\t\t\t }\n\t\t\t })\n\t\t\t .catch(function(err) {\n\t\t\t\t\t\tconsole.log(\"ERROR \"+err)\n\t\t\t return next(err);\n\t\t\t });\n\t\t\t\t\t\n\t\t\t\n } else {\n req.user = undefined;\n next();\n }\n });\n });\n}", "function load(req, res, next, id) {\n AdminUser.get(id)\n .then((user) => {\n req.user = user; // eslint-disable-line no-param-reassign\n return next();\n })\n .catch(e => next(e));\n}", "initUser() {\n this.app.use(function (req, res, next) {\n res.locals.user = req.user || null;\n next();\n });\n }", "function userReq () {\n const request = apiHelper.axGet(apiUrls.user, authToken)\n return axios(request)\n }", "function loadUser() {\r\n makeHTTPRequest(`/usuarios/${uId}`, 'GET', '', cbOk1);\r\n}", "async function load(req, res, next, id) {\n try {\n let user = await User.findByPk(id);\n\n if (!user) {\n const err = new APIError('No such user exists!', HTTPStatus.NOT_FOUND, true);\n return next(err);\n }\n\n req.user = user;\n return next();\n } catch (err) {\n return next(err);\n }\n}", "function setUser(req, res, next) {\n const userId = req.body.userId\n if (userId) {\n req.user = users.find(user => user.id === userId)\n }\n next()\n}", "function load(req, res, next, cedula) {\n User.getByCedula(cedula)\n .then((user) => {\n req.user = user; // eslint-disable-line no-param-reassign\n return next();\n })\n .catch(e => next(e));\n}", "function user(){\r\n uProfile(req, res);\r\n }", "function load(req, res, next, id) { \n User.findById(id)\n .then(user => {\n // console.log('get ', user, user.password);\n if (user === null) { \n const error = new APIError('Not find user', httpStatus.NOT_FOUND, true);\n return res.status(error.status).send(error.message);;\n }\n req.user = user;\n return next();\n })\n}", "async function addUserToLocals(req, res, next) {\r\n const user = await userDao.retrieveUserWithAuthToken(req.cookies.authToken);\r\n // You can use \"user\" in every where now (e.g. handlebars: {{user.username}}; route handler: res.locals.user)\r\n res.locals.user = user;\r\n next();\r\n}", "function getUserInfo(req, res, next) {\n var token = _getTokenFromRequest(req);\n var allowAnonymous = req.disallowAnonymous ? false : true;\n\n logger.debug('checking token : ' + token);\n _verifyToken(token, function (err, info) {\n var errMsg = 'Internal server error';\n if (err) {\n logger.error('_verifyToken failed ', err);\n if (err === 400 || err === 419) {\n if (allowAnonymous) {\n logger.debug('_verifyToken added empty user in req'); \n \t req.user = {};\n return next();\n }\n errMsg = (err === 400) ? 'requires access token' : 'invalid access token';\n }\n return res.status(err).send(utils.fail(errMsg));\n }\n req.user = info;\n return next();\n });\n}", "function addUserToLocals(req, res, next) {\n res.locals.user = req.user;\n next();\n}", "async bringUser(req,res){\n //función controladora con la lógica que muestra los usuarios\n }", "function attachUser () {\n return function (req, res, next) {\n if (req.session) {\n if (req.session.idToken) {\n // We have an id_token, let's check if it's still valid\n const decoded = jwt.decode(req.session.idToken)\n if (assertAlive(decoded)) {\n req.session.user_id = decoded.sub\n req.session.user = decoded.preferred_username\n req.session.user_picture = decoded.picture\n return next()\n } else {\n // no longer alive, let's flush the session\n req.session.destroy(function (err) {\n if (err) next(err)\n return next()\n })\n }\n }\n }\n next()\n }\n}", "function getUser( req ) { // : { id: string, requests: int, path: string }\n var requests = usersGetRequests(req.session.userid);\n if (requests >= limits.requestsPerUser) throw { httpCode: 429, message: \"too many requests from this user\" } ;\n\n return {\n id: req.session.userid,\n requests: requests,\n path: combine(runDir, createHash(req.session.userid) + \"-\" + uniqueHash()),\n };\n}", "read(req, res) {\n\t\t\tif(req.user === USER_NOT_FOUND) {\n\t\t\t\treturn res.sendStatus(404);\n\t\t\t}\n\t\t\tres.json(req.user);\n\t\t}", "function load_user() {\n // get user id from local storage\n const localStorageCurrentUserId = localStorage.getItem(\"currentUserId\");\n\n // make a REST HTTP request for all users using the app\n const request = new XMLHttpRequest();\n request.open('GET', `/users`);\n request.onload = () => {\n const allAppUsers = JSON.parse(request.responseText);\n\n // if there is a locally stored user and that user is in the servers list of current users...\n if (localStorageCurrentUserId && (allAppUsers.find((user) => user.id === localStorageCurrentUserId))) {\n\n // store that user as the apps currentUser and update the DOM accordingly\n currentUserId = localStorageCurrentUserId;\n selectors.displayNameModalTextField.val(allAppUsers.find((user) => user.id === localStorageCurrentUserId).displayName);\n selectors.displayNameModal.modal('hide');\n } else {\n // else reveal the display name modal (the locally stored user isn't there or is invalid)\n selectors.displayNameModal.modal('show');\n }\n };\n request.setRequestHeader(\"Content-Type\", \"application/json;charset=UTF-8\");\n request.send();\n}", "async function getUser(req, res, next) {\n\tlet user;\n\ttry {\n\t\tuser = await User.findById(req.params.userid);\n\t} catch (err) {\n\t\treturn res.status(404).send(err.message);\n\t}\n\tres.user = user;\n\tnext();\n}", "static async ensureAuthenticated(req, res, next) {\n // Check the user based on API.\n const apiKey = req.get(\"user-api\") || req.body[0]?.user_api;\n const userId = req.get(\"user-id\") || req.body[0]?.user_id;\n if (apiKey && userId) {\n let sqlQuery = \"SELECT * FROM user WHERE id = ?\";\n const ourUser = await db.query(sqlQuery, userId);\n if (ourUser.length > 0) {\n let uncDb = await Utils.decrypt(ourUser[0].api_key);\n if (uncDb == apiKey) {\n let curUser = {\n steam_id: ourUser[0].steam_id,\n name: ourUser[0].name,\n super_admin: ourUser[0].super_admin,\n admin: ourUser[0].admin,\n id: ourUser[0].id,\n small_image: ourUser[0].small_image,\n medium_image: ourUser[0].medium_image,\n large_image: ourUser[0].large_image,\n };\n req.user = curUser;\n return next();\n }\n }\n }\n if (req.isAuthenticated()) {\n return next();\n }\n res.redirect(\"auth/steam\");\n }", "function req_read_user_auth(env) {\n var data = http.req_body(env).user;\n set_user_email(env, data.user_email);\n set_user_password(env, data.user_password);\n}", "function userLoggedInAdvanced (req, res, next) {\n // first check if we have HTTP Basic Auth\n const auth = basicAuth(req)\n // changed var to let because heroku still doesn't support let\n var userEmail, authToken\n if (auth) {\n userEmail = auth.name\n authToken = auth.pass\n } else {\n // else we just look in the http header or body or params\n userEmail = req.get('User-Email') || req.body.user_email || req.query.user_email\n authToken = req.get('Auth-Token') || req.body.auth_token || req.query.auth_token\n }\n\n console.log(auth)\n if (!userEmail || !authToken) return res.status(401).json({error: 'unauthorised'})\n\n User.findOne({email: userEmail, auth_token: authToken}, (err, user) => {\n if (err || !user) return res.status(401).json({error: 'unauthorised'})\n\n req.currentUser = user\n next()\n })\n}", "function readUserFromSession(req, res) {\n res.send(req.session ? req.session.appUser : {});\n }", "function getReqUser(req, res) {\n var userId = req.params.id;\n var query = RequestLoan.find({ user: userId });\n query.populate({ path: 'resource' }).exec(function (err, requests) {\n if (err) {\n res.status(500).send({ message: \"Ocurrió un error interno, comuniquese con el servidor\" });\n } else {\n if (!requests) {\n res.status(404).send({ message: \"No se encontrarón préstamos\" });\n } else {\n res.status(200).send({ requests });\n }\n }\n });\n}", "function getUserFromRec2(req) {\n const user = {\n credito_: req.body.credito_\n };\n return user;\n}", "function loadFieldsInUser(userDB, res) {\n var token = jwt.sign({ user: userDB }, SECRET_KEY, { expiresIn: 14400 });//4hours\n\n res.status(200).json({\n ok: true,\n user: userDB,\n token: token,\n id: userDB._id,\n menu: getMenu(userDB.role)\n });\n}", "async fetchUser(){\n\t\treturn res.status(200).send({\n\t\t\tmessage: 'Successful Operation',\n\t\t\tuser: req.user\n\t\t})\n\t}", "function getUserFromRec(req) {\n const user = {\n nombre: req.body.nombre,\n apellido: req.body.apellido,\n clave: req.body.clave,\n correo: req.body.correo,\n };\n return user;\n}", "function userMiddleware(req, res, next) {\n const user_id = req.session.user_id;\n if (user_id) {\n req.user = users[user_id];\n res.locals.user = req.user; //locals makes the variable available in templates\n }\n //if there was a corresponding user object make it true if there wasn't anything or undefined make it false.\n req.isAuthenticated = !!req.user;\n res.locals.isAuthenticated = req.isAuthenticated;\n\n next();\n}", "function getMe(req, res) {\n res.json(req.user);\n}", "function userid(req, res, next) {\n var user = {};\n user.userid = req.params.userid;\n user.authorization = req.headers.authorization;\n\n res.setHeader('Access-Control-Allow-Origin', '*');\n\n users.save(user, function (err, success) {\n console.log('Response success ' + success);\n console.log('Response error ' + err);\n if (success) {\n console.log((new Date()) + ' User login: ' + JSON.stringify(user));\n res.send(200, \"\");\n return next();\n } else {\n return next(err);\n }\n });\n}", "function loadUser(){\n let userLogged = JSON.parse(localStorage.getItem(\"userLogged\"))\n setUser(userLogged)\n }", "function showUser(req,res){\n console.log(\"individual user requested\");\n\n var token = req.cookies.token || req.body.token || req.param('token') || req.headers['x-access-token'];\n var decodedInfo;\n\n if(token){\n\n //VERIFY SECRET AND CHECK TOKEN EXPIRATION:\n jwt.verify(token, superSecret, function(err, decoded){\n if(err){\n res.status(403).send({success: false, message: 'failed to authen token'});\n } else {\n //IF TOKEN IS VALID AND ACTIVE, SAVE FOR OTHER ROUTES TO USE:\n req.decoded = decoded;\n decodedInfo = decoded;\n }\n\n //FIND USER AND SHOW INFO:\n User.findOne({email: decodedInfo.email}, function(err, user){\n if(err) res.send(err);\n console.log(user);\n res.json(user);\n });\n }); //CLOSE TOKEN VALIDATION CHECK\n } //CLOSE TOKEN CHECK\n} //CLOSE SHOW USER FUNCTION", "async loadUser({ commit, dispatch }) {\n let user = await dispatch(\"getUser\");\n if (user) {\n commit(\"setUser\", user);\n }\n }", "function getUser(req, res, next){\n db.users.findOne({_id: mongojs.ObjectId(req.params.id)}, {pass: 0, admin: 0, email:0}, function(err, user){\n if(err){\n return res.json({success: false, message: err});\n }\n else if(!user){\n return res.json({success: false, message: 'Invalid User'});\n }\n else{\n req.user = user;\n next();\n }\n })\n}", "function update(req, res, next) {\r\n\r\n // console.log( 'USER IS ', req.user ); // eslint-disable-line no-console\r\n\r\n // clone the data from the request user ...\r\n const user = Object.assign({}, req.user);\r\n\r\n // copy the passed in data into a local object\r\n const data = Object.assign({}, req.body.user);\r\n\r\n // clean up some of he stuff\r\n delete user._id;\r\n\r\n // if ( user._id === data._id ) {\r\n // Allowed to do this ....\r\n // }\r\n\r\n // get the email address\r\n\r\n res.json(user);\r\n\r\n // NEED A CHECK in MIDDLEWARE .....\r\n // const id = req.user._id;\r\n\r\n // Users.findOne({ _id:id }, (err,user) => {\r\n // if (err) {\r\n // next(err);\r\n // }\r\n // res.json(user);\r\n // });\r\n }", "function userMiddleware({ user }, { locals }, next) {\n // eslint-disable-next-line no-param-reassign\n locals.user = user;\n next();\n}", "function resolve_user_from_locals_token(request, callback){\n user_controller.findUser(request.locals.authenticated_user.id, request.locals.authenticated_user.is_admin, function(data){\n callback(data);\n });\n}", "static isAuthenticatedAsUser (req, res, next) {\n try {\n const jwtToken = AuthorizationUtil._extractToken(req)\n\n const jwtPayload = AuthorizationUtil.extractJWTInformation(jwtToken)\n // so you can use get user who made the request in the endpoint\n // since it will receive the same req object\n req.user = new User(jwtPayload.userId, jwtPayload.username)\n return next()\n } catch (ignored) {\n return ApiResponse.sendErrorApiResponse(403, 'Not authenticated', res)\n }\n }", "function loadCurrentUser() {\n UserService.GetCurrentUser()\n .then(function (response) {\n vm.user = response.data;\n });\n }", "function requireAuth (to, from, next) {\n\t/*\n\t\tDetermines where we should send the user.\n\t*/\n\tfunction proceed () {\n\t\t/*\n\t\t\tIf the user has been loaded determine where we should\n\t\t\tsend the user.\n\t\t*/\n if ( store.getters.getUserLoadStatus() == 2 ) {\n\t\t\t/*\n\t\t\t\tIf the user is not empty, that means there's a user\n\t\t\t\tauthenticated we allow them to continue. Otherwise, we\n\t\t\t\tsend the user back to the home page.\n\t\t\t*/\n\t\t\tif( store.getters.getUser != '' ){\n \tnext();\n\t\t\t}else{\n\t\t\t\tnext('/cafes');\n\t\t\t}\n }\n\t}\n\n\t/*\n\t\tConfirms the user has been loaded\n\t*/\n\tif ( store.getters.getUserLoadStatus != 2 ) {\n\t\t/*\n\t\t\tIf not, load the user\n\t\t*/\n\t\tstore.dispatch( 'loadUser' );\n\n\t\t/*\n\t\t\tWatch for the user to be loaded. When it's finished, then\n\t\t\twe proceed.\n\t\t*/\n\t\tstore.watch( store.getters.getUserLoadStatus, function(){\n\t\t\tif( store.getters.getUserLoadStatus() == 2 ){\n\t\t\t\tproceed();\n\t\t\t}\n\t\t});\n\t} else {\n\t\t/*\n\t\t\tUser call completed, so we proceed\n\t\t*/\n\t\tproceed()\n\t}\n}", "function loadUser() {\n try {\n return (\n jsonParse(localStorage.getItem(userKey) || sessionStorage.getItem(userKey) || '{}') || {}\n );\n } catch (e) {\n return {};\n }\n}", "function getUser(app){\n\treturn function(req, res){\n\t\tconst id = req.params.id;\n\t\tif(typeof id === 'undefined'){\n\t\t\tres.sendStatus(BAD_REQUEST);\n\t\t}\n\t\telse{\n\t\t\treq.app.locals.model.users.getUser(id).\n\t\t\t\tthen((results) => res.json(results)).\n\t\t\t\tcatch((err) => {\n\t\t\t\t\tconsole.error(err);\n\t\t\t\t\tres.sendStatus(NOT_FOUND);\n\t\t\t\t});\n\t\t}\n\t};\n}", "async getUser(req, res, next) {\n try {\n let user = await this.controller.getUser(req.params.uid)\n if (user === null) {\n return res.status(httpStatus.NOT_FOUND)\n } else {\n return res.status(httpStatus.OK).json(user)\n }\n } catch (e) {\n next(e)\n }\n }", "function setUser(req, res, next) {\n if (!req.cookies) { return next(); }\n var token = req.cookies['access_token'];\n var expires = moment(req.cookies['expires']);\n if (token && expires) {\n OAuthAccessTokensModel.findOne({ accessToken: token, clientId: _clientId }, function(err, result) {\n if (!err && result) {\n req.username = result.userId;\n req.accessToken = token;\n }\n next();\n });\n }\n else { return next(); }\n}", "async function getUser(req, res, next) {\n const user = models.user.findOne({ where: { id: req.params.id } })\n req.data = res.json(user)\n}", "function api_getuser(ctx) {\n api_req({\n a: 'ug'\n }, ctx);\n}", "function handleRootRequest(req, res) {\n var domain = checkUserIpAddress(req, res);\n if (domain == null) return;\n if (!obj.args) { res.sendStatus(500); return; }\n var domain = getDomain(req);\n res.set({ 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0' });\n // Check if we have an incomplete domain name in the path\n if (domain.id != '' && req.url.split('/').length == 2) { res.redirect(domain.url); return; }\n if (obj.args.nousers == true) {\n // If in single user mode, setup things here.\n if (req.session && req.session.loginmode) { delete req.session.loginmode; }\n req.session.userid = 'user/' + domain.id + '/~';\n req.session.domainid = domain.id;\n req.session.currentNode = '';\n if (obj.users[req.session.userid] == null) {\n // Create the dummy user ~ with impossible password\n obj.users[req.session.userid] = { type: 'user', _id: req.session.userid, name: '~', email: '~', domain: domain.id, siteadmin: 0xFFFFFFFF };\n obj.db.SetUser(obj.users[req.session.userid]);\n }\n } else if (obj.args.user && (!req.session || !req.session.userid) && obj.users['user/' + domain.id + '/' + obj.args.user.toLowerCase()]) {\n // If a default user is active, setup the session here.\n if (req.session && req.session.loginmode) { delete req.session.loginmode; }\n req.session.userid = 'user/' + domain.id + '/' + obj.args.user.toLowerCase();\n req.session.domainid = domain.id;\n req.session.currentNode = '';\n }\n // If a user is logged in, serve the default app, otherwise server the login app.\n if (req.session && req.session.userid) {\n if (req.session.domainid != domain.id) { req.session.destroy(function () { res.redirect(domain.url); }); return; } // Check is the session is for the correct domain\n var viewmode = 1;\n if (req.session.viewmode) {\n viewmode = req.session.viewmode;\n delete req.session.viewmode;\n }\n var currentNode = '';\n if (req.session.currentNode) {\n currentNode = req.session.currentNode;\n delete req.session.currentNode;\n }\n var user;\n var logoutcontrol;\n if (obj.args.nousers != true) {\n user = obj.users[req.session.userid]\n logoutcontrol = 'Welcome ' + user.name + '.';\n }\n var features = 0;\n if (obj.args.wanonly == true) { features += 1; } // WAN-only mode\n if (obj.args.lanonly == true) { features += 2; } // LAN-only mode\n if (obj.args.nousers == true) { features += 4; } // Single user mode\n if (domain.userQuota == -1) { features += 8; } // No server files mode\n if (obj.args.tlsoffload == true) { features += 16; } // No mutual-auth CIRA\n if ((!obj.args.user) && (obj.args.nousers != true)) { logoutcontrol += ' <a href=' + domain.url + 'logout?' + Math.random() + ' style=color:white>Logout</a>'; } // If a default user is in use or no user mode, don't display the logout button\n res.render(obj.path.join(__dirname, 'views/default'), { viewmode: viewmode, currentNode: currentNode, logoutControl: logoutcontrol, title: domain.title, title2: domain.title2, domainurl: domain.url, domain: domain.id, debuglevel: parent.debugLevel, serverDnsName: obj.certificates.CommonName, serverPublicPort: args.port, noServerBackup: (args.noserverbackup == 1 ? 1 : 0), features: features, mpspass: args.mpspass });\n } else {\n // Send back the login application\n res.render(obj.path.join(__dirname, 'views/login'), { loginmode: req.session.loginmode, rootCertLink: getRootCertLink(), title: domain.title, title2: domain.title2, newAccount: domain.newaccounts, newAccountPass: (((domain.newaccountspass == null) || (domain.newaccountspass == ''))?0:1), serverDnsName: obj.certificates.CommonName, serverPublicPort: obj.args.port });\n }\n }", "function load_userObj(data) {\n userObj.id = data.id;\n userObj.email = data.email;\n userObj.nick = data.nick;\n userObj.name = data.name;\n userObj.role = data.role;\n}", "function authUser(req, res, next) {\n try {\n const token = req.headers.authorization.split(' ')[1];\n //Si el token es valido, la variable user tiene el objeto guardado en el /auth\n const user = jsonwebtoken.verify(token, process.env.SECRET);\n if (user) {\n req.user = user;// El objeto de user se guarda en el request que comparte la funcion\n return next();\n }\n } catch(err){\n res.status(400).send({message:'Error validating user.', error: err}); \n }\n}", "async function getSingleUser(req, res) {\n req.profile.hash_password = undefined;\n req.profile.salt = undefined;\n return res.status(200).json(req.profile);\n}", "function getUser () {return user;}", "_findAndSetUser(request, callback) {\n const {userId} = request.session;\n if (!userId) {\n // Session is new, no user is specified. Pass the request as it is.\n callback(null);\n } else {\n async.waterfall([\n (callback) => this.services.users.find(userId, callback),\n (user, callback) => {\n request.user = user;\n callback(null);\n }\n ], callback);\n }\n }", "async function loadUser(ctx, next){\n try{\n //await va a detener la ejecucion del proceso hasta que se cumpla la promesa fetch('/api/pictures')\n ctx.user = await fetch(`api/user/${ctx.params.username}`)\n //es una arrow function es lo mismo que .then(function (res){return res.json()})\n .then(res => res.json());\n //llama el siguiente milways\n next();\n }\n catch (err){\n console.log(err);\n }\n}", "function validateUser(req, res, next) {\n jwt.verify(req.headers['x-access-token'], req.app.get('secretKey'), function(err, decoded) {\n if (err) {\n res.json({status:\"error\", message: err.message, data:null});\n }else{\n // add user id to request\n req.body.userId = decoded.id;\n next();\n }\n });\n \n}", "function addUser(req, res) {\n global.logger.info(\"Received POST request: \" + JSON.stringify(req.body));\n res.status(200).send({\n added: true\n });\n}", "function ensureUser(req, res, next){\n ensureToken(req, res, (token)=>{\n User.findOne({ token: token }, (err, user) => {\n if (err) {\n res.json( { success: false, message: String(err) });\n } else {\n next(user);\n }\n });\n });\n}", "function optionalAuth(req, res, next) {\n if (req.isAuthenticated()) {\n res.locals.user = req.user;\n }\n return next();\n}", "function putUser(req, res) {\n\tvar user = req.body.username;\n\tvar pass = req.body.password;\n\tvar date = new Date().toISOString().slice(0, 10);\n\tvar last = req.session.uid;\n\tif (req.body.usertype == 'Admin') {\n\t\tvar userType = 1;\n\t} else if (req.body.usertype == 'User') {\n\t\tvar userType = 2;\n\t}\n\n\tbcrypt.hash(pass, saltRounds, function(err, hash) {\n\t\tvar query = {\n\t\t\ttext: 'INSERT INTO users(username, password, user_type, date_entered, last_update) VALUES ($1, $2, $3, $4, $5)',\n\t\t\tvalues: [user, hash, userType, date, last]\n\t\t}\n\n\t\tmodel.pullData(query, (rows) => {\n\t\t\tconsole.log(rows);\n\t\t});\n\t});\n}", "function getCurrentUser(req, res) {\n // I'm picking only the specific fields its OK for the audience to see publicly\n // never send the whole user object in the response, and only show things it's OK\n // for others to read (like ID, name, email address, etc.)\n const { id, username } = req.user;\n res.json({\n id, username\n });\n}", "function req_read_new_user_name(env) {\n var data = http.req_body(env).user;\n set_new_user_name(\n env,\n data.user_name_title,\n data.user_name_first,\n data.user_name_initial,\n data.user_name_last\n )\n}", "function prepUser (body) {\n return {\n username: body.username,\n password: body.password,\n email: body.email,\n role: body.role\n }\n}", "function getUser(req, res) {\n User.findById(req.params.id, function (err, user) {\n if (err) return res.status(500).send(\"There was a problem finding the user.\");\n if (!user) return res.status(404).send(\"No user found.\");\n res.status(200).send(user);\n });\n}", "async addUser(ctx) {\n try {\n var body = ctx.request.body;\n var user = new User();\n user.name = body.name;\n user.email = body.email;\n user.save();\n ctx.body = { status: 200, message: \"data save \", user: user }\n }\n catch (error) {\n ctx.throw(error)\n }\n }", "function loadUserTasks(req, res, next) {\n if (!res.locals.currentUser) {\n return next();\n }\n Tasks.find({}).or([\n {owner:res.locals.currentUser},\n {collaborators: res.locals.currentUser.email}])\n .exec (function(err, tasks) {\n if (!err) {\n res.locals.tasks = tasks;\n }\n next();\n });\n}", "function addUser(req, res){ \t// request, response\n\treq.session.user = { \t// pushed onderstaande ingevulde data in req.session.user, zonder session, is het altijd geldig\n\t\temail: req.body.email,\n\t\tid: req.body.userName,\n\t\tpassword: req.body.password\n\t};\n\tconsole.log(req.session.user); \t// laat in de terminal de ingevulde gegevens zien\n\tres.redirect('voornaam/' + req.body.userName); \t// dit is de route + de unieke id (username)\n}", "function getUser (req, res) {\n promiseResponse(userStore.findOne({ userId: req.params.id }), res);\n}", "function req_read_user_name(env) {\n var data = http.req_body(env).user;\n set_user_name(\n env,\n data.user_name_title,\n data.user_name_first,\n data.user_name_initial,\n data.user_name_last\n )\n}", "async loadUser () {\n const token = getLocalStorage('token');\n\n // if (token && !this.token) {\n // this.token = token\n // }\n\n if (token && !this.user) {\n try {\n const user = await this.getUser();\n this.user = user\n } catch (e) {\n console.error(e)\n signout()\n }\n }\n\n // const authSuccess = !!this.user && !!this.token;\n\n return this.user;\n }", "function validateUserId(req, res, next) {\n const { id } = req.params;\n console.log(\"This is id in validateUserId(): \", id);\n Users.getById(id)\n .then(userFound => {\n console.log(\"This is userFound in validateUserId(): \", userFound);\n if (userFound && userFound !== undefined) {\n req.user = userFound;\n console.log(\"This is req.user in validateUserId(): \", req.user);\n next();\n } else {\n res.status(400).json({ error: \"This user doesn't exist\" });\n }\n })\n .catch(error => {\n console.log(\"This is error in validateUserId(): \", error);\n res.status(500).json({ error: \"Error validating user ID\" });\n });\n}", "function getauth(req,res,next){\n const authToken = req.headers[\"authtoken\"];\n jwt.verify(authToken,SECRET_KEY,(err,user)=>{\n if(err){\n res.status(400).send(\"Un Authrised.\")\n }\n else{\n req.userid = user.id;\n next();\n }\n })\n}", "function cb(err){\n res.locals.user = req.session.user;\n res.redirect('/');\n }", "function loadUserTasks(req, res, next) {\n if(!res.locals.currentUser){\n return next();\n }\n Tasks.find({}).or([\n {owner: res.locals.currentUser},\n {collaborators: res.locals.currentUser.email}])\n .exec(function(err, tasks){\n if(!err){\n res.locals.tasks = tasks;\n }\n next();\n });\n}", "async function getUser(req, res, next) {\n let user;\n try {\n user = await User.findById(req.params.id);\n if (user === null)\n return res.status(404).json({ message: \"Cannot find user\" });\n } catch (error) {\n return res.status(500).json({ message: error.message });\n }\n res.user = user;\n next();\n}", "async getUser (req, res) {\n const findOneUserQuery = `\n SELECT avatar, firstname, lastname, email, username, location, bio\n FROM users\n WHERE username = $1\n `;\n\n try {\n\n // A user must be signed in to see edit information\n // Signed in user must also be requesting their own user data.\n if (!req.user || req.user.username !== req.params.username) {\n return res.status(403).send('You\\'re not allowed to edit this profile');\n }\n\n const { rows } = await db.query(findOneUserQuery, [ req.params.username ]);\n const profileUser = rows[0];\n\n // If profile user was not found in database\n if (!profileUser) {\n return res.status(404).send('User not found');\n }\n\n return res.status(200).json({ profileUser });\n } catch (error) {\n return res.status(400).send(error);\n }\n }", "async function buildReq({ user, ...overrides } = {}) {\n const req = { user, body: {}, params: {}, ...overrides };\n return req;\n}", "async function getUser(req, res, next){\r\n let user\r\n try {\r\n let id = req.params.id\r\n user = await User.findById(id);\r\n if (user == null) return res.status(404).json({message: \"cannot find user\"})\r\n } catch (error) {\r\n return res.status(500).json({message: error.message})\r\n }\r\n\r\n res.user = user;\r\n next();\r\n}", "function api_getUser(req, res, next) {\n\t// call our internal db to get user profile\n\tuid = req.params.uid;\n\n\tconsole.log('uid ' + uid);\n\t// Retrieve\n\tvar MongoClient = require('mongodb').MongoClient;\n\n\t// Connect to the db\n\tMongoClient.connect(\"mongodb://localhost:27017/soybean\", function(err, db) {\n\t\tconsole.log('connecting to mongdb..');\n\t \tif(err) {\n\t \t \tconsole.log(\"fail to connect to mongdb\");\n\t \t\treturn console.dir(err); \n\t \t}\n\n\t \tvar collection = db.collection('profiles');\n\n\t\tcollection.find({'uid': uid}).toArray(function(err, items) {\n\t\t\tconsole.log(items);\n\t\t\tvar doc = items[0];\n\t\t\tconsole.log(doc);\n\t\t\t//res.send( doc );\n\n\t\t\tvar page = fs.readFileSync('./WebContent/profile.html');\n\t\t\tconsole.log(page);\n\t\t\tvar document = jsdom.jsdom(page);\n\t var window = document.createWindow();\n\t jsdom.jQueryify(window, './js/libs/jquery.js', function() {\n\t\t //window.$('html').html(page);\n\t \tconsole.log('in jsdom ' + window.$('html').html());\n //window.$('h2').html(\"Content Added to DOM by Node.js Server\");\n //for (var i=0; i < products.length; i++) {\n //productSummaryHtml = mustache.to_html(productSummaryTemplate, products[i]);\n console.log('doc email' + doc.email);\n window.$('#profile').append(\"<label>\" + doc.email +\"</label>\");\n //}\n res.writeHead(200, {'Content-Type': 'text/html'});\n res.end(\"<!DOCTYPE html>\\n\" + window.$('html').html());\t\n console.log(window.$('html').text());\n\t });\n\t\t\t//res.writeHeader(200, {\"Content-Type\": \"text/html\"}); \n\t\t\t//res.write(html);\n\t\t});\n\n\t});\n}", "function loadUserDetails() {\n loadJSON('backend/resources/json/user.json', function(response) {\n actual_JSON = JSON.parse(response);\n globalId = actual_JSON.passkey;\n onValidate();\n });\n}", "function fillUpUserObj() {\n fs.readFile('users.json', function (err, data) {\n if (!err) {\n try {\n userObj = JSON.parse(data);\n } catch (e) {\n console.error(e);\n }\n }\n });\n}", "function getUserFromRec2(req) {\n const user = {\n estado_: req.body.estado_\n };\n return user;\n}", "function parseToken(req, res, next) {\r\n\tconst token = getToken(req.headers);\r\n\tlet resp = {};\r\n\ttry {\r\n\t\tlet decoded = jwt.verify(token, SECRET_KEY);\r\n\t\treq.userid = decoded.userid;\r\n\t\tnext();\r\n\t} catch (err) {\r\n\t\tresp.code = 500;\r\n\t\tresp.message = err;\r\n\t\tres.status(500).send(resp)\r\n\t}\r\n\t\r\n}", "function userDetails(req, res, next){\n twitter.get('users/show', {screen_name: username}, function(error, data, response){\n twitterDetails['id'] = data.id;\n twitterDetails['name'] = data.name;\n twitterDetails['friends_count'] = data.friends_count;\n twitterDetails['profile_background_image_url'] = data.profile_background_image_url;\n twitterDetails['profile_image_url'] = data.profile_image_url;\n next();\n });\n}", "function globalViewData(req, res, next) {\n res.ViewData = res.ViewData || {};\n res.ViewData.username = \"\"; \n if (req.session.user) {\n res.ViewData.username = req.session.user.username;\n }\n next();\n }", "function create(req, res, next) {\n console.log(req.currentUser)\n console.log(req.body)\n req.body.user = req.currentUser //attaching a user key to the body, making it values currentUser from secureRoute\n Legend\n .create(req.body)\n .then(legend => res.status(201).json(legend))\n .catch(next)\n}", "async getUser(ctx) {\n\n try {\n const _id = ctx.request.params.id;\n const userData = await User.findById(_id);\n console.log(userData);\n if (!userData) {\n return ctx.body;\n }\n else {\n ctx.body = { userData };\n }\n }\n catch (error) {\n ctx.throw(error);\n }\n }", "function getUser(req, res, next) {\n User.findOne({_id: req.params.id}, function (err, user) {\n if (err) {\n return res.status(400).send(err);\n } else if (user == null) {\n return res.status(404).send({});\n } else {\n return res.status(200).send(user);\n }\n });\n}", "user({user_id}, _, {loaders: {Users}, user}) {\n if (user && (user.hasRole('ADMIN') || user_id === user.id)) {\n return Users.getByID.load(user_id);\n }\n }", "function addUsertoUser(saveTheUser) {\n $.ajax({\n method: \"PUT\",\n url: \"/api/user_data\",\n data: saveTheUser\n }).then(getUserAndSavedUsers())\n}" ]
[ "0.7231059", "0.71140105", "0.69069964", "0.6899686", "0.6899686", "0.6899686", "0.6892056", "0.68401", "0.6833907", "0.68269306", "0.6702646", "0.66035783", "0.65964496", "0.6462951", "0.6237058", "0.62016886", "0.6200355", "0.6180543", "0.6146391", "0.6130654", "0.6112877", "0.6010211", "0.5971812", "0.59604216", "0.5956959", "0.5946114", "0.5919398", "0.5871396", "0.586269", "0.58398587", "0.580322", "0.5746744", "0.57458085", "0.5734359", "0.57155746", "0.5693083", "0.5690935", "0.5689384", "0.56710374", "0.56618583", "0.56076336", "0.55966884", "0.5577792", "0.5572258", "0.5555928", "0.5552413", "0.55501395", "0.55386406", "0.5533008", "0.5529157", "0.5524746", "0.5522309", "0.55182934", "0.55173475", "0.5486544", "0.54590833", "0.5454659", "0.5426325", "0.54227954", "0.54206395", "0.5388782", "0.53881574", "0.5383285", "0.53782725", "0.5374263", "0.53701895", "0.53553534", "0.53491026", "0.53488666", "0.5348203", "0.5344581", "0.5338074", "0.53297186", "0.5324993", "0.5322679", "0.5304132", "0.5297157", "0.52951276", "0.5292794", "0.52913797", "0.52892375", "0.52884585", "0.5286323", "0.52858114", "0.5285532", "0.5284173", "0.5281064", "0.5280448", "0.52782893", "0.527006", "0.52653486", "0.5264981", "0.5258246", "0.5257966", "0.52569026", "0.5247478", "0.5242375", "0.52312577", "0.5230486", "0.5228978" ]
0.69190633
2
This function calls when user clicks on submit button On submit validation
function webAccessFilterValidation () { var txtValidArray = new Array(); txtValidArray[0] = "tf1_webAccName,"+LANG_LOCALE['12064']; txtValidArray[1] = "tf1_singleIpAddr,"+LANG_LOCALE['30345']; if (txtFieldArrayCheck(txtValidArray) == false) return false; if (alphaNumericValueCheck ("tf1_webAccName", '', '') == false) return false; if (ipv4Validate('tf1_singleIpAddr', 'IP', false, true, LANG_LOCALE['11281'], LANG_LOCALE['11031'], true) == false) return false; setHiddenChks('tf1_frmWebAccFilterConfig'); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateAndSubmit() {\r\n var isValid = false;\r\n isValid = validateForm();\r\n if (isValid == true) {\r\n disableButtons() // make sure you can only press the submit button once\r\n document.getElementById('evaluationForm').submit();\r\n }\r\n }", "function submit(){\n if(verifyFields()){\n alert(\"Submitted\");\n } else {\n alert(\"Please fill out all fields!!\");\n }\n}", "function f_submit()\n{\n var message = \"\";\n for(var i=0 ; i < this.elements.length ; i++) {\n\tif ( this.elements[i].validationset ) {\n\t var txt = this.elements[i].validationset.run();\n\t if ( txt.length > 0 ) {\n\t\tif ( message.length > 0 ) {\n\t\t message += \"\\n\";\n\t\t}\n\t\tmessage += txt;\n\t }\n\t}\n }\n if(this.uservalidator) {\n\tstr =\" var ret = \"+this.uservalidator+\"()\";\n\teval(str);\n\tif ( ret.length > 0 ) {\n\t if ( message.length > 0 ) {\n\t\tmessage += \"\\n\";\n\t }\n\t message += txt;\n\t}\n }\n if ( message.length > 0 ) {\n\talert(\"Input Validation Errors Occurred:\\n\\n\" + message);\n\treturn false;\n } else {\n\treturn true;\n }\n}", "function submit() {\n\t\tvar $form = $(this).closest('form');\n\t\tif (validate($form)) {\n\t\t\tif(true){\n\t\t\t\tsend($form);\n\t\t\t} else {\n\t\t\t\tshakeButton(this);\n\t\t\t}\n\t\t}\n\t}", "validateOnSubmit(e) {\n // validate the entire form\n return this.runValidation(false);\n }", "function submitButtonPressed()\n{\n if(validateColumn())\n submit();\n \n}", "function registrationSubmit(){\r\n\r\n\tif (validateRegistrationName()&&validateEmail()&&validatePhone()&&validateDate()&&validateVisa()&&validatePass()) {\r\n\r\n\t\talert(\"validation sucessful \");\r\n\t\treturn true;\r\n\r\n\t}\r\n\talert(\"validation unsucessful\");\r\n\treturn false;\r\n}", "function submit() {\n if (vm.form.$valid) {\n console.log(\"SUBMIT\");\n }\n }", "submitError(){\n\t\tif(!this.isValid()){\n\t\t\tthis.showErrorMessage();\n\t\t}\n\t}", "function validation() {\r\n\t\t\r\n\t}", "submit() {\r\n\r\n this.inputsCheck();\r\n this.submitBtn.click(() => {\r\n this.pushToLocal();\r\n this.clearForm();\r\n\r\n })\r\n }", "function validateAndSubmitUsingFormMethodToCall(){\n validateAndSubmit(null, replacePage);\n}", "function doSubmit() {\n alert(\"This has been submitted\");\n }", "function onSubmitValidation(event) {\r\n var valid \t\t\t = true;\r\n var firstInvalidField = -1;\r\n var input \t\t\t = document.querySelectorAll(\"input\");\r\n\r\n for(var index = 0; index < input.length; index++) {\r\n\r\n var p = input[index].parentNode.parentNode.querySelector(\"p\");\r\n\r\n if (input[index].value.length == 0 && input[index].className == \"required\") {\r\n p.innerHTML = input[index].getAttribute(\"title\");\r\n input[index].style.backgroundColor = \"pink\";\r\n\r\n if (firstInvalidField == -1) {\r\n firstInvalidField = index;\r\n }\r\n }\r\n else {\r\n p.innerHTML = \"\";\r\n input[index].style.backgroundColor = \"white\";\r\n }\r\n }\r\n\r\n // Give focus to the first field in error\r\n if (firstInvalidField != -1) {\r\n input[firstInvalidField].focus();\r\n valid = false;\r\n }\r\n\r\n // Returning false cancels form submission\r\n return valid;\r\n}", "function onGrabarContacto(){\r\n\tif (validarContacto()) {\r\n\t\t$('form').submit();\r\n\t}\r\n}", "function validate(){\n\n\t\t//TODO: make this work\n\n\n\t}", "function handleSubmit(e) {\n e.preventDefault();\n\n // stateovi za errore\n // validacija\n }", "function enableSubmitButton() {\n show(\"validate\");\n hide(\"formIsUnvalide\");\n}", "function validation(ev) {\n ev.preventDefault();\n\n if (\n inputName.value.length > 1 &&\n inputJob.value.length > 1 &&\n inputEmail.value.length > 1 &&\n inputPhone.value.length > 1 &&\n inputLinkedin.value.length > 1 &&\n inputGithub.value.length > 1\n ) {\n textShare.classList.remove('hidden');\n formButton.classList.add('disabled');\n formButton.classList.remove('share__content__button');\n // imgButton.classList.add('img-disabled');\n // imgButton.classList.remove('action__upload-btn');\n } else {\n alert('No has introducido ningún dato');\n }\n\n sendRequest(formData);\n}", "function listenToSubmitButton() {\n $('#submitButton').on(\"click\", (e) => {\n e.preventDefault(); // Prevent the default submit button click action\n quizFormValidation(); // Call quizFormValidation()\n });\n}", "function submit_fillter(){\n\n\t}", "function catchSubmit(){\n\t\t\t// ensure that the submit button is enabled (if the page was refreshed when the button was disabled, some browsers remember it's disabled state)\n\t\t\tobjForm.find('input[type=submit]').removeAttr('disabled');\n\n\t\t\t// check if we are validating/submutting the form via ajax\n\t\t\tif((typeof formValidate == 'boolean') && (formValidate === true) && (typeof strFormID == 'string') && $.isArray(ruleList) && (ruleList.length > 0)){\n\t\t\t\t// we need to carry out Javascript form validation\n\n\t\t\t\t/**\n\t\t\t\t * Catch the submission of the form\n\t\t\t\t */\n\t\t\t\tobjForm.off('submit');\t// remove the current onsubmit event (if one exists)\n\t\t\t\tobjForm.on('submit', function(){\n\t\t\t\t\tvar errorList = {};\t// contains a list of errors\n\n\t\t\t\t\tif(hasErrorBox){\n\t\t\t\t\t\terrorBox.empty();\n\t\t\t\t\t}\n\t\t\t\t\tobjForm.find('input, textarea, select').removeClass(errorClass);\n\n\t\t\t\t\t// loop through the validation rules and check the input fields\n\t\t\t\t\t$.each(ruleList, function(i, e){\n\t\t\t\t\t\tvar objInput = objForm.find('input[name=' + e.field + '], textarea[name=' + e.field + '], select[name=' + e.field + ']'),\n\t\t\t\t\t\t\tbolIsSet = ((objInput.length > 0) && ($.trim(objInput.val()) != ''));\n\n\t\t\t\t\t\t$.each(e.rules.split('|'), function(i, rule){\n\t\t\t\t\t\t\trule = rule.toLowerCase();\n\t\t\t\t\t\t\tswitch(rule){\n\t\t\t\t\t\t\t\tcase 'required':\n\t\t\t\t\t\t\t\t\tif(!bolIsSet){\n\t\t\t\t\t\t\t\t\t\terrorList[e.field] = objLanguage.getLine('validation_required', e.label);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'valid_email':\n\t\t\t\t\t\t\t\t\tif(bolIsSet && !validation.isEmail(objInput.val())){\n\t\t\t\t\t\t\t\t\t\terrorList[e.field] = objLanguage.getLine('validation_email', e.label);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'valid_emails':\n\t\t\t\t\t\t\t\t\tif(bolIsSet && !validation.isEmails(objInput.val())){\n\t\t\t\t\t\t\t\t\t\terrorList[e.field] = objLanguage.getLine('validation_email', e.label);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'alpha':\n\t\t\t\t\t\t\t\t\tif(bolIsSet && !validation.isAlpha(objInput.val())){\n\t\t\t\t\t\t\t\t\t\terrorList[e.field] = objLanguage.getLine('validation_alpha', e.label);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'alpha_numeric':\n\t\t\t\t\t\t\t\t\tif(bolIsSet && !validation.isAlphaNumeric(objInput.val())){\n\t\t\t\t\t\t\t\t\t\terrorList[e.field] = objLanguage.getLine('validation_alpha_numeric', e.label);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'alpha_dash':\n\t\t\t\t\t\t\t\t\tif(bolIsSet && !validation.isAlphaDash(objInput.val())){\n\t\t\t\t\t\t\t\t\t\terrorList[e.field] = objLanguage.getLine('validation_alpha_dash', e.label);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'numeric':\n\t\t\t\t\t\t\t\t\tif(bolIsSet && !validation.isNumeric(objInput.val())){\n\t\t\t\t\t\t\t\t\t\terrorList[e.field] = objLanguage.getLine('validation_numeric', e.label);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'integer':\n\t\t\t\t\t\t\t\t\tif(bolIsSet && !validation.isInt(objInput.val())){\n\t\t\t\t\t\t\t\t\t\terrorList[e.field] = objLanguage.getLine('validation_integer', e.label);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'valid_ip':\n\t\t\t\t\t\t\t\t\tif(bolIsSet && !validation.isIP(objInput.val())){\n\t\t\t\t\t\t\t\t\t\terrorList[e.field] = objLanguage.getLine('validation_ip', e.label);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tvar matches = null;\n\t\t\t\t\t\t\t\t\tif((matches = rule.match(new RegExp(/^(min|max|exact)_length\\[([\\d]+)\\]$/))) !== null){\n\t\t\t\t\t\t\t\t\t\tif(bolIsSet && (((matches[1] == 'min') && (objInput.val().length < matches[2])) || ((matches[1] == 'max') && (objInput.val().length > matches[2])) || ((matches[1] == 'exact') && (objInput.val().length != matches[2])))){\n\t\t\t\t\t\t\t\t\t\t\terrorList[e.field] = objLanguage.getLine('validation_length', e.label, ((matches[1] == 'min') ? 'more than' : ((matches[1] == 'max') ? 'less than' : 'equal too')), matches[2]);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if((matches = rule.match(new RegExp(/^(greater|less)_than\\[([\\d]+)\\]$/))) !== null){\n\t\t\t\t\t\t\t\t\t\tif(bolIsSet && (!validation.isNumeric(objInput.val()) || (((matches[1] == 'greater') && (parseInt(objInput.val()) < matches[2])) || ((matches[1] == 'less') && (parseInt(objInput.val()) > matches[2]))))){\n\t\t\t\t\t\t\t\t\t\t\terrorList[e.field] = objLanguage.getLine('validation_numeric_value', e.label, ((matches[1] == 'greater') ? 'greater than' : 'less than'), matches[2]);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if((matches = rule.match(new RegExp(/^matches\\[([^\\]]+)\\]$/))) !== null){\n\t\t\t\t\t\t\t\t\t\tif(bolIsSet && !validation.isSame(objInput.val(), objForm.find('input[name=' + matches[1] + '], textarea[name=' + matches[1] + '], select[name=' + matches[1] + ']').val())){\n\t\t\t\t\t\t\t\t\t\t\terrorList[e.field] = objLanguage.getLine('validation_match', e.label, matches[1]);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\t\tif($.isEmptyObject(errorList)){\n\t\t\t\t\t\treturn (formCatch === true) ? submitForm() : true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tvar arrErrors = [];\n\t\t\t\t\t\t$.each(errorList, function(field, error){\n\t\t\t\t\t\t\tobjForm.find('input[name=' + field + '], textarea[name=' + field + '], select[name=' + field + ']').addClass(errorClass);\n\t\t\t\t\t\t\tarrErrors[arrErrors.length] = error;\n\t\t\t\t\t\t});\n\t\t\t\t\t\tdisplayErrors(arrErrors);\n\n\t\t\t\t\t\treloadCaptcha();\n\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}else if((typeof formCatch == 'boolean') && (formCatch === true) && (typeof strFormID == 'string')){\n\t\t\t\t// no form validation, but we are submitting the form via ajax\n\t\t\t\t$('#' + strFormID).on('submit', function(){\n\t\t\t\t\treturn submitForm();\n\t\t\t\t});\n\t\t\t}\n\t\t}", "function submit() {\n\t\t\t// make sure the form is submitted,\n\t\t\t$('#signUp').on('submit', function() {\n\t\t\t\t// and head to the dashboard state\n\t\t\t\t$state.go('dashboard');\n\t\t\t});\n\t\t}", "function submitPressed() {\n \n}", "preventSubmitUnlessValid() {\n }", "function validate(){\r\n validateFirstName();\r\n validateSubnames();\r\n validateDni();\r\n validateTelephone ();\r\n validateDate();\r\n validateEmail();\r\n if(validateFirstName() && validateSubnames() && validateDni() && validateTelephone() &&\r\n validateDate() && validateEmail()){\r\n alert(\"DATOS ENVIADOS CORRECTAMENTE\");\r\n form.submit(); \r\n }\r\n\r\n}", "function onSubmit(eventClick) {\n var dob = this.elements['birthdate'].value;\n var zipCode = this.elements['zip'].value;\n\n eventClick.returnValue = validateForm(this);\n\n //calculates if user is more than 13, if not form\n //will not submit\n try {\n calculateAge(dob);\n cancelMessage();\n } catch(exception) {\n displayError('You must be 13 or older to sign up');\n eventClick.returnValue = false;\n }\n\n try {\n testZip(zipCode);\n } catch(exception) {\n this.elements['zip'].className = 'form-control invalid-field';\n eventClick.returnValue = false;\n }\n\n if (!eventClick.returnValue && eventClick.preventDefault) {\n eventClick.preventDefault();\n }\n return eventClick.returnValue;\n}", "function submitdetails() {\n if ($(\"#formvalia\").validate()) {\n $(\"#formvalia\").submit();\n }\n }", "onSubmit() {\n this._submit.classList.add('button--disabled');\n location.reload();\n if (this.isValid())\n this.props.submit ? this.props.submit(this.form) : null;\n }", "function validate() {\n\t\t\n\t\tvar fname = $(\"#fname\").val();\n\t\tvar lname = $(\"#lname\").val();\n\t\t\n\t\tvar question = $(\"#resizable\").val();\n\t\tvar date = $(\"#datepicker\").val();\n\t\t\n\t\tif(fname == \"\") {\n\t\t\talert(\"Please enter first name\");\n\t\t}\n\t\t\n\t\telse if(lname == \"\") {\n\t\t\talert(\"Please enter last name\");\n\t\t}\n\t\t\n\t\telse if(question == \"\") {\n\t\t\talert(\"Please enter a question\");\n\t\t}\n\t\t\n\t\telse if(date == \"\") {\n\t\t\t\talert(\"Please select a date\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\talert(\"Submitted\");\n\t\t}\n\t}", "function submitForm(e) {\n const userDate = username.value.trim();\n const mailData = mail.value.trim();\n const passData = pass.value.trim();\n\n if (userDate === \"\") {\n inputChecker(username, \"enter you user name\", 1500);\n }\n if (mailData === \"\") {\n inputChecker(mail, \"enter you mail address\", 1500);\n }\n if (passData === \"\") {\n inputChecker(pass, \"enter you passeord\", 1500);\n }\n}", "onSubmitData() {\n if (this.state.email == '' || this.state.password == '')\n alert(\"Please fill out all fields!\");\n else if(this.state.email != '' && this.state.password != '' && this.validInput(this.state.email))\n Actions.reset('dashBoard'); // Navigate to dashBoard screen\n }", "function loginSubmit(){\n\tif( ($(\"#email-login\").hasClass('inputsuc') && $(\"#pass-login\").hasClass('inputsuc')) || ($(\"#email-login1\").hasClass('inputsuc') && $(\"#pass-login1\").hasClass('inputsuc')) ){\n\t\treturn true;\n\t}else{\n\t\tnullFieldValidation('email-login');\n\t\tnullFieldValidation('pass-login');\n\n\t\tnullFieldValidation('email-login1');\n\t\tnullFieldValidation('pass-login1');\n\t\treturn false;\n\t}\n}", "submit(e) {\n var $formValues = this.$form.children[1].children[1];\n\n function emptyValidation(value) {\n if (value === \"\") {\n return false\n }\n else {return true}\n }\n\n function validate() {\n if (\n emptyValidation($formValues.address.value) &&\n emptyValidation($formValues.city.value) &&\n emptyValidation($formValues.postcode.value) &&\n emptyValidation($formValues.phone.value) &&\n emptyValidation($formValues.data.value) &&\n emptyValidation($formValues.time.value)\n ) {\n return true\n } else {\n alert(\"Wszystkie pola muszą być wypełnione\");\n return false\n }\n }\n\n if (this.currentStep === 5) {\n if (validate()) {\n this.updateForm();\n } else {\n e.preventDefault();\n }\n } else {\n e.preventDefault();\n }\n }", "function submissionCheck(){\n\tif (emptyFormCheck()){\n\t\talert(\"Successful submission! All input is valid!\");\n\t}\n\telse{\n\t\talert(\"Error! A field is empty\");\n\t}\n}", "function validateForm() {\n return true;\n}", "function onsubmit(options) {\n var result = this.validate(document.getElementsByName(options));\n if (!result.pass) {\n alert(result.errorMessage);\n return false; // disable this to redirect to error page\n }\n return true;\n }", "function checkForm(){\n if(name_outcome && email_outcome && tel_outcome && msg_outcome){\n btn.disabled = false; //enable submit btn if form filled correctly\n }else{\n btn.disabled = true;\n }\n }", "function submitForm (isValid){\n // check to make sure the form is completely valid\n if (isValid) {\n alert('our form is valid');\n }\n else\n alert('our form is invalid');\n }", "onSubmit() {\n const {onSubmit,onError} = this.props;\n const {validateFields} = this.props.form;\n validateFields((errors,values)=>{\n\n if(errors){\n showMessage(getFirstError(errors));\n if(onError){\n onError(errors);\n }\n return;\n }\n if (onSubmit) {\n onSubmit(values);\n }\n });\n }", "function validate()\r\n{\r\n \r\n alert( \"Values entered successfully\" );\r\n}", "function onXareltoSubmit() {\n //first clear error element\n var t = document.getElementById(\"errorElement\");\n t.innerHTML=\"\";\n if (!validateName()) {\n displayFormErrors(\"name\");\n return false;\n } else if (!validateZipCode()){\n displayFormErrors(\"zip\");\n return false;\n } else if (!validateTelephone()){\n displayFormErrors(\"telephone\");\n return false;\n } else if (!validateEmail()) {\n displayFormErrors(\"email\");\n return false;\n } else if(!validateConsent()){\n displayFormErrors(\"consent\");\n return false;\n }\n return true;\n}", "function validateForm() {\n isFormValid = true;\n\n validateName();\n validateEmail();\n validateDemand();\n validateOptions();\n\n if (isFormValid) {\n submit.disabled = false;\n } else {\n submit.disabled = true;\n\n }\n}", "function submitForm(){\n checkRequired(formInputs);\n checkEmail(useremail);\n checkValidUsername(username);\n checkValidPassword(password, password2);\n}", "function activerBouttonValidation(){\n\t activerChamp(ID_BOUTON_VALIDER);\n\t $(ID_BOUTON_VALIDER).removeClass(\"disabled\");\n\t $(ID_BOUTON_VALIDER).click(function(){\n\t \tactiverChargementPage();\n\t \tsubmit();\n\t });\n }", "function validate_form(){\n if (is_form_valid(form)) {\n sendForm()\n }else {\n let $el = form.find(\".input:invalid\").first().parent()\n focus_step($el)\n }\n }", "function load()\n{\n\tdocument.getElementById(\"submit\").addEventListener(\"click\", validate);\n}", "function validateAndSubmit(methodToCall, successCallback){\n\tjq.watermark.hideAll();\n\n var validForm = true;\n if(validateClient){\n validForm = jq(\"#kualiForm\").valid();\n }\n\n\tif(validForm){\n\t\tjq.watermark.showAll();\n\t\tajaxSubmitForm(methodToCall, successCallback, null, null);\n\t}\n\telse{\n\t\tjq.watermark.showAll();\n\t\tjq(\"#formComplete\").html(\"\");\n\t\tjumpToTop();\n\t\talert(\"The form contains errors. Please correct these errors and try again.\");\n\t}\n}", "function execute () {\n// document.getElementById(\"message\").addEventListener(\"change\", cleanError);\n// document.getElementById(\"country\").addEventListener(\"change\", cleanError);\n// document.getElementById(\"email\").addEventListener(\"change\", cleanError);\n// document.getElementById(\"name\").addEventListener(\"change\", cleanError);\n document.getElementById(\"form\").addEventListener(\"submit\", validate);\n }", "function submitForm(event) {\n //console.log(\"hello\");\n\n //prevent the browser submitting the form\n event.preventDefault();\n\n //Validate all the fields\n if (!validPhoneNumber()) {\n //focus on the phone number input\n phoneElement.focus();\n } else if (!isCCNumValid()) {\n //focus on the credit card number input\n ccNumElement.focus();\n } else if (!isExpDateValid()) {\n //focus on the credit card's expiration date input\n ccNumElement.focus();\n } else {\n //Everything is valid, submit the form\n //console.log(\"Howdy\");\n formElement.submit();\n }\n\n\n}", "function onsubmitHandler(event) {\n event.preventDefault();\n\n let invalid = false;\n\n for (let i = 0; i < document.register_form.elements.length; ++i) {\n const element = document.register_form.elements[i];\n if (element.type === \"text\" && element.onchange) {\n element.onchange();\n if (element.classList.contains(\"invalid\")) {\n invalid = true;\n }\n }\n }\n\n if (invalid) {\n invalidFilling();\n } else {\n warning();\n }\n}", "function formValidation()\n {\n \n //Get Value\n //if user doesnt exist transfer to another page and ask details\n var email = document.getElementById('email').value.trim();\n var password = document.getElementById('password').value.trim();\n var isValidForm = true; \n // alert(email);\n\n //Validation Conditions here\n \n if (email.length < 1) {\n alert(\"Email is Required!\");\n \n } \n if(password.length < 1)\n alert(\"Password is Required!\");\n else\n signUpWithEmailPassword(email, password);\n \n //if isValidForm is true then form submits else submission is stopped\n \n }", "function validateForm() {\n validateFirstName();\n validateLastName();\n validateStreet();\n validateCity();\n validateZipCode();\n}", "function onSubmitBtnClick(firstNameId, lastNameId, emailId, phoneId, stateId, sourceCodeId) {\n $(\".kn-button\").on(\"click\", function () {\n formatForm(firstNameId, lastNameId, emailId, phoneId, stateId, sourceCodeId);\n return true;\n });\n }", "function formSubmit(){\r\n // find all the input field\r\n // if the field's value is null give a thief warning and set the errorCount's value isn't 0\r\n var inputs = document.getElementsByTagName(\"input\");\r\n for(var i = 0; i < inputs.length; i += 1){\r\n var onblur = inputs[i].getAttribute(\"onblur\");\r\n if(onblur != null){\r\n if(inputs[i].value == \"\" || inputs[i].value == null){\r\n var errorType = onblur.split(\",\")[1].substring(2, onblur.split(\",\")[1].lastIndexOf(\")\") - 1);\r\n var configId = 0;\r\n for(var j = 0; j < validateConfig.length; j += 1){\r\n if(errorType == validateConfig[j].name){\r\n configId = j;\r\n }\r\n }\r\n var warning = inputs[i].parentNode.nextElementSibling || inputs[i].parentNode.nextSibling;\r\n var borderStyle = errorStyle[0];\r\n inputs[i].style.border = borderStyle.style;\r\n warning.innerHTML = validateConfig[configId].message;\r\n warning.style.color = \"red\";\r\n errorCount =+ 1;\r\n }\r\n }\r\n }\r\n \r\n if(errorCount > 0){\r\n var thief = document.getElementById(\"thief_warning\");\r\n thief.style.color = \"red\";\r\n thief.innerHTML = \"You must finish all the field...\";\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "function validateSubmit() {\n var alertStr = \"\";\n // regex checks and empty value checks on required inputs\n if (parkingName !== null && parkingName.value.length === 0)\n alertStr += \"Name is a required input\\n\";\n if (lat !== null && lat.value.length === 0)\n alertStr += \"Latitude is a required input\\n\";\n else if (lat !== null && !decimalRegex.test(lat.value))\n alertStr += \"Latitude is an invalid number\\n\";\n if (lon !== null && lon.value.length === 0)\n alertStr += \"Longitude is a required input\\n\";\n else if (lon !== null && !decimalRegex.test(lon.value))\n alertStr += \"Longitude is an invalid number\\n\";\n\n // any errors send an alert\n if (alertStr !== \"\")\n alert(alertStr);\n else\n window.location.href = \"/index.php\";\n}", "function submitForm(event) {\n\tevent.preventDefault();\n\tif (\n\t\tcheckLength(contactName.value, 0) &&\n\t\tcheckLength(address.value, 9) &&\n\t\tcheckLength(city.value, 1) &&\n\t\tcheckLength(country.value, 1) &&\n\t\tvalidatePostcode(postcode.value) &&\n\t\tvalidatePhoneNumber(phoneNumber.value) &&\n\t\tvalidateEmail(email.value)\n\t) {\n\t\t//display the message when the form has been submitted\n\t\tlocation.href = \"checkout-page02.html\";\n\t\tconfirmForm.reset();\n\t} else {\n\t\tmessageTwo.innerHTML = \"\";\n\t}\n}", "function btnSubmitClick()\n\t{\n\t\tvar username = document.getElementById(\"username\");\n\t\tvar\tpassword = document.getElementById(\"password\");\n\t\tvar\temail = document.getElementById(\"email\");\n\t\tvar\tbirthday = document.getElementById(\"date\");\n\t\tvar\terrorUsername = document.getElementById(\"errorUsername\");\n\t\tvar\terrorPassword = document.getElementById(\"errorPassword\");\n\t\tvar\terrorEmail = document.getElementById(\"errorEmail\");\n\t\terrorUsername.innerHTML = errorPassword.innerHTML = errorEmail.innerHTML = \"\";\n\t\tvar\tcheckUsername = checkPassword = checkEmail = false;\n\t\t\n\t\tif (isNull(username.value) && isNull(password.value) && isNull(email.value)) {\n\t\t\terrorInputNull(username, errorUsername, \"Username\");\n\t\t\terrorInputNull(password, errorPassword, \"Password\");\n\t\t\terrorInputNull(email, errorEmail, \"Email\");\n\t\t} \n\t\telse {\n\t\t\tsetDefaultBackground(username);\n\t\t\tsetDefaultBackground(password);\n\t\t\tsetDefaultBackground(email);\n\t\t\tsetDefaultBackground(birthday);\n\n\t\t\tif (checkInput(username, errorUsername, \"Username\"))\n\t\t\t\tcheckUsername = true;\n\t\t\tif (checkInput(password, errorPassword, \"Password\"))\n\t\t\t\tcheckPassword = true;\n\n\t\t\tif (isNull(email.value))\n\t\t\t\terrorInputNull(email, errorEmail, \"Email\");\n\t\t\telse if (!checkValidateEmail(email.value))\n\t\t\t\terrorEmail.innerHTML = \"Email wrong format\";\n\t\t\telse\n\t\t\t\tcheckEmail = true;\n\t\t}\n\t\tif (checkUsername && checkPassword && checkEmail)\n\t\t\t//callAjax('http://localhost:8080/hienpham/FormAjax/login.php', username.value);\n\t\t\tcallAjax('http://thuhien25.esy.es/FormAjax/login.php', username.value);\n\t}", "function validateForm()\n{\n return true;\n}", "function validateForm()\n{\n return true;\n}", "function submitForm() {\n // Check if the user has entered 0 characters\n if (getStats('blog_Discription').chars <= 0) {\n alert(\"Enter Discription\");\n return false;\n }\n // check atleast 20 words are present or not\n else if (getStats('blog_Discription').words <= 20) {\n alert(\"Atleast 20 words required\");\n return false;\n }\n else\n {\n \treturn true;\n }\n }", "function validate()\n{\n \n if( document.Submit.txtFname.value == \"\" )\n {\n alert( \"Please provide your name!\" );\n document.Submit.txtFname.focus() ;\n return false;\n }\n \n return( true );\n}", "function handleSubmit(event) {\n event.preventDefault();\n setErrors(validate(form));\n }", "function onSubmitFileSaveForm() {\n return fileSaveForm.form('validate');\n }", "function onClick(e){\n var validateField = function(inputName){\n\n }\n }", "function validate() {\n\n console.log(\"in main function\");\n var myForm = document.getElementById(\"send\");\n myForm.addEventListener(\"submit\",validateForm);\n }", "function validateForm(){\n // Set error catcher\n var error = 0;\n // Check name\n if(!validateName('reg_name')){\n document.getElementById('nameError').style.display = \"block\";\n error++;\n }\n // Validate email\n var x =document.getElementById('reg_email').value;\n if(!validateEmail(x)){\n document.getElementById('emailError').style.display = \"block\";\n error++;\n }\n // Validate animal dropdown box\n if(!validateSelect('Occupation')){\n document.getElementById('animalError').style.display = \"block\";\n error++;\n }\n if(!validatePassword('reg_pass')){\n document.getElementById('pass_Error').style.display = \"block\";\n error++;\n }\n // Don't submit form if there are errors\n if(error > 0){\n return false;\n }\n else if(error == 0){\n regfun();\n }\n }", "function valSubmitted() {\n myName = document.querySelector('.input--user__name').value;\n if(myName) {\n updateLocalStorage();\n removeRegistrationOption();\n enableBtn();\n }\n }", "function submitCb(evt) {\n var empty=\"\";\n if(document.getElementById('registerFormCheck').checked) {\n var email=document.getElementById('email').value;\n var companyName=document.getElementById('companyName').value;\n var pw=document.getElementById('pw').value;\n var pwConfirm=document.getElementById('pwConfirm').value;\n\n if(email==empty || pw==empty || pwConfirm==empty || companyName==empty){\n evt.preventDefault();\n document.getElementById('submitErrorJS').innerHTML=\"please fill in correctly the form\"\n return false;\n }\n else if (!document.getElementById('termsAndConditionsCheck').checked) {\n evt.preventDefault();\n document.getElementById('submitErrorJS').innerHTML=\"Please accept the terms and conditions\"\n return false;\n }\n\n //ADD OTHER CHECKS\n }\n else {\n var email=document.getElementById('email').value;\n var pw=document.getElementById('pw').value;\n\n if(email==empty || pw==empty){\n evt.preventDefault();\n document.getElementById('submitErrorJS').innerHTML=\"please fill in correctly the form\"\n return false;\n }\n\n //ADD OTHER CHECKS\n }\n}", "validateForm() {\r\n if(this.getInputVal(this.inputBill) !== \"\" && \r\n this.getInputVal(this.inputPeople) !== \"\" &&\r\n (this.getInputVal(this.inputCustom) !== \"\" || \r\n this.percentageBtns.some(btn => btn.classList.contains(\"active\")))) \r\n {\r\n this.disableReset(false);\r\n return true;\r\n }\r\n else {\r\n this.disableReset(true);\r\n this.displayResult(\"__.__\", \"__.__\");\r\n return false;\r\n }\r\n }", "validate_form() {\n\t\tif (this.email_ok && this.email_match_ok && this.username_ok && this.login_ok && this.new_password_match_ok && this.required_ok) {\n\t\t\tthis.submit.classList.remove(\"disabled\");\n\t\t\treturn false;\n\t\t} else {\n\t\t\tthis.submit.classList.add(\"disabled\");\n\t\t\treturn true;\n\t\t}\n\t}", "function validateSignUp() {\n \n\t//check to see if the username field is empty\n if (document.getElementById(\"name\").value == null || document.getElementById(\"name\").value == \"\") {\n\t\t\n\t\t//finding the error element to insert a warning message to screen\n\t\tdocument.getElementById(\"fnameerror\").innerHTML= \"*first name not filled in\";\n\t\t\n\t\t//calling a function that changes the fields attributes to highlight the error\n\t\tformAtt(\"name\");\n\t\t\n\t\t//telling the event handler not to execute the onSubmit command\n return false;\n }\n\t\n\t//check to see if the password field is empty\n\tif (document.getElementById(\"surname\").value == null || document.getElementById(\"surname\").value == \"\") {\n\t\t\n\t\t//finding the error element to insert a warning message to screen\n\t\tdocument.getElementById(\"snameerror\").innerHTML= \"*surname not filled in\";\n\t\t\n\t\t//calling a function that changes the fields attributes to highlight the error\n\t\tformAtt(\"surname\");\n\t\t\n\t\t//telling the event handler not to execute the onSubmit command\n return false;\n }\n\t\n\t//check to see if the age field is empty\n\tif (document.getElementById(\"age\").value == null || document.getElementById(\"age\").value == \"\") {\n\t\t\n\t\t//finding the error element to insert a warning message to screen\n\t\tdocument.getElementById(\"ageerror\").innerHTML= \"*age not selected\";\n\t\t\n\t\t//calling a function that changes the fields attributes to highlight the error\n\t\tformAtt(\"age\");\n\t\t\n\t\t//telling the event handler not to execute the onSubmit command\n return false;\n }\n\t//if the users submission returns no false checks, then tell the even handler to execute the onSubmit command\t\t\n\treturn true;\n\t\n}", "function validForm(event){\n\t\n\t\tvar cellphoneFlag=false, homeFlag=false;\n\t\tvar cell=$cellphone.val();\n\t\tvar home=$homeNum.val();\n\t\tif( (cell==null || cell==\"\") && (home==null || cell==\"\") ){\n\t\t\t\t$( \"#popUpDiv\" ).popup( \"open\" );\n\t\treturn false;\n\t\t}else{\n\t\t\n\n $.ajax({\n type: \"POST\",\n url: \"submit.php\",\n data: \"userNo\",\n success: function () {\n alert(\"Registration Completed\");\n\t\t\t\t},\n\t\t\t});\n \n \n\n\t\t//$( \":mobile-pagecontainer\" ).pagecontainer( \"change\", \"#carSelect\") ; \n\t\t\t$.mobile.changePage('#carSelect', {transition: 'pop'}); \n\t\t\t\t//$(document).pagecontainer(\"change\", \"#carSelect\", { transition: 'pop', });\n\t\t\t\t}\n\t\t}", "function Button_Click(e)\r\n{\r\n\t//trace(\"Button_Click\");\r\n\tvar res = e.Submit();\r\n\ttrace( \"Submit res=\" + res);\r\n\t\r\n\t//Place above code in if statment below if you want to only submit once\t\r\n/*\tif ( !e.IsSubmitted() )\r\n\t{\t\r\n\t//\tconsole.log(\"!\"+ e+\".IsSubmitted()\");\r\n\t}*/\r\n}", "function try_submit() {\n log(\"user attempting to submit form\");\n if (validate_form(window.age_range)) {\n log(\"form validated ok\");\n } else {\n log(\"unable to validate form\");\n return false;\n }\n if (postproc_form()) {\n log(\"form postprocessed ok\");\n } else {\n // shouldn't ever get here, check validation logic\n log(\"unable to postprocess form\");\n return false;\n }\n debug_print_form();\n log(\"submitting form\");\n return true; // returning true sends form to server\n}", "function(event) {\n\t\tvar isValid = true;\n\t\t\n\t\tvar email = $(\"#email_address\").va();\n\t\tif (email == \"\") {\n\t\t\t$(\"#email_address\").next().text(\"This field is required.\");\n\t\t\tisValid = false;\n\t\t\t}\n\t\t\t\n\t\tvar full_name = $(\"#full_name_id\").val().trim();\n\t\tif (full_name == \"\") {\n\t\t $(\"#full_name_id\").next().text(\"This field is required.\");\n\t\t\tisValid = false;\n\t\t\t}\n\t \n\talert( \"Missing a field b \");\n\t\t\t\t \n//\tif (isValid == false) { \n\t\talert( \"Missing email address or full name\");\n\t\tevent.preventDefault();\n\t//\t}\t\t\t \n\t}", "submit() {\n if (this.isValid()) {\n this.props.onSubmit({\n email: this.state[EMAIL_FIELD].value,\n password: this.state[PASSWORD_FIELD].value\n })\n }\n }", "function handleSubmit(event) {\n event.preventDefault();\n\n if (!checkForm()) {\n return false;\n }\n\n AuthService.register({\n lastName: lastnameInput.current.value,\n firstName: firstnameInput.current.value,\n email: emailInput.current.value,\n password: passwordInput.current.value,\n birthDate: birthdateInput.current.value,\n username: usernameInput.current.value,\n description: descInput.current.value,\n country: countryInput.current.value,\n }).then(response => {\n if (response.ok) {\n UIkit.modal(\"#signup\").hide();\n }\n return response.json().then(data => {\n UIkit.notification({\n message: data.message,\n status: (response.ok) ? 'success' : 'danger',\n pos: 'top-right',\n timeout: 5000\n });\n return true;\n });\n });\n }", "function newpassSubmit(){\n\tif($(\"#email-reset-form\").hasClass('inputsuc') && $('#pass-reset-form').hasClass('inputsuc') && $('#conf-pass-reset-form').hasClass('inputsuc')){\n\t\treturn true;\n\t}else{\n\t\tnullFieldValidation('email-reset-form');\n\t\tnullFieldValidation('pass-reset-form');\n\t\tnullFieldValidation('conf-pass-reset-form');\n\t\treturn false;\n\t}\n\n}", "_onSubmitValidateInputs() {\n\t\tthis.setState({ inputDirty: true });\n\t\tlet validationValue = this._validateInputFeild(this.state.inputStateKey);\n\t\tthis.setState({ isValidInput: validationValue.test, invalidMessage: validationValue.test ? '' : validationValue.message })\n\t\tif (this.props.inputChanged) {\n\t\t\tthis.props.inputChanged(this.props.inputStateKey, this.state.inputStateKey, this.state.isValidInput)\n\t\t}\n\t}", "function validateSubmitResults() {\n\tconsole.log(\"Calling from validator\");\n\tvar validated; \n // Select only the inputs that have a parent with a required class\n var required_fields = $('.required');\n // Check if the required fields are filled in\n \trequired_fields.each(function(){\n \t\t// Determite what type of input it is, and display appropriate alert message\n\t\tvar field, msg_string;\n \tif( $(this).hasClass('checkbox_container') || $(this).hasClass('radio_container') ){\n \t\tfield = $(this).find('input:checked');\n \t\tmsg_string = \"Please select an option\";\n \t}else{\n \t\tfield = $(this).find('input:text, textarea');\n \t\tmsg_string = \"Please fill in the field\";\n \t} \n\t\t// For the checkbox/radio check the lenght of selected inputs,\n\t\t// at least 1 needs to be selected for it to validate \n\t\t// And for the text, check that the value is not an empty string\n \t\tif( (field.length <= 0) || !field.val() ){\n \t\t\tconsole.log(\"Field length: \" + field.length);\n \t\t\t$(this).addClass('alert alert-warning');\n \t\t\tvar msg = addParagraph(msg_string, \"validator-msg text-danger\");\n \t\t\t// Check if there is already an alert message class, \n \t\t\t// so that there wouldn't be duplicates\n\t\t\tif( $(this).find('p.validator-msg').length == 0 ){\n \t$(this).find('.section-title').before(msg);\n }\n validated = false;\n \t\t}\n \t\telse{\n \t\t\t// Remove the alert classes and message\n \t\t\t$(this).find('p.validator-msg').detach();\n $(this).removeClass('alert-warning').removeClass('alert'); \n validated = true;\n \t\t}\n \t\t// Sanitize the inputs values\n \t\tif( validated ){\n \t\t\tvar answer = sanitizeString(field.val());\n \t\t\tfield.val(answer);\n \t\t}\n \t});\n\n\treturn validated;\n}", "function checkFormSubmit() {\n var errCode = getURLVar(\"error\");\n if (errCode !== false) {\n if (errCode == \"0\") {\n $('#errorMSG').css(\"color\", \"green\");\n $('#errorMSG').html('Success! Thanks for contacting us.');\n } else if (errCode == \"1\") {\n $('#errorMSG').css(\"color\", \"red\");\n $('#errorMSG').html('Please complete all fields.');\n } else if (errCode == \"2\") {\n $('#errorMSG').css(\"color\", \"red\");\n $('#errorMSG').html('Please enter a valid email address.');\n }\n }\n }", "function Save() {\n debugger;\n var $form = $('#SupplierPaymentForm');\n if ($form.valid()) {\n ValidatePaymentRefNo();\n }\n else {\n notyAlert('warning', \"Please Fill Required Fields,To Add Items \");\n }\n}", "sumbitForm(e){\n e.preventDefault();\n const {email, password} = this.state;\n const values = { email, password}\n const errors = this.validateForm(values);\n\n this.validateForm(values);\n this.setState({ submitRequest: true });\n\n if(_.isEmpty(errors)){\n this.setState({ isSubmitted: true });\n this.props.submitUser(values);\n }\n }", "function validate(e){\n\thideErrors();\n\n\tif(formHasErrors()){\n\t\te.preventDefault();\n\n\t\treturn false;\n\t}\n\treturn true;\n}", "function submission() {\n\tvalidateHouseNumber();\n\tvalidateStreetName();\n\tvalidateZipCode();\n\tvalidatePhoneNumber();\n\tvalidateFirstName();\n\tvalidateLastName();\n\tvalidateCardNumber();\n\tvalidateExpiryDate();\n\tvalidateCvv();\n\tvar errorString = document.getElementById(p1).innerHTML + document.getElementById(p2).innerHTML + quantityErrorString();\n\terrorString = errorString.replace(/<br>/g,\"\\n\");\n\tif(errorString.length > 0 ) {\n\t\twindow.alert(\"Please correct these errors\\n\" + errorString);\n\t} else if (calculateTotal() == 0) {\n\t\twindow.alert(\"Choose atleast one item\");\n\t}\n\telse {\n\t\tclearInterval(interval);\n\t document.getElementById(\"bd\").innerHTML=\"<p>Order Successfully placed</p>\";\n\t}\n}", "function onClickSubmitButton(){\n //loop through submission field ids\n for (var field in submissionFormFields) {\n var validateType = capitalize(submissionFormFields[field].validate); //field validation type, capitalize first letter\n var validationFunction = window['validate'+validateType]; //window['stringhere'] makes a function using a string, so window['stringhere']() means stringhere()\n var validationFunctionResponse = validationFunction(submissionFormFields[field].value);\n if(!validationFunctionResponse.isValid){ //validate the function value using the validationFunction\n //add .textbox-error style class to the input field tag\n $('#'+field).addClass('textbox-error');\n //add .show style class to the error box of the input field\n $('#'+field+submissionErrorBoxSuffix).addClass('show');\n //set the inner html of the field error box title\n $('#'+field+submissionErrorBoxTitleSuffix).html(validationFunctionResponse.error);\n //set the inner html of the field error box description\n $('#'+field+submissionErrorBoxDescSuffix).html(validationFunctionResponse.details);\n }\n }\n}", "function runSubmit() {\n fnameVal();\n lnameVal();\n emailVal();\n txtVal();\n}", "function runValidation() {\n nameVal();\n phoneVal();\n mailVal();\n}", "function formSubmitted(){\n getCurrentNumbers();\n setConfirmationMessage();\n}", "submit() {\n }", "function submit() {\r\n click(getSubmit());\r\n // Submitting still keeps the modal open until we verify that the username is unique,\r\n // and if it's not (and we have an e2e test for it), then it shows an error and keeps myInfoModal open.\r\n // So we can't do this: waitForElementToDisappear(getSubmit());\r\n }", "onClick() {\n let self = this;\n self.validateInput('name', (nameStatus) => {\n if (nameStatus) {\n self.validateInput('description', (descriptionStatus) => {\n if (descriptionStatus) {\n self.validateInput('cost', (costStatus) => {\n if (costStatus) {\n self.validateInput('limit', (limitStatus) => {\n if (limitStatus) {\n this.httpRequest();\n }\n });\n }\n });\n }\n });\n }\n });\n }", "function Validacion_Create(e){\n //Esta linea detiene el envio al POST para validarlo\n e.preventDefault();\n try{\n console.log('Validando formulario Insumos!');\n if(this.querySelector('[name=Descripcion]').value == '') { \n console.log('La Descripcion esta vacía');\n ejecutaAlertaError(\"Descripcion\");\n // alert(\"Error! La Descripcion esta vacía, por favor complete el campo\")\n return;\n }\n if(this.querySelector('[name=DescripcionAbre]').value == '') { \n console.log('La DescripcionAbre esta vacía');\n ejecutaAlertaError(\"Descripcion Abreviada\");\n return;\n }\n\n this.submit();\n\n }\n catch{\n ejecutaAlertaError();\n }\n\n \n }", "function validation(){\n\n\n \tif(document.getElementById(\"task\").value == \"\"){\n\n \t\talert(\"Task field cannot be null\");\n \t\treturn false ;\n\n \t}\n \telse\n \t\treturn true ;\n }", "formSubmit() {\n if(this.get('disableSubmit')) { return; }\n \n this.sendAction('submitUserContact', {\n contactType: this.get('selectedContactType'),\n name: this.get('nameValue'),\n fromEmail: this.get('emailValue'),\n content: this.get('commentValue')\n });\n\n if(this.attrs.onContactSubmit) {\n this.attrs.onContactSubmit();\n }\n }", "function _submit() {\n if(vm.recordForm.$valid)\n {\n vm.$modalInstance.close(vm.record);\n }\n }", "function buttonPressed() \n{\n\tvar f = document.getElementById('inputform');\n\tvar e = document.getElementById('useremail');\n\n\t// Let the input E-Mail field validate the input. Upon successful validation\n\t// subscribe the e-mail address and alert the user. Had to check if the input field\n\t// is blank as using required parameter caused the validation message to appear after\n\t// resetting the form.\n\tif(f.checkValidity() && e.value != '') {\n\t\tpostEmailtoDatabase(e.value);\n\t\tf.reset();\n\t\talert(\"Thank you for subscribing to our newsletter!\");\n\t} else {\n\t\talert(\"Please enter your E-Mail Address.\")\n\t}\n}", "function ValidateSubmit() {\n \n var x =NameCheck();\n var y =emailcheck();\n var z = passwordcheck();\n if (x && y && z) {\n return true;\n }\n else {\n return false;\n }\n}", "function submitForm(event) {\n event.preventDefault();\n if (checkLength(fullName.value, 0) && validateEmail(email.value) && checkLength(password.value, 7)) {\n window.location.href = \"signedIn_congratulations.html\";\n }\n}", "function formValidation() {\n $(selectors.name).on('change', nameValidate);\n $(selectors.contactNo).on('change', contactValidate);\n $(selectors.email).on('change', emailValidate);\n $(selectors.submit).on('click', validation);\n }" ]
[ "0.7558469", "0.74842143", "0.7458519", "0.7330588", "0.7247194", "0.7228648", "0.70883733", "0.7088339", "0.7011356", "0.69660735", "0.6956194", "0.69403124", "0.6879619", "0.68770814", "0.6871057", "0.6861277", "0.6859714", "0.68432117", "0.68337804", "0.68327683", "0.6830207", "0.68267024", "0.682289", "0.68065363", "0.679849", "0.67829627", "0.6782082", "0.6754408", "0.6752813", "0.6751242", "0.6739037", "0.6710233", "0.67036766", "0.6691726", "0.6682583", "0.6679563", "0.6679407", "0.6676799", "0.66597897", "0.6659666", "0.6658404", "0.66487724", "0.66383183", "0.6632954", "0.6631199", "0.66302127", "0.6628231", "0.6624516", "0.66182125", "0.6616381", "0.66065335", "0.660316", "0.6598526", "0.6598503", "0.65938973", "0.657044", "0.656538", "0.6558386", "0.6553137", "0.6553137", "0.65489185", "0.6545319", "0.654065", "0.65297", "0.6529202", "0.6524947", "0.65209293", "0.65194154", "0.65184814", "0.6512702", "0.65014994", "0.6497605", "0.64973706", "0.64949393", "0.64899325", "0.6487032", "0.6483551", "0.64818734", "0.64812225", "0.6477323", "0.6476057", "0.6474264", "0.64658386", "0.6462832", "0.6455179", "0.64507425", "0.64479923", "0.6434062", "0.6429961", "0.642876", "0.64237577", "0.64169854", "0.6414026", "0.64135313", "0.64105", "0.6409463", "0.6401429", "0.6398479", "0.63890284", "0.6378899", "0.6374562" ]
0.0
-1
compruebo alert (id); preparo enlace a datos partido
function ir_a_mi_partido() { location.href = "mi_partido.html?id=" + id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function definirInsumo(id) {\n $.post(SITE_PATH + '/tarefas/carregar-para-comprar', {id: id}, function (retorno) {\n if (retorno == false) {\n swal({\n title: \"Ops!\",\n text: \"Não existe nenhum insumo disponivel para compra.\",\n type: \"warning\"\n });\n return;\n }\n\n // Caso tenha alguma tarefa a ser reportada, vamos exibir a lista para o usuário selecionar\n swal({\n title: \"\",\n text: retorno,\n customClass: 'seleciona-insumo-tarefa',\n showCancelButton: true,\n cancelButtonText: \"Cancelar\",\n confirmButtonText: \"Comprar\",\n confirmButtonColor: '#ed5565',\n closeOnConfirm: false,\n html: true\n }, function (data) {\n if (data) {\n $('.confirm').attr('disabled', true);\n var dados = {};\n\n $('.comprar-produto-' + id).each(function () {\n var qtEscolhido = $(this).find('option:selected').val(),\n idEscolhido = $(this).data('id');\n\n if (qtEscolhido > 0) {\n dados[idEscolhido] = {quantidade: qtEscolhido};\n }\n });\n\n if (dados.length == 0) {\n toastr['warning'](\"Selecione pelo menos um insumo para comprar.\");\n return;\n }\n\n $.post(SITE_PATH + '/tarefas/comprar', {id: id, insumos: dados}, function (retorno) {\n if (retorno) {\n recarregarTarefas();\n toastr['success'](\"Compra realizada com sucesso.\");\n swal.close();\n } else {\n toastr['error'](\"Houve um erro efetuar a compra.\");\n }\n\n $('.confirm').removeAttr('disabled');\n });\n }\n });\n })\n }", "function anulardetalle(iddetalle_venta) {\n\n\tswal({\n\t\ttitle: '¿Está seguro de anular el detalle_venta?',\n\t\t//text: \"You won't be able to revert this!\",\n\t\t//type: 'question',\n\t\timageUrl: '../public/img/swal-duda.jpg',\n\t\timageWidth: 250,\n\t\timageHeight: 250,\n\t\tanimation: false,\n\t\tshowCancelButton: true,\n\t\tconfirmButtonColor: '#f39c12',\n\t\tcancelButtonColor: '#d33',\n\t\tconfirmButtonText: 'Aceptar',\n\t\tcancelButtonText: 'Cancelar'\n\t}).then(function(e) {\n\t\t$.post(\"../ajax/venta.php?op=anulardetalle_v\", {\n\t\t\tiddetalle_venta: iddetalle_venta\n\t\t}, function(e) {\n\t\t\tswal(\n\t\t\t\t(e),\n\t\t\t\t'Satisfactoriamente!',\n\t\t\t\t'success'\n\t\t\t)\n\t\t\t$('#tblproductos_detalle').DataTable().ajax.reload();\n\t\t\t$('#tbllistado').DataTable().ajax.reload();\n\t\t});\n\t}).catch(swal.noop);\n}", "function darDeBajaPromocion(id)\n{\nvar requerimiento = new RequerimientoGet();\nrequerimiento.setURL(\"verpromociones/ajax/darDeBajaPromocion.php\");\nrequerimiento.addParametro(\"id\",id);\nrequerimiento.addListener(respuestaDarDeBajaPromocion);\nrequerimiento.ejecutar();\n}", "function alert(id){\n const closAlert = elementId(id);\n closAlert.style.display = \"none\";\n const wrap = elementId(\"wrap\");\n wrap.style.display = \"block\";\n}", "function alterEmpRes(jsobj) {\n\t// todoconfirm the action\n\tconsole.log(jsobj.newId);\n\talert(\"All DONE\" + jsobj.newId);\n}", "function Alert(id, xu) {\n id.onclick = function () {\n // setTimeout(function () {\n // bd.style.boxShadow = \"400px 0px 100px #888888 inset\";\n // },1000);\n console.log(\"1111111111111111111111\");\n console.log(alertDiv);\n xu.style.display = 'block';\n xu.style.position = \"absolute\";\n }\n }", "function anular(idventa) {\n\tswal({\n\t\ttitle: '¿Está seguro de anular la venta?',\n\t\t//text: \"You won't be able to revert this!\",\n\t\t//type: 'question',\n\t\timageUrl: '../public/img/swal-duda.jpg',\n\t\timageWidth: 250,\n\t\timageHeight: 250,\n\t\tanimation: false,\n\t\tshowCancelButton: true,\n\t\tconfirmButtonColor: '#f39c12',\n\t\tcancelButtonColor: '#d33',\n\t\tconfirmButtonText: 'Aceptar',\n\t\tcancelButtonText: 'Cancelar'\n\t}).then(function(e) {\n\t\t$.post(\"../ajax/venta.php?op=anular\", {\n\t\t\tidventa: idventa\n\t\t}, function(e) {\n\t\t\tswal(\n\t\t\t\t(e),\n\t\t\t\t'Satisfactoriamente!',\n\t\t\t\t'success'\n\t\t\t)\n\t\t\t$('#tbllistado').DataTable().ajax.reload();\n\t\t});\n\t}).catch(swal.noop);\n}", "onAlert(id = this.defaultId) {\n return this.subject.asObservable().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__[\"filter\"])(x => x && x.id === id));\n }", "function printAlert($alert,$id_name){\n\t$(\".alert-area\").append(\"<div class=\\\"alert alert-warning\\\" role=\\\"alert\\\">\"+$id_name+\" \"+$alert+\"</div>\");\n}", "function alert(notification, id_element) {\n\n // -- Annuler le time out actuel -- //\n clearTimeout(function_setTimeout);\n\n // -- Mise à jour de id_element -- //\n id_element = (!id_element) ? 'appAlert'\n : id_element;\n\n // -- Ecoute si le notificateur est soumis -- //\n if (!notification) {\n notification = {\n isSuccess: true,\n message: 'Error communication',\n }\n }\n \n // -- Afficher l'alert -- //\n $('#' + id_element).html(\n '<div class=\"mmalert alert alert-' + ((notification.isSuccess != null) ? (!notification.isSuccess) ? 'danger'\n : 'success'\n : 'info') + ' alert-dismissible fade show\" role=\"alert\">' +\n '<div class=\"row\">' +\n '<div class=\"col-lg-12\">' +\n '<div class=\"pull-left\">' +\n '<b>Information</b><br/>' +\n notification.message +\n '</div>' +\n '<div class=\"pull-right\">' +\n '<button type=\"button\" class=\"btn btn-sm btn-danger\" data-dismiss=\"alert\" aria-label=\"Close\">' +\n '<i class=\"fa fa-remove\"></i> ' + 'Close' +\n '</button>' +\n '</div>' +\n '</div>' +\n '</div>' +\n '</div>'\n );\n\n // -- Ne pas fermer si la valeur est -1 -- //\n if ($DureeVisibiliteMessageBox > 0) {\n // -- Supprimer l'alert après un temps défini -- //\n function_setTimeout =\n setTimeout(\n function () {\n // -- Fermer l'alert -- //\n $('#' + id_element + ' .alert').alert('close');\n },\n $DureeVisibiliteMessageBox\n );\n }\n\n}", "onAlert(id = this.defaultId) {\n return this.subject.asObservable().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"filter\"])(x => x && x.id === id));\n }", "onAlert(id = this.defaultId) {\n return this.subject.asObservable().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__[\"filter\"])(x => x && x.id === id));\n }", "function alertOfDuplicateFailure(id, name_ru) {\n removeAllChildNodes(\"success\");\n document.getElementById(\"alert1\").innerHTML =\n '<div class=\"alert alert-danger fade in\">' +\n '<a href=\"#\" class=\"close\" data-dismiss=\"alert\">&times;</a>' +\n '<strong>Error!</strong> Id is not unique, it\\'s one already accociated with <b>' + id + ' (' + name_ru + ')</b>. Try to use another id!' +\n '</div>';\n}", "function ack_alert(id,mid){\n\t// remove field\n\t$(\"#alert_\"+mid+\"_\"+id).fadeOut(600, function() { $(this).remove(); });\n\n\t// decrement nr\n\tvar button=$(\"#\"+mid+\"_toggle_alarms\");\n\tvar open_alarms=parseInt(button.text().substring(0,button.text().indexOf(\" \")))-1;\n\tvar txt=$(\"#\"+mid+\"_toggle_alarms_text\");\n\tvar counter=$(\"#\"+mid+\"_alarm_counter\");\n\tset_alert_button_state(counter,button,txt,open_alarms);\n\n\tvar cmd_data = { \"cmd\":\"ack_alert\", \"mid\":mid, \"aid\":id};\n\t//console.log(JSON.stringify(cmd_data));\n\tcon.send(JSON.stringify(cmd_data)); \t\t\n}", "addItemWalletById(id) {\r\n Alert.alert(\r\n 'Deseja excuir o cupom?',\r\n 'Esta ação não pode ser desfeita!',\r\n [\r\n { text: 'Cancelar', style: 'cancel' },\r\n { text: 'Confirmar', onPress: () => this.handledeleteItembyId(id) },\r\n ],\r\n { cancelable: false }\r\n )\r\n\r\n }", "function setAlert(){\n if (comprobarFormulario()) {\n $('<form>')\n .addClass('pre-form')\n .append(createInput(INTIT, 'text', 'Titulo del boton'))\n .append(createInput(INCONT, 'text', 'Contenido del alert'))\n .append(inputBotones(click))\n .appendTo('body');\n }\n\n /**\n * Funcion que realiza la craeción del alert.\n * @param {Event} e Evento que ha disparado esta accion.\n */\n function click(e) {\n e.preventDefault();\n var contenido = $('#'+INCONT).val();\n var titulo = $('#'+INTIT).val();\n if (titulo && contenido) {\n divDraggable()\n .append(\n $('<button>')\n .html(titulo)\n .data('data', contenido)\n .on('click', (e)=>{\n alert($(e.target).data('data'));\n })\n )\n .append(botonEliminar())\n .appendTo('.principal');\n $(e.target).parents('form').remove();\n } else {\n alert('Rellene el campo de \"Titulo\" y \"Contenido\" o pulse \"Cancelar\" para salir.');\n }\n }\n}", "function pedido_em_aberto(id){\n if(id == '0'){\n $.ajax({\n type: 'GET',\n dataType: 'html',\n url: 'server/pedido_em_aberto.php',\n beforeSend: function(){\n },\n data: {id: id},\n success: function (msg)\n {\n $(\"#tbody\").html(msg);\n }\n });\n }else{\n $.ajax({\n type: 'GET',\n dataType: 'json',\n url: 'server/pedido_em_aberto.php',\n beforeSend: function(){\n },\n data: {id: id},\n success: function (msg)\n {\n if (msg.erro) {\n $('#alerta-erro').html(msg.resposta);\n $('#alerta-erro').fadeIn('slow');\n $('#alerta-erro').fadeOut(4500);\n }else{\n $('#alerta').html(msg.resposta);\n $('#alerta').fadeIn('slow');\n $('#alerta').fadeOut(4500);\n\n pedido_em_aberto('0');\n }\n }\n });\n }\n }", "function facturar (id) {\n var p = AlquilerService.facturar(id);\n p.then(\n function (datos) {\n var respuesta = datos.data;\n if(respuesta.error){\n user.swalSuccess(respuesta.mensaje);\n }else{\n user.swalSuccess(\"Alquiler Despachado\");\n $state.go('app.reporteAlquileres', {});\n }\n // DialogFactory.ShowSimpleToast(\"Usuario Registrado Exitosamente\");\n\n // $state.go('app.registro', {});\n },\n function (error) {\n DialogFactory.ShowSimpleToast(error.error_description);\n\n }\n )\n }", "function printSuccess($alert,$id_name){\n\t$(\".alert-area\").append(\"<div class=\\\"alert alert-success\\\" role=\\\"alert\\\">\"+$id_name+\" \"+$alert+\"</div>\");\n}", "function send_alert(id,mid){\n\t$(\"#alert_\"+mid+\"_\"+id+\"_send\").text(\"hourglass_empty\");\n\n\tvar cmd_data = { \"cmd\":\"send_alert\", \"mid\":mid, \"aid\":id};\n\t//console.log(JSON.stringify(cmd_data));\n\tcon.send(JSON.stringify(cmd_data)); \t\t\n}", "function activar(idips)\n{\n Swal.fire({\n title: '¿Estas Seguro de Activar?',\n text: \"El estado del Teclado!\",\n icon: 'warning',\n showCancelButton: true,\n confirmButtonColor: '#3085d6',\n cancelButtonColor: '#d33',\n confirmButtonText: 'Si, Activar!'\n }).then((result) => {\n if (result.isConfirmed) {\n\n $.post(\"../../ajax/xips.php?op=activar\",{idips : idips}, function(e){\n //alert(e)\n Swal.fire(\n 'Activado!',\n 'El estado del Teclado',\n 'success'\n )\n tabla.ajax.reload();\n });\n }\n })\n}", "addItemWalletById(id) {\n Alert.alert(\n 'Deseja excuir o cupom?',\n 'Esta ação não pode ser desfeita!',\n [\n { text: 'Cancelar', style: 'cancel' },\n { text: 'Confirmar', onPress: () => this.handledeleteItembyId(id) },\n ],\n { cancelable: false }\n )\n\n }", "function info(id){\n\tif(id == \"\"){\n\t\twindow.alert(\"Insira ID\");\n\t\treturn;\n\t}\n\n\tlet xhttp = new XMLHttpRequest();\n\tlet url = ENDERECO + ROTA_CONSULTA + \"?id=\" + id;\n\n\txhttp.open(\"GET\", url, true);\n\txhttp.withCredentials = true;\n\txhttp.onreadystatechange = function() {\n\t\tif(xhttp.readyState === xhttp.DONE) {\n\t\t\tvar xml = (new DOMParser()).parseFromString(this.responseText, \"application/xml\");\n\t\t\tvar raiz = xml.firstElementChild;\n\t\t\tif(xhttp.status === 200) {\n\t\t\t\tvar elementos = raiz.children;\n\t\t\t\tlet informacoes = document.getElementById(\"informacoes\");\n\t\t\t\tinformacoes.innerHTML = \"\";\n\t\t\t\tfor(let i = 0; i < elementos.length; i++) {\n\t\t\t\t\tvar dados = elementos[i].children;\n\t\t\t\t\tinformacoes.innerHTML +=\"<label class=\\\"primary-text text-lighten-1 short col s12 m6\\\"> SIAPE: <input type=\\\"number\\\" name=\\\"id\\\" disabled value=\\\"\" + dados[0].textContent + \"\\\"></label>\";\n\t\t\t\t\tinformacoes.innerHTML += \"<label class=\\\"primary-text text-lighten-1 short col s12 m6\\\">Nome: <input type=\\\"text\\\" name=\\\"nome\\\" disabled value=\\\"\" + dados[2].textContent + \"\\\"></label>\";\n\t\t\t\t\tinformacoes.innerHTML += \"<label class=\\\"primary-text text-lighten-1 short col s12 m3\\\">Id-Depto: <input type=\\\"number\\\" name=\\\"id-depto\\\" disabled value=\\\"\" + dados[1].textContent + \"\\\"></label>\";\n\t\t\t\t\tinformacoes.innerHTML += \"<label class=\\\"primary-text text-lighten-1 short col s12 m6\\\">E-mail: <input type=\\\"text\\\" name=\\\"email\\\" disabled value=\\\"\" + dados[3].textContent + \"\\\"></label>\";\n\t\t\t\t\tinformacoes.innerHTML += \"<label class=\\\"primary-text text-lighten-1 short col s12 m3\\\">Titulação:<input type=\\\"text\\\" name=\\\"titulacao\\\" disabled value=\\\"\" + dados[4].textContent + \"\\\"></label>\";\n\t\t\t\t}\n\t\t\t} else if(xhttp.status == 404) {\n\t\t\t\tdocument.getElementsByTagName(\"p\")[0].innerHTML = (\"Servidor offline\");\n\t\t\t} else {\n\t\t\t\tdocument.getElementsByTagName(\"p\")[0].innerHTML = (raiz.firstElementChild.textContent);\n\t\t\t}\n\t\t}\n\t};\n\txhttp.send();\n}", "function activar_resolucion(id_resolucion) {\n\n\t\talertify.alert(\"<p class='text-success'>¡Resolución ACTIVADA!</p>\",\"Se cambio el estado correctamente\", function(result){ \n\t\t\t\n\t\t\tif(result){\n\n\t\t\t\t$.ajax({\n\t\t\t\t\turl:\"../ajax/resolucion.php?op=activar_resolucion\",\n\t\t\t\t\t method:\"POST\",\n\t\t\t\t\t//data:dataString,\n\t\t\t\t\t//toma el valor del id y del estado\n\t\t\t\t\tdata:{id_resolucion:id_resolucion},\n\t\t\t\t\t//cache: false,\n\t\t\t\t\t//dataType:\"html\",\n\t\t\t\t\tsuccess: function(data){\n\t //si se ejecuta se hace refresca el datatable asincrono\n\t $('#resolucion_data').DataTable().ajax.reload();\t\t\n\t\t\t\t\t $('#resolucion_fecha_data').DataTable().ajax.reload();\t\t \t\n\t\t\t\t }\n\n\t\t\t\t});\n\n\t\t\t}\n\n\t\t\talertify.success('ACTIVO'); \n\t\t});\n\n\t}", "function accion(id) {//cuando se da clic \n var ids = $(id).attr('id');\n switch ($(id).text()) {\n case \"Eliminar\":\n swal({title: \"¿Estas seguro?\", text: \"Al eliminar la ficha se eliminara información asociada como programaciones\",\n type: \"warning\",\n showCancelButton: true,\n confirmButtonColor: \"#DD6B55\",\n confirmButtonText: \"!Si, Eliminar!\",\n cancelButtonText: \"!No, Cancelar!\",\n closeOnConfirm: false,\n closeOnCancel: false},\n function (isConfirm) {\n if (isConfirm) {\n $.ajax({\n beforeSend: function (xhr) {\n },\n method: \"POST\",\n url: \"ServletFicha\",\n data: {\n validacion: \"eliminarFicha\",\n idFicha: ids\n },\n error: function (jqXHR) {\n swal({title: \"Error\",\n text: jqXHR,\n type: \"error\",\n timer: 2200,\n showConfirmButton: true});\n },\n complete: function (jqXHR, textStatus) {\n },\n success: function (data, textStatus, jqXHR) {\n swal({title: \"Perfecto\",\n text: data,\n type: \"success\",\n timer: 2200,\n showConfirmButton: true});\n listarFichas();\n }\n });\n } else {\n swal(\"Cancelado\", \"La ficha no se eliminó\", \"error\");\n }\n });\n break;\n case \"Modificar\":\n var datos = $(id).attr('value');\n var array = datos.split(\",\");\n $(\"#numeroFicha\").focus();\n $(\"#numeroFicha\").val(array[1]);\n $(\"#fechaInicio\").val(array[2]);\n $(\"#fechaFinal\").val(array[3]);\n $(\"#btnGuardarFicha\").hide();\n $(\"#btnModificarFicha\").show();\n $(\"#btnModificarFicha\").val($(id).attr('id'));\n $(\"html, body\").animate({scrollTop: 0}, 700);\n return false;\n break;\n }\n}", "function printCritical($alert,$id_name){\n\t$(\".alert-area\").append(\"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">\"+$id_name+\" \"+$alert+\"</div>\");\n}", "function showAlert(alert_id) {\n hideAlerts();\n $('#' + alert_id).show();\n }", "function showAlert(alert_id) {\n hideAlerts();\n $('#' + alert_id).show();\n }", "function dispAlert(id,msg){\n\t\t$('#'+id).html(msg);\n\t}", "function mostrarAlerta(msj, alerta) \n{\n var close = document.createElement(\"button\");\n var spa = document.createElement(\"span\");\n var alert = document.getElementById(alerta);\n close.setAttribute(\"type\", \"button\");\n close.setAttribute(\"onclick\", \"quitarAlerta('\"+alerta+\"')\");\n close.setAttribute(\"class\", \"close\");\n close.setAttribute(\"data-dismiss\", \"alert\");\n close.setAttribute(\"aria-label\", \"Close\");\n spa.setAttribute(\"aria-hidden\", \"true\");\n spa.innerHTML = \"&times;\";\n close.appendChild(spa); \n alert.setAttribute(\"class\", \"alert alert-warning\");\n alert.setAttribute(\"role\", \"alert\");\n alert.innerHTML = msj;\n alert.appendChild(close); \n}", "function finalizar(id) {\n $.post(SITE_PATH + '/tarefas/finalizar', {id: id}, function (retorno) {\n if (retorno) {\n recarregarTarefas();\n toastr['success'](\"A tarefa foi finalizada com sucesso.\");\n } else {\n toastr['error'](\"Houve um erro ao finalizar a tarefa.\");\n }\n swal.close();\n });\n }", "function del_alert(id,mid){\n\t// remove field\n\t$(\"#alert_\"+mid+\"_\"+id).fadeOut(600, function() { $(this).remove(); });\n\n\tvar cmd_data = { \"cmd\":\"del_alert\", \"mid\":mid, \"aid\":id};\n\t//console.log(JSON.stringify(cmd_data));\n\tcon.send(JSON.stringify(cmd_data)); \t\t\n}", "constructor(alertId){\n this.alert = document.getElementById(alertId);\n }", "function DeleteI(id) {\nswal({\ntitle: 'Deseas Eliminar el Registro?',\ntext: \"Recueda,Una vez eliminado no se puede Recuperar\",\ntype: 'warning',\nshowCancelButton: true,\nconfirmButtonColor: '#3085d6',\ncancelButtonColor: '#d33',\nconfirmButtonText: 'Si,Eliminarlo!'\n}).then(function () {\n$.post(\"../../model/items/delete.php\", {\nid: id\n},\nfunction (data, status) {\nreadRecordsI();\n}\n);\n})\n}", "function mostrarHorarioGrupo(id){\n alerta_principal=$(\"#alerta_principal\");\n alerta_principal.html(\"Cargando.Espere.......\");\n alerta_principal.show(); \n $.post(entorno+\"condiciongrupo/\"+id+\"/generar\",function(data){ \n verHorarioGrupoCargaAcademica(id);\n }); \n\n}", "function visualizar_produto(id){\n $.ajax({\n type: 'GET',\n url: './home/ver_produto/'+id,\n beforeSend: function(){\n $('#msg_produto2').html('<div class=\"alert alert-warning\">Aguarde consultando produto...</div>');\n },\n success: function (e){ \n $('#msg_produto2').html('');\n $('#retorno_modal').html(e);\n }\n });\n}", "function deletaId(id){\n console.log('eita foi!!!: ', id)\n}", "function gestion_inscripcion(id){\n\t$.ajax({ \n\t\turl: 'home_actualiza.php',\n\t\ttype: 'POST',\n\t\tasync: false,\n\t\tdata: {\n\t\t\tgestion_inscripcion: 1,\n\t\t\tid_elect:id \n\t\t},\n\t\tsuccess:function(result0){\n\t\t\t electivas()\n\t\t\t if(result0 =='cupo_max'){\n\t\t\t \talert(\"No se pueden inscribir más personas a este curso\")\n\t\t\t }\n\t\t}\t\n\t})\n}", "function atualizaTelaAlerta() {\n\tvar paginaAtual = $.mobile.activePage.attr('id');\n\tif (paginaAtual == 'pacientes') {\n\t\tatualizaListaPacientes();\n\n\t} else if (paginaAtual == 'monitor') {\n\t\tatualizaMonitor();\n\n\t} else if (paginaAtual == 'tabela') {\n\t\tatualizaTabelaRecente();\n\n\t} else if (paginaAtual == 'graficos') {\n\t\tatualizaTodosGraficos();\n\t}\n\tverificaAlteracaoListaPac();\n\n\tif (pacientesRiscoAlertaAtivado > 0) {\n\t\tif (configuracao.visual) {\n\t\t\talert(\"Pacientes em risco: \" + pacientesRiscoAlertaAtivado);\n\t\t//window.plugins.toast.showLongCenter('Atenção: '+pacientesRiscoAlertaAtivado+' paciente(s) em risco!');\n\t\t}\n\t\tif (configuracao.sonoro) {\n\t\t\tif(!configuracao.barrastatus){\n\t\t\t//navigator.notification.beep(1);\n\t\t\t}\n\t\t}\n\t\tif (configuracao.vibratorio) {\n\t\t\t//navigator.vibrate(1000);\n\t\t}\n\t\tif (configuracao.barrastatus) {\n\t\t\t//window.plugin.notification.local.add({ message: 'Atenção: '+pacientesRiscoAlertaAtivado+' paciente(s) em risco!' });\n\t\t}\n\t}\n}", "function transferer(id){\n\t\n $(\"#titre\").replaceWith(\"<div id='titre2' style='font-family: police2; color: green; font-size: 20px; font-weight: bold; padding-left: 35px;'><iS style='font-size: 25px;'>&curren;</iS> TRANSF&Eacute;RER L'AGENT </div>\");\t\n\n var cle = id;\n var chemin = tabUrl[0]+'public/personnel/vue-agent-personnel';\n $.ajax({\n type: 'POST',\n url: chemin ,\n data:'id='+cle,\n success: function(data) { \n \t var result = jQuery.parseJSON(data); \n \t $(\"#id_personne\").val(id);\n \t $(\"#info_personnel\").html(result);\n \t //PASSER A SUIVANT\n \t $('#ajouter_naissance').animate({\n \t height : 'toggle'\n \t },1000);\n \t $('#contenu').animate({\n \t height : 'toggle'\n \t },1000);\n },\n error:function(e){console.log(e);alert(\"Une erreur interne est survenue!\");},\n dataType: \"html\"\n });\n\n/***************************************************************\n *========= BOUTON ANNULER -- Liste de recherche =============\n ***************************************************************\n ***************************************************************/\n //Annuler l'enregistrement d'une naissance\n $(\"#annuler\").click(function(){\n \t$(\"#annuler\").css({\"border-color\":\"#ccc\", \"background\":\"-webkit-linear-gradient( #555, #CCC)\", \"box-shadow\":\"1px 1px 10px black inset,0 1px 0 rgba( 255, 255, 255, 0.4)\"});\n \tvart= tabUrl[0]+'public/personnel/transfert';\n $(location).attr(\"href\",vart);\n return false;\n });\n}", "function verAcuerdoEspecialBonificaciones(id)\n{\nif(document.getElementById(\"divDatosAcuerdoEspecialBonificaciones\"+id).style.display==\"block\")\n {\n document.getElementById(\"divDatosAcuerdoEspecialBonificaciones\"+id).style.display=\"none\";\n document.getElementById(\"buttonVerDatosAcuerdoEspecialBonificaciones\"+id).innerHTML=\"Ver\";\n }\nelse\n {\n var requerimiento = new RequerimientoGet();\n requerimiento.setURL(\"acuerdobonificaciones/seleccionaracuerdo/ajax/datosAcuerdoBonificaciones.php\");\n requerimiento.addParametro(\"id\",id);\n requerimiento.addListener(respuestaVerDatosAcuerdoEspecialBonificaciones);\n requerimiento.ejecutar();\n }\n\n}", "function _simpan_detail(id){\r\n\t\tunlock('#no_transaksi,#tgl_transaksi')\r\n\t\t$.post('set_detail_trans',{\r\n\t\t\t'no_trans'\t\t:$('#no_transaksi').val(),\r\n\t\t\t'tanggal'\t\t:$('#tgl_transaksi').val(),\r\n\t\t\t'cbayar'\t\t:$('#cbayare').val(),\t\t\t\r\n\t\t\t'nm_barang' \t:$('#'+id+'__nm_barang').val(),\r\n\t\t\t'nm_satuan' \t:$('#'+id+'__nm_satuan').val(),\r\n\t\t\t'jml_trans' \t:$('#'+id+'__jml_transaksi').val(),\r\n\t\t\t'harga_jual'\t:$('#'+id+'__harga_jual').val(),\r\n\t\t\t'ket_trans'\t\t:$('#'+id+'__harga_total').val(),\r\n\t\t\t'expired'\t\t:$('#'+id+'__expired').val(),\r\n\t\t\t'no_id'\t\t\t:$('#aktif').val(),\r\n\t\t\t'batch'\t\t\t:$('#'+id+'__expired').val()\r\n\t\t},function(result){\r\n\t\t\tlock('#no_transaksi,#tgl_transaksi')\r\n\t\t\tif($('#aktif_user').val()<=2) unlock('#tgl_transaksi');\r\n\t\t\t//$('#stat_sim').val(id+'-'+result);\r\n\t\t})\r\n\t}", "cerrarItem(id, titulo){\n\t\taxios.get(`x/v1/ite/item/id/${id}`)\n\t\t.then(res=>{\n\t\t\tconsole.log(res.data.mensaje[0].asignados)\n\t\t\tlet data = []\n\t\t\tres.data.mensaje[0].asignados.filter(e=>{\n\t\t\t\tdata.push(e.nombre)\n\t\t\t})\n\t\t\tdata = data.join('\\n')\n\t\t\tAlert.alert(\n\t\t\t\t`Estas seguro de cerrar ${titulo}, luego no podras abrirlo`,\n\t\t\t\t`los usuarios que quedaran asignados son:\\n ${data}`,\n\t\t\t[\n\t\t\t\t{text: 'Mejor Luego', onPress: () => console.log('OK Pressed')},\n\t\t\t\t{text: 'Si Cerrar', onPress: () => this.confirmaCerrarItem(id)},\n\t\t\t],\n\t\t\t\t{ cancelable: false }\n\t\t\t)\n\t\t})\n\t\t\n\t}", "function cAlert(message, idElementFocus, tipo, fnSuccessName, fnSuccessName2) {\n\n\t// verifica mensaje\n\tvar n = message.length;\n\tvar ancho = 320;\n\tvar alto = 170;\n\tif (n > 40) {\n\t\tancho = 400;\n\t\talto = 200;\n\t}\n\n\t//tipo:0\n\tif (tipo == \"0\") {\n\t\t\n\t\tvar advertencia = '<div id=\"dialog-message\" style=\"display:none;\">'\n\t\t\t\t+ message + '</div>';\n\t\t$(\"body\").append(advertencia);\n\n\t\t// carga dialog\n\t\t$(\"#dialog-message\").dialog({\n\t\t\ttitle : \"Mensaje del sistema\",\n\t\t\twidth : ancho,\n\t\t\theight : alto,\n\t\t\tmodal : true,\n\t\t\tresizable : false,\n\t\t\tcloseText : \"Cerrar\",\n\t\t\tbuttons : {\n\t\t\t\t\"Aceptar\" : function() {\n\t\t\t\t\t\n\t\t\t\t\t//cerrar dialog\n\t\t\t\t\t$(this).dialog(\"close\");\n\t\t\t\t\t\n\t\t\t\t\t//ejecutar funcion\n\t\t\t\t\tif(fnSuccessName != \"\" && fnSuccessName != null){\n\t\t\t\t\t\teval(fnSuccessName);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t},\n\t\t\tclose : function(event, ui) {\n\n\t\t\t\t// elimina dialog\n\t\t\t\t$(\"#dialog-message\").remove();\n\n\t\t\t\t// enfoca control\n\t\t\t\tidElementFocus = \"#\" + $.trim(idElementFocus);\n\t\t\t\t$(idElementFocus).focus();\n\t\t\t}\n\t\t});\n\n\t//tipo:1\n\t} else if (tipo == \"1\") {\n\t\t\n\t\tvar advertencia = '<div id=\"dialog-message\" style=\"display:none;\">'\n\t\t\t\t+ message + '</div>';\n\t\t$(\"body\").append(advertencia);\n\n\t\t$(\"#dialog-message\").dialog({\n\t\t\ttitle : \"Mensaje del sistema\",\n\t\t\twidth : ancho,\n\t\t\theight : alto,\n\t\t\tmodal : true,\n\t\t\tresizable : false,\n\t\t\tcloseText : \"Cerrar\",\n\t\t\tbuttons : {\n\t\t\t\t\"Aceptar\" : function() {\n\t\t\t\t\twindow.location.href = \"inicio.htm\";\n\t\t\t\t}\n\t\t\t},\n\t\t\tclose : function(event, ui) {\n\n\t\t\t\t// elimina dialog\n\t\t\t\t$(\"#dialog-message\").remove();\n\n\t\t\t\twindow.location.href = \"inicio.htm\";\n\t\t\t}\n\t\t});\n\n\t//tipo:2\n\t} else if (tipo == \"2\") {\n\t\t\n\t\tvar advertencia = '<div id=\"dialog-message\" style=\"display:none;\">' + message + '</div>';\n\t\t$(\"body\").append(advertencia);\n\n\t\t$(\"#dialog-message\").dialog({\n\t\t\ttitle : \"Mensaje del sistema\",\n\t\t\twidth : 375,\n\t\t\theight : 200,\n\t\t\tmodal : true,\n\t\t\tresizable : false,\n\t\t\tcloseText : \"Cerrar\",\n\t\t\tbuttons : {\n\t\t\t\t\"Sí, satisfactoriamente\" : function() {\n\t\t\t\t\t\n\t\t\t\t\t//cerrar dialog\n\t\t\t\t\t$(this).dialog(\"close\");\n\t\t\t\t\t\n\t\t\t\t\t//ejecutar funcion\n\t\t\t\t\tif(fnSuccessName != \"\" && fnSuccessName != null){\n\t\t\t\t\t\teval(fnSuccessName);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t},\n\t\t\t\t\"Generar PDF nuevamente\" : function() {\n\t\t\t\t\t\n\t\t\t\t\t//cerrar dialog\n\t\t\t\t\t$(this).dialog(\"close\");\n\t\t\t\t\t\n\t\t\t\t\t//ejecutar funcion\n\t\t\t\t\tif(fnSuccessName2 != \"\" && fnSuccessName2 != null){\n\t\t\t\t\t\teval(fnSuccessName2);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t},\n\t\t\tclose : function(event, ui) {\n\n\t\t\t\t// elimina dialog\n\t\t\t\t$(\"#dialog-message\").remove();\n\n\t\t\t}\n\t\t});\n\t\t\n\t//tipo:3\n\t} else if (tipo == \"3\") {\n\t\t\n\t\tvar advertencia = '<div id=\"dialog-message\" style=\"display:none;\">' + message + '</div>';\n\t\t$(\"body\").append(advertencia);\n\n\t\t$(\"#dialog-message\").dialog({\n\t\t\ttitle : \"Mensaje del sistema\",\n\t\t\twidth : ancho,\n\t\t\theight : alto,\n\t\t\tmodal : true,\n\t\t\tresizable : false,\n\t\t\tcloseText : \"Cerrar\",\n\t\t\tbuttons : {\n\t\t\t\t\"Realizar Nuevo Registro\" : function() {\n\t\t\t\t\t\n\t\t\t\t\t//cerrar dialog\n\t\t\t\t\t$(this).dialog(\"close\");\n\t\t\t\t\t\n\t\t\t\t\t//ejecutar funcion\n\t\t\t\t\tif(fnSuccessName != \"\" && fnSuccessName != null){\n\t\t\t\t\t\teval(fnSuccessName);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t},\n\t\t\t\t\"Ir al Menú Principal\" : function() {\n\t\t\t\t\t\n\t\t\t\t\t//cerrar dialog\n\t\t\t\t\t$(this).dialog(\"close\");\n\t\t\t\t\t\n\t\t\t\t\t//ejecutar funcion\n\t\t\t\t\tif(fnSuccessName2 != \"\" && fnSuccessName2 != null){\n\t\t\t\t\t\teval(fnSuccessName2);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t},\n\t\t\tclose : function(event, ui) {\n\n\t\t\t\t// elimina dialog\n\t\t\t\t$(\"#dialog-message\").remove();\n\n\t\t\t}\n\t\t});\n\t}\n\n}", "function Alert(){\n alert(\"Los datos se han actualizado en la BD ProyectoIntegrador.\")\n}", "function aktifkan(id){\n var th = $('#'+mnu+'TD_'+id).html();\n var dep = $('#'+mnu2+'S').val();\n //alert('d '+dep);\n //return false;\n if(confirm(' mengaktifkan \"'+th+'\"\" ?'))\n $.ajax({\n url:dir,\n type:'post',\n data:'aksi=aktifkan&replid='+id+'&departemen='+dep,\n dataType:'json',\n success:function(dt){\n var cont,clr;\n if(dt.status!='sukses'){\n cont = '..Gagal Mengaktifkan '+th+' ..';\n clr ='red';\n }else{\n viewTB($('#departemenS').val());\n cont = '..Berhasil Mengaktifkan '+th+' ..';\n clr ='green';\n }notif(cont,clr);\n }\n });\n }", "function addNewAlert(data, id, user){\n\t//prepend to #ae-list\n\t$('#ae-list').prepend($('<div class=\"ae-container\">')\n\t\t.append($('<div class=\"ae-container-content\">').text(data.content))\n\t\t.append($('<textarea class=\"ae-container-content-edit\" maxlength=\"175\">'))\n\t\t.append($('<div class=\"ae-container-header\">')\n\t\t\t.append($('<a href=\"#\" class=\"ae-container-edit-button\">').text(\"Edit\")))\n\t\t.append($('<div class=\"ae-container-edits\">')\n\t\t\t.append($('<div>')\n\t\t\t\t.append($('<span>').text(\"Start Date\"))\n\t\t\t\t.append($('<input type=\"date\" class=\"ae-edit-start\">')))\n\t\t\t.append($('<div>')\n\t\t\t\t.append($('<span>').text(\"End Date\"))\n\t\t\t\t.append($('<input type=\"date\" class=\"ae-edit-end\">')))\n\t\t\t.append($('<div>')\n\t\t\t\t.append($('<span>').text(\"Your Name\"))\n\t\t\t\t.append($('<input type=\"text\" class=\"ae-edit-author\">'))))\n\t\t.append($('<div class=\"ae-edit-buttons\">')\n\t\t\t.append($('<button type=\"button\" class=\"ae-edit-cancel\">').text(\"Cancel\"))\n\t\t\t.append($('<button type=\"button\" class=\"ae-edit-submit\">').text(\"Submit\")))\n\t\t.append($('<div style=\"display:none;\" class=\"ae-hidden-id\">').text(id))\n\t\t.append($('<div style=\"display:none;\" class=\"ae-hidden-start\">').text(data.start_date))\n\t\t.append($('<div style=\"display:none;\" class=\"ae-hidden-end\">').text(data.end_date))\n\t\t.append($('<div style=\"display:none;\" class=\"ae-hidden-author\">').text(data.author)));\n}", "function removeAlert(id)\n\t{\n\t\t$('#'+id).css({'border':'1px solid #CECECE'});\n\t\t$('#alert').html('');\n\t}", "function ask(id) {\n if(confirm(\"¿Seguro que deseas borrar esta tarjeta?\")){\n location.href = '../scritps/borrar.php?eliminar='+id;\n }\n}", "function add_alert_details(msg_dec){\n\tvar img=msg_dec[\"img\"];\n\tvar mid=msg_dec[\"mid\"];\n\tvar rm=msg_dec[\"rm_string\"];\n\t// fill element with details\n\n\t// show text info\n\tvar date_txt=$(\"#alert_\"+mid+\"_\"+msg_dec[\"id\"]+\"_date\");\n\tif(!date_txt.length){\n\t\tconsole.log(\"get_alarm_details view not found\");\n\t} else {\n\t\tvar a = new Date(parseFloat(msg_dec[\"f_ts\"])*1000);\n\t\tvar min = a.getMinutes() < 10 ? '0' + a.getMinutes() : a.getMinutes();\n\t\tvar hour = a.getHours();\n\t\tdate_txt.text(\"\"+a.getDate()+\".\"+(a.getMonth()+1)+\".\"+a.getFullYear()+\" \"+hour+\":\"+min);\n\t\tdate_txt.addClass(\"m2m_text\");\n\t}\t\t\n\n\t// show status button\n\tvar status_button=$(\"#alert_\"+mid+\"_\"+msg_dec[\"id\"]+\"_status\");\n\tstatus_button.click(function(){\n\t\tvar txt=rm;\n\t\treturn function(){\n\t\t\ttxt2fb(format_rm_status(txt));\n\t\t};\n\t}());\n\tstatus_button.show();\n\n\t// show ack status\n\tvar ack_status=$(\"#alert_\"+mid+\"_\"+msg_dec[\"id\"]+\"_ack_status\");\n\tif(msg_dec[\"ack\"]==0){\n\t\tack_status.text(\"Not acknowledged\");\n\t} else {\n\t\tvar a = new Date(parseFloat(msg_dec[\"ack_ts\"])*1000);\n\t\tvar min = a.getMinutes() < 10 ? '0' + a.getMinutes() : a.getMinutes();\n\t\tvar hour = a.getHours();\n\t\tack_status.html(\"Checked by '\"+msg_dec[\"ack_by\"]+\"'<br> at \"+hour+\":\"+min+\" \"+a.getDate()+\".\"+(a.getMonth()+1)+\".\"+a.getFullYear());\n\t};\n\tack_status.addClass(\"m2m_text\");\n\tack_status.show();\n\n\t// show ack button\n\tif(msg_dec[\"ack\"]==0){\n\t\tvar ack_button=$(\"#alert_\"+mid+\"_\"+msg_dec[\"id\"]+\"_ack\");\n\t\tack_button.show();\n\t};\n\n\t// show del button\n\tif(msg_dec[\"ack\"]!=0){\n\t\tvar del_button=$(\"#alert_\"+mid+\"_\"+msg_dec[\"id\"]+\"_del\");\n\t\tdel_button.show();\n\t};\n\n\t// show send button\n\tvar send_button=$(\"#alert_\"+mid+\"_\"+msg_dec[\"id\"]+\"_send\");\n\tsend_button.show();\n\t\n\n\t// add new placeholder image\n\tif(img.length>0){\n\t\t// this is picture nr 1 the title picture\n\t\tvar pic=$(\"#alert_\"+mid+\"_\"+msg_dec[\"id\"]+\"_img\");\t\t\n\t\tpic.attr({\n\t\t\t\"id\":img[0][\"path\"],\n\t\t\t\"style\":\"cursor:pointer\"\n\t\t});\n\t\tpic.click(function(){\n\t\t\tvar img_int=img; \t\t\t\t\t\t\t\t// list of all pictures for this alarm\n\t\t\tvar mid_int=mid;\t \t\t\t\t\t\t\t// mid for this alarm\n\t\t\tvar slider_id=\"#alert_\"+mid_int+\"_\"+msg_dec[\"id\"]+\"_slider\";\t\t\t// id for the div in which the slider should\n\t\t\tvar core_int=img[0][\"path\"].substr(0,img[0][\"path\"].indexOf(\".\"));\t\t// slider itself must have an unique id without \".\"\n\t\t\treturn function(){\n\t\t\t\tshow_pic_slider(img_int,mid_int,core_int,slider_id);\n\t\t\t}\n\t\t}());\n\t\t\n\t\t// request picture from server\n\t\tvar path=img[0][\"path\"];\n\t\tvar width=$(\"#\"+mid+\"_alarms\").width()*0.5; // 50% of the width of the alert box\n\t\tvar cmd_data = { \"cmd\":\"get_img\", \"path\":path, \"width\":width, \"height\":width*720/1280};\n\t\tcon.send(JSON.stringify(cmd_data));\n\t} // end of if img \n}", "function aktifkan(id){\n \tvar th = $('#'+mnu+'TD_'+id).html();\n \tvar dep = $('#'+mnu2+'S').val();\n \t//alert('d '+dep);\n \t//return false;\n if(confirm(' mengaktifkan \"'+th+'\"\" ?'))\n $.ajax({\n url:dir,\n type:'post',\n data:'aksi=aktifkan&replid='+id+'&departemen='+dep,\n dataType:'json',\n success:function(dt){\n var cont,clr;\n if(dt.status!='sukses'){\n cont = '..Gagal Mengaktifkan '+th+' ..';\n clr ='red';\n }else{\n viewTB($('#departemenS').val());\n cont = '..Berhasil Mengaktifkan '+th+' ..';\n clr ='green';\n }notif(cont,clr);\n }\n });\n }", "function aktifkan(id){\n \tvar th = $('#'+mnu+'TD_'+id).html();\n \tvar dep = $('#'+mnu2+'S').val();\n \t//alert('d '+dep);\n \t//return false;\n if(confirm(' mengaktifkan \"'+th+'\"\" ?'))\n $.ajax({\n url:dir,\n type:'post',\n data:'aksi=aktifkan&replid='+id+'&departemen='+dep,\n dataType:'json',\n success:function(dt){\n var cont,clr;\n if(dt.status!='sukses'){\n cont = '..Gagal Mengaktifkan '+th+' ..';\n clr ='red';\n }else{\n viewTB($('#departemenS').val());\n cont = '..Berhasil Mengaktifkan '+th+' ..';\n clr ='green';\n }notif(cont,clr);\n }\n });\n }", "function alertId(id) {\n\tvar node = $(id);\n\tif(node) alert(node.innerHTML);\n}", "function confirmDelete(id) {\n\t// preguntamos cn un confirm si desea completar la accion\n\tvar r = confirm(\"¿Estas seguro de eliminar este registro?\");\n\n\tif (r == true) {\n\t\t// si es cierta la confirmacion manda sumada en la url por metodo get el id seleccionado para eliminar del registro\n\t\twindow.location.href = \"formulario.php?eliminar&id=\" + id;\n\t\tsetTimeout(recargar, 1500);\n\t}\n}", "function ambilId(id) {\n dbprom.then((db) => {\n let tx = db.transaction('produk'); //buat obj transaksi\n let dbStore = tx.objectStore('produk'); //pilih table\n let index = dbStore.index('id'); //pilih index\n return index.get(id); //cari berdasarkan index\n }).then((data) => {\n $('#eNama').val(data.nama); //masukan hasil pencarian ke tampilan form nama\n $('#eHarga').val(data.harga); //masukan hasil pencarian ke tampilan form harga\n $('#eStok').val(data.stok);\n $('#eDeskripsi').val(data.deskripsi);\n $('#eId').val(data.id); //!! eId diset dengan suatu nilai id yang akan diubah\n $('#modForm').modal('show'); //tampilkan modal\n }).catch((err) => {\n console.log('error ' + err);\n });\n}", "function eliminarEmpleado(id){\n \nalertify.confirm(\"Espera\",\"¿Esta seguro que desea eliminar este empleado?\",\n function(){\n \n $.ajax({\n url:'empleados/eliminarEmpleado',\n type:'post',\n data:{id:id}\n })\n .done(function(response){\n alertify.success(\"Eliminado\")\n location.reload();\n })\n .fail(function(err){\n console.log(\"ha ocurrido un error\")\n })\n},\nfunction(){\n// alertify.error('Cancel');\n});\n}", "function verAcuerdoBonificaciones(id)\n{\nif(document.getElementById(\"divDatosAcuerdoBonificaciones\"+id).style.display==\"block\")\n {\n document.getElementById(\"divDatosAcuerdoBonificaciones\"+id).style.display=\"none\";\n document.getElementById(\"buttonVerDatosAcuerdoBonificaciones\"+id).innerHTML=\"Ver\";\n }\nelse\n {\n var requerimiento = new RequerimientoGet();\n requerimiento.setURL(\"acuerdobonificaciones/seleccionaracuerdo/ajax/datosAcuerdoBonificaciones.php\");\n requerimiento.addParametro(\"id\",id);\n requerimiento.addListener(respuestaVerDatosAcuerdoBonificaciones);\n requerimiento.ejecutar();\n }\n\n}", "function activar(per_id){\n\tbootbox.confirm(\"¿Esta seguro de activar la persona?\",function(result){\n\t\tif (result) {\n\t\t\t$.post(\"../ajax/persona.php?op=activar\", {per_id : per_id}, function(e){\n\t\t\t\tbootbox.alert(e);\n\t\t\t\ttabla.ajax.reload();\n\t\t\t});\n\t\t}\n\t})\n}", "function ricaricaContiPerCausale(){\n var selectCausaleEP = $(\"#uidCausaleEP\");\n $.postJSON(baseUrl + \"_ottieniListaConti.do\", {\"causaleEP.uid\": selectCausaleEP.val()})\n .then(function(data) {\n if(impostaDatiNegliAlert(data.errori, alertErrori)) {\n return;\n }\n aggiornaDatiScritture (data);\n });\n }", "function mostrarNombreCliente(){\n\tvar idc=$(\"#combito\").val();\n\tif(idc != 0){ \n\t$(\"#alerta_cliente\").empty();\n\t$(\"#alerta_cliente\").css(\"display\", \"block\");\n\t$.post(\"/listar_fila_cliente\",{idc:idc}, function(data){\n\t\tconsole.log(data)\n\t\tvar d = JSON.parse(data)\n\t\n\t\t$(\"#alerta_cliente\").append(\"<p>\"+'Excelente! elegiste a '+\" \"+d[0].nombres+\" \"+d[0].apellidos+\"</p>\");\n\t});\n\t\n\t}else{\n\t\t$(\"#alerta_cliente\").empty();\n\t\t$(\"#alerta_cliente\").css(\"display\", \"block\");\n\t\t$(\"#alerta_cliente\").append(\"<p style='color:red; font-weight: bold;'>\"+' No has seleccionado ningún cliente' +\"</p>\");\n\t\t// lo que tiene que ver con el color del alert aun no se ha configurado \n\t}\n\t\n}", "function show_window_alerts(){\r\n\thide_alert();\r\n\tconst url = new URL(window.location.href);\r\n\tif ( url.searchParams.get(\"alert\") ){\r\n\t\tlet msg ='';\r\n\r\n\t\tswitch( url.searchParams.get(\"alert\") ){\r\n\t\t\tcase '0':\r\n\t\t\t\tmsg = \"הרשומה נוספה בהצלחה! מספר מזהה: \"+url.searchParams.get(\"id\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '1':\r\n\t\t\t\tmsg = \"הפרטים עודכנו בהצלחה!\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase '2':\r\n\t\t\t\tmsg = \"תלמיד מס' \"+url.searchParams.get(\"id\") +\"נמחק בהצלחה!\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase '3':\r\n\t\t\t\tmsg = \"לא ניתן למחוק !\" +url.searchParams.get(\"err\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '4':\r\n\t\t\t\tmsg = url.searchParams.get(\"err\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '5':\r\n\t\t\t\tmsg = \"משתמש לא קיים!\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tshow_alert( msg );\r\n\t};\r\n}", "function alerta(div,estado,mensaje,modal)\n{\n\tvar clase,icono,msj,edo;\n\tif ( estado == 'error' ) {\n\t\ticono = \"fa-times\";\n\t\tclase = \"alert-danger\";\n\t\tmsj = mensaje;\n\t\tedo = \"Error!\";\n\t\ttime = 5000;\n\t}\n\tif ( estado == 'success') {\n\t\ticono = \"fa-check\";\n\t\tclase = \"alert-success\";\n\t\tmsj = mensaje;\n\t\tedo = \"Éxito!\";\n\t\ttime = 3000;\n\t}\n\tvar contenedor = \n\t'<div class=\"row\">'+\n\t\t'<div class=\"col-md-12\">'+\n\t\t\t'<div class=\"alert '+clase+' \">'+\n\t\t\t\t'<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>'+\n\t\t\t\t'<h4><i class=\"icon fa '+icono+'\"></i> '+edo+'</h4>'+\n\t\t\t\t'<p> '+msj+' </p>'+\n\t\t\t'</div>'+\n\t\t'</div>'+\n\t'</div>';\n\t$('#'+div).html(contenedor);\n\tlocation.href = \"#\"+div;\n\tsetTimeout(function() {\n\t\t$('#'+div).html(\"\");\n\t\tif ( modal != '' ) {\n\t\t\t$('#'+modal).modal('hide');\n\t\t}\n\t},time);\n\treturn false;\n}", "function verificaReporte(idtabla,opt)\n{ \n window.db.transaction(function(txt2){\n txt2.executeSql(\"SELECT tables.nombre, item.status FROM jb_dinamic_tables tables,item_listview item WHERE tables.id=\\'\"+idtabla+\"\\' and tables.nombre=item.nombre;\",[],function(txt, results){\n for (var i = 0; i < results.rows.length; i++) {\n var p = results.rows.item(i);\n //console.log(p);\n if ( p.status == 1) {\n $('#reportProceso_'+idtabla).empty();\n $('#reportProceso_'+idtabla).append('Iniciado');\n $('#reportProceso_'+idtabla).removeAttr('style')\n $('#reportProceso_'+idtabla).attr('style','color:rgb(229, 165, 0);')\n $('#id_reporte_'+idtabla).removeAttr('data');\n $('#id_reporte_'+idtabla).attr('data',p.status)\n }else if (p.status == 2) {\n $('#id_reporte_'+idtabla).removeAttr('data');\n $('#id_reporte_'+idtabla).attr('data',p.status);\n $('#reportProceso_'+idtabla).empty();\n $('#reportProceso_'+idtabla).append('Terminado');\n $('#reportProceso_'+idtabla).removeAttr('style');\n $('#reportProceso_'+idtabla).attr('style','color:rgb(48, 150, 48);');\n $('#id_reporte_'+idtabla).removeAttr('onclick');\n $('#id_reporte_'+idtabla).attr('onclick','visualisaRepor(\\''+localStorage['idreporte']+'\\',\\''+p.nombre+'\\',\\''+idtabla+'\\',0)');\n $('#id_reporte_'+idtabla+' a').removeAttr('href');\n $('#id_reporte_'+idtabla+' a').attr('href','#vistaRepor');\n }\n if (opt == 1) {\n setTimeout(function(){\n $('#bntHistorial').removeAttr('onclick');\n $('#bntHistorial').removeAttr('onclick');\n $('#bntHistorial').attr('onclick','visualisaRepor(\\''+localStorage['idreporte']+'\\',\\''+p.nombre+'\\',\\''+idtabla+'\\')');\n $('#bntHistorial').removeAttr('href');\n $('#bntHistorial').attr('href','#vistaRepor');\n $('#bntHistorial').show();\n },200);\n }\n if (opt == 2) {\n //console.log(opt+\" jaksjaksjaks\");\n setTimeout(function(){\n $('#bntHistorial').removeAttr('onclick');\n $('#bntHistorial').removeAttr('onclick');\n $('#bntHistorial').attr('onclick','visualisaRepor(\\''+localStorage['idreporte']+'\\',\\''+p.nombre+'\\',\\''+idtabla+'\\',0)');\n $('#bntHistorial').removeAttr('href');\n $('#bntHistorial').attr('href','#vistaRepor');\n $('#bntHistorial').show();\n },100);\n }\n }\n });\n });\n}", "function contrata(){\n url = '..\\\\negocio\\\\registrar-contrato.php';\n adjunto = {'id_usuario': id_usuario,\n 'tipo_usuario': tipo_usuario,\n 'nombre_servicio': document.getElementById('salida_nombre').innerHTML};\n $.post(url, adjunto)\n .done(function(respuesta){\n if(respuesta > 0){//debe ser el id del contrato----------------OJO!!\n alert('ENHORABUENA! ya has contratado el servicio.');\n }else {\n alert('LO SENTIMOS NO has podido contratar el servicio.');\n }\n desactivar_contratar(respuesta);\n mostrar_contratos_en_vigor();//OJO esta debe ser la última sentencia\n });\n}", "function criarId(id) {\n // console.log(id);\n var cd = id;\n event.preventDefault();\n console.log('Tentando enviar o formulário');\n $.ajax({\n url: \"paginas/recursos/salvar-comentario.php\",\n type: \"POST\",\n data: {\n chave: 'valorizado demais esse AJAX!!',\n comentario: $(\"#\" + cd).val(),\n id: $(\"#\" + cd).attr('id')\n },\n success: function success(result) {\n $(\"#\" + cd).val(\"\"); // resultado = JSON.parse(result);\n // $.each(resultado, function (i, contato) {\n // });\n // $( \"#log-de-ceps\").append('<p>' + result + '</p>' );\n },\n error: function error(result) {\n console.error(result);\n }\n });\n}", "function prepareButton(id) {\n\t// alert(\"preparing button3\");\n\tif (document.getElementById(id) != null) { // userindex.jsp -->\n\t\t// applicantlist.jsp, wenn\n\t\t// Button gedrueckt wurde\n\t\t// alert(\"idneuneu= \"+id);\n\t\tdocument.getElementById(id).onclick = function() {\n\t\t\twindow.location = 'applicantlist.jsp?AID=' + id;\n\t\t};\n\t}\n}", "function seleccionarBicicleta1(id, marca){\n //console.log(id,marca);\n localStorage.setItem(\"idBicicleta\",id);\n localStorage.setItem(\"marcaBicicleta\",marca);\n var objeto=document.getElementById(\"messageBaja\");\n objeto.innerText=\"¿Estas seguro de querer eliminar la bicicleta \"+marca+\"?\";\n}", "alert(data) {\n let { title, msg, date, type } = data;\n let config = this.options[type];\n if (!config)\n return;\n let { id, token } = config;\n if (!id || !token)\n return;\n this.eris.executeWebhook(id, token, {\n embeds: [\n {\n description: msg,\n footer: { text: this.instanceID },\n timestamp: date.toString(),\n title,\n },\n ],\n });\n return Promise.resolve();\n }", "function mensaje(){\n\n\talert(\"Mensaje de Bienvenida\");\n}", "function agregarDetalle(codigo,idproducto,producto,stock,idalmacen)\n {\n\t\tfixBootstrapModal();\n \tif (stock!=0){\n\t\t\t\tswal({\n\t\t\t\t title: 'Ingresa Cantidad:',\n\t\t\t\t input: 'number',\n\t\t\t\t inputPlaceholder: ''\n\t\t\t\t}).then(function (number) {\n\t\t\t\t\tvar cantidad=number;\n if ((Number(cantidad)>0)&&(Number(cantidad)!=\"\")) {\n if ((idproducto!=\"\")&&(Number(stock)>=Number(cantidad))) {\n\n var subtotal=cantidad;\n var fila='<tr class=\"filas\" id=\"fila'+cont+'\">'+\n '<td><button type=\"button\" id=\"elim\" class=\"btn btn-danger\" onclick=\"eliminarDetalle('+cont+')\">X</button></td>'+\n '<td><input type=\"text\" name=\"codigo[]\" value=\"'+codigo+'\" required=\"\"></td>'+\n '<td><input type=\"hidden\" name=\"idproducto[]\" value=\"'+idproducto+'\" required=\"\">'+producto+'</td>'+\n '<td><input type=\"number\" name=\"cantidad[]\" value=\"'+cantidad+'\" required=\"\"></td>'+\n '<td><span name=\"subtotal\" id=\"subtotal'+cont+'\">'+subtotal+'</span></td>'+\n '<td><input type=\"hidden\" name=\"idalmacen[]\" value=\"'+idalmacen+'\" required=\"\"></td>'+\n '<td><input type=\"hidden\" name=\"stock[]\" value=\"'+stock+'\" required=\"\"></td>'+\n '<td><button type=\"button\" onclick=\"modificarSubototales()\" class=\"btn btn-warning\"><i class=\"fa fa-refresh\"></i></button></td>'+\n '</tr>';\n cont++;\n detalles=detalles+1;\n $('#detalles').append(fila);\n modificarSubototales();\n\n } else {\n swal({\n type: 'error',\n title: 'Oops...',\n text: 'Stock Superado',\n }).catch(swal.noop);\n }\n }else {\n swal({\n type: 'error',\n title: 'Oops...',\n text: 'Ingresa una cantidad correcta! ',\n }).catch(swal.noop);\n }\n\t\t\t\t}).catch(swal.noop);\n }else {\n swal({\n type: 'error',\n title: 'Oops...',\n text: 'Insuficiente Stock disponible',\n }).catch(swal.noop);\n }\n }", "function confirmation(id){\n $( \"#confirmationSuppression\" ).dialog({\n resizable: false,\n height:170,\n width:405,\n autoOpen: false,\n modal: true,\n buttons: {\n \"Oui\": function() {\n $( this ).dialog( \"close\" );\n \n var cle = id;\n var chemin = '/simens/public/pharmacie/supprimer';\n $.ajax({\n type: 'POST',\n url: chemin , \n data:'id='+cle,\n success: function(data) { \n \t var result = jQuery.parseJSON(data);\n \t $(\"#\"+cle).fadeOut(function(){$(\"#\"+cle).empty();});\n \t $(\"#compteur\").html(result);\n \t \n },\n error:function(e){console.log(e);alert(\"Une erreur interne est survenue!\");},\n dataType: \"html\"\n });\n \t //return false;\n \t \n },\n \"Annuler\": function() {\n $( this ).dialog( \"close\" );\n }\n }\n });\n}", "function eliminarCentro(id, estado) {\n var mensaje = {};\n if (estado == 1) {\n mensaje = \"<img src=\\\"/landing/images/alert1.svg\\\" height=\\\"20\\\" class=\\\"mr-1 mt-0\\\">Centro de costo en uso <br>¿Desea eliminar centro costo?\";\n } else mensaje = \"¿Desea eliminar centro costo?\";\n alertify\n .confirm(mensaje, function (\n e\n ) {\n if (e) {\n $.ajax({\n type: \"POST\",\n url: \"/eliminarCentro\",\n data: {\n id: id\n },\n headers: {\n \"X-CSRF-TOKEN\": $('meta[name=\"csrf-token\"]').attr(\"content\"),\n },\n statusCode: {\n 401: function () {\n location.reload();\n },\n /*419: function () {\n location.reload();\n }*/\n },\n success: function (data) {\n centroCostoOrganizacion();\n $.notifyClose();\n $.notify({\n message: '\\nCentro Costo eliminado',\n icon: 'landing/images/bell.svg',\n }, {\n icon_type: 'image',\n allow_dismiss: true,\n newest_on_top: true,\n delay: 6000,\n template: '<div data-notify=\"container\" class=\"col-xs-8 col-sm-2 text-center alert\" style=\"background-color: #f2dede;\" role=\"alert\">' +\n '<button type=\"button\" aria-hidden=\"true\" class=\"close\" data-notify=\"dismiss\">×</button>' +\n '<img data-notify=\"icon\" class=\"img-circle pull-left\" height=\"15\">' +\n '<span data-notify=\"title\">{1}</span> ' +\n '<span style=\"color:#a94442;\" data-notify=\"message\">{2}</span>' +\n '</div>',\n spacing: 35\n });\n },\n error: function () { },\n });\n }\n })\n .setting({\n title: \"Eliminar Centro Costo\",\n labels: {\n ok: \"Aceptar\",\n cancel: \"Cancelar\",\n },\n modal: true,\n startMaximized: false,\n reverseButtons: true,\n resizable: false,\n closable: false,\n transition: \"zoom\",\n oncancel: function (closeEvent) {\n centroCostoOrganizacion();\n },\n });\n}", "function saludo() {\n alert(\"Bienvenido\");\n }", "function poliyaId(id){\n oqituvchiService.getById(id,malumotQuy,console.log(\"xato\")); \n}", "function showAlert(id, txtid, msg) {\n $(id).removeClass('hidden');\n $(txtid).text(msg);\n }", "function procesar_plantilla(idPlantilla,idEmpresa)\n{ \n if (typeof localStorage['idPlantilla_activa'] === 'undefined' && typeof localStorage['idEmpresa'] === 'undefined') {\n localStorage['idPlantilla_activa'] = idPlantilla;\n localStorage['idEmpresa'] = idEmpresa;\n }\n $('#tit_report_sec').empty();\n $('#tit_report_sec').append(''+localStorage['nombrePlantilla_activa']+'');\n\n if( typeof localStorage['idreporte'] !== \"undefined\" && localStorage['idreporte'] != \"\" ) {\n listreport();\n $('body #btnGps').show();\n $('body #btnPublicar').show();\n $('body #imgProfile').attr('onclick','backtodoor(1);');\n //console.log('si definido'+localStorage['idreporte']);\n }\n else{\n $('body #btnGps').show();\n $('body #btnPublicar').show();\n $('body #imgProfile').attr('onclick','backtodoor(1);');\n var id_suc = $(\"#nom_sucursal\").attr('value');\n var id_grp = $('#grup_select').val();\n var nom_suc;\n if ($('#nom_sucursal').is(':visible')) {\n nom_suc = $('#nom_sucursal').val();\n if (nom_suc=='') {\n var notsucu=1;\n }else\n {\n var notsucu=0\n }\n }else\n {\n nom_suc = \"\";\n var notsucu=0;\n }\n\n if (id_grp != 'Selecciona un grupo' && notsucu == 0) {\n $('#ligaSegReport').attr('href','#reportes-sec');\n var status=0;\n var fecha = genFecha();\n var id = genera_id();\n var resultado=0;\n\n if (typeof localStorage['idreporte'] === \"undefined\") {\n var idrepor = 0;\n }else { \n var idrepor = localStorage['idreporte'];\n }\n\n window.db.transaction(function(txt){\n txt.executeSql(\"SELECT nombre FROM reporte_mantenimiento where id=\\'\"+idrepor+\"\\'\",[],function(txt, results){\n if (results.rows.length != 1) {\n txt.executeSql(\"INSERT INTO reporte_mantenimiento(status,resultado,nombre,id_usuario,id_grupo,id_plantilla,id,fecha) VALUES(\\'\"+status+\"\\',\\'\"+resultado+\"\\',\\'\"+nom_suc+\"\\',\\'\"+session.idUsuario+\"\\',\\'\"+id_grp+\"\\',\\'\"+localStorage['idPlantilla_activa']+\"\\',\\'\"+id+\"\\',\\'\"+fecha+\"\\');\");\n }\n });\n });\n $('#tit_report_sec').empty();\n localStorage['idreporte']=id;\n localStorage['nomsucursal']=nom_suc;\n localStorage['idGrupo']= id_grp;\n listreport(); \n }else\n {\n alert('Captura lo adecuado.');\n $('#ligaSegReport').removeAttr('href');\n }\n }\n}", "function receberCrediario(id){\n if (id === null){\n alert(\"Não foi informado cliente\");\n }else{\n $.get(\"DAO/consultaCliente.php\", \"pesquisa=\"+id, function (data) {\n let retorno = JSON.parse(data);\n\n exibirModalCrediario(retorno);\n })\n }\n}", "function enviaDatosAeliminar($id){\n\t$('input[name=idue]').val($id);\n\tvar nombre=$('input[name=n'+$id+']').val();\n\t$('#n2').html(\"¿Esta seguro de eliminar estos datos?\",{});\n\t\t\t\t\t\t$('#Eliminado').html('',{});\n\t}", "function desactivar(idips)\n{\n Swal.fire({\n title: '¿Estas Seguro de Desactivar?',\n text: \"El estado del Teclado!\",\n icon: 'warning',\n showCancelButton: true,\n confirmButtonColor: '#3085d6',\n cancelButtonColor: '#d33',\n confirmButtonText: 'Si, Desactivar!'\n }).then((result) => {\n if (result.isConfirmed) {\n $.post(\"../../ajax/xips.php?op=desactivar\",{idips : idips}, function(e){\n //alert(e)\n Swal.fire(\n 'Desactivado!',\n 'El estado del Teclado',\n 'success'\n )\n tabla.ajax.reload();\n });\n }\n })\n}", "function eliminarPaciente(id) {\n Swal.fire({\n title: 'Eliminar el paciente ?',\n text: 'Seguro que quiere eliminar el paciente seleccionado?',\n icon: 'warning',\n showCloseButton: true,\n showCancelButton: true,\n confirmButtonText: 'Eliminar',\n cancelButtonText: 'Cancelar'\n }).then((result) => {\n if (result.value) {\n let httpRequest = new XMLHttpRequest();\n httpRequest.open('POST', '../consultas_ajax.php', true);\n httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n httpRequest.onreadystatechange = function () {\n if (httpRequest.readyState === 4) {\n if (httpRequest.status === 200) {\n Swal.fire(\n 'Enhorabuena!',\n 'El Paciente seleccionado ha sido eliminado',\n 'success'\n );\n verUsuarios();\n }\n }\n };\n httpRequest.send('delete_paciente=' + id);\n }\n })\n}", "function verAlertas() {\n let httpRequest = new XMLHttpRequest();\n httpRequest.open('POST', '../consultas_ajax.php', true);\n httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n httpRequest.onreadystatechange = function () {\n if (httpRequest.readyState === 4) {\n if (httpRequest.status === 200) {\n document.getElementById('alertas').innerHTML = httpRequest.responseText;\n }\n }\n };\n httpRequest.send('verAlertas=');\n\n\n}", "function borrar () {\n var id;\n $('#datatable').on('click', '.borrar', function (event) {\n $this = $(this);\n id = $(this).attr('data-id');\n event.preventDefault();\n borrarModalInit();\n $('#modalBorrar').modal('show');\n $('#modalBorrar .action').click(function () {\n $('#modalBorrar .modal-footer button').unbind('click');\n loaderModalInit();\n $.ajax({\n type:'post',\n url: BASE_URL+'admin/php/erasers/stock.eraser.php',\n data:{'id':id},\n success: function (response) {\n $('#modalBorrar').modal('hide');\n if (response.success) {\n $this.parents('tr').fadeOut(\n 500,\n function () {\n $this.parents('tr').remove();\n if ($('#datatable tbody tr').length == 0) {\n dataTable.ajax.reload();\n }\n }\n );\n } else {\n Box.small({title: response.error}).error().show();\n }\n }\n });\n });\n });\n }", "function actualizarProducto(id, estado) {\n swal.fire({\n title: 'Esta seguro?',\n text: \"Este registro se actualizara!\",\n type: 'warning',\n showCancelButton: true,\n confirmButtonColor: '#3085d6',\n cancelButtonColor: '#d33',\n confirmButtonText: \"Si, actualizar!\"\n }).then(function (result) {\n if (result.value) {\n $.ajax({\n url: \"/actualizarProducto\",\n type: \"GET\",\n data: {id: id, estado: estado},\n success: function (data) {\n if (data === 'success') {\n redirect('Productos');\n actualizado();\n } else {\n redirect('Productos');\n error();\n }\n }\n });\n }\n })\n}", "function gestioneSoggettoAllegato() {\n var overlay = $('#sospendiTuttoAllegatoAtto').overlay('show');\n // Pulisco i dati\n $(\"#datiSoggettoModaleSospensioneSoggettoElenco\").html('');\n $(\"#modaleSospensioneSoggettoElenco\").find('input').val('');\n // Nascondo gli alert\n datiNonUnivociModaleSospensioneSoggetto.slideUp();\n alertErroriModaleSospensioneSoggetto.slideUp();\n\n $.postJSON('aggiornaAllegatoAtto_ricercaDatiSospensioneAllegato.do')\n .then(handleRicercaDatiSoggettoAllegato)\n .always(overlay.overlay.bind(overlay, 'hide'));\n }", "function confirmar_individual(mensaje,$link){\n var mensaje_final = \"<div style='padding: 20px;'><b style='color: #004040;font-size: medium;'>\"+mensaje+\"</b></div>\";\n\talertify.confirm(mensaje_final, function (e) {\n\t\tif (e) {\n location.href = $link;\n\t\t} else { \n alertify.error(\"Operaci&oacute;n cancelada\");\n \t} \n\t});\t \n}", "function initClickDetalle(id) {\n\n// reviso si la lista de recomendaciones está abierta y la cierro si hace falta\n\t$(\"#modDetalleViaje\").modal('show');\n var url;\n if(id.data.origen==\"aceptado\"){\n \turl = '/api/me/accepted-trips/'\n \t$(\"#modDetalleViaje #btnRecomendarViaje\").hide();\n }else{\n \turl = '/api/me/created-trips/'\n \t$(\"#modDetalleViaje #btnRecomendarViaje\").show();\n }\n\t\n if (typeof $(\"#modListaRecomendaciones\").data(\"bs.modal\") != 'undefined' && $(\"#modListaRecomendaciones\").data(\"bs.modal\").isShown) {\n $(\"#modListaRecomendaciones\").modal(\"hide\");\n }\n \n console.log('El viaje a recomendar es: ' + id.data.id);\n idViajeARecomendar = id.data.id;\n \n var precio;\n var desde;\n var hasta;\n\n $.ajax({\n url: url + id.data.id,\n dataType: 'json',\n success: function (data) {\n \tvar resptrip = data.tripDetails;\n console.log(\"Respuesta trip\");\n console.log(resptrip);\n precio = resptrip.priceDetail.total+\" \"+resptrip.priceDetail.currency;\n desde = resptrip.fromCity.name;\n hasta = resptrip.toCity.name;\n var des = desde.split(\",\");\n var has = hasta.split(\",\");\n var titulo = \"\\u00A1Tu viaje desde \" + des[0]+\",\"+des[2] + \" hasta \" + has[0]+\",\"+has[2] + \"!\";\n $(\"div[id=modDetalleViaje] h4\").html(titulo);\n var enter = \"<br>\";\n var itinerario = '<u><strong><font size=\"3\">Itinerario de Ida: </font></strong></u>'+enter;\n var fechaSalida;\n var fechaLlegada;\n $.each(resptrip.outboundItinerary, function (index, value) {\n \tfechaSalida = new Date(value.departure);\n fechaLlegada = new Date(value.arrival);\n if (fechaSalida.toString(\"dd/MM/yyyy\") == fechaLlegada.toString(\"dd/MM/yyyy\")) {\n itinerario = itinerario + \"<strong>--</strong>Sal\\u00eds el \" + fechaSalida.toString(\"dd/MM/yyyy\") + \" desde \" + value.fromAirport.name + \" a las \" + fechaSalida.toString(\"HH:mm\") + \" hs \" +\n \"y lleg\\u00e1s a \" + value.toAirport.name + \" a las \" + fechaLlegada.toString(\"HH:mm\") + \" hs del mismo d\\u00eda.\";\n itinerario = itinerario + enter + \"<strong>Aerol\\u00EDnea:</strong> \" + value.airline.name + \".\";\n itinerario = itinerario + enter + \"<strong>N\\u00FAmero de vuelo:</strong> \" + value.flightid + \".\";\n itinerario = itinerario + enter + \"<strong>Duraci\\u00F3n del vuelo:</strong> \" + value.duration + \" hs.\";\n \n }\n else\n {\n itinerario = itinerario + \"<strong>--</strong>Sal\\u00eds el \" + fechaSalida.toString(\"dd/MM/yyyy\") + \" desde \" + value.fromAirport.name + \" a las \" + fechaSalida.toString(\"HH:mm\") + \" hs \" +\n \"y lleg\\u00e1s el \" + fechaLlegada.toString(\"dd/MM/yyyy\") + \" a \" + value.toAirport.name + \" a las \" + fechaLlegada.toString(\"HH:mm\") +\" hs.\";\n itinerario = itinerario + enter + \"<strong>Aerol\\u00EDnea:</strong> \" + value.airline.name + \".\";\n itinerario = itinerario + enter + \"<strong>N\\u00FAmero de vuelo:</strong> \" + value.flightid + \".\";\n itinerario = itinerario + enter + \"<strong>Duraci\\u00F3n del vuelo:</strong> \" + value.duration + \" hs.\";\n \n }\n itinerario = itinerario + enter;\n });\n itinerario = itinerario + enter + '<u><strong><font size=\"3\">Itinerario de Vuelta: </font></strong></u>'+enter;\n $.each(resptrip.inboundItinerary, function (index, value) {\n \tfechaSalida = new Date(value.departure);\n fechaLlegada = new Date(value.arrival);\n if (fechaSalida.toString(\"dd/MM/yyyy\") == fechaLlegada.toString(\"dd/MM/yyyy\")) {\n itinerario = itinerario + \"<strong>--</strong>Sal\\u00eds el \" + fechaSalida.toString(\"dd/MM/yyyy\") + \" desde \" + value.fromAirport.name + \" a las \" + fechaSalida.toString(\"HH:mm\") + \" hs \" +\n \"y lleg\\u00e1s a \" + value.toAirport.name + \" a las \" + fechaLlegada.toString(\"HH:mm\") + \" hs del mismo d\\u00eda.\";\n itinerario = itinerario + enter + \"<strong>Aerol\\u00EDnea:</strong> \" + value.airline.name + \".\";\n itinerario = itinerario + enter + \"<strong>N\\u00FAmero de vuelo:</strong> \" + value.flightid + \".\";\n itinerario = itinerario + enter + \"<strong>Duraci\\u00F3n del vuelo:</strong> \" + value.duration + \" hs.\";\n }\n else\n {\n itinerario = itinerario + \"<strong>--</strong>Sal\\u00eds el \" + fechaSalida.toString(\"dd/MM/yyyy\") + \" desde \" + value.fromAirport.name + \" a las \" + fechaSalida.toString(\"HH:mm\") + \" hs \" +\n \"y lleg\\u00e1s el \" + fechaLlegada.toString(\"dd/MM/yyyy\") + \" a \" + value.toAirport.name + \" a las \" + fechaLlegada.toString(\"HH:mm\") +\" hs.\";\n itinerario = itinerario + enter + \"<strong>Aerol\\u00EDnea:</strong> \" + value.airline.name + \".\";\n itinerario = itinerario + enter + \"<strong>N\\u00FAmero de vuelo:</strong> \" + value.flightid + \".\";\n itinerario = itinerario + enter + \"<strong>Duraci\\u00F3n del vuelo:</strong> \" + value.duration + \" hs.\";\n }\n itinerario = itinerario + enter;\n });\n itinerario = itinerario + enter;\n itinerario = itinerario + enter;\n itinerario = itinerario + \"<strong> Precio Total: \"+precio+\"</strong>\";\n $(\"div[id=modDetalleViaje] div[class=col-md-6]\").html(itinerario);\n //TODO llenar el mapa de detalle del viaje\n currentMap = mapaReview;\n var aux = new Array();\n for (var i = 0; i < resptrip.outboundItinerary.length; i++) {\n \taux.push({\"latitude\": resptrip.outboundItinerary[i].fromAirport.latitude, \"longitude\": resptrip.outboundItinerary[i].fromAirport.longitude, \"descripcion\": resptrip.outboundItinerary[i].fromAirport.name});\n \taux.push({\"latitude\": resptrip.outboundItinerary[i].toAirport.latitude, \"longitude\": resptrip.outboundItinerary[i].toAirport.longitude, \"descripcion\": resptrip.outboundItinerary[i].toAirport.name});\n } \n// \tEsto es par limpiar los marcadores que vengan en el mapa de un modal abierto anteriormennte\n if (markersVuelos.length > 0) {\n \tconsole.log(\"TIENE MARKERS, LIMPIO\");\n for (i in markersVuelos) {\n \tmarkersVuelos[i].setMap(null);\n }\n markersVuelos.length = 0;\n }\n if (lineasVuelos.length > 0) {\n \tconsole.log(\"TIENE Lineas, LIMPIO\");\n for (i in lineasVuelos) {\n \tlineasVuelos[i].setMap(null);\n }\n lineasVuelos.length = 0;\n }\n// google.maps.event.addListener(mapaReview, 'bounds_changed', function() {\n// \t console.log(mapaReview.getMapTypeId());\n// \t console.log(mapaReview.getZoom());\n// \t console.log(mapaReview.getBounds());\n// \t});\n drawFlightRoute(aux);\n aux = new Array();\n for (var i = 0; i < resptrip.inboundItinerary.length; i++) {\n \taux.push({\"latitude\": resptrip.inboundItinerary[i].fromAirport.latitude, \"longitude\": resptrip.inboundItinerary[i].fromAirport.longitude, \"descripcion\": resptrip.inboundItinerary[i].fromAirport.name});\n \taux.push({\"latitude\": resptrip.inboundItinerary[i].toAirport.latitude, \"longitude\": resptrip.inboundItinerary[i].toAirport.longitude, \"descripcion\": resptrip.inboundItinerary[i].toAirport.name});\n } \n drawFlightRoute(aux);\n }\n });\n\n}", "function simpleAlert(data){\n\t\t\tvar app = new Alert();\n\t\t\tif(!app.exist()){\n\t\t\t\tif(app.checkObj(data)){\n\t\t\t\t\tapp.load(data);\n\t\t\t\t\tapp.show();\n\t\t\t\t}else{\n\t\t\t\t\tconsole.log(\"Aconteceu algo :/\");\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tapp.close();\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\tif(app.checkObj(data)){\n\t\t\t\t\t\tapp.load(data);\n\t\t\t\t\t\tapp.show();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconsole.log(\"Aconteceu algo :/\");\n\t\t\t\t\t}\n\t\t\t\t},500);\n\t\t\t}\n\t\t}", "function generarContrato(id) {\n\t// window.open('/simpleWeb/json/work/generaContratoTrabajador.html?id=' +\n\t// id);\n\twindow.open('/simpleWeb/json/work/showContrato.html?id=' + id);\n}", "function reactivarImpresora(seleccionado) {\n var table = $('#lista-impresora').DataTable();\n var celda = $(seleccionado).parent();\n var rowData = table.row(celda).data();\n var id = rowData['imID'];\n swal({\n title: \"Esta seguro que desea reactivar la impresora seleccionada?\",\n text: \"El estado de la impresora\",\n type: \"warning\",\n showCancelButton: true,\n confirmButtonColor: \"#DD6B55\",\n confirmButtonText: \"Si, reactivar la impresora!\" ,\n cancelButtonText: \"No deseo reactivar la impresora\",\n closeOnConfirm: false,\n closeOnCancel: false },\n function(isConfirm){\n if (isConfirm) {\n $.ajax({\n url: site_url+'/impresora/reactivarImpresora',\n data: 'id='+id,\n type: 'post',\n success: function(registro){\n if (registro == 'error'){\n swal(\"Error\", \"Problemas al reactivar\", \"error\");\n }else{\n swal(\"Reactivado!\", \"La impresora ha sido reactivada.\", \"success\");\n $('#cerrar-impresora').click();\n recargarTablaImpresora();\n }\n }\n });\n } else {\n swal(\"Cancelado\", \"Accion cancelada.\", \"error\");\n }\n });\n}", "function iniciarConsulta(id_expediente)\n{\n\t\t\t$(\"#id_expediente\").prop('value',id_expediente);\n\t\t\t$.post('includes/expediente_emp.php?id_expediente='+id_expediente,{},function(data){ \n\t\t\t\tremoverBuzon(id_expediente);\n\t\t\t\t$(\"#contenedor\").html(data); \n\t\t\t});\n\n\n}", "function finalizarAponte(ida, idt, idc) {\n var resposta = CKEDITOR.instances['aponte-' + ida].getData();\n if (resposta === '') {\n swal({\n title: \"Alerta\",\n text: \"Redija um texto para a resposta ao aponte de Valida&ccedil;&atilde;o ou Auditoria.\",\n type: \"error\",\n html: true,\n confirmButtonText: \"Entendi!\"});\n }\n else {\n $.post('/pf/DIM.Gateway.php', {\n 'ida': ida,\n 'idt': idt,\n 'r': resposta,\n 'idc': idc,\n 'arq': 17,\n 'tch': 0,\n 'sub': -1,\n 'dlg': 1}, function (data) {\n if (data.sucesso) {\n swal({\n title: \"Informa&ccedil;&atilde;o\",\n text: \"O aponte foi finalizado com sucesso.\",\n type: \"success\",\n html: true,\n confirmButtonText: \"Ok, obrigado!\"});\n $('#aponte' + ida).html('<div style=\"padding: 10px; border:1px dotted #d0d0d0; border-radius: 5px; margin-bottom: 5px;\">' +\n resposta +\n '</div>');\n $('#navbar-listar-tarefas-pendentes').html(data.qtd);\n }\n else {\n swal({\n title: \"Alerta\",\n text: \"N&atilde;o foi poss&iacute;vel atualizar o aponte, favor tentar novamente.\",\n type: \"error\",\n html: true,\n confirmButtonText: \"Entendi!\"});\n }\n }, 'json');\n }\n}", "function crearSolicitud(id) {\n var solicitud = {\n id: id,\n nombre: obtenerValor(nombre),\n descripcion: obtenerValor(descripcion),\n fechaRecibida: obtenerFecha(),\n cliente: obtenerValor(cliente),\n brm: obtenerValor(brm),\n adm: obtenerValor(adm),\n reqObligatorios: obtenerValor(reqObligatorios),\n reqDeseables: obtenerValor(reqDeseables),\n perfil: obtenerValor(perfil),\n ingles: obtenerValor(ingles),\n viajar: obtenerValor(viajar),\n guardias: obtenerValor(guardias),\n consultorasContactadas: obtenerValor(consultorasContactadas),\n estado: obtenerValor(estado)\n };\n\n return solicitud;\n }", "function verAlquilerEspecial(id)\n{\n\nif(document.getElementById(\"divDatosAlquilerEspecial\"+id).style.display==\"block\")\n {\n document.getElementById(\"divDatosAlquilerEspecial\"+id).style.display=\"none\";\n document.getElementById(\"buttonVerDatosAlquilerEspecial\"+id).innerHTML=\"Ver\";\n }\nelse\n {\n var requerimiento = new RequerimientoGet();\n requerimiento.setURL(\"sedes/alquileres/seleccionaralquiler/ajax/datosAlquiler.php\");\n requerimiento.addParametro(\"id\",id);\n requerimiento.addListener(respuestaVerDatosAlquilerEspecial);\n requerimiento.ejecutar();\n }\n\n}", "function capturaEntradaSalida(id,nombre)\n{\n if (typeof localStorage['jb_reporte_ubicacion'] === 'undefined') {\n myApp.alert('guarda primero tu ubicación');\n $('#id_reporte_'+id).removeAttr('onclick');\n setTimeout(function(){\n $('#id_reporte_'+id).attr('onclick',\"capturaEntradaSalida(\\'\"+id+\"\\',\\'\"+nombre+\"\\')\");\n },1000);\n }else{\n //$('#id_reporte_'+id+' a').attr('href',\"#option-repo\");\n var id_row = genera_id();\n localStorage['idtabla'] = id;\n localStorage['nomRepor'] =nombre;\n var idPlantilla = localStorage['idPlantilla_activa'];\n var id_repor = localStorage['idreporte'];\n var fecha = genFecha();\n var status_row = 1;\n\n window.db.transaction(function(txt2){\n txt2.executeSql(\"SELECT nombre,id,position,content_type,id_table,status FROM jb_dinamic_tables_columns WHERE id_table=\\'\"+id+\"\\' and type_section=\"+localStorage['repSeccion']+\" ORDER BY position ASC\",[],function(txt, results){\n var np=0;\n for (var i = 0; i < results.rows.length; i++) {\n var rp = results.rows.item(i);\n //onsole.log(rp);\n var id2 = genera_id();\n if (rp.position == 0) {\n np += RegistroAlterno(status_row,rp.id_table,id_repor,id_row,rp.id,id2,fecha,localStorage['jb_reporte_ubicacion'],rp.position,rp.content_type); \n }else if (rp.position == 1) {\n np += RegistroAlterno(status_row,rp.id_table,id_repor,id_row,rp.id,id2,fecha,fecha,rp.position,rp.content_type); \n }\n }\n console.log(np);\n //np=np-1;\n if(np == results.rows.length){\n txt2.executeSql(\"INSERT into item_listview(nombre,status) VALUES(\\'\"+nombre+\"\\','2');\");\n console.log('son iguales aqui lo demas')\n myApp.alert('Validando..');\n setTimeout(function(){\n $('#id_reporte_'+id).removeAttr('data').attr('data','2'); \n $('#reportProceso_'+id).empty();\n $('#reportProceso_'+id).append('Terminado');\n $('#reportProceso_'+id).removeAttr('style');\n $('#reportProceso_'+id).attr('style','color:rgb(48, 150, 48);');\n $('#id_reporte_'+id).removeAttr('onclick');\n $('#id_reporte_'+id).attr('onclick','visualisaRepor(\\''+id_repor+'\\',\\''+nombre+'\\',\\''+id+'\\',0)');\n $('#id_reporte_'+id+' a').attr('href','#vistaRepor');\n },800);\n }\n });\n });\n } \n}", "function doAlertResponse(id, responseText){\n\tlogInfo(\"doAlertResponse fired with value: \" + responseText);\n \talert(trim(responseText));\n \tsetIdle();\n}", "function del(id){\n if(confirm('melanjutkan untuk menghapus data?'))\n $.ajax({\n url:dir,\n type:'post',\n data:'aksi=hapus&replid='+id,\n dataType:'json',\n success:function(dt){\n var cont,clr;\n if(dt.status!='sukses'){\n cont = '..Gagal Menghapus '+dt.terhapus+' ..';\n clr ='red';\n }else{\n viewTB();\n cont = '..Berhasil Menghapus '+dt.terhapus+' ..';\n clr ='green';\n }notif(cont,clr);\n }\n });\n }", "function genReportAlterno(nombre,id){\n $(\"#list_report_sec ul\").append('<li id=\"id_reporte_'+id+'\" onclick=\"capturaEntradaSalida(\\''+id+'\\',\\''+nombre+'\\')\" data=\"0\" ><a class=\"item-link\">'+\n '<div class=\"item-content\" style=\"padding-left:0;\"><div class=\"item-inner\" style=\"padding-left:10px;\">'+\n '<div class=\"item-title jbPoint\">'+nombre+'</div><span id=\"reportProceso_'+id+'\" class=\"jbSpanPen\" >pendiente</span></div>'+\n '</div></a></li>');\n verificaReporte(id);\n}", "function save_reportes(opt)\n{\n console.log(opt);\n var opColum = $('[id^=campReport_]');\n var respColum = $('[id^=respReport_]');\n var idPlantilla = localStorage['idPlantilla_activa'];\n var id_table = localStorage['idtabla'];\n var id_repor = localStorage['idreporte'];\n var id_row = localStorage['id_row'];\n var status_row = 1;\n var fecha = genFecha();\n $('body #tu_id').removeAttr('src');\n $('body #tu_id').hide();\n\n $.each(respColum,function(){\n var res = $(this).attr('id').replace('respReport_','');\n var id = genera_id();\n var text = $('#respReport_'+res).val();\n var position = $('#id_reporte_form_'+res).attr('data');\n var tipoData = $('#id_reporte_form_'+res).attr('data-type');\n if (text =='si') {\n text ='1';\n }\n if (text == 'no') {\n text ='0';\n }\n console.log(text+\" \"+);\n \n if(text != \"\") {\n var conten = text;\n window.db.transaction(function(txt){\n //console.log(\"select * from jb_dinamic_tables_rows where id=\\'\"+id+\"\\' and id_reporte=\\'\"+id_repor+\"\\' and id_column=\\'\"+res+\"\\';\");\n txt.executeSql(\"select * from jb_dinamic_tables_rows where id=\\'\"+id+\"\\' and id_reporte=\\'\"+id_repor+\"\\' and id_column=\\'\"+res+\"\\';\",[],function(txt2,resul){\n if (resul.rows.length==0) {\n switch(res){\n case '558336d8a7a78':\n case '5581ad144a90e':\n case '558336d8a6560':\n case '558336d8a7c1b':\n case '558336d8a71ab':\n case '558336d8a5e71':\n case '558336d8a6e25':\n case '558336d8a63a4':\n case '558336d8a61e4':\n case '558336d8a68df':\n case '558336d8a7703':\n case '558336d8a671e':\n case '558336d8a6037':\n case '558336d8a6aa3':\n case '558336d8a6c66':\n case '558336d8a7537':\n case '558336d8a7375':\n case '558336d8a6fe8':\n case '55e4a5ea603a7':\n case '55e4b83df1ee2':\n case '55e4c32608bb2':\n case '55e4c433be373':\n case '55e4c5a25438e':\n var campSintilla = $('#campReport_'+res).text();\n txt.executeSql(\"INSERT INTO jb_dinamic_tables_rows(status,id_table,id_reporte,id_row,id_column,id,fecha,contenido,position,tipo,campSintilla) VALUES (\\'\"+status_row+\"\\', \\'\"+id_table+\"\\', \\'\"+id_repor+\"\\', \\'\"+id_row+\"\\', \\'\"+res+\"\\', \\'\"+id+\"\\',\\'\"+fecha+\"\\',\\'\"+conten+\"\\',\\'\"+position+\"\\',\"+tipoData+\",\\'\"+campSintilla+\"\\');\"); \n break;\n default:\n txt.executeSql(\"INSERT INTO jb_dinamic_tables_rows(status,id_table,id_reporte,id_row,id_column,id,fecha,contenido,position,tipo) VALUES (\\'\"+status_row+\"\\', \\'\"+id_table+\"\\', \\'\"+id_repor+\"\\', \\'\"+id_row+\"\\', \\'\"+res+\"\\', \\'\"+id+\"\\',\\'\"+fecha+\"\\',\\'\"+conten+\"\\',\\'\"+position+\"\\',\"+tipoData+\");\"); \n break;\n }\n }\n }); \n });\n if (tipoData == '7' || tipoData == '9')\n {\n var sharefoto = $('[id^=fotogaleria_]');\n $.each(sharefoto,function(){\n var idsfoto = $(this).attr('id').replace('fotogaleria_','');\n var rutafoto = $('#fotogaleria_'+idsfoto).val();\n //console.log(rutafoto);\n window.db.transaction(function(txt){\n txt.executeSql(\"INSERT INTO jb_fotos_reportes(id_table,id_reporte,id_row,id,foto,id_column) VALUES(\\'\"+id_table+\"\\',\\'\"+id_repor+\"\\',\\'\"+id_row+\"\\',\\'\"+id+\"\\',\\'\"+rutafoto+\"\\',\\'\"+res+\"\\');\"); \n });\n }); \n }else if (tipoData == '10') {\n //jb_firmas_reportes(id_table TEXT(30),id_reporte TEXT(30), id_row TEXT(30),id TEXT(30), firma TEXT(800),id_column TEXT(15))\");\n var firma = $('#jsonfirma_'+res).val();\n \n window.db.transaction(function(txt){\n txt.executeSql(\"INSERT INTO jb_firmas_reportes(id_table,id_reporte,id_row,id,firma,id_column,nombre) VALUES(\\'\"+id_table+\"\\',\\'\"+id_repor+\"\\',\\'\"+id_row+\"\\',\\'\"+id+\"\\',\\'\"+firma+\"\\',\\'\"+res+\"\\',\\'\"+conten+\"\\');\"); \n });\n }\n if(position == '0'){\n window.db.transaction(function(txt){\n var nom = $('#tit_option_repo').text();\n \n console.log(\"INSERT INTO item(status,name,id) VALUES('1',\\'\"+nom+\"\\',\\'\"+conten+\"\\');\");\n txt.executeSql(\"select * from item where id=\\'\"+conten+\"\\' and name=\\'\"+nom+\"\\'\",[],function(txts,resuelto){\n if (resuelto.rows.length==0) {\n txt.executeSql(\"INSERT INTO item(status,name,id) VALUES('1',\\'\"+nom+\"\\',\\'\"+conten+\"\\');\");\n }\n }); \n });\n // calculaproceso(res,id,idPlantilla,id_repor,id_table,id_row);///funcion para calcular\n } \n }\n });\n opt = opt-1;\n if (opt > 0) {\n //console.log(opt+\" \"+localStorage['nomRepor']);\n window.db.transaction(function(txt){\n txt.executeSql(\"select nombre from item_listview where nombre=\\'\"+localStorage['nomRepor']+\"\\';\",[],function(txs, resul){\n //console.log(resul.rows.length);\n if (resul.rows.length == 0) {\n txt.executeSql(\"INSERT into item_listview(nombre,status) VALUES(\\'\"+localStorage['nomRepor']+\"\\','1');\");\n }\n if (resul.rows.length > 0) {\n txt.executeSql(\"UPDATE item_listview set status='1' WHERE nombre=\\'\"+localStorage['nomRepor']+\"\\';\");\n }\n });\n myApp.alert(\"Información Guardada\");\n $(\"#seccionprincipal #jb_fotos_galery\").empty(); \n });\n setTimeout(function(){\n localStorage.removeItem('id_row');\n localStorage.removeItem('fotopop');\n capturaInfo(localStorage['idtabla'],localStorage['nomRepor']);\n verificaReporte(id_table,1);\n },400);\n }else if (opt == 0)\n {\n verificaReporte(id_table,2);\n //console.log(opt+\"lo ultimo ->\"+\"UPDATE item_listview status='2' WHERE nombre=\\'\"+localStorage['nomRepor']+\"\\';\");\n window.db.transaction(function(txt){\n txt.executeSql(\"select nombre from item_listview where nombre=\\'\"+localStorage['nomRepor']+\"\\';\",[],function(txs, resul){\n //console.log(resul.rows.length);\n if (resul.rows.length == 0) {\n txt.executeSql(\"INSERT into item_listview(nombre,status) VALUES(\\'\"+localStorage['nomRepor']+\"\\','2');\");\n }\n if (resul.rows.length > 0) {\n txt.executeSql(\"UPDATE item_listview set status='2' WHERE nombre=\\'\"+localStorage['nomRepor']+\"\\';\");\n }\n });\n });\n $('#showAlert').empty();\n setTimeout(function(){\n $('#opReport')[0].click();\n verificaReporte(id_table);\n },900);\n setTimeout(function(){\n $('#opReport')[0].click();\n },600);\n localStorage.removeItem('id_row');\n myApp.alert(\"Información Guardada\");\n }\n}", "function toastBorrarProducto(id_producto){\n var toastHTML = '<span>¿Borrar producto?</span><button class=\"btn-flat toast-action\" onclick=\"borrarProducto('+id_producto+')\">ok</button>';\n M.toast({html: toastHTML});\n}", "function alDelete(id) {\n swal({\n title: \"Bạn chắc muốn xóa bỏ?\",\n // text: \"Bạn sẽ không thể khôi phục lại bản ghi này!!\",\n type: \"warning\",\n showCancelButton: true,\n confirmButtonColor: \"#DD6B55\",\n cancelButtonText: \"Không\",\n confirmButtonText: \"Có\",\n // closeOnConfirm: false,\n },\n function (isConfirm) {\n if (isConfirm) {\n $.ajax({\n type: \"delete\",\n url: \"/report/market/\" + id,\n success: function (res) {\n if (!res.error) {\n toastr.success('Đã xóa!');\n $('#data-' + id).remove();\n }\n },\n error: function (xhr, ajaxOptions, thrownError) {\n toastr.error(thrownError);\n }\n });\n } else {\n toastr.error(\"Hủy bỏ thao tác!\");\n }\n });\n}" ]
[ "0.641289", "0.62307733", "0.6218423", "0.6176905", "0.5985368", "0.59506863", "0.5848294", "0.58292097", "0.5822716", "0.58141214", "0.5799005", "0.5799005", "0.5778186", "0.5769629", "0.5748214", "0.5743933", "0.57412827", "0.57410175", "0.5724286", "0.5722064", "0.5704598", "0.5689381", "0.56850505", "0.56776404", "0.56641996", "0.5660442", "0.5643588", "0.5643588", "0.56352687", "0.5613389", "0.55898833", "0.5585079", "0.55833185", "0.55748594", "0.5557497", "0.5548118", "0.5546908", "0.552863", "0.5524628", "0.5524313", "0.5518526", "0.55152047", "0.5512085", "0.55077475", "0.5497212", "0.54937565", "0.5492194", "0.5489976", "0.5484641", "0.5479311", "0.54598767", "0.54598767", "0.5447168", "0.5440954", "0.5433824", "0.5433221", "0.5426605", "0.5413017", "0.5412693", "0.5406297", "0.5404868", "0.5401558", "0.54003865", "0.53926647", "0.53863335", "0.5383795", "0.5379881", "0.5375517", "0.53747815", "0.5373633", "0.53715587", "0.5368485", "0.53647673", "0.53642523", "0.53593063", "0.53483933", "0.53464574", "0.5342992", "0.5341531", "0.5338017", "0.5336052", "0.5327831", "0.5326153", "0.5324561", "0.53238165", "0.53232473", "0.5323166", "0.5321969", "0.5309242", "0.5304485", "0.530406", "0.52969605", "0.52946395", "0.52932286", "0.5288064", "0.5273756", "0.527009", "0.5269893", "0.5268566", "0.52671415" ]
0.5357251
75
invoca por medio de ajax la lista de temas
function cargarTemas() { __app.ajax('/temas/todos', null, onCargarTemasCompleto); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTaskList(){\n\t$.ajax({\n\t\tmethod: 'GET',\n\t\turl : 'http://localhost:8080/task',\n\t\tsuccess: function(result){\n\t\t\t$('#todo-list').empty();\n\t\t\t$('#completed-list').empty();\n\t\t\tfor(i = 0; i < result.length; i++){\n\t\t\t\taddTaskList(result[i]);\n\t\t\t}\n\t\t}\n\t})\n}", "function listado_telefonos()\n{\n\tvar url=\"inc/datos_gestion.php\";\n\tvar pars=\"opcion=10\"\n\tvar myAjax = new Ajax.Request(url,\n\t\t{\n\t\t\tmethod: 'post',\n\t\t\tparameters: pars,\n\t\t\tonComplete: function gen(respuesta)\n\t\t\t{\n\t\t\t$('listado_copias').innerHTML = respuesta.responseText\n\t\t\t}\n\t\t});\n}", "function traer_estudiantes() {\n var id_curso = $(\"#id_curso\").val();\n //encabezado y detalle orden\n var n = 0;\n $.ajax({\n type: 'POST',\n url: urlprocess_enviar,\n data: {\n process: 'traer_estudiantes',\n id_curso: id_curso,\n },\n dataType: 'json',\n success: function(datos) {\n $.each(datos, function(key, value) {\n n = n + 1;\n var arr = Object.keys(value).map(function(k) { return value[k] });\n var id_estudiante = arr[0];\n var nombre_estudiante = arr[1];\n var codigo = arr[2];\n var fecha_inscripcion = arr[3];\n addEstudianteList(id_estudiante, nombre_estudiante, codigo, fecha_inscripcion);\n });\n }\n });\n}", "function filtra_listado()\n{\n\tvar url='inc/datos_gestion.php'\n\tpars='opcion=14&tipo='+$('tipo_cliente').value\n\tvar myAjax = new Ajax.Request(url,\n\t\t{\n\t\tmethod:'post',\n\t\tparameters: pars,\n\t\tonComplete:function gen(respuesta)\n\t\t\t{\n\t\t\t$('listado_copias').innerHTML = respuesta.responseText\n\t\t\t},\n\t\tonCreate:$('listado_copias').innerHTML = \"Generando listado\"\n\t});\n}", "function getTiposVeiculos() {\r\n\t\t\t\t\t\t$.ajax({\r\n\t\t\t\t\t\t\turl : 'CRUDTipoVeiculoServlet',\r\n\t\t\t\t\t\t\ttype : 'POST',\r\n\t\t\t\t\t\t\tdata : {\r\n\t\t\t\t\t\t\t\t\"operation\" : \"list\"\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tsuccess : function(response) {\r\n\t\t\t\t\t\t\t\t// alert(JSON.stringify(response));\r\n\t\t\t\t\t\t\t\tfillSelectTiposVeiculos(response);\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}", "function caricaListaContoTipoOperazione() {\n $.postJSON(baseUrl + \"_ottieniListaConti.do\", {}, function(data) {\n popolaTabella(data);//data.listaContoTipoOperazione);\n });\n }", "function getList() {\r\n $.ajax(\r\n {\r\n url: 'http://157.230.17.132:3008/todos/',\r\n method: 'GET',\r\n success: function(dataResponse) {\r\n\r\n if (dataResponse.length > 0) {\r\n\r\n // Svuoto la input ad ogni click su \"aggiungi\"\r\n $('#todo-list').html('');\r\n\r\n // Popolo la lista tramite Handlebars\r\n var source = $('#todo-template').html();\r\n var template = Handlebars.compile(source);\r\n\r\n for (var i = 0; i < dataResponse.length; i++) {\r\n var data = dataResponse[i];\r\n $('#todo-text').val('');\r\n\r\n var html = template(data)\r\n $('#todo-list').append(html);\r\n }\r\n }\r\n },\r\n error: function() {\r\n alert('Errore');\r\n }\r\n }\r\n )\r\n }", "function chiamaAPITodoList() {\r\n $('.todolist').html(''); // resetto la mia lista ogni volta che eseguo la chiamata API per evitare ridondanza\r\n $.ajax({\r\n url: 'http://157.230.17.132:3001/todos/',\r\n method: 'GET',\r\n success: function(data) {\r\n for (var i = 0; i < data.length; i++) {\r\n var singolaNota = data[i];\r\n var source = $('#entry-template').html(); // questo e il path al nostro template html\r\n var template = Handlebars.compile(source); // passiamo a Handlebars il percorso del template html\r\n var html = template(singolaNota);\r\n $('.todolist').append(html);\r\n }\r\n },\r\n error: function() {\r\n alert('errore server');\r\n }\r\n })\r\n }", "function ListarVentaDatosJson() {\n $.ajax({\n type: 'POST',async:false,\n url: basePath + 'VentaDatosJsonFk',\n data: {\n '_token': $('input[name=_token]').val(),\n },\n beforeSend: function () {\n },\n complete: function () {\n },\n tryCount : 0,\n retryLimit : 3,\n success: function (response) {\n\n USUARIO=response.usuario;\n hora_servidor=response.hora_servidor;\n\n dinerodefault=response.dinerodefault;\n if(dinerodefault.length==0){\n toastr.error(\"No hay DineroDefault Registrados\",\"Error\");\n return false;\n }\n ////apertura caja datos\n aperturacajadatos = response.aperturacajadatos;\n if(aperturacajadatos.length==0){\n toastr.error(\"No hay AperturaCaja Registrado\",\"Error\");\n return false;\n }\n aperturacajadatos=aperturacajadatos[0];\n\n //divdatos=$(\"#datoscaja\");\n // $.each(aperturacajadatos,function(col,valor){\n // $(\"#\"+col,divdatos).val(valor).attr(\"readonly\",\"readonly\");\n // })\n ////fin apertura caja datos\n ///conf_eventos\n eventos=response.eventos;\n\n if(eventos.length==0){\n toastr.error(\"No hay Eventos Registrados\",\"Error\");\n return false;\n }\n // $(eventos).each(function(i,e){\n // $(\"#div_configuracioneventos .eventos_fila_izq\").append(\n // $(\"<div>\")\n // .addClass(\"configuracioneventosdiv\")\n // .data(\"id\",e.idEvento)\n // .data(\"nombre\",e.nombre)\n // .data(\"apuestaMinima\",e.apuestaMinima)\n // .data(\"apuestaMaxima\",e.apuestaMaxima)\n // .data(\"FechaEvento\",e.FechaEvento)\n // .data(\"fechaFinEvento\",e.fechaFinEvento)\n // .data(\"segBloqueoAntesEvento\",e.segBloqueoAntesEvento)\n // .data(\"idMoneda\",e.idMoneda)\n // //.text(e.nombre) \n // .append(\n // $(\"<div>\").attr(\"style\",\"width: 30%; height: 100%;float:left;position:relative\")\n // .append(\n // $(\"<img>\").attr(\"style\",\"width:70%;height:80%;position: absolute; left: 50%; transform: translate(-50%, -50%); top: 50%;\").attr(\"src\",basePath+\"img/juegos/\"+e.logo)\n // )\n // ) \n // .append(\n // $(\"<div>\").attr(\"style\",\"width: 70%; height: 100%;float:left;display:flex;align-items:center\").text(e.nombre).addClass(\"eventotextodiv\")\n // ) \n // );\n // })\n ///fin conf_eventos \n ///apuestas\n // apuestas=response.apuestas;\n // $(dinerodefault).each(function(i,e){\n // $(\"#div_apuestas\").append(\n // $(\"<div>\")\n // .addClass(\"rowapuestasdiv\")\n // // .data(\"id\",\"#\"+e.idConfiguracionEvento)\n // .data(\"valor\",e.monto)\n // .data(\"tipo\",\"apuesta\")\n // .attr(\"data-tipo\",\"apuesta\")\n // .text(e.monto) \n // );\n // })\n ///fin apuestas \n },////fin success\n error : function(xhr, textStatus, errorThrown ) {\n this.tryCount++;\n if (this.tryCount <= this.retryLimit) {\n $.ajax(this);\n\n return;\n } \n return;\n }\n\n })\n}", "function listTem(){\n\t$.ajax({\n url: \"php/template.php\",\n dataType: 'json',\n method: 'POST',\n data: {\"type\":\"list\"},\n success: function(data){\n \tif(data[\"status\"] != null){\n \t\tif(data[\"status\"] == 200){\n \t\t\tloadTemplate(data[\"tem\"]);\n \t\t}else if(data[\"status\"] == -1){\n \t\t\tdocument.getElementById(\"contentTitle\").innerHTML = \"<b>Warning: No available template.</b>\";\n loadTemplate(data[\"tem\"]);\n \t\t} \n \t}\n },\n error: function(){\n alert(\"[Error] Fail to post data!\");\n }\n });\n}", "function listarTodosPreguntaGenerico(metodo){\r\n\r\n\tvar idCuerpoTabla = $(\"#cuerpoTablaPregunta\");\r\n\tvar idLoaderTabla = $(\"#loaderTablaPregunta\");\t\r\n\tvar idAlertaTabla = $(\"#alertaTablaPregunta\");\r\n\r\n\tlimpiarTabla(idCuerpoTabla,idLoaderTabla,idAlertaTabla);\r\n\r\n\tloaderTabla(idLoaderTabla,true);\r\n\r\n\r\n\tconsultar(\"pregunta\",metodo,true).done(function(data){\r\n\t\t\r\n\t\tvar cantidadDatos = data.length;\r\n\t\tvar contador = 1;\r\n\r\n\t\tdata.forEach(function(item){\r\n\r\n\t\t\tvar datoNumero = $(\"<td></td>\").text(contador);\r\n\t\t\tvar txtAreaNombre = $(\"<textarea class='textarea-table' disabled='disabled'></textarea>\").text(item.nombre);\r\n\t\t\tvar datoTipoFormacion = $(\"<td></td>\").text(item.detalleTipoFormacion.nombre);\r\n\t\t\tvar datoEstado = $(\"<td></td>\").text(item.detalleEstado.nombre);\r\n\r\n\r\n\t\t\tvar datoOpciones = \"<td>\"+\r\n\t\t\t'<button id=\"btnModificarPregunta'+contador+'\" class=\"btn btn-table espacioModificar\" data-toggle=\"modal\" data-target=\"#modalModificarPregunta\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></button>'+\r\n\t\t\t\"</td>\";\r\n\r\n\r\n\t\t\t\r\n\t\t\tvar datoNombre = $(\"<td></td>\").append(txtAreaNombre);\r\n\t\t\t\r\n\t\t\tvar fila = $(\"<tr></tr>\").append(datoNumero,datoNombre,datoTipoFormacion,datoEstado,datoOpciones);\r\n\t\t\t\r\n\t\t\tidCuerpoTabla.append(fila);\r\n\r\n\t\t\t\r\n\t\t\tasignarEventoClickPregunta(item.id,item.nombre,item.detalleTipoFormacion.id,item.detalleEstado.id,contador);\r\n\r\n\t\t\tcontador++; \t\r\n\t\t})\r\n\r\n\t\tloaderTabla(idLoaderTabla,false);\r\n\t\tverificarDatosTabla(idAlertaTabla,cantidadDatos);\r\n\r\n\t}).fail(function(){\t\r\n\t\tloaderTabla(idLoaderTabla,false);\r\n\t\tagregarAlertaTabla(idAlertaTabla,\"error\");\r\n\t})\r\n}", "function llenarTablaPuertasItemsOtras(){\n var url=\"http://www.montajesyprocesos.com/inspeccion/servidor/php/json_puertas_items_otras.php\";\n $.getJSON(url,function(puertas_items_otras){\n crearTablaPuertasItemsOtras();\n $.each(puertas_items_otras, function(i,items){\n addItemsPuertasItemsOtras(items.k_coditem_otras,items.o_descripcion,items.v_clasificacion);\n setTimeout('cerrarVentanaCarga()',17000);\n });\n });\n}", "function ListaTipoZona(){\n DoPostAjax({\n url: \"Citas/CtrlCitas/ListarTipoZona\"\n }, function(err, data) {\n if (err) {\n Notificate({\n titulo: 'Ha ocurrido un error',\n descripcion: 'Error con la lista de los tipo de zona.',\n tipo: 'error',\n duracion: 4\n });\n } else {\n let respuesta=JSON.parse(data);\n $(\"#SltComuna\").html(\"<option value='-1'>Seleccione una comuna.</option>\");\n\n for (var val in respuesta) {\n $(\"#SltComuna\").append(\"<option value='\"+respuesta[val].idTipoZona+\"'>\"+respuesta[val].descripcionTipozona+\"</option>\");\n }\n }\n });\n}", "function getList(){\r\n $.ajax(\r\n {\r\n url: 'http://157.230.17.132:3019/todos/',\r\n method: 'GET',\r\n success: function(dataResponse){\r\n printList(dataResponse)\r\n },\r\n error: function(){\r\n alert('La chiamata non è andata a buonfine!')\r\n }\r\n }\r\n );\r\n }", "function listadoTrabajoSucursal(){\n\t$.ajax({\n\t\turl:'routes/routeFormcliente.php',\n\t\ttype:'post',\n\t\tdata: {action: 'clientesSucursales', info: idClienteGLOBAL},\n\t\tdataType:'json',\n\t\terror: function(error){\n\t\t\ttoast1(\"Error!\", \"Ocurrió un error, intentelo mas tarde o pongase en contacto con el administrador\", 4000, \"error\");\n\t\t\t// $.dreamAlert.close()\n\t\t},\n\t\tsuccess: function(data){\n\t\t\tconsole.log(data);\n\t\t\tvar tabla = \"\";\n\t\t\t$.each(data, function (val, key){\n\t\t\t\tvar accionBtn = \"\";\n\t\t\t\tif(key.tipo === \"Perifoneo\")\n\t\t\t\t\taccionBtn = \"accionTrabPerif\";\n\t\t\t\telse\n\t\t\t\t\taccionBtn = \"accionTrab\";\n\n\t\t\t\tvar estilo = \"\";\n\t\t\t\tvar boton = \"\";\n\t\t\t\tif(key.status === \"1\" || key.status === \"3\"){\n\t\t\t\t\testilo = \"success\";\n\t\t\t\t\tboton = '<button onclick=\"accionTrab(' + key.idtrabajo+ ',' + key.idsucursal + ','+ \"'configurarTrab'\" + ')\" class=\"btn btn-xs btn-default\">&nbsp;<span class=\"glyphicon glyphicon-cog\"></span>&nbsp;Config/Editar Trabajo&nbsp;</button>';\n\t\t\t\t}else if(key.status === \"6\"){\n\t\t\t\t\testilo = \"success\";\n\t\t\t\t\tboton = '<button class=\"btn btn-xs btn-success\" onclick=\"verEstadistica('+key.idtrabajo+',' + key.idsucursal + ')\"><span class=\"fa fa-area-chart\"></span> Trab. Iniciado</button>';\n\t\t\t\t}else if(key.status === \"7\"){\n\t\t\t\t\testilo = \"active\";\n\t\t\t\t\tboton = '<button class=\"btn btn-xs btn-primary\">Completado</button>';\n\t\t\t\t}else{\n\t\t\t\t\testilo = \"warning\";\n\t\t\t\t\tboton = '<button class=\"btn btn-xs btn-warning\">En Revisión</button>';\n\t\t\t\t}\n\t\t\t\ttabla += '<tr class=\"' + estilo + '\"><td>' + key.idtrabajo + '</td><td>' + key.alias + '</td><td id=\"tipo_' + key.idtrabajo + '\">' + key.tipo + '</td><td>' + key.vigencia + '</td><td>' + boton + '</td><td><button class=\"btn btn-xs btn-primary\" onclick=\"' + accionBtn + '(' + key.idtrabajo + ',' + key.idsucursal + ',' + \"'detallesTrab'\" + ')\">Detalle</button></td><td><button class=\"btn btn-xs btn-info\" onclick=\"showLvl2(' + key.idtrabajo + ',' + key.idsucursal + /*',' + \"'detallesTrab'\" + */')\">Seguimiento</button></td></tr>';\n\t\t\t});\n\t\t\t$('#contenidoWeb').html('');\n\t\t\t$('#contenidoWeb').append(llenadoTrabajos);\n\t\t\t$('#tbody2').append(tabla);\n\t\t}\n\t});\n}", "function listTabletTank() {\n\tvar tabTankObj = {};\n $.ajax({\n url: '/tank/tablettankmanager/list-tablet-tank',\n dataType: 'json',\n async: false,\n success: function(tabletTankList) {\n tabTankObj.tabTankList = tabletTankList;\n\t\t\tlistTablet(tabTankObj);\n },\n error: function(error) {\n swal(\"Alert!\", \"Unable to get the tablet details!\");\n }\n });\n}", "function cargo_tarea()\n{\n\t$('#mis-tareas').empty();\n\t$.ajax(\n\t{\n\t\ttype:\"GET\",\n\t\tcontentType:\"paplication/json; charset=utf-8\",\n\t\tdataType:\"json\",\n\t\turl:\"/cargo-tareas/\",\n\t\tsuccess:function(response)\n\t\t{\n\t\t\t\n\t\t\t$.each(response, function(i, elemento)\n\t\t\t{\n\t\t\t\tconsole.log(elemento);\n\t\t\t\tvar dato = \"<td>\" + elemento.fecha + \"</td>\"\n\t\t\t\tdato += \"<td><a href=tarea/\" + elemento.slug + \">\" + elemento.nombre + \"</a></td>\"\n\t\t\t\tdato += \"<td>\" + elemento.detalle + \"</td>\"\n\t\t\t\tdato += \"<td>\" + elemento.dquien + \"</td>\"\n\t\t\t\t$('#mis-tareas').append(\"<tr>\" + dato + \"</tr>\");\n\t\t\t\tconsole.log(elemento.dquien);\t\t\t\t\n\t\t\t});\n\t\t}\n\t});\t\n}", "function retornarListas(){\t\n\twindow.localStorage.flag = 0;\n\t$.ajax({\n type: 'POST'\n , url: \"http://192.168.1.102/Servidor/ListaDeProdutos.asmx/listarListas\" //chamando a função\n\t\t, crossDomain:true\n , contentType: 'application/json; charset=utf-8'\n , dataType: 'json'\t\t\t\t\t\t//tipos de dados de retorno\n\t\t, data: \"{idUsuario:'\"+ID_USUARIO+\"',token:'\"+TOKEN+\"'}\"\n , success: function (data, status){ \n\t\t\tvar listas = $.parseJSON(data.d);\n\t\t\tif(typeof(listas.erro) === 'undefined'){\n\t\t\t\tfor(var i=0; i<listas.length ;i++)\n\t\t\t\t\thtmlListarListas(listas[i]);\n\t\t\t}else{\n\t\t\t\talert(itens.menssagem);\n\t\t\t\twindow.location = \"listas.html\";\n\t\t\t\treturn;\n\t\t\t}\n }\n , error: function (xmlHttpRequest, status, err) {\n alert(\"Ocorreu um erro no servidor\");\n }\n });\n}", "function listarPedidos(parametro){\n data = {\n data: localStorage.getItem(\"data\"),\n pruebaData: localStorage.getItem(\"pruebaData\"),\n parametro: parametro\n };\n ajax(linkRest+\"listarPedidos.php\", data, \"POST\")\n .done(function(info){ \n console.log(info);\n if (info.data == \"fail\") {\n M.toast({html: ''+info.errores[1]});\n }else{\n listaDePedidos = info.data;\n $(\".tbodyPedidos\").empty();\n for (var i in info.data) {\n var estadoPedido = \"\";\n var claseEstadoPedido = \"\";\n if(info.data[i].vendido == 0){\n estadoPedido = \"Abierto\";\n claseEstadoPedido = \"estado_abierto\";\n }else{\n estadoPedido = \"Finalizado\";\n claseEstadoPedido = \"estado_cerrado\";\n }\n $(\".tbodyPedidos\").append(\n \"<tr>\"\n +\"<td>\"+info.data[i].id_pedido+\"</td>\"\n +\"<td class = '\"+claseEstadoPedido+\"'>\"+estadoPedido+\"</td>\"\n +\"<td>\"+info.data[i].fecha_creacion+\"</td>\"\n +\"<td>\"+info.data[i].fecha_modificacion+\"</td>\"\n +\"<td><a href='nuevo_pedido.html?id_pedido=\"+info.data[i].id_pedido+\"'>Ver pedido</a></td>\"\n );\n }\n \n }\n \n })\n .fail(function(){\n errorGeneral();\n });\n}", "function ListaTipoDocumento(){\n DoPostAjax({\n url: \"Citas/CtrlCitas/ListarTipoDocumento\"\n }, function(err, data) {\n if (err) {\n Notificate({\n titulo: 'Ha ocurrido un error',\n descripcion: 'Error con la lista de los tipo de documento.',\n tipo: 'error',\n duracion: 4\n });\n } else {\n // console.log(typeof data)\n let datos=JSON.parse(data);\n for (var item in datos) {\n $(\"#SltTipoDocumento1\").append(\"<option value='\"+datos[item].idTipoDocumento+\"'>\"+datos[item].descripcionTdocumento+\"</option>\");\n }\n }\n });\n }", "function listarClientes(){\n data = {\n data: localStorage.getItem(\"data\"),\n pruebaData: localStorage.getItem(\"pruebaData\")\n };\n ajax(linkRest+\"listar_clientes.php\", data, \"POST\")\n .done(function(info){ \n console.log(info);\n if (info.data == \"fail\") {\n M.toast({html: ''+info.errores[1]});\n }else{\n listaDeClientes = info.data;\n $(\"#listaClientes tbody\").empty();\n for (var i in info.data) {\n $(\"#listaClientes tbody\").append(\n \"<tr>\"\n +\"<td>\"+info.data[i].ci+\"</td>\"\n +\"<td>\"+info.data[i].nombre+\"</td>\"\n +\"<td>\"+info.data[i].telefono+\"</td>\"\n +\"<td>\"+info.data[i].direccion+\"</td>\"\n +\"<td><a href='editar_cliente.html?id_cliente=\"+info.data[i].id_cliente+\"'>Editar</a></td>\"\n +\"<td class='btn-borrar' onclick='toastBorrarCliente(\"+info.data[i].id_cliente+\")'>Borrar</td>\"\n );\n }\n \n }\n \n })\n .fail(function(){\n errorGeneral();\n });\n}", "function get_coberturas_unidad() {\n lista_coberturas = [];\n var unidad = $(\"#txt_unidad\").val();\n var demanda = $(\"#txt_demanda\").val();\n var capas = $.ajax({\n url: \"/visor/CobVeg/get_coberturas_unidad/\" + unidad + \"/\" + demanda,\n type: \"GET\",\n dataType: \"json\",\n async: false}).responseText;\n capas = JSON.parse(capas)\n for (var i = 0; i < capas.length; i++) {\n var item = {id: i + 1, nombre: capas[i].cap_nombre, periodo: capas[i].cap_precipitacion, layer: capas[i].cap_layer, agregado: false, valor:capas[i].cap_valor, demanda:capas[i].cap_demanda}\n lista_coberturas.push(item);\n }\n}", "function traerDatos(Page){\n\n\n let filtros = document.getElementsByName(\"FSto\");\n\n\n let data = \"\";\n\n //Orden de datos\n var Orden = obtenerOrden();\n data += \"&Orden=\"+Orden;\n\n\n // Ve que pagina es y trae los datos correspondientes a tal\n let Des = obtenerPagina(Page);\n data += \"&D=\"+Des;\n\n // Temporada de operacion\n var Temporada = document.getElementById(\"selectTemporada\").value;\n data += \"&Temporada=\"+Temporada;\n\n \n\n for (let i = 0; i < filtros.length; i++){\n let value = filtros[i].value.trim();\n\n \n data += \"&campo\"+[i]+\"=\"+value;\n }\n\n \n\n return new Promise(function(resolve, reject) {\n\n $.ajax({\n data:'action=traerDatos'+data,\n url: urlDes,\n type:'POST',\n dataType:'JSON'\n }).done(function(resp){\n var Contenido = \"\";\n\n if(resp != null){\n if(resp.length != 0){\n \n $.each(resp,function(i,item){ \n Contenido += \"<tr>\";\n Contenido += \"<td>\"+(parseInt(Des)+i+1)+\"</td>\";\n Contenido += \"<td \"+minText(item.nombre_especie)+\"</td>\";\n Contenido += \"<td \"+minText(formatearFecha(item.fecha_recepcion))+\"</td>\";\n Contenido += \"<td \"+minText(item.razon_social)+\"</td>\";\n Contenido += \"<td \"+minText(item.nombre_material)+\"</td>\";\n Contenido += \"<td \"+minText(item.genetic)+\"</td>\";\n Contenido += \"<td \"+minText(item.trait)+\"</td>\";\n Contenido += \"<td \"+minText(item.sag_resolution_number)+\"</td>\";\n Contenido += \"<td \"+minText(item.curimapu_batch_number)+\"</td>\";\n Contenido += \"<td \"+minText(item.customer_batch)+\"</td>\";\n Contenido += \"<td \"+minText(item.quantity_kg)+\"</td>\";\n Contenido += \"<td \"+minText(item.notes)+\"</td>\";\n Contenido += \"<td \"+minText(item.seed_treated_by)+\"</td>\";\n Contenido += \"<td \"+minText(item.curimapu_treated_by)+\"</td>\";\n Contenido += \"<td \"+minText(item.customer_tsw)+\"</td>\";\n Contenido += \"<td \"+minText(item.customer_germ_porcentaje)+\"</td>\";\n Contenido += \"<td \"+minText(item.tsw)+\"</td>\";\n Contenido += \"<td \"+minText(item.curimapu_germ_porcentaje)+\"</td>\";\n Contenido += \"</tr>\";\n \n });\n \n }else{\n Contenido = \"<tr> <td colspan='19' style='text-align:center'> No existe stock </td> </tr>\";\n \n }\n }else{\n Contenido = \"<tr> <td colspan='19' style='text-align:center'> No existe stock </td> </tr>\";\n }\n \n\n document.getElementById(\"datos\").innerHTML = Contenido;\n\n resolve();\n\n }).fail(function( jqXHR, textStatus, responseText) {\n Contenido = \"<tr> <td colspan='19' style='text-align:center'> Ups.. Intentamos conectarnos con el sistema, pero no hemos podido. </td> </tr>\";\n \n document.getElementById(\"datos\").innerHTML = Contenido;\n\n reject(textStatus+\" => \"+responseText);\n\n });\n\n });\n\n }", "function llenarTablaPuertasItemsMotorizacion(){\n var url=\"http://www.montajesyprocesos.com/inspeccion/servidor/php/json_puertas_items_motorizacion.php\";\n $.getJSON(url,function(puertas_items_motorizacion){\n crearTablaPuertasItemsMotorizacion(); \n $.each(puertas_items_motorizacion, function(i,items){\n addItemsPuertasItemsMotorizacion(items.k_coditem_motorizacion,items.o_descripcion,items.v_clasificacion);\n });\n });\n}", "function retornarProdutosDaListas(){\t\n\t//Pegar id pela URR e mostrar produtos da lista \n\tvar queries = {};\n\t$.each(document.location.search.substr(1).split('&'), function(c,q){\n\t\tvar i = q.split('=');\n\t\tqueries[i[0].toString()] = i[1].toString();\n\t});\n\t\n\t// $(\"#nomeDaLista\").html(queries['id']);\n\tvar idLista=queries['id'];\n\twindow.localStorage.idListaClicada= idLista;\n\t$.ajax({\n type: 'POST'\n , url: \"http://192.168.1.102/Servidor/ListaDeProdutos.asmx/retornarLista\"\n\t\t, crossDomain:true\n , contentType: 'application/json; charset=utf-8'\n , dataType: 'json'\n , data: \"{idUsuario:'\"+ID_USUARIO+\"',token:'\"+TOKEN+\"',idListaDeProdutos:'\"+idLista+\"'}\"\n , success: function (data, status){ \n\t\t\tvar produtos = $.parseJSON(data.d);\t\t\t\t\t //indice para pegar o nome\n\t\t\tif(typeof(produtos.erro) === 'undefined'){\n\t\t\t\tfor(var i=0; i<produtos.itens.length ;i++)\n\t\t\t\t\thtmlListarProdutos(produtos.itens[i]);\n\t\t\t\n\t\t\t}else{\n\t\t\t\talert(produtos.messagem);\n\t\t\t\treturn;\n\t\t\t}\n }\n , error: function (xmlHttpRequest, status, err) {\n alert(\"Ocorreu um erro no servidor\");\n }\n });\n}", "function listerFilms()\n{\n\tvar action = 'action=select';\n\t//console.log(action);\t\n\t$.ajax({\n\t\tmethod: \"POST\", \n\t\turl:\"../../controller/filmController.php\",\n\t\tdata: action\t\n\t}).done((jsonString)=>{\n\t\t//Va creer le template\n\t\t$.ajax({\n\t\t\tmethod: \"POST\", \n\t\t\turl:\"../admin/template/table-films.php\",\n\t\t\tdata:{\n\t\t\t\tdata: jsonString\n\t\t\t}\n\t\t//Recoit le template\n\t\t}).done((template)=>{\n\t\t\t$(\"#contenu\").html(template);\n\t\t})\n\t});\n}", "function getPazienti() { \n //$(document).ready(function(){\n \t$.ajax({ \n \t\tasync: true, // Async by default is set to “true” load the script asynchronously\n \t\turl: '/medici/findpazienti?medico_id='+getCookie(\"id\"),\n \t\tmethod: 'GET', //Specifies the operation to fetch the list item\n \t\tcrossDomain: true,\n \t\taccepts: 'application/x-www-form-urlencoded, json',\n \t\theaders: { \n \t\t\t'accept': 'application/json', //It defines the Data format\n \t\t\t'content-type': 'application/json' //It defines the content type as JSON\n \t\t}, \n \t\tsuccess: function(data, textStatus, request) { \n \t\t\tif(data.length==0){\n \t\t\t\t$('#getPazienti').html(\"<p>Non hai ancora nessun paziente, clicca su aggiungi Paziente per aggiungerne uno!</p>\");\n \t\t\t}else{\n \t\t\t\t$('#tabellaPazienti').html(\"<tr> <th>Id</th> <th>Cognome</th> <th>Nome</th> <th>Data di Nascita</th> <th>Luogo di Nascita</th> <th>Residenza</th> <th>Telefono</th> <th>Codice Fiscale</th> </tr>\");\n \t\t\t\t//Iterate the data\n \t\t\t\t$.each(data, function(index, value) { \n \t\t\t\t\tvar html = \"<tr><td>\" + value.id + \"</td><td>\" + value.cognome + \"</td><td>\" + value.nome + \"</td><td>\" + value.dataNascita + \"</td>\" +\n \t\t\t\t\t\"<td>\" + value.luogoNascita + \"</td><td>\" + value.residenza + \"</td>\" +\n \t\t\t\t\t\"<td>\" + value.telefono + \"</td><td>\" + value.codiceFiscale + \"</td>\" +\n \t\t\t\t\t\"</tr> </table>\";\n \t\t\t\t\t$('#tabellaPazienti').append(html); //Append the HTML\n \t\t\t\t});\n \t\t\t\t$('#tabellaPazienti').append('<p> Contenuti aggiornati al: '+request.getResponseHeader('Date')+'</p> <br> <input class=\"addButton\" type=\"button\" value=\"Aggiorna i contenuti\" onclick=\"refreshPazienti()\">');\n \t\t\t}\n\n }, \n error: function(error) { \n console.log((error)); \n \n } \n }) \n \n \n // });\n}", "function obtenerHitos(){\n let template ='';\n let filtro=$('#seleccionTipoDeHitos').val();\n $.ajax({\n type: \"GET\",\n url: 'listarHitos.php',\n data: {filtro},\n success: function(response){\n console.log(response);\n\n let hitos = JSON.parse(response);\n hitos.forEach(hito=>{\n template+= `\n <ul class=\"list-group\">\n <li class=\"list-group-item active\">${hito.idUsuario}</li>\n <li class=\"list-group-item\">${hito.verificado}</li>\n <li class=\"list-group-item\">Fecha de publicacion:${hito.fecha}</li>\n <li class=\"list-group-item\">Fuente:${hito.fuente} Fecha Suceso:${hito.fechaSuceso}</li>\n <li class=\"list-group-item\">Descripcion: ${hito.descripcion}</li>\n <li class=\"list-group-item\">Comentario creador: ${hito.comentarioCreador}</li>\n </ul>\n <br>\n <form action=\"verHito.php\" method=\"POST\">\n <div class=\"form-group text-center\">\n <input id=\"idHito\" name=\"idHito\" type=\"hidden\" value=\"${hito.idHito}\">\n <input type=\"submit\" value=\"Ver Hito\" class=\"btn btn-danger\">\n </div>\n </form>\n `\n });\n $('#misHitos').html(template);\n }\n });\n\n //Otra consulta ajax\n\n}", "function caricaListaEntitaSelezionabiliFromEntitaSelezionata(tipoEntitaSelezionata, uidEntitaSelezionata, urlNodo, testo){\n\n var interazione = window.interazioni[tipoEntitaSelezionata];\n var uidEntitaSelezionataNotUndefined = uidEntitaSelezionata || '';\n\n $(\"#risultatiConsultazioneEntitaCollegate\").find('input').attr('disabled', 'disabled');\n\n if(interazione){\n interazione.destroy();\n }\n disabilitaElemento($('#selezioneConsultazioneEntitaCollegate'));\n disabilitaElemento($('#riepilogoConsultazioneEntitaCollegate'));\n disabilitaElemento($('#tabellaRisultatiConsultazioneEntitaCollegate'));\n\n //rimuovo la lista precedente\n $('#entitaSelezionabili').find('li').remove().end();\n\n //chiamata Ajax per ottenere la lista di entita' successive\n return $.postJSON('ottieniFigliEntitaConsultabileAjax.do', {'tipoEntitaConsultabile' : tipoEntitaSelezionata})\n .then(function (data) {\n var listaFigliEntitaSelezionata = data.listaFigliEntitaConsultabile;\n var errori = data.errori;\n var stringaHtml = '';\n var customEvt = $.Event('entitaSelezionata');\n\n if(impostaErroriNelBootbox(errori)){\n return;\n }\n\n //rimuovo la lista precedente\n $('#entitaSelezionabili').find('li').remove().end();\n //chiudo tutti i div relativi alla selezione precedente\n $('#gestioneRisultatiConsultazioneEntitaCollegate .hide').slideUp();\n\n listaFigliEntitaSelezionata.forEach(function(value){\n stringaHtml = stringaHtml + '<li data-uid-padre=\"' + uidEntitaSelezionataNotUndefined + '\" data-tipo-entita-padre=\"' + tipoEntitaSelezionata + '\" data-tipo-entita=\"' + value._name + '\"><a><span class=\"button ico_close\"></span><span>' + value.descrizione + '</span> </a></li>';\n });\n\n contraiOrizzontalmenteTabellaRisultatiSeAmmesso();\n\n $('#entitaSelezionabili').append(stringaHtml);\n\n customEvt.tipoEntitaSelezionata = tipoEntitaSelezionata;\n customEvt.isParent = listaFigliEntitaSelezionata.length > 0;\n customEvt.testoNodo = testo;\n customEvt.urlNodo = urlNodo;\n\n $('#riepilogoConsultazioneEntitaCollegate').trigger(customEvt);\n\n riabilitaElemento($('#selezioneConsultazioneEntitaCollegate'));\n riabilitaElemento($('#riepilogoConsultazioneEntitaCollegate'));\n riabilitaElemento($('#tabellaRisultatiConsultazioneEntitaCollegate'));\n\n });\n }", "function listarTodosAprendizGenerico(metodo){\r\n\r\n\tvar idCuerpoTabla = $(\"#cuerpoTablaAprendiz\");\r\n\tvar idLoaderTabla = $(\"#loaderTablaAprendiz\");\t\r\n\tvar idAlertaTabla = $(\"#alertaTablaAprendiz\");\r\n\r\n\tlimpiarTabla(idCuerpoTabla,idLoaderTabla,idAlertaTabla);\r\n\r\n\tloaderTabla(idLoaderTabla,true);\r\n\r\n\r\n\tconsultar(\"aprendiz\",metodo,true).done(function(data){\r\n\t\t\r\n\t\tvar cantidadDatos = data.length;\r\n\t\tvar contador = 1;\r\n\r\n\t\tdata.forEach(function(item){\r\n\r\n\t\t\tvar datoNumero = $(\"<td></td>\").text(contador);\r\n\t\t\tvar datoIdentificacion = $(\"<td></td>\").text(item.identificacion);\r\n\t\t\tvar datoNombreCompleto = $(\"<td></td>\").text(item.nombreCompleto);\r\n\t\t\tvar datoFicha = $(\"<td></td>\").text(item.ficha.numero);\r\n\t\t\tvar datoDetalleEstado = $(\"<td></td>\").text(item.detalleEstado.nombre);\r\n\r\n\r\n\t\t\tvar datoOpciones = \"<td>\"+\r\n\t\t\t'<button id=\"btnModificarAprendiz'+contador+'\" class=\"btn btn-table espacioModificar\" data-toggle=\"modal\" data-target=\"#modalModificarAprendiz\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></button>'+\r\n\t\t\t\"</td>\";\r\n\r\n\r\n\r\n\t\t\tvar fila = $(\"<tr></tr>\").append(datoNumero,datoIdentificacion,datoNombreCompleto,datoFicha,datoDetalleEstado,datoOpciones);\r\n\r\n\t\t\tidCuerpoTabla.append(fila);\r\n\r\n\t\t\t\r\n\t\t\tasignarEventoClickAprendiz(item.id,item.identificacion,item.nombreCompleto,item.ficha.id,item.detalleEstado.id,contador);\r\n\r\n\t\t\tcontador++; \t\r\n\t\t})\r\n\t\t\r\n\t\tloaderTabla(idLoaderTabla,false);\r\n\t\tverificarDatosTabla(idAlertaTabla,cantidadDatos);\r\n\r\n\t}).fail(function(){\t\r\n\t\tloaderTabla(idLoaderTabla,false);\r\n\t\tagregarAlertaTabla(idAlertaTabla,\"error\");\r\n\t})\r\n}", "function listarTareas() {\n\n var paramentros = {\n \"idPersona\": $('#c1_txtIdPersona').val()\n\n };\n\n idPersona = JSON.stringify(paramentros);\n $.ajax({\n\n url: '../../Controlador/ctrlRESTfulTareas.aspx/listarTareas',\n data: idPersona,\n dataType: 'json',\n type: 'post',\n contentType: \"application/json; charset=utf-8\",\n success: function (respuesta) {\n\n $.each(respuesta.d,\n /**\n * funcion en la que se procesa los datos que vienen desde el controlador\n * para mostrarlos en la vista en este caso en una tabla\n * @param {any} i\n * @param {any} detalle parametro con los datos a procesar\n */\n function (i, detalle) {\n\n $(\"#tDescripcion\").html(detalle.Descripcion);\n $(\"#tEstado\").html(detalle.Estado);\n var idTarea = detalle.IdTarea;\n\n $(\"#tAccion\").html\n (\"<a href='frmListarActividades.aspx?idTarea=\" + idTarea + \"'><img id='fotoAccion' src='../../Recursos/Imagenes/lgLista.png'></a>\");\n\n $(\"#tblTareas tbody\").append($(\"#tFila\").clone(true));\n\n\n });\n\n \n\n $('#tblTareas').DataTable({\n 'ordering': true,\n 'order': [[0, 'desc']],\n 'language': {\n 'url': 'https://cdn.datatables.net/plug-ins/1.10.19/i18n/Spanish.json',\n }\n });\n \n //$(\"#tblTareas tbody tr\").first().hide();\n\n }\n\n });\n\n}", "function get_liste() {\n $.ajax({\n method: \"POST\",\n url: \"bdd_handler.php\",\n data: { 'function': 'get_listes', 'id_tableau': localStorage.getItem('id_tableau') },\n datatype: \"json\",\n success: function (datatype) {\n\n\n $('.liste').remove();\n\n var liste = JSON.parse(datatype);\n for (var i = 0; i < liste.length; i++) {\n var list = '<div class=\"liste\" id=' + liste[i][\"id_liste\"] + '><div class=\"titre_liste\"><input id=nom' + liste[i][\"id_liste\"] + ' name=\"nom_liste\" type=\"text\" value=\"'+liste[i][\"nom\"]+'\"><span title=\"supprimer la liste\" class=\"suppr_liste\">X</span></div></div>';\n $('.tableau_actuel').append(list);\n\t\tget_tasks(liste[i][\"id_liste\"], localStorage.getItem('id_tableau'),liste[i][\"id_createur\"]);\n }\n\n $('input[name=nom_liste]').focus(function () {\n $(this).css({\n 'border': '0px solid black',\n 'background': 'white',\n 'cursor': 'auto',\n });\n })\n\n $('input[name=nom_liste]').focusout(function () {\n $(this).css({\n 'border': 'none',\n 'background': '#E8D8B9',\n 'cursor': 'pointer',\n\t\t 'border-radius':'5px'\n });\n })\n\n $('input[name=nom_liste]').keyup(function () {\n var value = $(this).val();\n var id = $(this).parent().parent().attr('id');\n modif_nomliste(id, value);\n })\n\n del_liste();\n }\n\n })\n\n}", "function getTasks() {\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: 'Project',\n\t\tdata: {\n\t\t\t'domain': 'project',\n\t\t\t'action': 'getTasks',\n\t\t}, complete: function (data) {\n\t\t\tconsole.log(\"RESPONSE FROM getTasks() = \",data);\t\t\t\n\t\t\tif (data.responseJSON) {\n\t\t\t\ttasks = data.responseJSON;\n\t\t\t\tprojectsOfInterest = tasks;\n\t\t\t\tconsole.log(\"TASK ARE = \", tasks);\n\t\t\t\tlet taskID = getParameterByName('id');\n\t\t\t\tif(taskID){\n\t\t\t\t\tconsole.log(\"TASK ID = \", taskID);\n\t\t\t\t\tfor(var i = 0; i < tasks.length; i++) {\n\t\t\t\t\t\ttasks[i].value = tasks[i].id;\n\t\t\t\t\t\tif(tasks[i].id == taskID) expandTaskInfo(tasks[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpreparePageForUserStatus();\n\t\t\t}\n\t\t\telse { \n\t\t\t\tconsole.log(\"ERROR RESPONE FROM getTasks() = \", data);\n\t\t\t\talert(\"Something went wrong while retrieving tasks from the server!\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t});\n\t\n}", "function retornarEstabelecimentosMaisBaratos(){\t\n\n\tvar idLista = parseInt(window.localStorage.idListaClicada);\n\t\n\t$.ajax({\n type: 'POST'\n , url: \"http://192.168.1.102/Servidor/ListaDeProdutos.asmx/buscarOfertas\"\n\t\t, crossDomain:true\n , contentType: 'application/json; charset=utf-8'\n , dataType: 'json'\n , data: \"{idUsuario:'\"+ID_USUARIO+\"',token:'\"+TOKEN+\"',idLista:'\"+idLista+\"'}\"\n\t\t, success: function (data, status){ \n\t\t\tvar estabelecimentos = $.parseJSON(data.d);\n\t\t\t\n\t\t\t//------------ ordenar -----------------//\n\t\t\tvar i, j, preco,oferta,guardar;\n\t\t\tfor (i = 1; i < estabelecimentos.length; i++) {\n\t\t\t preco = estabelecimentos[i].precoDaLista;\n\t\t\t guardar = estabelecimentos[i];\n\t\t\t oferta = estabelecimentos[i].itensEncontrados;\n\t\t\t j = i;\n\t\t\t while((j>0) && \n\t\t\t (oferta>estabelecimentos[j-1].itensEncontrados || (preco<estabelecimentos[j-1].precoDaLista && oferta==estabelecimentos[j-1].itensEncontrados)))\n\t\t\t {\n\t\t\t\t\testabelecimentos[j] = estabelecimentos[j-1];\n\t\t\t\t\tj = j-1;\n\t\t\t }\n\t\t\t estabelecimentos[j] = guardar;\n\t\t\t}\n\t\t\t//------------------------------------------//\n\n\t\t\tdocument.getElementById(\"referenciaEstab\").innerHTML = \"\";\n\t\t\tfor(var i=0 ;i<estabelecimentos.length ;i++){\n\t\t\t\tlistaEstiloEstab(estabelecimentos[i]); \n\t\t\t}\t\t\t\n }\n , error: function (xmlHttpRequest, status, err) {\n alert('Ocorreu um erro no servidor');\n }\n });\t\n}", "function thnlist(dep){\n return $.ajax({\n url:dir3,\n data:'aksi=cmbproses&departemen='+dep,\n dataType:'json',\n type:'post'\n });\n }", "function traer_insumos() {\n var idRecepcion = $(\"#id_recepcion\").val();\n //encabezado y detalle orden\n var n = 0;\n $.ajax({\n type: 'POST',\n url: urlprocess_enviar,\n\n data: {\n process: 'traer_insumos',\n idRecepcion: idRecepcion,\n 'tabla_buscar': tabla_buscar_enviar,\n 'id_usb': id_usb_enviar,\n },\n dataType: 'json',\n success: function(datos) {\n $.each(datos, function(key, value) {\n n = n + 1;\n var arr = Object.keys(value).map(function(k) { return value[k] });\n var id_prod = arr[0];\n var tipo = arr[1];\n var descr = arr[2];\n var cant = arr[3];\n var precio = arr[4];\n var hora = arr[5];\n var presentacion = arr[6];\n var unidad = arr[7];\n var id_insumo = arr[8];\n if (tipo == 'P') {\n addProductList(id_prod, tipo, descr, cant, \"0\", presentacion, unidad, id_insumo);\n }\n if (tipo == 'S') {\n addServicioList(id_prod, descr, precio, hora, id_insumo, cant);\n }\n if (tipo == 'E') {\n addExamenList1(id_prod, descr, precio, hora, id_insumo);\n }\n });\n }\n });\n}", "function getTitulos(href) {\n\n var url = '';\n\n// $('#filtro,.filtros-aplicados').block({ message: null,\n// css: { backgroundColor: 'transparent'}\n// });\n\n __blockResultConsole();\n\n if (typeof href === 'object') {\n url = urlDomain + '/titulos/filtros_search_results.json';\n __blanquearContainers();\n } else {\n url = href;\n }\n __recargarFiltrosAplicados(titulosForm.serializeArray());\n\n var postvar = $.post(\n url,\n filtrosForm.serialize(),\n __actualizarTitulos,\n 'json'\n );\n\n\n postvar.error(function (XMLHttpRequest, textStatus, errorThrown) {\n //console.debug(XMLHttpRequest);\n //console.debug(textStatus);\n //console.debug(errorThrown);\n });\n return false;\n }", "function GetAllMachineAjaxCall() {\n $(TablesId.bakimOzeti).empty();\n requestQueryForBakimOzeti.machineNo = $(Inputs.bakimOzeti_machineNo).val();\n ShowLoader();\n $.ajax({\n type: \"POST\",\n contentType: \"application/json;charset=utf-8\",\n data: JSON.stringify(requestQueryForBakimOzeti),\n url: HttpUrls.BakimAriza_GetAllMachines,\n success: (list) => {\n if (list.length !== 0) {\n $(recordsNotFound.bakimOzeti).css('display', 'none');\n console.log('ozet', list)\n CreateBakimOzetiTable(list, TablesId.bakimOzeti);\n }\n else {\n $(`${recordsNotFound.bakimOzeti} h3`).text('Hiç Bir Kayit Bulunmamaktadır');\n $(recordsNotFound.bakimOzeti).css('display', 'block');\n HideLoader();\n }\n }\n });\n}", "function llenarTablaPuertasItemsElementos(){\n var url=\"http://www.montajesyprocesos.com/inspeccion/servidor/php/json_puertas_items_elementos.php\";\n $.getJSON(url,function(puertas_items_elementos){\n crearTablaPuertasItemsElementos();\n $.each(puertas_items_elementos, function(i,items){\n addItemsPuertasItemsElementos(items.k_coditem,items.o_descripcion);\n });\n });\n}", "function llenarTablaEscalerasItemsDefectos(){\n var url=\"http://www.montajesyprocesos.com/inspeccion/servidor/php/json_escaleras_items_defectos.php\";\n $.getJSON(url,function(escaleras_items_defectos){\n crearTablaEscalerasItemsDefectos(); \n $.each(escaleras_items_defectos, function(i,items){\n addItemsEscalerasItemsDefectos(items.k_coditem_escaleras,items.o_descripcion,items.v_clasificacion);\n });\n });\n}", "function AllMachinesAjaxRequest() {\n ShowLoader();\n $(TablesId.BakimAriza_AllMachines).empty();\n $.ajax({\n type: \"POST\",\n contentType: \"application/json;charset=utf-8\",\n url: HttpUrls.BakimAriza_GetAllMachines,\n data: JSON.stringify(requestQueryForBakimAriza),\n success: (list) => {\n if (list.length !== 0) {\n $(recordsNotFound.BakimAriaz_AllMachines).css('display', 'none');\n CreateAllMachinesTableInBakimAriza(list, TablesId.BakimAriza_AllMachines);\n }\n else {\n \n $(`${recordsNotFound.BakimAriaz_AllMachines} h3`).text('Hiç Bir Kayit Bulunmamaktadır');\n $(recordsNotFound.BakimAriaz_AllMachines).css('display','block');\n\n HideLoader();\n }\n }\n });\n}", "function listarTemasPorPeriodos(){\n var idPeriodo=document.getElementById(\"ListaPE\").value;\n $.ajax({\n type: 'POST',\n url: 'controlador/listarTemasPorPeriodos.php',\n data:{'idPeriodo':idPeriodo},\n success:\n function(respuesta) {\n $('#ListaT').html(respuesta);\n\n }\n });\n}", "function GetTMList(id) {\n\tglobalobj.ShowLoadingPage();\n\tvar data = \"\";\n\t$.ajax({\n\t\ttype : \"POST\",\n\t\turl : \"ProdFamily\",\n\t\tdata : \"{\\\"wgPSM\\\":\\\"\" + \"\\\",signature:\\\"\" + \"getalltms\"\n\t\t\t\t+ \"\\\",prodFamName:\\\"\" + \"\" + \"\\\",prodFamId:\\\"\" + \"\"\n\t\t\t\t+ \"\\\",prodFamDesc:\\\"\" + \"\" + \"\\\",langCenterId:\\\"\" + \"\"\n\t\t\t\t+ \"\\\",langCenterName:\\\"\" + \"\" + \"\\\",langCenterDesc:\\\"\" + \"\"\n\t\t\t\t+ \"\\\",wgName:\\\"\" + \"\" + \"\\\",wgId:\\\"\" + \"\" + \"\\\",wgTargetHC:\\\"\"\n\t\t\t\t+ \"\" + \"\\\",wgWfHC:\\\"\" + \"\" + \"\\\"}\",\n\t\tcontentType : \"application/x-www-form-urlencoded\",\n\t\tdataType : \"json\",\n\t\tsuccess : function(response) {\n\t\t\t// $(\"#add_team_manager\").html(\"\");\n\t\t\tvar resultsArray = (typeof response) == 'string' ? eval('('\n\t\t\t\t\t+ response + ')') : response;\n\n\t\t\tfor (var i = 0; i < resultsArray.length; i++) {\n\n\t\t\t\tdata = data + \"<option value='\"\n\t\t\t\t\t\t+ resultsArray[i].tm_employee_id + \"'>\"\n\t\t\t\t\t\t+ resultsArray[i].tm_name + \"</option>\";\n\t\t\t}\n\t\t\t$(\"#\" + id).append(data);\n\t\t},\n\t\tcomplete : function(e) {\n\n\t\t\t$.unblockUI();\n\t\t}\n\t});\n\n}", "function getTemplatesList() {\n var list = [];\n $.ajax({\n type: 'GET',\n url: '/data/templates/list',\n data: {type: 'template'},\n dataType: 'json',\n async: false,\n success: function(data) {\n if(data.success) {\n $.each(data.rows, function(index, el) {\n list.push({id: el.id, text: el.name});\n });\n }\n }\n });\n \n return list;\n}", "function select_territorios() {\n let params = {\n action: 'select_territorios'\n };\n $.ajax({\n type: \"POST\",\n url: \"ControllerReportesAzteca\",\n data: params,\n dataType: \"json\",\n success: function (response) {\n// console.log(response);\n $('#territorios').empty();\n $('#territorios').append(`<option value=\"\" disabled selected>Territorios</option>`);\n for (let item of response) {\n if (item.TERRITORIO !== null && item.TERRITORIO !== \"\") {\n console.log(item.TERRITORIO);\n $('#territorios').append(`<option value=\"${item.TERRITORIO}\">(${item.catidad}) - ${item.TERRITORIO}</option>`);\n }\n\n }\n $('select').formSelect();\n },\n error: function (error) {\n console.log(error);\n }\n });\n}", "function Ajax_Municipio_Departamento(departamento,multi) {\n\n $.ajax({\n type: 'post',\n url: '/Incorporaciones/Reportes/Mostrar_Municipios/',\n data: { 'departamento': departamento },\n success: function (response) {\n\n AldeasCb.ClearItems()\n CaserioCb.ClearItems()\n MuniCb.ClearItems()\n var ResponseParse = JSON.parse(response)\n if (JSON.parse(response).length != 0 && multi ==1)\n {\n MuniCb.AddItem(\"TODOS\", \"00\")\n }\n \n for (i = 0; i < ResponseParse.length ; i++) {\n MuniCb.AddItem(ResponseParse[i][\"desc_municipio\"], ResponseParse[i][\"cod_municipio\"])\n }\n }\n })\n}", "function caricaMain(){\r\n\r\n var request = $.ajax({\r\n url: '/myOfferte',\r\n dataType: 'json',\r\n type: 'GET',\r\n });\r\n\r\n request.done(function(msg){\r\n inserisciOspitiDaAccettare(msg.rows);\r\n inserisciRecensioneDaFare(msg.rows);\r\n inserisciOfferteAccettate(msg.rows);\r\n polling();\r\n addPage(\"profiloAltro\");\r\n //popolaSideBar();\r\n iniziaProgramma();\r\n });\r\n\r\n request.fail(function(err){\r\n console.log(err);\r\n });\r\n}", "function retornarEstabelecimentosMaisBaratos(){\t\n\n\tvar idLista = parseInt(window.localStorage.idListaClicada);\n\t\n\t$.ajax({\n type: 'POST'\n , url: \"http://192.168.56.1/Servidor/Estabelecimento.asmx/listarEstabelecimentosMaisBarato\"\n\t\t, crossDomain:true\n , contentType: 'application/json; charset=utf-8'\n , dataType: 'json'\n , data: \"{idUsuario:'\"+ID_USUARIO+\"',token:'\"+TOKEN+\"',idLista:'\"+idLista+\"'}\"\n\t\t, success: function (data, status){ \n\t\t\tvar estabelecimentos = $.parseJSON(data.d);\n\t\t\t\n\t\t\t//------------ ordenar -----------------//\n\t\t\tvar i, j, preco,oferta,guardar;\n\t\t\tfor (i = 1; i < estabelecimentos.length; i++) {\n\t\t\t preco = estabelecimentos[i].precoLista;\n\t\t\t guardar = estabelecimentos[i];\n\t\t\t oferta = estabelecimentos[i].produtosEncontrados;\n\t\t\t j = i;\n\t\t\t while((j>0) && \n\t\t\t (oferta>estabelecimentos[j-1].produtosEncontrados || \n\t\t\t (oferta==estabelecimentos[j-1].produtosEncontrados && preco<estabelecimentos[j-1].precoLista)) )\n\t\t\t {\n\t\t\t\t\testabelecimentos[j] = estabelecimentos[j-1];\n\t\t\t\t\tj = j-1;\n\t\t\t }\n\t\t\t estabelecimentos[j] = guardar;\n\t\t\t}\n\t\t\t//------------------------------------------//\n\n\t\t\tdocument.getElementById(\"referenciaEstab\").innerHTML = \"\";\n\t\t\tfor(var i=0 ;i<estabelecimentos.length ;i++){\n\t\t\t\tlistaEstiloEstab(estabelecimentos[i]); \n\t\t\t}\t\n\t\t\t\n }\n , error: function (xmlHttpRequest, status, err) {\n $('.resultado').html('Ocorreu um erro');\n }\n });\t\n}", "function cargarListas(objeto,procedimiento) {\n\t $.post(\"../../controlador/fachada.php\", {\n\t clase: 'clsUtilidades',\n\t oper: 'cargarListas',\n\t objeto: objeto,\n\t procedimiento: procedimiento\n\t }, function(data) {\n\t if (data !== 0) {\n\t formarOptionValueLista(data,objeto);\n\t }\n\t else {\n\t alert('error');\n\t }\n\t }, \"json\");\n\t}", "function GetListPrioridadesByPuesto(Modo, PuestoID) {\n\n var PuestoID = PuestoID;\n\n if (Modo != \"Intercambiar\") {\n PuestoID = $(\"#PuestoID\").val();\n }\n\n $.ajax({\n url: \"index.php?c=dashboard&a=GetListPrioridadesBypuesto\",\n type: \"POST\",\n data: { 'Action': 'GetListPrioridadesBypuesto', PuestoID: PuestoID },\n success: function(data) {\n\n if (data) {\n\n var json = JSON.parse(data);\n\n if (Modo == \"Intercambiar\") {\n\n $(\"#ListPrioridadesPuestoIntercambiar\").html(\"<hr><p>PRIORIDADES DEL PUESTO SELECCIONADO:</p>\");\n\n json.forEach(function(element) {\n $(\"#ListPrioridadesPuestoIntercambiar\").append('<li class=\"nav-item\"> <a class=\"nav-link\" href=\"#\"><i class=\"fa fa-circle text-primary mr-0-5\"></i>' + element.Nivel + ' - ' + element.Nombre + ' - ' + element.Prioridad + '</a> </li>');\n });\n\n } else {\n\n $(\"#ListPrioridadesPuesto\").html(\"\");\n json.forEach(function(element) {\n $(\"#ListPrioridadesPuesto\").append('<li class=\"nav-item\"> <a class=\"nav-link\" href=\"#\"><i class=\"fa fa-circle text-primary mr-0-5\"></i>' + element.Nivel + ' - ' + element.Nombre + ' - ' + element.Prioridad + '</a> </li>');\n });\n\n }\n }\n }\n });\n\n\n}", "function detalla_servicio(e) {\n var nombre = e.target.innerHTML;\n var url = '..\\\\negocio\\\\servicios-tipo-usuario.php';\n var adjunto = {'tipo_usuario': tipo_usuario};\n $.post(url, adjunto)\n .done(function(respuesta) {\n var servicios = $.parseJSON(respuesta);\n for (var i = 0; i < servicios.length; i++) {\n if(nombre == servicios[i].nombre_servicio){\n var s_nombre = servicios[i].nombre_servicio;\n salida_nombre.html(s_nombre);\n var s_nivel = servicios[i].nivel_servicio;\n salida_nivel.html(s_nivel);\n var s_num_anuncios = servicios[i].num_anuncios;\n salida_num_anuncios.html(s_num_anuncios);\n var s_num_dias = servicios[i].num_dias;\n salida_num_dias.html(s_num_dias);\n var s_descripcion = servicios[i].descripcion;\n salida_descripcion.html(s_descripcion);\n var s_precio = servicios[i].precio;\n salida_precio.html(s_precio);\n }\n }\n });\n}", "function select_options_territorios() {\n let params = {\n action: 'select_options_territorios'\n };\n $.ajax({\n type: \"POST\",\n url: \"ControllerReportesAzteca\",\n data: params,\n dataType: \"json\",\n success: function (response) {\n console.log(response);\n $('#id_ter_gestion').empty();\n $('#id_ter_convenio').empty();\n $('#id_ter_gestion').append(`<option value=\"0\">Todos</option>`);\n $('#id_ter_convenio').append(`<option value=\"0\">Todos</option>`);\n for (let item of response) {\n $('#id_ter_gestion').append(`<option value=\"${item}\">${item}</option>`);\n $('#id_ter_convenio').append(`<option value=\"${item}\">${item}</option>`);\n }\n $('select').formSelect();\n },\n error: function (jqXHR, textStatus, errorThrown) {\n console.log(textStatus);\n }\n });\n}", "function llenarTablaPuertasItemsManiobras(){\n var url=\"http://www.montajesyprocesos.com/inspeccion/servidor/php/json_puertas_items_maniobras.php\";\n $.getJSON(url,function(puertas_items_maniobras){\n crearTablaPuertasItemsManiobras(); \n $.each(puertas_items_maniobras, function(i,items){\n addItemsPuertasItemsManiobras(items.k_coditem_maniobras,items.o_descripcion,items.v_clasificacion);\n });\n });\n}", "function traerDatosEmpresaAcreditada(idEmpresaAcreditada) {\r\n\r\n $.ajax({\r\n url:baseURL + \"pages/VerificarProcesosVencidos/traerDatosEmpresa\",\r\n type:'post',\r\n async:false,\r\n data:{\r\n \t idEmpresaAcreditada : idEmpresaAcreditada\r\n },\r\n beforeSend:muestraLoading,\r\n success:function(data){\r\n \t\r\n ocultaLoading();\r\n \r\n $.each(data.filas, function( index, value ) {\r\n \tcorreo = value.email;\r\n \tempresa = value.razonSocial;\r\n });\r\n \r\n },\r\n error:errorAjax\r\n });\r\n}", "function listarTodosEvaluacionGenerico(metodo){\r\n\r\n\tvar idCuerpoTabla = $(\"#cuerpoTablaEvaluacion\");\r\n\tvar idLoaderTabla = $(\"#loaderTablaEvaluacion\");\t\r\n\tvar idAlertaTabla = $(\"#alertaTablaEvaluacion\");\r\n\r\n\tlimpiarTabla(idCuerpoTabla,idLoaderTabla,idAlertaTabla);\r\n\r\n\tloaderTabla(idLoaderTabla,true);\r\n\r\n\r\n\tconsultar(\"evaluacion\",metodo,true).done(function(data){\r\n\t\t\r\n\t\tvar cantidadDatos = data.length;\r\n\t\tvar contador = 1;\r\n\r\n\t\tdata.forEach(function(item){\r\n\r\n\t\t\tvar datoNumero = $(\"<td></td>\").text(contador);\r\n\t\t\tvar datoAprendiz = $(\"<td></td>\").text(item.aprendiz.nombreCompleto);\r\n\t\t\tvar datoInstructor = $(\"<td></td>\").text(item.instructor.nombreCompleto);\r\n\t\t\tvar datoPregunta = $(\"<td></td>\").text(item.pregunta.nombre);\r\n\t\t\tvar datoPeriodo = $(\"<td></td>\").text(item.detallePeriodo.nombre);\r\n\t\t\tvar datoEstado = $(\"<td></td>\").text(item.detalleEstado.nombre);\r\n\t\t\tvar datoRespuesta = $(\"<td></td>\").text(item.respuesta);\r\n\t\t\tvar datoObservaciones = $(\"<td></td>\").text(item.observaciones);\r\n\t\t\tvar datoFecha = $(\"<td></td>\").text(devolverFecha(item.fecha));\r\n\r\n\t\t\tvar datoOpciones = \"<td>\"+\r\n\t\t\t'<button id=\"btnModificarAprendiz'+contador+'\" class=\"btn btn-table espacioModificar\" data-toggle=\"modal\" data-target=\"#modalModificarAprendiz\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></button>'+\r\n\t\t\t\"</td>\";\r\n\r\n\r\n\r\n\t\t\tvar fila = $(\"<tr></tr>\").append(datoNumero,datoAprendiz,datoInstructor,datoPregunta,datoPeriodo,datoEstado,datoRespuesta,datoObservaciones,datoFecha);\r\n\r\n\t\t\tidCuerpoTabla.append(fila);\r\n\r\n\t\t\t\r\n//\t\t\tasignarEventoClickAprendiz(item.id,item.identificacion,item.nombreCompleto,item.ficha.id,item.detalleEstado.id,contador);\r\n\r\n\t\t\tcontador++; \t\r\n\t\t})\r\n\t\t\r\n\t\tloaderTabla(idLoaderTabla,false);\r\n\t\tverificarDatosTabla(idAlertaTabla,cantidadDatos);\r\n\r\n\t}).fail(function(){\t\r\n\t\tloaderTabla(idLoaderTabla,false);\r\n\t\tagregarAlertaTabla(idAlertaTabla,\"error\");\r\n\t})\r\n}", "function llenarTablaPuertasItemsProteccion(){\n var url=\"http://www.montajesyprocesos.com/inspeccion/servidor/php/json_puertas_items_proteccion.php\";\n $.getJSON(url,function(puertas_items_proteccion){\n crearTablaPuertasItemsProteccion();\n $.each(puertas_items_proteccion, function(i,items){\n addItemsPuertasItemsProteccion(items.k_coditem,items.o_descripcion);\n });\n });\n}", "function listarProductos2(param){\n data = {\n data: localStorage.getItem(\"data\"),\n pruebaData: localStorage.getItem(\"pruebaData\"),\n parametro: param\n };\n ajax(linkRest+\"listar_productos.php\", data, \"POST\")\n .done(function(info){ \n if (info.data == \"fail\") {\n M.toast({html: ''+info.errores[1]});\n }else{\n listaDeProductos = info.data;\n nombreDeProductos = new Array();\n for(var i in listaDeProductos){\n nombreDeProductos.push(listaDeProductos[i].descripcion+\"; Código: \"+ listaDeProductos[i].codigo);\n }\n autocomplete(document.getElementById(\"nameProductAdd\"), nombreDeProductos);\n console.log(nombreDeProductos);\n }\n\n \n \n })\n .fail(function(){\n\n errorGeneral();\n });\n}", "function _roles_list(){\n _loading(1);\n $.post('/api/v1/ams/role',{\n 'id': userData['id'],\n 'token': userData['token'],\n 'status': 0,\n }, function (e) {\n let i;\n if(e['status'] === '00'){\n if(e.data.length > 0){\n for(i=0; i < e.data.length; i++){\n _roles_append(e.data[i], i);\n console.log(i);\n }\n }\n\n console.log(document.getElementById(\"role_body2\"));\n }else{\n notif('danger', 'System Error!', e.message);\n }\n }).fail(function(){\n notif('danger', 'System Error!', 'Mohon kontak IT Administrator');\n }).done(function(){\n _loading(0);\n });\n}", "function listaProdutos(select) {\n $.ajax({\n url: '../produto/lista',\n type: 'GET',\n dataType: 'json',\n contentType: 'application/json; charset=utf-8'\n })\n .done(function(data) {\n let lista='';\n console.log(data);\n produtos = data;\n $.each(data, function(index, el) {\n lista+='<option value=\"'+el.descricao+'\">'+el.descricao+'</option>';\n });\n $(select).append(lista);\n })\n .fail(function() {\n console.log(\"error\");\n })\n .always(function() {\n console.log(\"complete\");\n });\n\n}", "function lista_backup()\n{\n\tvar url=\"inc/datos_gestion.php\"\n\tvar pars=\"opcion=0\"\n\tvar myAjax = new Ajax.Request(url,\n\t\t{\n\t\t\tmethod: 'post',\n\t\t\tparameters: pars,\n\t\t\tonComplete: function gen(respuesta)\n\t\t\t{\n\t\t\t\t$('listado_copias').innerHTML = respuesta.responseText\n\t\t\t}\n\t\t});\n}", "function enviarRequest() {\n datosJson = [];\n\n $(\"tr[id^=tr]\").each(function() {\n item = {}\n item[\"fecha\"] = $(this).find(\"input[id^=fecha-]\").val();\n item[\"dias\"] = $(this).find(\"input[id^=dias-]\").val();\n\n datosJson.push(item);\n\n });\n\n $.ajax({\n url: window.location.href + 'api/ingreso-formulario',\n type: 'GET',\n data: {\n json: JSON.stringify(datosJson)\n },\n contentType: 'application/json',\n dataType: 'json',\n success: function(data) {\n console.log(data);\n procesarResponse(data);\n }\n });\n\n\n}", "function fetchTankList() {\n $.ajax({\n url: '/tank/tankmanager/list-tank',\n dataType: 'json',\n async: false,\n success: function(result) {\n var tankListObject = result;\n for (var tankIndex = 0; tankIndex < tankListObject.obj.length; tankIndex++) {\n \t if(tankListObject.obj[tankIndex].species.length > 0) {\n\n\t var speciesList = JSON.stringify(tankListObject.obj[tankIndex].species);\n\t var speciesListArray = \"data-locations= ''\";\n\t if (speciesList != null) {\n\t var speciesWithoutQuote = speciesList.replace(/[']/g, \"/\");\n\t speciesListArray = \"data-locations= '\" + speciesWithoutQuote + \"'\";\n\t }\n\t $('#hiddenTankArray').append('<option value=\"' + tankListObject.obj[tankIndex]._id + '\" ' + speciesListArray +\n\t ' data=\"' + tankListObject.obj[tankIndex].number + '\">' + tankListObject.obj[tankIndex].name + '</option>');\n \t }\n }\n\t\t\tlistTabletTank();\n }\n });\n}", "function llenarTablaPuertasItemsElectrica(){\n var url=\"http://www.montajesyprocesos.com/inspeccion/servidor/php/json_puertas_items_electrica.php\";\n $.getJSON(url,function(puertas_items_electrica){\n crearTablaPuertasItemsElectrica(); \n $.each(puertas_items_electrica, function(i,items){\n addItemsPuertasItemsElectrica(items.k_coditem_electrica,items.o_descripcion,items.v_clasificacion);\n });\n });\n}", "function llenarTablaEscalerasItemsProteccion(){\n var url=\"http://www.montajesyprocesos.com/inspeccion/servidor/php/json_escaleras_items_proteccion.php\";\n $.getJSON(url,function(escaleras_items_proteccion){\n crearTablaEscalerasItemsProteccion();\n $.each(escaleras_items_proteccion, function(i,items){\n addItemsEscalerasItemsProteccion(items.k_coditem,items.o_descripcion);\n });\n });\n}", "function getToDoList() {\n $.ajax({\n type: 'GET',\n url: 'todo/get',\n success: onSuccess,\n dataType: 'json'\n });\n \n //PARSE the AJAX response\n function onSuccess(data) {\n //Build the HTML for the messsage list\n $('#listContainer').empty();\n for (let i = 0; i < data.length; i += 1) {\n let html = '<input id=\"' + data[i]._id + '\" value=\"' + data[i].todo + '\"></input><button id=\"' + i + '\">X</button><br>';\n $('#listContainer').append(html);\n $('#' + data[i]._id).keypress(function(e) {\n if (e.which === 13) {\n let id = data[i]._id;\n updateToDo(id);\n }\n });\n $('#' + i).click({ id: data[i]._id }, deleteToDo);\n\n }\n }\n }", "function actFormulario(idsistema){\n var url = '../../ccontrol/control/control.php';\n var data = 'p1=listaDetalleFormulario&p2='+idsistema;\n new Ajax.Request (url,\n {method : 'get',\n parameters : data,\n onLoading : function(transport){est_cargador(1);},\n onComplete : function(transport){est_cargador(0);\n $('contenido_detalle').innerHTML=transport.responseText;\n $(\"nombre_formulario\").value='';\n $(\"nombre_formulario\").focus();\n }\n }\n )\n}", "function showData() {\n $.post(jersey_path + \"/getTodo\", function(offerte, status) {\n stampaRisultati(offerte);\n });\n}", "function AdminListPerso() {\n document.getElementById('contenidoDinamico').innerHTML = \"\";\n document.getElementById('contenidoDinamico').innerHTML = \"<div class='loader'>Cargando...</div>\";\n VentanaPorte();\n $.ajax({\n url: \"AdminListaPersonas.jsp\",\n type: \"GET\",\n data: {},\n contentType: \"application/json ; charset=UTF-8\",\n success: function (datos) {\n $(\"#contenidoDinamico\").html(\"\");\n $(\"#contenidoDinamico\").html(datos);\n }\n ,\n error: function (error) {\n location.reload();\n alertError();\n }\n });\n}", "function getTasks() {\n emptyTasks();\n $.ajax({\n method: 'GET',\n url: '/tasks',\n success: function (response) {\n console.log(response);\n for (var i = 0; i < response.length; i++) {\n var task = response[i];\n $('#toDoItem').append('<tr data-id=' + task.id + ' class =' + task.complete + '>' +\n '<td><button class=\"complete\" value=\"' + task.complete + '\">Done!</button></td>' + \n '<td class=\"text\">' + task.task + '</td>' +\n '<td><button class=\"delete\">Delete?</button>' +\n '</td></tr>');\n }//end of for loop\n }//end of response\n })//end of ajax\n}//end of getTasks", "function llenarTablaEscalerasItemsElementos(){\n var url=\"http://www.montajesyprocesos.com/inspeccion/servidor/php/json_escaleras_items_elementos.php\";\n $.getJSON(url,function(escaleras_items_elementos){\n crearTablaEscalerasItemsElementos();\n $.each(escaleras_items_elementos, function(i,items){\n addItemsEscalerasItemsElementos(items.k_coditem,items.o_descripcion);\n });\n });\n}", "function load_methods() {\n j = 0;\n $.ajaxSetup({\n headers: {\n 'X-CSRF-TOKEN': $('meta[name=\"csrf-token\"]').attr('content')\n }\n });\n jQuery.ajax({\n url: getUrl('/individualRecipe/methods'),\n method: 'post',\n data: {\n recipeID: jQuery('.grabIngrediant').attr('id'),\n\n },\n success: function (result) {\n console.log(result);\n\n for (var i = 0; i < result.length; i++) {\n $(\"#methods\").append('Method: ' + [i + 1] + '<li>'\n + '<a class=\"titleDark\">' + result[i].method + '</a>'\n + '</li><br>');\n }\n // jQuery('.alert1').show();//jQuery('.alert1').html(result.success);\n },\n error: function (response) {\n alert('Ooops something went wrong!');\n }\n\n });\n }", "function ObtenerOperador() {\n //Bloquear Pantalla\n parent.fn_util_bloquearPantalla();\n\n var url = $(\"#Url_ListarTodoOperador\").val();\n var Cuenta = $('#cboOperario');\n\n $.ajax({\n type: \"GET\",\n url: url,\n async: true,\n dataType: \"json\",\n cache: false,\n success: function (Result) {\n\n //setTimeout(function () {\n if (Result.iTipoResultado == 1) {\n var lstLista = Result.ListaOperador\n $.each(lstLista, function (index, item) {\n $(\"#cboOperario\").append(\"<option value=\" + this.IdOperario + \">\" + this.NombreCompleto + \"</option>\");\n });\n } else {\n parent.fn_util_MuestraMensaje(\"Error\", Result.Mensaje, \"E\");\n parent.fn_util_desbloquearPantalla();\n }\n //}, 1000);\n },\n beforeSend: function (xhr) {\n parent.fn_util_bloquearPantalla();\n },\n complete: function () {\n parent.fn_util_desbloquearPantalla();\n }\n });\n}", "function carregarEquipes(){\n\n // Buscando da api\n getEquipes()\n .then((resposta) => {\n lista.innerHTML = ''\n resposta.forEach((r) =>{\n addlista(r)\n })\n }) \n\n \n}", "function load_data(){\n $.ajax({ \n type: 'POST',\n url: '?c=clientes&m=get_clientes',\n beforeSend: function () {\n $(\"#information\").html(\"Procesando, espere por favor...\");\n },\n success: function (response) {\n try{\n var json = $.parseJSON(response);\n create_table(json);\n }catch(e){\n alertify.error(\"Error: \"+ e);\n }\n }\n });\n }", "function _retornarTramite(){\n let tramitesDB = [];\n\n let peticion = $.ajax({\n url: 'http://localhost:4000/api/get_all_procedure_data',\n type: 'get',\n contentType: 'application/x-www-form-urlencoded; charset=utf-8',\n dataType: 'json',\n async: false,\n data: {}\n });\n\n peticion.done((tramites) => {\n tramitesDB = tramites\n });\n peticion.fail(() => {\n tramitesDB = []\n console.log('error')\n });\n return tramitesDB\n }", "function retrieveTasksServer() {\n $.ajax(\"TaskServlet\", {\n \"type\": \"get\",\n dataType: \"json\"\n // \"data\": {\n // \"first\": first,\n // \"last\": last\n // }\n }).done(displayTasksServer.bind()); //need reference to the tasksController object\n }", "function getDepartmentsJQ() {\t \n //jQuery.support.cors = true;\n $.ajax(\n {\n type: \"POST\",\n url: serverurl + \"/dep/listu\",\n dataType: \"json\",\n success: function (data) {\n \tconsole.log('data received : ' + data);\n \t\t\t\t//alert(\"test, data = \" + data + \" / length = \" + data.length);\n $.each(data, function (i, item) {\n $(\"#dplist\").append('<li id=\"' + i + '\">' + item.name + '</li>');\n });\n },\n error: function (jqXHR, textStatus, errorThrown) {\n \t console.log('error trapped in error: function(jqXHR, textStatus, errorThrown)');\n \t console.log('XHRstatus = ' + jqXHR.status + ' XHRreadyState = ' + jqXHR.readyState + ', textStatus = ' + textStatus + ', errorThrown = ' + errorThrown);\n }\n });\n}", "function cargar_texto_seccion4(){\n var _url = base_url + \"AjaxSecciones/getSeccionTextos_ajax/\";\n\n $.ajax({\n async: false,\n cache: false,\n url: _url,\n type: 'post',\n dataType: 'json',\n data: {\n tipo: 1,\n idseccion: idseccion_UID\n }\n }).done(function (data) {\n\n if (data.status == \"OK\") {\n\n $(data.datatable_text).each(function () {\n if (this.orden == 1){\n $(\"#txt_texto_es1_UID4\").val(this.texto_es);\n $(\"#txt_texto_en1_UID4\").val(this.texto_en);\n }\n }); \n }\n else {\n $.noticeAdd({ text: data.mensaje, stay: false, type: 'notice-error' });\n }\n }).fail(function () {\n alert(\"Error en petición al cargar textos de sección\");\n });\n}", "function llenarTablaPuertasItemsPreliminar(){\n var url=\"http://www.montajesyprocesos.com/inspeccion/servidor/php/json_puertas_items_preliminar.php\";\n $.getJSON(url,function(puertas_items_preliminar){\n crearTablaPuertasItemsPreliminar(); \n $.each(puertas_items_preliminar, function(i,items){\n addItemsPuertasItemsPreliminar(items.k_coditem,items.o_descripcion);\n });\n });\n}", "function llenarTablaEscalerasItemsPreliminar(){\n var url=\"http://www.montajesyprocesos.com/inspeccion/servidor/php/json_escaleras_items_preliminar.php\";\n $.getJSON(url,function(escaleras_items_preliminar){\n crearTablaEscalerasItemsPreliminar(); \n $.each(escaleras_items_preliminar, function(i,items){\n addItemsEscalerasItemsPreliminar(items.k_coditem,items.o_descripcion);\n });\n });\n}", "function ListarAsistenciasPorSesion(idCurso) {\n $.ajax({\n type: \"get\",\n url: \"/Asistencia/ListarAsistenciasPorSesionCurso\",\n datatype: 'json',\n data: { idCurso: idCurso },\n success: function (response) {\n console.log(response);\n dataAsistenciasDocente.html(\"\");\n if (response != \"\") {\n $.each(response, function (i, res) {\n dataAsistenciasDocente.append(\n '<tr>' +\n '<td>' + res.estudiante.persona.apellidosPersona + '</td>' +\n '<td>' + res.estudiante.persona.nombresPersona + '</td>' +\n '<td>' +\n '<button onclick=\"AddAsistencia(' + res.idAsistencia + ')\" id=\"btnAsist' + res.idAsistencia + '\" class=\"btn\" >A</button>' +\n '<button onclick=\"DeleteAsistencia(' + res.idAsistencia + ')\" id=\"btnFalta' + res.idAsistencia + '\" class=\"btn\">F</button>' +\n '</td>' +\n '</tr>');\n if (res.asistenciaEstudiante == 1) {\n pintarAsist(res.idAsistencia);\n } else {\n pintarFalta(res.idAsistencia);\n }\n });\n }\n }\n });\n}", "function Ajax_Aldeas_Municipios(Municipio, multi) {\n $.ajax({\n type: \"post\",\n url: \"/Incorporaciones/Reportes/Mostrar_Aldeas/\",\n data: { 'municipio': Municipio },\n success: function (response) {\n AldeasCb.ClearItems()\n CaserioCb.ClearItems()\n var ResponseParser = JSON.parse(response)\n if (JSON.parse(response).length != 0 && multi ==1)\n {\n AldeasCb.AddItem(\"TODOS\", \"00\")\n } \n for (i = 0 ; i < ResponseParser.length; i++) {\n AldeasCb.AddItem(ResponseParser[i][\"desc_aldea\"], ResponseParser[i][\"cod_aldea\"])\n }\n }\n })\n}", "function listar(){\n __ajax(\"php/ConsultaPais.php\",\"\")\n .done( function( info ){\n var paises= JSON.parse(info);\n var html=\"\";\n for(var i in paises.data){\n html+=`<a id=\"${paises.data.Pais}\"href=\"Anuncios.php\">${paises.data[i].Pais},</a>`\n }\n $(\"#paises\").html( html );\n });\n}", "function ListarVendedores() {\n //DESCRIPCION : Funcion que me trae la lista de vendedores\n $.ajax({\n type: \"POST\",\n url: \"frmRutasAsignadas.aspx/ListarVendedores\",\n data: \"{'flag': '1' }\",\n contentType: 'application/json; charset=utf-8',\n error: function (xhr, ajaxOtions, thrownError) {\n console.log(xhr.status + \"\\n\" + xhr.responseText, \"\\n\" + thrownError);\n },\n success: function (data) {\n addSelectVendedor(data.d);\n }\n })\n\n }", "function listarTudo() {\n\t\t\tImpostoService.listarTudo().then(function sucess(result) {\n\t\t\t\tvm.impostos = result.data;\n\t\t\t}, function error(response) {\n\t\t\t\tvm.mensagemErro(response);\n\t\t\t});\n\t\t}", "function listaServicio(){\n\t$('#listaorders').empty();\n\t$('#listaorders').append('<h2> <img src=\"app/site/img/servicios.png\">Lista de Servicios </h2> <hr>');\n\t$('#listaorders').append('<div id=\"msg_correcto\"></div>');\n $('#msg_correcto').fadeOut(1000);\n\t$('#listaorders').append('<a href=\"#\" onclick=\"nuevoServicio()\" class=\"enlace_boton_lista\"> <img src=\"app/site/img/servicios.png\" align=\"absmiddle\" height=\"20\"> Nuevo Servicio</a>');\n\tvar listaServicio = \"\";\n\tlistaServicio \t = listaServicio+'<div id=\"contenido_lista_servicio\">';\n\tlistaServicio = listaServicio+'<ul id=\"lista_clientes_total\">';\n\tlistaServicio \t = listaServicio+'</table>';\n\tlistaServicio \t = listaServicio+'</div>';\n\t$('#listaorders').append(listaServicio);\n\t$.ajax({\n\t\turl:\"?action=servicios&tp=listaServicios\",\n\t\tdataType:\"json\",\n\t\ttype:\"GET\",\n\t\tbeforeSend:function(){\n\t\t\t $('#msg_correcto').empty();\n\t\t\t\t$('#msg_correcto').append('<img src=\"app/site/img/ajax-loader.gif\" align=\"absmiddle\"> Cargando..').hide().fadeIn(1000);\n\t\t},\n\t\tsuccess:function(data){\n\t\t\t$('#msg_correcto').empty();\n\t\t\t$.each(data, function(index, value){\n \t\t\t\t$('#lista_clientes_total').append('<li><table><tr><td><img src=\"app/site/img/hab.jpg\" align=\"left\" class=\"imagen_pieza\"></td><td><b>Nombre: </b>'+value.nombre_servicio+'<br><b>Detalle: </b>'+value.detalle_servicio+'<br><b>Codigo: </b>'+value.codigo_servicio+'</td></tr></table><br><a href=\"#\" onclick=\"editarServicio('+value.id_servicio+')\" class=\"enlace_boton_lista\" style=\"margin-left:100px;\"><img src=\"app/site/img/pencil.png\" height=\"20\" title=\"Editar Datos de Cliente\" align=\"absmiddle\"> Editar</a> <a href=\"#\" onclick=\"eliminarServicio('+value.id_servicio+')\" title=\"Eliminar Cliente\" class=\"enlace_boton_lista\"><img src=\"app/site/img/eliminar.png\" height=\"20\" align=\"absmiddle\"> Eliminar</a></li>').hide().fadeIn(500); \t\t\t \n \t});\n\t\t},\n\t\terror:function(data){\n\t\t}\n\t});\t\n\tnew Modal().show(670,550);\n}", "function listarInstructores() {\n $.ajax({\n beforeSend: function (xhr) {\n\n },\n method: \"POST\",\n url: \"ServletProgramacion\",\n data: {\n validacion: \"comboboxInstructores\"\n },\n error: function (jqXHR, textStatus, errorThrown) {\n swal({title: \"Error en el Servidor\",\n text: \"Lo sentimos... Intentalo Nuevamente\",\n type: \"error\",\n timer: 4000,\n showConfirmButton: true});\n },\n complete: function (jqXHR, textStatus) {\n\n }\n })\n .done(function (msg) {\n //$(\"#jsonphp\").html(msg);\n //print(msg); funcion que convierte a pdf\n $('select[name=instructores] option').remove();\n var myObject = eval('(' + msg + ')');\n $('select[name=instructores]').append('<option name=\"opciones\" value=\"\" disabled selected>Seleccione</option>');\n for (var i = 0; i < myObject.length + 1; i++) {\n $('select').material_select();//funcion materialize para actualizar el combobox\n $('select[name=instructores]').append('<option value=' + myObject[i].nombre + \" \" + myObject[i].apellido + '>' + myObject[i].nombre + \" \" + myObject[i].apellido + '</option>');\n }\n\n });\n}", "function listarEmergencias(){\n \n /*EN LA SIGUIENTE LLAMADA AJAX SE RECUPERAN DATOS DE LAS EMERGENCIAS Y SE AÑADEN COMO CODIGO HTML*/\n $.ajax({\n url:'listarEmergencias.php',\n data:{},\n method:'POST',\n dataType:'json',\n success: function(datosEmergencia){\n for(var i in datosEmergencia){\n /*EL CÓDIGO HTML MOSTRADO TIENE UN TAG DE CLASS=ALTA, \n ESTO DESPLIEGA UN ÍCONO EN EL LISTADO DE LAS EMERGENCIAS, ASOCIADO A LA PRIORIDAD\n DE LA MISMA, ES POR STO QUE SE REALIZAN IF'S CON RESPECTO A LA PRIORIDAD'*/\n if(datosEmergencia[i].priority==\"Alta\"){\n $('#lista-emergencias ul').append('<li value=\"100\" data-lat='+datosEmergencia[i].latitude+' data-long='+datosEmergencia[i].longitude+'><div id=\"contenedor-lista-emergencias\"><div id=\"datos-emergencia\" ><p>Id emergencia: '+datosEmergencia[i].id_emergency+'</p>Dirección: '+datosEmergencia[i].address+'</p></div><div id=\"imagen-prioridad\" class=\"Alta\">'+datosEmergencia[i].priority+'</div></div></li><hr>'); \n \n }\n if(datosEmergencia[i].priority==\"Desconocida\"){\n $('#lista-emergencias ul').append('<li value=\"100\" data-lat='+datosEmergencia[i].latitude+' data-long='+datosEmergencia[i].longitude+'><div id=\"contenedor-lista-emergencias\"><div id=\"datos-emergencia\" ><p>Id emergencia: '+datosEmergencia[i].id_emergency+'</p>Dirección: '+datosEmergencia[i].address+'</p></div><div id=\"imagen-prioridad\" class=\"Desconocida\">'+datosEmergencia[i].priority+'</div></div></li><hr>'); \n \n }\n if(datosEmergencia[i].priority==\"Muy Alta\"){\n $('#lista-emergencias ul').append('<li value=\"100\" data-lat='+datosEmergencia[i].latitude+' data-long='+datosEmergencia[i].longitude+'><div id=\"contenedor-lista-emergencias\"><div id=\"datos-emergencia\" ><p>Id emergencia: '+datosEmergencia[i].id_emergency+'</p>Dirección: '+datosEmergencia[i].address+'</p></div><div id=\"imagen-prioridad\" class=\"MuyAlta\">'+datosEmergencia[i].priority+'</div></div></li><hr>'); \n \n }\n if(datosEmergencia[i].priority==\"Media\"){\n $('#lista-emergencias ul').append('<li value=\"100\" data-lat='+datosEmergencia[i].latitude+' data-long='+datosEmergencia[i].longitude+'><div id=\"contenedor-lista-emergencias\"><div id=\"datos-emergencia\" ><p>Id emergencia: '+datosEmergencia[i].id_emergency+'</p>Dirección: '+datosEmergencia[i].address+'</p></div><div id=\"imagen-prioridad\" class=\"Media\">'+datosEmergencia[i].priority+'</div></div></li><hr>'); \n \n }\n if(datosEmergencia[i].priority==\"Baja\"){\n $('#lista-emergencias ul').append('<li value=\"100\" data-lat='+datosEmergencia[i].latitude+' data-long='+datosEmergencia[i].longitude+'><div id=\"contenedor-lista-emergencias\"><div id=\"datos-emergencia\" ><p>Id emergencia: '+datosEmergencia[i].id_emergency+'</p>Dirección: '+datosEmergencia[i].address+'</p></div><div id=\"imagen-prioridad\" class=\"Baja\">'+datosEmergencia[i].priority+'</div></div></li><hr>'); \n \n } \n \n }\n $('#lista-emergencias ul li').click(function(){\n /*ESTA FUNCIÓN PERMITE QUE AL SELECCIONAR UNA DE LAS EMERGENCIAS DE LA LISTA,\n EL MAPA SE CENTRE CON RESPECTO A LA MISMA*/\n //console.log('lat'+$(this).attr('data-lat')+'long'+$(this).attr('data-long'));\n var lat=$(this).attr('data-lat');\n var long=$(this).attr('data-long');\n map.panTo([lat,long],15,{animation:true});\n map.panBy([-308,0]);\n \n \n });\n \n },\n error: function (xhr, ajaxOptions, thrownError) {\n alert(\"error\"+xhr.status+\"\"+thrownError);\n \n }\n });\n}", "function formulario_telefonos()\n{\n\tvar url=\"inc/datos_gestion.php\";\n\tvar pars=\"opcion=11\"\n\tvar myAjax = new Ajax.Request(url,\n\t\t{\n\t\t\tmethod: 'post',\n\t\t\tparameters: pars,\n\t\t\tonComplete: function gen(respuesta)\n\t\t\t{\n\t\t\t$('listado_copias').innerHTML = respuesta.responseText\n\t\t\t},\n\t\tonCreate: $('listado_copias').innerHTML = \"<center><p class='validacion'>Generando Listado...<br/><img src='imagenes/loader.gif' alt='Generando Listado' /></p></center>\"\t\n\t\t\n\t\t});\n}", "function cargarTipo(IdMaestro) {\r\n\r\n $.ajax({\r\n url:baseURL + \"pages/VerificarProcesosVencidos/cargarComboTipo\",\r\n type:'post',\r\n async:false,\r\n data:{\r\n \tidMaestroColumna : IdMaestro\r\n },\r\n beforeSend:muestraLoading,\r\n success:function(data){\r\n \t\r\n \t$.each(data.filas, function( index, value ) {\r\n \t\r\n \t\ttipoPrueba = value.descripcion;\r\n \t\t\r\n });\r\n \r\n },\r\n error:errorAjax\r\n });\r\n}", "function cargar_texto_seccion3(){\n var _url = base_url + \"AjaxSecciones/getSeccionTextos_ajax/\";\n\n $.ajax({\n async: false,\n cache: false,\n url: _url,\n type: 'post',\n dataType: 'json',\n data: {\n tipo: 1,\n idseccion: idseccion_UID\n }\n }).done(function (data) {\n\n if (data.status == \"OK\") {\n\n $(data.datatable_text).each(function () {\n if (this.orden == 1){\n $(\"#txt_texto_es1_UID3\").val(this.texto_es);\n $(\"#txt_texto_en1_UID3\").val(this.texto_en);\n }\n else if (this.orden == 2){\n $(\"#txt_texto_es2_UID3\").val(this.texto_es);\n $(\"#txt_texto_en2_UID3\").val(this.texto_en);\n }\n }); \n }\n else {\n $.noticeAdd({ text: data.mensaje, stay: false, type: 'notice-error' });\n }\n }).fail(function () {\n alert(\"Error en petición al cargar textos de sección\");\n });\n}", "function fn_buscarPrivadoSimpleEvaMRV() {\n item = {\n BUSCAR: $(\"#txt-buscar\").val(),\n IDUSUARIO: $(\"#Control\").data(\"usuario\")\n };\n\n vurl = baseUrl + \"Gestion/BusquedaSimpleEvaMRV\";\n $.ajax({\n url: vurl,\n type: 'POST',\n datatype: 'json',\n data: item,\n success: function (data) {\n if (data != null && data != \"\") {\n if (data.length > 0) {\n\n $(\"#cuerpoMitigacion\").html(\"\");\n for (var i = 0; i < data.length; i++) {\n tablaMitigacionPrivado(data);\n }\n }\n }\n }\n });\n}", "async function activarUsuarios (seleccionados){\n var messages = new Array();\n for (i=0; i < seleccionados.length; i++){\n await $.ajax({\n url: \"https://localhost:3000/volvo/api/GU/GU_GESTION_USUARIOS\",\n headers: {'Authorization': 'Bearer ' + localStorage.getItem('token')},\n data: {\n \"accion\" : 'ACTIVATE',\n \"nombreUsuario\" : $('#nombreUsuario'+seleccionados[i]).text()\n },\n dataType: \"json\",\n method: \"POST\",\n success: function(respuesta){\n if(respuesta.output.pcodigoMensaje == 0){\n messages.push({pcodigoMensaje: respuesta.output.pcodigoMensaje, usuario: $('#nombreUsuario'+seleccionados[i]).text()})\n }else{\n messages.push({pcodigoMensaje: respuesta.output.pcodigoMensaje, usuario: $('#nombreUsuario'+seleccionados[i]).text()})\n }\n },\n error : function(error){\n messages.push({pcodigoMensaje: respuesta.output.pcodigoMensaje, usuario: $('#nombreUsuario'+seleccionados[i]).text()})\n }\n });\n }\n return messages;\n}", "function LISTADO () {\n\t\n\t$.ajax({\n\t\turl : 'http://localhost:3007/notes',\n\t\tdataType : 'JSON',\n\t\tsuccess : function(data){\n\n\t\t\tvar html = '';\n\n\t\t\tdata.forEach( function(element, index) {\n\n\t\t\t\thtml += `\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t <td>${element._id}</td>\n\t\t\t\t\t\t\t <td>${element.title}</td>\n\t\t\t\t\t\t\t <td>${element.description}</td>\n\t\t\t\t\t\t\t <td>\n\t\t\t\t\t\t\t \t<button type=\"button\" class=\"btn btn-sm btn-info btnEditar\" title=\"${element.title}\" description=\"${element.description}\" data-id=\"${element._id}\">Editar</button>\n\t\t\t\t\t\t\t </td>\n\t\t\t\t\t\t\t <td>\n\t \t\t\t\t\t\t<button type=\"button\" class=\"btn btn-sm btn-danger btnEliminar\" title=\"${element.title}\" description=\"${element.description}\" data-id=\"${element._id}\">Eliminar</button>\n\t\t\t\t\t\t\t </td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t`;\n\n\t\t\t});\n\n\t\t\t$('#listado').html(html);\n\n\t\t}\n\t});\n\n}", "function loadAll() {\n var items = '';\n $.ajax({\n type: 'POST',\n url: UrlAll,\n dataType: 'json',\n contentType: 'application/json; charset=utf-8',\n }).done(function (resp) {\n if (resp.length > 0) {\n $.each(resp, function (idx, val) {\n items += '<li draggable=\"true\" id=' + val.BlockId + '>' + val.BlockName + '</li>';\n });\n $(listId).html(items);\n setListEvents();\n }\n else {\n $(listId).html('<p > Список пустий </p>');\n }\n loadSelected();\n }).error(function (err) {\n alert('Error! ' + err.status);\n });\n }", "function ComentarioPorComentario(idComentario){\n $.post(baseurl+\"cGetComentarios/getComentarios_Por_Comentario\",\n {\n idComentario:idComentario\n },\n function(data){\n $('#ListaComentariosComent'+idComentario+'').html(\"\");\n var emp1 = JSON.parse(data);\n $.each(emp1,function(i,item){\n $('#ListaComentariosComent'+idComentario+'').append(\n '<div class=\"box box-danger collapsed-box\">'+\n '<div class=\"box-header with-border bg-info\">'+\n '<div class=\"user-block\">'+\n '<img class=\"img-circle img-bordered-sm\" src=\"'+baseurl+'assets/dist/img/'+item.url_foto+'\" alt=\"User Image\">'+\n '<span class=\"username\">'+\n '<a href=\"#\">'+item.Nombre+' '+item.Paterno+'</a>'+\n '</span>'+\n '<span class=\"description\">'+item.Fecha_Creacion+'</span>'+\n '</div>'+\n '<h4 class=\"\">'+item.Comentario+'</h4>'+\n '</div><!-- /.box-header -->'+\n '</div><!-- /.box -->')\n });\n });\n}", "function getTasks(stopServerCalls) {\n console.log(projectID);\n $.ajax({\n type: 'POST',\n url: 'Project',\n data: {\n domain: 'project',\n action: 'getProjectTasks',\n id: projectID,\n },\n success: function (data) {\n console.log('proj tasks!!!!', data);\n let type = getParameterByName('from');\n\n tasks = data;\n if (data) {\n clearTaskTable();\n fillTasksTable(data);\n }\n if (!stopServerCalls) getUserData();\n },\n error: function (data) {\n alert('Server Error!10');\n },\n });\n}", "function llenarTablaPuertasItemsMecanicos(){\n var url=\"http://www.montajesyprocesos.com/inspeccion/servidor/php/json_puertas_items_mecanicos.php\";\n $.getJSON(url,function(puertas_items_mecanicos){\n crearTablaPuertasItemsMecanicos(); \n $.each(puertas_items_mecanicos, function(i,items){\n addItemsPuertasItemsMecanicos(items.k_coditem_puertas,items.o_descripcion,items.v_clasificacion);\n });\n });\n}", "function loadAllTweets(){\n $.ajax(\"/tweets\").then((product) => {\n renderTweets(product);\n })\n }", "function retornarNomeLista(){\n\t//Pegar id pela URR e mostrar produtos da lista \n\tvar queries = {};\n\t$.each(document.location.search.substr(1).split('&'), function(c,q){\n\t\tvar i = q.split('=');\n\t\tqueries[i[0].toString()] = i[1].toString();\n\t});\n\t\n\t// $(\"#nomeDaLista\").html(queries['id']);\n\tvar idLista=queries['id'];\n\twindow.localStorage.idListaClicada= idLista;\n\n $.ajax({\n type: 'POST'\n , url: \"http://192.168.1.102/Servidor/ListaDeProdutos.asmx/retornarLista\"\n\t\t, crossDomain:true\n , contentType: 'application/json; charset=utf-8'\n , dataType: 'json'\n ,data: \"{idUsuario:'\"+ID_USUARIO+\"',token:'\"+TOKEN+\"',idListaDeProdutos:'\"+idLista+\"'}\"\n , success: function (data, status){ \n\t\t\tvar nomeLista = $.parseJSON(data.d); \n\t\t\t$(\"#tituloLista\").html(nomeLista.nome);\n\t\t}\n , error: function (xmlHttpRequest, status, err) {\n alert('Ocorreu um erro no servidor');\n }\n });\n}" ]
[ "0.6725584", "0.66058636", "0.65997976", "0.6570963", "0.65564823", "0.6507359", "0.6498004", "0.6489252", "0.64495796", "0.64340883", "0.6433673", "0.64297277", "0.64282286", "0.64084625", "0.6398792", "0.63877296", "0.6387373", "0.63798267", "0.63782865", "0.6376303", "0.63515735", "0.63445526", "0.628694", "0.6279258", "0.6279", "0.6276968", "0.6272021", "0.6260213", "0.62354785", "0.623024", "0.6216313", "0.6214187", "0.6205385", "0.6194842", "0.61859894", "0.61815", "0.61785614", "0.61768085", "0.6176195", "0.61722827", "0.616904", "0.61671275", "0.6166179", "0.6162749", "0.6152392", "0.61522275", "0.615002", "0.6146863", "0.61399895", "0.6137037", "0.61333126", "0.6132417", "0.61310256", "0.61307555", "0.61262065", "0.6123462", "0.61168003", "0.61048", "0.6104779", "0.60941374", "0.6080796", "0.6080628", "0.60790354", "0.6078694", "0.6075749", "0.606785", "0.60589963", "0.6057092", "0.60551375", "0.60505223", "0.60495204", "0.6036367", "0.60337", "0.60307086", "0.60294557", "0.6028992", "0.60277027", "0.6027404", "0.60273755", "0.6026527", "0.60229176", "0.6021415", "0.6019575", "0.6014381", "0.60090333", "0.6008743", "0.600582", "0.6005727", "0.60046303", "0.59982103", "0.5993723", "0.5993016", "0.59914136", "0.5987364", "0.59862155", "0.5984208", "0.5980976", "0.59806514", "0.59795845", "0.5978321" ]
0.7209536
0
import FormInfo from "./components/forminfo/FormInfo";
function App() { const [show, setShow] = useState(false); const [hash, setHash] = useState(window.location.hash); // const [showForm, setShowForm] = useState(false); return ( <div className="App"> <Router basename="/"> {/* <FormInfo showForm={showForm} setShowForm={setShowForm} /> */} <Menus show={show} setShow={setShow} hash={hash} // setHash={setHash} /> <div className={show ? "width-100 none-scroll" : "width-100"}> <Switch> <Route exact path="/tin-tuc" component={() => ( <News setHash={setHash} // setShowForm={setShowForm} /> )} /> <Route exact path="/tien-do-du-an-danko-city-ngay-19-5-2021" component={() => ( <TienDoDuAn setHash={setHash} // setShowForm={setShowForm} /> )} /> <Route exact path="/dat-nen-danko-city-xuat-ngoai-giao-chiet-khau-toi-12-ty" component={() => ( <DatNenDanko setHash={setHash} // setShowForm={setShowForm} /> )} /> <Route exact path="/danko-city-duoc-vinh-danh-top-10-du-an-do-thi-va-nha-o-tiem-nang-nhat-2021" component={() => ( <DankoVinhDanh setHash={setHash} // setShowForm={setShowForm} /> )} /> <Route exact path="/dat-nen-vinh-yen-vinh-phuc" component={() => ( <DatNenVinhYen setHash={setHash} // setShowForm={setShowForm} /> )} /> <Route exact path="/" component={() => ( <Home setHash={setHash} // setShowForm={setShowForm} /> )} /> <Redirect to="/" /> </Switch> </div> <BackToTops /> {/* <BackToTop showOnScrollUp={false} showAt={20} speed={1500} easing="easeInOutQuint" > Up </BackToTop> */} </Router> <Footer /> <Hotline /> </div> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function App() {\n return (\n <div> {/* Empty App */}\n<h2>Form</h2>\n {/* <Employee></Employee> */}\n <Form></Form>\n\n {/* <BrowserRouter>\n <Switch>\n <Route exact path=\"/\" componet={Form}/>\n <Route path=\"/success\" componet={Success} />\n </Switch>\n </BrowserRouter> */}\n </div>\n );\n}", "function App(props){\n return(\n <div>\n <Form />\n <ContactList />\n </div>\n )\n}", "function App() {\n return (\n <div>\n <RegistrationForm />\n </div>\n );\n}", "function RegistrationPage() {\n return (\n <div>\n <Form1 />\n </div>\n )\n}", "render() {\n return (\n <div className=\"App\">\n {/* <Header/> */}\n <Form/>\n\n </div>\n \n );\n }", "function App() {\n return (\n <div>\n <Info/>\n </div>\n )\n}", "function App() {\n\n // stuff goes here\n return (\n <div>\n <h1>Here is a form</h1>\n <Name firstName=\"Julian\" />\n <MakeForm />\n </div>\n );\n}", "import() {\n }", "getComponent(location, cb) { \n // React will fetch code for getComponent() and call the callback, cb\n System.import('./components/artists/ArtistCreate')\n .then(module => cb(null, module.default));\n // remember System.import('') - webpack will automatically modify the bundle that is generated to split off the module that is called\n // Gotcha's: cb(error argument,)\n // Note: Webpack manually scans for System.import() calls so a help function cannot be used to minimize this code whenusing webpack (b/c of limitations)\n }", "function App() {\n return (\n <div className=\"App\">\n {/* <Form/> */}\n {/* <Formik/> */}\n </div>\n );\n}", "render(){\n // todo add the components\n return( <LoginForm/>);\n \n // Todo add the Form \n }", "formInputAction(formInput){\n this.props.useFormInput(formInput);\n }", "render()\n {\n return (\n <>\n <section className=\"content-header\">\n <div className=\"container-fluid\">\n <div className=\"row mb-2\">\n <div className=\"col-sm-6\">\n <h1>Tippers</h1>\n </div>\n <div className=\"col-sm-6\">\n <nav aria-label=\"breadcrumb\">\n <ol className=\"breadcrumb float-md-end\">\n <li className=\"breadcrumb-item\">\n <Link to=\"/manager/dashboard\">\n Dashboard\n </Link>\n </li>\n <li className=\"breadcrumb-item active\" aria-current=\"page\">Tippers</li>\n </ol>\n </nav>\n </div>\n </div>\n </div>\n </section>\n <section className=\"content\">\n <div className=\"container-fluid\">\n Tippers\n {/* <Switch>\n <Route exact path=\"/manager/tippers/create\">\n <Form\n model=\"tippers\" \n url=\"create\"\n fields={ FormFields() }\n currentText=\"Create a tipper\" />\n </Route>\n <Route exact path=\"/manager/tippers/edit/:id\">\n <Form\n model=\"tippers\" \n url=\"update\"\n fields={ FormFields() }\n currentText=\"Edit the tipper\" />\n </Route>\n <Route exact path=\"/manager/tippers\">\n <Table model=\"tippers\" />\n </Route>\n <Route path=\"*\">\n <NoMatch />\n </Route>\n </Switch> */}\n </div>\n </section>\n </>\n );\n }", "function Homepage() {\n return (\n <div >\n <Navbar />\n <Entryform />\n <Displayform />\n </div>\n )\n}", "constructor(def = {}) {\n super(\"Test\");\n this.Form = TestForm;\n }", "function PageProfileEdit() {\n return (\n <>\n \n <ProfileEditForm />\n </>\n\n )\n}", "componentWillMount() {\n this.formFields = this.createFormStructure();\n }", "function FormsComp () {\n return (\n <Card className='m-2'>\n <Card.Header>\n <h3>Login</h3>\n </Card.Header>\n <Form className='m-3'> \n <Form.Group controlId='basicEmail'>\n <Form.Label>Email Address:</Form.Label>\n <Form.Control type='email' placeHolder='Enter Email'/>\n <Form.Text cassName='text-mute'>\n Some intructions here\n </Form.Text>\n </Form.Group>\n\n <Form.Group controlId='basicPasswd'>\n <Form.Label>Password:</Form.Label>\n <Form.Control type='password' placeHolder='Password'/>\n </Form.Group>\n <Button variant='secondary' type='submit'>\n Submit\n </Button>\n </Form>\n </Card>\n )\n}", "function UtensilsMain() {\n return (\n <Fragment>\n <UtensilsForm />\n <UtensilsDisplay />\n </Fragment>\n )\n}", "component() {\n return import(/* webpackChunkName: \"about\" */ '../views/About.vue');\n }", "function SignupForm() {\n return (\n <div className={styles.indivForm}>\n <IndividualSignUpForm iconPic1={\"user\"} iconPic2={\"key\"} />\n </div>\n );\n}", "render() {\n return (\n <Page>\n <Navbar title=\"创建新网络\" backLink=\"Back\" sliding />\n <CreateNetworkForm />\n </Page>\n )\n }", "render() {\n return (\n <div className=\"container dritaContainer\">\n <RegForm\n handleFirstName={this.handleFirstName}\n handleLastName={this.handleLastName}\n handleAddOne={this.handleAddOne}\n handleAddTwo={this.handleAddTwo}\n handleCity={this.handleCity}\n handleState={this.handleState}\n handleZip={this.handleZip}\n handlePhone={this.handlePhone}\n handleEmail={this.handleEmail}\n handlePassword={this.handlePassword}\n // handleInputChange={this.handleInputChange}\n // handleInputChange={this.handleInputChange}\n handleFormSubmit={this.handleFormSubmit}\n />\n <br/>\n </div>\n )\n }", "render() {\n return (\n <div>\n <form action=\"\" className=\"ui form error\" onSubmit={this.props.handleSubmit(this.onSubmit)}>\n <Field name=\"title\" component={this.renderInput} label=\"Enter Title\" />\n <Field name=\"description\" component={this.renderInput} label=\"Enter Description\" />\n <button className=\"ui button primary\">Submit</button>\n </form>\n </div>\n )\n }", "function FormInput(props) {\n return (\n <Form.Group as={Col} controlId={props.label} md=\"2\">\n <Form.Label>{props.label}</Form.Label>\n <Form.Control type={props.type} />\n </Form.Group>\n )\n\n}", "render() {\n return (\n <div className=\"wrapper\">\n <div className=\"main\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-sm-5 info\">\n <Info />\n </div>\n <div className=\"col-sm-7 form\">\n <Form weatherMethod={this.gettingWeather} />\n <Weather\n temp={this.state.temp}\n city={this.state.city}\n country={this.state.country}\n pressure={this.state.pressure}\n sunset={this.state.sunset}\n error={this.state.error}\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n }", "function NewPost() {\n return (\n <div className=\"NewPost col-8\">\n <h2>New Post</h2>\n <PostEditForm />\n </div>\n );\n}", "componentDidMount(){\n this.handleGetForm()\n}", "getForm() {\r\n return (\r\n <StagingForm\r\n // Update functions\r\n //onStagingUpdate={this.handleStagingUpdate}\r\n\t\t\t\tupdateValue={this.updateValue}\r\n // Properties\r\n staging={this.staging}\r\n />\r\n ); \r\n }", "getExposedConfig() {\n const {form} = this.props.form;\n return {\n form\n }\n }", "render() {\n return (\n <div>\n <List todoData={this.state.todoList} toggleTodo={this.toggleTodo} />\n <Form\n addNewTodo={this.addNewTodo}\n changeHandler={this.changeHandler}\n newTodo={this.state.newTodo}\n toggleTodo={this.toggleTodo}\n clearCompleted={this.clearCompleted}\n />\n </div>\n );\n }", "componentDidMount() {\n this.importBDD();\n }", "function List({ form }) {\n // const classes = useStyles()\n return (\n <Card>\n <CardContent>\n <Typography\n variant=\"body2\"\n color=\"textSecondary\"\n component=\"p\"\n gutterBottom\n >\n {form.formName}\n {/* {form.queTitle} */}\n </Typography>\n </CardContent>\n </Card>\n );\n}", "function App() {\n return(\n <>\n <h1 className=\"heading\">PROGRAD NOTES</h1>\n <Form/>\n <hr></hr>\n <Display/>\n </>\n )\n}", "function FormElement(props) {\n return (\n <Form\n viewsiteId={props.viewsiteId}\n viewpageId={props.viewpageId}\n element={props.element}\n onEditElement={props.onEditElement}\n onDeleteElement={props.onDeleteElement}\n onSetGlobalState={props.onSetGlobalState}/>\n );\n}", "function include(path) {\nreturn () => import('@/components/' + path)\n}", "render() {\n return (\n <div>\n <form className=\"form-style-5\">\n <legend> Sign up / Sign in </legend>\n <div>\n <label htmlFor=\"userName\">UserName</label>\n <input name=\"userName\" component=\"input\" type=\"text\" />\n </div>\n <div>\n <label htmlFor=\"password\">Password</label>\n <input name=\"password\" component=\"input\" type=\"text\" />\n </div>\n <button type=\"submit\">SignUp</button>\n <button type=\"submit\">SignIn</button>\n </form>\n </div>\n )\n }", "function App() {\n return (\n <div className=\"App\">\n <header className=\"App-header\">\n <h3>Email App</h3>\n </header>\n <main>\n <CsvUpload />\n <hr />\n <ListFiles />\n <hr />\n <CurrFileData />\n </main>\n </div>\n );\n}", "render(){\n return(\n <div>\n <h1>Liste des employés</h1>\n <MenuAllForm/>\n <EmployeForm/>\n </div>\n );\n }", "render() {\n return (\n <div className=\"head-bar\">\n <h1 className=\"head-title\">POLUTFORSKER</h1>\n <form className=\"search-form\" onSubmit={this.handleSubmit}>\n <Field\n name=\"search\"\n component=\"input\"\n type=\"text\"\n placeholder=\"Search...\"\n />\n </form>\n </div>\n );\n }", "render() {\n const {\n handleSubmit,\n pristine,\n reset,\n submitting,\n renderToaster,\n color,\n initialValues\n } = this.props;\n\n //String import\n const {\n CONTACT_NAME,\n CONTACT_NOTE,\n CONTACT_PHONE,\n CONTACT_EMAIL,\n CONTACT_WEBSITE\n } = PLACEHOLDER;\n\n const { NAME, NOTE, PHONE, EMAIL, WEBSITE } = FILEDS;\n\n return (\n <form onSubmit={handleSubmit}>\n <MDBRow className='align-items-center horizontal_bar_margin'>\n <MDBCol className='col-2'>\n <img className='supp_icon' alt='Logo' />\n </MDBCol>\n <MDBCol className='text-left'>\n <h3>\n <Field\n name={NAME}\n type='text'\n component={renderRow}\n placeholder={CONTACT_NAME}\n />\n </h3>\n <div className='lead'>\n <MDBIcon icon='comments' className='icon_note' />\n <div className='edit display_info_inline'>\n <Field\n name={NOTE}\n type='text'\n component={renderRow}\n placeholder={CONTACT_NOTE}\n />\n </div>\n </div>\n </MDBCol>\n </MDBRow>\n <hr className='my-2' />\n <div className='left_info_align'>\n <MDBTable responsive className='infoTable'>\n <MDBTableBody>\n <Field\n name={PHONE}\n placeholder={CONTACT_PHONE}\n type='text'\n component={renderInfoRow}\n renderToaster={renderToaster}\n icon='phone'\n />\n <Field\n name={EMAIL}\n placeholder={CONTACT_EMAIL}\n type='text'\n component={renderInfoRow}\n renderToaster={renderToaster}\n icon='envelope'\n />\n <Field\n name='url'\n placeholder={CONTACT_WEBSITE}\n type='text'\n component={renderInfoRow}\n renderToaster={renderToaster}\n icon='link'\n />\n </MDBTableBody>\n </MDBTable>\n </div>\n <Tabs\n id='CredentialsManager'\n onChange={e => this.handleTabChange(e)}\n selectedTabId={this.state.navbarTabId}\n >\n {/* Managing password */}\n\n <Tab\n className='my-table-panel'\n id='pwd'\n title='Password'\n panel={\n <FieldArray\n name='credentials'\n component={renderCredentialList}\n color={color}\n renderToaster={() => renderToaster()}\n />\n }\n />\n {/* Managing licences */}\n <Tab\n className='my-table-panel'\n id='lcs'\n title='Licences'\n panel={\n <FieldArray\n name='licences'\n component={renderLicencesList}\n color={color}\n renderToaster={renderToaster}\n setChange={(name, value) => this.setFormChange(name, value)}\n />\n }\n />\n </Tabs>\n <Button type='submit'>Valider</Button>\n </form>\n );\n }", "constructor(props) {\n super(props);\n this.formName = 'interface-login';\n this.formClass = 'interface-login';\n this.formID = 'interface-login';\n this.formType = 'POST';\n }", "constructor(parent) {\n this.parent = parent;\n this.form = this.createForm();\n }", "componentDidMount() {\n this.props.getForm(FORMS.PASSPHRASE);\n this.props.getForm(FORMS.IDENTITY_NAME);\n }", "function ContactUs() {\n return (\n <div className=\"contact-div\">\n <ContactForm />\n <span className=\"div-seperator\" />\n <MapDisplay />\n </div>\n );\n}", "getFormActionComponents() {\n return this.props.actions.map((action) =>\n <FormActionComponent {...action} />\n );\n }", "render () {\n return (\n <section>\n <DataBase />\n <FileUpload />\n </section>\n )\n }", "render() {\n return (\n <form\n onSubmit={this.props.handleSubmit(this.onSubmit)}\n className=\"ui form error\"\n >\n <Field name=\"title\" component={this.renderInput} label=\"Enter Title\" />\n <Field\n name=\"description\"\n component={this.renderInput}\n label=\"Enter Description\"\n />\n <button className=\"ui button primary\">Submit</button>\n </form>\n );\n }", "function Machine() {\n\n\n return (\n <div>\n <TransportComponent />\n </div>\n )\n\n}", "function ContactForm() {\n return (\n <div>\n <form className=\"box\">\n <div className=\"field\">\n <label className=\"label\">Name</label>\n <div className=\"control\">\n <input className=\"input\" type=\"name\" placeholder=\"Name\" />\n </div>\n </div>\n <div className=\"field\">\n <label className=\"label\">Email</label>\n <div className=\"control\">\n <input className=\"input\" type=\"email\" placeholder=\"e.g. [email protected]\" />\n </div>\n </div>\n \n <div className=\"field\">\n <label className=\"label\">Message</label>\n <div className=\"control\">\n <input className=\"input\" type=\"message\" placeholder=\"Message\" />\n </div>\n </div>\n \n <button className=\"button\">Submit</button>\n </form>\n </div>\n );\n}", "setup(forms) {\n this.forms = forms;\n // select form to show into the devtools\n MobxReactFormDevTools.register(this.forms);\n }", "componentDidMount() {\n this.onFormSubmit('Pizza Hut');\n }", "static define() {\n Akili.component('component', Component);\n }", "componentDidMount(){ this.updateForm( ) }", "get AppView() {\n return {\n title: 'Expenso',\n component: require('../Containers/App').default,\n leftButton: 'HAMBURGER',\n };\n }", "renderPage() {\n const headerStyle = { paddingTop: '15px', color: '#3E546A' };\n const btmarg = { marginBottom: '25px' };\n return (\n <Grid container id=\"edit-vendor-page\" centered>\n <Grid.Column>\n <Header as=\"h2\" textAlign=\"center\" style={headerStyle}>Edit Vendor</Header>\n <AutoForm schema={bridge} onSubmit={data => this.submit(data)} model={this.props.doc}>\n <Segment style={btmarg}>\n <TextField name='name'/>\n <TextField name='image'/>\n <TextField name='address'/>\n <LongTextField name='description'/>\n <TextField name='link'/>\n <SubmitField value='Submit'/>\n <ErrorsField/>\n </Segment>\n </AutoForm>\n </Grid.Column>\n </Grid>\n );\n }", "render() {\n return (\n <div>\n <Form submit={this.addItem} />\n <ol>\n <List items={this.state.items} />\n </ol>\n </div>\n )\n }", "function Contact() {\n return ( \n <div>\n\n <div className=\"row bg-img blue-border-top\">\n <div className=\"col-10 offset-1 text-left\">\n \n <h2 className=\"text-center m-3\">Please feel free to reach out!</h2>\n \n </div>\n </div>\n\n <div className=\"row bg-img\">\n <div className=\"col-5 offset-4\">\n\n <Form />\n\n </div>\n </div>\n </div>\n\n );\n}", "function App() {\n return (\n <div>\n <Header />\n <ConfigForm />\n <ConfigList />\n <Footer />\n </div>\n );\n}", "render() {\n return (\n <div>\n < h2 > Ajouter ou modifier un organisme référent </h2>\n <MenuAllForm />\n <br />\n <AddOrgaRefForm />\n </div>\n );\n }", "renderCustomerInfoComponent(){\n return(\n <CustomerInfoComponent\n customerInfo={this.state.customerInfo}\n onCustomerNameChange={this.handleCustomerNameChange}\n onCustomerEmailChange={this.handleCustomerEmailChange}\n />\n );\n }", "function MyNavForm(props) {\n return <form className=\"navbar-form\" id={props.id}>{props.children}</form>\n}", "function App(){\n return(\n <div>\n <ContactCard name = \"Tarik\" email = \"random@gmail\" number = \"123-321-1231\" url = \"linkedin.com/in/user\" />\n </div>\n )\n}", "componentDidMount() {\n // alert(\"se acaba de cargar el componente\")\n }", "_initForms() {\n // layouts.js initialization\n if (typeof FormLayouts !== 'undefined') {\n const formLayouts = new FormLayouts();\n }\n // validation.js initialization\n if (typeof FormValidation !== 'undefined') {\n const formValidation = new FormValidation();\n }\n // wizards.js initialization\n if (typeof FormWizards !== 'undefined') {\n const formWizards = new FormWizards();\n }\n // inputmask.js initialization\n if (typeof InputMask !== 'undefined') {\n const inputMask = new InputMask();\n }\n // controls.autocomplete.js initialization\n if (typeof GenericForms !== 'undefined') {\n const genericForms = new GenericForms();\n }\n // controls.autocomplete.js initialization\n if (typeof AutocompleteControls !== 'undefined') {\n const autocompleteControls = new AutocompleteControls();\n }\n // controls.datepicker.js initialization\n if (typeof DatePickerControls !== 'undefined') {\n const datePickerControls = new DatePickerControls();\n }\n // controls.datepicker.js initialization\n if (typeof DropzoneControls !== 'undefined') {\n const dropzoneControls = new DropzoneControls();\n }\n // controls.editor.js initialization\n if (typeof EditorControls !== 'undefined') {\n const editorControls = new EditorControls();\n }\n // controls.spinner.js initialization\n if (typeof SpinnerControls !== 'undefined') {\n const spinnerControls = new SpinnerControls();\n }\n // controls.rating.js initialization\n if (typeof RatingControls !== 'undefined') {\n const ratingControls = new RatingControls();\n }\n // controls.select2.js initialization\n if (typeof Select2Controls !== 'undefined') {\n const select2Controls = new Select2Controls();\n }\n // controls.slider.js initialization\n if (typeof SliderControls !== 'undefined') {\n const sliderControls = new SliderControls();\n }\n // controls.tag.js initialization\n if (typeof TagControls !== 'undefined') {\n const tagControls = new TagControls();\n }\n // controls.timepicker.js initialization\n if (typeof TimePickerControls !== 'undefined') {\n const timePickerControls = new TimePickerControls();\n }\n }", "render() {\n return (\n <div className='App'>\n <h1>Todo List</h1>\n <h2 className=\"todo-items\"><TodoList \n todos={this.state.todos}\n toggleItem={this.toggleItem} \n /></h2>\n \n <TodoForm\n addTodo={this.addTodo}\n clearTodos={this.handleTodoDoneClick}\n />\n <Footer/>\n </div>\n );\n }", "function App() {\n return (\n <div>\n {/* <Routes/> */}\n <InputColleges/>\n <ShowColleges/><br/>\n <CollegeDetails/>\n \n </div>\n );\n}", "get form() {\n return this.internals_.form;\n }", "getForm() {\n return <div id=\"newRestTab\" className=\"\">\n <form>\n <div className=\"input-group mb-3\">\n <div className=\"input-group-prepend\">\n <span class=\"input-group-text\">Name</span>\n </div>\n <input\n id=\"restName\"\n type=\"text\"\n name=\"name\"\n className=\"form-control\"\n placeholder=\"Enter restaurant name\"\n onChange={this.handleInputChange}\n value={this.state.name}\n />\n </div>\n </form>\n </div>\n }", "function RegisterForm(){ \n return (\n <div>\n <h1>register form</h1>\n {/* <h3>{street} {city}, {state} {zip}</h3>\n <button >Register</button>\n <button>Close List</button> */}\n </div>\n );\n \n }", "componentWillMount() {\n fetch('/api/form/active')\n .then(d => d.json())\n .then( forms => this.setState({ forms: forms.forms || [] }))\n .catch( e => console.log(e));\n }", "function HelloReact() {\n return (\n <div className=\"container\">\n Hello React!\n {/*Another imported component*/}\n <Counter/>\n </div>\n )\n}", "function App() {\n return (\n <div className=\"App\">\n <HomePage />\n <Details />\n </div>\n );\n}", "function App() {\n return (\n <div className=\"App\">\n\n\n<HomePage></HomePage>\n{/* <NewsEvents></NewsEvents> */}\n{/* <ContactFrom></ContactFrom> */}\n\n\n </div>\n );\n}", "mounted() {\n if (this.module) {\n this.initForm(this.$route)\n }\n }", "render(){\n return (\n <div>\n <Header/>\n <div className=\"form-container\">\n <Form enteredZip={this.state.enteredZip} handleFormChange={this.onChangeHandler} handleFormSubmit={this.onSubmitHandler}/>\n </div>\n <div className=\"cards-container\">\n <OutputWrapper zipData={this.state.zipInfo}/>\n </div>\n </div>\n );\n }", "render() {\n return <div>\n <h1>Recherche des référents</h1>\n <MenuAllForm />\n <RechercheReferentForm />\n </div>;\n }", "function Contacts() {\n return (\n <div className=\"container\">\n <h1>Contacts</h1>\n\n <div className=\"content\">\n <List />\n {/* <AnotherList /> */}\n <Form />\n {/* <AnotherForm /> */}\n </div>\n </div>\n );\n}", "function LoginForm() {\n return (\n <div className={styles.indivForm}>\n <IndividualLoginForm iconPic1={\"user\"} iconPic2={\"key\"} />\n </div>\n );\n}", "constructor() {\n super(moduleDirectory);\n }", "function App() {\n return (\n <div className=\"App\">\n <TopBar/>\n <ProgressDonations/>\n <FormDisplay/>\n {/* <DonorList/> */}\n\n\n </div>\n \n \n \n \n );\n}", "render() {\n function Links() {\n let { path, url } = useRouteMatch();\n\n return (\n <>\n <ul>\n <li className=\"top-link\">\n <Link to={`${url}`}>Machines</Link>\n </li>\n <li className=\"top-link\">\n <Link to={`${url}/mfg-machine-form`}>\n New Mach.\n </Link>\n </li>\n </ul>\n\n <Switch>\n <Route exact path={path}>\n <h2>Machines</h2>\n <span className=\"info\">\n The Manufacturing branch is designed for adding\n machines and associated data used to process\n parts.\n <br />\n The table below shows available resources for\n processing.\n <br />\n Follow the link above to add new resources.\n </span>\n <br />\n <br />\n <span>Current Machines:</span>\n <MfgTable />\n </Route>\n <Route path={`${path}/:formType`}>\n <Forms />\n </Route>\n </Switch>\n </>\n );\n }\n\n function Forms() {\n let { formType } = useParams();\n\n switch (formType) {\n case \"mfg-machine-form\":\n return <MfgMachineForm />;\n default:\n return <></>;\n }\n }\n\n return (\n <div className=\"sub-header\">\n <Links />\n </div>\n );\n }", "render() {\n return (\n <div className=\"contactform\">\n <h2>{this.props.title} Contact info</h2>\n\n <input type=\"text\" required \n name={`${this.props.title}Name`} placeholder={`${this.props.title} Name`} onChange={this.props.inputHandler}/>\n\n <input type=\"email\" required \n name={`${this.props.title}Email`} placeholder={`${this.props.title} Email`} onChange={this.props.inputHandler}/>\n\n <input type=\"number\" required \n name={`${this.props.title}Phone`} \n placeholder={`${this.props.title} Phone Number`} onChange={this.props.inputHandler}/>\n\n </div>\n\n )\n }", "setFormApi(formApi) {\n this.formApi = formApi;\n }", "function ContactUsPage() {\n return (\n <div>\n <Header />\n <ContactInfo />\n <Footer />\n </div>\n );\n}", "render() {\n return (\n <div>\n <h2>Welcome to your Todo App!</h2>\n <TodoList tasks={this.state.tasksOnState} markComplete={this.markComplete} id={Date.now()}/>\n <TodoForm tasks={this.state.tasksOnState} removeTask={this.removeTask} addTask={this.addTask} handleChange={this.handleChange}/>\n </div>\n );\n }", "render() {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<Link className=\"btn grey\" to=\"/\">Back</Link><br />\n\t\t\t\t<h1 className=\"teal-text text-lighten-1 center\">Add Project</h1>\n\n\t\t\t\t<form onSubmit={this.onSubmit.bind(this)}>\n\t\t\t\t\t<div className=\"input-field\">\n\t\t\t\t\t\t<input type=\"text\" name=\"name\" ref=\"name\" />\n\t\t\t\t\t\t<label htmlFor=\"name\">Project Name</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"input-field\">\n\t\t\t\t\t\t<input type=\"text\" name=\"description\" ref=\"description\" />\n\t\t\t\t\t\t<label htmlFor=\"description\">Project Description</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<input type=\"submit\" value=\"Save\" className=\"btn\" />\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t);\n\t}", "importComponent () {\n\t\t\treturn this.currentImport(this.filename);\n\t\t}", "render () {\n return (\n <div>\n {/* // SEC_017 --- 176. Styling Expense Form 13:19 */}\n <div className=\"primary-page-header\">\n {/* [S07251678|_page-header.scss::.primary-page-header css2;^B] */}\n <div className=\"content-container\">\n {/* [S07251678|_content-container.scss::.content-container css3a;^B] */}\n <h1 className=\"primary-page-header__title\">Add Expense</h1>\n {/* [S07251678|_page-header.scss::.primary-page-header__title css2;^B] */}\n </div>\n </div>\n <div className=\"content-container\">\n {/* [S07251678|_content-container.scss::.content-container css3b;^B] */}\n <CLS_expense_form\n //[S07251667|sec011a_L105_expense_form.jsx::TPL1: CLS_expense_form <1>^B]\n onExpenseSubmit={this.onExpenseSubmit}\n //[ ASN1: onExpenseSubmit <1>^B]\n buttonLabel={'ADD EXPENSE'}\n />\n </div>\n {/* */}\n </div>\n );\n }", "onComponentMount() {\n\n }", "render() {\n return (\n <div className='my-app'>\n <h2>Welcome to your Todo App!</h2>\n \n <TodoList todo_collection={this.state.todo_collection} toggleItem={this.toggleItem}/>\n <TodoForm addItem={this.addItem} clearItems={this.clearItems} todoCollection={todoCollection}/>\n\n </div>\n );\n }", "static uploadContactFile() {\n return `contactus/upload`\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 getCustomEnvironmentForm() {\n return customForm;\n}", "function New({firstName} ) {\n return <p>Hello from another component {firstName}<br/>\n <h1>check this out</h1>\n <img src='../public/rose.jpeg' alt='pic' title='anms pic' />\n <ol>\n <li>new.js</li>\n <li>first try</li>\n <li> second try </li>\n </ol> </p>\n}", "componentWillMount() {\n // eslint-disable-line react/no-deprecated\n this.form.addEventListener('submit', this.handleSave);\n document.body.appendChild(this.form);\n }", "function FormComponent(ability, breakpointObserver) {\n this.ability = ability;\n this.breakpointObserver = breakpointObserver;\n this.onFormChange = new core.EventEmitter();\n this.onFieldChange = new core.EventEmitter();\n this.onButtonClick = new core.EventEmitter();\n this.formFields = new Array();\n this.cellCount = 12;\n this.showButtons = true;\n this.formLayouts = new Array();\n this.formInitialized = true;\n AbilityUtils.setAbility(this.ability);\n }", "function App() {\n return (\n <div className=\"app\">\n <Pathfinder />\n </div>\n );\n}", "function App() {\n return (\n <div className=\"App\">\n <header className=\"App-header\">\n\n <Input />\n\n </header>\n </div>\n );\n}", "function App() {\n return (\n <div className=\"App\">\n <Projects />\n </div>\n );\n}", "function App(){\n return(\n <div>\n <ShoppingList name=\"demo\"/>\n </div>\n )\n}" ]
[ "0.57171744", "0.56458974", "0.5635337", "0.5551721", "0.55036587", "0.5480348", "0.5443297", "0.5419765", "0.5405652", "0.53397197", "0.52976054", "0.5281672", "0.52743", "0.5255024", "0.5225648", "0.52158046", "0.5207739", "0.51756215", "0.51739705", "0.5149635", "0.51405936", "0.5139764", "0.5139309", "0.51221037", "0.509993", "0.5097491", "0.50940984", "0.5080536", "0.5065725", "0.5063673", "0.50572646", "0.5046531", "0.5044188", "0.5041573", "0.5040939", "0.5032854", "0.5011734", "0.49975342", "0.49920475", "0.49915218", "0.49893194", "0.49831504", "0.49723804", "0.49686182", "0.4961641", "0.49606216", "0.49574536", "0.4948161", "0.4906468", "0.49041143", "0.49014497", "0.48996598", "0.48920068", "0.48894155", "0.4880316", "0.4863471", "0.4860587", "0.48585024", "0.48461592", "0.48393372", "0.4839138", "0.4837714", "0.4837244", "0.48342294", "0.48335913", "0.48309505", "0.4827201", "0.48252964", "0.48220435", "0.4821263", "0.48202166", "0.48183912", "0.48078868", "0.48078743", "0.4799636", "0.47964144", "0.47764468", "0.47751197", "0.4773198", "0.47702724", "0.4769561", "0.47666046", "0.47580984", "0.47566476", "0.47520176", "0.47501898", "0.47479725", "0.47476602", "0.47439906", "0.474126", "0.4732672", "0.47270527", "0.47230324", "0.47210225", "0.47179753", "0.47169635", "0.47155002", "0.47101456", "0.4701021", "0.46991804", "0.4698825" ]
0.0
-1
Functionality that updates the modal content with premade templates
function updateModalContent(newContent) { // First: delete all innerHTML removeModalContent(); // Then: update the content with the selected template modalOverlay.insertAdjacentHTML('beforeEnd', newContent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "modalContentTemplate(filmData) {\n return `<div class=\"modal__main-info\">\n <div class=\"modal__main-left\">\n <div class=\"poster\">\n <div class=\"poster__inner\">\n <img class=\"poster__img\" src=\"${filmData.img}\" alt=\"${filmData.name}\" />\n </div>\n </div>\n <p class=\"modal__film-year\">\n <button class=\"modal__star${this.favFilmsIdList.includes(filmData.id) ? ` ${this.class.modalStar.fav}` : ''} js-fav-state-toggler\">\n <svg class=\"star-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <polygon points=\"256 21.33 320 192 490.67 192 362.67 320 405.33 490.66 256 383.99 106.67 490.66 149.33 320 21.33 192 192 192 256 21.33\"/>\n </svg>\n </button>\n (${filmData.year})\n </p>\n </div>\n <div class=\"modal__main-right\">\n <h3 class=\"modal__film-name\">\n ${filmData.name}\n </h3>\n <p class=\"modal__film-descr\">\n ${filmData.description}\n </p>\n </div>\n </div>\n <div class=\"modal__add-info\">\n <p class=\"modal__film-genres\">\n ${filmData.genres.join(', ')}\n </p>\n <div class=\"modal__extra-info\">\n <p>\n <span>Director:</span>\n <span>${filmData.director}</span>\n </p>\n <p>\n <span>Starring:</span> \n <span>${filmData.starring.join(', ')}</span> \n </p>\n </div>\n </div>`;\n }", "function populateModal(title, body, footer){\n\t\t$('.modal-title').text(title);\n\t\t$('.modal-body').html(body);\n\t\t$('.modal-footer').html(footer);\n\t\t$('#universalModal').modal('show');\n\t}", "function fillContent() {\n debug('fillContent');\n if (!modal.tmp.html())\n return;\n\n modal.content.html(modal.tmp.contents());\n modal.tmp.empty();\n wrapContent();\n\n if (currentSettings.type == 'iframeForm') {\n $(currentSettings.from)\n .attr('target', 'nyroModalIframe')\n .data('nyroModalprocessing', 1)\n .submit()\n .attr('target', '_blank')\n .removeData('nyroModalprocessing');\n }\n \n if (!currentSettings.modal)\n modal.wrapper.prepend(currentSettings.closeButton);\n \n if ($.isFunction(currentSettings.endFillContent))\n currentSettings.endFillContent(modal, currentSettings);\n\n modal.content.append(modal.scripts);\n\n $(currentSettings.closeSelector, modal.contentWrapper)\n .unbind('click.nyroModal')\n .bind('click.nyroModal', removeModal);\n $(currentSettings.openSelector, modal.contentWrapper).nyroModal(getCurrentSettingsNew());\n }", "function createModal(template, title, context) {\n $('#newmodal .modal-title').text(title);\n $('#newmodal .modal-body').html(template(context || {}))\n }", "static renderModal(){\n // update entry modal title\n let title = entryModalTitle()\n title.innerHTML = `${this.date.toLocaleDateString('default', {weekday: 'long'})}, ${this.date.toLocaleString('default', {month: 'short'})} ${this.date.getDate()} ${this.date.getFullYear()}`\n\n // update entry modal rating\n let rating = entryModalRating()\n rating.innerHTML = this.rating\n\n // update entry modal emotions container\n let emotionsContainer = entryModalEmotions()\n emotionsContainer.innerHTML = \"\"\n this.emotions.forEach(e => {\n emotionsContainer.appendChild(e.createModalDiv())\n })\n\n // update entry modal delete button\n let old_button = entryModalDeleteButton()\n let new_button = old_button.cloneNode(true)\n new_button.setAttribute(\"data-id\",this.id)\n new_button.addEventListener(\"click\",Entry.deleteFromButton)\n old_button.parentNode.replaceChild(new_button,old_button)\n }", "function fillContent() {\r\n\t\tdebug('fillContent');\r\n\t\tif (!modal.tmp.html())\r\n\t\t\treturn;\r\n\r\n\t\tmodal.content.html(modal.tmp.contents());\r\n\t\tmodal.tmp.empty();\r\n\t\twrapContent();\r\n\r\n\t\tif (currentSettings.type == 'iframeForm') {\r\n\t\t\t$(currentSettings.from)\r\n\t\t\t\t.attr('target', 'nyroModalIframe')\r\n\t\t\t\t.data('processing', 1)\r\n\t\t\t\t.submit()\r\n\t\t\t\t.attr('target', '_blank')\r\n\t\t\t\t.removeData('processing');\r\n\t\t}\r\n\r\n\t\tif ($.isFunction(currentSettings.endFillContent))\r\n\t\t\tcurrentSettings.endFillContent(modal, currentSettings);\r\n\r\n\t\tmodal.content.append(modal.scripts);\r\n\r\n\t\t$(currentSettings.closeSelector, modal.contentWrapper).click(removeModal);\r\n\t\t$(currentSettings.openSelector, modal.contentWrapper).nyroModal(getCurrentSettingsNew());\r\n\t}", "function showAbout() {\n $('#modal-container').html(about_wpaudit_template())\n $('#modal-container').modal()\n}", "function setModalData(item) {\n modal = `<div class=\"modal-container\">\n <div class=\"modal\">\n <button type=\"button\" id=\"modal-close-btn\" class=\"modal-close-btn\"><strong>X</strong></button>\n <div class=\"modal-info-container\">\n <img class=\"modal-img\" src=\"${\n item.picture.large\n }\" alt=\"profile picture\">\n <h3 id=\"name\" class=\"modal-name cap\">${item.name.title} ${\n item.name.first\n } ${item.name.last}</h3>\n <p class=\"modal-text\">${item.email}</p>\n <p class=\"modal-text cap\">${item.location.city}</p>\n <hr>\n <p class=\"modal-text\">${item.cell}</p>\n <p class=\"modal-text\">${item.location.street}, ${\n item.location.city\n }, ${item.location.state} ${item.location.postcode}</p>\n <p class=\"modal-text\">Birthday: ${item.dob.date}</p>\n </div>\n </div>\n <div class=\"modal-btn-container\">\n <button type=\"button\" id=\"modal-prev\" class=\"modal-prev btn\">Prev</button>\n <button type=\"button\" id=\"modal-next\" class=\"modal-next btn\">Next</button>\n </div>\n </div>`;\n\n return $(modal);\n}", "function updateModal(title, body) {\n modal.querySelector(\".modal-title\").innerHTML = title\n modal.querySelector(\".modal-body\").innerHTML = body\n}", "function modalInject(){\n\t\t//inject modal holder into page\n\t\tif (!document.getElementById(\"g_block_modals\")) {\n\t\t\t$(\"body\").append(tdc.Grd.Templates.getByID('modalInject'));\n\t\t}\n\t}", "function createModalHTML(data){ \n data.forEach(function(note){\n $(\".existing-note\").append(`\n <div class=\"panel panel-default\" id=\"${note._id}\">\n <div class=\"panel-body\">\n <div class=\"noteContent\">\n <p>${note.body}</p>\n <button class=\"btn btn-primary edit-note\" data-noteId=\"${note._id}\"\">Edit</button>\n <button class=\"btn btn-primary delete-note\" data-noteId=\"${note._id}\">Delete</button>\n </div>\n <div class=\"update-form\"></div>\n </div>\n </div>\n `)\n }); \n}", "function showModalComments() {\n let template = $('#commentsTemplates');\n let pjtId = $('.version_current').attr('data-project');\n\n $('.invoice__modalBackgound').fadeIn('slow');\n $('.invoice__modal-general').slideDown('slow').css({ 'z-index': 401 });\n $('.invoice__modal-general .modal__body').append(template.html());\n $('.invoice__modal-general .modal__header-concept').html('Comentarios');\n closeModals();\n fillComments(pjtId);\n}", "async function MakeModalTemplate(modaltemplatedata) {\n MakeDomEle(modaltemplatedata)\n $('#modal-dialogbox').draggable() //need jqueryui (not jquery)\n\n // add a listener, when the enter key is pressed and is keyup, click the submit button. \n // when the esc key is pressed and is keyup, click the close modal button\n $(document).keyup(function (event) {\n // Number 13 is the \"Enter\" key on the keyboard\n // console.log(event.keyCode)\n // Cancel the default action, if needed\n event.preventDefault();\n if (event.keyCode === 13) { //enter \n // Trigger the button element with a click\n document.getElementsByClassName(\"submit\")[0].click();\n } else if (event.keyCode === 27) { //esc\n document.getElementById(\"modal-close-button\").click();\n }\n });\n\n $('#modal-close-button').click(closemodal)\n\n}", "function populateInformationModal() {\n\t// add text to the label\n\tvar category = allViews[activeView];\n\t// trim the heading \"TissueSpecific\" if necessary\n\tif (category.substr(0,14) == \"TissueSpecific\") {\n\t\tcategory = category.substr(14);\n\t}\n\t$('#informationLabel').text(category+\" Information\"); \n\t\n\t// now put info text in body\n\t$('#informationBody').html(allInfoFiles[activeView]);\n\t\n}", "function modal(){\n\t\t//creating necessary elements to structure modal\n\t\tvar iDiv = document.createElement('div');\n\t\tvar i2Div = document.createElement('div');\n\t\tvar h4 = document.createElement('h4');\n\t\tvar p = document.createElement('p');\n\t\tvar a = document.createElement('a');\n\n\t\t//modalItems array's element are being added to specific tags \n\t\th4.innerHTML = modalItems[1];\n\t\tp.innerHTML = modalItems[2];\n\t\ta.innerHTML = modalItems[0];\n\n\t\t//adding link and classes(materialize) to tags\n\t\tiDiv.setAttribute(\"class\", \"modal-content\");\n\t\ti2Div.setAttribute(\"class\", \"modal-footer\");\n\t\ta.setAttribute(\"class\", \"modal-action modal-close waves-effect waves-green btn-flat\");\n\t\ta.setAttribute(\"href\", \"sign_in.html\");\n\n\t\t//adding elements to tags as a child element\n\t\tiDiv.appendChild(h4);\n\t\tiDiv.appendChild(p);\n\n\t\ti2Div.appendChild(a);\n\n\t\tmodal1.appendChild(iDiv);\n\t\tmodal1.appendChild(i2Div);\n\t}", "function modalContentGeneration(event) {\n\n const appName = event.target.dataset.name;\n const imageAddress = appName.toLowerCase().replace(/\\s/g, \"-\");\n\n // append content to modal header and body \n $(\".modal-body\").html(`\n <video src=\"./assets/images/${imageAddress}-demo.${imageAddress === \"ticket-pass\" ? \"mov\" : \"mp4\"}\" \n height=\"475px\" \n width=\"850px\" \n controls>\n Video not supported\n </video>\n `);\n\n $(\"#modalTitle\").text(`${appName}`);\n\n \n }", "createViewModal() {\n const htmlstring = '<div class=\"modal-content\">' +\n '<div class=\"modal-header\">' +\n ' <span id=\"closeview\" class=\"closeview\">&times;</span>' +\n ' <h2>' + this.name + '</h2>' +\n '</div>' +\n '<div class=\"modal-body\">' +\n ' <h2>Description</h2>' +\n ' <p>' + this.description + '</p>' +\n ' <h2>Current Status : ' + this.status + '</h2>' +\n ' <h2>Assigned to ' + this.assignee + '</h2>' +\n ' <h2>Priority : ' + this.priority + '</h2>' +\n ' <h2>Created on : ' + this.date + '</h2>' +\n '</div>' +\n '</div>';\n\n return htmlstring;\n }", "function templatepop(divises, infRequest, idPr, listBkByLocs, listDocs, listPr, template, menu, bool, bdetail, isOffer, isOffertrue, validation_Offer) {\n var modalInstance = $modal.open({\n templateUrl: template,\n controller: 'popUpadminEn',\n resolve: {\n devises: function() {\n return divises;\n },\n infRequest: function() {\n return infRequest;\n },\n idPr: function() {\n return idPr;\n },\n listBkByLocs: function() {\n return listBkByLocs;\n },\n listDocs: function() {\n return listDocs;\n },\n listPr: function() {\n return listPr;\n },\n template: function() {\n return template;\n },\n menu: function() {\n return menu;\n },\n bool: function() {\n return bool;\n },\n bdetail: function() {\n return bdetail;\n },\n isOffer: function() {\n return isOffer;\n },\n isOffertrue: function() {\n return isOffertrue;\n },\n validation_Offer: function() {\n return validation_Offer;\n }\n }\n });\n modalInstance.result.then(function(selectedItem) {\n $scope.selected = selectedItem;\n }, function() {\n $log.info('Modal dismissed at: ' + new Date());\n });\n }", "function creatingModal() {\n\n modalWindow.innerHTML = `\n\n <p id=\"closing-modal\">x</p>\n <img src=\"icons/arrow.svg\" id=\"modal-arrow-right\" class=\"arrow modal-arrow-right\" alt=\"arrow\" width=\"40\" height=\"40\">\n <img src=\"icons/arrow.svg\" id=\"modal-arrow-left\" class=\"arrow modal-arrow-left\" alt=\"arrow\" width=\"40\" height=\"40\">\n\n <div class=\"modal-photo\">\n <img class = \"modal-img\" src=${users[0][selectedUserIndex].picture.large} alt=\"profile picture\">\n </div>\n\n <div class=\"modal-info\">\n <h3 class=\"modal-name\">${users[0][selectedUserIndex].name.first} ${users[0][selectedUserIndex].name.last}</h3>\n <p class=\"modal-email\">${users[0][selectedUserIndex].email}</p>\n <p class=\"modal-city\">${users[0][selectedUserIndex].location.city}</p>\n </div>\n\n <div class=\"modal-additional-info\">\n <p class=\"modal-phone\">${users[0][selectedUserIndex].cell}</p>\n <p class=\"modal-adress\">${users[0][selectedUserIndex].location.street.number} ${users[0][selectedUserIndex].location.street.name}, ${users[0][selectedUserIndex].location.state} ${users[0][selectedUserIndex].location.postcode}</p>\n <p class=\"modal-birthday\">Birthday: ${users[0][selectedUserIndex].dob.date.substr(8, 2)}/${users[0][selectedUserIndex].dob.date.substr(5, 2)}/${users[0][selectedUserIndex].dob.date.substr(0, 4)}</p>\n </div>\n `;\n\n switchingUsers();\n}", "function showModal() {\n\n $('#myModal').modal(\"show\");\n $(\".modal-title\").text(data.name)\n $(\".modal-li-1\").text(\"Generation: \" + data.generation.name)\n $(\".modal-li-2\").text(\"Effect: \" + data.effect_changes[0].effect_entries[1].effect)\n $(\".modal-li-3\").text(\"Chance: \" + data.effect_entries[1].effect)\n $(\".modal-li-4\").text(\"Bonus Effect: \" + data.flavor_text_entries[0].flavor_text)\n }", "function reqHandler() {\n var resp = JSON.parse(this.responseText);\n document.querySelector('#beerarea').innerHTML = '';\n var source = document.getElementById(\"card-template\").innerHTML;\n var template = Handlebars.compile(source);\n var html = '';\n\n var source_modal = document.getElementById(\"modal-template\").innerHTML;\n var template_modal = Handlebars.compile(source_modal);\n var html_modal = '';\n\n resp.forEach(element => {\n var context = { name: element.name, tagline: element.tagline, image_url: element.image_url, id: element.id };\n html = html + template(context);\n });\n document.querySelector('#beerarea').innerHTML = html;\n\n resp.forEach(element => {\n var context = { id: element.id, description: element.description };\n html_modal += template_modal(context);\n });\n document.getElementById('modalarea').innerHTML = html_modal;\n\n /*/ set on-click handlers for cards\n document.querySelectorAll('#card').forEach(element => {\n var beerid = element.querySelector('#beerid').innerHTML;\n element.onclick = () => {\n document.querySelector('#modalbody').innerHTML = beerid;\n var options = {};\n $('#mymodal').modal(options);\n }\n });*/\n}", "function modalAddon(user) {\r\n\r\n $(\".modal-info-container\").html( `\r\n <img class=\"modal-img\" src=\"${user.picture.large}\" alt=\"profile picture\">\r\n <h2 id=\"name\" class=\"modal-name cap\">${user.name.first} ${user.name.last}</h2>\r\n <p class=\"modal-text\">${user.email}</p>\r\n <p class=\"modal-text cap\">${user.location.city}</p>\r\n <br>_________________________________</br>\r\n <p class=\"modal-text\">${user.cell}</p>\r\n <p class=\"modal-text\">Postcode: ${user.location.postcode}</p>\r\n <p class=\"modal-text\">Birthday: ${user.dob.date}</p>\r\n </div>\r\n`);\r\n$(\".modal-container\").show();\r\n\r\n //This hide's the modal window when the \"X\" button is clicked\r\n $('#modal-close-btn').on(\"click\", function() {\r\n $(\".modal-container\").hide();\r\n });\r\n}", "function setupEditContent() {\n var $wp = $('.write-pages li'); // the list of book pages\n // make sure the index is in bound wrapping at the ends\n if (editIndex < 0) {\n editIndex = $wp.length - 1;\n } else if (editIndex >= $wp.length) {\n editIndex = 0;\n }\n var $page = $($wp.get(editIndex)); // the current page\n var $img = $page.find('img');\n var caption = $page.find('p.thr-caption').html() || '';\n var view = {\n image: {\n url: $img.attr('src'),\n width: $img.attr('data-width'),\n height: $img.attr('data-height')\n },\n caption: caption ? caption : $('.wlClickToEdit').html()\n };\n templates.setImageSizes(view.image); // size the image\n var $content = $(templates.render('bookPage', view)); // render like any book page\n $content.filter('a.thr-home-icon,a.thr-settings-icon').hide(); // remove some unneeded links\n $editDialog.empty().append($('.wEditHelp').html()).append($content); // update dialog body\n var $deleteIcon = $('<img class=\"deleteIcon\" src=\"/theme/images/delete.png\" />');\n $deleteIcon.attr('title', $('.wDeleteThisPage').html());\n $editDialog.append($deleteIcon);\n var $copyIcon = $('<img class=\"copyIcon\" src=\"/theme/images/copy.png\" />');\n $copyIcon.attr('title', $('.wCopyThisPage').html());\n $editDialog.append($copyIcon);\n $editDialog.dialog('option', 'title', ''); // clear the title\n $editDialog.find('p.thr-caption').toggleClass('text-too-long',\n caption.length >= maxCaptionLength);\n }", "function generateModal(speaker){\n const name = speaker.slice(1,speaker.length);\n const user = data.find(item => item.id === name.toLowerCase());\n\n const baseTemplate = `<div class=\"modal fade\" id=\"${name}\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog modal-lg\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-body\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n <div class=\"row\">\n <div class=\"col-lg-6 modal-left modal-content\">\n <div class=\"speaker-header row\">\n <div class=\"col-4 speaker-avatar\">\n <img src=\"${static_url}/images/${user.id}.jpg\" class=\"img-fluid rounded-circle\" />\n </div>\n <div class=\"col-8 speaker-info\">\n <h2 class=\"speaker-name\">${user.name}</h2>\n <h3 class=\"speaker-company\">${user.company}</h3>\n <h3 class=\"speaker-place\">${user.place}</h3>\n </div>\n </div>\n <p class=\"speaker-description\"> ${user.description} </p>\n <ul class=\"speaker-medias list-inline\">\n ${generateIcons(user.socials)}\n </ul>\n </div>\n <div class=\"col-lg-6 modal-right modal-portfolio\">\n <div class=\"row no-gutters\">\n <div class=\"col-12\">\n <img src=\"${static_url}/images/${user.id}/1.jpg\" class=\"img-fluid\" />\n </div>\n </div>\n <div class=\"row no-gutters\">\n <div class=\"col-6\">\n <img src=\"${static_url}/images/${user.id}/2.jpg\" class=\"img-fluid\" />\n </div>\n <div class=\"col-6\">\n <img src=\"${static_url}/images/${user.id}/3.jpg\" class=\"img-fluid\" />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>`;\n let e = document.createElement('div');\n e.innerHTML = baseTemplate;\n let speakerModal = document.querySelector('#speaker-modal');\n speakerModal.appendChild(e);\n}", "function modal(data) {\n // Set modal title\n $('.modal-title').html(data.title);\n // Clear buttons except Cancel\n $('.modal-footer button:not(\".btn-default\")').remove();\n // Set input values\n $('#title').val(data.event ? data.event.title : ''); \n $('#description').val(data.event ? data.event.description : '');\n $('#color').val(data.event ? data.event.color : '#3a87ad');\n // Create Butttons\n $.each(data.buttons, function(index, button){\n $('.modal-footer').prepend('<button type=\"button\" id=\"' + button.id + '\" class=\"btn ' + button.css + '\">' + button.label + '</button>')\n })\n //Show Modal\n $('.modal').modal('show');\n }", "function modal(data) {\n // Set modal title\n $('.modal-title').html(data.title);\n // Clear buttons except Cancel\n $('.modal-footer button:not(\".btn-default\")').remove();\n // Set input values\n $('#title').val(data.event ? data.event.title : '');\n $('#description').val(data.event ? data.event.description : '');\n $('#color').val(data.event ? data.event.color : '#3a87ad');\n // Create Butttons\n $.each(data.buttons, function(index, button){\n $('.modal-footer').prepend('<button type=\"button\" id=\"' + button.id + '\" class=\"btn ' + button.css + '\">' + button.label + '</button>')\n })\n //Show Modal\n $('.modal').modal('show');\n }", "function modalInit () {\n modalcont.innerHTML = ``;\n}", "function showModal() {\n\n $('#myModal').modal(\"show\");\n $(\".modal-title\").text(data.name)\n $(\".modal-img\").attr('src', data.sprites.other['official-artwork'].front_default);\n $(\".modal-li-1\").text(\"Type: \" + data.types[0].type.name)\n $(\".modal-li-2\").text(\"Abilities: \" + data.abilities[0].ability.name + \"/\" + data.abilities[1].ability.name)\n $(\".modal-li-3\").text(\"Stats: \" + \"HP: \" + data.stats[0].base_stat + \" ATK: \" + data.stats[1].base_stat + \" DEF: \" + data.stats[2].base_stat + \" SP. ATK: \" + data.stats[3].base_stat + \" SP. DEF: \" + data.stats[4].base_stat + \" SPD: \" + data.stats[5].base_stat)\n $(\".modal-li-4\").text(\"Base XP: \" + data.base_experience);\n $(\".modal-li-5\").text(\"Height: \" + data.height + \" ft \" + \"Weight: \" + data.weight + \" lbs\")\n }", "newBlog(){\n\t fetch(`${this.url}Controllermodal/newblogmodal`)\n\t .then(dataModal=>{\n\t dataModal.json().then(modal=>{\n\t document.getElementById('parentmodalInsertBlog').style.display=\"block\";\n\t document.getElementById(\"modalNewBlog\").innerHTML=modal;\n\t })\n\t })\n\t}", "async function createPayAdminModal() {\n const modal = await modalController.create({\n component: \"pay-admin-modal\",\n cssClass: \"payAdminModal\",\n });\n\n var settings = {\n \"url\": `http://localhost:8080/api/admin/payment/${storedButtonID}`,\n \"method\": \"GET\",\n \"timeout\": 0,\n };\n \n $.ajax(settings).done(function (response) {\n var dataArray = JSON.parse(response);\n console.log(dataArray);\n\n var paymentNotes;\n\n if(dataArray[0].paymentNote = \"undefined\"){\n paymentNotes = \" - \";\n }\n else{\n paymentNotes = dataArray[0].paymentNote;\n }\n\n document.getElementById(\"paymentTenantID\").innerHTML = dataArray[0].tenant_id;\n document.getElementById(\"paymentAmount\").innerHTML = \"$\" + dataArray[0].amount_owe;\n document.getElementById(\"paymentDeduction\").innerHTML = \"$\" + dataArray[0].deposit_deduction;\n document.getElementById(\"paymentCategory\").innerHTML = dataArray[0].payment_cat;\n document.getElementById(\"paymentCharges\").innerHTML = \"$\" + dataArray[0].negligence_charge;\n document.getElementById(\"paymentNotes\").innerHTML =paymentNotes;\n });\n\n await modal.present();\n currentModal = modal;\n}", "function alertModal(heading, formContent) {\n $(\"#heading\").html(heading);\n $(\"#content\").html(formContent);\n $(\"#dynamicModal\").modal();\n $(\"#dynamicModal\").toggle();\n}", "function response_in_modal(response) {\n $(\".modal-title\").html(response);\n $(\"#empModal\").modal(\"show\");\n}", "function template_card(modalContent, question, answer) {\n\n // 50/50 chance to swap Answer and Question to switch things up! yeet!\n let tempAnswer = answer;\n let tempQuestion = question;\n let lang = \"lang-it\";\n\n let languageNote = \"<div><img src='/images/language/flag-united-states.png' alt='United States Flag' class='img-fluid' style='max-width: 30px;'></div>\";\n\n if(Math.random() < 0.5) {\n question = tempAnswer;\n answer = tempQuestion;\n lang = \"lang-en\";\n\n languageNote = \"<div><img src='/images/language/flag-italy.png' alt='Italian Flag' class='img-fluid' style='max-width: 30px;'></div>\";\n }\n\n let template = `\n <div class='flash-card mx-auto w-100' data-lang='${lang}' style=\"max-width: 500px; display: none;\">\n ${languageNote}\n <div class='question display-4'>${question}</div>\n <div class='answer' style='opacity: 0;'>\n <div class='display-3 font-weight-bolder mb-4'>${answer}</div>\n </div>\n\n <div class='actions mb-5'>\n <button class='btn btn-primary w-100 d-block mb-3 check-answer' style=\"padding: 30px 0;\">Check</button>\n\n <div class='row'>\n <div class='col-6'>\n <button class='btn btn-success w-100 d-block correct-answer' disabled style=\"padding: 30px 0;\">Correct!</button>\n </div>\n <div class='col-6'>\n <button class='btn btn-danger w-100 d-block wrong-answer' disabled style=\"padding: 30px 0;\">Dang</button>\n </div>\n </div>\n </div>\n </div>`;\n\n modalContent.insertAdjacentHTML(\"beforeend\", template);\n}", "function openNewModal(items){\n var count = 0;\n for(var obj of items){\n var tag = obj.type || \"div\";\n var classes = \"\";for(var c of obj.classes){classes+=c+\" \"};\n var inner = obj.content || \"\";\n var html = \"<\"+tag+\" class='\"+classes+\"'\";\n if(tag == 'textarea')\n html+=\"placeholder='\"+inner+\"'></\"+tag+\">\";\n else if(tag != \"input\")\n html+=\">\"+inner+\"</\"+tag+\">\";\n else\n html+=\"placeholder='\"+inner+\"'>\";\n $(\"#mmc-wrapper\").append(html);\n count++;\n }\n if(count > 4){\n $('#main-modal-content').css({'margin': '2% auto'});\n }\n else\n $('#main-modal-content').css({'margin': '15% auto'});\n $('#main-modal').fadeIn(500);\n}", "function editModalDisplay(trId) {\n //To restore the table back to modal, if it was replaced by ckeditor\n if((globalTrId == 'natureOfCompanyTr') && originalTableHtml){\n $('#updateModalBodyContainer').html(originalTableHtml);\n }\n $.ajax({\n success: function (response) {\n var htmlString;\n $('#userInfoEditModal').modal({show: true, keyboard: true});\n $('#editModalTitle').html(\"Update Your \" + $('#' + trId + ' td:nth-child(1)').html());\n $('#currInfoModal td:nth-child(1)').html(\"Current \" + $('#' + trId + ' td:nth-child(1)').html());\n $('#currInfoModal td:nth-child(2)').html($('#' + trId + ' td:nth-child(2)').html());\n $('#updateFeildsModal td:nth-child(1)').html(\"Type In Your New \" + $('#' + trId + ' td:nth-child(1)').html());\n switch (trId) {\n case 'companyNameTr':\n htmlString = \"<div class='form-group'><div class='controls'><input type='text' id='newUserValue' name='user_value' placeholder='' class='form-control' required> </div><span class='help-block with-errors'></span></div>\";\n $('#updateFeildsModal td:nth-child(2)').html(htmlString);\n $('#newUserValue').val($('#' + trId + ' td:nth-child(2)').html());\n $('#userTableType').val('commercial_user');\n $('#userDetailColumn').val('company_name');\n break;\n case 'natureOfCompanyTr' :\n htmlString = \"<div class='form-group'><div class='controls'><textarea id='newUserValue' name='user_value' class='ckeditor col-lg-12 col-sm-12' required></textarea></div><span class='help-block with-errors'></span></div>\";\n originalTableHtml = $('#updateModalBodyContainer').html(); //to store the table before replacing it with ckeditor\n $('#updateModalBodyContainer').html(htmlString);//replace the whole table\n CKEDITOR.replace('user_value'); //this is essential to display the ckeditor// CKEDITOR.replace('user_value'); //this is essential to display the ckeditor\n $('#newUserValue').html($('#' + trId + ' td:nth-child(2)').html());\n $('#userTableType').val('commercial_user');\n $('#userDetailColumn').val('description');\n\n break;\n case 'userNameTr' :\n htmlString = \"<div class='form-group'><div class='controls'><input type='text' id='newUserValue' name='user_value' placeholder='' class='form-control' pattern='^[A-Za-z0-9_-]{3,16}$' data-native-error='Username should at least contain 3 Characters (letter numbers and underscore)' data-remote='/Ambula/registration/checkUserName' data-error='username already exists ,choose a different one' maxlength='10'' required></div><span class='help-block with-errors'></span></div>\";\n $('#updateFeildsModal td:nth-child(2)').html(htmlString);\n $('#newUserValue').val($('#' + trId + ' td:nth-child(2)').html());\n $('#userTableType').val('users');\n $('#userDetailColumn').val('user_name');\n\n break;\n case 'hotlineTr':\n htmlString = \"<div class='form-group'><div class='controls'><input type='text' id='newUserValue' name='user_value' pattern='\\(?([0-9]{3})\\)?([ .-]?)([0-9]{3})\\2([0-9]{4})' data-minlength='10' data-error='Invalid Telephone Number' placeholder='xxxx xxx xxx' class='form-control' required> </div><span class='help-block with-errors'></span></div>\";\n $('#updateFeildsModal td:nth-child(2)').html(htmlString);\n $('#newUserValue').val($('#' + trId + ' td:nth-child(2)').html());\n $('#userTableType').val('commercial_user');\n $('#userDetailColumn').val('telephone_1');\n break;\n case 'telephone2Tr':\n htmlString = \"<div class='form-group'><div class='controls'><input type='text' id='newUserValue' name='user_value' pattern='\\(?([0-9]{3})\\)?([ .-]?)([0-9]{3})\\2([0-9]{4})' data-minlength='10' data-error='Invalid Telephone Number' placeholder='xxxx xxx xxx' class='form-control' required> </div><span class='help-block with-errors'></span></div>\";\n $('#updateFeildsModal td:nth-child(2)').html(htmlString);\n $('#newUserValue').val($('#' + trId + ' td:nth-child(2)').html());\n $('#userTableType').val('commercial_user');\n $('#userDetailColumn').val('telephone_2');\n break;\n case 'streetAddressTr':\n htmlString = \"<div class='form-group'><div class='controls'><textarea type='text' id='newUserValue' name='user_value' placeholder='' class='form-control' required rows='5'></textarea></div><span class='help-block with-errors'></span></div>\";\n $('#updateFeildsModal td:nth-child(2)').html(htmlString);\n $('#newUserValue').val($('#' + trId + ' td:nth-child(2)').html());\n $('#userTableType').val('commercial_user');\n $('#userDetailColumn').val('address_1');\n break;\n case 'cityTr':\n htmlString = \"<div class='form-group'><div class='controls'><input type='text' id='newUserValue' name='user_value' placeholder='' class='form-control' required></div><span class='help-block with-errors'></span></div>\";\n $('#updateFeildsModal td:nth-child(2)').html(htmlString);\n $('#newUserValue').val($('#' + trId + ' td:nth-child(2)').html());\n $('#userTableType').val('commercial_user');\n $('#userDetailColumn').val('city');\n break;\n case 'districtTr':\n htmlString = \"<div class='form-group'><div class='controls'>\";\n htmlString += \"<select class='form-control' id='newUserValue' name='user_value' required>\";\n htmlString += \"<option value='' selected hidden disabled>Select a new district..</option>\";\n htmlString += \"<option value='Ampara'>Ampara</option>\";\n htmlString += \"<option value='Anuradhapura'>Anuradhapura</option>\";\n htmlString += \"<option value='Badulla'>Badulla</option>\";\n htmlString += \"<option value='Batticaloa'>Batticaloa</option>\";\n htmlString += \"<option value='Colombo'>Colombo</option>\";\n htmlString += \"<option value='Galle'>Galle</option>\";\n htmlString += \"<option value='Gampaha'>Gampaha</option>\";\n htmlString += \"<option value='Hambantota'>Hambantota</option>\";\n htmlString += \"<option value='Jaffna'>Jaffna</option>\";\n htmlString += \"<option value='Kalutara'>Kalutara</option>\";\n htmlString += \"<option value='Kandy'>Kandy</option>\";\n htmlString += \"<option value='Kegalle'>Kegalle</option>\";\n htmlString += \"<option value='Kilinochchi'>Kilinochchi</option>\";\n htmlString += \"<option value='Kurunegala'>Kurunegala</option>\";\n htmlString += \"<option value='Mannar'>Mannar</option>\";\n htmlString += \"<option value='Matale'>Matale</option>\";\n htmlString += \"<option value='Matara'>Matara</option>\";\n htmlString += \"<option value='Monaragala'>Monaragala</option>\";\n htmlString += \"<option value='Mullaitivu'>Mullaitivu</option>\";\n htmlString += \"<option value='Nuwara Eliya'>Nuwara Eliya</option>\";\n htmlString += \"<option value='Polonnaruwa'>Polonnaruwa</option>\";\n htmlString += \"<option value='Puttalam'>Puttalam</option>\";\n htmlString += \"<option value='Ratnapur'>Ratnapura</option>\";\n htmlString += \"<option value='Trincomalee'>Trincomalee</option>\";\n htmlString += \"<option value='Vavuniya'>Vavuniya</option>\";\n htmlString += \"</select>\";\n htmlString += \"<span class='help-block with-errors'></span>\";\n htmlString += \"</div></div>\";\n $('#updateFeildsModal td:nth-child(2)').html(htmlString);\n $('#userTableType').val('commercial_user');\n $('#userDetailColumn').val('district');\n break;\n case 'webSiteTr':\n htmlString = \"<div class='form-group has-feedback has-feedback-left'><div class='controls'><input type='text' id='newUserValue' name='user_value' placeholder='www.youWebSite.com' class='form-control' required></div><i class='form-control-feedback fa fa-globe fa-lg' style='padding-top: 8px'></i><span class='help-block with-errors'></span></div>\";\n $('#updateFeildsModal td:nth-child(2)').html(htmlString);\n $('#newUserValue').val($('#' + trId + ' td:nth-child(2)').html());\n $('#userTableType').val('commercial_user');\n $('#userDetailColumn').val('web_url');\n break;\n case 'facebookTr':\n htmlString = \"<div class='form-group has-feedback has-feedback-left'><div class='controls'><input type='text' id='newUserValue' name='user_value' placeholder='www.youFacebookPage.com' class='form-control' required></div><i class='form-control-feedback fa fa-facebook-official fa-lg' style='padding-top: 8px'></i><span class='help-block with-errors'></span></div>\";\n $('#updateFeildsModal td:nth-child(2)').html(htmlString);\n $('#newUserValue').val($('#' + trId + ' td:nth-child(2)').html());\n $('#userTableType').val('commercial_user');\n $('#userDetailColumn').val('facebook_url');\n break;\n case 'youtubeTr':\n htmlString = \"<div class='form-group has-feedback has-feedback-left'><div class='controls'><input type='text' id='newUserValue' name='user_value' placeholder='www.yourYoutubeChanel.com' class='form-control' required></div><i class='form-control-feedback fa fa-youtube fa-lg' style='padding-top: 8px'></i><span class='help-block with-errors'></span></div>\";\n $('#updateFeildsModal td:nth-child(2)').html(htmlString);\n $('#newUserValue').val($('#' + trId + ' td:nth-child(2)').html());\n $('#userTableType').val('commercial_user');\n $('#userDetailColumn').val('youtube_url');\n break;\n\n }\n $('#userInfoEditModal').data('bs.modal').handleUpdate()\n }\n });\n}", "function SaveCustomTemplate( ) {\n\t\t\t\t//get short-codes for current elements\n\t\t\t\tvar content = oxoParser.parseColumnOptions();\n\t\t\t\t//prepare data\n\t\t\t\tvar data = {\n\t\t\t\t\t\taction\t : 'oxo_custom_tabs',\n\t\t\t\t\t\tpost_action : 'save_custom_template',\n\t\t\t\t\t\tmodel\t : content,\n\t\t\t\t\t\tname\t\t: window.customTemplate\n\t\t\t\t\t};\n\t\t\t\t\n\t\t\t\t//way to go\n\t\t\t\t$.post(ajaxurl, data ,function( response ) {\n\t\t\t\t\t\n\t\t\t\t\tif ( response.hasOwnProperty ( 'message' ) ) { //if data updated successfully\n\t\t\t\t\t\tDdHelper.showHideLoader( 'hide' );\n\t\t\t\t\t\tif ( response.hasOwnProperty ( 'custom_templates' ) ) { //if we got data\n\t\t\t\t\t\t\t$('#custom_templates_div').html(response.custom_templates);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tDdHelper.showHideLoader( 'hide' );\n\t\t\t\t\t\talert ( response.error.text ); // i feel bad.\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t}", "async function createInvAdminModal() {\n const modal = await modalController.create({\n component: \"inv-admin-modal\",\n cssClass: \"invAdminModal\",\n });\n\n var settings = {\n \"url\": `http://localhost:8080/api/admin/inventory/detail/${storedButtonID}`,\n \"method\": \"GET\",\n \"timeout\": 0,\n };\n \n $.ajax(settings).done(function (response) {\n var dataArray2 = JSON.parse(response);\n console.log(dataArray2);\n\n document.getElementById(\"adminInvDonorName\").innerHTML = dataArray2[0].donor_name + \" | \" + dataArray2[0].donor_id;\n document.getElementById(\"adminInvItemName\").innerHTML = dataArray2[0].item_name + \" | \" + dataArray2[0].item_id;\n document.getElementById(\"adminInvLocation\").innerHTML = dataArray2[0].item_location;\n document.getElementById(\"adminInvRepairFre\").innerHTML = dataArray2[0].repair_frequency;\n document.getElementById(\"adminInvRepairSta\").innerHTML = dataArray2[0].repair_status;\n document.getElementById(\"adminInvRepairType\").innerHTML = dataArray2[0].repair_type;\n document.getElementById(\"adminInvStatus\").innerHTML = dataArray2[0].item_status;\n\n for (var i = 0; i < dataArray2.length; i++){\n document.getElementById(\"adminInvStaHist\").append(dataArray2[i].item_status+\", \");\n document.getElementById(\"adminInvLocHist\").append(dataArray2[i].item_location+\", \");\n document.getElementById(\"adminInvDateHist\").append(dataArray2[i].item_date+\", \");\n \n }\n\n });\n\n \n await modal.present();\n currentModal = modal;\n}", "function getCustomTemplateContent ( templateName ) {\n\t\t\t\n\t\t\t\t//show loader\n\t\t\t\tDdHelper.showHideLoader('show','');\n\t\t\t\t//setup data\n\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\taction\t\t: 'oxo_custom_tabs',\n\t\t\t\t\t\t\t\tpost_action : 'load_custom_template',\n\t\t\t\t\t\t\t\tname\t\t: templateName\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$.post(ajaxurl, data ,function( response ) {\n\t\t\t\t\t\n\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\taction\t\t : 'oxo_content_to_elements',\n\t\t\t\t\t\t\t\t\tcontent\t\t : response\n\t\t\t\t\t};\n\t\t\t\t\t\n\t\t\t\t\t$.post(ajaxurl, data ,function( response ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t//turn off tracking first, so these actions are not captured\n\t\t\t\t\t\toxoHistoryManager.turnOffTracking();\n\t\t\t\t\t\t//remove all current editor elements first\n\t\t\t\t\t\tEditor.deleteAllElements();\n\t\t\t\t\t\t//reset models with new elements\n\t\t\t\t\t\tapp.editor.selectedElements.reset( response );\n\t\t\t\t\t\t//turn on tracking\n\t\t\t\t\t\toxoHistoryManager.turnOnTracking();\n\t\t\t\t\t\t//capture editor\n\t\t\t\t\t\toxoHistoryManager.captureEditor();\n\t\t\t\t\t\t//hide loads\n\t\t\t\t\t\tDdHelper.showHideLoader('hide');\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}", "createModal(template) {\n let modalLoaded\n if (typeof window.CustomEvent === 'function') {\n modalLoaded = new Event('modalloaded')\n } else {\n modalLoaded = document.createEvent('HTMLEvents')\n modalLoaded.initEvent('modalloaded', true, true)\n }\n \n const overlay = this.createModalOverlay()\n const modal = this.createModalContent(template)\n const modalElements = document.createDocumentFragment()\n \n modalElements.appendChild(overlay)\n modalElements.appendChild(modal)\n \n modal.addEventListener('modalloaded', () => {\n modal.classList.add('modal--open')\n overlay.classList.add('modal__overlay--open')\n })\n \n document.body.style.overflow = 'hidden'\n document.body.appendChild(modalElements)\n \n setTimeout(() => {\n modal.dispatchEvent(modalLoaded)\n }, 100)\n }", "function buildModal(){\n // Constructs a new modal from the modal template and configures it based on user settings.\n\n if(this.settings.debug){\n console.log(this);\n }\n\n this.element = $(\"#modal-template\").find(\".modal\").clone();\n\n if(this.settings.exitButton){\n\n this.exitButton = this.element.find(\".modal-close-button\");\n this.exitButton.removeClass(\"hidden\");\n this.exitButton = this.exitButton[0];\n\n }\n if(this.settings.overlay){\n\n this.overlay = this.element.find(\".modal-overlay\");\n this.overlay.removeClass(\"hidden\");\n this.overlay = this.overlay[0];\n\n }\n\n if(this.settings.icon){\n\n this.element.find(\".material-icon-container\").addClass(this.settings.iconContainerClass).removeClass(\"hidden\");\n this.element.find(\".material-icons\").html(this.settings.iconText);\n\n }\n\n this.element.find(\".modal-header\").addClass(this.settings.headerClass);\n this.element.find(\".modal-header-content\").html(this.settings.headerContent);\n\n this.element.find(\".modal-body\").addClass(this.settings.bodyClass);\n if(this.settings.bodyContent){\n this.element.find(\".modal-content\").html(this.settings.bodyContent);\n }\n\n if(this.settings.bodyButtons){\n\n var buttonsContainer = this.element.find(\".modal-buttons\").removeClass(\"hidden\");\n\n for(bid in this.settings.bodyButtons){\n var button = this.settings.bodyButtons[bid];\n buttonsContainer.append(\"<button class='\"+button[1]+\"' onclick='\"+button[2]+\"'>\"+button[0]+\"</button>\");\n }\n\n }\n\n $(\"body\").append(this.element);\n\n var me = this;\n\n me.element.removeClass(\"hidden\");\n\n var elementHeight = $(me.element).find(\".modal-container\").height();\n var windowHeight = $(window).height();\n var topOffset = (windowHeight / 2) - (elementHeight / 2);\n topOffset = topOffset > 0 ? topOffset : 0;\n me.element.find(\".modal-container\").css({\"top\":topOffset+\"px\"});\n\n $(window).resize(function(){\n var elementHeight = $(me.element).find(\".modal-container\").height();\n var windowHeight = $(window).height();\n var topOffset = (windowHeight / 2) - (elementHeight / 2);\n topOffset = topOffset > 0 ? topOffset : 0;\n me.element.find(\".modal-container\").css({\"top\":topOffset+\"px\"});\n });\n\n return this;\n\n }", "templates() {\n let that = this;\n let templateData = this.state.isLibrary ? this.state.templateDetails || [] : this.state.templateSpecifications || [];\n\n if(this.props.view) {\n if (!templateData || !templateData.length)\n return <NoData tabName={'Templates'}/>\n }\n const Templates = templateData.map(function (show, id) {\n let docType = null;\n if(show.fileName && show.fileName.split('.')[1]) {\n let type = show.fileName.split('.')[1];\n if(type === 'pdf'){\n docType = type;\n }else if(type === 'xls' ||type === 'xlsx' ){\n docType = 'xls';\n }else if(type === 'doc' || type === 'docx' ){\n docType = 'doc';\n }\n }\n return (\n <div className=\"thumbnail swiper-slide\" key={id}>\n\n {\n !that.state.explore && !that.state.hideLock ?\n <FontAwesome onClick={() => that.toggleTemplateLock(show, id)} name={ show.isPrivate ?'lock':'unlock' } />\n :\n \"\"\n }\n {\n that.state.explore ?\n \"\"\n :\n <FontAwesome name='trash-o' onClick={() => that.delete(id, \"template\")} />\n }\n\n <a href=\"\" data-toggle=\"modal\" data-target=\".templatepop\"\n onClick={that.randomTemplate.bind(that,show.fileUrl, id)}>\n {docType ? <img src={`/images/${docType}.png`}/> : <img src={generateAbsolutePath(show.fileUrl)} />}</a>\n <div id=\"templates\" className=\"title\">{show.fileName}</div>\n </div>\n )\n });\n return Templates\n }", "async function createCWInvModal() {\n const modal = await modalController.create({\n component: \"inv-cw-modal\",\n cssClass: \"CWInvModal\",\n });\n\n var settings = {\n \"url\": `http://localhost:8080/api/caseworker/inventory/detail/${storedButtonID}`,\n \"method\": \"GET\",\n \"timeout\": 0,\n };\n \n $.ajax(settings).done(function (response) {\n var dataArray2 = JSON.parse(response);\n console.log(dataArray2);\n\n document.getElementById(\"cwInvDonorName\").innerHTML = dataArray2[0].donor_name + \" | \" + dataArray2[0].donor_id;\n document.getElementById(\"cwInvItemName\").innerHTML = dataArray2[0].item_name + \" | \" + dataArray2[0].item_id;\n document.getElementById(\"cwInvItemLocation\").innerHTML = dataArray2[0].item_location;\n document.getElementById(\"cwInvRepairFre\").innerHTML = dataArray2[0].repair_frequency;\n document.getElementById(\"cwInvRepairSta\").innerHTML = dataArray2[0].repair_status;\n document.getElementById(\"cwInvRepairType\").innerHTML = dataArray2[0].repair_type;\n document.getElementById(\"cwInvItemStatus\").innerHTML = dataArray2[0].item_status;\n\n for (var i = 0; i < dataArray2.length; i++){\n document.getElementById(\"cwInvStaHist\").append(dataArray2[i].item_status+\", \");\n document.getElementById(\"cwInvLocHist\").append(dataArray2[i].item_location+\", \");\n document.getElementById(\"cwInvDateHist\").append(dataArray2[i].item_date+\", \");\n \n }\n\n });\n\n await modal.present();\n currentModal = modal;\n}", "function getModal(titulo='Aguarde', body='', footer='') {\n $('.modal-header h4').html(titulo)\n $('.modal-body').html(body);\n $('.modal-footer').html(footer);\n }", "showModal(index) {\n let employees = this.filteredEmployees[index];\n let name = employees.name;\n let dob = employees.dob;\n let phone = employees.phone;\n let email = employees.email;\n let city = employees.location.city;\n let streetNum = employees.location.street.number;\n let streetName = employees.location.street.name;\n let state = employees.location.state;\n let postcode = employees.location.postcode;\n let picture = employees.picture.large;\n let date = new Date(dob.date);\n\n const modalHTML = ` \n <img class=\"modal-avatar\" src=\"${picture}\" />\n <div class=\"modal-text-container\">\n <h2 id= \"modalCard\" class=\"name\" data-index=\"${index}\" >${name.first} ${\n name.last\n }</h2>\n <p class=\"email\">${email}</p>\n <p class=\"address\">${city}</p>\n <hr />\n <p class=\"phone\">${phone}</p>\n <p class=\"address\">${streetNum} ${streetName} ${state}, ${postcode}</p>\n <p class= \"bday\">Birthday: ${date.getMonth()}/${date.getDate()}/${date.getFullYear()}</p>\n `;\n this.overlay.classList.remove(\"hidden\"); // will reveal the overlay\n this.modal.innerHTML = modalHTML; // add modal to screenS\n }", "function generateModal(i)\n{\n let temp = people[i];\n let dob = `${temp.dob.date.substring(5, 7)}/${temp.dob.date.substring(8, 10)}/${temp.dob.date.substring(0, 4)}`;\n const modalHTML = `\n <div class=\"modal-container\">\n <div class=\"modal\">\n <button type=\"button\" id=\"modal-close-btn\" class=\"modal-close-btn\"><strong>X</strong></button>\n <div class=\"modal-info-container\">\n <img class=\"modal-img\" src=${temp.picture.large} alt=\"profile picture\">\n <h3 id=\"name\" class=\"modal-name cap\">${temp.name.first} ${temp.name.last}</h3>\n <p class=\"modal-text\">${temp.email}</p>\n <p class=\"modal-text cap\">${temp.location.city}</p>\n <hr>\n <p class=\"modal-text\">${temp.cell}</p>\n <p class=\"modal-text\">${temp.location.street.number} ${temp.location.street.name}, ${temp.location.state} ${temp.location.postcode}</p>\n <p class=\"modal-text\">Birthday: ${dob}</p>\n </div>\n </div>\n </div>\n `;\n $body.append(modalHTML);\n}", "openSettingsModal() {\n if (!this.settingsModal) {\n let settingsModal = bis_webutil.createmodal('CPM Settings', 'modal-sm');\n let settingsObj = Object.assign({}, this.settings);\n\n let listObj = {\n 'kfold' : ['3', '4', '5', '6', '8', '10'],\n 'numtasks' : ['0', '1', '2', '3'],\n 'numnodes' : ['3', '9', '268']\n };\n\n let container = new dat.GUI({ 'autoPlace' : false });\n container.add(settingsObj, 'threshold', 0, 1);\n container.add(settingsObj, 'kfold', listObj.kfold);\n container.add(settingsObj, 'numtasks', listObj.numtasks);\n container.add(settingsObj, 'numnodes', listObj.numnodes),\n container.add(settingsObj, 'lambda', 0.0001, 0.01);\n\n settingsModal.body.append(container.domElement);\n $(container.domElement).find('.close-button').remove();\n\n\n let confirmButton = bis_webutil.createbutton({ 'name' : 'Confirm', 'type' : 'btn-success' });\n confirmButton.on('click', () => {\n console.log('settings obj', settingsObj);\n this.settings = Object.assign({}, settingsObj);\n settingsModal.dialog.modal('hide');\n });\n\n let cancelButton = bis_webutil.createbutton({ 'name' : 'Close', 'type' : 'btn-default' });\n cancelButton.on('click', () => {\n for (let key of Object.keys(settingsObj)) {\n settingsObj[key] = this.settings[key];\n }\n\n //do this on modal hide to avoid the controllers being moved while the user can see it\n settingsModal.dialog.one('hidden.bs.modal', () => {\n for (let i in container.__controllers) {\n container.__controllers[i].updateDisplay();\n }\n });\n\n settingsModal.dialog.modal('hide');\n });\n \n settingsModal.footer.empty();\n settingsModal.footer.append(confirmButton);\n settingsModal.footer.append(cancelButton);\n\n this.settingsModal = settingsModal;\n }\n\n this.settingsModal.dialog.modal('show');\n }", "function renderDynamicPopupContent($blockContent){\n const $sectionPopupWrapper = jQuery(\".modal-wrapper\");\n $sectionPopupWrapper.find('.js-popup-title').html( $blockContent.find('.inner-title').html() );\n $sectionPopupWrapper.find('.js-popup-size').html( $blockContent.find('.sizes').html() );\n $sectionPopupWrapper.find('.js-popup-image').attr( 'src', $blockContent.find('.img').attr('src') );\n}", "function createModal(i){ //pulls data from jsonData to populate modal\n const firstName = jsonData[i].name.first;\n const lastName = jsonData[i].name.last;\n const email = jsonData[i].email;\n const street = jsonData[i].location.street;\n const city = jsonData[i].location.city;\n const state = jsonData[i].location.state;\n const photo = jsonData[i].picture.large;\n const phoneNumber = jsonData[i].phone;\n const postalCode = jsonData[i].location.postcode;\n const birthday = jsonData[i].dob.date;\n let birthdate = birthday.slice(0, 10).split('-'); //takes first 10 digits and removes dashes\n birthdate = birthdate[1]+'/'+birthdate[2]+'/'+birthdate[0]; //converts date to mm/dd/yyyy\n const modalMarkup = `<div class=\"modal-container\">\n <div class=\"modal\">\n <button type=\"button\" id=\"modal-close-btn\" class=\"modal-close-btn\"><strong>X</strong></button>\n <div class=\"modal-info-container\">\n <img class=\"modal-img\" src=\"${photo}\" alt=\"profile picture\">\n <h3 id=\"name\" class=\"modal-name cap\">${firstName} ${lastName}</h3>\n <p class=\"modal-text\">${email}</p>\n <p class=\"modal-text cap\">${city}</p>\n <hr>\n <p class=\"modal-text\">${phoneNumber}</p>\n <p class=\"modal-text\">${street}, ${city}, ${state} ${postalCode}</p>\n <p class=\"modal-text\">Birthday: ${birthdate}</p>\n </div>\n </div>`\n body.append(modalMarkup);\n\n const toggleModal = `<div class=\"modal-btn-container\">\n <button type=\"button\" id=\"modal-prev\" class=\"modal-prev btn\">Prev</button>\n <button type=\"button\" id=\"modal-next\" class=\"modal-next btn\">Next</button>\n </div>\n </div>`\n $('.modal-container').append(toggleModal);\n\n// *** Previous, Next and Exit Buttons ***\n\n $('#modal-prev').on('click', function(){ // shows previous employee on the list\n let employee = $('.card');\n if (i > 0 ) {\n for (let x = i - 1; x >= 0; x--){ //checks for previous visible employee\n if (employee.eq(x).is(\":visible\")){\n body.children().last().remove();\n createModal(x); //if visible employee exists, creates modal\n if (employee[x] === visibleEmployees[0]) { //if employee index === index 0 of visible employees, removes prev\n removePrev();\n }\n break;\n }\n }\n }\n })\n\n $('#modal-next').on('click', function(){ // shows next employee on list\n let employee = $('.card');\n let numberOfEmployees = employee.length;\n if (i < (numberOfEmployees - 1)) { // - 1 to reference last index value of visibleEmployees array\n for (let x = i + 1; x <= numberOfEmployees; x++){ //loops until it finds next visible employee if exists\n if (employee.eq(x).is(\":visible\")){ //if employee is visible passes x as index value for modal\n body.children().last().remove();\n createModal(x);\n if (x === numberOfEmployees - 1 || employee[x] == visibleEmployees[visibleEmployees.length - 1]) { //index is last\n removeNext();\n }\n break; //stops loop after first visible modal is created\n }\n }\n }\n })\n\n $('#modal-close-btn').on('click', function(){ //exits modal when X is clicked\n let employee = $('.card')\n modalContainer.hide();\n body.children().last().remove();\n i = 0; //resets i to empty string\n })\n\n} //end createModal", "function fetchModalTemplate(name){\n var url = modalsPath + name;\n return $http.get(url, {cache: $templateCache});\n }", "function okOnGet(data, postFun){\r\n $(\"#\"+modal+\" .modal-body\").html(data.content);\r\n registerForm(postFun);\r\n $(\"#\"+modal).modal(\"show\");\r\n //mymodal.open();\r\n }", "function showModal(pokemon) {\n modal = $('#modal-container').modal('show');\n let modalDialog = $('#modalDialog'); // modal box that appears on top of the background\n let modalContent = $('#modalContent'); // Wrap around the modal content\n \n\n let modalBody = $(\".modal-body\");\n let modalTitle = $(\".modal-title\");\n // let modalHeader = $(\".modal-header\");\n\n // clear contents \n modalTitle.empty();\n modalBody.empty();\n \n\n\n\n\n // creating and element for name in modal content\n let nameElement = $(\"<h1>\" + pokemon.name + \"</h1>\");\n //creating img in modal content\n let imageElementFront = $(\"<img>\");\n imageElementFront.attr(\"src\", pokemon.imageUrl);\n //creating an element for height in modal content\n let heightElement = $('<p>' + 'height: ' + pokemon.height + '</p>');\n // creating an elelent for weight in modal content\n let weightElement = $('<p>' + 'weight: ' + pokemon.weight + '</p>')\n //creating an element for types in modal content\n let typesElement = $('<p>' + 'type: ' + pokemon.types + '</p>');\n // creating \n // </p>document.createElement('div');\n // modal.classList.add('modal');\n\n // Add the new modal content\n // modalHeader.append(nameElement);\n modalTitle.append(nameElement);\n \n modalBody.append(imageElementFront);\n modalBody.append(heightElement);\n modalBody.append(weightElement);\n modalBody.append(typesElement);\n\n\n}", "function modal(data) {\n $('#title').val(data.title);\n if(data.date != null) {\n $('#date').val(data.date.format());\n $('#startDate').val(data.startDate.format());\n $('#endDate').val(data.endDate.format());\n }\n else {\n $('#date').val(data.event.date);\n }\n\n \n // Set modal title\n $('.modal-title').html(data.title);\n // Clear buttons except Cancel\n $('.modal-footer button:not(\".btn-default\")').remove();\n // Set input values\n //$('#title').val(data.event ? data.event.title : '');\n if( ! data.event) {\n // When adding set timepicker to current time\n var now = new Date();\n var time = now.getHours() + ':' + (now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes());\n } else {\n // When editing set timepicker to event's time\n var time = data.event.date.split(' ')[1].slice(0, -3);\n time = time.charAt(0) === '0' ? time.slice(1) : time;\n }\n $('#time').val(time);\n $('#description').val(data.event ? data.event.description : '');\n $('#color').val(data.event ? data.event.color : '#3a87ad');\n // Create Butttons\n $.each(data.buttons, function(index, button){\n $('.modal-footer').prepend('<button type=\"button\" id=\"' + button.id + '\" class=\"btn ' + button.css + '\">' + button.label + '</button>')\n })\n //Show Modal\n $('.modal').modal('show');\n }", "function outputModal(data){\n var deferred = Q.defer();\n\n require([\"hbs!../templates/modalDetails\"], function(template){\n $(\"#modalDetailsOutput\").html(template(data));\n deferred.resolve();\n });\n\n return deferred.promise;\n }", "function modal(data) {\n // Set modal title\n $('.modal-title').html(data.title);\n // Clear buttons except Cancel\n $('.modal-footer button:not(\".btn-default\")').remove();\n // Set input values\n $('#title').val(data.event ? data.event.title : '');\n if( ! data.event) {\n // When adding set timepicker to current time\n var now = new Date();\n var time = now.getHours() + ':' + (now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes());\n } else {\n // When editing set timepicker to event's time\n var time = data.event.date.split(' ')[1].slice(0, -3);\n time = time.charAt(0) === '0' ? time.slice(1) : time;\n }\n $('#time').val(time);\n $('#description').val(data.event ? data.event.description : '');\n $(\"#id_sala option:selected\").val(data.event ? data.event.id_sala : '');\n $('#color').val(data.event ? data.event.color : '#3a87ad');\n // Create Butttons\n $.each(data.buttons, function(index, button){\n $('.modal-footer').prepend('<button type=\"button\" id=\"' + button.id + '\" class=\"btn ' + button.css + '\">' + button.label + '</button>')\n });\n //Show Modal\n $('.modal').modal('show');\n }", "function updateDemandModal() {\n var userId = $($pt.landPage.session.id).text().trim();\n if (userId !== \"\") {\n\n $($pt.demandCard.handle).modal(\"show\");\n // Empty the list\n var $demandContent = $($pt.demandCard.content);\n $demandContent.empty();\n\n $.ajax({\n url: $pt.server.db + \"/demands\",\n method: \"GET\",\n dataType: \"json\",\n data: {\n userId: userId,\n met: false,\n _expand:\"photo\"\n },\n success: function (data) {\n if (data.length > 0) {\n // We load the template from file for ease of maintenance\n var $item = $(\"<div>\").hide();\n $item.addClass(\"list-group-item pt_demandListItem\");\n\n // Use AJAX to load in the template file with the main carousel\n $item.load($pt.demandCard.template, function (result, status) {\n if (status === \"success\") {\n $.each(data, function (index, element) {\n var $newItem = $item.clone();\n var ransomLink = $pt.server.files + \"/victim/?hash=\" + element.hash;\n\n $newItem.find(\".pt_itemPhoto\").attr(\"src\", element.photo.src);\n $newItem.find(\".pt_itemEmail\").text(element.victimEmail);\n $newItem.find(\".pt_demandId\").text(element.id);\n $newItem.find(\".pt_photoId\").text(element.photo.id);\n $newItem.find(\".pt_itemDemand\").text(element.demand);\n $newItem.find(\".pt_itemURL\").val(ransomLink);\n // Two entries below are to handle the clipboard\n $newItem.find(\".pt_itemURL\").attr(\"id\", \"pt_hash\" + element.id);\n $newItem.find(\".pt_itemClipBoard\").attr(\"data-clipboard-target\", \"#pt_hash\" + element.id);\n\n $demandContent.append($newItem);\n $newItem.fadeIn();\n\n });\n var enableCopy = new Clipboard(\".clip\");\n\n } else {\n // Encountered error\n console.log(status, \"Unable to load \" + $pt.demandCard.template);\n }\n }); // End Load Demand Item template\n }\n },\n error: function (error) {\n console.log(error);\n }\n });\n } else {\n console.log(\"not logged in\");\n }\n\n return false;\n }", "function showModal( ) {\n let modalDom;\n let modalBodyDom;\n let bodyDom = null;\n let saveBtnDom;\n\n // Set header template.\n const MODAL_BODY_TEMPLATE = [\n '<header class=\"nice-padding hasform\">',\n '<div class=\"row\">',\n '<div class=\"left\">',\n '<div class=\"col\">',\n '<h1 class=\"icon icon-table\">Edit Table Cell</h1>',\n '</div>',\n '</div>',\n '</div>',\n '</header>',\n '<div class=\"row active nice-padding struct-block object\">',\n '<label class=\"hidden\" for=\"table-block-editor\">Table Cell Input</label>',\n '<input class=\"hidden\" id=\"table-block-editor\" maxlength=\"255\" name=\"title\" type=\"text\" value=\"\" class=\"data-draftail-input\">',\n '</div><br>',\n '<div class=\"row active nice-padding m-t-10\">',\n '<label class=\"hidden\" for=\"table-block-save-btn\">Save</label>',\n '<button id=\"table-block-save-btn\" type=\"button\" data-dismiss=\"modal\" class=\"button\">Save Button</button>',\n '</div>'\n ].join( '' );\n\n // Set body template.\n const MODAL_TEMPLATE = [\n '<div class=\"table-block-modal fade\"',\n 'tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">',\n '<div class=\"modal-dialog\">',\n '<div class=\"modal-content\">',\n '<label class=\"hidden\" for=\"close-table-block-modal-btn\">Close Modal Button</label>',\n '<button id=\"close-table-block-modal-btn\" type=\"button\" class=\"button close icon text-replace icon-cross\"',\n 'data-dismiss=\"modal\" aria-hidden=\"true\">×</button>',\n '<div class=\"modal-body\"></div>',\n '</div>',\n '</div>'\n ].join( '' );\n\n modalDom = $( MODAL_TEMPLATE );\n modalBodyDom = modalDom.find( '.modal-body' );\n modalBodyDom.html( MODAL_BODY_TEMPLATE );\n bodyDom = $( 'body' );\n bodyDom.find( '.table-block-modal' ).remove();\n bodyDom.append( modalDom );\n modalDom.modal( 'show' );\n saveBtnDom = modalDom.find( '#table-block-save-btn' );\n saveBtnDom.on( 'click', function( event ) {\n modalDom.trigger( 'save-btn:clicked', event );\n } );\n\n return modalDom;\n }", "async function createConsumablesCWModal() {\n const modal = await modalController.create({\n component: \"consume-cw-modal\",\n cssClass: \"consumeCWModal\",\n });\n\n var settings = {\n \"url\": `http://localhost:8080/api/caseworker/consumables/detail/${storedButtonID}`,\n \"method\": \"GET\",\n \"timeout\": 0,\n };\n \n $.ajax(settings).done(function (response) {\n var dataArray2 = JSON.parse(response);\n console.log(dataArray2);\n\n var comments;\n\n if(dataArray2[0].cons_comment = \"undefined\"){\n comments = \" - \";\n }else{\n comments = dataArray2[0].cons_comment;\n }\n\n document.getElementById(\"cwConsName\").innerHTML = dataArray2[0].cons_name;\n document.getElementById(\"cwConsID\").innerHTML = dataArray2[0].cons_id;\n document.getElementById(\"cwConsLabel\").innerHTML = dataArray2[0].cons_label;\n document.getElementById(\"cwConsStatus\").innerHTML = dataArray2[0].cons_status;\n document.getElementById(\"cwConsComments\").innerHTML = comments;\n \n });\n\n await modal.present();\n currentModal = modal;\n}", "updateContents( string ){\n\t\tthis.modalMessage.text(string);\n\t\t$('.modalBody').append(this.modalMessage);\n\t}", "function editElementOrder(){\n\t\t\t\t\tconsole.log(this)\n\t\t\t\t\tvar idElement = this.getAttribute('data-id')\n\t\t\t\t\tconsole.log(idElement)\n\t\t\t\t\tvar contentTemplateEditPoste = document.createElement('div')\n\t\t\t\t\tcontentTemplateEditPoste.setAttribute('class', 'editPosteModal')\n\t\t\t\t\tvar template = `<form action=\"\" id=\"sendEditPoste\" class=\"editPoste\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3>EDITAR REGISTRO DE POSTE</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--content\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Caracteristicas</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Código Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"codigo_newPoste\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Altura de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"altura_newPoste\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!--<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select class=\"selectBox__select\" id=\"altura_newPoste\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"\"></option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>-->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_newPoste\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Material</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_of_material\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de pastoral</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_pastoral\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Luminaria</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_luminaria\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Lampará</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_lampara\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Ubicación</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication_item--map\" style=\"width:100%;height:200px\" id=\"mapsEdit\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada X</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"element_coordenada_X\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada Y</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"element_coordenada_Y\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Estado</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_newPoste\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Pastoral</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_pastoral\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Luminaria</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_luminaria\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Lampará</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_lampara\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--buttons\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteCancel\">CANCELAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteSave\" type=\"submit\">GUARDAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</form>`\n\n\t\t\t\t\tcontentTemplateEditPoste.innerHTML = template\n\t\t\t\t\t$('.OrderWork').append(contentTemplateEditPoste)\n\n\t\t\t\t\t// $('#mapsEdit').css('background-image', 'url('+url+')')\n\n\t\t\t\t\tvar btnCloseEditPoste = $('#editPosteCancel')\n\t\t\t\t\t// btnCloseEditPoste.on('click', closeEditPoste)\n\n\t\t\t\t\tmapEdit = new GMaps({\n\t\t\t\t\t div: '#mapsEdit',\n\t\t\t\t\t zoom: 11,\n\t\t\t\t\t lat: -12.043333,\n\t\t\t\t\t lng: -77.028333,\n\t\t\t\t\t click: function(e) {\n\t\t\t\t\t console.log(e)\n\t\t\t\t\t $('#element_coordenada_X').val(e.latLng.lat())\n\t\t\t\t\t $('#element_coordenada_Y').val(e.latLng.lng())\n\t\t\t\t\t mapEdit.removeMarkers()\n\t\t\t\t\t mapEdit.addMarker({\n\t\t\t\t\t lat: e.latLng.lat(),\n\t\t\t\t\t lng: e.latLng.lng(),\n\t\t\t\t\t title: 'Lima',\n\t\t\t\t\t })\n\t\t\t\t\t }\n\t\t\t\t\t})\n\n\t\t\t\t\tbtnCloseEditPoste.on('click',function (ev){\n\t\t\t\t\t\tev.preventDefault()\n\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t})\n\n\t\t\t\t\t$('#sendEditPoste').submit(function(ev){\n\t\t\t\t\t\tev.preventDefault()\n\n\t\t\t\t\t\tvar codigo_poste = $('#codigo_newPoste')\n\t\t\t\t\t\tvar type_poste = $('#type_newPoste')\n\t\t\t\t\t\tvar altura_poste = $('#altura_newPoste')\n\t\t\t\t\t\tvar type_material = $('#type_of_material')\n\t\t\t\t\t\tvar type_pastoral = $('#type_pastoral')\n\t\t\t\t\t\tvar type_luminaria = $('#type_luminaria')\n\t\t\t\t\t\tvar type_lampara = $('#type_lampara')\n\t\t\t\t\t\tvar coordenada_X = $('#element_coordenada_X')\n\t\t\t\t\t\tvar coordenada_Y = $('#element_coordenada_Y')\n\t\t\t\t\t\t// var observaciones = $('#observaciones')\n\t\t\t\t\t\tvar estado_poste = $('#estado_newPoste')\n\t\t\t\t\t\tvar estado_pastoral = $('#estado_pastoral')\n\t\t\t\t\t\tvar estado_luminaria = $('#estado_luminaria')\n\t\t\t\t\t\tvar estado_lampara = $('#estado_lampara')\n\n\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\tcodigo_poste: codigo_poste.val(),\n\t\t\t\t\t\t\ttype_poste: type_poste.val(),\n\t\t\t\t\t\t\taltura_poste: altura_poste.val(),\n\t\t\t\t\t\t\ttype_material: type_material.val(),\n\t\t\t\t\t\t\ttype_pastoral: type_pastoral.val(),\n\t\t\t\t\t\t\ttype_luminaria: type_luminaria.val(),\n\t\t\t\t\t\t\ttype_lampara: type_lampara.val(),\n\t\t\t\t\t\t\tcoordenada_X: coordenada_X.val(),\n\t\t\t\t\t\t\tcoordenada_Y: coordenada_Y.val(),\n\t\t\t\t\t\t\t// observaciones:\n\t\t\t\t\t\t\testado_poste: estado_poste.val(),\n\t\t\t\t\t\t\testado_pastoral: estado_pastoral.val(),\n\t\t\t\t\t\t\testado_luminaria: estado_luminaria.val(),\n\t\t\t\t\t\t\testado_lampara: estado_lampara.val()\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconsole.log(data)\n\n\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+idNuevo+'/item/poste/'+idElement+'?_method=put',\n\t\t\t\t\t\t\tdata: data\n\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t$('[data-content=\"'+idElement+'\"] #image').attr('src', res.data.service.imagen_poste[0].path)\n\t\t\t\t\t\t\t$('[data-content=\"'+idElement+'\"] #codigo_poste').html(res.data.service.codigo_poste)\n\t\t\t\t\t\t\t$('[data-content=\"'+idElement+'\"] #type_poste').html(res.data.service.type_poste)\n\t\t\t\t\t\t\t$('[data-content=\"'+idElement+'\"] #type_material').html(res.data.service.type_material)\n\t\t\t\t\t\t\t// location.reload()\n\t\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t}", "function showTutorModal(data)\r\n{\r\n //you can do anything with data, or pass more data to this function. i set this data to modal header for example\r\n\t $('.tutorDeleteByAdmin').attr('href','/deleteTutorByAdmin?id='+data);\r\n\t$(\"#myModal .tutorDeleteId\").html(data)\r\n $(\"#myModal\").modal();\r\n}", "function createModal( itcb ) {\n modal = new Y.doccirrus.DCWindow( modalOptions );\n\n // TODO: deduplicate\n jq = {\n divContentEditableModal: $('#divContentEditableModal')\n };\n\n config.contentEditable = jq.divContentEditableModal[0];\n\n markdownEditorViewModel = new MarkdownEditorViewModel( config );\n\n jq.divContentEditableModal[0].contentEditable = true;\n jq.divContentEditableModal.html( Y.dcforms.markdownToHtml( config.value ) );\n\n ko.applyBindings( markdownEditorViewModel, modalOptions.bodyContent.getDOMNode() );\n\n if ( markdownEditorViewModel.useWYSWYG ) {\n markdownEditorViewModel.wyswygButtons.setTextArea( jq.divContentEditableModal[0] );\n Y.dcforms.setHtmlPaste( jq.divContentEditableModal[0] );\n resizeContentEditable();\n }\n\n itcb( null );\n }", "function editElementOrderExistent(){\n\t\t\t\t\tconsole.log('XD')\n\t\t\t\t\tvar contentTemplateEditPoste = document.createElement('div')\n\t\t\t\t\tcontentTemplateEditPoste.setAttribute('class', 'editPosteModal')\n\t\t\t\t\tvar template = `<form action=\"\" id=\"sendEditPoste\" class=\"editPoste\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3>EDITAR REGISTRO DE POSTE</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--content\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Caracteristicas</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>ID Cliente</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"new_cliente_id\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Número de Cliente</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"new_numero_cliente\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>DIRECCIÓN</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Distrito</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"distrito\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Nombre de Vía</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"new_codigo_via\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Número de Puerta</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"new_numero_puerta\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Puerta Interior</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"new_numero_interior\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Urbanización</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"new_urbanizacion\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Manzana</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"new_manzana\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Lote</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"new_lote\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>DATOS</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Nombre de Cliente</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"new_nombre_de_cliente\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Residencial</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"new_type_residencial\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option>Seleccione</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"true\">Si</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"false\">No</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Maximetro BT</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"new_is_maximetro_bt\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option>Seleccione</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"si\">Si</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"no\">No</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>UBICACIÓN</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication_item--map\" style=\"width:100%;height:200px\" id=\"mapsEdit\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada X</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"element_coordenada_X\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada Y</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"element_coordenada_Y\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--buttons\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteCancel\">CANCELAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteSave\" type=\"submit\">GUARDAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</form>`\n\n\t\t\t\t\tcontentTemplateEditPoste.innerHTML = template\n\t\t\t\t\t$('.OrderWork').append(contentTemplateEditPoste)\n\n\t\t\t\t\tvar btnCloseEditPoste = $('#editPosteCancel')\n\t\t\t\t\t// btnCloseEditPoste.on('click', closeEditPoste)\n\n\t\t\t\t\tmapEdit = new GMaps({\n\t\t\t\t\t div: '#mapsEdit',\n\t\t\t\t\t zoom: 11,\n\t\t\t\t\t lat: -12.043333,\n\t\t\t\t\t lng: -77.028333,\n\t\t\t\t\t click: function(e) {\n\t\t\t\t\t console.log(e)\n\t\t\t\t\t $('#element_coordenada_X').val(e.latLng.lat())\n\t\t\t\t\t $('#element_coordenada_Y').val(e.latLng.lng())\n\t\t\t\t\t mapEdit.removeMarkers()\n\t\t\t\t\t mapEdit.addMarker({\n\t\t\t\t\t lat: e.latLng.lat(),\n\t\t\t\t\t lng: e.latLng.lng(),\n\t\t\t\t\t title: 'Lima',\n\t\t\t\t\t })\n\t\t\t\t\t }\n\t\t\t\t\t})\n\n\t\t\t\t\tbtnCloseEditPoste.on('click',function (ev){\n\t\t\t\t\t\tev.preventDefault()\n\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t})\n\n\t\t\t\t\t$('#sendEditPoste').submit(function(ev){\n\t\t\t\t\t\tev.preventDefault()\n\n\t\t\t\t\t\tvar cliente_id = $('#new_cliente_id')\n\t\t\t\t\t\tvar numero_cliente = $('#new_numero_cliente')\n\t\t\t\t\t\tvar codigo_via = $('#new_codigo_via')\n\t\t\t\t\t\tvar numero_puerta = $('#new_numero_puerta')\n\t\t\t\t\t\tvar numero_interior = $('#new_numero_interior')\n\t\t\t\t\t\tvar numero_cliente = $('#new_numero_cliente')\n\t\t\t\t\t\tvar manzana = $('#new_manzana')\n\t\t\t\t\t\tvar lote = $('#new_lote')\n\t\t\t\t\t\tvar nombre_de_cliente = $('#new_nombre_de_cliente')\n\t\t\t\t\t\tvar type_residencial = $('#new_type_residencial')\n\t\t\t\t\t\tvar is_maximetro_bt = $('#is_maximetro_bt')\n\t\t\t\t\t\tvar element_coordenada_X = $('#element_coordenada_X')\n\t\t\t\t\t\tvar element_coordenada_Y = $('#element_coordenada_Y')\n\n\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\tcliente_id: cliente_id.val(),\n\t\t\t\t\t\t\tnumero_cliente:numero_cliente.val(),\n\t\t\t\t\t\t\tcodigo_via:codigo_via.val(),\n\t\t\t\t\t\t\tnumero_puerta:numero_puerta.val(),\n\t\t\t\t\t\t\tnumero_interior:numero_interior.val(),\n\t\t\t\t\t\t\tcodigo_localidad:'',\n\t\t\t\t\t\t\tmanzana:manzana.val(),\n\t\t\t\t\t\t\tlote:lote.val(),\n\t\t\t\t\t\t\tnombre_de_cliente:nombre_de_cliente.val(),\n\t\t\t\t\t\t\ttype_residencial:type_residencial.val(),\n\t\t\t\t\t\t\tis_maximetro_bt:is_maximetro_bt.val(),\n\t\t\t\t\t\t\tsuministro_derecha:'',\n\t\t\t\t\t\t\tsuministro_izquierda:'',\n\t\t\t\t\t\t\tmedidor_derecha:'',\n\t\t\t\t\t\t\tmedidor_izquierda:'',\n\t\t\t\t\t\t\tnumero_poste_cercano:'',\n\t\t\t\t\t\t\ttype_conexion:'',\n\t\t\t\t\t\t\ttype_acometida:'',\n\t\t\t\t\t\t\ttype_cable_acometida:'',\n\t\t\t\t\t\t\tcalibre_cable_acometida:'',\n\t\t\t\t\t\t\tcalibre_cable_matriz:'',\n\t\t\t\t\t\t\tobservaciones:'',\n\t\t\t\t\t\t\tfecha_ejecucion:'',\n\t\t\t\t\t\t\tcoordenada_X:element_coordenada_X.val(),\n\t\t\t\t\t\t\tcoordenada_Y:element_coordenada_Y.val(),\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconsole.log(data)\n\n\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+idNuevo+'/item/cliente/'+itemEditable+'?_method=put',\n\t\t\t\t\t\t\tdata: data\n\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t$('#image').attr('src', res.data.service.imagen_cliente[0].path)\n\t\t\t\t\t\t\t$('#cliente_id').html(res.data.service.cliente_id)\n\t\t\t\t\t\t\t$('#nombre_de_cliente').html(res.data.service.nombre_de_cliente)\n\t\t\t\t\t\t\t$('#type_residencial').html(res.data.service.type_residencial)\n\t\t\t\t\t\t\t// location.reload()\n\t\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t}", "function editElementOrder(){\n\t\t\t\t\tconsole.log(this)\n\t\t\t\t\tvar idElement = this.getAttribute('data-id')\n\t\t\t\t\tconsole.log(idElement)\n\t\t\t\t\tvar contentTemplateEditPoste = document.createElement('div')\n\t\t\t\t\tcontentTemplateEditPoste.setAttribute('class', 'editPosteModal')\n\t\t\t\t\tvar template = `<form action=\"\" id=\"sendEditPoste\" class=\"editPoste\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3>EDITAR REGISTRO DE POSTE</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--content\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Caracteristicas</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Código Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"codigo_newPoste\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Altura de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"altura_newPoste\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_newPoste\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Material</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_of_material\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de pastoral</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_pastoral\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Luminaria</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_luminaria\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Lampará</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_lampara\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Ubicación</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication_item--map\" style=\"width:100%;height:200px\" id=\"mapsEdit\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada X</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"element_coordenada_X\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada Y</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"element_coordenada_Y\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Estado</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_newPoste\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Pastoral</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_pastoral\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Luminaria</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_luminaria\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Lampará</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_lampara\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--buttons\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteCancel\">CANCELAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteSave\" type=\"submit\">GUARDAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</form>`\n\n\t\t\t\t\tcontentTemplateEditPoste.innerHTML = template\n\t\t\t\t\t$('.OrderWork').append(contentTemplateEditPoste)\n\n\t\t\t\t\t// $('#mapsEdit').css('background-image', 'url('+url+')')\n\n\t\t\t\t\tvar btnCloseEditPoste = $('#editPosteCancel')\n\t\t\t\t\t// btnCloseEditPoste.on('click', closeEditPoste)\n\n\t\t\t\t\tmapEdit = new GMaps({\n\t\t\t\t\t div: '#mapsEdit',\n\t\t\t\t\t zoom: 11,\n\t\t\t\t\t lat: -12.043333,\n\t\t\t\t\t lng: -77.028333,\n\t\t\t\t\t click: function(e) {\n\t\t\t\t\t console.log(e)\n\t\t\t\t\t $('#element_coordenada_X').val(e.latLng.lat())\n\t\t\t\t\t $('#element_coordenada_Y').val(e.latLng.lng())\n\t\t\t\t\t mapEdit.removeMarkers()\n\t\t\t\t\t mapEdit.addMarker({\n\t\t\t\t\t lat: e.latLng.lat(),\n\t\t\t\t\t lng: e.latLng.lng(),\n\t\t\t\t\t title: 'Lima',\n\t\t\t\t\t })\n\t\t\t\t\t }\n\t\t\t\t\t})\n\n\t\t\t\t\tbtnCloseEditPoste.on('click',function (ev){\n\t\t\t\t\t\tev.preventDefault()\n\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t})\n\n\t\t\t\t\t$('#sendEditPoste').submit(function(ev){\n\t\t\t\t\t\tev.preventDefault()\n\n\t\t\t\t\t\tvar codigo_poste = $('#codigo_newPoste')\n\t\t\t\t\t\tvar type_poste = $('#type_newPoste')\n\t\t\t\t\t\tvar altura_poste = $('#altura_newPoste')\n\t\t\t\t\t\tvar type_material = $('#type_of_material')\n\t\t\t\t\t\tvar type_pastoral = $('#type_pastoral')\n\t\t\t\t\t\tvar type_luminaria = $('#type_luminaria')\n\t\t\t\t\t\tvar type_lampara = $('#type_lampara')\n\t\t\t\t\t\tvar coordenada_X = $('#element_coordenada_X')\n\t\t\t\t\t\tvar coordenada_Y = $('#element_coordenada_Y')\n\t\t\t\t\t\t// var observaciones = $('#observaciones')\n\t\t\t\t\t\tvar estado_poste = $('#estado_newPoste')\n\t\t\t\t\t\tvar estado_pastoral = $('#estado_pastoral')\n\t\t\t\t\t\tvar estado_luminaria = $('#estado_luminaria')\n\t\t\t\t\t\tvar estado_lampara = $('#estado_lampara')\n\n\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\tcodigo_poste: codigo_poste.val(),\n\t\t\t\t\t\t\ttype_poste: type_poste.val(),\n\t\t\t\t\t\t\taltura_poste: altura_poste.val(),\n\t\t\t\t\t\t\ttype_material: type_material.val(),\n\t\t\t\t\t\t\ttype_pastoral: type_pastoral.val(),\n\t\t\t\t\t\t\ttype_luminaria: type_luminaria.val(),\n\t\t\t\t\t\t\ttype_lampara: type_lampara.val(),\n\t\t\t\t\t\t\tcoordenada_X: coordenada_X.val(),\n\t\t\t\t\t\t\tcoordenada_Y: coordenada_Y.val(),\n\t\t\t\t\t\t\t// observaciones:\n\t\t\t\t\t\t\testado_poste: estado_poste.val(),\n\t\t\t\t\t\t\testado_pastoral: estado_pastoral.val(),\n\t\t\t\t\t\t\testado_luminaria: estado_luminaria.val(),\n\t\t\t\t\t\t\testado_lampara: estado_lampara.val()\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconsole.log(data)\n\n\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+idNuevo+'/item/poste/'+idElement+'?_method=put',\n\t\t\t\t\t\t\tdata: data\n\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t$('#image').attr('href', res.data.service.imagen_poste[0].path)\n\t\t\t\t\t\t\t$('#codigo_poste').html(res.data.service.codigo_poste)\n\t\t\t\t\t\t\t$('#type_poste').html(res.data.service.type_poste)\n\t\t\t\t\t\t\t$('#type_material').html(res.data.service.type_material)\n\t\t\t\t\t\t\t// location.reload()\n\t\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t}", "function setModalBody(key) {\r\n if (key === 0) {\r\n $('.modal-body').html(originalText);\r\n }\r\n else {\r\n $('.modal-body').html(compressedText);\r\n }\r\n}", "function createContent(data, templateNum) {\n $(document).ready(function() {\n //iterate through templates\n for (i = 0; i < templateList.length; i++) {\n let source = $(templateList[i][0]).html();\n let template = Handlebars.compile(source);\n let html = template(data);\n //write data into template\n $(templateList[i][1]).append(html);\n }\n\n contentLoaded();\n });\n}", "function showNotificationModal(data)\r\n{\r\n //you can do anything with data, or pass more data to this function. i set this data to modal header for example\r\n\t $('.notificationDeleteByAdmin').attr('href','/notificationDeleteByAdmin?id='+data);\r\n\t$(\"#myNotificationModal .notificationDeleteByAdminId\").html(data)\r\n $(\"#myNotificationModal\").modal();\r\n}", "function pShowTemplate(template, data){\n var html = template(data);\n $('#content').html(html);\n }", "function templating(){\n\t\tvar lots1 = JSON.parse(window.localStorage.getItem('lots'));\n\t\tvar content = document.getElementById(\"template1\").innerHTML;\n\t\tvar template = Handlebars.compile(content);\n\t\tvar contentData = template(lots1);\n\t\tdocument.getElementById(\"cont_load\").innerHTML += contentData;\n\t\t$('.selling_item').hide();\n\t\t}", "function editUserTemplate(data) {\n //takes template and populate it with passed array\n var rawTemplate = document.getElementById(\"editUserTemplate\").innerHTML;\n var compiledTemplate = Handlebars.compile(rawTemplate);\n var editUserGeneratedHTML = compiledTemplate(data);\n // display template in choosen ID tag\n var userContainer = document.getElementById(\"editUserContainer\");\n userContainer.innerHTML = editUserGeneratedHTML;\n}", "function suggestionmodalstart() {\n let html = ' <!-- suggestion modal -->' +\n ' <div class=\"modal\" tabindex=\"-1\" role=\"dialog\" id=\"vitasa_modal_suggestion\">' +\n ' <div class=\"modal-dialog\" role=\"document\">' +\n ' <div class=\"modal-content\">' +\n ' <div class=\"modal-header\">' +\n ' <h5 class=\"modal-title\">Post a Suggestion</h5>' +\n ' <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">' +\n ' <span aria-hidden=\"true\">&times;</span>' +\n ' </button>' +\n ' </div>' +\n ' <div class=\"modal-body\">' +\n '' +\n ' <div class=\"row\">' +\n ' <div class=\"col\">' +\n ' <div class=\"input-group mb-3\">' +\n ' <div class=\"input-group-prepend\">' +\n ' <span class=\"input-group-text\" id=\"basic-addon1\">Subject</span>' +\n ' </div>' +\n ' <input type=\"text\" class=\"form-control\" placeholder=\"Subject\" aria-label=\"Username\" aria-describedby=\"basic-addon1\" id=\"vitasa_suggestion_subject\">' +\n ' </div>' +\n ' </div>' +\n ' </div>' +\n '' +\n ' <div class=\"row\">' +\n ' <div class=\"col\">' +\n ' <div class=\"input-group\">' +\n ' <div class=\"input-group-prepend\">' +\n ' <span class=\"input-group-text\">Suggestion</span>' +\n ' </div>' +\n ' <textarea class=\"form-control\" aria-label=\"Suggestion\" id=\"vitasa_suggestion_body\"></textarea>' +\n ' </div>' +\n ' </div>' +\n ' </div>' +\n '' +\n ' </div>' +\n ' <div class=\"modal-footer\">' +\n ' <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\" id=\"vitasa_button_cancel\">Cancel</button>' +\n ' <button type=\"button\" class=\"btn btn-primary\" data-dismiss=\"modal\" id=\"vitasa_button_save\">Save</button>' +\n ' </div>' +\n ' </div>' +\n ' </div>' +\n ' </div>';\n\n const newRow = $('<div>');\n newRow.append(html);\n $(\"body\").append(newRow);\n\n let modal = $('#vitasa_modal_suggestion');\n modal.modal({});\n\n modal.on('hidden.bs.modal', function () {\n // if it was the cancel button, we can safely just quit\n let clickedbuttonid = $(document.activeElement).attr(\"id\");\n if (clickedbuttonid === \"vitasa_button_cancel\")\n return;\n\n let subject = $('input#vitasa_suggestion_subject')[0].value;\n let textarea = $('textarea#vitasa_suggestion_body')[0].value;\n\n let user = BackendHelper.FindUserByEmail(BackendHelper.UserCredentials.Email);\n if (user === null)\n return;\n\n BackendHelper.CreateSuggestion(user, subject, textarea)\n .catch(function (error) {\n console.log(error);\n });\n });\n}", "function editStorageTemplate(data) {\n //takes template and populate it with passed array\n var rawTemplate = document.getElementById(\"editStorageTemplate\").innerHTML;\n var compiledTemplate = Handlebars.compile(rawTemplate);\n var editStorageGeneratedHTML = compiledTemplate(data);\n // display template in choosen ID tag\n var storageContainer = document.getElementById(\"editStorageContainer\");\n storageContainer.innerHTML = editStorageGeneratedHTML;\n}", "function buildNotesModal(data,mongo_id){\n\n var numNotes; \n\n if (data.note != null){\n numNotes = data.note.length;\n }else{ numNotes = 0; }\n\n var html = `\n <div class=\"bootbox modal fade show\" data-mongoid=\"${mongo_id}\" tabindex=\"-1\" role=\"dialog\" style=\"display: block;\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-body\">\n <button type=\"button\" class=\"bootbox-close-button close\" data-dismiss=\"modal\" aria-hidden=\"true\" style=\"margin-top: -10px;\">×</button>\n <div class=\"bootbox-body\">\n <div class=\"container-fluid text-center\">\n \n <h4>Notes For Article: ${data.title}</h4>\n <hr>\n <ul class=\"list-group note-container\">`;\n \n if(numNotes > 0){\n for(var i = 0; i < numNotes; i++){\n html += `\n <li class=\"list-group-item note\">${data.note[i]}<button class=\"btn btn-danger note-delete\">x</button></li>`\n }\n } else{\n html += `\n <li class=\"list-group-item\">No notes for this article yet.</li>`;\n }\n \n html += \n `</ul>\n <textarea placeholder=\"New Note\" id=\"textareaNotes\" rows=\"4\" cols=\"60\"></textarea>\n <button class=\"btn btn-success save\">Save Note</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>`\n return html\n}", "async function presentEditFeedModal( $item, langs_data ) {\n // create the modal with the `modal-page` component\n $doc.trigger('open-modal', [\n await modalController.create({\n component: 'modal-update-feed',\n componentProps: {\n 'langs' : langs_data,\n 'lang' : $item.data('lang'),\n 'id' : $item.data('id'),\n 'url' : $item.data('url'),\n 'title' : $item.find('ion-label h3 span').text(),\n 'allow_duplicates' : $item.data('allow-duplicates'),\n },\n }),\n function() {\n setTimeout(function() {\n $('#feed_title')[0].setFocus();\n }, 500);\n }\n ]);\n }", "function showAnswerActions(answers) {\n answers.forEach(function (answer) {\n var id = 'actions_' + answer.answer_id;\n var html = \"<button class='btn btn-primary' id='myBtn\" + answer.answer_id + \"' data-toggle='modal' data-target='#myModal\" + answer.answer_id + \"'>Edit</button>\";\n document.getElementById(id).innerHTML = html;\n });\n var models = [];\n answers.forEach(function (answer) {\n var html = \"<div id='myModal\" + answer.answer_id + \"' class='modal'>\"\n + \"<div class='modal-content'>\"\n + \" <span class='close' data-dismiss='modal'>&times;</span>\"\n + \"<textarea class='textarea' id='newAnswer\" + answer.answer_id + \"'>\" + answer.answer_body + \"</textarea><br>\"\n + \"<button class='btn btn-primary' id='updateBtn' onclick='updateUserAnswer(\" + JSON.stringify(answer) + \");'>Update</button>\"\n + \"</div>\"\n + \"</div>\";\n models.push(html);\n });\n document.getElementById('includes').innerHTML = models.join(\"\");\n}", "function coretModal(){\n $(\"#deleteModal .modal-body\").html(\"Yakin coret \"+currentProfile.tec_regno+\" (\"+currentProfile.name+\") ?\")\n $('#deleteModal').modal('show');\n}", "function populateModal(property) {\n var html;\n //console.log(property);\n $(\"#modalTitle\").text(property.address + \", \" + property.cityName + \", \" + \"NJ\");\n $(\"#propertyAddress\").text(property.address);\n $(\"#propertyTown\").text(property.cityName + \", \" + \"NJ\" + \" \" + property.zipcode);\n $(\"#propertyInfo\").text(property.bedrooms + \" beds | \" + property.fullBaths + \" baths | \" + property.sqFt + \" sqft\");\n $(\"#propertyComment\").text(property.remarksConcat);\n $(\"#propertyType\").text(property.idxPropType);\n $(\"#propertyPrice\").text(property.listingPrice);\n $(\"#mainImage\").attr(\"style\", \"background-image: url('\" + property.image['0'].url + \"'\");\n $(\"#mainImage\").attr(\"src\", property.image['0'].url);\n $(\"#fullDetails\").attr(\"href\", property.fullDetailsURL);\n $(\".thumbnailContainer\").empty();\n for(var i = 0; i < property.image.totalCount; i++)\n {\n html = '<div>' +\n '<img class=\"propertyImages\" src=\"' + property.image[i].url + '\">' +\n '</div>';\n $(\".thumbnailContainer\").append(html);\n }\n setTimeout(function() {\n $('.thumbnailContainer').slick({\n dots: false,\n arrows: true,\n infinite: false,\n speed: 600,\n slidesToShow: 6,\n slidesToScroll: 3,\n variableWidth: false,\n autoplay: false,\n });\n $(\".thumbnailContainer\").animate({\n opacity: 1,\n marginTop: \"0px\",\n marginBottom: \"20px\"\n }, 250);\n }, 500);\n }", "function displayModal() {\n\t\t\t\t$(\"#user-name\").text(newPerson.name);\n\t\t\t\t$(\"#match-name\").text(matchName);\n\t\t\t\t$(\"#match-img\").attr(\"src\", matchImage);\n\t\t\t\t$(\"#myModal\").modal();\n\t\t\t}", "function insertProfiles(results) { //passes results and appends them to the page\r\n $.each(results, function(index, user) {\r\n $('#gallery').append(\r\n `<div class=\"card\" id=${index}>\r\n <div class=\"card-img-container\">\r\n <img class=\"card-img\" src=\"${user.picture.large}\" alt=\"profile picture\">\r\n </div>\r\n <div class=\"card-info-container\">\r\n <h2 id=${index} class=\"card-name cap\">${user.name.first} ${user.name.last}</h2>\r\n <p class=\"card-text\">${user.email}</p>\r\n <p class=\"card-text cap\">${user.location.city}, ${user.location.state}</p>\r\n </div>\r\n </div>`);\r\n });\r\n\r\n//The modal div is being appended to the html\r\n function modalWindow() {\r\n $('#gallery').append(\r\n `<div class=\"modal-container\">\r\n <div class=\"modal\">\r\n <button type=\"button\" id=\"modal-close-btn\" class=\"modal-close-btn\"><strong>X</strong></button>\r\n <div class=\"modal-info-container\">\r\n </div>\r\n </div>\r\n </div>`);\r\n $('.modal-container').hide();\r\n }\r\n// I am formating the information I want the modal window to portray\r\n function modalAddon(user) {\r\n\r\n $(\".modal-info-container\").html( `\r\n <img class=\"modal-img\" src=\"${user.picture.large}\" alt=\"profile picture\">\r\n <h2 id=\"name\" class=\"modal-name cap\">${user.name.first} ${user.name.last}</h2>\r\n <p class=\"modal-text\">${user.email}</p>\r\n <p class=\"modal-text cap\">${user.location.city}</p>\r\n <br>_________________________________</br>\r\n <p class=\"modal-text\">${user.cell}</p>\r\n <p class=\"modal-text\">Postcode: ${user.location.postcode}</p>\r\n <p class=\"modal-text\">Birthday: ${user.dob.date}</p>\r\n </div>\r\n`);\r\n$(\".modal-container\").show();\r\n\r\n //This hide's the modal window when the \"X\" button is clicked\r\n $('#modal-close-btn').on(\"click\", function() {\r\n $(\".modal-container\").hide();\r\n });\r\n}\r\n\r\n\r\nmodalWindow(); //This opens the modal window when the card is clicked\r\n $('.card').on(\"click\", function() {\r\n let user = $('.card').index(this);\r\n modalAddon(results[user]);\r\n\r\n });\r\n\r\n}", "function updateRecipe() {\n var recipe = getRecipeIngredients()\n var recipeTemplate = document.getElementById(\"recipe-template\").innerHTML\n var template = Handlebars.compile(recipeTemplate)\n document.getElementById(\"main\").innerHTML = template(recipe)\n}", "function updateSaveModal() {\r\n regexInput_modal.value = regexInput.value;\r\n templateInput_modal.value = templateInput.value;\r\n globalCheckbox_modal.checked = globalCheckbox.checked;\r\n caseInsensitiveCheckbox_modal.checked = caseInsensitiveCheckbox.checked;\r\n multilineCheckbox_modal.checked = multilineCheckbox.checked;\r\n IgnoreHTMLCheckbox_modal.checked = IgnoreHTMLCheckbox.checked;\r\n}", "function setEditPage(){\r\n\r\n\t\tvar hash = location.hash;\r\n\t\tvar albumId = parseInt( hash.substring( hash.indexOf('/') + 1 ) );\r\n\t\t\r\n\t\tvar albumTitle;\r\n\t\tvar footerHTML;\r\n\r\n\t\tfor(var i = 0 ; i < albums.length ; i++){\r\n\t\t\tif(albumId === albums[i].id){\r\n\t\t\t\talbumTitle = albums[i].title;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tvar headerHTML = $('#albumHeader').html();\r\n\t\theaderHTML = headerHTML.replace( '{{AlbumTitle}}' , albumTitle );\r\n\r\n\t\t$('#header').html(headerHTML);\r\n\r\n\r\n\t\t//Code to set content\r\n\t\t$(\"#content\").html('');\r\n\r\n\t\tvar photos = albums[i].photos;\r\n\r\n\r\n\t\tfor( var i = 0 ; i < photos.length ; i++ ){\r\n\t\t\tvar photoHTML = $('#photoTemplate').html();\r\n\r\n\t\t\tphotoHTML = photoHTML.replace( '{{url}}' , photos[i].url);\r\n\t\t\tphotoHTML = photoHTML.replace( '{{albumId}}' , photos[i].albumId);\r\n\t\t\tphotoHTML = photoHTML.replace( '{{id}}' , photos[i].id);\r\n\t\t\tphotoHTML = photoHTML.replace( '{{edit}}' , '#editPhoto/'+albumId +'/' +photos[i].id);\r\n\t\t\tphotoHTML = photoHTML.replace( '{{delete}}' , '#deletePhoto/'+albumId +'/' +photos[i].id);\r\n\t\t\tphotoHTML = photoHTML.replace( '{{title}}' , photos[i].title);\r\n\r\n\t\t\t$('#content').append(photoHTML);\r\n\t\t}\r\n\t\tvar $fabAdd = $('<a />').attr(\"href\", '#addPhoto/'+albumId).attr('id' , 'fabAdd').html('+');\r\n\t\t$('#content').append($fabAdd);\r\n\r\n\r\n\t\tfooterHTML = $('#footerTemplate').html();\r\n\t\tfooterHTML = footerHTML.replace( '{{saveChanges}}' , '#saveAlbum/'+albumId);\r\n\t\tfooterHTML = footerHTML.replace( '{{cancelChanges}}' , '#cancelAlbum/'+albumId);\r\n\t\t$('#footer').css({\r\n\t\t\t'position':'fixed',\r\n\t\t\t'height' : '60px',\r\n\t\t\t'width' : '100%',\r\n\t\t\t'bottom' : '0px',\r\n\t\t\t'left' : '0px',\r\n\t\t\t'visibility' : 'visible'\r\n\t\t}).html(footerHTML);\r\n\r\n\r\n\t}", "function loadModal(c) {\n var modal = $('#modalEdit');\n modal.find('*[data-for]').hide();\n if (c.type === 'mnemonic') {\n modal.find(\"*[data-for*='m']\").show();\n }\n if (c.type === 'wallet') {\n modal.find(\"*[data-for*='w']\").show();\n }\n if (c.type === 'secret') {\n modal.find(\"*[data-for*='s']\").show();\n }\n modal.data('card', c);\n modal.find('.card-input[data-forfield][type=text]').each(function (index) {\n $(this).val(c[$(this).data('forfield')]);\n });\n modal.find('.card-input[data-forfield][type=checkbox]').each(function (index) {\n $(this).prop('checked', c[$(this).data('forfield')]);\n });\n modal.find('.cpicker[data-forfield]').each(function (index) {\n $(this).colorpicker('setValue', c[$(this).data('forfield')]);\n });\n c.template.css('position', 'fixed');\n c.template.css('top', '20px');\n c.template.css('left', '20px');\n c.template.css('z-index', '999');\n c.template.find('.card-form').css('display', 'none');\n modal.show();\n}", "function updateTemplateSelect(){\n var templates_select =\n makeSelectOptions(dataTable_templates,\n 1,//id_col\n 4,//name_col\n [],//status_cols\n []//bad status values\n );\n\n //update static selectors:\n $('#template_id', $create_vm_dialog).html(templates_select);\n}", "function showNewModal(companies) {\n\n let companySelect = \"\"\n\n companies.forEach(company => {\n companySelect += `<option value=\"${company._id}\">${company.name}</option>`\n })\n\n // reset the modal content\n modalBody.html('')\n\n // render modal create form\n modalBody.html(`\n <form class=\"needs-validation\">\n <label class=\" mb-1\" for=\"id\">id:</label>\n <input class=\"form-control\" type=\"text\" name=\"id\", value=\"\" placeholder = \"id\" required>\n \n <label class=\"mt-2 mb-1\" for=\"first-name\">first name:</label>\n <input class=\"form-control\" type=\"text\" name=\"first-name\", value=\"\" placeholder = \"first name\" required>\n \n <label class=\"mt-2 mb-1\" for=\"last-name\">last name:</label>\n <input class=\"form-control\" type=\"text\" name=\"last-name\", value=\"\" placeholder = \"last name\" required>\n \n <label class=\"mt-2 mb-1\" for=\"gender\">gender:</label>\n <select name=\"gender\" class=\"form-select\" aria-label=\"gender\" required>\n <option === \"male\" ? \"selected\": \"\"} value=\"male\">male</option>\n <option === \"female\" ? \"selected\": \"\"} value=\"female\">female</option>\n </select>\n \n <label class=\"mt-2 mb-1\" for=\"position\">position:</label>\n <select name=\"manager\" class=\"form-select\" aria-label=\"manager\" required>\n <option === true ? \"selected\": \"\"} value=\"true\">manager</option>\n <option === false ? \"selected\": \"\"} value=\"false\">employee</option>\n </select>\n \n <label class=\"mt-2 mb-1\" for=\"birthday\">birthday:</label>\n <input class=\"form-control form-control-date\" type=\"date\" name=\"birthday\", value=\"\" placeholder = \"birthday\" required>\n \n <label class=\"mt-2 mb-1\" for=\"company\">company:</label>\n\n <select name=\"company\" class=\"form-select\" aria-label=\"manager\" placeholder=\"company\" required>\n ${companySelect}\n </select>\n \n <div card-id=\"\" id=\"create-employee\" class=\"d-flex justify-content-end \">\n <button class=\"btn btn-primary w-auto mt-3 mb-0 justify-self-end\">create</button>\n </div>\n\n </form>\n `)\n}", "async function createPayCWModal() {\n const modal = await modalController.create({\n component: \"pay-cw-modal\",\n cssClass: \"payCWModal\",\n });\n\n var settings = {\n \"url\": `http://localhost:8080/api/caseworker/family/payment/detail/${storedButtonID}`,\n \"method\": \"GET\",\n \"timeout\": 0,\n };\n \n $.ajax(settings).done(function (response) {\n var dataArray = JSON.parse(response);\n console.log(dataArray);\n\n\n var paymentComment;\n\n if(dataArray[0].payment_note = \"undefined\"){\n paymentComment = \" - \";\n }else{\n paymentComment = dataArray[0].payment_note;\n }\n\n document.getElementById(\"cwPaymentID\").innerHTML = dataArray[0].payment_id;\n document.getElementById(\"cwPaymentAmt\").innerHTML = \"$\" + dataArray[0].amount_owe;\n document.getElementById(\"cwPaymentDeduct\").innerHTML = \"$\" + dataArray[0].deposit_deduction;\n document.getElementById(\"cwPaymentCat\").innerHTML = dataArray[0].payment_cat;\n document.getElementById(\"cwPaymentCharge\").innerHTML = \"$\" + dataArray[0].negligence_charge;\n document.getElementById(\"cwPaymentComment\").innerHTML = paymentComment;\n });\n\n await modal.present();\n currentModal = modal;\n}", "function renderLogInToSaveEducationModal() {\n var template, html;\n \n template = \"<div class='modal-header'>\" +\n \"<button type='button' class='close' data-dismiss='modal'>&times;</button>\" +\n \"<h4 class='modal-title'><strong>Please log in to use this feature:</strong></h4>\" +\n \"</div>\" +\n \"<div class='modal-body'>\" +\n \"<form>\" +\n \"<div class='form-group'>\" +\n \"<label for='email'>Email address:</label>\" +\n \"<input type='email' class='form-control' id='logInEmail'>\" +\n \"</div>\" +\n \"<div class='form-group'>\" +\n \"<label for='pwd'>Password:</label>\" +\n \"<input type='password' class='form-control' id='logInPwd'>\" +\n \"<a href='#' onclick='renderForgotPwdModal()'>Forgot password?</a>\" +\n \"</div>\" +\n \"<span style='display:inline'>\" +\n \"<button type='button' class='btn btn-default' data-dismiss='modal' onclick='logIn()' id=''>Log In</button>\" +\n \" \" +\n \"<button type='button' class='btn btn-default' data-dismiss='modal'>Cancel</button>\" +\n \"</span>\" +\n \"</form>\" +\n \"</div>\";\n\n html = Mustache.render(template);\n\n $(\"#modalContent\").html(html);\n}", "function editOrder(){\n\t\t\t\t\t\t\tcontentTemplateEdit = $('.OrderWork')\n\t\t\t\t\t\t\tvar templateEditPoste = document.createElement('div')\n\t\t\t\t\t\t\ttemplateEditPoste.setAttribute('class', 'EditPoste')\n\t\t\t\t\t\t\tvar template = `<form action=\"\" class=\"EditPoste__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditPoste__containner--head\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3>EDITAR ORDEN DE TRABAJO</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditPoste__containner--body\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Servicio</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select name=\"type_service\" id=\"type_service\" class=\"selectBox__select\" disabled>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_servicio_P\" selected>Poste</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_servicio_C\">Cliente</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Detalle del Servicio</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select class=\"selectBox__select\" name=\"detail_service\" id=\"detail_service\" disabled>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_A\">Zona sin Alumbrado Público</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_CH\">Poste Chocado</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_CC\">Poste Caido por Corrosión</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_M\">Mantenimiento de Poste</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_I\">Instalacion de Poste</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_R\">Registro de Poste</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Usuario</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select class=\"selectBox__select\" required name=\"\" id=\"codigo_contratista\"></select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Supervisor</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select class=\"selectBox__select\" required name=\"\" id=\"codigo_supervisor\"></select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Prioridad</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select class=\"selectBox__select\" name=\"priority\" id=\"priority\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option>Seleccione</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_urgencia_A\">Alta</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_urgencia_M\">Media</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_urgencia_B\">Baja</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Dirección</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input id=\"direccion\" type=\"text\" class=\"inputs-label\" value=\"${item.direccion}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"mapEdit\" style=\"width:100%;height:200px\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada X</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input id=\"coordenada_X\" class=\"inputs-label\" type=\"text\" disabled value=\"${item.coordenada_X}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada Y</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input id=\"coordenada_Y\" type=\"text\" disabled class=\"inputs-label\" value=\"${item.coordenada_Y}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left labelTextarea\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Descripción</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<textarea class=\"inputs-label\" name=\"\" id=\"descripcion\" cols=\"30\" rows=\"5\">${item.descripcion}</textarea>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Fecha de Visita Esperada</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"inputs-label\" id=\"date\" type=\"date\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Público</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right inputStatus\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right--true\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input name=\"public\" id=\"true\" value=\"true\" type=\"radio\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"true\">Si</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right--false\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input name=\"public\" id=\"false\" value=\"false\" type=\"radio\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"false\">No</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left countPoste\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Cantidad de Postes</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\" id=\"postesContainner\">\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__btns\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__btns--cancel\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button id=\"closeEditOrder\">CANCELAR</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__btns--send\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"submit\">GUARDAR</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</form>`\n\n\t\t\t\t\t\t\ttemplateEditPoste.innerHTML = template\n\t\t\t\t\t\t\tcontentTemplateEdit.append(templateEditPoste)\n\t\t\t\t\t\t\tconsole.log(item.coordenada_Y, item.coordenada_X)\n\t\t\t\t\t\t\tconsole.log(item.fecha_visita_esperada)\n\n\t // Validando reemplazo del inicio del path uploads\n\t\t\t\t\t\t\tvar OldDate = item.fecha_visita_esperada\n\t\t\t\t\t\t\tOldDate = OldDate.split('/')\n\t\t\t\t\t\t\tconsole.log(OldDate)\n\t\t\t\t\t\t\tvar day = OldDate[0]\n\t\t\t\t\t\t\tvar mounth = OldDate[1]\n\t\t\t\t\t\t\tvar year = OldDate[2]\n\n\t\t\t\t\t\t\tif (parseInt(mounth) < 10) {\n\t\t\t\t\t\t\t\tmounth = '0'+mounth\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (parseInt(day) < 10) {\n\t\t\t\t\t\t\t\tday = '0'+day\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar fechaDate = year+'-'+mounth+'-'+day\n\t\t\t\t\t\t\tconsole.log(typeof fechaDate, fechaDate)\n\t\t\t\t\t\t\t$('#date').val(fechaDate)\n\t\t\t\t\t\t // var day = (\"0\" + fecha_visita_esperada.getDate()).slice(-2);\n\t\t\t\t\t\t // var month = (\"0\" + (fecha_visita_esperada.getMonth() + 1)).slice(-2);\n\n\t\t\t\t\t\t // var today = fecha_visita_esperada.getFullYear()+\"-\"+(month)+\"-\"+(day);\n\t\t\t\t\t\t // console.log(today)\n\n\t\t\t\t\t\t // LISTA DE USUARIOS CONTRATISTAS\n\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t\t\t\turl:'/dashboard/usuarios/list/users-campo'\n\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\tconsole.log('XD123456')\n\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\tvar usersListContratista = res.data.usuarios\n\t\t\t\t\t\t\t\tfor (var i = 0; i < usersListContratista.length; i++) {\n\t\t\t\t\t\t\t\t\tvar content = $('#codigo_contratista')\n\t\t\t\t\t\t\t\t\tvar user = document.createElement('option')\n\t\t\t\t\t\t\t\t\tuser.setAttribute('value', usersListContratista[i]._id)\n\t\t\t\t\t\t\t\t\tuser.innerHTML = usersListContratista[i].full_name\n\t\t\t\t\t\t\t\t\tcontent.append(user)\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// SELECCION AUTOMATICA CON VALORES YA EXISTENTES DE DATA usuario\n\t\t\t\t\t\t\t\tfor (var i = 0; i < $('#codigo_contratista option').length; i++) {\n\t\t\t\t\t\t\t\t\tvar option = $('#codigo_contratista option')[i]\n\t\t\t\t\t\t\t\t\tif ($(option)[0].value === item.codigo_contratista) {\n\t\t\t\t\t\t\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t// LISTA DE USUARIOS SUPERVISORES\n\n\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t\t\t\turl: '/dashboard/usuarios/list/officers'\n\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\tvar usersListSupervisor = res.data.usuarios\n\t\t\t\t\t\t\t\tfor (var i = 0; i < usersListSupervisor.length; i++) {\n\t\t\t\t\t\t\t\t\tconsole.log('XD')\n\t\t\t\t\t\t\t\t\tvar content = $('#codigo_supervisor')\n\t\t\t\t\t\t\t\t\tvar user = document.createElement('option')\n\t\t\t\t\t\t\t\t\tuser.setAttribute('value', usersListSupervisor[i]._id)\n\t\t\t\t\t\t\t\t\tuser.innerHTML = usersListSupervisor[i].full_name\n\t\t\t\t\t\t\t\t\tcontent.append(user)\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tfor (var i = 0; i < $('#codigo_supervisor option').length; i++) {\n\t\t\t\t\t\t\t\t\tvar option = $('#codigo_supervisor option')[i]\n\t\t\t\t\t\t\t\t\tif ($(option)[0].value === item.codigo_supervisor) {\n\t\t\t\t\t\t\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t// contentPostesContainner.on('click', postesItem)\n\t\t\t\t\t\t\tvar mapEdit = new GMaps({\n\t\t\t\t\t\t\t div: '#mapEdit',\n\t\t\t\t\t\t\t lat: item.coordenada_X,\n\t\t\t\t\t\t\t lng: item.coordenada_Y\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t// mapEdit.markers\n\t\t\t\t\t\t\tmapEdit.addMarker({\n\t\t\t\t\t\t\t lat: item.coordenada_X,\n\t\t\t\t\t\t\t lng: item.coordenada_Y,\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tvar contentBoxItem = $('#postesContainner')\n\n\t\t\t\t\t\t\tconsole.log(contentBoxItem)\n\t\t\t\t\t\t\tif (item.detalle_servicio === 'detalle_servicio_R') {\n\t\t\t\t\t\t\t\tvar templatebox = `<div class=\"itemContainner\" id=\"itemContainner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"contentItems\" >\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"BtnNewElement\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"BtnNewElement__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"addNewElement\"><span class=\"icon-icon_agregar_poste\"></span></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t\t\tcontentBoxItem.html(templatebox)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvar templatebox = `<div class=\"searchItem\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"searchItem__btnSearch\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"searchItem__btnSearch--input\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"inputs-label\" id=\"codigoPoste\" type=\"text\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"searchItem__btnSearch--btn\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"AddOrderCodigo\"><span>+</span> Agregar Poste</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"contentItems\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t\t\tcontentBoxItem.html(templatebox)\n\t\t\t\t\t\t\t\t$('#AddOrderCodigo').on('click', addNewElementOrder)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// AGREGADO DE NUEVOS POSTES A LA LISTA DE ELEMENTOS\n\t\t\t\t\t\t\tfunction addNewElementOrder(){\n\t\t\t\t\t\t\t\tvar codigo_poste = $('#codigoPoste')\n\t\t\t\t\t\t\t\tif (codigo_poste.val() !== '') {\n\t\t\t\t\t\t\t\t\tconsole.log('XD')\n\t\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\t\tcode_service: codigo_poste.val()\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// SE OBTIENE DATOS LOS DATOS DEL SERVICIO BUSCADO\n\t\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/poste',\n\t\t\t\t\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\t\tconsole.log(res)\n\n\t\t\t\t\t\t\t\t\t\tvar elementNew = res.data.poste\n\t\t\t\t\t\t\t\t\t\tvar box_Content = $('#contentItems')\n\t\t\t\t\t\t\t\t\t\tvar newDiv = document.createElement('div')\n\t\t\t\t\t\t\t\t\t\tnewDiv.setAttribute('class', 'EditItem')\n\t\t\t\t\t\t\t\t\t\tnewDiv.setAttribute('data-content', res.data.poste._id)\n\t\t\t\t\t\t\t\t\t\tvar template = `<div class=\"EditItem__image\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ItemPhoto\" style=\"background-image:url(${res.data.poste.imagen_poste[0].path})\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"titleHead\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"codigo_poste\">${res.data.poste.codigo_poste}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__text\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_poste\"><strong>${res.data.poste.type_poste}</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_material\">${res.data.poste.type_material}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__delete\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"DeletePoste\" data-id=\"${res.data.poste._id}\">x</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t\t\t\t\tnewDiv.innerHTML = template\n\t\t\t\t\t\t\t\t\t\tbox_Content.append(newDiv)\n\t\t\t\t\t\t\t\t\t\t$('.DeletePoste').on('click', deletePoste)\n\n\t\t\t\t\t\t\t\t\t\t// CREACION DE NUEVO POSTE\n\t\t\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+item._id+'/add-item/poste'\n\t\t\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\t\t\t\tcodigo_poste:elementNew.codigo_poste,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_poste:elementNew.type_poste,\n\t\t\t\t\t\t\t\t\t\t\t\taltura_poste:elementNew.altura_poste,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_material:elementNew.type_material,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_pastoral:elementNew.type_pastoral,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_luminaria:elementNew.Luminaria,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_lampara:elementNew.type_lampara,\n\t\t\t\t\t\t\t\t\t\t\t\tcoordenada_X:elementNew.coordenada_X,\n\t\t\t\t\t\t\t\t\t\t\t\tcoordenada_Y:elementNew.coordenada_Y,\n\t\t\t\t\t\t\t\t\t\t\t\tobservaciones:elementNew.observaciones,\n\t\t\t\t\t\t\t\t\t\t\t\testado_poste:elementNew.estado_poste,\n\t\t\t\t\t\t\t\t\t\t\t\testado_pastoral:elementNew.estado_pastoral,\n\t\t\t\t\t\t\t\t\t\t\t\testado_luminaria:elementNew.estado_luminaria,\n\t\t\t\t\t\t\t\t\t\t\t\testado_lampara:elementNew.estado_lampara,\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// EDICION DE POSTE NUEVO CREADO RECIENTEMENTE\n\t\t\t\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+item._id+'/item/poste/'+res.data.service._id+'?_method=put',\n\t\t\t\t\t\t\t\t\t\t\t\tdata: data\n\t\t\t\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t\t\t\t})\t\t\n\n\t\t\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tconsole.log('ingrese codigo de poste')\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// OBTENCION DE DATOS DE CADA ELEMENTO DE LA ORDEN\n\t\t\t\t\t\t\tconsole.log(item)\n\t\t\t\t\t\t\tfor (var e = 0; e < item.elementos.length; e++) {\n\t\t\t\t\t\t\t\tvar element = item.elementos[e]\n\t\t\t\t\t\t\t\tvar it = e\n\n\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\tmethod:'POST',\n\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+item._id+'/read/'+element.type+'/'+element._id\n\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\tconsole.log(res)\n\n\t\t\t\t\t\t\t\t\tvar contentElement = document.createElement('div')\n\t\t\t\t\t\t\t\t\tcontentElement.setAttribute('class', 'EditItem')\n\t\t\t\t\t\t\t\t\tcontentElement.setAttribute('data-content', res.data.service._id)\n\t\t\t\t\t\t\t\t\tconsole.log(item.detalle_servicio)\n\n\t\t\t\t\t\t\t\t\tif (item.detalle_servicio === 'detalle_servicio_R') {\n\n\t\t\t\t\t\t\t\t\t\tvar template = `<div class=\"EditItem__image\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ItemPhoto\" style=\"background-image:url(${res.data.service.imagen_poste[0].path})\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"titleHead\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"codigo_poste\">${res.data.service.codigo_poste}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__text\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"type_poste\"><strong>${res.data.service.type_poste}</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"type_material\">${res.data.service.type_material}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__edit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"EditarPoste\" data-id=\"${res.data.service._id}\">EDITAR</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__delete\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"DeletePoste\" data-id=\"${res.data.service._id}\">x</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\n\t\t\t\t\t\t\t\t\t\t// $('#ElementsContainner').html(template)\n\t\t\t\t\t\t\t\t\t\tcontentElement.innerHTML = template\n\t\t\t\t\t\t\t\t\t\t$('#contentItems').append(contentElement)\n\t\t\t\t\t\t\t\t\t\t// contentPostesContainner.append(contentElement)\n\t\t\t\t\t\t\t\t\t\t$('.EditarPoste').on('click', editOrdenItem)\n\t\t\t\t\t\t\t\t\t\t// $('#addNewElement').on('click', addNewElementEdited)\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tvar template = `<div class=\"EditItem__image\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ItemPhoto\" style=\"background-image:url(${res.data.service.imagen_poste[0].path})\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"titleHead\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"codigo_poste\">${res.data.service.codigo_poste}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__text\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"type_poste\"><strong>${res.data.service.type_poste}</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"type_material\">${res.data.service.type_material}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__delete\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"DeletePoste\" data-id=\"${res.data.service._id}\">x</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t\t\t\t\tcontentElement.innerHTML = template\n\t\t\t\t\t\t\t\t\t\t$('#contentItems').append(contentElement)\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// console.log(it, $('.EditItem').length-1)\n\n\t\t\t\t\t\t\t\t\tif (e === $('.EditItem').length) {\n\t\t\t\t\t\t\t\t\t\t// console.log(i+2, $('.EditItem').length)\n\t\t\t\t\t\t\t\t\t\t// console.log('XD')\n\t\t\t\t\t\t\t\t\t\t// var items = $('.editOrdenItem')\n\t\t\t\t\t\t\t\t\t\t// items.on('click', editOrdenItem)\n\t\t\t\t\t\t\t\t\t\t$('.DeletePoste').on('click', deletePoste)\n\t\t\t\t\t\t\t\t\t\t// console.log($('.EditItem').length)\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// ELIMINACION DE POSTES\n\t\t\t\t\t\t\tfunction deletePoste(){\n\t\t\t\t\t\t\t\tconsole.log(this.getAttribute('data-id'))\n\t\t\t\t\t\t\t\tvar id = this.getAttribute('data-id')\n\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+item._id+'/delete/poste/'+id+'?_method=delete'\n\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\t$('[data-content=\"'+id+'\"]').remove()\n\t\t\t\t\t\t\t\t\t$('[data-id=\"'+id+'\"]').remove()\n\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// EDICION DE ITEM DE ORDEN DE TRABAJO\n\t\t\t\t\t\t\tfunction editOrdenItem(){\n\t\t\t\t\t\t\t\tvar idPoste = this.getAttribute('data-id')\n\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+item._id+'/read/poste/'+idPoste\n\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\tvar item = res.data.service\n\t\t\t\t\t\t\t\t\tvar contentTemplateEditPoste = document.createElement('div')\n\t\t\t\t\t\t\t\t\tcontentTemplateEditPoste.setAttribute('class', 'editPosteModal')\n\t\t\t\t\t\t\t\t\tvar template = `<form action=\"\" id=\"sendEditPoste\" class=\"editPoste\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3>EDITAR REGISTRO DE POSTE</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--content\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Caracteristicas</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Código Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"txt_codigo_poste\" value=\"${item.codigo_poste}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Altura de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"altura_poste\" value=\"${item.altura_poste}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"txt_type_poste\" value=\"${item.type_poste}\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Material</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"txt_type_material\" value=\"${item.type_material}\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de pastoral</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_pastoral\" value=\"${item.type_pastoral}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Luminaria</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_luminaria\" value=\"${item.type_luminaria}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Lampará</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_lampara\" value=\"${item.type_lampara}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Ubicación</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication_item--map\" id=\"mapsEdit\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada X</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"coordenada_X\" value=\"${item.coordenada_X}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada Y</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"coordenada_Y\" value=\"${item.coordenada_Y}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Estado</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_poste\" value=\"${item.estado_poste}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Pastoral</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_pastoral\" value=\"${item.estado_pastoral}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Luminaria</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_luminaria\" value=\"${item.estado_luminaria}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Lampará</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_lampara\" value=\"${item.estado_lampara}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--buttons\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteCancel\">CANCELAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteSave\" type=\"submit\">GUARDAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</form>`\n\n\t\t\t\t\t\t\t\t\tcontentTemplateEditPoste.innerHTML = template\n\t\t\t\t\t\t\t\t\t$('.OrderWork').append(contentTemplateEditPoste)\n\n\t\t\t\t\t\t\t\t\tvar url = GMaps.staticMapURL({\n\t\t\t\t\t\t\t\t\t size: [800, 400],\n\t\t\t\t\t\t\t\t\t lat: item.coordenada_X,\n\t\t\t\t\t\t\t\t\t lng: item.coordenada_Y,\n\t\t\t\t\t\t\t\t\t markers: [\n\t\t\t\t\t\t\t\t\t {lat: item.coordenada_X, lng: item.coordenada_Y}\n\t\t\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t$('#mapsEdit').css('background-image', 'url('+url+')')\n\n\t\t\t\t\t\t\t\t\tvar btnCloseEditPoste = $('#editPosteCancel')\n\t\t\t\t\t\t\t\t\tbtnCloseEditPoste.on('click', closeEditPoste)\n\n\t\t\t\t\t\t\t\t\tfunction closeEditPoste(ev){\n\t\t\t\t\t\t\t\t\t\tev.preventDefault()\n\t\t\t\t\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$('#sendEditPoste').submit(function(ev){\n\t\t\t\t\t\t\t\t\t\tev.preventDefault()\n\n\t\t\t\t\t\t\t\t\t\tvar codigo_poste = $('#txt_codigo_poste')\n\t\t\t\t\t\t\t\t\t\tvar type_poste = $('#txt_type_poste')\n\t\t\t\t\t\t\t\t\t\tvar altura_poste = $('#altura_poste')\n\t\t\t\t\t\t\t\t\t\tvar type_material = $('#txt_type_material')\n\t\t\t\t\t\t\t\t\t\tvar type_pastoral = $('#type_pastoral')\n\t\t\t\t\t\t\t\t\t\tvar type_luminaria = $('#type_luminaria')\n\t\t\t\t\t\t\t\t\t\tvar type_lampara = $('#type_lampara')\n\t\t\t\t\t\t\t\t\t\tvar coordenada_X = $('#coordenada_X')\n\t\t\t\t\t\t\t\t\t\tvar coordenada_Y = $('#coordenada_Y')\n\t\t\t\t\t\t\t\t\t\t// var observaciones = $('#observaciones')\n\t\t\t\t\t\t\t\t\t\tvar estado_poste = $('#estado_poste')\n\t\t\t\t\t\t\t\t\t\tvar estado_pastoral = $('#estado_pastoral')\n\t\t\t\t\t\t\t\t\t\tvar estado_luminaria = $('#estado_luminaria')\n\t\t\t\t\t\t\t\t\t\tvar estado_lampara = $('#estado_lampara')\n\n\t\t\t\t\t\t\t\t\t\tconsole.log(altura_poste);\n\n\t\t\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\t\t\tcodigo_poste: codigo_poste.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_poste: type_poste.val(),\n\t\t\t\t\t\t\t\t\t\t\taltura_poste: altura_poste.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_material: type_material.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_pastoral: type_pastoral.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_luminaria: type_luminaria.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_lampara: type_lampara.val(),\n\t\t\t\t\t\t\t\t\t\t\tcoordenada_X: coordenada_X.val(),\n\t\t\t\t\t\t\t\t\t\t\tcoordenada_Y: coordenada_Y.val(),\n\t\t\t\t\t\t\t\t\t\t\t// observaciones:\n\t\t\t\t\t\t\t\t\t\t\testado_poste: estado_poste.val(),\n\t\t\t\t\t\t\t\t\t\t\testado_pastoral: estado_pastoral.val(),\n\t\t\t\t\t\t\t\t\t\t\testado_luminaria: estado_luminaria.val(),\n\t\t\t\t\t\t\t\t\t\t\testado_lampara: estado_lampara.val()\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tconsole.log(data)\n\n\t\t\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+res.data.work_order_id+'/item/poste/'+res.data.service._id+'?_method=put',\n\t\t\t\t\t\t\t\t\t\t\tdata: data\n\t\t\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\t\t\tconsole.log($('[data-content=\"'+res.data.service._id+'\"] .codigo_poste'))\n\t\t\t\t\t\t\t\t\t\t\t$('[data-content=\"'+res.data.service._id+'\"] .codigo_poste').html(res.data.service.codigo_poste)\n\t\t\t\t\t\t\t\t\t\t\t$('[data-content=\"'+res.data.service._id+'\"] .type_material').html(res.data.service.type_material)\n\t\t\t\t\t\t\t\t\t\t\t$('[data-content=\"'+res.data.service._id+'\"] .type_poste').html(res.data.service.type_poste)\n\t\t\t\t\t\t\t\t\t\t\t// location.reload()\n\t\t\t\t\t\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconsole.log($('#type_service'))\n\t\t\t\t\t\t\tvar option = $('#detail_service option')\n\t\t\t\t\t\t\t// console.log(option)\n\n\t\t\t\t\t\t\t// SELECCION AUTOMATICA CON VALORES YA EXISTENTES DE DATA detalle de servicio\n\t\t\t\t\t\t\tvar order_type_service\n\t\t\t\t\t\t\tif (item.detalle_servicio === 'Zona sin Alumbrado Público') {\n\t\t\t\t\t\t\t\titem.detalle_servicio = 'detalle_servicio_A'\n\t\t\t\t\t\t\t} else if (item.detalle_servicio === 'Poste Chocado') {\n\t\t\t\t\t\t\t\titem.detalle_servicio = 'detalle_servicio_CH'\n\t\t\t\t\t\t\t} else if (item.detalle_servicio === 'Poste Caido por Corrosión') {\n\t\t\t\t\t\t\t\titem.detalle_servicio = 'detalle_servicio_CC'\n\t\t\t\t\t\t\t} else if (item.detalle_servicio === 'Mantenimiento de Poste') {\n\t\t\t\t\t\t\t\titem.detalle_servicio = 'detalle_servicio_M'\n\t\t\t\t\t\t\t} else if (item.detalle_servicio === 'Instalacion de Poste') {\n\t\t\t\t\t\t\t\titem.detalle_servicio = 'detalle_servicio_I'\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\titem.detalle_servicio = 'detalle_servicio_R'\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfor (var i = 0; i < $('#detail_service option').length; i++) {\n\t\t\t\t\t\t\t\tvar option = $('#detail_service option')[i]\n\t\t\t\t\t\t\t\tconsole.log('Esto es un form :D', item.detalle_servicio, option.value)\n\t\t\t\t\t\t\t\tif (option.value === item.detalle_servicio) {\n\t\t\t\t\t\t\t\t\tconsole.log('los datos estan aqui!',option.value, item.detalle_servicio)\n\t\t\t\t\t\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// SELECCION AUTOMATICA CON VALORES YA EXISTENTES DE DATA prioridad\n\t\t\t\t\t\t\tfor (var i = 0; i < $('#priority option').length; i++) {\n\t\t\t\t\t\t\t\tvar option = $('#priority option')[i]\n\t\t\t\t\t\t\t\tif ($(option)[0].value === item.tipo_urgencia) {\n\t\t\t\t\t\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// // SELECCION AUTOMATICA CON VALORES YA EXISTENTES DE DATA usuario\n\t\t\t\t\t\t\t// for (var i = 0; i < $('#codigo_contratista option').length; i++) {\n\t\t\t\t\t\t\t// \tvar option = $('#codigo_contratista option')[i]\n\t\t\t\t\t\t\t// \tif ($(option)[0].value === item.codigo_contratista) {\n\t\t\t\t\t\t\t// \t\toption.setAttribute('selected', 'selected')\n\t\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// for (var i = 0; i < $('#codigo_supervisor option').length; i++) {\n\t\t\t\t\t\t\t// \tvar option = $('#codigo_supervisor option')[i]\n\t\t\t\t\t\t\t// \tif ($(option)[0].value === item.codigo_supervisor) {\n\t\t\t\t\t\t\t// \t\toption.setAttribute('selected', 'selected')\n\t\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// $('#date').val(item.fecha_visita_esperada)\n\n\t\t\t\t\t\t\tif (item.public === true) {\n\t\t\t\t\t\t\t\tdocument.getElementById('true').checked = true\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdocument.getElementById('false').checked = true\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar sendEditOrder = $('.EditPoste__containner')\n\n\t\t\t\t\t\t\tsendEditOrder.submit(function(ev){\n\t\t\t\t\t\t\t\tvar cod_contr = $('#codigo_contratista')\n\t\t\t\t\t\t\t\tvar cod_super = $('#codigo_supervisor')\n\t\t\t\t\t\t\t\tvar urgency = $('#priority')\n\t\t\t\t\t\t\t\tvar direccion = $('#direccion')\n\t\t\t\t\t\t\t\tvar descripcion = $('#descripcion')\n\t\t\t\t\t\t\t\tvar fecha_visita_esperada = $('#date')\n\t\t\t\t\t\t\t\tvar public = $(\"[name='public']:checked\")\n\n\t\t\t\t\t\t\t\tev.preventDefault()\n\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\tcodigo_supervisor: cod_contr.val(),\n\t\t\t\t\t\t\t\t\tcodigo_contratista: cod_super.val(),\n\t\t\t\t\t\t\t\t\ttipo_urgencia: urgency.val(),\n\t\t\t\t\t\t\t\t\tdireccion: direccion.val(),\n\t\t\t\t\t\t\t\t\tdescripcion: descripcion.val(),\n\t\t\t\t\t\t\t\t\tfecha_visita_esperada: fecha_visita_esperada.val(),\n\t\t\t\t\t\t\t\t\tpublic:public.val()\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tconsole.log(data)\n\n\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\turl:'/dashboard/ordenes_trabajo/'+order+'?_method=put',\n\t\t\t\t\t\t\t\t\tdata: data\n\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\tlocation.reload()\n\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t$('#closeEditOrder').on('click', function(ev){\n\t\t\t\t\t\t\t\tev.preventDefault()\n\t\t\t\t\t\t\t\t$('.EditPoste').remove()\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}", "_addModalHTML() {\n let modalEl = document.createElement(\"div\");\n modalEl.setAttribute(\"id\", \"enlightenModal\");\n modalEl.setAttribute(\"class\", \"modal\");\n modalEl.innerHTML = `\n <div class=\"modal-content\">\n <span class=\"close\">&times;</span>\n <h3>Title</h3>\n <p>Content</p>\n </div>f`;\n\n let bodyEl = document.getElementsByTagName('body')[0];\n bodyEl.appendChild(modalEl);\n let span = document.getElementsByClassName(\"close\")[0];\n\n // When the user clicks on <span> (x), close the modal\n span.onclick = function () {\n modalEl.style.display = \"none\";\n };\n\n // When the user clicks anywhere outside of the modal, close it\n window.onclick = function (event) {\n if (event.target.id === \"enlightenModal\") {\n modalEl.style.display = \"none\";\n }\n };\n return modalEl;\n }", "function updateTemplateInfo(request,template){\n var template_info = template.VMTEMPLATE;\n var info_tab = {\n title: tr(\"Information\"),\n content:\n '<table id=\"info_template_table\" class=\"info_table\" style=\"width:80%\">\\\n <thead>\\\n <tr><th colspan=\"2\">'+tr(\"Template\")+' \\\"'+template_info.NAME+'\\\" '+\n tr(\"information\")+'</th></tr>\\\n </thead>\\\n <tr>\\\n <td class=\"key_td\">'+tr(\"ID\")+'</td>\\\n <td class=\"value_td\">'+template_info.ID+'</td>\\\n </tr>\\\n <tr>\\\n <td class=\"key_td\">'+tr(\"Name\")+'</td>\\\n <td class=\"value_td\">'+template_info.NAME+'</td>\\\n </tr>\\\n <tr>\\\n <td class=\"key_td\">'+tr(\"Owner\")+'</td>\\\n <td class=\"value_td\">'+template_info.UNAME+'</td>\\\n </tr>\\\n <tr>\\\n <td class=\"key_td\">'+tr(\"Group\")+'</td>\\\n <td class=\"value_td\">'+template_info.GNAME+'</td>\\\n </tr>\\\n <tr>\\\n <td class=\"key_td\">'+tr(\"Register time\")+'</td>\\\n <td class=\"value_td\">'+pretty_time(template_info.REGTIME)+'</td>\\\n </tr>\\\n <tr><td class=\"key_td\">'+tr(\"Permissions\")+'</td><td></td></tr>\\\n <tr>\\\n <td class=\"key_td\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+tr(\"Owner\")+'</td>\\\n <td class=\"value_td\" style=\"font-family:monospace;\">'+ownerPermStr(template_info)+'</td>\\\n </tr>\\\n <tr>\\\n <td class=\"key_td\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+tr(\"Group\")+'</td>\\\n <td class=\"value_td\" style=\"font-family:monospace;\">'+groupPermStr(template_info)+'</td>\\\n </tr>\\\n <tr>\\\n <td class=\"key_td\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+tr(\"Other\")+'</td>\\\n <td class=\"value_td\" style=\"font-family:monospace;\">'+otherPermStr(template_info)+'</td>\\\n </tr>\\\n </table>'\n };\n var template_tab = {\n title: tr(\"Template\"),\n content: '<table id=\"template_template_table\" class=\"info_table\" style=\"width:80%\">\\\n <thead><tr><th colspan=\"2\">'+tr(\"Template\")+'</th></tr></thead>'+\n prettyPrintJSON(template_info.TEMPLATE)+\n '</table>'\n };\n\n\n Sunstone.updateInfoPanelTab(\"template_info_panel\",\"template_info_tab\",info_tab);\n Sunstone.updateInfoPanelTab(\"template_info_panel\",\"template_template_tab\",template_tab);\n\n Sunstone.popUpInfoPanel(\"template_info_panel\");\n}", "async function createConsumablesAdminModal() {\n const modal = await modalController.create({\n component: \"consume-admin-modal\",\n cssClass: \"consumeAdminModal\",\n });\n\n var settings = {\n \"url\": `http://localhost:8080/api/admin/consumables/${storedButtonID}`,\n \"method\": \"GET\",\n \"timeout\": 0,\n };\n \n $.ajax(settings).done(function (response) {\n var dataArray2 = JSON.parse(response);\n console.log(dataArray2);\n\n var consumeComments;\n\n if(dataArray2[0].cons_comments = \"undefined\"){\n consumeComments = \"-\";\n //console.log(\"consume was undefeinedd\");\n }\n else{\n consumeComments = dataArray2[0].cons_comments;\n }\n\n document.getElementById(\"consTentID\").innerHTML = dataArray2[0].tenant_id;\n document.getElementById(\"consItemName\").innerHTML = dataArray2[0].cons_name;\n document.getElementById(\"consLabel\").innerHTML = dataArray2[0].cons_label;\n document.getElementById(\"consStatus\").innerHTML = dataArray2[0].cons_status;\n document.getElementById(\"consComments\").innerHTML = consumeComments;\n });\n\n await modal.present();\n currentModal = modal;\n}", "function uncoretModal(){\n $(\"#uncoretModal .modal-body\").html(\"Yakin kembalikan \"+currentProfile.tec_regno+\" (\"+currentProfile.name+\") ?\")\n $('#uncoretModal').modal('show');\n}", "function openModalContent (canvasState) {\n return h('div', [\n h('form', {\n on: {\n submit: ev => {\n ev.preventDefault()\n const code = ev.currentTarget.querySelector('textarea').value\n canvasState.restoreCompressed(code)\n canvasState.openModal.close()\n }\n }\n }, [\n h('p', 'Paste the code for a polygram:'),\n saveLoadTextarea({ props: { rows: 8 } }),\n button('button', { class: { ma1: false, mt2: true } }, 'Load')\n ])\n ])\n}", "function show_modal_tags() {\n $.ajax({\n type: \"get\",\n url: \"api/tag/list\",\n success: function (response) {\n $(\"#modal_tags_body\").empty();\n\n $(\"#modal_tags_body\").append(\n `<table class=\"table table-light\">\n <tbody>\n ${\n Object.keys(response).map(function (key) {\n return `<tr>\n <td class=\"w-75\">\n <input class=\"form-control\" type=\"text\" name=\"\" value=\"${response[key].title}\" id=\"tag_title_${response[key].id}\">\n </td>\n <td class=\"w-25 mx-2 my-2\">\n <button type=\"\" button class=\"btn w-100 ${response[key].color}\"></button>\n </td>\n <td>\n <button type=\"button\" class=\"btn btn-sm btn-outline-success tag\" value=\"${response[key].id}\">\n <i class=\"fa fa-save\"></i>\n </button>\n </td>\n </tr>`;\n }).join(\"\")\n }\n </tbody>\n </table>\n `);\n\n $(\"#modal_tags\").modal();\n }\n });\n}", "function createDialogWithPartData(title,templateName,width) { \n var ui = SpreadsheetApp.getUi();\n var createUi = HtmlService.createTemplateFromFile(templateName).evaluate().getContent();\n var html = HtmlService.createTemplate(createUi+\n \"<script>\\n\" +\n \"var data = \"+getInvData()+\n \"</script>\")\n .evaluate()\n .setSandboxMode(HtmlService.SandboxMode.IFRAME)\n .setWidth(width);\n \n var ss = SpreadsheetApp.getActiveSpreadsheet();\n ui.showModalDialog(html,title);\n}", "function genModCon() {\n const genModalDiv = `<div class=modal-container></div>`;\n gallery.insertAdjacentHTML(\"afterEnd\", genModalDiv);\n const modalDiv = document.querySelector(\".modal-container\");\n modalDiv.style.display = \"none\";\n}", "function modal(data) {\n\n // Set modal title\n $('.modal-title').html(data.title);\n // Clear buttons except Cancel\n $('.modal-footer button:not(\".btn-default\")').remove();\n // Set input values\n $('#title').val(data.event ? data.event.title : '');\n\n if (data.event) {\n $('#allday').attr('checked', data.event.allDay);\n var f = data.event.allDay ? 'DD/MM/YYYY' : 'DD/MM/YYYY HH:mm';\n $('#startDate').val(getDate(data.event.start, f));\n $('#endDate').val(getDate(data.event.end, f));\n } else {\n $('#startDate').val(moment(currentDate, 'YYYY-MM-DD').format('DD/MM/YYYY HH:mm'));\n $('#endDate').val('');\n $('#allday').attr('checked', false);\n }\n\n $('#description').val(data.event ? data.event.description : '');\n $('#color').val(data.event ? data.event.color : '#3a87ad');\n\n // Create Butttons\n $.each(data.buttons, function(index, button) {\n $('.modal-footer').prepend('<button type=\"button\" id=\"' + button.id + '\" class=\"btn ' + button.css + '\">' + button.label + '</button>')\n });\n //Show Modal\n $('.modal').modal('show');\n }", "function newProfileModal(username) {\n var profileModalContent = $( \"#profile-modal-template\" ).children().clone(true);\n\n updateProfileData(profileModalContent, username);\n return profileModalContent;\n}", "generateOverlay() {\n for (let i = 0; i < this.results.length; i++) {\n let modalContainer = `<div class=\"modal-container\" hidden>\n <div class=\"modal\">\n <button type=\"button\" id=\"modal-close-btn\" class=\"modal-close-btn\"><strong>X</strong></button>\n <div class=\"modal-info-container\">\n <img class=\"modal-img\" src=\"${\n this.pictures[i]\n }\" alt=\"profile picture\">\n <h3 id=\"name\" class=\"modal-name cap\">${\n this.names[i]\n }</h3>\n <p class=\"modal-text\">${this.emails[i]}</p>\n <p class=\"modal-text cap\">${\n this.city[i]\n }</p>\n <hr>\n <p class=\"modal-text\">${this.numbers[i]}</p>\n <p class=\"modal-text\">${\n this.addresses[i]\n }</p>\n <p class=\"modal-text\">Birthday: ${\n this.birthdays[i]\n }</p>\n </div>\n </div>`;\n\n this.$body.append(modalContainer);\n }\n\n const $modalContainer = $(\".modal-container\");\n const modalButtons = `<div class=\"modal-btn-container\">\n <button type=\"button\" id=\"modal-prev\" class=\"modal-prev btn\">Prev</button>\n <button type=\"button\" id=\"modal-next\" class=\"modal-next btn\">Next</button>\n </div>`;\n\n $modalContainer.each((i, val) => $(val).append(modalButtons));\n }", "function cargarModalChef1(){\n\tvar txt='<!-- Modal --><div class=\"modal fade\" id=\"myModal\" role=\"dialog\">';\n\ttxt += '<div class=\"modal-dialog\">';\n\ttxt += '<!-- Modal content--><div class=\"modal-content\">';\n\ttxt += '<div class=\"modal-header\"><button type=\"button\" class=\"close\" data-dismiss=\"modal\">&times;</button>';\n\ttxt += '<div id=\"numeroPedido\"><h1>NUMERO PEDIDO</h1></div></div>';\n\ttxt += '<div class=\"modal-body\"><div id=\"detallePedidoCocina\"><div class=\"tbl_cocina\" id=\"tablaCocinaDetalle\">';\n\ttxt += '<table class=\"table table-bordered\"><thead><tr><th scope=\"col\">Productos</th><th scope=\"col\">Cantidad</th></tr>';\n\ttxt += '</thead><tbody><tr><td>arroz con huevo</td><td>5</td></tr><tr><td>arroz con huevo</td><td>5</td></tr><tr><td>arroz con huevo</td><td>5</td></tr><tr><td>arroz con huevo</td><td>5</td></tr><tr><td>arroz con huevo</td><td>5</td></tr><tr><td>arroz con huevo</td><td>5</td></tr></tbody></table></div></div></div>';\n\ttxt += '<div class=\"modal-footer\"><div id=\"pedidoCocinaSur\"><button type=\"button\" class=\"btn btn-warning\">PREPARAR</button>';\n\ttxt += '<button type=\"button\" class=\"btn btn-success\">ENTREGAR</button></div>';\n\ttxt += '</div></div></div></div>';\n\treturn txt;\n}", "function generateModal(item, data) {\n console.log(item)\n let modalContainer = document.createElement(\"div\");\n modalContainer.className = \"modal-container\";\n let html = `\n <div class=\"modal-container\">\n <div class=\"modal\">\n <button type=\"button\" id=\"modal-close-btn\" class=\"modal-close-btn\"><strong>X</strong></button>\n <div class=\"modal-info-container\">\n <img class=\"modal-img\" src=\"${item.picture.large}\" alt=\"profile picture\">\n <h3 id=\"name\" class=\"modal-name cap\">${item.name.first} ${item.name.last}</h3>\n <p class=\"modal-text\">${item.email}</p>\n <p class=\"modal-text cap\">${item.location.city}</p>\n <hr>\n <p class=\"modal-text\">${item.cell}</p>\n <p class=\"modal-text\">${item.location.street.number} ${item.location.street.name}, ${item.location.state} ${item.location.postcode}</p>\n <p class=\"modal-text\">Birthday: 10/21/2015</p>\n </div>\n </div>\n </div>\n `;\n\n modalContainer.innerHTML = html;\n body.append(modalContainer);\n\n // Click 'X' to close modal window\n const button = document.querySelector(\"button\");\n const modal = document.querySelector(\"div.modal-container\");\n button.addEventListener(\"click\", () => {\n modal.remove();\n });\n}" ]
[ "0.68122894", "0.67050624", "0.67024547", "0.66720647", "0.6560409", "0.65508664", "0.64878786", "0.64785606", "0.64720786", "0.63921726", "0.6330385", "0.6325704", "0.630869", "0.63057894", "0.62903494", "0.62740266", "0.6249398", "0.6246186", "0.6221414", "0.61940926", "0.6189546", "0.61763763", "0.6171269", "0.61666006", "0.61657405", "0.6161997", "0.61353105", "0.61339575", "0.61143273", "0.6103503", "0.60982996", "0.60912144", "0.60851204", "0.6072583", "0.60656714", "0.60442024", "0.6037061", "0.6020103", "0.5998293", "0.5997571", "0.5978398", "0.5975498", "0.59714574", "0.59594065", "0.5953224", "0.59528923", "0.5943246", "0.5942546", "0.59410053", "0.59391296", "0.59312564", "0.59286535", "0.5927654", "0.59244335", "0.5923625", "0.59180987", "0.5916223", "0.5916082", "0.5912441", "0.5900415", "0.58985674", "0.5895289", "0.58842677", "0.5883098", "0.58715236", "0.5869704", "0.5868178", "0.58661807", "0.5864711", "0.5860256", "0.58575", "0.5857056", "0.5850654", "0.5850188", "0.5849976", "0.58492106", "0.5843866", "0.5843331", "0.5828111", "0.5825304", "0.58235306", "0.5817803", "0.58154726", "0.5811555", "0.58112305", "0.58105755", "0.58104646", "0.58092135", "0.5808948", "0.5807463", "0.58041", "0.5801915", "0.5798007", "0.5796111", "0.57955164", "0.5794795", "0.5791581", "0.57886815", "0.5783603", "0.57820493" ]
0.75898516
0
Functionality that shows the modal
function showModal() { // Unhide modal overlay's display style modalOverlay.parentNode.style.visibility = "visible"; // Change the modal overlay's opacity from 0 to 1, with a 200ms fade modalOverlay.style.opacity = "1"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "show(){\n\t\tthis.modalShadow.show();\n\t\tthis.modalBody.show();\n\t}", "function show() {\n $$invalidate('modalIsVisible', modalIsVisible = true);\n }", "function modalShown(o){\n\t\t/*\n\t\tif(o.template){\n\t\t\t//show spinner dialogue\n\t\t\t//render o.template into o.target here\n\t\t}\n\t\t*/\n\t\tsaveTabindex();\n\t\ttdc.Grd.Modal.isVisible=true;\n\t}", "function showModal() {\n setVisible(true);\n setSignUp(false);\n }", "function show_modal() {\n \t$('#promoModal').modal();\n }", "function showPopupFormular() {\r\n $(\"#\" + global.Element.PopupFormular).modal(\"show\");\r\n }", "function attShowModal() {\n setShowModal(!showModal);\n }", "function openModal() { \n modal.style.display = 'block';\n }", "function showModal() {\n debug('showModal');\n if (!modal.ready) {\n initModal();\n modal.anim = true;\n currentSettings.showBackground(modal, currentSettings, endBackground);\n } else {\n modal.anim = true;\n modal.transition = true;\n currentSettings.showTransition(modal, currentSettings, function(){endHideContent();modal.anim=false;showContentOrLoading();});\n }\n }", "function show () {\n modal.style.display = \"block\";\n}", "function showModal() {\r\n\t\tdebug('showModal');\r\n\t\tif (!modal.ready) {\r\n\t\t\tinitModal();\r\n\t\t\tmodal.anim = true;\r\n\t\t\tcurrentSettings.showBackground(modal, currentSettings, endBackground);\r\n\t\t} else {\r\n\t\t\tmodal.anim = true;\r\n\t\t\tmodal.transition = true;\r\n\t\t\tcurrentSettings.showTransition(modal, currentSettings, function(){endHideContent();modal.anim=false;showContentOrLoading();});\r\n\t\t}\r\n\t}", "function showModal() {\n\t\t \tvar action = $(\"#myModal\").attr(\"action\");\n\t\t \n\t\t \tif (action == 'update' || action == 'create') {\n\t\t \t\t$(\"#myModal\").modal(\"show\");\n\t\t \t}\n\t\t \t\n\t\t \tshowContractEndDateSelect();\n\t\t \tshowHidePassword();\n\t\t \tshowHideConfirmPassword();\n\t\t }", "function openModal() {\n modal.style.display = 'block';\n }", "function openModal() {\n modal.style.display = 'block';\n }", "function openModal () {\n modal.style.display = 'block';\n }", "function openModal(){\r\n modal.style.display = 'block';\r\n }", "function showPopupElementFormular() {\r\n $(\"#\" + global.Element.PopupElementFormular).modal(\"show\");\r\n }", "function __BRE__show_modal(modal_id){$('#'+modal_id).modal('show');}", "showPanel()\n\t{\n\t\tthis.modalPanel.show();\n\t}", "function showModal() {\n $(\"#exampleModal\").modal();\n }", "function openModal(){\n modal.style.display = 'block';\n }", "function openModal(e) {\n\tmodal.style.display = 'block'\n}", "function openModal() {\r\n\t\t\tdocument.getElementById('myModal').style.display = \"block\";\r\n\t\t}", "function modalWindow() {\n $(\"#modal\").css('display', 'block');\n }", "function openModal() {\nelModal.style.display = 'block';\n}", "function displayModal() {\n\t\t\t\t$(\"#user-name\").text(newPerson.name);\n\t\t\t\t$(\"#match-name\").text(matchName);\n\t\t\t\t$(\"#match-img\").attr(\"src\", matchImage);\n\t\t\t\t$(\"#myModal\").modal();\n\t\t\t}", "function AbrirModalnuevo(){\n $(\"#nuevo\").modal('show');\n}", "function openModal(){\r\n modal.style.display = 'block';\r\n}", "function modalCheque()\n{\n $('#agregar_cheque').modal('show');\n}", "handleShowModal() {\n this.showSpinner = true;\n this.template.querySelector(\"c-modal-component-template\").show();\n }", "openModal(){\n\n }", "show () {\n super.show();\n this.el.querySelector('.modal-confirm').focus();\n }", "function openModal() {\n getRecipeDetails();\n handleShow();\n }", "function openModal(){\r\n modal.style.display = 'block';\r\n}", "function modalOpen() {\n modal.style.display = 'block';\n}", "function showModal() {\n $('#modal-container').show(\"fold\", 1000);\n}", "function launchModal(){\n modal.style.display = \"block\";\n}", "function runModal() {\r\n $(\"#myModal\").modal(\"show\");\r\n }", "function mostrarModal () {\n modalContacto.style.display = \"block\";\n }", "function openModal () {\n modal.style.display = 'block'\n}", "openAddModal(){\n document.getElementById(\"add_modal\").style.display = \"block\";\n }", "async show() {\n return this._showModal();\n }", "showModal() {\n $('.modal').modal('show');\n }", "function openModal() {\r\n modal.style.display = 'block';\r\n}", "function show() {\n loadingModal.show();\n }", "function openModal(){\n\t\n\tmodal.style.display = 'block';\n\t\n}", "function openModal() {\n modal.style.display = 'block';\n}", "function openModal() {\n modal.style.display = 'block';\n}", "function openModal() {\n modal.style.display = 'block';\n}", "function openModal() {\n modal.style.display = 'block';\n}", "function openModal() {\n modal.style.display = 'block';\n}", "showModal(){\n if(document.getElementById('modal')){\n // console.log('found modal');\n document.getElementById('modal').style.display = 'block';\n document.getElementById('caption').style.display = 'block';\n document.getElementById('modal').style.zIndex = 10;\n }\n \n }", "function openModal() {\n modal.style.display = \"block\";\n}", "function openModal() {\r\n modal.style.display = \"block\";\r\n}", "function shown_bs_modal( /*event*/ ) {\n //Focus on focus-element\n var $focusElement = $(this).find('.init_focus').last();\n if ($focusElement.length){\n document.activeElement.blur();\n $focusElement.focus();\n }\n }", "function openModal() {\r\n\tmodal.style.display = 'block';\r\n}", "function openModal(){\n modal.style.display = 'block';\n}", "function openModal() {\n modal.fadeIn();\n}", "openModal() { \n this.bShowModal = true;\n }", "function openModal(myModal) {\n myModal.style.display = \"block\";\n }", "function openModal () {\n //chnge the display value to block\n modal.style.display = 'block';\n}", "function ouvrir() {\n creationModal();\n }", "function openModal() {\n modal.style.display = 'block';\n}", "function openModal() {\n modal.style.display = 'block';\n}", "function openModal(){\n modal.style.display = 'block'; \n}", "function showModal() {\n\tvar btnShowModal = $('.button-show-modal');\n\tif (btnShowModal.length > 0) {\n\t\tbtnShowModal.bind('click', function(e) {\n\t\t\te.preventDefault();\n\t\t\tvar modalTarget = $(this).data('target-modal');\n\t\t\tvar package = $(this).data('option');\n\n\t\t\tif (modalTarget.length > 0) {\n\t\t\t\t$(modalTarget).addClass('show');\n\n\t\t\t\tif ($(modalTarget).hasClass('show')) {\n\t\t\t\t\tchangeValueOptionInForm(package);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}", "function openModal() {\n document.getElementById(\"myModal\").style.display = \"block\";\n }", "function openMoadal(e){\n console.log(e);\n modal.style.display = 'block';\n \n}", "function openModal(){\n modal.style.display = 'block';\n}", "function openModal() {\n modal.style.display = \"block\";\n}", "function openModalEdit() {\n modalEdit.style.display = \"block\"\n }", "function openModal() {\r\n // console.log(142);\r\n modal.style.display = 'block';\r\n}", "function roller(){\n var modal = document.getElementById('roller');\n\n modal.style.display = 'block';\n}", "function showModal()\n{\n\tdocument.getElementById('modal-backdrop').classList.toggle('hidden');\n\tif(document.getElementById('leave-comment-modal')) {\n\t\tdocument.getElementById('leave-comment-modal').classList.toggle('hidden');\n\t}\n\tif(document.getElementById('create-location-modal')) {\n\t\tdocument.getElementById('create-location-modal').classList.toggle('hidden');\n\t}\n}", "showModal() {\n this.isModalOpen = true;\n }", "function setModal() {\n $('.overlay').fadeIn('slow');\n $('.modal').slideDown('slow');\n }", "function openModal(modal) {\n \n modal[0].style.display = \"block\";\n}", "function abc() {\n console.log(\"abc exec\")\n modal.style.display = \"block\";\n}", "function openModal() {\n document.getElementById('myModal').style.display = \"block\";\n }", "function show_modal() \n{\n $('#myModal').modal();\n}", "displayModal() {\n $(\"#modal-sliding\").openModal();\n }", "function showModal(){\r\n let modal=document.getElementsByClassName(\"modal\")[0];\r\n modal.style.display = \"block\";\r\n }", "function showItemAdditionScreen(){\n $('#itemAdditionScreen').modal('show');\n}", "function onShowBsModal() {\n isModalInTransitionToShow = true;\n isModalVisible = true;\n }", "function showModal(){\n\t\t$('.js_newPortal').on('click', function(){\n\t\t\t$('.modal.modal__addNewPortal').addClass('modalOpen');\n\t\t});\n\t}", "function display_modal() {\n document.getElementById('welcome_modal').style.display = \"block\";\n}", "function start() {\n $('#myModal').modal('show');\n }", "modalShow() {\n\t\tlet modal = document.getElementById(\"myModal\");\n\t\tlet restartBtn = document.getElementsByClassName(\"close\")[0];\n\n\t\tthis.scene.pause(); // pause timer & game When colliding with a bomb\n\t\tmodal.style.display = \"block\"; // show modal\n\n\t\trestartBtn.addEventListener(\"click\", (e) => {\n\t\t\te.preventDefault();\n\t\t\tmodal.style.display = \"none\"; // hide modal on clicking 'RESTART' button\n\n\t\t\t// restart after clicking 'restart' - clear all events & set game in initial point\n\t\t\tthis.restartGame();\n\t\t});\n\t}", "function showModal() {\n\t\ttimer.className = 'modalTimer' ;\n\t\tmodal.className = 'modal-visible' ;\n\t}", "function showModal() {\n props.setGlobalState({\n modal:\n {\n show: true,\n contents:\n <Box variant='tutorialModal' width=\"100%\" className=\"modal-content\">\n <Text variant='modalText'>{props.tutorialText}</Text>\n </Box>\n }\n })\n }", "#showAdditionalInfoModal() {\n $('.additionalInfo.modal').modal('setting', 'transition', 'fade up')\n .modal('show');\n }", "function showMessage() {\n modal.style.display = \"block\";\n }", "open() {\n this.modal.jQueryModalFade.addClass('modal_fade_trick');\n this.modal.jQueryModalWindow.css('display', 'block');\n this.jQueryName.focus();\n }", "function openModal(){\n var modal = document.getElementById('thanksModal');\n modal.style.display = \"flex\";\n function fadeIn() {\n modal.style.opacity = \"1\";\n }\n setTimeout(fadeIn, 125);\n }", "function show_addprogram() {\n $('#addprogram').modal('show')\n}", "function orderCancleButtonClick() {\n $('#orderCancleModal').modal('show');\n}", "function nuvoInscPreli(){ \n $(\".modal-title\").html(\"Nueva incripción\"); \n $('#formIncPreliminar').modal('show');\n}", "function openModal3() {\n modal3.style.display = 'block';\n }", "function openModal3() {\n modal3.style.display = 'block';\n }", "function openModal() {\n modal3.style.display = 'block'; \n}", "function openModal () {\n setVisablity(true)\n }" ]
[ "0.8209411", "0.8041627", "0.79360896", "0.7926383", "0.78889936", "0.78629327", "0.78408813", "0.7840299", "0.78308916", "0.7819795", "0.78188664", "0.7808793", "0.7794308", "0.7794308", "0.77550703", "0.77547204", "0.7741876", "0.77219975", "0.76551217", "0.76531994", "0.7633178", "0.7621518", "0.761989", "0.7616706", "0.7616424", "0.76111394", "0.7572185", "0.7569239", "0.7562522", "0.7560904", "0.7554217", "0.7547672", "0.7535667", "0.7524544", "0.7522708", "0.75080013", "0.7504778", "0.75027823", "0.74995846", "0.74956965", "0.7492987", "0.74879616", "0.7486577", "0.748605", "0.74858505", "0.7468065", "0.7467842", "0.7467842", "0.7467842", "0.7467842", "0.7467842", "0.7462919", "0.74582994", "0.7457843", "0.7452228", "0.74336076", "0.74298865", "0.7421736", "0.74095786", "0.74095213", "0.74073327", "0.7399886", "0.73984", "0.73984", "0.73958665", "0.7395171", "0.7388407", "0.7384192", "0.73808485", "0.73754174", "0.7375144", "0.7364174", "0.73622155", "0.73619074", "0.736033", "0.7353449", "0.7351503", "0.7340937", "0.7336452", "0.73307645", "0.73259443", "0.7325738", "0.73222566", "0.7307979", "0.7302951", "0.7292411", "0.7281701", "0.72802377", "0.7277", "0.7274551", "0.72684574", "0.7252665", "0.72477466", "0.72444093", "0.72416985", "0.7235575", "0.7234147", "0.72311234", "0.72311234", "0.72261477", "0.72254163" ]
0.0
-1
Functionality that closes the selected modal
function closeModal() { // Change the modal overlay's opacity from 1 to 0, with a 200ms fade modalOverlay.style.opacity = "0"; // Use a timeout to change the 'visibility' after the 200ms. Also: delete its contents. setTimeout(function() { modalOverlay.parentNode.style.visibility = "hidden"; removeModalContent(); }, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "closeModal() {\n this.close();\n }", "closeModal() {\n this.closeModal();\n }", "closemodal() {\n this.modalCtr.dismiss(this.items);\n }", "function closeModal() {\n if (modalController) {\n modalController.close();\n }\n }", "function closeModal() {\n if (modalController) {\n modalController.close();\n }\n }", "function close() {\n $modalInstance.dismiss();\n }", "closemodal() {\n this.modalCtr.dismiss();\n }", "close() {\n this.modal.dismiss();\n }", "'click .close' (event) {\n console.log(\"MODAL CLOSED VIA X\");\n modal.hide();\n }", "function closeModal()\r\n {\r\n windows.close($('#modalContainer .window').attr('id'));\r\n }", "function closeModal(){\n modal.style.display = \"none\";\n resetModal();\n customSelected = 0;\n window.location.hash= 'top';\n}", "function closeModalDialog () {\n mainView.send('close-modal-dialog');\n}", "function closeModal(){\n\t$(\"#myModal\").hide();\n\tcurrPokeID = null;\n}", "function closeModal() {\n modal.style.display = 'none';\n }", "function closeModal() {\n modal.style.display = 'none';\n }", "function closeModal() {\n modal.style.display = 'none';\n }", "function closeModal () {\n modal.style.display = 'none';\n }", "closeInteliUiModal() {\n $(this.target.boxContainer).parents().find('.modal-content').find('#btnClose').click();\n }", "function closeModal(modal) {\n modal.modal('hide');\n}", "handleModalClose() {}", "function closeModal(){\r\n modal.style.display = 'none';\r\n }", "function closeModal(modal) {\n \n modal[0].style.display = \"none\";\n}", "function closeModal(modal) {\n\tmodal.style.display = \"none\";\n}", "function close() {\n $uibModalInstance.dismiss('exit');\n }", "function close() {\n $uibModalInstance.dismiss('exit');\n }", "function close() {\n $uibModalInstance.dismiss('exit');\n }", "function closeModal() {\r\n // console.log(142);\r\n modal.style.display = 'none';\r\n}", "handleCloseClick()\n {\n invokeCloseModal() \n this.close()\n }", "function closeModal(){\n modal.style.display = 'none';\n }", "function handleClose() {\n setOpenModalId(0);\n }", "function onCancelButtonClick() {\n modal.close();\n }", "function onCancelButtonClick() {\n modal.close();\n }", "function closeDefaultModal() {\n default_modal.close();\n }", "function closeModal() {\n const modal = $(\"#ytbsp-modal\");\n if (0 !== modal.length) {\n modal.css(\"display\", \"none\");\n modal.css(\"opacity\", \"0\");\n }\n}", "close() {\n const modals = Array.from(document.querySelectorAll(\".modal\"));\n document.body.classList.remove(\"no-overflow\");\n\n this._element.classList.remove(\"active\");\n modals.forEach((modalNode) => {\n modalNode.classList.remove(\"modal-active\");\n });\n }", "function closeModal() {\n clearForm();\n props.onChangeModalState();\n }", "closeModal() {\n this.uploadFileModal = false;\n this.closedModel = false;\n this.reNameModel = false;\n this.deleteModel = false;\n }", "function closeModal() {\n /* Get all modals */\n const modals = document.querySelectorAll(\".modal-bg\");\n\n /* Check if modal is active and deactivate it */\n for (let modal of modals) {\n if (modal.style.display === \"flex\") {\n modal.style.display = \"none\";\n resetFirstFormAfterHTMLTag(modal);\n }\n }\n resetTags();\n}", "function modelClose() {\n $( \".btn-close\" ).click(function() {\n $('#disclaimerModal').hide();\n $('body').removeClass('modal-open');\n });\n}", "function modalClose() {\t\t\n\t\tif($('mb_Title')) $('mb_Title').remove();\n\t\tif($('mb_Error')) $('mb_Error').remove();\n\t\tif($('mb_header')) $('mb_header').removeClass('yt-Panel-Primary');\n\n\t\t$('mb_center').style.display = 'none';\n\t\t\n\t\t$('mb_contents').getChildren()[0].remove();\n\t\t$('mb_overlay').setStyle('opacity',0);\n\t\t$('mb_frame').setStyle('opacity',0);\n\t\twindow.location.reload(true); \n}", "function closeModal() {\n\tmodal.style.display = 'none'\n}", "closeContactModal() {\n //get element references\n const modal = document.getElementById(\"contact-success-modal\");\n const modalOverlay = document.getElementById(\"contact-modal-overlay\");\n \n //Fade out the modal\n this.fadeOutModal(modal, modalOverlay);\n }", "function closeModal() {\n\t\n\tmodal.style.display = 'none';\n}", "function closeModal() {\n modal.style.display = 'none';\n}", "function closeModal() {\n modal.style.display = 'none';\n}", "function closeModal() {\n modal.style.display = 'none';\n}", "function closeModal() {\n modal.style.display = 'none';\n}", "function closeModal() {\n \tMODAL.style.display = 'none';\n \tRESET();\n }", "closeModal(){\n this.showModal = false\n }", "function closeModal () {\n modal.style.display = 'none'\n}", "function closeModal(){\r\n modal.style.display = 'none';\r\n}", "function closeMe() {\n\t\t $('#' + settings.id).modal('hide');\n\t\t if (settings.isSubModal)\n\t\t $('body').addClass('modal-open');\n\t\t }", "function closeModal() {\n modal.style.display = \"none\";\n}", "function closeModal() {\n modal.style.display = \"none\";\n}", "function closeModal() {\r\n modal.style.display = 'none';\r\n}", "function closeModal() {\n modal3.style.display = 'none';\n}", "function closeModal() {\n\t$('.modal').css(\"display\", \"none\")\n\tconsole.log(\"Closed\")\n}", "function closePopup() {\n $modalInstance.dismiss();\n }", "close(element) {\n const currentModal = this.elements.body.querySelector(this.state.modal);\n\n if (currentModal.classList.contains('is-active')) {\n currentModal.classList.remove('is-active');\n this.elements.body.style.overflow = 'visible';\n }\n }", "function closeCreatePollModal() {\n \n var backdropElem = document.getElementById('modal-backdrop');\n var createPollElem = document.getElementById('create-poll-modal');\n\n // Hide the modal and its backdrop.\n backdropElem.classList.add('hidden');\n createPollElem.classList.add('hidden');\n \n //clearInputValues();\n}", "close() {\n \n // The close function will hide the modal...\n this.visible = false;\n\n // ...and dispatch an event on the modal that the view model can listen for.\n this.el.dispatchEvent(\n new CustomEvent('closed', { bubbles: true })\n );\n }", "function closeModal(){\n modal.style.display = 'none';\n}", "function closeModal(){\n modal.style.display = 'none';\n}", "function closeModal(){\n modal.style.display = 'none';\n}", "close() {\n this.closeButton.on('click', null);\n this.modal(false);\n this.window.remove();\n }", "function closeModal3(){\n modal3.style.display = 'none';\n}", "function closeModal() {\n modal.style.display = 'none';\n}", "function closeModal() {\n modal.style.display = 'none';\n}", "function closeModal () {\n //chnge the display value to none\n modal.style.display = 'none';\n}", "function closeModal() {\r\n modal.style.display = \"none\";\r\n}", "closeModal() {\n this.modalRef.current.closeModal();\n }", "function modalClose() {\n if (document.body.classList.contains('modal-open')) {\n document.body.classList.remove('modal-open')\n return\n }else {\n return\n }\n }", "function closeModal() {\n $scope.oModal.hide();\n vm.directionsDisplay.setDirections({\n routes: []\n });\n }", "function closeModal () {\n modal.style.display = 'none'\n modal.setAttribute('aria-hidden', 'true')\n wrapper[0].setAttribute('aria-hidden', 'false')\n cleanform()\n}", "function closeModal() {\n if(clickOut == false){\n return\n }\n $('.text_box').css('font-size','25px')\n $('.modal').css('display','none')\n $('.text_box').toggleClass('result')\n $('.text_box').empty()\n clickCounter++\n if(clickCounter == 25){\n endStage()\n }\n clickOut = false\n }", "function closeModal() {\n modal.style.display = 'none';\n document.getElementById('play-modal').style.display = 'none';\n document.getElementById('edit-modal').style.display = 'none';\n document.getElementById('delete-modal').style.display = 'none';\n}", "function closeModal(e) {\n e.target.classList.remove(\"active\");\n}", "function closeModal() {\n modal.style.display = \"none\";\n}", "function closeModal() {\n modal.style.display = \"none\";\n}", "function closeModal() {\n modal.style.display = \"none\";\n}", "function closeModal(){\n contentBox=document.getElementsByClassName('modal')[clickTarget];\n contentBox.style.display='none';\n\n}", "function closeModal(){\r\n $('.close').click(function(){\r\n $('.item-details1, .item-details2, .item-details3').empty();\r\n $('.dark-background').fadeOut();\r\n })\r\n }", "function closeModal() {\n MODAL.removeAttribute(\"open\");\n resetGame();\n}", "function closeModal(){\n modal.style.display = 'none'; \n}", "function closeModal(modalID) {\n\t$(\"#\"+modalID).modal ('hide'); \n}", "function closeModal(){\n modal.style.display = 'none';\n}", "function closeModal3() {\n modal3.style.display = 'none';\n }", "function closeModal3() {\n modal3.style.display = 'none';\n }", "onSubmit() {\n this.activeModal.close(1);\n }", "function closeModal(evt) {\n const el = evt.target;\n\n if (el.classList.contains('modal')) {\n el.classList.remove(SELECTORS.modalOpen);\n Analytics.updateStatWeightings(pullWeights(el));\n if (Analytics.isReady()) TeamCtrl.runHeadToHead();\n }\n}", "function closeOptionModal() {\r\n document.getElementById('option-modal').style.display = \"none\"\r\n}", "function closeOptionModal() {\r\n document.getElementById('option-modal').style.display = \"none\"\r\n}", "function closeTheModal(e){\r\n\r\n if(document.querySelector(\".modal\")){\r\n document.querySelector(\".modal\").remove();\r\n}\r\n}", "handleClick() {\n this.closeModal();\n }", "handleCloseModal(){\n this.bShowModal = false;\n }", "function closeOptionModal() {\n document.getElementById('option-modal').style.display = \"none\"\n}", "function closeOptionModal() {\n document.getElementById(\"option-modal\").style.display = \"none\";\n}", "function closeModal(){\n modal.style.display = \"none\";\n}", "function closeModal(){\n modal.style.display = \"none\";\n}", "closeModal() {\n removeClass(document.documentElement, MODAL_OPEN);\n hide(this.modal);\n\n if (this.videoWrapper) {\n const wrapperId = this.videoWrapper.getAttribute('id');\n if (window[wrapperId].pause) {\n window[wrapperId].pause();\n } else if (window[wrapperId].pauseVideo) {\n window[wrapperId].pauseVideo();\n }\n }\n\n const overlay = document.querySelector('.modal-overlay');\n if (overlay !== null) { document.body.removeChild(overlay); }\n }", "function closeImageModal() {\n image_modal.close();\n }" ]
[ "0.82950926", "0.81940645", "0.81274265", "0.8096225", "0.80855566", "0.80139875", "0.79280305", "0.78620106", "0.7856269", "0.78257746", "0.7810536", "0.78028226", "0.7780857", "0.7767234", "0.7767234", "0.7767234", "0.77576745", "0.7750627", "0.7739232", "0.7709592", "0.76755667", "0.76645565", "0.7661547", "0.76285905", "0.76285905", "0.76285905", "0.76228076", "0.76220286", "0.76149505", "0.76145566", "0.75902027", "0.75902027", "0.75694424", "0.7562675", "0.7555801", "0.75537133", "0.7549839", "0.75372046", "0.7536215", "0.7534206", "0.75303966", "0.75295347", "0.752208", "0.7509317", "0.7509317", "0.7509317", "0.7509317", "0.75047094", "0.7502233", "0.75006485", "0.7490908", "0.7489463", "0.7475172", "0.7475172", "0.7453294", "0.7450448", "0.7443335", "0.7440809", "0.7434485", "0.7430377", "0.7427361", "0.7425699", "0.7425699", "0.7425699", "0.7422331", "0.74216914", "0.74212956", "0.74212956", "0.74157184", "0.7414087", "0.7411962", "0.7408363", "0.74044466", "0.7403443", "0.739636", "0.73958945", "0.7395003", "0.7379705", "0.7379705", "0.7379705", "0.73794836", "0.7373173", "0.7368032", "0.7366063", "0.7363758", "0.73632133", "0.7362434", "0.7362434", "0.73606133", "0.73581123", "0.7357185", "0.7357185", "0.7351752", "0.7350297", "0.73496675", "0.73441046", "0.73437023", "0.7342693", "0.7342693", "0.73414487", "0.73394436" ]
0.0
-1
throughout the SPA call actions for asynchronous operations (see actions call mutations call getters call state.
updateUser({ commit }, userID) { commit("updateUser", userID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getActions(a, p, o) {\n return eos.getActions(a, p, o)\n .then(response => procResponse(response, a)) \n .catch(error => console.error(error));\n}", "async asyncActions({dispatch, commit}, actions){\n for(var index in actions)\n await dispatch(actions[index])\n }", "async function executeAction(event) {}", "@action\n\tfetchEvents() {\n\t\tthis.events = [];\n\t\tthis.state = 'pending';\n\n\t\taxios\n\t\t\t.get('/api/events')\n\t\t\t.then((res) => {\n\t\t\t\tconst events = res.data;\n\t\t\t\trunInAction(() => {\n\t\t\t\t\tthis.events = events;\n\t\t\t\t\tthis.state = 'done';\n\t\t\t\t});\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\trunInAction(() => {\n\t\t\t\t\tthis.events = [];\n\t\t\t\t\tthis.state = 'error';\n\t\t\t\t});\n\t\t\t});\n\t}", "syncDataLoading() {\n this.props.actions.getConfig();\n this.props.actions.getColorSwatch();\n this.props.actions.getPaymentOnline();\n this.props.actions.getShippingOnline();\n this.props.actions.getCategory();\n this.props.actions.getListOrderStatuses();\n // this.props.actions.getTaxRate();\n // this.props.actions.getTaxRule();\n }", "static actionPromise(view, method, args) {\n view[method](...args);\n return view.renderer.updatePromise();\n }", "static actionPromises(view, method, args, count) {\n const promise = new Promise((resolve) => {\n const fc = (count) => {\n if (count > 0) {\n SuiActionPlayback.actionPromise(view, method, args).then(() => {\n fc(count - 1);\n });\n } else {\n resolve();\n }\n };\n fc(count);\n });\n return promise;\n }", "onGetAll() {\n console.log('getAll action triggered')\n }", "handleActions(action) {\n // it is check by a switch and will have a type that id it\n switch(action.type) {\n // call a function\n case 'GET_ALL': {\n this.getAll();\n }\n }\n }", "function uploadActions() {\n const transaction = db.transaction(['offline_actions'], 'readwrite');\n const actionsObjectStore = transaction.objectStore('offline_actions');\n\n //get all records from store and set to a variable\n const getAll = actionsObjectStore.getAll();\n\n //upon a successful .getAll() execution, run this function\n getAll.onsuccess = function() {\n //if there was data in indexedDB's store, use the bulk upload route to send it all to the server\n if (getAll.result.length > 0) {\n fetch('/api/transaction/bulk', {\n method: 'POST',\n body: JSON.stringify(getAll.result),\n headers: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': 'application/json'\n }\n })\n .then(response => response.json())\n .then(serverResponse => {\n if (serverResponse.message) {\n throw new Error(serverResponse);\n }\n //open a connection to the db, access the object store, and then clear out any\n //data in the IndexedDB since those pending transactions have just been uploaded\n const transaction = db.transaction(['offline_actions'], 'readwrite');\n const actionsObjectStore = transaction.objectStore('offline_actions');\n actionsObjectStore.clear();\n\n alert('All saved transactions have been submitted!');\n })\n .catch(err => {\n console.log(err);\n });\n }\n };\n}", "async applyAction(action){\n this._dispatchAction(action) \n }", "async function syncPipeline() {\n await generateAllowance();\n // await confirmPendingBookings();\n // the server-side script does this now\n await updateContactList();\n await updateTourList();\n}", "async method(){}", "async function translate () {\n setTranslationState({ ...translationState, actionInvokeInProgress: true, translationResult: 'calling action ... ' })\n const params = { 'q': translationState.actionParams, source: translationState.sourceLanguage, target: translationState.targetLanguage || {} }\n const startTime = Date.now()\n try {\n // Invokes backend action\n const actionResponse = await actionWebInvoke(actions['translate'], null, params)\n // Stores the response\n setTranslationState({\n ...translationState,\n translationResult:actionResponse,\n actionInvokeInProgress: false\n })\n } catch (e) {\n // Logs and stores any error message to be displayed in the form\n const formattedResult = `time: ${Date.now() - startTime} ms\\n` + e.message\n console.error(e)\n setTranslationState({\n ...translationState,\n translationResult:formattedResult,\n actionInvokeInProgress: false\n })\n }\n }", "async execute(){\n\t\tawait this.processRequest();\n\t\tawait this.formatRequest();\n\t\tawait this.processData();\n\t\tawait this.formatResponse();\n\t\tawait this.processResponse();\n\t}", "doSyncAction(context) { // << No payload\n // Dispatched from: CurrentMonth.vue\n // - This Action (HERE IN /STORE/INDEX.JS) should:\n // A) Brute Force / Much Easier / Good Enough\n // - 1) send GET to '/events'\n // - 2) receive back all the OnServer Events\n // - 3) pretty much replace the Vuex Store State for Events, oui?\n return new Promise((resolve, reject) => {\n Axios.get('/events')\n .then((response) => {\n\n console.log('doSyncAction response.status: ', response.status) // 200\n console.log('doSyncAction response: ', response) // response.data: [] Array of {}. wr__date is just a String, pretty sure.\n\n if(response.status === 200) {\n console.log('doSyncAction response.data: ', response.data)\n\n // We have wr__dates that are just Strings.\n // Need to \"Momentize()\" (like we do in WEB.ENTRY.JS and NODE.ENTRY.JS and /STORE.INDEX.JS)\n // https://www.udemy.com/vuejs-2-essentials/learn/v4/questions/2304096\n let allEventsFromServerAsMomentObjects = []\n allEventsFromServerAsMomentObjects = response.data.map(function(eachEvent) {\n return {\n description: eachEvent.description,\n wr__date: moment(eachEvent.wr__date)\n }\n })\n\n // https://alligator.io/vuejs/rest-api-axios/\n context.commit('doSyncMutation', allEventsFromServerAsMomentObjects) // >> Nope >> response.data)\n resolve()\n } else {\n reject()\n }\n })\n }) // /Promise\n }", "dispatchAsync() {\r\n this._dispatch(true, this, arguments);\r\n }", "async function callClient(){\r\n console.log(\"Waiting for the project....\");\r\n let firstStep = await willGetProject();\r\n let secondStep = await showOff(firstStep);\r\n let lastStep = await willWork(secondStep);\r\n console.log(\"Completed and deployed in seatle\");\r\n}", "async function updateActions() {\n // Let's go ahead and fade out our content and display our loader\n // while the new data is being loaded.\n hidePanel(panel.elements.content, panel.elements.loader, async function() {\n // Update our panel data to reflect the newest instance.\n panel.data = await grabData($(this).closest(\"tr\").data(\"pk\"));\n // Once the panel data is updated, we can re-run our actions\n // setup function to change the enabled/disabled actions.\n setupActionsOptions();\n\n // Display the panel now that new data is setup and available.\n // Actions have now been setup based on instance selected.\n showPanel(panel.elements.content, panel.elements.loader);\n });\n }", "process({ getState, action }) {\n return api.fetchSpendings()\n \n }", "async fromRNARequestOtherAPIs(dispatch, id) {\n if (getters.siretFromRNA()) {\n await store.dispatch('executeSearchBySiret', { siret: getters.siretFromRNA(), api: 'SIRENE' })\n } else {\n await store.dispatch('executeSearchByIdAssociation', { id: id, api: 'SIRENE' })\n }\n }", "async function loadData() {\n await store.dispatch(getSettings());\n await store.dispatch(getAccounts());\n await store.dispatch(getTransactions());\n await store.dispatch(getSubscriptions());\n await store.dispatch(setDataIsLoaded());\n}", "@api invoke() {\n console.log(\"Hi, I'm an action. INVOKE HEADLESS\");\n let event = new ShowToastEvent({\n title: 'I am a headless action!',\n message: 'Hi there! Starting...',\n });\n this.dispatchEvent(event);\n // this[NavigationMixin.Navigate]({\n // type: 'standard__objectPage',\n // attributes: {\n // objectApiName: 'Contact',\n // actionName: 'home',\n // },\n // });\n }", "function actionFetchStocksAsync() {\n //return a function to Thunk to call Async.ly\n return (dispatch) => {\n //set flag that we started fetching\n dispatch(actionFetchStocks());\n\n //actual fetch of the data from server\n fetch('http://localhost:3680/stocks')\n .then(result => result.json())\n .then(stocks => {\n //update the stocks into Redux State\n dispatch(actionUpdateStocks(stocks));\n\n //clear fetching flag\n dispatch(actionCancelFetchStocks());\n })\n .catch(error => {\n //handle error properly\n console.log(error.message);\n //clear fetching flag\n dispatch(actionCancelFetchStocks());\n });\n }\n}", "async index () {\n return await Operator.all()\n }", "flowStepSuccessDoStuff(job, flowStep){\n this.controller.set('performingManualAction', true);\n // If save param is true, save job first\n if (flowStep.params.save === true) {\n this.store.save('job', job).then(\n () => {\n this.store.find('process', job.id, {status: 'success', step: flowStep.step}).then(\n () => {\n this.refresh(job.id); // Refresh children of current model\n },\n (errorObject) => {\n this.controller.set('performingManualAction', false);\n this.controller.set('error', errorObject.error);\n }\n );\n },\n (errorObject) => {\n this.controller.set('performingManualAction', false);\n this.controller.set('error', errorObject.error);\n }\n );\n } else {\n this.store.find('process', job.id, {status: 'success', step: flowStep.step}).then(\n () => {\n this.refresh(job.id); // Refresh children of current model\n },\n (errorObject) => {\n this.controller.set('performingManualAction', false);\n this.controller.set('error', errorObject.error);\n }\n );\n }\n }", "componentDidMount() {\n this.props.fetchSummaryAction();\n this.props.fetchSurveyListAction();\n }", "dispatchAsync() {\r\n this._dispatchAsPromise(true, this, arguments);\r\n }", "function APICall() {\n if (isCreate) {\n return context.actions.createCourse(\n title,\n description,\n estimatedTime,\n materialsNeeded\n );\n } else {\n return context.actions.updateCourse(\n course.id,\n title,\n description,\n estimatedTime,\n materialsNeeded\n );\n }\n }", "async function exposeFunctions() {\n if( !menuPage || menuPage.isClosed() ) return ERROR_MESSAGES.menuPageClosed;\n await menuPage.exposeFunction( \"guystationPerform\", (path, body) => {\n switch(path) {\n case \"/screencast/mouse\":\n performScreencastMouse( body.xPercent, body.yPercent, body.button, body.down, parseInt(body.counter), parseInt(body.timestamp) );\n break;\n case \"/screencast/buttons\":\n performScreencastButtons( body.buttons, body.down, parseInt(body.counter), parseInt(body.timestamp) );\n break;\n case \"/screencast/gamepad\":\n performScreencastGamepad( body.event, body.id, parseInt(body.controllerNum), parseInt(body.counter), parseInt(body.timestamp) );\n break;\n break;\n }\n } );\n}", "fetchProjects() {\n actions.fetchProjects();\n }", "executeInstance() {\n let data = this.getValidData();\n if(!data) {\n // the code line below is needed for tests.\n current_view.setLoadingError({});\n return;\n }\n let instance = this.data.instance;\n let method = this.view.schema.query_type;\n instance.queryset.formQueryAndSend(method, data).then(response => {\n guiPopUp.success(pop_up_msg.instance.success.execute.format(\n [this.view.schema.name, instance.name.toLowerCase()]\n ));\n this.deleteQuerySetFromSandBox(this.qs_url);\n let data = response.data;\n let url = this.getRedirectUrl({data: data, response: response});\n this.$router.push({path: url});\n }).catch(error => {\n let str = app.error_handler.errorToString(error);\n\n let srt_to_show = pop_up_msg.instance.error.execute.format(\n [this.view.schema.name, instance.name.toLowerCase(), str],\n );\n\n app.error_handler.showError(srt_to_show, str);\n\n // the code line below is needed for tests.\n current_view.setLoadingError({});\n });\n }", "toggleCompleteAll () {\n dispatcher.dispatch({\n actionType: constants.TOGGLE_COMPLETE_ALL\n })\n }", "getUser(state, action){}", "action() {}", "execute() {\n this._setActiveRequests(this.activeRequests + 1);\n\n let params = !this.params || typeof this.params === 'object' ? this.params : JSON.parse(this.params);\n\n let { input } = this;\n\n let { op } = this;\n\n // the goal is to track if we have a bulk action in select all mode (to be used for the abort method)\n let isBulk = false;\n\n if (this._isPageProvider(input) || this._isView(input)) {\n let pageProvider;\n // support page provider as input to operations\n // relies on parameters naming convention until provider marshaller is available\n if (this._isPageProvider(input)) {\n pageProvider = input;\n input = undefined;\n } else if (this._isSelectAllActive(input)) {\n // in select all mode, we use `Bulk.RunAction` as the operation and `this.op` as a parameter for it\n op = 'Bulk.RunAction';\n // support page provider display behavior instances (table, grid, list) as input to operations for select all\n pageProvider = input.nxProvider;\n params = {\n action: 'automationUi',\n providerName: pageProvider.provider,\n excludeDocs: input._excludedItems,\n parameters: JSON.stringify({\n operationId: this.op,\n parameters: params,\n }),\n };\n isBulk = true;\n input = undefined;\n } else {\n // only a few selected documents should be considered for the operation\n pageProvider = input.nxProvider;\n input = input.selectedItems;\n }\n\n params.providerName = pageProvider.provider;\n Object.assign(params, pageProvider._params);\n // ELEMENTS-1318 - commas would need to be escaped, as queryParams are mapped to stringlists by the server\n // But passing queryParams as an array will map directly to the server stringlist\n if (params.queryParams && !Array.isArray(params.queryParams)) {\n params.queryParams = [params.queryParams];\n } else if (!params.queryParams) {\n params.queryParams = [];\n }\n }\n\n const options = {};\n // Look up document schemas to be returned\n if (this.schemas && this.schemas.length > 1) {\n options.schemas = this.schemas.trim().split(/[\\s,]+/);\n }\n options.headers = this.headers || {};\n // Force sync indexing\n if (this.syncIndexing) {\n options.headers['nx-es-sync'] = true;\n }\n // Look up content enrichers parameter\n if (this.enrichers) {\n let enrich = {};\n if (typeof this.enrichers === 'string') {\n enrich[this.enrichersEntity] = this.enrichers;\n } else {\n enrich = this.enrichers;\n }\n Object.entries(enrich).forEach(([type, value]) => {\n let v = value;\n if (Array.isArray(value)) {\n v = value.join(',');\n }\n options.headers[`enrichers-${type}`] = v;\n });\n }\n\n // Manage the way to abort the request\n if (!this.uncancelable) {\n if (this._controller) {\n this._controller.abort();\n }\n\n // For the next request\n this._controller = new AbortController();\n options.signal = this._controller.signal;\n }\n\n return this.$.nx.operation(op).then((operation) => {\n this._operation = operation;\n return this._doExecute(input, params, options, isBulk);\n });\n }", "async function asyncCall() {\n result = await resolveAfter2Seconds();\n result.forEach((indItem) =>\n printItem(\n indItem.title,\n indItem.tkt,\n indItem.desc,\n indItem.urg,\n indItem.store,\n indItem.owner,\n indItem.date\n )\n );\n }", "function callTourGeneration(){\n\t\tdisableButtons();\n\t\tclearAll();\n\n\t\tvar parameters = Parameters.getAllParameters();\n\t\tvar callUri = Parameters.getUrlForTourGenerationRequest(serverUri, parameters);\n\t\t$.get(callUri, handleTourResult)\n\t\t.fail(function(xhr, status, error) {clearAll()\n\t\t\t$(\"#displayedMessage\").html('<span class=\"message_error\">Error when trying to call server.</span>');\n\t\t\tenableButtons();\n\t\t});\n\t}", "static toggleCompleteAll() {\n AppDispatcher.dispatch({\n actionType: MemoryConstants.MEMORY_TOGGLE_COMPLETE_ALL\n });\n }", "done() {\n this.post(); \n navigateToRoute({});\n }", "static async method(){}", "addEventAction(context, payload) {\n // LESSON 163 = Putting PROMISE around whole thing:\n\n return new Promise((resolve, reject) => {\n // refactored from mutation saveMyEventMutation << I improved this name (was \"Action\" now \"Mutation\" Bon.)\n console.log('ACTION payload receieved is ', payload)\n console.log('action context is: ', context)\n /*\n action context is:\n {…}\n commit: function boundCommit()\n dispatch: function boundDispatch()\n getters: Object { }\n rootGetters: Object { }\n rootState: Object { currentYear: Getter & Setter, currentMonth: Getter & Setter, eventFormPosY: Getter & Setter, … }\n state: Object { currentYear: Getter & Setter, currentMonth: Getter & Setter, eventFormPosY: Getter & Setter, … }\n */\n\n // Next line commits the Mutation (with now improved name)\n // BEFORE Axios, we just committed mutation right here.\n // NOW we do not do commit till we get back '200 OK' from Axios POST\n// context.commit('saveMyEventMutation', payload)\n\n // LESSON 159 AXIOS - to server\n // N.B. Do this ASYNC stuff HERE in *Action*, not where I had it, in Mutation. tsk tsk no.\n\n let objEvent = payload // our payload is already an object (whereas for Instructor it is just a String)\n // We'll use this 'objEvent' for the Axios call, below\n\n console.log('objEvent payload thing is: ', objEvent)\n /*\n Huh. Is this what I expected?\n objEvent payload thing is:\n {…}\n __ob__: Object { value: {…}, dep: {…}, vmCount: 0 }\n description: Getter & Setter\n <get>: function reactiveGetter()\n <set>: function reactiveSetter()\n wr__date: Getter & Setter ...\n */\n\n // LESSON 163 PROMISE...\n Axios.post('/add_event', objEvent) // objEvent is just the payload...\n .then(response => {\n // console.log(response) // yep\n if(response.status === 200){\n context.commit('saveMyEventMutation', objEvent)\n\n/*\n /!* ARTIFICIALLY SLOW DOWN THE SERVER RESPONSE *!/\n setTimeout(function() {\n resolve()\n }, 2500)\n*/\n\n resolve()\n } else { // TODO Error handling ...\n reject()\n }\n })\n }) // /PROMISE\n }", "async function do_the_job() {\n let idxAction, cntActions = g_arrActions.length, cntFalse = 0, cntTrue = 0;\n for( idxAction = 0; idxAction < cntActions; ++ idxAction ) {\n if( MTA.verbose_get() >= MTA.RV_VERBOSE.information )\n log.write( cc.debug(MTA.longSeparator) + \"\\n\" );\n var joAction = g_arrActions[ idxAction ], bOK = false;\n if( MTA.verbose_get() >= MTA.RV_VERBOSE.debug )\n log.write( cc.notice(\"Will execute action:\") + \" \" + cc.info(joAction.name) + cc.debug(\" (\") + cc.info(idxAction+1) + cc.debug(\" of \") + cc.info(cntActions) + cc.debug(\")\") + \"\\n\" );\n try {\n if( await joAction.fn() ) {\n ++ cntTrue;\n if( MTA.verbose_get() >= MTA.RV_VERBOSE.information )\n log.write( cc.success(\"Succeeded action:\") + \" \" + cc.info(joAction.name) + \"\\n\" );\n } else {\n ++ cntFalse;\n if( MTA.verbose_get() >= MTA.RV_VERBOSE.error )\n log.write( cc.warn(\"Failed action:\") + \" \" + cc.info(joAction.name) + \"\\n\" );\n }\n } catch( e ) {\n ++ cntFalse;\n if( MTA.verbose_get() >= MTA.RV_VERBOSE.fatal )\n log.write( cc.fatal(\"Exception occurred while executing action:\") + \" \" + cc.info(joAction.name) + cc.error(\", error description: \") + cc.warn(e) + \"\\n\" );\n }\n } // for( idxAction = 0; idxAction < cntActions; ++ idxAction )\n if( MTA.verbose_get() >= MTA.RV_VERBOSE.information ) {\n log.write( cc.debug(MTA.longSeparator) + \"\\n\" );\n log.write( cc.info(\"FINISH:\") + \"\\n\" );\n log.write( cc.info(cntActions) + cc.notice( \" task(s) executed\") + \"\\n\" );\n log.write( cc.info(cntTrue) + cc.success(\" task(s) succeeded\") + \"\\n\" );\n log.write( cc.info(cntFalse) + cc.error (\" task(s) failed\") + \"\\n\" );\n log.write( cc.debug(MTA.longSeparator) + \"\\n\" );\n }\n}", "async exec(lifecycle, action, ...data) {\n const handlers = this.getActionHandlers(lifecycle, action);\n if (!handlers) {\n return;\n }\n for (let handler of handlers) {\n if (typeof handler === 'function') {\n await handler(...data);\n }\n else {\n await this.resolver.call(handler, undefined, data);\n }\n }\n }", "store() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.request(\"store\", {});\n });\n }", "run(){\n var a = this.action();\n while (a.isComplete()) {\n a.cleanUp();\n var oldState = this.state;\n this.preStateChange(a);\n this.stateTransition();\n this.enterState(oldState);\n if (oldState === this.state) {\n // if (this.state() != 'wait') self.debug('No state change from ' + this.name() + ':' + this.state());\n return;\n }\n a = this.action();\n }\n // this.debug('Run ' + a.string());\n a.run();\n }", "showAllMeetups(context) {\n context.commit(\"setLoading\", true);\n context.commit(\"clearError\");\n\n console.log(\"inside showallmeetups action\");\n try {\n return fetch(`/meetups`, { method: \"GET\" })\n .then(res => res.json())\n .then(meetups => {\n if (meetups.error) {\n //error message\n return commit(\"setError\", meetups.error);\n }\n context.commit(\"setAllMeetups\", meetups);\n context.commit(\"setLoading\", false);\n\n router.push(\"/meetups\");\n });\n } catch (err) {\n console.log(err);\n }\n }", "function performAction(){\n\tvar action = request.httpParameterMap.action.value,\n\t\torderNo = request.httpParameterMap.orderno.value,\n\t\tamount = request.httpParameterMap.amount.value,\n\t\tbulkCompleteArray = request.httpParameterMap.bulkComplete.value,\n\t\ttransActions = require(\"~/cartridge/scripts/TransActions\"),\n\t\tresult;\n\t\n\tswitch(action){\n\t\tcase \"refund\":\n\t\t\tresult = transActions.refund(orderNo, amount);\n\t\t\tbreak;\n\t}\n\t\n\tresponse.getWriter().println(JSON.stringify(result));\n}", "componentDidMount() {\n // dispateches to getClassFutureSaga.js\n this.props.dispatch({ type: 'GET_CLASSES' });\n // dispateches to setInstructorSaga.js\n this.props.dispatch({ type: 'GET_INSTRUCTORS' });\n // dispateches to seasonSaga.js\n this.props.dispatch({ type: 'GET_SEASONS' });\n // dispateches to yearSaga.js\n this.props.dispatch({ type: 'GET_YEARS' });\n }", "static refresh() {\n\t\t// AppEventEmitter.emit('login.refresh');\n\t\tAppEventEmitter.emit('homepage.refresh');\n\t\tAppEventEmitter.emit('sidemenu.refresh');\n\t}", "StoreAndDispatch() {\n\n }", "static async spinAction(container, action) {\n await Spinner.add(container);\n\n try {\n const response = await action();\n return response;\n } finally {\n Spinner.remove(container);\n }\n }", "async fromSireneRequestOtherAPIs(dispatch, siret) {\n if (getters.idAssociationFromSirene()) {\n await store.dispatch('executeSearchByIdAssociation', { id: getters.idAssociationFromSirene(), api: 'RNA' })\n } else {\n await store.dispatch('executeSearchBySiret', { siret: siret, api: 'RNA' })\n }\n }", "async index() {\n const { ctx, service } = this;\n const res = await service.user.crud({\n type: 'readAll',\n });\n console.log('res_user_index-------', res);\n ctx.body = res;\n }", "async asyncPromiseChain() {\n\n this.showSubmit = false;\n this.selectedAccount = true;\n this.foundAccounts = false;\n this.isLoading = true;\n this.rowData.forEach(d => {\n this.SelectedAccId = d.accountId;\n this.SelectedAccName = d.name;\n this.SelectedAccPhone = d.phone;\n });\n\n let conResp = await getRelatedContactList({ id: this.SelectedAccId });\n if (conResp && conResp.length > 0) {\n conResp.forEach((d, i) => {\n this.conData.push({\n id: d.Id,\n first: d.FirstName,\n last: d.LastName,\n email: d.Email\n })\n console.log(this.conData[i]);\n })\n this.foundContacts = true;\n }\n let oppResp = await getRelatedOpptyList({ id: this.SelectedAccId });\n if (oppResp && oppResp.length > 0) {\n oppResp.forEach((d, i) => {\n this.oppData.push({\n id: d.Id,\n stage: d.StageName,\n amount: '$' + d.Amount,\n source: d.LeadSource\n })\n console.log(this.oppData[i]);\n })\n this.foundOpptys = true;\n }\n this.isLoading = oppResp != null && conResp != null;\n }", "process({ getState, action }) {\n return api.fetchCalculations() \n }", "activeDataAction({ commit }, payload) {\n var self = this;\n\n payload = payload.data;\n var base_route = NetCode.getBaseApiRoute();\n var route_path = base_route + payload.sub_path;\n\n if(typeof(payload.submit_type) !== 'undefined') {\n self.commit('addCurrentSubmit', payload.submit_type);\n }\n\n //default\n var crud_method = 'update';\n if(typeof(payload.crud_method) !== 'undefined') {\n crud_method = payload.crud_method;\n }\n\n //default\n var module = false;\n if(typeof(payload.module) !== 'undefined') {\n module = payload.module;\n }\n\n //default\n var verb = 'post';\n\n if(typeof(payload.custom_verb) !== 'undefined') {\n verb = payload.custom_verb;\n } else {\n if(crud_method === 'delete') {\n verb = 'delete';\n } else if(crud_method === 'update') {\n verb = 'put';\n }\n }\n\n //add uid to this action\n payload.active_data_action_uid = ActiveDataStore.getNewUid();\n\n ActiveDataStore.fireHooks('active_data_action_before_fire', {payload: payload, crud_method: crud_method, module: module, verb: verb});\n\n self.netCode[verb](route_path, payload.save_data)\n .then(function(response) {\n if(response.data.success === true) {\n ActiveDataStore.fireHooks('active_data_action_before_native_actions', {payload: payload, response: response.data});\n\n //find instance by uid\n var plural = ActiveDataStore.pluralize(payload.model);\n var instance = false;\n\n //check if instance exists by id or uid so we can update it\n if(typeof(payload.save_data.id) !== 'undefined' && !isNaN(payload.save_data.id) && payload.save_data.id > 0) {\n instance = self.getters.activeDataFindFirst(plural, payload.save_data.id, 'id', 'object', module);\n } else if(typeof(payload.save_data.uid) !== 'undefined' && !isNaN(payload.save_data.uid) && payload.save_data.uid > 0) {\n instance = self.getters.activeDataFindFirst(plural, payload.save_data.uid, 'uid', 'object', module);\n }\n\n if(instance !== false) {\n if(crud_method === 'delete') {\n self.commit('removeActiveDataInstance', {collection: plural, value: payload.save_data.id, key: 'id', module: module});\n }\n else if(crud_method === 'update' || crud_method === 'create') {\n //if we've found the instance, we update it\n if(typeof(payload.nested_sync) === 'undefined') {\n var sync_options = {};\n } else {\n var sync_options = payload.nested_sync;\n }\n\n instance.activeDataSync(response.data.instance_data, self.state, sync_options);\n }\n } else {\n //if we've not found the instance but we are creating one, insert the data in the store\n if(crud_method === 'create') {\n //create the instance\n var instance = ActiveDataStore.activeDataCreateResource(window[payload.model], plural, response.data.instance_data);\n\n var instance_data = {\n model: window[payload.model],\n instance: instance,\n plural: plural,\n module: module\n };\n\n self.commit('addActiveDataInstance', instance_data);\n }\n }\n\n ActiveDataStore.fireHooks('active_data_action_on_success_before_callback', {payload: payload, response: response.data, crud_method: crud_method, module: module, verb: verb});\n\n if(typeof(payload.success_callback) !== 'undefined') {\n payload.success_callback(response.data);\n }\n\n ActiveDataStore.fireHooks('active_data_action_on_success_after_callback', {payload: payload, response: response.data, crud_method: crud_method, module: module, verb: verb});\n } else {\n console.log(response);\n alert('Action failed. Please try again, if this problem keeps occurring contact support.');\n\n ActiveDataStore.fireHooks('active_data_action_on_failure_before_callback');\n\n if(typeof (payload.failure_callback) !== 'undefined') {\n payload.failure_callback(response.data);\n }\n\n ActiveDataStore.fireHooks('active_data_action_on_failure_after_callback', {payload: payload, crud_method: crud_method, module: module, verb: verb});\n }\n\n if(typeof(payload.submit_type) !== 'undefined') {\n self.commit('removeCurrentSubmit', payload.submit_type);\n }\n }).catch(function (error) {\n console.log(error);\n alert('Action failed. Please try again, if this problem keeps occurring contact support.');\n\n if(typeof(payload.submit_type) !== 'undefined') {\n self.commit('removeCurrentSubmit', payload.submit_type);\n }\n\n ActiveDataStore.fireHooks('active_data_action_on_failure_before_callback', {payload: payload, crud_method: crud_method, module: module, verb: verb});\n\n if(typeof (payload.failure_callback) !== 'undefined') {\n payload.failure_callback(error);\n }\n\n ActiveDataStore.fireHooks('active_data_action_on_failure_after_callback', {payload: payload, crud_method: crud_method, module: module, verb: verb});\n });\n }", "run () {\n\n this.readAndUpdate();\n this.start(this._state);\n this.doAction(\"PADDLE\", this._current_action);\n this.sendAction();\n\n while (true) {\n\n this.readAndUpdate();\n\n if (!this._next_command)\n return;\n\n if (this._promise_succeeded) {\n this._next_command.resolve(this._state);\n } else {\n this._next_command.reject(this._promise_failure_reason);\n }\n\n this.doAction(\"PADDLE\", this._current_action);\n this.sendAction();\n\n // reset current action\n this._current_action = [0, 0, false];\n\n // reset promise results\n this._promise_succeeded = undefined;\n this._promise_failure_reason = undefined;\n }\n }", "function getTasks(){\n http\n .get('http://localhost:3000/Tasks')\n .then(tasks => {\n \n //showing tasks in ui\n ui.showTasks(tasks);\n //showing total task in ui\n ui.showTotalTasks(tasks);\n //getting complited task \n ui.getCompletedTaskCount(tasks);\n \n })\n .catch(err=> console.log(err));\n //showing add State\n ui.showAddState()\n}", "async function takeAction(action, dataValue, type) {\n const privateKey = localStorage.getItem(\"user_key\");\n const rpc = new JsonRpc(process.env.REACT_APP_EOS_HTTP_ENDPOINT);\n const signatureProvider = new JsSignatureProvider([privateKey]);\n const api = new Api({ rpc, signatureProvider, textDecoder: new TextDecoder(), textEncoder: new TextEncoder() });\n let contractname = '';\n if (type === 'give') contractname = process.env.REACT_APP_EOS_CONTRACT_NAME;\n else if (type === 'receive') contractname = process.env.REACT_APP_EOS_CONTRACT_NAME_RE;\n\n // Main call to blockchain after setting action, account_name and data\n try {\n const resultWithConfig = await api.transact({\n actions: [{\n account: contractname,\n name: action,\n authorization: [{\n actor: localStorage.getItem(\"user_account\"),\n permission: 'active',\n }],\n data: dataValue,\n }]\n }, {\n blocksBehind: 3,\n expireSeconds: 30,\n });\n return resultWithConfig;\n } catch (err) {\n throw (err)\n }\n}", "dispatch() {\r\n }", "async request() {\n if (this.isTest()) { console.log(\"in getAllCalls\"); }\n // GET first page (and number of pages)\n await this.getCallsPage();\n \n if (this.isTest()) { console.log(`getLastPage = ` + this.getLastPage()); }\n // GET the remaining pages\n for (let pageNum = 2; pageNum <= this.getLastPage(); pageNum++) {\n await Util.throttle(this.#config.throttle);\n await this.getCallsPage(pageNum);\n }\n }", "fetchData(action) {\n\n\n //check if token is available or not;\n if (this.isTokenValid()) {\n this.handleAction(action);\n }\n else {\n this.handleAction({\n type: \"FETCH_TOKEN\", callback: () => this.fetchData(action)\n });\n }\n }", "async function a(payload) {\n\tconst p = new Pulse(c).proxy\n\tfor (const action of payload) {\n\t\tconst { pointer, data } = createAction(p, action)\n\t\t// pointer.toObject ? if local, new object, else, fetch object\n\t\tconst item = await pointer.toObject()\n\t\tif (!item) continue\n\t\tawait item.applyOps(data)\n\t\t//item.applyOps(action.data)\n\t}\n\tconsole.log(p.cache.object.values())\n}", "function callApi()\n\t\t{\n\n\t\t\tvm.chatRooms = [];\n\t\t\tUserService.GetAll().then(function (user)\n\t\t\t{\n\t\t\t\tvm.allUsers = user;\n\t\t\t}\n\t\t\t);\n\n\t\t\tUserService.GetCurrent().then(function (user)\n\t\t\t{\n\t\t\t\tvm.username =\n\t\t\t\t{\n\t\t\t\t\t\"username\": user.username\n\t\t\t\t};\n\t\t\t}\n\t\t\t);\n\n\t\t}", "async refresh() {\n this.notifyLoading(true);\n refreshApex(this.boats); \n this.notifyLoading(false);\n }", "async index({ request, response, view }) {\n return await Bebida.all();\n }", "function Action(){\n var rc=0;\n \n WJS1_Config_print_trace();\n lr.outputMessage(\">> Action Iteration=\" + lr.evalString(\"{pIteration}\") +\".\");\n wi_msg_print_reset();\n\n rc=WJS1_Access_landing_loops();\n if( rc !== 0 ){ return rc; }\n\n // TODO: Use sha1.js to authenticate calls to REST API\n \n return rc;\n}", "async function getEvents() {\n try {\n const res = await api.getEvents();\n\n dispatch({\n type: 'GET_EVENTS',\n payload: res.data.data,\n });\n } catch (err) {\n dispatch({\n type: 'EVENTS_ERROR',\n payload: err.response.data.error,\n });\n }\n }", "onSuccess() {}", "function run() {\n return __awaiter(this, void 0, void 0, function* () {\n let policyResults = null;\n try {\n Inputs.readInputs();\n utilities_1.setUpUserAgent();\n const policyRequests = yield policyHelper_1.getAllPolicyRequests();\n //2. Push above polices to Azure policy service\n policyResults = yield policyHelper_1.createUpdatePolicies(policyRequests);\n //3. Print summary result to console\n reportGenerator_1.printSummary(policyResults);\n }\n catch (error) {\n core.setFailed(error.message);\n utilities_1.prettyLog(`Error : ${error}`);\n }\n finally {\n //4. Set action outcome\n setResult(policyResults);\n }\n });\n}", "function sideEffects() {\n\t\t// The dispatch function takes actions as arguments to make changes to the store/redux.\n\t\tdispatch(fetchAllUsers())\n\t}", "function update() {\n const isComplete = function(action) {\n const {action: {name, progress}} = action.properties();\n const duration = eko.get(\"action\", name).duration;\n return progress >= duration;\n };\n const complete = function(action) {\n const name = action.component(\"action\").property(\"name\");\n const agent = action.connections(\"incoming\", \"performing\")[0].\n source();\n const target = action.call(\"get_target\");\n const using = action.call(\"get_using\");\n action.delete();\n eko.get(\"action\", name).complete(agent, target, using);\n };\n\n console.log(\"update\");\n const perspective = model.call(\"get_perspective\");\n const action = perspective.connections(\"outgoing\", \"performing\")[0]\n .target();\n if (isComplete(action))\n complete(action);\n else {\n\n while (model.call(\"get_perspective\").call(\"get_action\").exists()) {\n console.log(\"time step\");\n\n for (const action of model.entities({action: {}})) {\n // Increment action progress.\n const {action: {progress}} = action.properties();\n action.properties({action: {progress: progress + 1}});\n // Check for completion.\n if (isComplete(action))\n complete(action);\n }\n\n }\n\n }\n\n render();\n }", "async function takeAction(action, dataValue) {\n let textDecoder = new TextDecoder('utf-8');\n let textEncoder = new TextEncoder('utf-8');\n const privateKey = localStorage.getItem(\"cardgame_key\");\n const rpc = new JsonRpc(url, { fetch });\n const signatureProvider = new JsSignatureProvider([privateKey]);\n const api = new Api({ rpc, signatureProvider,\n textDecoder, textEncoder });\n dataValue = { payload: dataValue}\n\n //make our blockchain call after setting our action\n try {\n const resultWithConfig = await api.transact({\n actions: [{\n account: process.env.REACT_APP_EOS_CONTRACT_NAME,\n name: action,\n authorization: [{\n actor: localStorage.getItem(\"cardgame_account\"),\n permission: 'active',\n }],\n data: dataValue,\n }]\n }, {\n blocksBehind: 3,\n expireSeconds: 30,\n });\n } catch (err) {\n throw(err)\n }\n\n}", "async actionsTestUpdateClient() {\n try {\n await this.actionsPage.navigateToActionsPage()\n await this.actionsPage.updateClient(\"Lorena Joseph\", \"Jhon\", \"\", \"Send\")\n } catch (error) {\n console.error(`Error with ${this.actionsTestUpdateClient} function`)\n }\n }", "[actions.SET_INITIAL_DATA] () {\n HTTP.get('')\n .then(response => {\n const todoList = []\n const doneList = []\n const data = response.data\n data.forEach((item) => {\n item.done ? doneList.push(item) : todoList.push(item)\n })\n this.commit(mutations.SET_TODO_LIST, todoList)\n this.commit(mutations.SET_DONE_LIST, doneList)\n })\n }", "initializeHomePage({\n // state,\n commit,\n // rootState\n }) {\n axios('/api/getUser').then(result => {\n if (result.status == 200) {\n let data = result.data;\n commit('initializeHomePage', data);\n }\n\n\n })\n }", "async index({request, response}) {\r\n\r\n\t\t\r\n\t}", "function handleApiAiAction(sender, action, responseText, contexts, parameters) {\n function sendCartView(sender) {\n setTimeout(async () => {\n /**\n * Check if cart has active status then send the cart response\n */\n await User.findOne({ $and: [{ sFacebookId: sender }, { eStatus: \"i\" }] }\n , (error, result) => {\n if (result === null) {\n EmptyCart(sender)\n return false\n }\n console.log(result);\n var responseText = \"You have \" + \"*\" + result.aCart[0].sItem.join(', ') + \"*\" + \" in your Cart, and Your total amount is \" + \"_\" + \"₹\" + result.aCart[0].nPrice + \"_\";\n var replies = [{\n \"content_type\": \"text\",\n \"title\": \"Checkout\",\n \"payload\": \"Checkout please\",\n }, {\n \"content_type\": \"text\",\n \"title\": \"Add More Food\",\n \"payload\": \"Add More Food\",\n }, {\n \"content_type\": \"text\",\n \"title\": \"Clear Cart\",\n \"payload\": \"Clear Cart please\",\n }];\n sendQuickReply(sender, responseText, replies);\n })\n }, 1000);\n }\n function foodContent(paramenters, sender) {\n var type = paramenters.foodType;\n console.log(\"Type::\", paramenters.foodType);\n var elements = [];\n async.eachSeries(type, (foodType) => {\n FoodTypes.find({ sType: foodType }, (error, result) => {\n result.forEach(el => {\n elements.push({\n \"title\": el.sTitle,\n \"subtitle\": el.sSubTitle,\n \"imageUrl\": el.sImage,\n \"buttons\": [{\n \"text\": \"View More\",\n \"postback\": el.sPostback\n }]\n })\n })\n var responseText = \"Here is your Food Click below to know more\"\n sendTextMessage(sender, responseText)\n handleCardMessages(elements, sender);\n })\n })\n // handleCardMessages(elements, sender)\n }\n\n function EmptyCart(sender) {\n var responseText = \"Your cart is *EMPTY* \\n\\nYou shoud add something from Menu in your cart\";\n var replies = [{\n \"content_type\": \"text\",\n \"title\": \"Browse Food 🍕 🍔\",\n \"payload\": \"Browse Food\",\n }]\n sendQuickReply(sender, responseText, replies)\n }\n function foodTyped(action, parameters, sender) {\n console.log(parameters);\n var type = parameters[\"foodType\"];\n if (action === \"PIZZAMORE\" || type === \"pizza\") {\n cli.magenta(\"IN ELSE IFFF 1\")\n var elements = [];\n Food.find({ sType: \"pizza\" }, (error, result) => {\n result.forEach(el => {\n elements.push({\n \"title\": el.sTitle + \" \" + \"₹\" + el.nPrice,\n \"subtitle\": el.sSubTitle,\n \"imageUrl\": el.sImage,\n \"buttons\": [{\n \"text\": \"Add to Cart\",\n \"postback\": el.sPostback\n }]\n })\n })\n handleCardMessages(elements, sender)\n })\n } else if (action === \"BURGERMORE\" || type === \"burger\") {\n cli.magenta(\"IN ELSE IFFF 2\")\n var elements = [];\n Food.find({ sType: \"burger\" }, (error, result) => {\n result.forEach(el => {\n elements.push({\n \"title\": el.sTitle + \" \" + \"₹\" + el.nPrice,\n \"subtitle\": el.sSubTitle,\n \"imageUrl\": el.sImage,\n \"buttons\": [{\n \"text\": \"Add to Cart\",\n \"postback\": el.sPostback\n }]\n })\n })\n console.log(elements);\n handleCardMessages(elements, sender)\n })\n handleCardMessages(elements, sender)\n } else if (action === \"SENDWHICHMORE\" || type === \"sandwich\") {\n cli.magenta(\"IN ELSE IFFF 3\")\n var elements = [];\n Food.find({ sType: \"sandwich\" }, (error, result) => {\n result.forEach(el => {\n elements.push({\n \"title\": el.sTitle + \" \" + \"₹\" + el.nPrice,\n \"subtitle\": el.sSubTitle,\n \"imageUrl\": el.sImage,\n \"buttons\": [{\n \"text\": \"Add to Cart\",\n \"postback\": el.sPostback\n }]\n })\n })\n console.log(elements);\n handleCardMessages(elements, sender)\n })\n handleCardMessages(elements, sender)\n } else if (parameters.foodType.length >= 1) {\n cli.magenta(\"IN IFFF\");\n async.eachSeries(type, async (foodType) => {\n var elements = [];\n await Food.find({ sType: foodType }, async (error, result) => { // [\"bureger\",\"pizza\"]\n result.forEach(el => {\n elements.push({\n \"title\": el.sTitle + \" \" + \"₹\" + el.nPrice,\n \"subtitle\": el.sSubTitle,\n \"imageUrl\": el.sImage,\n \"buttons\": [{\n \"text\": \"Add to Cart\",\n \"postback\": el.sPostback\n }]\n })\n })\n var responseText = \"Here is the Menu of \" + \"*\" + foodType + \"*\";\n await sendTextMessage(sender, responseText)\n await handleCardMessages(elements, sender)\n })\n })\n /*\n To give all value in One slider\n Food.find({ sType: { $in: type } }, (error, result) => { // [\"bureger\",\"pizza\"]\n result.forEach(el => {\n elements.push({\n \"title\": el.sTitle,\n \"subtitle\": el.sSubTitle,\n \"imageUrl\": el.sImage,\n \"buttons\": [{\n \"text\": \"Add to Cart\",\n \"postback\": el.sPostback\n }]\n })\n })\n handleCardMessages(elements, sender)\n })\n */\n }\n else {\n sendTextMessage(sender, \"Sorryy we don't Provide that.\")\n }\n }\n cli.magenta(action)\n switch (action) {\n\n case \"FACEBOOK_WELCOME\":\n greetUserText(sender);\n break;\n case \"food-browse\":\n case \"food-search\":\n console.log(parameters);\n if (Object.keys(parameters).length === 0) {\n var elements = [];\n FoodTypes.find({}, async (error, result) => { // [\"bureger\",\"pizza\"]\n result.forEach(el => {\n elements.push({\n \"title\": el.sTitle,\n \"subtitle\": el.sSubTitle,\n \"imageUrl\": el.sImage,\n \"buttons\": [{\n \"text\": \"view More\",\n \"postback\": el.sPostback\n }]\n })\n })\n var responseText = \"Here is the Menu of *Burger*, *Pizza* and *Sandwich*\";\n await sendTextMessage(sender, responseText)\n await handleCardMessages(elements, sender)\n })\n }\n else if (parameters.foodType.length > 0) {\n foodContent(parameters, sender)\n }\n break;\n\n case \"food-more-type\":\n case \"PIZZAMORE\":\n case \"BURGERMORE\":\n case \"SENDWHICHMORE\":\n foodTyped(action, parameters, sender)\n break;\n case \"food-add-cart\":\n\n cli.red(\"Add To Cart\");\n let nPrice = [];\n let sImage = [];\n /**\n * Convert the object into an array by using Object.values \n * You can flatten the array by using concat and spread syntax. \n * Use filter to get only the string\n */\n const cart = [].concat(...Object.values(parameters)).filter(isNaN);\n const nQuantity = parameters.number;\n\n /**\n * If cart is empty then Give message to add some food\n */\n if (cart.length <= 0) {\n EmptyCart(sender)\n return false;\n }\n\n /**\n * If cart has some value then search for price and othe data\n */\n Food.find({ sTitle: { $in: cart } }, async (error, result) => {\n console.log(result);\n // [\"bureger\",\"pizza\"]\n result.forEach(el => {\n nPrice.push(el.nPrice);\n });\n result.forEach(el => {\n sImage.push(el.sImage)\n });\n // Generate unique receipt id\n const sReceiptId = randomstring.generate({\n length: 12,\n charset: 'alphabetic'\n });;\n\n //make the total of the cart\n var sTotal = nPrice.reduce(function (a, b) { return a + b; }, 0);\n\n // Generate cart payload to add in DB\n var c = {\n sImage: sImage,\n sItem: cart,\n nPrice: sTotal,\n sReceiptId: sReceiptId,\n nQuantity: cart.length,\n }\n\n /**\n * To Find the cart is empty or have some data and according to it add iteams in cart\n */\n await User.findOne({ sFacebookId: sender }, (error, result2) => {\n result2.eStatus = \"i\";\n result2.aCart.forEach(el => {\n if (el.eDeliveryStatus == 'n') {\n el.sItem.push(cart);\n el.sImage.push(sImage)\n el.nPrice = el.nPrice + sTotal;\n el.nQuantity = cart.length + el.nQuantity;\n result2.save();\n\n } else {\n result2.eStatus = \"i\";\n result2.aCart = c;\n result2.save();\n }\n })\n if (result2.aCart.length <= 0) {\n result2.eStatus = \"i\";\n result2.aCart = c;\n result2.save();\n }\n }); sendCartView(sender);\n })\n break;\n\n case \"Food-view-cart\":\n sendCartView(sender)\n break;\n\n case \"food-cart.add-context:delivery-add\":\n var elements = [];\n FoodTypes.find({}, async (error, result) => { // [\"bureger\",\"pizza\"]\n result.forEach(el => {\n elements.push({\n \"title\": el.sTitle,\n \"subtitle\": el.sSubTitle,\n \"imageUrl\": el.sImage,\n \"buttons\": [{\n \"text\": \"view More\",\n \"postback\": el.sPostback\n }]\n })\n })\n var responseText = \"Here is the Menu of *Burger*, *Pizza* and *Sandwich*\";\n await sendTextMessage(sender, responseText)\n await handleCardMessages(elements, sender)\n })\n break;\n\n case \"food-checkout\":\n User.findOne({ $and: [{ sFacebookId: sender }, { eStatus: \"i\" }] }, (error, result) => {\n if (result !== null) {\n var responseText = \"Are you sure you want to checkout?\"\n var buttons = [{\n type: \"web_url\",\n url: constant.SERVER_URL + \"/checkout/\" + sender,\n title: \"Yes\",\n webview_height_ratio: \"tall\",\n messenger_extensions: true\n },\n {\n type: \"postback\",\n \"title\": \"no\",\n \"payload\": \"No not right now\"\n }\n ]\n sendButtonMessage(sender, responseText, buttons)\n } else {\n EmptyCart(sender)\n }\n })\n break;\n\n case \"food-checkout.food-checkout-no\":\n var responseText = \"Don't worry you have your food in your cart you can checkout anytime\";\n sendTextMessage(sender, responseText);\n break;\n\n case \"food-checkout.food-checkout-yes\":\n console.log(parameters);\n console.log(contexts);\n break;\n\n case \"food-clear-card\":\n User.findOne({\n $and: [\n { sFacebookId: sender },\n { aCart: { '$elemMatch': { \"eDeliveryStatus\": 'n' } } }\n ]\n }, (error, result) => {\n console.log(result);\n if (result == null) {\n EmptyCart(sender)\n } else {\n console.log(result);\n result.eStatus = \"n\"\n result.aCart = [];\n result.save();\n (async function foo() {\n var responseText = \"Sure, I just Cleard your cart.\"\n await sendTextMessage(sender, responseText);\n await EmptyCart(sender)\n }());\n }\n })\n break;\n\n case \"VIEWRECEIPT\":\n let recipient_name;\n let currency = \"INR\";\n let payment_method = \"COD\";\n let timestamp = Math.floor(Date.now() / 1000);\n let summary = [];\n let elementRec = []\n let adjustments = [{\n \"name\": \"No Coupon\",\n \"amount\": 0.01\n }];\n let order_url = \"https://37cf1e51.ngrok.io\";\n // var summary = {}\n User.findOne({ $and: [{ sFacebookId: sender }, { eStatus: \"r\" }] }, async (error, result) => {\n recipient_name = result.sFacebookName;\n //timestamp = result.aCart[0].dTimestamp\n // elementRec = data.reduce((r, { sItem, sImage, nQuantity: quantity, nPrice: price }) =>\n // r.concat(sItem.map((title, i) => ({\n // title, subTitle: title, quantity, price, currency: 'INR', image_url: sImage[i]\n // }))),\n // []\n // );\n console.log(result.aCart);\n\n result.aCart.forEach(el => {\n el.sItem.forEach((el2, index) => {\n elementRec.push({\n \"title\": el2,\n \"subtitle\": el2,\n \"quantity\": 1,\n \"price\": el.nPrice,\n \"currency\": \"INR\",\n \"image_url\": el.sImage[index]\n })\n });\n summary.push({\n \"subtotal\": el.nPrice,\n \"shipping_cost\": 0,\n \"total_tax\": 0.00,\n \"total_cost\": el.nPrice\n })\n });\n let receiptId = result.aCart[0].sReceiptId\n\n let address = {\n \"street_1\": result.aUserInfo.sAddress1,\n \"street_2\": result.aUserInfo.sAddress2,\n \"city\": result.aUserInfo.sCity,\n \"postal_code\": result.aUserInfo.nPincode,\n \"state\": \"Gujarat\",\n \"country\": \"IN\"\n };\n sendReceiptMessage(sender,\n recipient_name,\n currency,\n payment_method,\n timestamp,\n elementRec,\n address,\n ...summary,\n adjustments,\n order_url, receiptId);\n })\n\n\n\n\n\n\n\n\n\n\n\n break;\n\n\n default:\n sendTextMessage(sender, responseText);\n break;\n }\n}", "async function displayMenus() {\n let { actionTypeChoice } = await determineActionType([\n {\n name: 'actionType',\n type: 'list',\n message: 'Select the type of action you wish to perform.',\n choices: actionTypes\n }\n ]);\n\n switch (actionTypeChoice) {\n case 'Add Data':\n selectTask(addDataMenu);\n case 'Delete Data':\n selectTask(deleteDataMenu);\n case 'Update Data':\n selectTask(updateDataMenu);\n case 'View Data':\n selectTask(viewDataMenu);\n case 'Quit':\n console.log('THANK YOU FOR USING ASSOCIATE MANAGER!');\n return; \n } \n}", "function executeActions(actions, state, callback) {\n // console.log(\"executeActions\", actions);\n const action = actions.shift();\n action.on('result', (result) => {\n if (result.success) {\n // TODO update state\n if (actions.length > 0) {\n executeActions(actions, state, callback);\n } else {\n // we are done\n callback(null, {\n program: null,\n state: state,\n result: result.result\n });\n }\n } else {\n // an error happened; abort sequence\n callback({\n msg: 'action execution failed',\n action,\n error: result.error\n }, null);\n }\n });\n action.on('status', console.log);\n action.on('feedback', console.log);\n action.execute();\n}", "handleActions(action){\n\n switch(action.type){\n case \"DISPATCH_SALE\":\n this.dispatchSale(action.id);\n break;\n\n default: break;\n }\n }", "_loadHierarchyLearningData() {\n let {webservice} = this.props.config,\n currentUser = AppStore.getState().currentuser,\n audience = AppStore.getState().audiencemembers;\n\n getLearningForManagerHierarchy(webservice, currentUser.id, audience ,this._onLoadingProgress.bind(this)).fork(console.error, res => {\n console.log('hierarchy loaded', res);\n AppStore.dispatch(SetHierarchy(res));\n // this._loadAudience();\n this._loadAllego();\n });\n }", "async function workflow() {\n const config = readConfigSync();\n await promiseChain(config.queries, async ({searchCode, ...options}) => {\n forceOutputDirectoriesSync(searchCode);\n await indexDownload(searchCode, {pageIndex: 1, perPage: 500});\n await indexDetailsDownload(searchCode, {pageIndex: 1});\n });\n // NOTE can run these asynchronously, just need to handle async errors\n return promiseChain(config.queries, async ({searchCode, ...options}) => {\n await detailsGenerate(searchCode, options);\n await pdfGenerate(searchCode);\n });\n}", "function ACTION() {}", "[\"GET_SELF_SERVICE_USERS\"](state) {\n state.showLoader = true;\n }", "async fetchAndInform() {\n this.todos = await this.fetchTodos()\n this.inform()\n }", "async function navAllStories(evt) {\n console.debug(\"navAllStories\", evt);\n storyList = await StoryList.getStories();\n hidePageComponents();\n putStoriesOnPage(storyList);\n \n\n}", "loadData() {\n this.$store.dispatch('FETCH_USER');\n this.$store.dispatch('FETCH_CONVERSATIONS');\n }", "async function app() {\n //Render and display app logo\n renderLogo();\n //Inquirer \"home page\" which lists all options to the user\n appHome();\n}", "getTasks() {\n var self = this;\n\n // Get data from server\n getAPITasks(self);\n }", "componentDidMount(){\n this.props.dispatch({ type: 'GET_EVENT_INFO' })\n this.props.dispatch({ type: 'GET_VIDEOS_ADMIN' })\n this.props.dispatch({ type: 'GET_ENTIRE_GOAL_INFO' })\n }", "queryLoadSuccess(collection, action) {\n const data = this.extractData(action);\n return {\n ...this.adapter.setAll(data, collection),\n loading: false,\n loaded: true,\n changeState: {},\n };\n }", "loadReportGateActives() {\n let data = {\n url: document.pageData.home.report_active_gatedevice_url\n };\n\n this.$store.dispatch('loadReportGateActives', data)\n .then(res => {\n this.isLoading = false;\n })\n .catch(err => {\n this.isLoading = false;\n });\n $('#GateActiveReportModal').modal('show');\n }", "async dispatch() {\n const result = await new Engine().dispatch([this]);\n return result[0].then(() => undefined);\n }", "function fetchItemsAction () {\n fetchTodoItems().then((response) => {\n return response.json()\n }).then((serverItemModel) => {\n if (serverItemModel.data) {\n viewState.items.length = 0\n serverItemModel.data.forEach((item) => {\n viewState.items.push(\n serverItemModelToClientItemModel(item)\n )\n })\n fillItems()\n }\n })\n}", "function triggerActions(count) {\n // must call processAction\n const list = []\n for (let i = 0; i < count; i++) {\n list.push(new Promise(function(resolve, reject) {\n processAction(i + 1, function(data) { resolve(data) })\n }))\n }\n Promise.all(list).then(function(responses) {\n responses.map(function(response, t) {\n console.log(response)\n })\n })\n}", "submit() {\n\t\tif (!this.state.submitButtonEnabled) {\n\t\t\treturn;\n\t\t}\n\t\tthis.state.executing = true;\n\t\tthis.opts.callback && this.opts.callback(this.project);\n\t\tetch.update(this);\n\t}", "dispatchAsync(sender, args) {\r\n this._dispatch(true, this, arguments);\r\n }", "dispatch(action) {\n this.store.dispatch(action);\n }", "function querySucceeded(data) {\r\n system.log('queried todos');\r\n toastr.info('queried todos');\r\n //logger.success(\"queried Todos\");\r\n vm.todos(data.results);\r\n vm.show(true); // show the view\r\n }" ]
[ "0.6055142", "0.59723526", "0.5773352", "0.568842", "0.56497127", "0.56109655", "0.55870485", "0.55561733", "0.5451844", "0.5406095", "0.53923833", "0.53552276", "0.5350013", "0.5336182", "0.5334204", "0.5312343", "0.5287405", "0.5261285", "0.52535903", "0.5232396", "0.5216482", "0.5211291", "0.5207171", "0.52029467", "0.51630366", "0.51613563", "0.51421", "0.5129926", "0.51191705", "0.5115675", "0.5112303", "0.5110403", "0.5103472", "0.5096264", "0.5074654", "0.5064315", "0.5063193", "0.5052903", "0.5047381", "0.5044949", "0.503722", "0.503135", "0.5011861", "0.5011365", "0.50101036", "0.50091773", "0.50059134", "0.5005186", "0.5002653", "0.50025505", "0.49927878", "0.49922636", "0.4990876", "0.49890164", "0.4986329", "0.49849087", "0.49847126", "0.49806118", "0.4976632", "0.4968403", "0.4966323", "0.49623823", "0.4959986", "0.49573454", "0.49555725", "0.49548715", "0.4948611", "0.4943009", "0.49375856", "0.4936267", "0.4934535", "0.4934017", "0.49256232", "0.49248034", "0.49245614", "0.49208787", "0.49196604", "0.49194163", "0.49070287", "0.4906329", "0.48930076", "0.48913977", "0.48884943", "0.48866552", "0.4884867", "0.48842338", "0.48839602", "0.48833004", "0.488297", "0.4880461", "0.4880423", "0.48802578", "0.4876296", "0.4870846", "0.48705447", "0.48656696", "0.48633692", "0.48618966", "0.4860147", "0.48574102", "0.48570585" ]
0.0
-1
Show order details popup
showOrderDetailsPopup(order, event) { event.preventDefault(); this.setState({ active_order: order, order_details_popup_status: !this.state.order_details_popup_status }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function orderViewFullDetails(orderid){\n\t\t\n\t\t//myPopupWindowOpen('#orderViewFullDetailsPop','#maska');\n $('#msg').hide();\n\t\t$('.pagination').hide();\n\t\t$('.ownerStaticContainer').hide();\n\t\t$('#rest_myorder').hide();\n\t\t$('#rest_fullorder').show();\n\t\t$('#rest_fullorder').html('<div class=\"addtocartloading\"><span class=\"image\"><img src=\"'+jssitebaseUrl +'/theme/default/images/loader.gif\" border=\"0\" alt=\"Loading\" /></span><span>Please wait...</span></div>').show();\n\t\t$(\"#rest_fullorder\").load(jssitebaseUrl+\"/ajaxActionRestaurant.php\",{'action':'orderFullDetails','orderid':orderid});\n\t\n\t\t//Form\n\t\t//$('#orderFullDetailsList').html('<div class=\"addtocartloading\"><span class=\"image\"><img src=\"'+jssitebaseUrl +'/images/loader.gif\" border=\"0\" alt=\"Loading\" /></span><span>Please wait...</span></div>').show();\n\t\t//$(\"#orderFullDetailsList\").load(jssitebaseUrl+\"/ajaxActionRestaurant.php?action=orderFullDetails&orderid=\"+orderid);\n\t}", "openOrder() {\n this.$scope.createdOrderModal.show();\n }", "function render_order_details() {\n\tvar orderDetails = $(\".orderDetails\");\n\n\torders.forEach(function(order) {\n\t\tvar relation = order.relation(\"items\");\n\t\trelation.query().find({\n\t\t\tsuccess: function(items) {\n\t\t\t\tvar itemList = $(\".pricing-table\", $(\".templates\")).clone();\n\t\t\t\tvar closeBtn = $(\".cta-button\", $(\".templates\")).clone();\n\t\t\t\t\n\t\t\t\tif (items.length == 0) {\n\t\t\t\t\t$(\".description\", itemList).text(\"That's no good. We found no items for this order. Try again later.\");\n\t\t\t\t\titemList.append(closeBtn);\n\t\t\t\t} else {\n\t\t\t\t\tvar subtotal = 0.00;\n\t\t\t\t\titems.forEach(function(item) {\n\t\t\t\t\t\tsubtotal += item.get(\"price\");\n\n\t\t\t\t\t\tvar listItem = $(\".bullet-item\", $(\".templates\")).clone();\n\t\t\t\t\t\t$(\".itemName\", listItem).text(item.get(\"name\"));\n\t\t\t\t\t\t$(\".itemPrice\", listItem).text(\"$\" + parseFloat(item.get(\"price\")).toFixed(2));\n\n\t\t\t\t\t\titemList.append(listItem);\n\t\t\t\t\t});\n\n\t\t\t\t\titemList.append(closeBtn);\n\n\t\t\t\t\t$(\".description\", itemList).text(order.id);\n\t\t\t\t\t$(\".price\", itemList).text(\"$\" + subtotal.toFixed(2));\n\t\t\t\t}\n\n\t\t\t\titemList.attr(\"data-order-id\", order.id);\n\t\t\t\titemList.addClass(\"hide\");\n\t\t\t\torderDetails.append(itemList);\n\t\t\t}\n\t\t});\n\t});\n}", "function showDetails() {\n const item = this.options.foodTruck;\n\n document.body.insertAdjacentHTML(\n 'afterbegin',\n `<section id=\"modal\" class=\"modal\">\n <h2>${item.name}</h2>\n <p>Sells ${item.product} for ${item.avgPrice} ${ checkPlural(item.avgPrice, 'coin') }.</p>\n <section class=\"queue\">\n <span>${item.queue}</span>\n <p>${ checkPlural(item.queue, 'person') } waiting</p>\n </section>\n <span class=\"close\" onclick=\"hideDetails()\">✕</span>\n </section>`\n );\n}", "function ie03DisplayOrderDetails(param){ \r\n\t\tset(\"V[z_ie03_ordernumber]\",param.order);\r\n\t\tz_ie03_nav_details_flag = true;\r\n\r\n\t\t// Display Equipment : Initial Screen\r\n\t\tonscreen 'SAPMIEQ0.0100'\r\n\t\t\tset('F[Equipment]', '&V[z_ie03_eqipno]');\r\n\t\t\tenter();\r\n\t\t\tonerror\r\n\t\t\t\tz_ie03_nav_details_flag = false;\r\n\t\t\t\tmessage(_message);\r\n\t\t\t\tenter(\"/n\");\r\n\r\n\t\tonscreen 'SAPMIEQ0.0101'\r\n\t\t\tenter('/34');\r\n\r\n\t\tonscreen 'SAPLIWO1.2100'\r\n\t\t\tenter('=R_AU');\r\n\r\n\t\tonscreen 'RIAUFK20.1000'\r\n\t\t\tset('F[Period]', '');\r\n\t\t\tset('F[AUFNR-LOW]', '&V[z_ie03_ordernumber]');\r\n\t\t\tenter('/8');\r\n\t\t\tonerror\r\n\t\t\t\tz_ie03_nav_details_flag = false;\r\n\t\t\t\tmessage(_message);\r\n\t\t\t\tenter(\"/n\");\r\n\t\t\t\t\r\n\t\tonscreen 'RIAUFK20.1000'\r\n\t\t\tz_ie03_nav_details_flag = false;\r\n\t\t\tmessage(\"S:\" + _message);\r\n\t\t\tenter(\"/n\");\r\n}", "function onShowWorkOrder(element) {\r\n try {\r\n var workOrderInfo = JSON.parse(decodeURIComponent(jQuery(element).attr('data-val')));\r\n var id = workOrderInfo.id;\r\n\r\n window.open(nlapiResolveURL('RECORD', 'workorder', id));\r\n\r\n } catch (e) {\r\n nlapiLogExecution('ERROR', 'Error during main onShowWorkOrder', e.toString());\r\n }\r\n}", "function showOrderDetails(orderId){\n $.get(\"/WineShop/order_details.php\", {orderId: orderId},\n function (data) {\n $('#orderNumber').text('Αριθμός παραγγελίας: '+orderId);\n $('.modal-body').html(data); //append the returned html\n $('#orderDetails').modal('show'); //show the modal\n });\n}", "showOrderDetailsPopup(order, event){\n event.preventDefault();\n this.setState({ active_order: order, order_details_popup_status: !this.state.order_details_popup_status});\n }", "function displayDetail(indice)\n{\n RMPApplication.debug(\"displayDetail : indice = \" + indice);\n v_ol = var_order_list[indice];\n c_debug(dbug.detail, \"=> displayDetail: v_ol (mini) = \", v_ol);\n\n // we want all details for the following work order before showing on the screen\n var wo_query = \"^wo_number=\" + $.trim(v_ol.wo_number);\n var input = {};\n var options = {};\n input.query = wo_query;\n // var input = {\"query\": wo_query};\n c_debug(dbug.detail, \"=> displayDetail: input = \", input);\n id_get_work_order_full_details_api.trigger(input, options, wo_details_ok, wo_details_ko);\n\n RMPApplication.debug(\"end displayDetail\");\n}", "function goorders() {\n\tmui.openWindow({\n\t\turl: '../orders/orders.html?openid=' + openid\n\t});\n}", "function showDetail() {\n showModal('detail.html');\n}", "function showDetails(item) {\n loadDetails(item).then(function () {\n // call function to display items in modal\n populateModal(item);\n });\n }", "function showPopupOrder(tittle, content, nameButton){\n\tvar d = new Date;\n\tcheckin_time = [d.getFullYear(), d.getMonth()+1, d.getDate()].join('/')+' '+\n [d.getHours(), d.getMinutes(), d.getSeconds()].join(':');\n\tsetMessagePopup('Thông báo đặt phòng', 'Hãy xác nhận đặt phòng <br></br>'\n\t\t\t+'Giờ checkin là: '+ checkin_time, 'Đặt phòng')\n\t$('#popup-message').modal('show');\n\t$('#btn-success-popup').removeAttr('disabled');\n}", "showInvoiceDetails(e){\n e.preventDefault();\n var _this = e.data.context,\n id = $.trim($(this).attr('data-receipt-id')),\n name = $.trim($(this).attr('data-name'));\n\n $.ajax({\n type : 'GET',\n url : '/warehouse/sales/byReceiptId',\n data : {\n receipt_id : id\n },\n success : function(transactions){\n if(transactions.length){\n _this.setInvoiceModalHeader(id, name);\n _this.setInvoicePrintID(id);\n _this.appendInvoiceModalTableHeader();\n _this.appendInvoiceModalTableBody();\n _this.appendItemsToInvoiceModalDOM(transactions);\n _this.showInvoiceModal();\n }\n }\n });\n }", "function showBuildingDetails(title,attributes){\n \tvar controller = View.controllers.get(\"abRplmPfadminGpdGisCtrl\");\n\tvar blId = title;\n\tcontroller.openDetailsPopUp(blId);\n}", "function openContactDetails() {\n\t\tconst contactId = Number(this.id);\n\t\tupdateContactDetails(contactId);\n\t\tmodal.style.display = \"block\";\n\t}", "function showOrder(mode, var_content, file) {\n var $orderList = $('#order-list');\n var $blockOrderDetail = $('#block-order-detail');\n\n $blockOrderDetail.addClass('loading-overlay');\n $orderList.addClass('loading-overlay');\n $.get(\n file,\n ((mode === 1) ? {'id_order': var_content, 'ajax': true} : {'id_order_return': var_content, 'ajax': true}),\n function(data) {\n $('#block-order-detail').fadeOut(function() {\n $blockOrderDetail.html(data).removeClass('loading-overlay');\n $orderList.removeClass('loading-overlay');\n\n bindOrderDetailForm();\n\n $blockOrderDetail.fadeIn(function() {\n $.scrollTo($blockOrderDetail, 1000, {offset: -(50 + 10)});\n });\n });\n }\n );\n}", "function showOrder(){\r\n var path=\"/orders/\";\r\n orderOperations.newSearch(callBackForOrder,path);\r\n}", "function toggleDetails() {\n ToggleComponent('shipment.detailView').toggle();\n }", "openCardDetails() {\n EnigmailWindows.openWin(\n \"enigmail:cardDetails\",\n \"chrome://openpgp/content/ui/enigmailCardDetails.xhtml\",\n \"centerscreen\"\n );\n }", "function get_status_detail(order_id)\n{\n window.location = '/order/status_details/'+order_id;\n}", "async showModalProduct() {\n const self = this;\n self.jquery(\".modalProductToogler\").on(\"click\", async function (event) {\n event.preventDefault();\n const itemDetails = await self.getItemDetails(\n event.target.dataset.productid\n );\n\n self.updateItemDetails(itemDetails);\n self.updateItemSteps(itemDetails);\n self.updateAvailableActions(itemDetails, self.currentAddress);\n self.makeAction(itemDetails);\n\n var myModal = new bootstrap.Modal(\n document.getElementById(\"productDetails\"),\n {\n keyboard: false,\n }\n );\n myModal.show();\n });\n }", "function loadPurchaseOrderPopup(purchaseOrderId, productId){\n var url = (purchaseOrderId != 0 || productId != 0)?'loadPurchaseOrderModel/'+purchaseOrderId+'/'+productId:'loadPurchaseOrderModel';\n \n $.ajax({\n \n url: url, \n data: {\n \n }, \n complete: function(response){\n $('#newPurchaseOrder').html(response['responseText']);\n if(purchaseOrderId != 0)\n {\n //$('#newPurchaseOrder').modal('toggle');\n }\n } \n });\n}", "function OrderDetail(props) {\n const { quantity, price, product } = props.orderdetail\n const { name, rating, imageUrl } = product\n\n return (\n <div className=\"individual-detail-container\">\n <div className=\"individual-detail\">\n <img src={imageUrl} alt=\"loading\" />\n <div className=\"info\">\n {getDisplayItem('Name', name)}\n {getDisplayItem('Rating', rating)}\n {getDisplayItem('Quantity', quantity)}\n {getDisplayItem('Total', `$${getMoney(price)}`)}\n </div>\n </div>\n </div>\n )\n}", "function getOrderDetails(orderdetails) {\n //* Order have not loaded yet\n if (!orderdetails || orderdetails.length === 0) {\n return <span>No items in cart yet!</span>\n }\n //* Get the order details\n return orderdetails.map((orderdetail, index) => {\n return <OrderDetail key={`detail${index}`} orderdetail={orderdetail} />\n })\n}", "function showDetails(pokemon) {\n loadDetails(pokemon).then(function () {\n showModal(pokemon);\n });\n }", "function showDetails(pokemon) {\n loadDetails(pokemon).then(function () {\n showModal(pokemon);\n });\n }", "function showDetails(pokemon) {\n loadDetails(pokemon).then(function () {\n showModal(pokemon);\n });\n }", "function refreshOrderNumberDisplay() {\n document.getElementById(\"order_num_disp\").innerHTML =\n \"Order #\" + store.get(\"order_num\", \"ORDER NUM NOT SET\");\n}", "function editDeliveryInfoShow(){\n\t\t$(\".deliveryInfoDetails\").hide();\n\t\t$(\"#editDeliveryInfo\").show();\n\t\tviewMap();\n\t}", "function showDetails(pokemon) {\n loadDetails(pokemon).then(function () {\n showModal(pokemon);\n });\n }", "function showDetails(pokemon) {\n loadDetails(pokemon).then(function () {\n var bodyContent =\n 'Height: ' +\n '\\n' +\n pokemon.height +\n '\\n' +\n 'Types: ' +\n pokemon.types +\n '\\n';\n showModal(pokemon.name, bodyContent, pokemon.imageUrl);\n hideLoadingMessage();\n });\n }", "function showDetails(pokemon) {\n\t\t\tloadDetails(pokemon).then(function () {\n\t\t\tshowModal(pokemon);\n\t\t\t});\n\t\t}", "function orderCancleButtonClick() {\n $('#orderCancleModal').modal('show');\n}", "function showDetails(id){ \n\n let productDetails = [];\n let order = \"\";\n\n all_orders.forEach(_order =>{\n if(_order.id == id){\n order = _order;\n }\n })\n \n order.orderProducts.forEach(product =>{\n let details = {\n name: product.product.name,\n quantity: product.quantity\n }\n productDetails.push(details);\n })\n\n auxDetails(productDetails);\n\n}", "function showDetails(pokemon) {\n loadDetails(pokemon).then(function () {\n showModal(pokemon);\n });\n}", "function showDetails(pokemon) {\n loadDetails(pokemon).then(function () {\n showModal(pokemon); //another function is called to run the modal in the browser\n });\n }", "function packageDetails() {\n let currentCustomer = vm.customers[vm.currentIndices.customer];\n let currentOrder = currentCustomer.orders[vm.currentIndices.order];\n let currentShipment = currentOrder.shipments[vm.currentIndices.shipment];\n if (currentShipment !== undefined) {\n let packageInfoElement = document.getElementById(\"PACKAGE_DETAILS\").children;\n packageInfoElement[1].innerText = currentShipment.ship_date;\n let contents = \"\";\n for(let i = 0; i < currentShipment.contents.length; i++){\n contents += currentShipment.contents[i];\n contents += \", \";\n }\n packageInfoElement[4].innerText = contents.substring(0,contents.length-2);\n }\n }", "function displayOrder(){\n setOrderHeader();\n setOrderHeader2();\n setOrderBody();\n //addOrderValue(Value);\n // Value.forEach(addOrderHeader);\n }", "order () {\n this.OrderHelperService.openExpressOrderUrl(\n this.LogsOptionsService.getOrderConfiguration(this.options.data, this.serviceName)\n );\n }", "function OpenCarryoutDetails(id) {\n $('.order-container').removeClass(\"selected-order-background\");\n $('#1 #li_' + id).addClass(\"selected-order-background\");\n $('#3 #li_' + id).addClass(\"selected-order-background\");\n var currentTabId = $(\".tab-active\").attr('id');\n $(\"#carryout #dvCarryOutDetailsInner #hdnSelectedOrderId\").val(id);\n var storeId = SetStoreId();\n if (id > 0) {\n url = global + \"/GetCarryOutOrderDetailsWithAllInfo?orderid=\" + id;\n $.getJSON(url, function (data) {\n ////$('#dvDetailsPanel').html(\"\");\n $(\"#carryout #dvOrderInfo\").html(\"\");\n $(\"#carryout #dvItem\").html(\"\");\n $(\"#carryout #divUpperButtonArea\").html(\"\");\n $(\"#carryout #divOrderDetailsPickupTime\").html(\"\");\n var html = \"\";\n var htmlDiscount = \"\";\n var htmlRewards = \"\";\n var htmlGiftCard = \"\";\n var htmlSubTotal = \"\";\n var htmlOrderTotal = \"\";\n var htmlDueAmount = \"\";\n var upperButtonHtml = \"\";\n var orderPickupTimeHtml = \"\";\n var subtotalvalue = \"0.00\";\n var ordertotalvalue = \"0.00\";\n var orderDiscount = 0.00;\n var grandTotal = 0.00;\n var grandTotalvalue = \"0.00\";\n var dueAmount = 0.00;\n var dueAmountValue = \"0.00\";\n var paidAmount = 0.00;\n var paidAmountValue = \"0.00\";\n var orderDate = \"\";\n var orderTime = \"\";\n var firstName = \"\";\n var lastName = \"\";\n var email = \"\";\n var phone = \"\";\n var address1 = \"\";\n var address2 = \"\";\n var city = \"\";\n var state = \"\";\n var zip = \"\";\n var paymentMethod = \"\";\n var cardNumber = \"\";\n var ordertotal = \"\";\n var buttonHTML = \"\";\n\n var orderId = 0;\n var orderDate = \"\";\n var orderTime = \"\";\n var pickupTime = \"\";\n var orderStatus = \"\";\n var numberOfItems = \"\";\n var ordertype = \"\";\n \n var authorizationCode = \"\";\n\n var taxValue = \"0.00\";\n var shippingValue = \"0.00\";\n var subTotalWithoutTax = \"0.00\";\n var curbsidePickup = false;\n var curbsidePickupMessage = \"\";\n var curbsidePickupDate = \"\";\n var curbsidePickupTime = \"\";\n var refundValue = \"0.00\";\n\n var tipValue = \"0.00\";\n var finalOrderTotal = \"0.00\";\n var serviceFeeValue = \"0.00\";\n\n //console.log(data);\n $.each(JSON.parse(data), function (index, value) {\n //console.log(value);\n\n //CurbsidePickup Seciton\n if (value.CurbsidePickup) {\n curbsidePickup = true;\n if (value.CurbsidePickupMessage != null && value.CurbsidePickupMessage != \"\") {\n curbsidePickupMessage = value.CurbsidePickupMessage;\n }\n if (value.CurbsidePickupTime != null && value.CurbsidePickupTime != undefined) {\n var arrCurbsidePickupDateTime = value.CurbsidePickupTime.split('~');\n curbsidePickupDate = arrCurbsidePickupDateTime[0];\n curbsidePickupTime = arrCurbsidePickupDateTime[1];\n }\n }\n else {\n curbsidePickup = false;\n curbsidePickupMessage = \"\";\n }\n\n if (value.Type == \"OrderInfo\") {\n if (value.ORDERTYPE != \"\") {\n ordertype = value.ORDERTYPE;\n }\n if (ordertype != \"\" && ordertype == \"Delivery\") {\n $('#carryout #spanOrderDetailsOrderType').html(\"\");\n $('#carryout #spanOrderDetailsOrderType').html(ordertype);\n $('#carryout #spanOrderDetailsOrderType').css('color', '#e95861');\n }\n else if (curbsidePickup) {\n $('#carryout #spanOrderDetailsOrderType').html(\"\");\n $('#carryout #spanOrderDetailsOrderType').html(\"Curbside\");\n $('#carryout #spanOrderDetailsOrderType').css('color', '#3b9847');\n }\n else {\n $('#carryout #spanOrderDetailsOrderType').html(\"\");\n $('#carryout #spanOrderDetailsOrderType').html(\"Carry Out\");\n $('#carryout #spanOrderDetailsOrderType').css('color', '#08b3c7');\n }\n orderDiscount = value.ORDERDISCOUNT;\n subtotalvalue = value.SUBTOTAL;\n if (value.BALANCEDUE != undefined && Number(value.BALANCEDUE) > 0) {\n dueAmount = value.BALANCEDUE;\n dueAmountValue = FormatDecimal(dueAmount);\n grandTotal = Number(value.SUBTOTAL) - Number(value.ORDERDISCOUNT);\n grandTotalvalue = FormatDecimal(grandTotal);\n paidAmount = grandTotal - Number(value.BALANCEDUE);\n paidAmountValue = FormatDecimal(paidAmount);\n\n htmlDueAmount = \" <tr>\";\n htmlDueAmount += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Paid:</td>\";\n htmlDueAmount += \"<td style=\\\"text-align:right;\\\">\" + paidAmountValue + \"</td>\";\n htmlDueAmount += \"</tr>\";\n\n htmlDueAmount += \" <tr>\";\n htmlDueAmount += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Due at Pickup:</td>\";\n htmlDueAmount += \"<td style=\\\"text-align:right;\\\">\" + dueAmountValue + \"</td>\";\n htmlDueAmount += \"</tr>\";\n }\n else {\n grandTotal = value.ORDERTOTAL;\n grandTotalvalue = FormatDecimal(grandTotal);\n }\n console.log('value.OID: ' + value.OID)\n orderId = value.OID;\n $(\"#carryout #dvCarryOutDetailsInner #hdnSelectedOrderId\").val(orderId);\n //if (value.ORDERTOTAL != \"\") {\n // $(\"#hdnSelectedOrderOrderPrice\").val(FormatDecimal(value.ORDERTOTAL));\n // ordertotalvalue = FormatDecimal(value.ORDERTOTAL);\n //}\n //else {\n // $(\"#hdnSelectedOrderOrderPrice\").val(\"$0.00\");\n //}\n if (Number(grandTotal) != Number(subtotalvalue)) {\n ordertotalvalue = FormatDecimal(Number(subtotalvalue) - Number(orderDiscount));\n }\n else {\n ordertotalvalue = FormatDecimal(grandTotal);\n }\n\n //Tax Section\n if (value.SUBTOTALWITHOUTTAX != undefined && Number(value.SUBTOTALWITHOUTTAX) > 0) {\n subTotalWithoutTax = FormatDecimal(value.SUBTOTALWITHOUTTAX);\n }\n if (value.TAX != undefined && Number(value.TAX) > 0)\n {\n taxValue = FormatDecimal(value.TAX);\n }\n if (value.SHIPPING != undefined && Number(value.SHIPPING) > 0) {\n shippingValue = FormatDecimal(value.SHIPPING);\n }\n if (value.REFUNDEDAMOUNT != undefined && Number(value.REFUNDEDAMOUNT)) {\n refundValue = FormatDecimal(value.REFUNDEDAMOUNT);\n }\n\n if (value.Tip != undefined && Number(value.Tip) > 0) {\n tipValue = FormatDecimal(value.Tip);\n }\n\n if (value.FINALORDERTOTAL != undefined && Number(value.FINALORDERTOTAL)) {\n finalOrderTotal = FormatDecimal(value.FINALORDERTOTAL);\n }\n\n if (value.ServiceFee != undefined && Number(value.ServiceFee)) {\n serviceFeeValue = FormatDecimal(value.ServiceFee);\n }\n\n\n $(\"#carryout #hdnSelectedOrderOrderPrice\").val(ordertotalvalue);\n if (value.CREATEDONUTC != null && value.CREATEDONUTC != undefined) {\n var arrDateTime = value.CREATEDONUTC.split('~');\n orderDate = arrDateTime[0];\n orderTime = arrDateTime[1];\n $(\"#carryout #hdnSelectedOrderDateTime\").val(orderDate + \"#\" + orderTime);\n }\n //console.log(value.PICKUPTIME)\n if (value.PICKUPTIME != undefined) {\n $(\"#carryout #hdnSelectedOrderPickUpTime\").val(value.PICKUPTIME);\n pickupTime = value.PICKUPTIME;\n if (pickupTime.charAt(0) === '0')\n {\n pickupTime = pickupTime.substr(1);\n }\n }\n //console.log(\"1:\"+pickupTime)\n //console.log('value.ORDERPICKUPSMSSENTON: ' + value.ORDERPICKUPSMSSENTON)\n if (value.ORDERPICKUPSMSSENTON != undefined && value.ORDERPICKUPSMSSENTON != null && value.ORDERPICKUPSMSSENTON != \"\") {\n\n if (value.ORDERPICKUPSMSSENTON.indexOf(\"~\") > -1) {\n var arrPickUpSMSSentDateTime = value.ORDERPICKUPSMSSENTON.split('~');\n var smsSentDate = arrPickUpSMSSentDateTime[0];\n var smsSentTime = arrPickUpSMSSentDateTime[1];\n $(\"#carryout #hdnSelectedOrderPickUpSMSSentTime\").val(smsSentDate + \"#\" + smsSentTime);\n $(\"#carryout #dvPickUpSMSSentTime\").show();\n $(\"#carryout #dvPickUpSMSSentTime\").html(\"Pickup SMS sent<br/>\" + smsSentDate + \" @ \" + smsSentTime);\n $(\"#carryout #btnPickupSMS\").hide();\n }\n else {\n $(\"#carryout #dvPickUpSMSSentTime\").hide();\n $(\"#carryout #dvPickUpSMSSentTime\").html(\"\");\n $(\"#carryout #hdnSelectedOrderPickUpSMSSentTime\").val(\"\");\n }\n\n }\n else {\n $(\"#carryout #dvPickUpSMSSentTime\").hide();\n $(\"#carryout #dvPickUpSMSSentTime\").html(\"\");\n $(\"#carryout #btnPickupSMS\").show();\n $(\"#carryout #hdnSelectedOrderPickUpSMSSentTime\").val(\"\");\n }\n\n if (value.CREATEDONUTC != null && value.CREATEDONUTC != undefined) {\n var arrDateTime = value.CREATEDONUTC.split('~');\n orderDate = arrDateTime[0];\n orderTime = arrDateTime[1];\n }\n if (value.FIRSTNAME != \"\") {\n firstName = value.FIRSTNAME;\n }\n else {\n firstName = value.BILLINGFIRSTNAME;\n }\n\n if (value.LASTNAME != \"\") {\n lastName = value.LASTNAME;\n }\n else {\n lastName = value.BILLINGLASTNAME;\n }\n\n if (value.EMAIL != \"\" && value.EMAIL != undefined) {\n email = value.EMAIL;\n }\n else {\n email = value.BILLINGEMAIL;\n }\n\n if (value.PHONE != \"\") {\n phone = value.PHONE;\n }\n else {\n phone = value.BILLINGPHONE;\n }\n\n if (phone != \"\" && phone != undefined && phone.length == 10)\n phone = FormatPhoneNumber(phone);\n\n if (value.BILLINGADDRESS1 != \"\") {\n address1 = value.BILLINGADDRESS1;\n }\n if (value.BILLINGADDRESS2) {\n address2 = value.BILLINGADDRESS2;\n }\n if (value.BILLINGADDRESSCITY) {\n city = value.BILLINGADDRESSCITY;\n }\n if (value.BILLINGADDRESSSTATE) {\n state = value.BILLINGADDRESSSTATE;\n }\n if (value.BILLINGADDRESSZIP) {\n zip = value.BILLINGADDRESSZIP;\n }\n\n if (value.PAYMENTMETHOD != \"\" && value.PAYMENTMETHOD != undefined) {\n paymentMethod = value.PAYMENTMETHOD;\n }\n if (value.CardNumber != \"\" && value.CardNumber != undefined) {\n cardNumber = value.CardNumber;\n }\n if (value.ORDERSTATUSID != \"\" && value.ORDERSTATUSID != undefined) {\n orderStatus = value.ORDERSTATUSID;\n }\n if (value.NOOFITEMS != \"\" && value.NOOFITEMS != undefined) {\n numberOfItems = value.NOOFITEMS;\n }\n //console.log('value.AUTHORIZATIONTRANSACTIONCODE: ' + paymentMethod)\n if(value.AUTHORIZATIONTRANSACTIONCODE!=null)\n {\n authorizationCode = value.AUTHORIZATIONTRANSACTIONCODE;\n }\n \n \n\n }\n else if (value.Type == \"DiscountInfo\") {\n\n htmlDiscount += \" <tr>\";\n htmlDiscount += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Coupon (\" + value.COUPONCODE + \"):</td>\";\n htmlDiscount += \"<td style=\\\"text-align:right;\\\">-\" + FormatDecimal(orderDiscount) + \"</td>\";\n htmlDiscount += \"</tr>\";\n\n }\n else if (value.Type == \"RewardInfo\") {\n //console.log(\"RewardInfo: \" + value.POINTS);\n htmlRewards += \" <tr>\";\n htmlRewards += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Reward Points (\" + value.POINTS.toString().replace(\"-\", \"\") + \"):</td>\";\n htmlRewards += \"<td style=\\\"text-align:right;\\\">-\" + FormatDecimal(value.USEDAMOUNT) + \"</td>\";\n htmlRewards += \"</tr>\";\n }\n else if (value.Type == \"GiftCardInfo\") {\n //console.log(\"GiftCardInfo: \" + value.GIFTCARDCOUPONCODE);\n htmlGiftCard += \"<tr>\";\n htmlGiftCard += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Gift Card (\" + value.GIFTCARDCOUPONCODE.replace(\"-\", \"\") + \"):</td>\";\n htmlGiftCard += \"<td style=\\\"text-align:right;\\\">-\" + FormatDecimal(value.USEDVALUE) + \"</td>\";\n htmlGiftCard += \"</tr>\";\n }\n\n if (orderStatus.toLowerCase() != \"cancelled\") {\n $(\"#carryout #divLowerCancelButtonArea\").show();\n $(\"#carryout #divLowerPrintButtonArea\").hide();\n if (orderStatus.toLowerCase() == \"pickedup\") {\n $(\"#btnChangePickupTime\").prop(\"onclick\", null).off(\"click\");\n $(\"#btnChangePickupTime\").css('opacity', '0.5');\n }\n else {\n $(\"#btnChangePickupTime\").click(function () {\n OpenPickupTimePopup();\n });\n $(\"#btnChangePickupTime\").css('opacity', '1');\n }\n }\n else\n {\n $(\"#carryout #divLowerCancelButtonArea\").hide();\n $(\"#carryout #divLowerPrintButtonArea\").show();\n }\n /*------------------Order Area-----------------------*/\n var buttonHTML = \"\";\n var orderhtml = \"\";\n orderhtml = \"<div class=\\\"order-container\\\">\";\n /*------------------Order Row-----------------------*/\n orderhtml += \"<div>\";\n /*------------------Column 1-----------------------*/\n /*------------------Column 1 New Start-----------------------*/\n orderhtml += \"<div class=\\\"order-row-container\\\">\";\n /*------------------Status Icon Area Start-----------------------*/\n orderhtml += \"<div class=\\\"order-buttons\\\" id=\\\"popUpCarryoutIcon_\" + orderId + \"\\\" style=\\\"width:40%;\\\">\";\n if ((status == '' || status == \"All\")) {\n if (orderStatus.toLowerCase() == \"new\") {\n orderhtml += \"<div class=\\\"dropdown\\\" id=\\\"carryoutpopstatus_\" + orderId + \"\\\">\";\n orderhtml += \"<button id=\\\"btnStatusChange\\\" onclick=\\\"myPopupFunction(\" + orderId + \")\\\" class=\\\"dropbtn\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/new.png\\\" alt=\\\"\\\"/></button>\";\n orderhtml += \"<a class=\\\"popup-link\\\" onclick=\\\"OpenOrderHistoryPopup(\" + orderId + \")\\\">History</a>\";\n orderhtml += \"<div id=\\\"myPopupDropdown_\" + orderId + \"\\\" class=\\\"dropdown-content\\\"><div onclick=\\\"HidePopupStatusChangeDropdown(\" + orderId + \");\\\" id =\\\"close_status_dropdown\\\" class=\\\"close_status_dropdown\\\">X</div>\";\n orderhtml += \"<a onclick=\\\"ChangePopupOrderStatusDropdown('Processing',\" + orderId + \",\" + storeId + \")\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/pending.png\\\" alt=\\\"\\\"/> <span class=\\\"custom-dropdown-span\\\">Processing</span></a>\";\n orderhtml += \"<a onclick=\\\"ChangePopupOrderStatusDropdown('Complete',\" + orderId + \",\" + storeId + \")\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/Complete-Icon.png\\\" alt=\\\"\\\"/> <span class=\\\"custom-dropdown-span\\\">Complete</span></a>\";\n orderhtml += \"<a onclick=\\\"ChangePopupOrderStatusDropdown('PickedUp',\" + orderId + \",\" + storeId + \")\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/Picked-Up-Icon.png\\\" alt=\\\"\\\"/><span class=\\\"custom-dropdown-span\\\">Pick Up</span></a>\";\n orderhtml += \"</div>\";\n orderhtml += \"</div>\";\n\n upperButtonHtml = \"<div class=\\\"flex\\\">\";\n upperButtonHtml += \"<div style=\\\"width:48%;\\\">\";\n //Set Details Upper Button\n upperButtonHtml += \"<a class=\\\"custom-btn-two custom-bg custom-link item-media-section-two\\\" style=\\\"background:#5cb95a !important;\\\" onclick=\\\"ChangePopupOrderStatusDropdown('Processing',\" + orderId + \",\" + storeId + \")\\\">Accept</a>\"; \n upperButtonHtml += \"</div>\";\n upperButtonHtml += \"<div style=\\\"width:4%;\\\">\";\n\n upperButtonHtml += \"</div>\";\n upperButtonHtml += \"<div style=\\\"width:48%;\\\">\";\n //Send SMS Button\n upperButtonHtml += \"<a id=\\\"aPopupSMS_\" + orderId + \"\\\" class=\\\"custom-btn-two custom-bg custom-link item-media-section-two\\\" style=\\\"background:#303030 !important;\\\" onclick=\\\"ConfirmationPickUpSMSSend(\" + orderId + \",'\" + phone + \"','Popup','$0.00')\\\">Send SMS</a>\";\n upperButtonHtml += \"</div>\";\n\n upperButtonHtml += \"</div>\"\n $(\"#carryout #divUpperButtonArea\").html(upperButtonHtml);\n \n }\n else if (orderStatus.toLowerCase() == \"processing\") {\n orderhtml += \"<div class=\\\"dropdown\\\" id=\\\"carryoutpopstatus_\" + orderId + \"\\\">\";\n orderhtml += \"<button id=\\\"btnStatusChange\\\" onclick=\\\"myPopupFunction(\" + orderId + \")\\\" class=\\\"dropbtn\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/pending.png\\\" alt=\\\"\\\"/></button>\";\n orderhtml += \"<a class=\\\"popup-link\\\" onclick=\\\"OpenOrderHistoryPopup(\" + orderId + \")\\\">History</a>\";\n orderhtml += \"<div id=\\\"myPopupDropdown_\" + orderId + \"\\\" class=\\\"dropdown-content\\\"><div onclick=\\\"HidePopupStatusChangeDropdown(\" + orderId + \");\\\" id =\\\"close_status_dropdown\\\" class=\\\"close_status_dropdown\\\">X</div>\";\n orderhtml += \"<a class=\\\"status-disabled\\\" onclick=\\\"HidePopupStatusChangeDropdown(\" + orderId + \");\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/pending.png\\\" alt=\\\"\\\"/> <span class=\\\"custom-dropdown-span\\\">Processing</span></a>\";\n orderhtml += \"<a onclick=\\\"ChangePopupOrderStatusDropdown('Complete',\" + orderId + \",\" + storeId + \")\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/Complete-Icon.png\\\" alt=\\\"\\\"/> <span class=\\\"custom-dropdown-span\\\">Complete</span></a>\";\n orderhtml += \"<a onclick=\\\"ChangePopupOrderStatusDropdown('PickedUp',\" + orderId + \",\" + storeId + \")\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/Picked-Up-Icon.png\\\" alt=\\\"\\\"/><span class=\\\"custom-dropdown-span\\\">Pick Up</span></a>\";\n orderhtml += \"</div>\";\n orderhtml += \"</div>\";\n\n upperButtonHtml = \"<div class=\\\"flex\\\">\";\n upperButtonHtml += \"<div style=\\\"width:48%;\\\">\";\n //Set Details Upper Button\n upperButtonHtml += \"<a class=\\\"custom-btn-two custom-bg custom-link item-media-section-two\\\" style=\\\"background:#3b9847 !important;\\\" onclick=\\\"ChangePopupOrderStatusDropdown('Complete',\" + orderId + \",\" + storeId + \")\\\">Complete</a>\";\n upperButtonHtml += \"</div>\";\n upperButtonHtml += \"<div style=\\\"width:4%;\\\">\";\n\n upperButtonHtml += \"</div>\";\n upperButtonHtml += \"<div style=\\\"width:48%;\\\">\";\n //Send SMS Button\n upperButtonHtml += \"<a id=\\\"aPopupSMS_\" + orderId + \"\\\" class=\\\"custom-btn-two custom-bg custom-link item-media-section-two\\\" style=\\\"background:#303030 !important;\\\" onclick=\\\"ConfirmationPickUpSMSSend(\" + orderId + \",'\" + phone + \"','Popup','$0.00')\\\">Send SMS</a>\";\n upperButtonHtml += \"</div>\";\n\n upperButtonHtml += \"</div>\"\n\n\n\n if (value.ORDERPICKUPSMSSENTON != undefined && value.ORDERPICKUPSMSSENTON != null && value.ORDERPICKUPSMSSENTON != \"\") {\n\n if (value.ORDERPICKUPSMSSENTON.indexOf(\"~\") > -1) {\n var arrPickUpSMSSentDateTime = value.ORDERPICKUPSMSSENTON.split('~');\n var smsSentDate = arrPickUpSMSSentDateTime[0];\n var smsSentTime = arrPickUpSMSSentDateTime[1];\n upperButtonHtml += \"<div class=\\\"popup-label-left-new\\\" id=\\\"dvPickUpSMSSentTime\\\"><div>Pickup SMS sent \" + smsSentDate + \" @ \" + smsSentTime + \"</div></div>\";\n }\n }\n\n $(\"#carryout #divUpperButtonArea\").html(upperButtonHtml);\n }\n else if (orderStatus.toLowerCase() == \"complete\") {\n orderhtml += \"<div class=\\\"dropdown\\\" id=\\\"carryoutpopstatus_\" + orderId + \"\\\">\";\n orderhtml += \"<button id=\\\"btnStatusChange\\\" onclick=\\\"myPopupFunction(\" + orderId + \")\\\" class=\\\"dropbtn\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/Complete-Icon.png\\\" alt=\\\"\\\"/></button>\";\n orderhtml += \"<a class=\\\"popup-link\\\" onclick=\\\"OpenOrderHistoryPopup(\" + orderId + \")\\\">History</a>\";\n orderhtml += \"<div id=\\\"myPopupDropdown_\" + orderId + \"\\\" class=\\\"dropdown-content\\\"><div onclick=\\\"HidePopupStatusChangeDropdown(\" + orderId + \");\\\" id =\\\"close_status_dropdown\\\" class=\\\"close_status_dropdown\\\">X</div>\";\n orderhtml += \"<a onclick=\\\"ChangePopupOrderStatusDropdown('Processing',\" + orderId + \",\" + storeId + \")\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/pending.png\\\" alt=\\\"\\\"/> <span class=\\\"custom-dropdown-span\\\">Processing</span></a>\";\n orderhtml += \"<a class=\\\"status-disabled\\\" onclick=\\\"HidePopupStatusChangeDropdown(\" + orderId + \");\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/Complete-Icon.png\\\" alt=\\\"\\\"/> <span class=\\\"custom-dropdown-span\\\">Complete</span></a>\";\n orderhtml += \"<a onclick=\\\"ChangePopupOrderStatusDropdown('PickedUp',\" + orderId + \",\" + storeId + \")\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/Picked-Up-Icon.png\\\" alt=\\\"\\\"/><span class=\\\"custom-dropdown-span\\\">Pick Up</span></a>\";\n orderhtml += \"</div>\";\n orderhtml += \"</div>\";\n\n upperButtonHtml = \"<div class=\\\"flex\\\">\";\n upperButtonHtml += \"<div style=\\\"width:48%;\\\">\";\n //Set Details Upper Button\n upperButtonHtml += \"<a class=\\\"custom-btn-two custom-bg custom-link item-media-section-two\\\" style=\\\"background:#f7952c !important;\\\" onclick=\\\"ChangePopupOrderStatusDropdown('PickedUp',\" + orderId + \",\" + storeId + \")\\\">Pick Up</a>\";\n upperButtonHtml += \"</div>\";\n upperButtonHtml += \"<div style=\\\"width:4%;\\\">\";\n\n upperButtonHtml += \"</div>\";\n upperButtonHtml += \"<div style=\\\"width:48%;\\\">\";\n //Send SMS Button\n upperButtonHtml += \"<a id=\\\"aPopupSMS_\" + orderId + \"\\\" class=\\\"custom-btn-two custom-bg custom-link item-media-section-two\\\" style=\\\"background:#303030 !important;\\\" onclick=\\\"ConfirmationPickUpSMSSend(\" + orderId + \",'\" + phone + \"','Popup','$0.00')\\\">Send SMS</a>\";\n upperButtonHtml += \"</div>\";\n\n upperButtonHtml += \"</div>\"\n \n\n if (value.ORDERPICKUPSMSSENTON != undefined && value.ORDERPICKUPSMSSENTON != null && value.ORDERPICKUPSMSSENTON != \"\") {\n\n if (value.ORDERPICKUPSMSSENTON.indexOf(\"~\") > -1) {\n var arrPickUpSMSSentDateTime = value.ORDERPICKUPSMSSENTON.split('~');\n var smsSentDate = arrPickUpSMSSentDateTime[0];\n var smsSentTime = arrPickUpSMSSentDateTime[1];\n upperButtonHtml += \"<div class=\\\"popup-label-left-new\\\" id=\\\"dvPickUpSMSSentTime\\\"><div>Pickup SMS sent \" + smsSentDate + \" @ \" + smsSentTime + \"</div></div>\";\n }\n }\n\n $(\"#carryout #divUpperButtonArea\").html(upperButtonHtml);\n }\n else if (orderStatus.toLowerCase() == \"pickedup\") {\n orderhtml += \"<div class=\\\"dropdown\\\" id=\\\"carryoutpopstatus_\" + orderId + \"\\\">\";\n orderhtml += \"<button id=\\\"btnStatusChange\\\" onclick=\\\"myPopupFunction(\" + orderId + \")\\\" class=\\\"dropbtn\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/Picked-Up-Icon.png\\\" alt=\\\"\\\"/></button>\";\n orderhtml += \"<a class=\\\"popup-link\\\" onclick=\\\"OpenOrderHistoryPopup(\" + orderId + \")\\\">History</a>\";\n orderhtml += \"<div id=\\\"myPopupDropdown_\" + orderId + \"\\\" class=\\\"dropdown-content\\\"><div onclick=\\\"HidePopupStatusChangeDropdown(\" + orderId + \");\\\" id =\\\"close_status_dropdown\\\" class=\\\"close_status_dropdown\\\">X</div>\";\n orderhtml += \"<a onclick=\\\"ChangePopupOrderStatusDropdown('Processing',\" + orderId + \",\" + storeId + \")\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/pending.png\\\" alt=\\\"\\\"/> <span class=\\\"custom-dropdown-span\\\">Processing</span></a>\";\n orderhtml += \"<a onclick=\\\"ChangePopupOrderStatusDropdown('Complete',\" + orderId + \",\" + storeId + \")\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/Complete-Icon.png\\\" alt=\\\"\\\"/> <span class=\\\"custom-dropdown-span\\\">Complete</span></a>\";\n orderhtml += \"<a class=\\\"status-disabled\\\" onclick=\\\"HidePopupStatusChangeDropdown(\" + orderId + \");\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/Picked-Up-Icon.png\\\" alt=\\\"\\\"/><span class=\\\"custom-dropdown-span\\\">Pick Up</span></a>\";\n orderhtml += \"</div>\";\n orderhtml += \"</div>\";\n\n $(\"#carryout #divUpperButtonArea\").html(\"\");\n }\n else if (orderStatus.toLowerCase() == \"cancelled\") {\n //html += \"<div class=\\\"order-status-icon\\\" id=\\\"carryoutstatus_\" + value.ID + \"\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/Picked-Up-Icon.png\\\" alt=\\\"\\\"/></div>\";\n orderhtml += \"<div class=\\\"dropdown\\\" id=\\\"carryoutstatus_\" + orderId + \"\\\">\";\n orderhtml += \"<button id=\\\"btnStatusChange\\\" class=\\\"dropbtn\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/cancel.png\\\" alt=\\\"\\\"/></button>\";\n orderhtml += \"<a class=\\\"popup-link\\\" onclick=\\\"OpenOrderHistoryPopup(\" + orderId + \")\\\">History</a>\";\n\n orderhtml += \"</div>\";\n\n $(\"#carryout #divUpperButtonArea\").html(\"\");\n }\n else if (orderStatus.toLowerCase() == \"refunded\") {\n //html += \"<div class=\\\"order-status-icon\\\" id=\\\"carryoutstatus_\" + value.ID + \"\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/Picked-Up-Icon.png\\\" alt=\\\"\\\"/></div>\";\n orderhtml += \"<div class=\\\"dropdown\\\" id=\\\"carryoutstatus_\" + orderId + \"\\\">\";\n orderhtml += \"<button id=\\\"btnStatusChange\\\" class=\\\"dropbtn\\\"><img class=\\\"list-icon\\\" src=\\\"img/icons/refund.png\\\" alt=\\\"\\\"/></button>\";\n orderhtml += \"<a class=\\\"popup-link\\\" onclick=\\\"OpenOrderHistoryPopup(\" + orderId + \")\\\">History</a>\";\n orderhtml += \"</div>\";\n\n $(\"#carryout #divUpperButtonArea\").html(\"\");\n }\n }\n\n //Bind Phone for use next time complete order send sms to customer functionality\n orderhtml += \"<input type=\\\"hidden\\\" id=\\\"hdnSelectedOrderPhone_\"+orderId+\"\\\" value=\\\"\"+phone+\"\\\" />\";\n\n orderhtml += \"</div>\";\n /*------------------Status Icon Area End-----------------------*/\n /*------------------Button Row Start-----------------------*/\n \n orderhtml += \"<div class=\\\"order-buttons\\\" id=\\\"popupCarryOutDetails_\" + orderId + \"\\\" style=\\\"width:60%;\\\">\";\n ////orderhtml += buttonHTML;\n orderhtml += \"</div>\";\n\n /*------------------Button Row End-----------------------*/\n orderhtml += \"</div>\";\n /*------------------Column 1 New End-----------------------*/\n\n /*------------------Column 2 New Start-----------------------*/\n orderhtml += \"<div class=\\\"order-row-container\\\">\";\n if (pickupTime != undefined) {\n if (pickupTime.indexOf(\"@\") > -1) {\n var pickupDateOnly = pickupTime.split('@')[0].trim();\n var pickupTimeOnly = pickupTime.split('@')[1].trim();\n //console.log(\"pickupDateOnly:\" + pickupDateOnly)\n if (status == '' || status == \"All\")\n orderPickupTimeHtml = \"<div class=\\\"order-details-pickup\\\">\" + pickupTimeOnly + \"</br><span style=\\\"font-size:16px;\\\">\" + pickupDateOnly + \"</span>\" + \"</div>\";\n else\n orderPickupTimeHtml = \"<div class=\\\"order-details-pickup order-pickup-margin-top\\\">\" + pickupTimeOnly + \"</br><span style=\\\"font-size:16px;\\\">\" + pickupDateOnly + \"</span>\" + \"</div>\";\n }\n else {\n if (ordertype != '' && ordertype == \"Delivery\") {\n if (status == '' || status == \"All\")\n orderPickupTimeHtml = \"<div class=\\\"order-details-pickup\\\" style=\\\"color: #e95861;\\\">\" + pickupTime + \"</div>\";\n else\n orderPickupTimeHtml = \"<div class=\\\"order-details-pickup order-pickup-margin-top\\\" style=\\\"color: #e95861;\\\">\" + pickupTime + \"</div>\";\n }\n else {\n if (status == '' || status == \"All\")\n orderPickupTimeHtml = \"<div class=\\\"order-details-pickup\\\">\" + pickupTime + \"</div>\";\n else\n orderPickupTimeHtml = \"<div class=\\\"order-details-pickup order-pickup-margin-top\\\">\" + pickupTime + \"</div>\";\n } \n }\n\n }\n else {\n if (status == '' || status == \"All\")\n orderPickupTimeHtml += \"<div class=\\\"order-details-pickup\\\"></div>\";\n else\n\n orderPickupTimeHtml += \"<div class=\\\"order-details-pickup order-pickup-margin-top\\\"></div>\";\n }\n //Bind Order Pickup Time\n $(\"#carryout #divOrderDetailsPickupTime\").html(\"\");\n $(\"#carryout #divOrderDetailsPickupTime\").html(orderPickupTimeHtml);\n\n orderhtml += \"<div class=\\\"carryout-order-number\\\"><span class=\\\"order-number\\\"> #\" + orderId + \"</span><br/> \" + orderDate + \" @ \" + orderTime + \"</div>\";\n orderhtml += \"</div>\";\n /*------------------Column 2 New End-----------------------*/\n\n\n /*------------------2nd Row-----------------------*/\n orderhtml += \"<div class=\\\"order-row-container\\\" style=\\\"padding-bottom: 2px;\\\">\";\n\n /*------------------Customer Info-----------------------*/\n orderhtml += \"<div class=\\\"giftcard-customer-new\\\">\";\n orderhtml += \"<div class=\\\"giftcard-customer-detail-container\\\">\";\n orderhtml += \"<div id=\\\"popupCustomerName_\" + orderId + \"\\\">\" + firstName + \" \" + lastName + \"</div>\";\n orderhtml += \"<div>\" + phone + \"</div>\";\n //orderhtml += \"<div id=\\\"popupCustomerEmail_\" + orderId + \"\\\" class=\\\"display-label-wrap\\\">\" + email + \"</div>\";\n \n //////Delivery Address\n ////if (ordertype == \"Delivery\") {\n //// if (address1 != \"\") {\n //// orderhtml += \"<div class=\\\"display-label-wrap\\\" style=\\\"padding-top:5px;\\\">\" + address1 + \"</div>\";\n //// }\n //// if (address2 != \"\") {\n //// orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + address2 + \"</div>\";\n //// }\n //// //if (city != \"\") {\n //// // orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + city + \"</div>\";\n //// //}\n //// if (state != \"\" && zip != \"\") {\n //// if (city != \"\") {\n //// orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + city + \", \" + state + \" \" + zip + \"</div>\";\n //// }\n //// else {\n //// orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + state + \" \" + zip + \"</div>\";\n //// } \n //// }\n //// else if (state != \"\" && zip == \"\") {\n //// if (city != \"\") {\n //// orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + city + \", \" + state + \"</div>\";\n //// }\n //// else {\n //// orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + state + \"</div>\";\n //// }\n //// }\n //// else if (state == \"\" && zip != \"\") {\n //// if (city != \"\") {\n //// orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + city + \", \" + zip + \"</div>\";\n //// }\n //// else {\n //// orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + zip + \"</div>\";\n //// }\n //// }\n ////}\n orderhtml += \"</div>\";\n orderhtml += \"</div>\";\n /*------------------Customer Info-----------------------*/\n /*------------------Order Info-----------------------*/\n orderhtml += \"<div class=\\\"giftcard-item-count-new\\\">\";\n orderhtml += \"<div class=\\\"giftcard-customer-detail-container\\\">\";\n //orderhtml += \"<div><div class=\\\"giftcard-price popup-carryout-details-long\\\" id=\\\"popupOrderPrice_\" + orderId + \"\\\">\" + ordertotalvalue + \"</div>\";\n orderhtml += \"<div><div class=\\\"giftcard-price popup-carryout-details-long\\\" id=\\\"popupOrderPrice_\" + orderId + \"\\\">\" + finalOrderTotal + \"</div>\";\n\n if (numberOfItems == 1)\n orderhtml += \"<div>1 item \";\n else\n orderhtml += \"<div>\" + numberOfItems + \" items \";\n if (paymentMethod == \"Cash On Delivery\") {\n orderhtml += \"<span class=\\\"cc-number\\\">Due on Pickup</span>\";\n }\n else {\n if (cardNumber != \"\") {\n $(\"#carryout #lblPaymentValue\").html(\"PAID, CC ending in \" + cardNumber);\n orderhtml += \"<span class=\\\"cc-number\\\">PAID, \";\n orderhtml += \"<span class=\\\"cc-number\\\"> CC \" + cardNumber + \"</span></span>\";\n }\n else {\n orderhtml += \"<span class=\\\"cc-number\\\">PAID</span>\";\n }\n }\n orderhtml += \"</div>\";\n\n orderhtml += \"</div>\";\n\n\n orderhtml += \"</div>\";\n orderhtml += \"</div>\";\n\n /*------------------Order Info-----------------------*/\n\n\n orderhtml += \"</div>\";\n\n\n //New Customer Address Area - Start - 08.30.2019\n\n orderhtml += \"<div class=\\\"order-row-container\\\">\";\n orderhtml += \"<div class=\\\"giftcard-customer\\\" style=\\\"width:100%;\\\">\";\n orderhtml += \"<div class=\\\"giftcard-customer-detail-container\\\">\";\n orderhtml += \"<div id=\\\"popupCustomerEmail_\" + orderId + \"\\\" class=\\\"display-label-wrap\\\">\" + email + \"</div>\";\n //Delivery Address\n if (ordertype == \"Delivery\") {\n var customerFinalAddress = \"\";\n if (address1 != \"\") {\n customerFinalAddress += address1;\n ////orderhtml += \"<div class=\\\"display-label-wrap\\\" style=\\\"padding-top:5px;\\\">\" + address1 + \"</div>\";\n }\n if (address2 != \"\") {\n if (customerFinalAddress != \"\") {\n customerFinalAddress += \", \" + address2;\n }\n else {\n customerFinalAddress += address2;\n }\n ////orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + address2 + \"</div>\";\n }\n //if (city != \"\") {\n // orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + city + \"</div>\";\n //}\n if (state != \"\" && zip != \"\") {\n if (city != \"\") {\n if (customerFinalAddress != \"\") {\n customerFinalAddress += \", \" + city + \", \" + state + \" \" + zip;\n }\n else {\n customerFinalAddress += city + \", \" + state + \" \" + zip;\n }\n ////orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + city + \", \" + state + \" \" + zip + \"</div>\";\n }\n else {\n if (customerFinalAddress != \"\") {\n customerFinalAddress += \", \" + city + \", \" + zip;\n }\n else {\n customerFinalAddress += city + \", \" + zip;\n }\n //orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + state + \" \" + zip + \"</div>\";\n }\n }\n else if (state != \"\" && zip == \"\") {\n if (city != \"\") {\n if (customerFinalAddress != \"\") {\n customerFinalAddress += \", \" + city + \", \" + state;\n }\n else {\n customerFinalAddress += city + \", \" + state;\n }\n ////orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + city + \", \" + state + \"</div>\";\n }\n else {\n if (customerFinalAddress != \"\") {\n customerFinalAddress += \", \" + state;\n }\n else {\n customerFinalAddress += state;\n }\n ////orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + state + \"</div>\";\n }\n }\n else if (state == \"\" && zip != \"\") {\n if (city != \"\") {\n if (customerFinalAddress != \"\") {\n customerFinalAddress += \", \" + city + \", \" + zip;\n }\n else {\n customerFinalAddress += city + \", \" + zip;\n }\n ////orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + city + \", \" + zip + \"</div>\";\n }\n else {\n if (customerFinalAddress != \"\") {\n customerFinalAddress += \", \" + zip;\n }\n else {\n customerFinalAddress += zip;\n }\n ////orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + zip + \"</div>\";\n }\n }\n if (customerFinalAddress != \"\" && customerFinalAddress != \"undefined\") {\n orderhtml += \"<div class=\\\"display-label-wrap\\\">\" + customerFinalAddress + \"</div>\";\n }\n else {\n orderhtml += \"<div class=\\\"display-label-wrap\\\"></div>\";\n }\n }\n\n orderhtml += \"</div>\";\n orderhtml += \"</div>\";\n orderhtml += \"</div>\";\n\n //New Customer Address Area - End - 08.30.2019\n /*------------------2nd Row-----------------------*/\n orderhtml += \"</div>\";\n /*------------------Column 2-----------------------*/\n\n orderhtml += \"</div>\";\n /*------------------Order Row-----------------------*/\n\n\n orderhtml += \"</div>\";\n if (authorizationCode != null && authorizationCode!=\"\")\n orderhtml += \"<input type=\\\"hidden\\\" id=\\\"hdnAuthorizationId_\" + id + \"\\\" value=\\\"\" + authorizationCode + \"\\\"/>\";\n else {\n orderhtml += \"<input type=\\\"hidden\\\" id=\\\"hdnAuthorizationId_\" + id + \"\\\" value=\\\"\\\"/>\";\n }\n if (paymentMethod != null)\n orderhtml += \"<input type=\\\"hidden\\\" id=\\\"hdnPaymentmethod_\" + id + \"\\\" value=\\\"\" + paymentMethod + \"\\\"/>\";\n /*------------------Order Area-----------------------*/\n\n $(\"#carryout #dvOrderInfo\").html(orderhtml);\n //console.log(orderhtml);\n\n });\n\n url = global + \"/GetCarryOutOrderItemDetails?orderid=\" + id;\n $.getJSON(url, function (data) {\n //console.log(\"Histor: \" + data);\n if (data.indexOf(\"No record(s) found.\") > -1) {\n $(\"#carryout #dvItem\").html(\"No record(s) found.\");\n\n }\n else {\n html += \"<table id=\\\"tbl_\" + id + \"\\\" class=\\\"table table-striped\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\"> \";\n html += \"<thead><tr>\";\n html += \"<th style=\\\"text-align:left;\\\">Item</th>\";\n html += \"<th style=\\\"text-align:center;\\\">Qty</th>\";\n html += \"<th style=\\\"text-align:right;\\\">Price</th>\";\n html += \"<th style=\\\"text-align:right;\\\">Amount</th>\";\n html += \"</tr></thead>\";\n html += \"<tbody>\";\n $.each(JSON.parse(data), function (index, value) {\n\n if (value.NOTES != \"\") {\n html += \"<tr><td style='border-bottom:none !important;font-weight:bold;'>\" + value.PRODUCT + \"</td>\";\n html += \"<td style=\\\"text-align:center;border-bottom:none !important;\\\">\" + value.QUANTITY + \"</td>\";\n html += \"<td style=\\\"text-align:right;border-bottom:none !important;\\\">\" + FormatDecimal(value.UNITPRICE) + \"</td>\";\n html += \"<td style=\\\"text-align:right;border-bottom:none !important;\\\">\" + FormatDecimal(value.TOTALPRICE) + \"</td>\";\n html += \"</tr>\";\n value.NOTES = value.NOTES.replace(\"Special Instructions\", \"Notes\");\n\n var arrNotes = [];\n if (value.NOTES.indexOf(\"<strong>\") > -1) {\n arrNotes = value.NOTES.split('<strong>');\n }\n if (arrNotes.length > 1) {\n for (var i = 1; i < arrNotes.length; i++) {\n var notesValue = arrNotes[i];\n\n if (i == 1) {\n notesValue = notesValue.replace(/<i>[\\s\\S]*?<\\/i>/, ' ');\n notesValue = notesValue.replace(\"</strong>:\", \"- \");\n html += \"<tr><td colspan='4' style='padding:0 0 0 5px'>\" + notesValue.replace(\"</strong>\", \"\") + \" </td></tr>\";\n }\n else {\n notesValue = notesValue.replace(/<i>[\\s\\S]*?<\\/i>/, ' ');\n notesValue = notesValue.replace(\"</strong>:\", \"- \");\n html += \"<tr><td colspan='4' style='padding:0 0 0 5px'>\" + notesValue.replace(\"</strong>\", \"\") + \" </td></tr>\";\n }\n }\n }\n\n }\n else {\n html += \"<tr><td style='font-weight:bold;'>\" + value.PRODUCT + \"</td>\";\n html += \"<td style=\\\"text-align:center;\\\">\" + value.QUANTITY + \"</td>\";\n html += \"<td style=\\\"text-align:right;\\\">\" + FormatDecimal(value.UNITPRICE) + \"</td>\";\n html += \"<td style=\\\"text-align:right;\\\">\" + FormatDecimal(value.TOTALPRICE) + \"</td>\";\n html += \"</tr>\";\n }\n\n });\n }\n //alert(taxValue);\n if (htmlDiscount != \"\" || htmlRewards != \"\" || htmlGiftCard != \"\") {\n //alert(\"Html\");\n htmlSubTotal = \" <tr>\";\n htmlSubTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Subtotal:</td>\";\n if (taxValue != \"\" && taxValue != \"0.00\") {\n htmlSubTotal += \"<td style=\\\"text-align:right;\\\">\" + subTotalWithoutTax + \"</td>\";\n }\n else {\n htmlSubTotal += \"<td style=\\\"text-align:right;\\\">\" + FormatDecimal(subtotalvalue) + \"</td>\";\n }\n htmlSubTotal += \"</tr>\";\n\n\n if (shippingValue != \"\" && shippingValue != \"0.00\") {\n htmlOrderTotal += \" <tr>\";\n htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Delivery:</td>\";\n htmlOrderTotal += \"<td style=\\\"text-align:right;\\\">\" + shippingValue + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n }\n\n if (tipValue != \"\" && tipValue != \"0.00\") {\n htmlOrderTotal += \" <tr>\";\n htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Tip:</td>\";\n htmlOrderTotal += \"<td style=\\\"text-align:right;\\\">\" + tipValue + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n }\n\n if (taxValue != \"\" && taxValue != \"0.00\") {\n htmlOrderTotal += \" <tr>\";\n htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Tax:</td>\";\n htmlOrderTotal += \"<td style=\\\"text-align:right;\\\">\" + taxValue + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n } \n\n if (serviceFeeValue != \"\" && serviceFeeValue != \"0.00\") {\n htmlOrderTotal += \" <tr>\";\n htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Convenience Fee:</td>\";\n htmlOrderTotal += \"<td style=\\\"text-align:right;\\\">\" + serviceFeeValue + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n } \n\n\n htmlOrderTotal += \" <tr>\";\n htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Order Total:</td>\";\n htmlOrderTotal += \"<td style=\\\"text-align:right;\\\">\" + grandTotalvalue + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n\n //if (refundValue != \"\" && refundValue != \"0.00\") {\n // htmlOrderTotal += \" <tr>\";\n // htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Refund:</td>\";\n // htmlOrderTotal += \"<td style=\\\"text-align:right;\\\">\" + refundValue + \"</td>\";\n // htmlOrderTotal += \"</tr>\";\n //}\n \n }\n else {\n //alert(\"Else\");\n htmlSubTotal = \" <tr>\";\n htmlSubTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Subtotal:</td>\";\n if (taxValue != \"\" && taxValue != \"0.00\")\n {\n htmlSubTotal += \"<td style=\\\"text-align:right;\\\">\" + subTotalWithoutTax + \"</td>\";\n }\n else {\n htmlSubTotal += \"<td style=\\\"text-align:right;\\\">\" + FormatDecimal(subtotalvalue) + \"</td>\";\n }\n htmlSubTotal += \"</tr>\";\n\n if (shippingValue != \"\" && shippingValue != \"0.00\") {\n htmlOrderTotal += \" <tr>\";\n htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Delivery:</td>\";\n htmlOrderTotal += \"<td style=\\\"text-align:right;\\\">\" + shippingValue + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n }\n\n if (tipValue != \"\" && tipValue != \"0.00\") {\n htmlOrderTotal += \" <tr>\";\n htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Tip:</td>\";\n htmlOrderTotal += \"<td style=\\\"text-align:right;\\\">\" + tipValue + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n }\n\n if (taxValue != \"\" && taxValue != \"0.00\") {\n //alert(\"Tax\");\n htmlOrderTotal += \" <tr>\";\n htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Tax:</td>\";\n htmlOrderTotal += \"<td style=\\\"text-align:right;\\\">\" + taxValue + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n }\n\n if (serviceFeeValue != \"\" && serviceFeeValue != \"0.00\") {\n htmlOrderTotal += \" <tr>\";\n htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Convenience Fee:</td>\";\n htmlOrderTotal += \"<td style=\\\"text-align:right;\\\">\" + serviceFeeValue + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n }\n\n \n htmlOrderTotal += \" <tr>\";\n htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Order Total:</td>\";\n htmlOrderTotal += \"<td style=\\\"text-align:right;\\\">\" + grandTotalvalue + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n\n //if (refundValue != \"\" && refundValue != \"0.00\") {\n // htmlOrderTotal += \" <tr>\";\n // htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Refund:</td>\";\n // htmlOrderTotal += \"<td style=\\\"text-align:right;\\\">\" + refundValue + \"</td>\";\n // htmlOrderTotal += \"</tr>\";\n //} \n }\n\n \n //Order Refund and Add Charged Section Start\n url = global + \"/GetCarryoutOrderAdjustments?orderid=\" + id;\n $.getJSON(url, function (data) {\n if (data.indexOf(\"No record(s) found.\") > -1) {\n if (curbsidePickup) {\n if (curbsidePickupMessage != \"\" && curbsidePickupMessage != undefined) {\n htmlOrderTotal += \"<table class=\\\"table table-striped\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\"><thead>\"\n htmlOrderTotal += \"<tr>\";\n htmlOrderTotal += \"<td valign=\\\"top\\\" style=\\\"text-align:left; font-weight: bold;\\\">Curbside:</td>&nbsp;&nbsp;\";\n htmlOrderTotal += \"<td style=\\\"text-align:left;\\\">\" + curbsidePickupMessage + \" (\" + curbsidePickupTime + \")\" + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n htmlOrderTotal += \"</thead></table>\";\n }\n }\n if (dueAmount > 0) {\n $(\"#carryout #dvItem\").html(html + htmlSubTotal + htmlDiscount + htmlRewards + htmlGiftCard + htmlOrderTotal + htmlDueAmount + \"</tbody>\");\n }\n else {\n $(\"#carryout #dvItem\").html(html + htmlSubTotal + htmlDiscount + htmlRewards + htmlGiftCard + htmlOrderTotal + \"</tbody>\");\n }\n }\n else {\n $.each(JSON.parse(data), function (index, value) {\n var adjustmentType = \"\";\n var adjustmentNotes = \"\";\n var adjustmentAmont = \"\";\n if(value.Type != \"\")\n {\n adjustmentType = value.Type;\n \n if (adjustmentType != \"Charge\")\n adjustmentType = \"Refund\";\n }\n if (value.Notes != \"\") {\n adjustmentNotes = value.Notes;\n }\n if (value.Amount != \"\") {\n adjustmentAmont = FormatDecimal(value.Amount);\n }\n\n htmlOrderTotal += \"<tr>\";\n htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">\" + adjustmentType + \":<br/><span style=\\\"text-align:right; font-weight: normal;\\\">(\" + adjustmentNotes + \")</span></td>\";\n htmlOrderTotal += \"<td style=\\\"text-align:right;vertical-align: top;\\\">\" + adjustmentAmont + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n });\n\n\n htmlOrderTotal += \"<tr>\";\n htmlOrderTotal += \"<td colspan=\\\"3\\\" style=\\\"text-align:right; font-weight: bold;\\\">Final Amount:</td>\";\n htmlOrderTotal += \"<td style=\\\"text-align:right;\\\" id=\\\"popupOrderFinalAmount_\" + orderId + \"\\\">\" + finalOrderTotal + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n\n if (curbsidePickup) {\n if (curbsidePickupMessage != \"\" && curbsidePickupMessage != undefined) {\n htmlOrderTotal += \"<table class=\\\"table table-striped\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\"><thead>\"\n htmlOrderTotal += \"<tr>\";\n htmlOrderTotal += \"<td valign=\\\"top\\\" style=\\\"text-align:left; font-weight: bold;\\\">Curbside:</td>&nbsp;&nbsp;\";\n htmlOrderTotal += \"<td style=\\\"text-align:left;\\\">\" + curbsidePickupMessage + \" (\" + curbsidePickupTime + \")\" + \"</td>\";\n htmlOrderTotal += \"</tr>\";\n htmlOrderTotal += \"</thead></table>\";\n }\n }\n\n if (dueAmount > 0) {\n $(\"#carryout #dvItem\").html(html + htmlSubTotal + htmlDiscount + htmlRewards + htmlGiftCard + htmlOrderTotal + htmlDueAmount + \"</tbody>\");\n }\n else {\n $(\"#carryout #dvItem\").html(html + htmlSubTotal + htmlDiscount + htmlRewards + htmlGiftCard + htmlOrderTotal + \"</tbody>\");\n }\n }\n });\n\n //Order Refund and Add Charged Section End\n\n\n \n //console.log($(\"#dvItem\").html());\n //alert($(\"#dvCarryOutDetailsInner\").html());\n //alert($(\"#dvItem\").html());\n ////$('#dvDetailsPanel').html($('#carryout #dvCarryOutDetailsInner').html());\n\n });\n var currentOpenTabId = $(\"#carryout .tab-active\").attr('id');\n if (currentOpenTabId == 1) {\n var divDetails = $('#carryout #dvCarryOutDetailsInner').detach();\n divDetails.appendTo('#carryout #divTabCurrentDetails');\n\n } else if (currentOpenTabId == 3) {\n //$(\"#divTabAllDetails\").html($(\"#dvCarryOutDetailsInner\").html());\n var divDetails = $('#carryout #dvCarryOutDetailsInner').detach();\n divDetails.appendTo('#carryout #divTabAllDetails');\n }\n //$(\"#divLowerCancelButtonArea\").show();\n\n });\n }\n}", "function getDetail(orderNo, req)\r\n{\r\n url = $(\"#URL\").val();\r\n \r\n $.post(url+'/single',{'order_no':orderNo,'request_for':req},function(res){\r\n $(\"#order_detail\").html(res);\r\n $(\"#myModal\").modal('show');\r\n });\r\n \r\n}", "function shoppingCartdetails() {\n // DomainName = \"localhost:50444\";\n openPopup(\"http://\" + DomainName + \"/ShoppingCart/Index?r=\" + Math.floor(Math.random() * 10001), 960);\n}", "function refreshDetail(orderDetail) {\n var id = orderDetail.Product.Id;\n\n var $orderDetail = $('#item-' + id);\n var $name = $orderDetail.find('.item-name');\n var $unitPrice = $orderDetail.find('.item-unit-price');\n var $quantity = $orderDetail.find('.item-qty-ct');\n var $extendedPrice = $orderDetail.find('.item-extended-price');\n var $shipping = $orderDetail.find('.item-shipping');\n var $totalPrice = $orderDetail.find('.item-total-price');\n\n $name.text(orderDetail.Product.Name);\n $unitPrice.text('$' + orderDetail.UnitPrice.toFixed(2));\n $quantity.text(orderDetail.Quantity);\n $extendedPrice.text('$' + orderDetail.ExtendedPrice.toFixed(2));\n $shipping.text('$' + orderDetail.Shipping.toFixed(2));\n $totalPrice.text('$' + orderDetail.TotalPrice.toFixed(2));\n}", "function showDetails() {\n focus.style(\"opacity\", 1);\n focusText.style(\"opacity\",1);\n focusLineX.style(\"opacity\", 1);\n focusLineY.style(\"opacity\", 1);\n }", "function ordersView(orders){\n\n clearview();\n\n changetitle(\"List of All Orders\");\n\n $(\"#contentviewadmin\").html(`\n \n <div id=\"orderview\">\n \n <div class=\"row\">\n <ul id=\"orderlist\" class=\"list-group\">\n <li id=\"orderuserheader\" class=\"listheaderview list-group-item\">\n <div class=\"row\">\n <div class=\"col-1\">\n ID\n </div>\n <div class=\"col-2\">\n Cashier\n </div>\n <div class=\"col-3\">\n Date\n </div>\n <div class=\"col-2\">\n Value\n </div>\n <div class=\"col-2\">\n Margin\n </div>\n <div class=\"col-2\">\n Actions\n </div>\n </div>\n </li>\n </ul>\n </div> \n </div>\n \n `)\n\n for (let idf in orders){\n\n let order = orders[idf];\n\n let id = order.id;\n let date = order.date;\n let cashierName = order.cashier.name;\n let value = order.value;\n let margin = order.margin;\n\n //Button id\n let productlist = `productlist-id-${id}`\n let modalviewid = `modal-product-list-${id}`\n let orderDetailsIDproduct = `productvieworder-id-${id}`\n\n $(`#orderlist`).append(`\n \n <li id=\"orderuserheader\" class=\"listheaderview list-group-item\">\n <div class=\"row\">\n <div class=\"col-1\">\n ${id}\n </div>\n <div class=\"col-2\">\n ${cashierName}\n </div>\n <div class=\"col-3\">\n ${date}\n </div>\n <div class=\"col-2\">\n $${value}\n </div>\n <div class=\"col-2\">\n $${margin}\n </div>\n <div class=\"col-2\">\n <button type=\"button\" class=\"btn btn-primary\" id=\"${productlist}\">Order Details</button>\n </div>\n </div>\n </li>\n \n <div id=\"${modalviewid}\">\n <ul id=\"${orderDetailsIDproduct}\" class=\"list-group\">\n <li class=\"list-group-item\">\n <div class=\"row\">\n <div class=\"col-3\">Name</div>\n <div class=\"col-3\">Price</div>\n <div class=\"col-3\">Cost</div>\n <div class=\"col-3\">Margin</div>\n </div> \n </li> \n </ul>\n </div>\n \n `)\n\n orderListOfProducts(order, orderDetailsIDproduct);\n\n jQuery(`#${productlist}`).on(\"click\", function (){\n jQuery(`#${modalviewid}`).dialog(\"open\");\n })\n\n $(`#${modalviewid}`).dialog({\n autoOpen: false,\n height: \"auto\",\n width: 600,\n modal: true,\n show: {\n effect: \"fade\",\n duration: 500\n },\n hide: {\n effect: \"fade\",\n duration: 500\n }\n })\n\n\n }\n\n loadhide();\n\n $(\"#contentviewadmin\").fadeIn();\n\n}", "notifyShowDetail(evt) {\n evt.preventDefault();\n\n this.dispatchEvent(\n new CustomEvent('showdetail', {\n bubbles: true,\n composed: true,\n detail: { productId: this.displayData.id }\n })\n );\n }", "showOrder (element){\r\n element.appendChild(document.createElement('hr'));\r\n var orderEl = document.createElement(\"P\");\r\n orderEl.innerHTML = \"<b> Ordre ID: </b>\" + this.orderId + \"</b></br></br><b> Bruger ID</b>: \"\r\n + this.userId + \"</br></br><b>Dato for leje: </b>\" + this.orderDay\r\n + \"/\" + this.orderMonth + \"/\" + this.orderYear + \"</br></br>\"\r\n + \"<b>Tidspunkt for leje: kl. </b>\" + this.timePeriod + \"</br></br>\"\r\n + \"<b>Pris total: </b> \" + this.orderPrice\r\n + \"</br></br> <b> Ordre lavet d. : </b>\" + this.order_placed_at;\r\n element.appendChild(orderEl);\r\n\r\n //Calling the showProducts method from the Orderproduct class on the objects to display those as well\r\n this.products.forEach((item)=>{\r\n item.showProducts(element);\r\n });\r\n element.appendChild(document.createElement('hr'));\r\n }", "function showDetails(item) {\n pokemonRepository.loadDetails(item).then(function () {\n console.log(item);\n showModal(item);\n });\n }", "function showDetails() {\n _('infoDiv').innerHTML = infoText;\n _('infoPanel').style.display = 'block';\n}", "expandDetailsWhenPrinting() {\n const details = Array.from(document.querySelectorAll('details'));\n details.map(detail => detail.open = true);\n }", "function openModal() {\n getRecipeDetails();\n handleShow();\n }", "function btnDetail(orderId){\n $(\"#ldModal\").modal({\n backdrop:false,\n keyboard:false\n });\n $.ajax({\n type: \"POST\",\n url: \"/order/detail\",\n cache:false,\n data:{oid:orderId}\n }).done(function(data, textStatus){\n data = data.data;\n clearOdModal();\n $(\"#odid\").html(data.orderID);\n $(\"#odCTime\").html(data.orderDate);\n $(\"#odName\").html(data.product.name);\n $(\"#odDate\").html(data.startDate);\n $(\"#odPrice\").html(data.price.price);\n $(\"#odQty\").html(data.quantity);\n $(\"#odRemark\").val(data.remark);\n $(\"#odRemark\").attr('disabled',true);\n $(\"#odTotal\").html(data.totalPrice);\n var names = [];\n var phones = [];\n names.push(data.customer&&data.customer.name?data.customer.name:\"\");\n phones.push(data.customer&&data.customer.mobile?data.customer.mobile:\"\");\n htmlOrderDetailCustomers(1,names,phones);\n $(\"#ldModal\").modal(\"hide\");\n $(\"#btnOdSave\").hide();\n $(\"#btnOdSave\").attr(\"oid\",\"\");\n $(\"#odModal\").modal();\n }).fail(function(){\n $(\"#ldModal\").modal(\"hide\");\n alert(\"网络异常,请重试!\");\n });\n}", "function ShowDetailsDialog(){\n $('#DetailsDialog').dialog('open');\n}", "function showPopupElementFormular() {\r\n $(\"#\" + global.Element.PopupElementFormular).modal(\"show\");\r\n }", "displayMoreInformationPopup (item) {\n $(item).popup('show')\n }", "showOrderOptions(element) {\n\t\tlet x = document.getElementById(\"orderOptions\");\n\t\tif (x.style.display === \"none\") {\n\t\t\tx.style.display = \"initial\";\n\t\t} else {\n\t\t\tx.style.display = \"none\";\n\t\t}\n\t}", "function _openSaveOrderModal() {\n return _openGenericModal({\n templateUrl: 'modules/core/views/modal/saveOrderModal.client.view.html',\n controller: 'deleteModalCtrl'\n });\n }", "function make_details_window(hash) {\r\n\t\twindow.open(\"details.html?hash=\" + hash); // or use window.location if errors\t\t\r\n\t}", "function showDetail(evt) {\r\n evt = (evt) ? evt : ((window.event) ? window.event : null);\r\n var item, content, div;\r\n if (evt) {\r\n var select = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);\r\n if (select && select.options.length > 1) {\r\n // copy <content:encoded> element text for\r\n // the selected item\r\n item = req.responseXML.getElementsByTagName(\"item\")[select.value];\r\n content = getElementTextNS(\"content\", \"encoded\", item, 0);\r\n div = document.getElementById(\"details\");\r\n div.innerHTML = \"\";\r\n // blast new HTML content into \"details\" <div>\r\n div.innerHTML = content;\r\n }\r\n }\r\n}", "function show_details(event)\n{\n var target = $(event.target);\n var details = $( 'tr[ordernumber=\"'+target.attr('ordernumber')+'\"]')\n\n if( target.html().substr(0,6) !== 'Sakrij'){ // otrij detalje\n details.show();\n target.html('Sakrij detalje &#8595;');\n }\n else{ // sakrij detalje\n details.hide();\n target.html('Prikaži detalje &#8592;');\n }\n\n}", "function showDetails(pokemon){\n pokemonRepository.loadDetails(pokemon).then(function() {\n // creates Modal\n var modal = $('.modal-body');\n /*eslint no-unused-vars: [\"error\", { \"varsIgnorePattern\": \"name\" }]*/\n var name = $('.modal-title').text(pokemon.name);\n\t\t\tvar height = $('<p class=\"pokemon-height\"></p>').text('Height: ' + pokemon.height + ' Decimetres.');\n\t\t\tvar weight = $('<p class=\"pokemon-weight\"></p>').text('Weight: ' + pokemon.weight + ' Hectograms.');\n var type = $('<p class=\"pokemon-type\"></p>').text('Type: ' + pokemon.types + '.');\n var image = $('<img class=\"pokemon-picture\">');\n image.attr('src', pokemon.imageUrl);\n\n if(modal.children().length) {\n modal.children().remove();\n }\n\n modal.append(image)\n\t\t\t\t.append(height)\n\t\t\t\t.append(weight)\n .append(type);\n });\n }", "function viewOrder(or_id) {\n $.ajax({\n url: '../Orders/invoice.php?order_id='+or_id, // url where to submit the request\n type: \"GET\", // type of action POST || GET\n success: function (data) {\n\n $(\"#mViewOrder\").html(data);\n $('#viewOrder').modal('show');\n\n },\n error: function (result) {\n console.log(result);\n }\n });\n\n\n}", "function showDetails(pokemon) {\n\t \tloadDetails(pokemon).then(function () {\n\t \tshowModal(pokemon.imageUrl, pokemon.name, pokemon.height)\n\t\t });\n\t\t}", "function showDetails(demo){\nconsole.log(`Name: ${demo.bookTitle}, price: ${demo.price} `)\n}", "async function orderShow(req, res){\n let user = await User.findById(req.user._id)\n if(!user) return res.status(421).json(errorMessage(\"cannot find user\"));\n\n const showById = await Order.findById(req.params.id).populate();\n if(!showById) return res.status(422).json(errorMessage(\"cannot find Order\"));\n\n res.status(200).json(success(showById, \"here is order list:\"))\n}", "function renderPurchaseOrder(name, data, parameters={}, options={}) {\n\n var html = '';\n\n if (data.supplier_detail) {\n thumbnail = data.supplier_detail.thumbnail || data.supplier_detail.image;\n\n html += select2Thumbnail(thumbnail);\n }\n\n html += `<span>${data.reference}</span>`;\n\n var thumbnail = null;\n\n if (data.supplier_detail) {\n html += ` - <span>${data.supplier_detail.name}</span>`;\n }\n\n if (data.description) {\n html += ` - <em>${trim(data.description)}</em>`;\n }\n\n html += renderId('{% trans \"Order ID\" %}', data.pk, parameters);\n\n return html;\n}", "function goToChangeOrder(edit) {\n clearTabs_CHANGE_ORDER();\n $('.editProject').hide();\n $('#changeOrder').show();\n $('#changeOrderInfo').addClass('active');\n setCurrentDivLocation('changeOrder');\n console.log('EDIT = ', edit);\n if (edit == 0) {\n edit_CHANGE_ORDER = 'false';\n $('#deleteChangeOrderButton').hide();\n } else {\n edit_CHANGE_ORDER = 'true';\n $('#deleteChangeOrderButton').show();\n }\n\n getDropdownInfo_CHANGE_ORDER();\n}", "productDetails() {\n alert(\"You clicked on the product details!\");\n }", "function showOrdersHistoryTable(){\n showPagesHelper(\"#ordersHistoryTable\");\n}", "function showDetails(itemName) {\n var item = pokemonRepository.search(itemName); // get object for this name\n pokemonRepository.loadDetails(item).then(function() {\n showModal(item);\n });\n }", "function showDetails(placeResult, marker, status) {\n if (status == google.maps.places.PlacesServiceStatus.OK) { //Show info window when user clicks on a marker\n let placeInfowindow = new google.maps.InfoWindow();\n const newLocal = \"<div>\";\n placeInfowindow.setContent(\n '<h4>' +\n placeResult.name +\n '</h4>' +\n \"<b>Address:</b> \" +\n \"<div>\" +\n placeResult.formatted_address +\n \"</div>\" +\n \"<div>\" +\n \"<b>Phone no:</b> \" +\n placeResult.formatted_phone_number +\n \"</div>\" +\n \"<div>\" +\n \"<b>Website:</b> \" +\n placeResult.website +\n \"</div>\" +\n \"<div>\" +\n \"<b>Rating:</b> \" +\n placeResult.rating +\n \"</div>\" +\n \"<div>\" +\n \"<b>Price level:</b> \" +\n placeResult.price_level +\n \"</div>\"\n );\n placeInfowindow.open(marker.map, marker);\n currentInfoWindow.close();\n currentInfoWindow = placeInfowindow;\n\n showDetails(placeResult);\n } else {\n console.log(\"showDetails failed: \" + status);\n }\n}", "function showOrder(mode, var_content, file)\n{\n\tvar url;\n\tif (file.match(/^https?:\\/\\//))\n\t\turl = file;\n\telse\n\t\turl = baseDir + file + '.php';\n\n\t$.get(\n\t\turl,\n\t\t((mode == 1) ? {'id_order': var_content, 'ajax': true} : {'id_order_return': var_content, 'ajax': true}),\n\t\tfunction(data)\n\t\t{\n\t\t\t$('#block-order-detail').fadeOut('slow', function()\n\t\t\t{\n\t\t\t\t$(this).html(data);\n\t\t\t\t/* if return is allowed*/\n\t\t\t\tif ($('div#order-detail-content table td.order_cb').length > 0)\n\t\t\t\t{\n\t\t\t\t\t//return slip : check or uncheck every checkboxes\n\t\t\t\t\t$('form div#order-detail-content th input[type=checkbox]').click(function()\n\t\t\t\t\t{\n\t\t\t\t\t\t\t$('form div#order-detail-content td input[type=checkbox]').each(function()\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.checked = $('form div#order-detail-content th input[type=checkbox]').is(':checked');\n\t\t\t\t\t\t\t\tupdateOrderLineDisplay(this);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\t//return slip : enable or disable 'global' quantity editing\n\t\t\t\t\t$('form div#order-detail-content td input[type=checkbox]').click(function()\n\t\t\t\t\t{\n\t\t\t\t\t\tupdateOrderLineDisplay(this);\n\t\t\t\t\t});\n\t\t\t\t\t//return slip : limit quantities\n\t\t\t\t\t$('form div#order-detail-content td input.order_qte_input').keyup(function()\n\t\t\t\t\t{\n\t\t\t\t\t\tvar maxQuantity = parseInt($(this).parent().find('span.order_qte_span').text());\n\t\t\t\t\t\tvar quantity = parseInt($(this).val());\n\t\t\t\t\t\tif (isNaN($(this).val()) && $(this).val() != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$(this).val(maxQuantity);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (quantity > maxQuantity)\n\t\t\t\t\t\t\t\t$(this).val(maxQuantity);\n\t\t\t\t\t\t\telse if (quantity < 1)\n\t\t\t\t\t\t\t\t$(this).val(1);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t//catch the submit event of sendOrderMessage form\n\t\t\t\t$('form#sendOrderMessage').submit(function(){\n\t\t\t\t\treturn sendOrderMessage();\n\t\t\t});\n\t\t\t$(this).fadeIn('slow');\n\t\t\t$.scrollTo(this, 1200);\n\t\t});\n\t});\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 showStdPageDetailsClick() {\r\n if (detailsShown || !recordId) {\r\n return;\r\n }\r\n document.querySelector('#showStdPageDetailsBtn').disabled = true;\r\n detailsShown = true;\r\n document.querySelector('#showStdPageDetailsBtn').classList.add(\"loading\");\r\n parent.postMessage({insextShowStdPageDetails: true}, \"*\");\r\n addEventListener(\"message\", function messageHandler(e) {\r\n if (e.source == parent && e.data.insextShowStdPageDetails) {\r\n removeEventListener(\"message\", messageHandler);\r\n document.querySelector('#showStdPageDetailsBtn').classList.remove(\"loading\");\r\n if (e.data.success) {\r\n closePopup();\r\n } else {\r\n document.querySelector('#showStdPageDetailsBtn').disabled = false;\r\n detailsShown = false;\r\n }\r\n }\r\n });\r\n }", "function showTruckDetails(e, mapname){\n //Get truck coordinates of the truck\n var coordinates = e.features[0].geometry.coordinates.slice();\n var id = e.features[0].properties.id;\n var distToDest = e.features[0].properties.distToDest;\n while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) {\n coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360;\n }\n truckpopup = new mapboxgl.Popup()\n .setLngLat(coordinates)\n .setMaxWidth(\"800px\")\n .addTo(eval(mapname));\n loadPopup(id, mapname);\n\n truckpopup.on('close', function(e) {\n for (i=0; i<trucks.length; i++){\n hideDetails(trucks[i], mapname);\n }\n });\n showRoute(trucks[id], mapname);\n}", "function displayOrders() {\n\n let data = FooBar.getData();\n let json = JSON.parse(data);\n\n //------------------------------ORDERS IN QUEUE-------------------------------------------\n // queue template\n orderTemplate = document.querySelector(\"#queue-template\").content;\n orderParent = document.querySelector(\".orders-waiting-in-queue\");\n\n // clearing the space in template for necht items\n orderParent.innerHTML = '';\n\n // order id for each order and order items for each order\n json.queue.forEach(orderNumber => {\n let clone = orderTemplate.cloneNode(true);\n clone.querySelector('.order').textContent = `Order n. ${(orderNumber.id + 1)} - ${orderNumber.order.join(\", \")} `;\n orderParent.appendChild(clone);\n });\n //------------------------------SERVED ORDERS-------------------------------------------\n // serve template\n serveTemplate = document.querySelector(\"#orders-served\").content;\n serveParent = document.querySelector(\".in-serve\");\n\n // clearing space for served items\n serveParent.innerHTML = '';\n\n // served id for each order and served items for each order\n json.serving.forEach(servedOrder => {\n let clone = serveTemplate.cloneNode(true);\n clone.querySelector('.order-being-served').textContent = `Order nr. ${(servedOrder.id + 1)} - ${servedOrder.order.join(', ')}`;\n serveParent.appendChild(clone);\n\n })\n }", "function showInfoWindow() {\n const marker = this;\n places.getDetails(\n {\n placeId: marker.placeResult.place_id,\n },\n (place, status) => {\n if (status !== google.maps.places.PlacesServiceStatus.OK) {\n return;\n }\n infoWindow.open(map, marker);\n buildIWContent(place);\n }\n );\n}", "function viewIssue() {\n getTicketDetails(\n function (data) {\n client.interface.trigger(\"showModal\", {\n title: \"Github Issue Details\",\n template: \"./modal/modal.html\",\n data: data.ticket,\n });\n },\n function (error) {\n console.error(error);\n }\n );\n}", "openDetails(operationOrOperationId, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const operation = operationOrOperationId.id\n ? operationOrOperationId\n : (yield this.operationService.detail(operationOrOperationId)).data;\n const initialState = Object.assign({ operation }, options);\n this.modalService.show(SingleOperationModalComponent, {\n initialState,\n class: 'modal-lg'\n });\n });\n }", "function showInfoWindow() {\n var marker = this;\n placesService.getDetails({placeId: marker.placeResult.place_id},\n function(place, status) {\n if (status !== google.maps.places.PlacesServiceStatus.OK) {\n return;\n }\n infoWindow.open(map, marker);\n buildIWContent(place);\n });\n }", "function openOrder(wonum, tab)\n{\t\t\n\t$.getJSON(root + \"selfserve/wolookup.jsf?t=\" + tab + \"&search=\" + encodeURIComponent(wonum), function(data) \n\t{\t\t\t\t\t\n\t})\n\t\t.done(function(data)\n\t\t{\n\t\t\tif (data && data.login)\n\t\t\t{\n\t\t\t\tswitchToUrl(loginUrl);\n\t\t\t}\n\t\t})\n\t\t.fail(function()\n\t\t{\n\t\t\tshowMessage(\"Error looking up Work Order.\", \"#woSearchMessages\");\n\t\t})\n\t\t.always(function() \n\t\t{\n\t\t\tswitchToUrl(\"selfserve/workorder.jsf?w=\" + encodeURIComponent(wonum) + \"&p=\" + new Date().getTime());\t\t\n\t\t});\t\n}", "function restaurantDeliverYes(){\n $(\"#Deliveryinfo\").show();\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 }", "static getPrintOrderDetailsByOrderId(id) {\n const sql = `Select \"Product\".\"id\" as idproduct, \"Product\".\"image\", \"Product\".\"name\",\n\t\t\"Order\".\"status\", \"Order\".\"id\",\"Order\".\"orderdate\", \n \"Order\".\"receivedate\", \"Order\".\"total\", \"Order\".\"receiver\", \n \"Order\".\"orderaddress\", \"Order\".\"orderphone\",\n \"OrderDetails\".\"quantity\", \"OrderDetails\".\"price\",\n \"Customer\".\"fistname\",\"Customer\".\"lastname\",\"Customer\".\"phone\", \"Customer\".\"address\"\n\n FROM public.\"OrderDetails\", public.\"Order\", public.\"Product\", public.\"Customer\"\n WHERE \"OrderDetails\".\"idOrder\" = \"Order\".\"id\" \n AND \"Customer\".\"id\" = \"Order\".\"idCustomer\"\n AND \"OrderDetails\".\"idProduct\" = \"Product\".\"id\"\n AND \"Order\".\"id\"= $1`;\n return queryDB(sql, [id]).then(result=> result.rows);\n }", "function showModal() {\n\n $('#myModal').modal(\"show\");\n $(\".modal-title\") .text(data.name)\n $(\".modal-li-1\") .text(\"Accuracy: \" + data.accuracy)\n $(\".modal-li-2\").text(\"PP: \" + data.pp)\n $(\".modal-li-3\").text(\"Power: \" + data.power)\n $(\".modal-li-4\").text(\"Type: \" + data.type.name)\n $(\".modal-li-5\").text(\"Priority: \" + data.priority)\n \n }", "function navigateToReviewOrder(){\n document.getElementById('checkoutBillingInfo').style.display = 'none';\n document.getElementById('checkoutReview').style.display = 'flex';\n}", "function showCart(cart) {\n var cart_info = \"\";\n for (var key in cart) {\n if (cart.hasOwnProperty(key)) {\n cart_info += key + \" : \" + cart[key] + \"\\n\";\n }\n }\n var modal = document.getElementById(\"modal\");\n modal.style.display = \"block\";\n var modalContent = document.getElementById(\"modal-content\");\n renderCart(modalContent, store)\n inactiveTime = 0;\n}", "function showDetails(pokemon) {\n loadDetails(pokemon).then(function(x) {\n const {name,height,sprites, types} = x; \n showModal(name, height, sprites, types);\n });\n}", "function showAddItemPopup()\n{\n\t$(\"#popup_item_desc\").val(\"\");\n\t$(\"#popup_part_no\").val(\"\");\n $(\"#popup_brcd\").val(\"\");\n\t$(\"#popup_quantity\").val(\"\");\n\t$(\"#popup_ship_date\").val(\"\");\n\t$(\"#pop_multiplier\").val(\"\");\n\t$(\"#popup_price\").val(\"\");\n\t\n\t$(\"#quote_add_item_popup\").show();\n\t\n\t$(\"#from_form\").val(\"QuoteForm\");\n\t\n\t$(\"#popup_item_desc\").focus();\n}", "async show(req, res) {\n try {\n const order = await Order.findById(req.params.orderId)\n res.send(order)\n } catch (err) {\n req.status(500).send({\n error: 'The order information was incorrect'\n })\n }\n }", "function showPopupFormular() {\r\n $(\"#\" + global.Element.PopupFormular).modal(\"show\");\r\n }", "function viewInv() {\n\t\n\tlet updateMessage = \"These changes will not be saved, are you sure you want to leave the screen?\";\n\tlet createMessage = \"This Invoice will not be added, are you sure you want to leave this screen?\";\n\tlet displayedMessage;\n\t\n\tif(INV_ACTION == \"createInv\")\n\t\tdisplayedMessage = createMessage;\n\telse \n\t\tdisplayedMessage = updateMessage;\n\t\n\tif(confirm(displayedMessage))\n\t{\n\t\t//document.getElementById('invoiceInformation').style.width = \"100%\";\n\t\t$('#invoiceCreationZone').hide();\n\t\t$('#invoiceDisplay').show();\n\t\t//$('#returnAccountsReceivable').show();\n\t}\n\t\n\t$('#invoiceCreationZone').find('#percentOrAmountRow').hide();\n\t\n\t$('#invoiceCreationZone').find('#invoiceStatusSelectionRow').show();\n}", "static async getDetailOrder() {\n\n }", "_openReservationPopup() {\n let popup = new Popup(this._state.reservation.popup.settings.el, this._state.reservation.productID);\n popup.init();\n }", "function addOrderContent(details) {\n let orderItems = `\n <div class=\"row\">\n <div class=\"col-12 col-md-2\"><img class=\"order-item-image\" src=\".${details.img}\" /></div>\n <div class=\"col-12 col-md-6 \">\n <p class=\"order-item-name\">${details.name}</p>\n </div>\n <div class=\"col-12 col-md-2\"><p class=\"order-item-quantity\">Qty ${details.quantity}</p></div>\n <div class=\"col-12 col-md-2\"><p class=\"order-item-price\">$${(\n Number(details.quantity) * Number(details.price)\n ).toFixed(2)}</p></div>\n </div>`;\n return $(`#items${details.id}`).append(orderItems);\n}", "function renderHTMLOrderDetails(order) {\n document.getElementById('products-details').innerHTML += `\n <article class=\"row mt-5\">\n <div class=\"col-12 px-3\"> \n <h2 class=\"h6\">Commande n° ${order.orderId}</h2>\n </div>\n \n <div class=\"col-12 col-lg-6 py-4 px-3\">\n <ul class=\"list-group\">\n <li class=\"list-group-item d-flex justify-content-between\">Total TTC <span>${getTotalTTCFromProductList(order.products)}</span></li>\n <li class=\"list-group-item d-flex justify-content-between\">\n Nombre d'articles <span>${order.products.length}</span>\n </li>\n </ul>\n \n <div class=\"bg-white border rounded py-3 px-2\">\n ${renderHTMLProductsDetails(order.products)}\n </div>\n </div>\n </article>\n `;\n}", "function viewInv() {\n $('#invoiceTable tr').css('background-color', '');\n\n let updateMessage =\n 'These changes will not be saved, are you sure you want to leave the screen?';\n let createMessage =\n 'This Invoice will not be added, are you sure you want to leave this screen?';\n let displayedMessage;\n\n if (INV_ACTION == 'createInv') displayedMessage = createMessage;\n else displayedMessage = updateMessage;\n\n if (confirm(displayedMessage)) {\n document.getElementById('invoiceInformation').style.width = '100%';\n $('#invoiceCreationZone').hide();\n $('#invoiceDisplay').show();\n $('#returnAccountsReceivable').show();\n }\n\n $('#invoiceCreationZone').find('#percentOrAmountRow').hide();\n\n $('#invoiceCreationZone').find('#invoiceStatusSelectionRow').show();\n}", "function showInfoWindow() {\n var marker = this\n places.getDetails({ placeId: marker.placeResult.place_id }, function(\n place,\n status\n ) {\n if (status !== google.maps.places.PlacesServiceStatus.OK) {\n return\n }\n\n buildIWContent(map, marker, place)\n })\n}", "function Details() {\r\n}" ]
[ "0.7481893", "0.7023413", "0.7007606", "0.6848041", "0.678313", "0.67602956", "0.66901714", "0.6659677", "0.6641066", "0.6605719", "0.6430071", "0.64161444", "0.6328122", "0.63279116", "0.6318469", "0.6312908", "0.6213558", "0.6167939", "0.6141929", "0.61068815", "0.6066151", "0.60426545", "0.60421914", "0.6040649", "0.6038937", "0.60370547", "0.60370547", "0.60370547", "0.6008267", "0.6000581", "0.5985335", "0.5983093", "0.5977128", "0.5975523", "0.59668607", "0.5964666", "0.5951896", "0.5945436", "0.593016", "0.5926619", "0.59242606", "0.5915975", "0.5912637", "0.59119195", "0.5909973", "0.5906468", "0.58979934", "0.5895073", "0.588744", "0.5871407", "0.5863736", "0.58635384", "0.5857689", "0.5853684", "0.58466756", "0.58450985", "0.58418787", "0.5827418", "0.5818783", "0.5811673", "0.5809146", "0.5807188", "0.5804778", "0.5797123", "0.5792173", "0.5784718", "0.5780357", "0.5776585", "0.5775872", "0.5774348", "0.57730246", "0.57711184", "0.5754289", "0.57506764", "0.5747388", "0.57434857", "0.5739662", "0.57374936", "0.5736041", "0.57349795", "0.57338315", "0.57300204", "0.572495", "0.5721094", "0.57194346", "0.5713575", "0.5711672", "0.57007", "0.5699223", "0.5688902", "0.56872064", "0.56768686", "0.56713027", "0.5670573", "0.5670332", "0.566425", "0.56537575", "0.5652236", "0.5645055", "0.56374437" ]
0.68300855
4
Create table to show searched data
function renderTable(search_data) { $tbody.innerHTML = ""; for (var i = 0; i < search_data.length; i++) { var sighting = search_data[i]; var fields = Object.keys(sighting); var $row = $tbody.insertRow(i); for (var j = 0; j < fields.length; j++) { var field = fields[j]; var $cell = $row.insertCell(j); $cell.innerText = sighting[field]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_table() {\n \n/* $(\".userdata_search\").html(\"\"); */\n $(\".userdata_search tbody\").html(\"\");\n \n var tbl = $('<table></table>').attr({ class: \"userdata_search\" });\n var row2 = $('<thead></thead>').attr({ class: [\"class5\"].join(' ') }).appendTo(tbl);\n var row = $('<tr></tr>').attr({ class: [\"class1\"].join(' ')}).appendTo(tbl);\n \n\t// $('#result_set_from_search').append('<tr><th>ItemID</th><th>Name</th><th>Category</th></tr>');\n\t \n\t// $('#result_set_from_search tr:last').after('<tr><th>ItemID</th></tr><tr><th>Name</th><th>Category</th></tr>');\n\t \n\t// $('<tr><th>ItemID</th><th>Name</th><th>Category</th></tr>').appendTo(tbl);\n\t\n\t// prepei na ftiaxtei me append to thead ta results apo to query\n\t\n\t$('<th></th>').text(\"ItemID\").appendTo(row);\n $('<th></th>').text(\"Name\").appendTo(row); \n $('<th></th>').text(\"Category\").appendTo(row); \n\t$('<th></th>').text(\"url\").appendTo(row); \n\n tbl.appendTo($(\".userdata_search tbody\")); \n}", "function createTable(UFOdata){\n // clear table of all previous searches\n tbody.html(\"\")\n // Loop through each data entry to create a table row for each entry\n UFOdata.forEach((sighting) => {\n console.log(sighting);\n var row=tbody.append('tr');\n // Add table columns for each key value pair in each entry\n Object.values(sighting).forEach((value) =>{\n console.log(value);\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "showSearch(data) {\n document.getElementById(\"show\").innerHTML = \"\";\n if (data.data.length == 0) {return document.getElementById(\"show\").innerHTML = \"There are no results.\";}\n let show = document.getElementById(\"show\");\n \n show.appendChild(this.generateHeaderTable());\n\n let lng = data.data.length;\n\n for (let x = 0; x < lng; x++) {\n let row = document.createElement(\"tr\");\n let cell1 = document.createElement(\"td\");\n cell1.setAttribute(\"id\", \"aqiBack\");\n let cellText1 = document.createTextNode(_.get(data,['data', x , 'aqi']));\n cell1.appendChild(cellText1); \n \n let checkColor = (_.get(data,['data', x , 'aqi']));\n this.checkColor(checkColor, cell1); \n \n let cell2 = document.createElement(\"td\");\n let cellText2 = document.createTextNode(_.get(data,['data', x ,'time','stime']));\n cell2.appendChild(cellText2);\n\n let cell3 = document.createElement(\"td\");\n let cellText3 = document.createTextNode(_.get(data,['data', x ,'time','tz']));\n cell3.appendChild(cellText3); \n\n let cell4 = document.createElement(\"td\");\n let cellText4 = document.createTextNode(_.get(data,['data', x ,'station', 'name']));\n cell4.appendChild(cellText4); \n \n row.appendChild(cell1); \n row.appendChild(cell2); \n row.appendChild(cell3);\n row.appendChild(cell4);\n\n document.getElementById(\"tableBody\").appendChild(row);\n } \n }", "function filter(filteredData) {\n // Remove existing table so filtered data shows at the top\n d3.selectAll(\"td\").remove();\n console.log(\"Search Results:\", filteredData);\n // Build the new table\n // Use D3 to select the table body\n var tbody = d3.select(\"tbody\");\n filteredData.forEach((filteredTable) => {\n //append one table row per sighting\n var row = tbody.append(\"tr\");\n Object.entries(filteredTable).forEach(([key, value]) => {\n var cell = tbody.append(\"td\");\n cell.text(value);\n });\n }); \n }", "function generateTable(data) {\n noResults.style('display', 'none');\n tableBody.html('');\n table.style('display', 'table');\n data.forEach(result => {\n var row = tableBody.append('tr');\n var date = row.append('td').text(result.datetime).attr('class', 'datetime').on('click', lookUp);\n var city = row.append('td').text(result.city).attr('class', 'city').on('click', lookUp);\n var state = row.append('td').text(result.state).attr('class', 'state').on('click', lookUp);\n var country = row.append('td').text(result.country).attr('class', 'country').on('click', lookUp);\n var shape = row.append('td').text(result.shape).attr('class', 'shape').on('click', lookUp);\n var duration = row.append('td').text(result.durationMinutes).attr('class', 'duration');\n var description = row.append('td').text(result.comments).attr('class', 'description');\n });\n}", "function renderSearch(data) {\r\n const body = buildSearchBody(data);\r\n \r\n const searchTable = `\r\n <table cellpadding=\"3\" cellspacing=\"0\" border=\"0\" style=\"width: 50%; margin: 0 auto 2em auto;\">\r\n <thead> \r\n <tr>\r\n <th>Target</th>\r\n <th>Search text</th>\r\n <th>Treat as regex</th>\r\n </tr>\r\n </thead>\r\n <tbody>${body}<tbody>\r\n </table>\r\n `;\r\n\r\n $('#search-wrapper').append(searchTable);\r\n}", "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredDataSet.length; i++) {\n\n // Get the current object and its fields\n var data = filteredDataSet[i];\n var fields = Object.keys(data);\n\n // Create a new row in the tbody, set the index to be i + startingIndex\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n\n // For every field in the table object, create a new cell at set its inner text to be the current value at the current field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = data[field];\n }\n }\n}", "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredData.length; i++) {\n // Get the current object and its fields\n var data = filteredData[i];\n var fields = Object.keys(data);\n // Create a new row in the tbody, set the index to be i + startingIndex\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = data[field];\n }\n }\n}", "function renderTable() {\n $tbody.innerHTML = '';\n for (var i = 0; i < filteredData.length; i++) {\n // Get get the current UFOData object and its fields\n var UFOData = filteredData[i];\n var fields = Object.keys(UFOData);\n // Create a new row in the tbody, set the index to be i + startingIndex\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n // For every field in the UFOData object, create a new cell at set its inner text to be the current value\n // at the current UFOData's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = UFOData[field];\n }\n }\n}", "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredTable.length; i++) {\n var address = filteredTable[i];\n var fields = Object.keys(address);\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = address[field];\n }\n }\n}", "function newTable(ufoFilter) {\n\n\ttbody.html(\"\");\n\tufoFilter.forEach((ufoEntry) => {\n\t\tvar row = tbody.append(\"tr\");\n\t\tObject.entries(ufoEntry).forEach(([key, value]) => {\n\t\t\tvar cell = tbody.append(\"td\");\n\t\t\tcell.text(value);\n\t\t});\n\t});\n}", "function renderTable() {\n tbody.innerHTML = \"\";\n for (var i = 0; i < filterData.length; i++) {\n // Get the current objects and its fields. Calling each dictionary object 'ovni'. This comes from the data.js database where\n //the object dataSet holds an array (list) of dictionaries. Each dictionary is an object and I'm calling it ovni. This will\n // loop through each dictionary/object from the variable dataSet and store their keys in the variable fields. \n\n var ovni = filterData[i];\n var fields = Object.keys(ovni);\n \n // Create a new row in the tbody, set the index to be i + startingIndex\n // fields are the columns\n var row = tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n // For every field in the address object, create a new cell and set its inner text to be the current value at the current address's field\n // the variable field will gather the columns names. It will loop through the fields(columns). Example, fields index 0 is datetime.\n var field = fields[j];\n var cell = row.insertCell(j);\n // now i will pass to the cell the ovni object, field values.\n cell.innerText = ovni[field];\n }\n }\n}", "function showTable(results) {\n var table = new Table();\n table.push([\n 'ID'.bgRed,\n 'Item Name'.bgRed,\n 'Department Name'.bgRed,\n 'Price'.bgRed,\n 'Stock Quantity'.bgRed]);\n results.forEach(function (row) {\n table.push([\n row.itemId,\n row.productName,\n row.departmentName,\n accounting.formatMoney(row.price),\n accounting.formatNumber(row.stockQuantity)\n ]);\n });\n console.log('' + table);\n}", "function createTable(filteredHotels){\n\tlet table = \"<table><tbody>\";\n\tlet tableend = \"</tbody></table>\";\n\n\tif(filteredHotels.length == 0)\n\t\treturn `${table}${tableend}`;\n\n\tlet keys = Object.keys(filteredHotels[0]);\n\n\t//append headers first\n\ttable += createHeaders(keys);\n\t\n\tfor(let i = 0; i < filteredHotels.length; i++){\n\t\tlet tr = \"\";\n\t\tfor(let j = 0; j < keys.length; j++){\n\t\t\t//ignore vanilla price\n\t\t\tif(keys[j] === \"price\")\n\t\t\t\tcontinue;\n\t\t\tif(keys[j] === \"image_url\"){\n\t\t\t\ttr += wrap(\"td\", `<img src=\"${filteredHotels[i][keys[j]]}\">`);\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttr += wrap(\"td\", filteredHotels[i][keys[j]]);\n\t\t\t}\n\t\t}\n\t\ttr = wrap(\"tr\", tr);\n\t\ttable += tr;\n\t}\n\treturn `${table}${tableend}`;\n}", "function buildTable(data) {\n var tbody = d3.select(\"tbody\");\n tbody.html(\"\");\n if (data.length > 0) {\n data.forEach((UFOSighting) => {\n var row = tbody.append(\"tr\");\n Object.entries(UFOSighting).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n }\n else {\n var row = tbody.append(\"tr\");\n var cell = row.append(\"td\").attr(\"colspan\", 7).attr(\"style\",\"text-align:center;\");\n cell.text(\"No results meeting the criteria were found.\");\n }\n}", "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredData.length; i++) {\n // Get get the current address object and its fields\n var data = filteredData[i];\n var fields = Object.keys(data);\n // Create a new row in the tbody, set the index to be i + startingIndex\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n // For every field in the address object, create a new cell at set its inner text to be the current value at the current address's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = data[field];\n }\n }\n}", "function searchTables(){\n let filter = document.getElementById(\"table-search-bar\").value;\n filter = filter.trim().toLowerCase();\n for(item of tableItems){\n let tableName = \"table \" + item.id;\n if(tableName.indexOf(filter) >=0){\n document.getElementById(\"table-\" + item.id).style.display = \"\";\n }\n else {\n document.getElementById(\"table-\" + item.id).style.display = \"none\";\n }\n }\n }", "function display (dataFiltered) {\n tbody.html(\"\");\n dataFiltered.forEach((report) => {\n var row = tbody.append(\"tr\");\n Object.entries(report).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n })\n })\n}", "function filter(s = false) {\n // Get search term\n let search = document.getElementById(\"search\");\n let filterTerm = search.value.toUpperCase();\n\n // Filter result by search term\n let filtered = employees.filter(e =>\n e.Ho_ten.toUpperCase().includes(filterTerm)\n );\n\n // Filter by department (s is true - this function use in s-manager page)\n if (s) {\n let department = document.querySelector('input[name=\"department\"]:checked')\n .value;\n if (department != \"all\") {\n filtered = filtered.filter(e => e.Don_vi == department);\n }\n }\n\n // Create table contains filtered content\n let tbody = document.getElementById(\"listBody\");\n while (tbody.firstChild) {\n tbody.removeChild(tbody.firstChild);\n }\n\n for (let i = 0; i < filtered.length; i++) {\n let tr = document.createElement(\"tr\");\n\n let th1 = document.createElement(\"th\");\n th1.setAttribute(\"scope\", \"col\");\n th1.innerText = i + 1;\n\n let span = document.createElement(\"span\");\n span.setAttribute(\"class\", \"text-capitalize\");\n span.innerText = filtered[i].Ho_ten;\n\n let th2 = document.createElement(\"th\");\n th2.setAttribute(\"scope\", \"col\");\n th2.appendChild(span);\n\n tr.appendChild(th1);\n tr.appendChild(th2);\n\n if (s) {\n let th3 = document.createElement(\"th\");\n th3.setAttribute(\"scope\", \"col\");\n th3.innerText = filtered[i].Don_vi;\n tr.appendChild(th3);\n }\n\n let a = document.createElement(\"a\");\n a.setAttribute(\"href\", `./${username}/${password}/${filtered[i].CMND}`);\n a.setAttribute(\"target\", \"_blank\");\n a.innerText = \"Chi tiết\";\n let th4 = document.createElement(\"th\");\n th4.setAttribute(\"scope\", \"col\");\n th4.appendChild(a);\n\n tr.appendChild(th4);\n\n tbody.appendChild(tr);\n }\n}", "function buildSearchBody(data) {\r\n let rows = ``;\r\n\r\n for (let i = 0; i < data[0].length; i++) {\r\n rows += `<tr id=\"filter_col${i + 1}\" data-column=\"${i + 1}\">`;\r\n rows += `<td>Column - ${data[0][i]}</td>`;\r\n rows += `<td align=\"center\"><input type=\"text\" class=\"column_filter\" id=\"col${i + 1}_filter\"></td>`;\r\n rows += `<td align=\"center\"><input type=\"checkbox\" class=\"column_filter\" id=\"col${i + 1}_regex\"></td>`\r\n rows += `</tr>`;\r\n }\r\n\r\n return rows;\r\n}", "function resultTable(data){\n \n let tableRow = document.createElement(\"div\") ;\n tableRow.classList.add(\"tr\");\n tableRow.setAttribute(\"id\", \"trKing\");\n let dataWord = document.createElement(\"div\") ;\n dataWord.classList.add(\"td\")\n let dataNum = document.createElement(\"div\") ;\n dataNum.classList.add(\"td\")\n let dataPer = document.createElement(\"div\") ;\n dataPer.classList.add(\"td\")\n dataWord.innerText = data[0] ;\n dataNum.innerText = data[1] ;\n dataPer.innerText = ((data[1] * 100)/numberOfWords).toFixed(2) +\"%\" ;\n\n\t\t\t\t\ttableRow.appendChild(dataWord);\n\t\t\t\t\ttableRow.appendChild(dataNum);\n\t\t\t\t\ttableRow.appendChild(dataPer);\n\n\t\t\t\t\twordList.appendChild(tableRow);\n \n }", "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredUFOData.length; i++) {\n\n // Get UFO Data object and its fields\n var UFOdata = filteredUFOData[i];\n var fields = Object.keys(UFOdata);\n\n // Create new row in tbody\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n\n // For every field in the UFOData object create a new cell at set its inner text to be the current value at the current address's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = UFOdata[field];\n }\n\n }\n\n}", "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredrows.length; i++) {\n // Get get the current address object and its fields\n var rows = filteredrows[i];\n var fields = Object.keys(rows);\n // Create a new row in the tbody, set the index to be i + startingIndex\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n // For every field in the rows object, create a new cell at set its inner text to be the current value at the current row's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = rows[field];\n }\n }\n}", "function renderTable() { \r\n $tbody.innerHTML = \"\";\r\n var length = filteredData.length;\r\n for (var i = 0; i < length; i++) {\r\n // Get get the current address object and its fields\r\n var data = filteredData[i]; \r\n var fields = Object.keys(data); \r\n // Create a new row in the tbody, set the index to be i + startingIndex\r\n var $row = $tbody.insertRow(i);\r\n for (var j = 0; j < fields.length; j++) {\r\n // For every field in the address object, create a new cell at set its inner text to be the current value at the current address's field\r\n var field = fields[j];\r\n var $cell = $row.insertCell(j);\r\n $cell.innerText = data[field];\r\n }\r\n }\r\n}", "function table() {\n const tbody = document.getElementById(\"tbody\");\n const notfound = document.getElementById(\"notfound\");\n notfound.textContent = \"\";\n while (tbody.hasChildNodes()) {\n tbody.removeChild(tbody.firstChild);\n }\n getData(db.dogs, (data, index) => {\n if (data) {\n createEle(\"tr\", tbody, tr => {\n for (const value in data) {\n createEle(\"td\", tr, td => {\n td.textContent = data.edad === data[value] ? `${data[value]} años` : data[value];\n });\n }\n createEle(\"td\", tr, td => {\n createEle(\"i\", td, i => {\n i.className += \"fas fa-trash-alt btndelete\";\n i.setAttribute(`data-id`, data.id);\n i.onclick = deletebtn;\n });\n })\n });\n } else {\n notfound.textContent = \"No hay registros de perritos!\";\n }\n });\n }", "function searchtb(table,fields)\n {\n \n \n }", "function tableView() {\n\tconnection.query(\"SELECT item_id, product_name, department_name, price, stock_quantity FROM products\", function(err, results) {\n if (err) throw err;\n\n// table \n\tvar table = new Table({\n \thead: ['ID#', 'Item Name', 'Department', 'Price($)', 'Quantity Available'],\n \t colWidths: [10, 20, 20, 20, 20],\n \t style: {\n\t\t\t head: ['cyan'],\n\t\t\t compact: false,\n\t\t\t colAligns: ['center'],\n\t\t }\n\t});\n//Loop through the data\n\tfor(var i = 0; i < results.length; i++){\n\t\ttable.push(\n\t\t\t[results[i].item_id, results[i].product_name, results[i].department_name, results[i].price, results[i].stock_quantity]\n\t\t);\n\t}\n\tconsole.log(table.toString());\n\n });\n}", "function displayTable(results) {\n var table = new Table({\n head: ['Item ID', 'Product Name', 'Department', 'Price', 'Stock']\n , colWidths: [10, 30, 15, 10, 10]\n });\n for (i = 0; i < results.length; i++) {\n table.push(\n [results[i].item_id, results[i].product_name, results[i].department_name, results[i].price, results[i].stock_quantity]\n );\n }\n console.log(table.toString());\n}", "make(data, tableName) {\n\t\tlet results = data.results,\n\t\t\tfields = data.fields,\n\t\t\tpks = data.primaryKeys;\n\t\tlog('Fields: ', fields);\n\t\tlet table = $('<table />', {class: 'table table-striped'});\n\t\tlet heading = $('<tr />');\n\t\tfields.forEach(col => {\n\t\t\theading.append(`<th>${col.name}</th>`);\n\t\t});\n\t\theading = $('<thead />').append(heading);\n\t\ttable.append(heading);\n\t\tlet tbody = $('<tbody />');\n\t\tresults.forEach(r => {\n\t\t\tvar row = $('<tr />');\n\t\t\tfields.forEach(fname => {\n\t\t\t\tvar col = $('<td />');\n\t\t\t\tvar input = $('<input />');\n\t\t\t\tinput.val(r[fname.name]);\n\t\t\t\tinput.data({\n\t\t\t\t\ttable: tableName,\n\t\t\t\t\tcondition: this.generateCondition(pks, r),\n\t\t\t\t\tfield: fname.name\n\t\t\t\t});\n\t\t\t\tlog(input.data());\n\t\t\t\tthis.bindUpdateEvent(input);\n\t\t\t\tcol.append(input);\n\t\t\t\trow.append(col);\n\t\t\t});\n\t\t\ttbody.append(row);\n\t\t});\n\t\ttable.append(tbody);\n\t\treturn table;\n\t}", "function searchTable() {\r\n var input, filter, table, tr, th, i, txtValue;\r\n input = document.getElementById(\"myInput\");\r\n filter = input.value.toUpperCase();\r\n table = document.getElementById(\"myTable\");\r\n tr = table.getElementsByTagName(\"tr\");\r\n for (i = 0; i < tr.length; i++) {\r\n th = tr[i].getElementsByTagName(\"th\")[0];\r\n if (th) {\r\n txtValue = th.textContent || th.innerText;\r\n if (txtValue.toUpperCase().indexOf(filter) > -1) {\r\n tr[i].style.display = \"\";\r\n } else {\r\n tr[i].style.display = \"none\";\r\n }\r\n } \r\n }\r\n }", "function makeResultsTable(countries) {\n var table = ui.Chart.feature.byFeature(countries, 'Name');\n table.setChartType('Table');\n table.setOptions({allowHtml: true, pageSize: 5});\n table.style().set({stretch: 'both'});\n return table;\n}", "function loadTableUsingAutocompleteSearchData(name) {\n $(\"table\").append('<tbody>');\n for (var i = 0; i < users.length; i++) {\n if (users[i].name == name) {\n $(\"table\").append([\n '<tr>',\n '<td>' + users[i].name + '</td>',\n '<td>' + users[i].address + '</td>',\n '<td>' + users[i].rating + '</td>',\n '<td ><img id=\"table-image\" src=' + users[i].image + '></img></td>',\n '<td><button id= u' + i + '>Update</button><button id=d' + i + '>Delete</button></td>',\n '</tr>'\n ]);\n }\n }\n $(\"table\").append('</tbody>');\n}", "function addtable() {\n tbody.html(\"\");\n console.log(`There are ${tableDatashape.length} records in this table.`);\n console.log(\"----------\");\n tableDatashape.forEach(function(sighting) {\n var row = tbody.append(\"tr\");\n Object.entries(sighting).forEach(function([key, value]) {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n }", "function mySearchFn() {\n var obj = {};\n obj.firstname = $('#FirstName').val();\n obj.lastname = $('#LastName').val();\n obj.location = [];\n var locas = $('#Location').children();\n for(var i = 0; i < locas.length; i++){\n obj.location.push(locas[i].innerHTML);\n }\n obj.phone = $('#Phone').val();\n obj.current_class = $('#Class').val();\n var data = getData();\n var newData = [];\n for(var i = 0; i < data.length; i ++){\n if(matchDetail(data[i], obj)){\n newData.push(data[i]);\n }\n }\n showTable(newData);\n }", "function displayTable(filteredData){\n // Use d3 to get a reference to the table body\n var tbody = d3.select(\"tbody\");\n\n //remove any data from the table\n tbody.html(\" \");\n\n // Iterate throug the UFO Info to search through the date time\n filteredData.forEach((date) => {\n \n //Use d3 to append row\n var row = tbody.append(\"tr\");\n \n //Use `Object entries to log the dates\n Object.entries(date).forEach(([key,value]) => {\n var cell = row.append(\"td\");\n cell.text(value)\n \n //Print filteredData\n console.log(filteredData);\n\n \n });\n });\n}", "function singleSearchBar(){\n const searchText = document.getElementById(\"anySearch\").value.toLowerCase();\n console.log(searchText);\n const result = [];\n const nameResult = findByName(searchText, searchText);\n console.log('nameResult:');\n console.log(nameResult);\n result.concat(nameResult);\n renderedTable(result);\n}", "function new_table(filteredufo) {\n d3.select(\"tbody\").remove();\n d3.select(\"#ufo-table\").append(\"tbody\");\n var tbody = d3.select(\"#ufo-table\").select(\"tbody\");\n // tbody.text(\"\");\n filteredufo.forEach(function(ufo) {\n var row = tbody.append(\"tr\")\n\trow.append(\"td\").text(ufo.datetime)\n\trow.append(\"td\").text(ufo.city)\n\trow.append(\"td\").text(ufo.state)\n\trow.append(\"td\").text(ufo.country)\n\trow.append(\"td\").text(ufo.shape)\n\trow.append(\"td\").text(ufo.durationMinutes)\n\trow.append(\"td\").text(ufo.comments)\n})\n}", "function renderTable(filteredData) {\n $tbody.innerHTML = \"\";\n // Create variable for page number\n for (var i = 0; i < filteredData.length; i++) {\n // Get get the current address object and its fields\n var address = filteredData[i];\n var fields = Object.keys(address);\n // Create a new row in the tbody, set the index to be i + startingIndex\n var $row = $tbody.insertRow(i);\n // Increment page no if i is multiple of 50\n // add data attribute to row\n for (var j = 0; j < fields.length; j++) {\n // For every field in the address object, create a new cell at set its inner text to be the current value at the current address's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = address[field];\n }\n }\n}", "function dataTable(data) {\n tbody.html('');\n data.forEach(function(sightings) {\n console.log(sightings);\n var row = tbody.append('tr');\n \n Object.entries(sightings).forEach(function([key, value]) {\n console.log(key, value);\n var cell = row.append('td');\n cell.text(value);\n });\n });\n \n console.log('You have begun your search for the truth!');\n}", "function buildTableFromResults(results){\n results.forEach(function(result){\n var tableRow = buildTableRow(result)\n $('#search-results-table tr:last').after(tableRow)\n })\n}", "function generateSearchTable(searchResultsArray){\r\n\r\n if(searchResultsArray.length > 0){\r\n var html = '<div class=\"row\">';\r\n var i;\r\n //console.log(searchResultsArray.length);\r\n //console.log(searchResultsArray);\r\n for (i = 0; i < searchResultsArray.length; i++) {\r\n if(i%4 == 0){\r\n html += '</div><br><div class=\"row\">'\r\n //console.log(\"new row\");\r\n }\r\n html += '<div class=\"col-sm-3\"><div class=\"card\" style = \"width:80%; margin-right:10%; margin-left:10%\"><img class=\"card-img-top\" src=\"'\r\n //+ \"http://res.cloudinary.com/dkyqddfoh/image/upload/v1525861227/wzio36zeshjuekmzn54t.jpg\"\r\n + searchResultsArray[i]['imageLink']\r\n + '\" alt=\"Card image\"><div class=\"card-body\"><h4 class=\"card-title\">'\r\n + searchResultsArray[i]['title'] + '</h4><p class=\"card-text\">Author: '\r\n + searchResultsArray[i]['user'] + '<br>Rating: 4.7</p><a href=\"' + '/activities/test/'\r\n + searchResultsArray[i]['fileLink'] + '\" class=\"btn btn-primary\">See Activity</a></div></div></div>';\r\n }\r\n html += '</div>'\r\n return html}\r\n\r\n else{\r\n return \"No results found\"\r\n };\r\n\r\n\r\n}", "function searchTable() {\n var input, filter, table, tr, td, i; //Declare variables\n input = document.getElementById(\"search\"); // targets the search input box\n filter = input.value.toUpperCase(); //Removes case sensitive search for uppercase letters\n\t table = document.getElementById(\"movies\");\n\t tr = table.getElementsByTagName(\"tr\");\n\n for (i = 0; i < tr.length; i++) {\n td = tr[i].getElementsByTagName(\"td\")[0];\n if (td) {\n if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {\n tr[i].style.display = \"\";\n } else {\n tr[i].style.display = \"none\";\n }\n }\n }\n }", "function buildTable(data) {\n // Remove table if it exists\n var deleteTable = d3.select(\"#table\");\n deleteTable.remove();\n\n var table = d3.select(\"#sample-metadata\").append('table');\n table.attr('class', 'table').attr('class', 'table-condensed');\n table.attr('id', 'table')\n var tbody = table.append(\"tbody\");\n var trow;\n for (const [key, value] of Object.entries(data)) {\n trow = tbody.append(\"tr\");\n var td = trow.append(\"td\").append(\"b\");\n td.text(`${key}:`);\n trow.append(\"td\").text(value);\n\n }\n }", "function populateTables(table, data) {\n if (data.length > 0) {\n var amountToShow = data.length > 10 ? 10 : data.length\n for (i = 0; i < amountToShow; i++) {\n $(`#${table}`).append(`\n <tr>\n <th scope=\"col\">${data[data.length - 1 - i].name}</th>\n <th scope=\"col\">${data[data.length - 1 - i].endLoc}</th>\n <th scope=\"col\">${moment(data[data.length - 1 - i].plannedOn).format(\"MM/DD/YYYY\")}</th>\n <th scope=\"col\">${moment(data[data.length - 1 - i].leaveDate).format(\"MM/DD/YYYY\")}</th>\n <th scope=\"col-auto\"><button class=\"btn btn-primary switch-element-btn\" id=\"loadSearchPage\" data-hide=\"selectionPage\" data-show=\"destinationPage\" data-search=\"${data.length - 1 - i}\" data-user=\"true\"><i class=\"fas fa-file-export\"></i></button></th>\n </tr>\n `)\n }\n }\n}", "function buildHtmlTable(arr) {\n\n document.getElementById(\"lblQueryString\").innerText = queryString;\n var resultCount = arr.length;\n document.getElementById(\"lblResultCount\").innerText = resultCount;\n\n document.getElementById(\"divResults\").style.display = \"block\";\n document.getElementById(\"divResultsTable\").style.display = \"block\";\n\n tableDefinition = \"<table><tr>\";\n var cols = new Array();\n\n var p = arr[0];\n for (var key in p) {\n tableDefinition += \"<th>\" + key + \"</th>\";\n cols.push(key);\n }\n\n tableDefinition += \"</tr>\";\n\n //now add each \"row\" of data.\n\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n tableDefinition += \"<tr>\";\n for (var j = 0; j < cols.length; j++) {\n tableDefinition += \"<td>\" + item[cols[j]] + \"</td>\";\n }\n tableDefinition += \"</tr>\";\n }\n\n tableDefinition += \"</table>\";\n\n document.getElementById(\"divResultsTable\").innerHTML = tableDefinition;\n\n}", "function generateTable(data, fromResult, toResult) {\n\n \"use strict\";\n\n // Pulisco la tabella prima di disegnarla\n $('#table-head').children().html(\"\");\n $('#table-body').children().html(\"\");\n\n var keys = Object.keys(data.results[0]);\n $.each(keys, function(index, item) {\n if(item.match(\"timestamp\") || item.match(\"battery\") || item.match(\"barometer\") || item.match(\"gps\") || item.match(\"photo\") || item.match(\"video\") || item.match(\"hrm\") || item.match(\"accelerometer\") || item.match(\"barometer\") || item.match(\"brake_sensor\") || item.match(\"gyroscope\") || item.match(\"potentiometer\") || item.match(\"tachometer\") || item.match(\"wss\")) {\n if(item.match(\"brand\") || item.match(\"model\")) {\n // NO-OP\n } else {\n $('#table-head').children().append('<th scope=\"col\">' + item + '</th>');\n }\n }\n });\n\n $.each(data.results, function(index, row) {\n if (index >= fromResult && index < toResult) {\n var html = '<tr>';\n $.each(row, function(index, item) {\n if (index.match(\"timestamp\")) {\n html += '<th scope=\"row\">' + item + '</td>';\n } else {\n if(index.match(\"battery\") || index.match(\"barometer\") || index.match(\"gps\") || index.match(\"photo\") || index.match(\"video\") || index.match(\"hrm\") || index.match(\"acceleration\") || index.match(\"pressure\") || index.match(\"rotation\") || index.match(\"accelerator_angle\") || index.match(\"rpm\") || index.match(\"speed\")) {\n if(index.match(\"brand\") || index.match(\"model\")) {\n // NO-OP\n } else {\n html += '<td>' + item + '</td>';\n }\n }\n }\n });\n html += '</tr>'\n $('#table-body').append(html);\n }\n });\n\n}", "function loadTable(inputFilter) {\n \n d3.select(\"tbody\")\n \n .selectAll(\"tr\")\n \n .data(inputFilter)\n \n .enter()\n \n .append(\"tr\")\n \n .html(function(d) {\n \n return `<td>${d.datetime}</td> <td>${d.city}</td> <td>${d.state}</td> <td>${d.country}</td>\n \n <td>${d.shape}</td> <td>${d.durationMinutes}</td> <td>${d.comments}</td> `;\n });\n }", "function search(){\n searchResult = [];\n var input = document.getElementById(\"input\");\n var filter = input.value.toUpperCase();\n var pageSpan = document.getElementById(\"page\");\n \n for(var i = 0; i < data.length; i++){\n \n if(data[i].employee_name.toUpperCase().indexOf(filter) != -1) searchResult.push(data[i]);\n if(searchResult){\n isSearched = true;\n pageSpan.innerHTML = currentPage + \"/\" + numberOfPages();\n currentPage = 1;\n createTable(searchResult,currentPage);\n showAndHideButtons(searchResult,currentPage);\n }\n }\n}", "function createTable(data) {\n let html = \"<table border='1|1'>\";\n\n for (let i = 0; i < data.length; i++) {\n if (data[i].middle_name != null) {\n html += \"<tr>\";\n html += \"<td>\" + (data[i].first_name + ' ' + data[i].middle_name + ' ' + data[i].last_name).link(data[i].url) + \"</td>\";\n html += \"<td>\" + data[i].party + \"</td>\";\n html += \"<td>\" + data[i].state + \"</td>\";\n html += \"<td>\" + data[i].seniority + \"</td>\";\n html += \"<td>\" + data[i].votes_with_party_pct + \"</td>\";\n html += \"</tr>\";\n } else\n html += \"<tr>\";\n html += \"<td>\" + (data[i].first_name + ' ' + data[i].last_name).link(data[i].url) + \"</td>\";\n html += \"<td>\" + data[i].party + \"</td>\";\n html += \"<td>\" + data[i].state + \"</td>\";\n html += \"<td>\" + data[i].seniority + \"</td>\";\n html += \"<td>\" + data[i].votes_with_party_pct + '%' + \"</td>\";\n html += \"</tr>\";\n }\n\n html += \"</tbody>\";\n document.getElementById(\"house_table\").innerHTML = html;\n\n\n}", "function renderTable() {\n console.log(\"in Render\");\n tbody.innerHTML = \"\";\n for (var i = 0; i < filteredObs.length; i++) {\n // Get get the current address object and its fields\n var address = filteredObs[i];\n var fields = Object.keys(address);\n // Create a new row in the tbody, set the index to be i + startingIndex\n var row = tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n // For every field in the address object, create a new cell at set its inner text to be the current value at the current address's field\n var field = fields[j];\n var cell = row.insertCell(j);\n cell.innerText = address[field];\n }\n }\n}", "function buildTable(data) {\r\n // first we want to clear table (i.e. remove filters) each time the function is called \r\n // tbody.html references the table from the html file, then (\"\") is a blank string \r\n tbody.html(\"\");\r\n\r\n //forEach function takes a function and applies it to each item in the loop\r\n //we are passing 'data' (our data.js file) as the item to loop through\r\n data.forEach((dataRow) => {\r\n // in our loop, we will append the item of the loop into the <tbody> html tag and add a table row (tr)\r\n let row = tbody.append(\"tr\");\r\n // Object.values tells JavaScript to reference one object from the array of ufo sightings in data\r\n // datarow means we want those objects to go into datarow \r\n // forEach((val) specifies that we want one object per row \r\n Object.values(dataRow).forEach((val) => {\r\n // then append the object into the table using the table data <td> tag\r\n let cell = row.append(\"td\");\r\n // extract just the text from the object, so that it is stored in the table as text \r\n cell.text(val);\r\n // this is essentially looping through each value in the table row from our data file\r\n // then storing/appending it to the table\r\n });\r\n });\r\n }", "function renderList_search(data) {\n\n show_search_results_table(); // function\n \n empty_search_table_html(); // function\n\t\n$.each(data.client, function(i,user){\nvar tblRow =\n\"<tr>\"\n+\"<td>\"+user.ItemID+\"</td>\"\n+\"<td>\"+user.Name+\"</td>\"\n+\"<td>\"+user.CAT+\"</td>\"\n//+\"<td>\"+user.www+\"</td>\"\n//+ \"<th><img border=\\\"0\\\" src=\\\"\"+ imgLink + commodores_variable.pic +\"\\\" alt=\\\"Pulpit rock\\\" width=\\\"304\\\" height=\\\"228\\\"><\\/th>\"\n + \"<td><a href=\\\"http:\\/\\/\"+user.www+\"\\\" target=\\\"_blank\\\">\"+user.www+\"<\\/a></td>\"\n+\"</tr>\" ;\n// Specific client data on table\n$(tblRow).appendTo(\".userdata_search tbody\");\n});\n\n$(\".userdata_search tbody tr td\").css({ border: '1px solid #ff4141' });\n \t\n}", "function showingTable() {\r\n alert(\"Loading \" + myObj.data.length + \" rows...\");\r\n\r\n table = document.createElement(\"table\");\r\n search = document.createElement(\"input\");\r\n mySearch = document.getElementById(\"showSearch\");\r\n\r\n $(\"#showData\").html(\"Loading...\");\r\n\r\n var tr, th, tabCell, id;\r\n\r\n // Row 1 - Table Header\r\n tr = table.insertRow(-1);\r\n th = tr.insertCell(-1);\r\n th.innerHTML = \"#\";\r\n th = tr.insertCell(-1);\r\n th.innerHTML = \"ID\";\r\n th = tr.insertCell(-1);\r\n th.innerHTML = \"EMPLOYEE NAME\";\r\n th = tr.insertCell(-1);\r\n th.innerHTML = \"EMPLOYEE SALARY\";\r\n th = tr.insertCell(-1);\r\n th.innerHTML = \"EMPLOYEE AGE\";\r\n th = tr.insertCell(-1);\r\n th.innerHTML = \"PROFILE IMAGE\";\r\n th = tr.insertCell(-1);\r\n th.innerHTML = \"EDIT ROW\";\r\n th = tr.insertCell(-1);\r\n th.innerHTML = \"DELETE ROW\";\r\n\r\n x = 0;\r\n while (x < myObj.data.length) {\r\n tr = table.insertRow(-1);\r\n\r\n tabCell = tr.insertCell(-1);\r\n id = document.createTextNode(x + 1); //Numbering Rows - (First Column)\r\n tabCell.appendChild(id);\r\n\r\n tabCell = tr.insertCell(-1);\r\n id = document.createTextNode(myObj.data[x].id); //Column with Employee Id\r\n tabCell.appendChild(id);\r\n\r\n tabCell = tr.insertCell(-1);\r\n var employee_name = document.createTextNode(\r\n myObj.data[x].employee_name\r\n ); // Column with Employee Name\r\n tabCell.appendChild(employee_name);\r\n\r\n tabCell = tr.insertCell(-1);\r\n employee_salary = document.createTextNode(\r\n myObj.data[x].employee_salary\r\n ); // Column with Employee Salary\r\n tabCell.appendChild(employee_salary);\r\n\r\n tabCell = tr.insertCell(-1);\r\n employee_age = document.createTextNode(myObj.data[x].employee_age); // Column with Employee Age\r\n tabCell.appendChild(employee_age);\r\n\r\n tabCell = tr.insertCell(-1);\r\n profile_image = document.createTextNode(myObj.data[x].profile_image); // Column with Employee Profile Image\r\n tabCell.appendChild(profile_image);\r\n\r\n tabCell = tr.insertCell(-1);\r\n var btn1 = document.createElement(\"input\"); // Edit Row Button\r\n btn1.type = \"button\";\r\n btn1.className = \"btn btn-primary\";\r\n btn1.value = \"Edit\";\r\n btn1.onclick = editMe;\r\n tabCell.appendChild(btn1);\r\n\r\n tabCell = tr.insertCell(-1);\r\n var btn2 = document.createElement(\"input\"); // Delete Row Button\r\n btn2.type = \"button\";\r\n btn2.value = \"Delete\";\r\n btn2.className = \"btn btn-danger\";\r\n btn2.onclick = deleteMe;\r\n tabCell.appendChild(btn2);\r\n\r\n x++;\r\n }\r\n\r\n myTable = document.getElementById(\"showData\");\r\n myTable.innerHTML = \"\";\r\n myTable.appendChild(table);\r\n }", "function appendSearchResults(r) {\n var app = inviso.apps[r.version!=null?r.version:'mr1'];\n\n var $tr = $('<tr class=\"search-result\"></tr>');\n\n $.each(inviso.search.columns, function(i, col){\n if(!col.active) {\n return;\n }\n\n var $td = app.renderSearchResult(col, r);\n $tr.append($td);\n });\n\n $('.search-results').append($tr);\n}", "function displayResults(data) {\n // Add to the table here...\n}", "renderTable () {\n const table = this.state.table\n const data = api.get.data(table)\n const schema = api.get.schema(table)\n const searchPattern = this.state.searchPattern\n\n return <Table data={data} schema={schema} searchPattern={searchPattern} />\n }", "function filterResult(data){\n var name = $('#names').val();\n $('#body').empty();\n for (var i = 0; i < data.exercises.length; i++){\n if (data.exercises[i].name === name){\n var $name = $('<td>');\n var $time = $('<td>');\n var $cals = $('<td>');\n var $date = $('<td>');\n\n $name.text(data.exercises[i].name);\n $time.text(data.exercises[i].time);\n $cals.text(data.exercises[i].calories);\n $date.text(data.exercises[i].date);\n\n var $row = $('<tr>');\n\n $row.append($name, $time, $cals, $date);\n $('#exercises > tbody').append($row);\n }\n }\n }", "function generateTable(performer = 'All', song = 'All', year = 'All', peakpos = 'All') {\n\n if (song == 'All' && performer == 'All' && year == 'All' && peakpos == 'All') {\n // Need to build query to gather information and the dropdown menus\n url = local + \"/get_top100_sql/search/*\";\n first = true\n }\n else {\n // Need to build query to gather information.\n\n songParms = \"name=\" + song + \"/performer=\" + performer + \"/chartyear=\" + year + \"/top_position=\" + peakpos\n url = local + \"/get_top100_sql/search/\" + songParms;\n }\n \n populateTable(url);\n\n}", "function displayTable(sightingList) {\n let tableBody = d3.select(\"tbody\"); \n sightingList.forEach((sighting) => {\n var tblrow = tableBody.append(\"tr\");\n Object.entries(sighting).forEach(([key, value]) => {\n var cell = tblrow.append(\"td\"); \n cell.text(value); \n });\n });\n }", "function displayTable() {\n var query = connection.query(\"SELECT * FROM products\", function(err, res) {\n \n var table = new Table([\n\n head=['id','product_name','department_name','price','stock_quantity']\n ,\n\n colWidths=[6,21,25,17]\n \n ]);\n table.push(['id','product name','department name','price','stock quantity']);\n for (var i = 0; i < res.length; i++) {\n table.push(\n \n [res[i].id ,res[i].product_name,res[i].department_name,res[i].price ,res[i].stock_quantity]\n \n );\n }\n console.log(colors.bgWhite(colors.red((table.toString())))); \n });\n}", "function buildTable(data) {\n\n var table = document.createElement(\"TABLE\");\n\n var keyList = Object.keys(data[0]);\n\n \n\n var row = document.createElement(\"TR\");\n\n table.appendChild(row);\n\n for(var i in keyList) {\n\n var tableHeadingName = document.createTextNode(keyList[i]);\n\n var tableHeading = document.createElement(\"TH\");\n\n row.appendChild(tableHeading);\n\n tableHeading.appendChild(tableHeadingName);\n\n }\n\n \n\n for(var i in data) {\n\n var mountainInfo = data[i];\n\n var row = document.createElement(\"TR\");\n\n table.appendChild(row);\n\n for(var j in mountainInfo) {\n\n var info = document.createTextNode(mountainInfo[j]);\n\n var col = document.createElement(\"TD\");\n\n row.appendChild(col);\n\n col.appendChild(info);\n\n }\n\n } \n\n return table; \n\n }", "function renderTable() {\n $tbody.innerHTML = \"\";\n // Set the value of endingIndex to startingIndex + resultsPerPage\n var endingIndex = startingIndex + resultsPerPage;\n // Get a section of the addressData array to render\n var addressSubset = filteredAddresses.slice(startingIndex, endingIndex);\n\n for (var i = 0; i < addressSubset.length; i++) {\n // Get get the current address object and its fields\n var address = addressSubset[i];\n var fields = Object.keys(address);\n // Create a new row in the tbody, set the index to be i + startingIndex\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n // For every field in the address object, create a new cell at set its inner text to be the current value at the current address's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = address[field];\n }\n }\n}", "function createTable (data) {\n tbody.html(\"\");\n data.forEach(function(UFO) {\n var datarow = tbody.append(\"tr\");\n Object.entries(UFO).forEach(([key, value]) => {\n var cell = datarow.append(\"td\");\n cell.text(value)\n })\n })\n}", "function displayProductList() {\r\n var productTable = \"<table id='searchTable' class='table table-striped' class='table-responsive-md'>\";\r\n productTable = productTable + displayProductHead();\r\n for (i = 0; i < productParts.length; i++) \r\n productTable = productTable + displayProductRow(productParts[i]);\r\n productTable = productTable + \"</table>\";\r\n document.getElementById(\"productList\").innerHTML = productTable;\r\n}", "function createtable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < ufoData.length; i++) {\n // Get current fields\n var info = ufoData[i];\n var fields = Object.keys(info);\n // insert new fields in the tbody\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = info[field];\n }\n }\n}", "function default_table(){\n tableData.forEach((sightings) => {\n var record = tbody.append(\"tr\");\n Object.entries(sightings).forEach(([key, value]) => {\n var data_value = record.append(\"td\");\n data_value.text(value);\n });\n });\n}", "function search_tested_soil_table(){\n // Declare variables \n var input, filter, table, tr, td, i;\n input = document.getElementById(\"search_tested_soil_table\");\n filter = input.value.toUpperCase();\n table = document.getElementById(\"editable-datatable\");\n tr = table.getElementsByTagName(\"tr\");\n\n // Loop through all table rows, and hide those who don't match the search query\n for (i = 0; i < tr.length; i++) {\n td = tr[i].getElementsByTagName(\"td\") ; \n for(j=0 ; j<td.length ; j++)\n {\n let tdata = td[j] ;\n if (tdata) {\n if (tdata.innerHTML.toUpperCase().indexOf(filter) > -1) {\n tr[i].style.display = \"\";\n break ; \n } else {\n tr[i].style.display = \"none\";\n }\n } \n }\n }\n}", "function renderAllEmployeeData(data) {\n let renderAllHTML = `<table><thead><tr><th>First Name</th><th>Last Name</th><th>Email</th><th>Birthday</th>\n <th>Hire Date</th></thead><tbody>`;\n data.forEach(function(data) {\n const tableRow = `<tr>\n <th>${data.first_name}</th>\n <th>${data.last_name}</th>\n <th>${data.email}</th>\n <th>${moment(data.birthday).format(\"MMMM Do YYYY\")}</th>\n <th>${moment(data.hire_date).format(\"MMMM Do YYYY\")}</th>`;\n\n renderAllHTML += tableRow;\n });\n\n renderAllHTML += `</tbody></table>`;\n $(\"#search-results\").append(renderAllHTML);\n }", "function filteredTable(entry) {\n var row = tbody.append(\"tr\");\n \n // extract data from the object and assign to variables\n var datetime = entry.datetime;\n var city = entry.city;\n var state = entry.state;\n var country = entry.country;\n var shape = entry.shape;\n var durationMinutes = entry.durationMinutes;\n var comments = entry.comments;\n \n // append one cell for each variable\n row.append(\"td\").text(datetime);\n row.append(\"td\").text(city);\n row.append(\"td\").text(state);\n row.append(\"td\").text(country);\n row.append(\"td\").text(shape);\n row.append(\"td\").text(durationMinutes);\n row.append(\"td\").text(comments);\n }", "function createResultTableForRoadNames(results) {\n const arr = [];\n let arrPointer = -1;\n arr[++arrPointer] = `<table id=\"roadAddressBrowserTable\" class=\"road-address-browser-window-results-table viite-table\">\n <thead>\n <tr>\n <th>Ely</th>\n <th>Tie</th>\n <th>Nimi</th>\n </tr>\n </thead>\n <tbody>`;\n\n for (let i = 0, len = results.length; i < len; i++) {\n arr[++arrPointer] = ` <tr>\n <td>${results[i].ely}</td>\n <td>${results[i].roadNumber}</td>\n <td>${results[i].roadName}</td>\n </tr>`;\n }\n arr[++arrPointer] =` </tbody>\n </table>`;\n return $(arr.join('')); // join the array to one large string and create jquery element from said string\n }", "function makeTable() {\n var queryfortable = \"Select * FROM products\";\n connection.query(queryfortable, function(error, results){\n if(error) throw error;\n var tableMaker = new Table ({\n head: [\"ID\", \"Product Name\", \"Department\", \"Price\", \"Stock\"],\n colWidths: [10,25,20,10,20]\n });\n for(var i = 0; i < results.length; i++){\n tableMaker.push(\n [results[i].item_id,\n results[i].product_name,\n results[i].department_name, \n results[i].price,\n results[i].stock_quantity]\n );\n }\n console.log(tableMaker.toString());\n firstPrompt()\n })\n }", "function renderSearchResults(searchResults) {\n let searchResultsHTML = `<table><thead><tr><th>First Name</th><th>Last Name</th><th>Email</th><th>Birthday</th>\n <th>Hire Date</th><th>Dietary Preference</th>\n <th>Allergies</th><th>Hobbies</th></thead><tbody>`;\n searchResults.forEach(function(data) {\n // if (data.orientationComplete === \"1900-01-01\") {\n // data.orientationComplete = \"Incomplete\";\n // } else {\n // data.orientationComplete = moment(data.orientationComplete).format(\n // \"MMMM Do YYYY\"\n // );\n // }\n\n // if (data.compliance_trainingComplete === \"1900-01-01\") {\n // data.compliance_trainingComplete = \"Incomplete\";\n // } else {\n // data.compliance_trainingComplete = moment(\n // data.compliance_trainingComplete\n // ).format(\"MMMM Do YYYY\");\n // }\n\n const tableRow = `<tr>\n <th>${data.first_name}</th>\n <th>${data.last_name}</th>\n <th>${data.email}</th>\n <th>${moment(data.birthday).format(\"MMMM Do YYYY\")}</th>\n <th>${moment(data.hire_date).format(\"MMMM Do YYYY\")}</th>\n <th>${data.food_preference}</th>\n <th>${data.allergy}</th>\n <th>${data.hobby}</th></tr>`;\n\n searchResultsHTML += tableRow;\n });\n\n searchResultsHTML += `</tbody></table>`;\n $(\"#search-results\").empty();\n $(\"#search-results\").append(searchResultsHTML);\n }", "function poplulateTable(data){\n data.forEach(sightingData=>{\n const trow = tbody.append(\"tr\");\n columns= [\"datetime\", \"city\", \"state\", \"country\", \"shape\", \"durationMinutes\", \"comments\"];\n columns.forEach(key=>{\n trow.append(\"td\").text(sightingData[key]);\n })\n })\n}", "function dataToTable(result) {\n\tvar a = [\"Textbook\",\"Seller\",\"Price\",\"ISBN\"];\n var returnTrue = false;\n\tvar table = \"<table><tr><th>Textbook</th><th>Seller</th><th>Price ($)</th><th>ISBN</th><th>Purchase</th></tr>\";\n for (var i = 0; i < result.length; i++) {\n if(result[i][\"Status\"] == \"Listed\"){\n returnTrue = true;\n table += \"<tr>\";\n for (var j = 0; j < a.length; j++) {\n table += \"<td>\" + result[i][a[j]] + \"</td>\";\n }\n table += \"<td><button onclick='buyTextbook(\" + result[i]['ID'] + \")'>Buy Textbook</button></td>\";\n table += \"</tr>\";\n }\n\t}\n\ttable += \"</table></div><div id='bottom'></div></body></html>\";\n if (!returnTrue){\n table = \"<p>Sorry, no results matched your search.</p></div><div id='bottom'></div></body></html>\";\n }\n return table;\n}", "function createTable(data){\n d3.select(tableElement).html('');\n\n let tbody = d3.select(tableElement).append('tbody');\n let rows = tbody.selectAll('tr')\n .data(data)\n .enter()\n .append('tr')\n rows.append('th')\n .text(function (d) {return d.Column})\n rows.append('td')\n .text(function (d) {return d.Value})\n }", "function createTable(data, tableId, keyOne, keyTwo) {\n let html = \"<table border='1|1'>\";\n\n for (let i = 0; i < data.length; i++) {\n if (data[i].middle_name != null) {\n html += \"<tr>\";\n html += \"<td>\" + (data[i].first_name + ' ' + data[i].middle_name + ' ' + data[i].last_name).link(data[i].url) + \"</td>\";\n html += \"<td>\" + data[i][keyOne] + \"</td>\";\n html += \"<td>\" + data[i][keyTwo] + '%' + \"</td>\";\n html += \"</tr>\";\n } else if (data[i].middle_name == null) {\n html += \"<tr>\";\n html += \"<td>\" + (data[i].first_name + ' ' + data[i].last_name).link(data[i].url) + \"</td>\";\n html += \"<td>\" + data[i][keyOne] + \"</td>\";\n html += \"<td>\" + data[i][keyTwo] + '%' + \"</td>\";\n html += \"</tr>\";\n }\n }\n\n html += \"</tbody>\";\n document.getElementById(tableId).innerHTML = html;\n}", "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < AlienData.length; i++) {\n // Get get the current address object and its fields\n var Sighting = AlienData[i];\n var fields = Object.keys(Sighting);\n // Create a new row in the tbody, set the index to be i + startingIndex\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n // For every field in the address object, create a new cell at set its inner text to be the current value at the current address's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = Sighting[field];\n }\n }\n}", "function search(inputName, tableName) {\n\t var input, filter, table, tr, td, i;\n\t input = document.getElementById(inputName);\n\t filter = input.value.toUpperCase();\n\t table = document.getElementById(tableName);\n\t tr = table.getElementsByTagName(\"tr\");\n\t for (i = 0; i < tr.length; i++) {\n\t td = tr[i].getElementsByTagName(\"td\")[0];\n\t if (td) {\n\t if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {\n\t tr[i].style.display = \"\";\n\t } else {\n\t tr[i].style.display = \"none\";\n\t }\n\t }\n\t }\n\t}", "function pesquisarTabela() {\n var input, filter, table, tr, td, i;\n input = document.getElementById(\"pesquisarEntrada\");\n filter = input.value.toUpperCase();\n table = document.getElementById(\"tabela\");\n tr = table.getElementsByTagName(\"tr\");\n \n for (i = 1; i < tr.length; i++) {\n tr[i].style.display = \"none\";\n td = tr[i].getElementsByTagName(\"td\");\n for (var j = 0; j < td.length; j++) {\n cell = tr[i].getElementsByTagName(\"td\")[j];\n if (cell) {\n if (cell.innerHTML.toUpperCase().indexOf(filter) > -1) {\n tr[i].style.display = \"\";\n break;\n } \n }\n }\n }\n }", "function buildTable(data) {\n\n //Clear any existing table\n tbody.html(\"\");\n\n //Iterate through the data to create all necessary rows\n data.forEach((dataRow) => {\n var row = tbody.append(\"tr\");\n Object.entries(dataRow).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n});\n}", "function renderTable() {\n\n var tbody = d3.select(\"tbody\");\n \n tbody.html(\"\"); \n\n // Iterate through each fileteredData and pend to table\n filteredData.forEach(sighting => {\n \n var tbl_col = Object.keys(sighting);\n\n // console.log(tbl_col);\n\n var row = tbody.append(\"tr\");\n\n tbl_col.forEach(s_info => {\n row.append(\"td\").text(sighting[s_info]); \n // console.log(sighting);\n // console.log(tbl_col);\n // console.log(s_info);\n }); \n });\n}", "function buildTable(data) {\n // Clear existing data in table\n tbody.html(\"\");\n // Create forEach function to loop through the table\n data.forEach((dataRow) => {\n // Create a variable to add a row to the table\n let row = tbody.append(\"tr\");\n // Reference an object from the array of UFO sightings and put each sighting in its own row of data\n Object.values(dataRow).forEach((val) => {\n // Create a variable to add data to the row\n let cell = row.append(\"td\");\n // Add values \n cell.text(val);\n });\n });\n}", "function table(data){\n tbody.html(\"\");\n\n\t//append the rows(tr) and cells(td) for returned values\n data.forEach((dataRow) => {\n let row = tbody.append(\"tr\");\n \n Object.values(dataRow).forEach((val) => {\n let cell = row.append(\"td\");\n cell.text(val);\n });\n })\n}", "function buildTable(taObj) {\n let table = $('#applicants-table');\n let parent = table.children();\n for (let j = 0; j < taObj.length; j++) {\n var td = $('td');\n var data = [taObj[j].givenname, taObj[j].familyname, taObj[j].status, taObj[j].year];\n\n parent.append($('<tr>'));\n for (let i = 0; i < data.length; i++) {\n var html = $('<td>').text(data[i]);\n parent.append(html);\n }\n }\n table.show();\n}", "function buildTable(ufoInfo) {\n // First, clear out any existing data\n tbody.html(\"\");\n\n // Next, loop through each object in the data\n // and append a row and cells for each value in the row\n ufoInfo.forEach((ufoSighting) => {\n let row = tbody.append('tr');\n\n // Loop through each field in the dataRow and add\n // each value as a table cell (td)\n Object.entries(ufoSighting).forEach(([key, value]) => { \n let tableBody = row.append('td');\n tableBody.text(value);\n });\n });\n}", "function search() {\n var filter = document.getElementById(\"searchBar\").value.toUpperCase(); // input from search bar set to upper case so the serach is not case-senesative\n var table = document.getElementById(\"repo-table\"); // pulls table from html table\n var tableRow = table.getElementsByTagName(\"tr\"); // pulls all the tablerows\n\n // theses two varibles will hold the title/description of the row we're running through\n var title, description;\n\n // will run throuhg all the rows\n for (i = 0; i < tableRow.length; i++) {\n title = tableRow[i].getElementsByTagName(\"td\")[0].innerText; // pulls first entry (aka the title) of row \"i\"\n description = tableRow[i].getElementsByTagName(\"td\")[1].innerText; // pulls second entry (aka description) of row \"i\"\n\n // checks if the title or description matches the filter (search bar input)\n if (title.toUpperCase().indexOf(filter) > -1 || description.toUpperCase().indexOf(filter) > -1) {\n // if it does, it'll just leave it alone\n tableRow[i].style.display = \"\";\n }\n else {\n // if it doesnt itll change its display style in css to \"none\", which basiclly just hides it\n tableRow[i].style.display = \"none\";\n }\n }\n}", "function createTable() {\r\n $tbody.innerHTML = \"\";\r\n \r\n var sighting, sightingKeys;\r\n var dom;\r\n var columnValue;\r\n \r\n for (var i = 0; i < ufoData.length; i++) {\r\n sighting = ufoData[i];\r\n sightingKeys = Object.keys(sighting);\r\n\t\r\n $dom = $tbody.insertRow(i);\r\n\t/* insert the column values: 0=date, 1=city, 2=state, 3=country, 4=shape, 5=duration, 6=comments*/\t\r\n for (var j = 0; j < sightingKeys.length; j++) {\r\n columnValue = sightingKeys[j];\r\n $dom.insertCell(j).innerText = sighting[columnValue];\r\n }\r\n }\r\n}", "function getTable(title, headers, data) {\n\tlet table = `<table><caption> ${title} </caption><thead><tr>`;\n\tfor (let i = 0; i < headers.length; i += 1) {\n\t\ttable += `<th> ${headers[i]} </th>`;\n\t}\n\ttable += '</tr></thead><tbody>';\n\tlet handle = (value) => {\n\t\ttable += `<td> ${value} </td>`;\n\t};\n\n\tfor (let i = 0; i < data.length; i += 1) {\n\t\ttable += '<tr>';\n\t\tObject.values(data[i]).forEach(handle);\n\t\ttable += '</tr>';\n\t}\n\ttable += '</tbody></table><br>';\n\n\treturn table;\n}", "function createDataTable() {\r\n $('#table1 tbody').html('');\r\n for (var i = 0; i < g_linedata.length; i++) {\r\n var x = g_linedata[i][0];\r\n var y = g_linedata[i][1];\r\n if (i == g_linedata.length - 1) var dataTo = toKm(g_all_result['maxdis']);\r\n else var dataTo = toKm(parseFloat(g_linedata[i + 1][0]));\r\n //var dataTo = toKm(parseFloat(x)+g_search_info_level2.kmfreq/1000.0);\r\n var htmlcode = \"<tr><td>\" + toKm(x) + \" - \" + dataTo + \"</td><td>\" + y + \"</td></tr>\";\r\n $('#table1 tbody').append(htmlcode);\r\n }\r\n //console.log($('.tablescroll_head'));\r\n if ($('.tablescroll').length === 0) $('#table1').tableScroll({\r\n height: 320,\r\n width: 290\r\n });\r\n }", "function displayInventoryTable(res) {\r\n\r\n const table = new Table({\r\n head: ['Product #', 'Department', 'Product', 'Price', 'Qty In Stock'],\r\n colWidths: [15, 20, 30, 15, 15]\r\n });\r\n\r\n for (let i = 0;\r\n (i < res.length); i++) {\r\n var row = [];\r\n row.push(res[i].item_id);\r\n row.push(res[i].department_name);\r\n row.push(res[i].product_name);\r\n row.push(res[i].price);\r\n row.push(res[i].stock_quantity);\r\n table.push(row);\r\n }\r\n\r\n console.log(table.toString());\r\n}", "function showTableOfUsers(result) {\n if(result.length>0) {\n var html = '<table class=\"primary\">';\n html += '<thead><tr>';\n html += '<th>Time</th>';\n html += '<th>First Name</th>';\n html += '<th>Last Name</th>';\n html += '<th>Email</th>';\n // html += '<th>Location</th>';\n html += '</tr></thead>';\n html += '<tbody>';\n for(var i in result) {\n var d = result[i].doc;\n if (d) {\n html += '<tr>';\n html += '<td>' + d.id + '</td>';\n html += '<td>' + d.nameFirst + '</td>';\n html += '<td>' + d.nameLast + '</td>';\n html += '<td>' + d.nameEmail + '</td>';\n // html += '<td>' + d.userLocation + '</td>';\n html += '</tr>';\n // html += '<tr>';\n var i;\n for (i=0; i<d.userLocation.length; i++){\n html += '<tr>' + '<th>Location</th>' + '</tr>';\n html += '<tr>' +'<td>' + d.userLocation[i] + '</td>' + '</tr>' ;\n }\n // html += '</tr>';\n }\n } \n html += '</tbody></table>';\n } else {\n html = \"nothing here\";\n }\n \n $(\"#divResults\").html(html);\n} //END showTableOfUsers();", "function buildTable(data) {\n // First, clear out any existing data\n tbody.html(\"\");\n \n // Next, loop through each object in the data\n // and append a row and cells for each value in the row\n data.forEach((dataRow) => {\n // Append a row to the table body\n let row = tbody.append(\"tr\");\n \n // Loop through each field in the dataRow and add\n // each value as a table cell (td)\n Object.values(dataRow).forEach((val) => {\n let cell = row.append(\"td\");\n cell.text(val);\n });\n });\n }", "function makeTable(data) {\n // Log what is returned\n console.log(data);\n\n // Build table elements\n // Use a for loop to include the results in list items\n let list = \"<tr>\";\n for (let i = 0; i <= 3; i++) {\n list += \"<td>\" + data.Table[i] + \"</td>\";\n console.log('tracks data:');\n console.log(data.Table[i]);\n };\n list += \"</tr>\";\n scrollbar.innerHTML = list;\n}", "function buildTable(data) {\r\n tbody.html(\"\");\r\n//next loop through each object in data and append a row and cells for each value in the row\r\ndata.forEach((dataRow)) => {\r\n //append a row to table body\r\n let row=tbody.append(\"tr\");\r\n //Loop through each field in dataRow and add each value as a table cell (td)\r\n Object.values(dataRow).forEach((val)=> {\r\n let cell = row.append(\"td\");\r\n cell.text(val);\r\n }\r\n );\r\n}", "function make_table(table_data, table_headings, skip_indexes){\n var table_data_rows = table_data.rows.map( function(row) {\n var new_row = [];\n row.c.forEach(function (data, index) {\n if(skip_indexes.indexOf(index) === -1){\n new_row.push(data);\n }\n row['c'] = new_row;\n });\n return row;\n });\n var filtered_table_data = {cols: table_headings, rows: table_data_rows};\n var headings = []\n ,view = [];\n table_headings.forEach( function(heading,index) {\n headings.push({label: heading.label, index: index});\n view.push(index);\n });\n var table_div = 'table-div-1';\n var table_holder = 'holder-' + table_div;\n $('#open-nc-widget').append('<div id=\"' + table_holder + '\" class=\"dd-graphs\"></div>');\n $('#' + table_holder).append('<div id=\"' + table_div + '\" class=\"dd-graph-div\"></div>');\n $('#' + table_holder).prepend('<button class=\"btn btn-default graph-option\" data-which=\"' + table_div + '\">Customize</button>');\n graph_configs[table_div] = {'data': filtered_table_data, 'options': table_options, 'graph_type': 'Table', 'headings': headings,'view':view}; \n show_graph(graph_configs[table_div],table_div);\n }", "function setupFilterTable() {\n\t\t\tif($(\".filteredtable\").length) {\n\t\t\t\tvar classes = $(\".filteredtable\").attr(\"class\").split(' ');\n\t\t\t\tvar column = -1;\n\t\t\t\tvar keyword = -1;\n\t\t\t\tvar hideoption = -1;\n\t\t\t\tvar prefilter = -1;\n\t\t\t\tfor (var i in classes) {\n\t\t\t\t\tvar classdata = classes[i].match(/column(\\d)/);\n\t\t\t\t\tif (classdata != null) {\n\t\t\t\t\t\tcolumn = classdata[1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclassdata = classes[i].match(/keyword(\\d)/);\n\t\t\t\t\t\tif (classdata != null) {\n\t\t\t\t\t\tkeyword = classdata[1];\n\t\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\tif ($(\"#filteroptions\").length > 0) {\n\t\t\t\t var options = $(\"#filteroptions\").attr(\"class\").split(' ');\n\t\t\t\t for (var i in options) {\n\t\t\t\t\thidecolumn = options[i].match(/hidecolumn(\\d)/);\n\t\t\t\t\tif (hidecolumn != null) {\n\t\t\t\t\t hideoption = hidecolumn[1];\n\t\t\t\t\t} else if (options[i].match(/prefilter/)) {\n\t\t\t\t\t prefilter = $(\"#filteroptions\").attr(\"title\");\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\t$(\".filteredtable\").before(\"<div id=\\\"calendar-search\\\"><p class=\\\"dropdown\\\">\" + $(\".filteredtable thead th:nth-child(\" + column + \")\").text() + \": <select id=\\\"filter\\\"><option value=\\\"\\\">View All</option></select></p><p class=\\\"filtersearch\\\">Search: <input type=\\\"text\\\" id=\\\"filtersearch\\\"/></p></div>\");\n\t\t\t\tif (isMobile) {\n\t\t\t\t\t$(\"#calendar-search .filtersearch\").append(\"<input type=\\\"button\\\" value=\\\"Go\\\">\");\n\t\t\t\t}\n\t\t\t\tvar cats = new Array();\n\t\t\t\t$(\".filteredtable tbody tr td:nth-child(\" + column + \")\").each(function() {\n\t\t\t\t\tvar vals = $(this).text().split(\", \");\n\t\t\t\t\tfor (var i in vals) {\n\t\t\t\t\t\tif (jQuery.inArray($.trim(vals[i]), cats) == -1) {\n\t\t\t\t\t\t\tcats.push($.trim(vals[i]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (keyword > 0) {\n\t\t\t\t\t$(\".filteredtable tr td:nth-child(\" + keyword + \")\").css(\"display\", \"none\");\n\t\t\t\t\t$(\".filteredtable tr th:nth-child(\" + keyword + \")\").css(\"display\", \"none\");\n\t\t\t\t}\n\t\t\t\tif (hideoption > 0) {\n\t\t\t\t\t$(\".filteredtable tr td:nth-child(\" + hideoption + \")\").css(\"display\", \"none\");\n\t\t\t\t\t$(\".filteredtable tr th:nth-child(\" + hideoption + \")\").css(\"display\", \"none\");\n\t\t\t\t}\n\t\t\t\tcats.sort();\n\t\t\t\tfor (var i in cats) {\n\t\t\t\t\t$(\"#filter\").append(\"<option>\"+cats[i]+\"</option>\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$(\"#filter\").change(function() {\n\t\t\t\t\tsearchtable();\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t$(\"#filtersearch\").keyup(function() {\n\t\t\t\t\tsearchtable();\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tfunction searchtable() {\n\t\t\t\t\t/* Filter the table */\n\t\t\t\t\t$.uiTableFilter( $('table.filteredtable'), $(\"#filtersearch\").val(), $(\"#filter\").val(), $(\".filteredtable thead th:nth-child(\" + column + \")\").text());\n\t\t\t\t\t/* Remove tints from all rows */\n\t\t\t\t\t$('table.filteredtable tr').removeClass(\"even\");\n\t\t\t\t\t/* Filter through what is still displaying and change the tints */\n\t\t\t\t\tvar counter = 0;\n\t\t\t\t\t$('table.filteredtable tr').each(function() {\n\t\t\t\t\t\t\t\t\t if($(this).css(\"display\") != \"none\") {\n\t\t\t\t\t\t\t\t\t\t if (counter % 2) {\n\t\t\t\t\t\t\t\t\t\t $(this).addClass(\"even\");\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t counter++;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t });\n\t\t\t\t}\n\t\t\n\t\t\t\tif (prefilter != -1) {\n\t\t\t\t $(\"#filter\").val(prefilter);\n\t\t\t\t searchtable();\n\t\t\t\t}\n\t\t\t\tif ($(\"#filteroptions.hidefilters\").length) {\n\t\t\t\t $(\"#calendar-search\").hide();\n\t\t\t\t}\n\t\t\n\n\t\t\t\t$('#filter-form').submit(function(){\n\t\t\t\t\treturn false;\n\t\t\t\t}).focus(); //Give focus to input field\n\t\t\t}\n\t\t}", "function output_table(res,results) {\n\tres.render('query.jade',\n\t\t { results: results }\n\t );\n}", "function buildTable(){\n\n}", "function processSearchResults(data) {\n clearSearchResults();\n\n var templateTable = $(\"#table-template\").clone();\n var templateRow = templateTable.find(\"#template-row\");\n templateTable.attr(\"id\", \"\");\n templateRow.attr(\"id\", \"\");\n for (var i = 0; i < data.people.length; i++) {\n var newRow = templateRow.clone();\n var person = data.people[i];\n newRow.find(\"td.name\").text(person.first + \" \" + person.last);\n newRow.find(\"td.SSN\").text(person.ssn);\n newRow.find(\"td.gender\").text(person.gender);\n var birthDate = moment(person.birthDate);\n newRow.find(\"td.DOB\").text(birthDate.format(\"DD MMM, YYYY\"));\n\n templateTable.find(\"tbody\").append(newRow);\n }\n\n templateRow.remove();\n templateTable.show();\n setSearchResults(templateTable);\n }", "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < ufoSightings.length; i++) {\n // Get get the current sightings object and its fields\n var sightings = ufoSightings[i];\n var fields = Object.keys(sightings);\n // Create a new row in the tbody, set the index to be i + startingIndex\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n // For every field in the sightings object, create a new cell at set its inner text to be the current value at the current sightings field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = sightings[field];\n }\n }\n}" ]
[ "0.743672", "0.70650834", "0.6980636", "0.69630826", "0.6943558", "0.69313043", "0.6914891", "0.688134", "0.6859331", "0.67941797", "0.6748846", "0.6745292", "0.67311084", "0.663569", "0.66026706", "0.65962064", "0.65385216", "0.650936", "0.65050286", "0.649297", "0.6486279", "0.648407", "0.6482932", "0.6475778", "0.64681995", "0.6466706", "0.64518464", "0.6449269", "0.64480567", "0.64320713", "0.64218414", "0.6411175", "0.6408228", "0.64020675", "0.6400555", "0.6390898", "0.6382488", "0.638156", "0.6379593", "0.6371142", "0.63542694", "0.6347888", "0.63436407", "0.63421744", "0.6339229", "0.63313377", "0.6309855", "0.6301591", "0.62989074", "0.62974674", "0.6296094", "0.62947255", "0.6262628", "0.62384397", "0.6237445", "0.6236173", "0.6232459", "0.6222943", "0.6219306", "0.6219134", "0.6210551", "0.62080294", "0.6200261", "0.6197061", "0.6196951", "0.61890936", "0.6184987", "0.6181041", "0.61809874", "0.61719674", "0.6171428", "0.6160927", "0.61603796", "0.61594886", "0.61587596", "0.6157746", "0.6156955", "0.6156153", "0.6155835", "0.61542857", "0.61542016", "0.614847", "0.6143921", "0.613891", "0.61381114", "0.6135032", "0.6131099", "0.61249226", "0.6123492", "0.6122227", "0.61214477", "0.612027", "0.61122185", "0.61112875", "0.6109277", "0.6100185", "0.60905224", "0.6088407", "0.6085616", "0.60801286" ]
0.7709293
0
Create search function based on what the user enters in the search fields
function handleSearchButtonClick() { var filterDateTime = $dateTimeInput.value.trim().toLowerCase(); var filterCity = $cityInput.value.trim().toLowerCase(); var filterState = $stateInput.value.trim().toLowerCase(); var filterCountry = $countryInput.value.trim().toLowerCase(); var filterShape = $shapeInput.value.trim().toLowerCase(); if (filterDateTime || filterCity || filterState || filterCountry || filterShape) { if (filterDateTime){ search_data = dataSet.filter (function(sighting) { var SightingDateTime = sighting.datetime.toLowerCase(); return SightingDateTime === filterDateTime; }); } else {search_data = dataSet}; if (filterCity){ search_data = search_data.filter (function(sighting) { var SightingCity = sighting.city.toLowerCase(); return SightingCity === filterCity; }); } else {search_data = search_data}; if (filterState){ search_data = search_data.filter (function(sighting) { var SightingState = sighting.state.toLowerCase(); return SightingState === filterState; }); } else {search_data = search_data}; if (filterCountry){ search_data = search_data.filter (function(sighting) { var SightingCountry = sighting.country.toLowerCase(); return SightingCountry === filterCountry; }); } else {search_data = search_data}; if (filterShape){ search_data = search_data.filter (function(sighting) { var SightingShape = sighting.shape.toLowerCase(); return SightingShape === filterShape; }); } else {search_data = search_data}; } else { // Show full dataset when the user does not enter any serch criteria search_data = dataSet; } $('#table').DataTable().destroy(); renderTable(search_data); pagination_UFO(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function search() {\n let search_text = $search_text.value;\n decide_search(search_text)\n}", "function searchHelper() {\r\n let searchValue = searchField.value;\r\n if (searchValue.length) search(searchValue);\r\n else getAll();\r\n }", "function search() {\n\t\n}", "function searchTerm(){\n \n }", "function basicsearch() {\n searchString = document.basicForm.basicText.value;\n searchTerms = searchString.split(/\\s/);\n\n putHeader();\n\n findResults();\n putResults();\n\n putFooter();\n\n writeResultsPage();\n}", "function searchKeywords() {\n if(searchString.toLowerCase().includes('unit')) {\n if(searchString.toLowerCase().includes('1')) {\n searchBox.value = 'Javascript DOM JQuery CSS function html flexbox arrays';\n } if(searchString.toLowerCase().includes('2')) {\n searchBox.value = 'middleware node express authorization authentication psql ejs fetch api cookies';\n } if(searchString.toLowerCase().includes('3')) {\n searchBox.value = 'react authorization authentication psql git fetch tokens'\n } if(searchString.toLowerCase().includes('4')) {\n searchBox.value = 'ruby rails psql'\n }\n }\n}", "function manualSearch(e) {\n let term = document.querySelector(\"#searchTerm\").value;\n term = term.trim();\n if (term.length < 1) return;\n manualSearchData(term.toLowerCase());\n}", "function Search() {\n switch (userInput) {\n case \"spotify-this-song\":\n spotifyThisSong();\n break;\n case \"movie-this\":\n movieThis();\n break;\n case \"concert-this\":\n concertThis();\n break;\n case \"do-what-it-says\":\n doWhatItSays();\n break;\n }\n\n}", "function SearchWrapper () {}", "function search() {\n\tvar query = $(\".searchfield\").val();\n\tif (query == \"\") {\n\t\tdisplaySearchResults(\"\", data, data);\n\t}\n\telse {\n\t\tvar results = idx.search(query);\n\t\tdisplaySearchResults(query, results, data);\n\t\tga('send', 'event', 'Search', 'submit', query);\n\t}\n}", "function search(_event) {\r\n let inputName = document.getElementById(\"searchname\");\r\n let inputMatrikel = document.getElementById(\"searchmatrikel\");\r\n let query = \"command=search\";\r\n query += \"&nameSearch=\" + inputName.value;\r\n query += \"&matrikelSearch=\" + inputMatrikel.value;\r\n console.log(query);\r\n sendRequest(query, handleSearchResponse);\r\n }", "function search() {\n $.var.currentSupplier = $.var.search;\n $.var.currentID = 0;\n $.var.search.query = $(\"#searchable\").val();\n if ($.var.search.query.trim().length === 0) { // if either no string, or string of only spaces\n $.var.search.query = \" \"; // set query to standard query used on loadpage\n }\n $.var.search.updateWebgroupRoot();\n}", "function search(){\n let query;\n if(searchLocation===\"location\"){\n searchLocation(\"\")\n }\n query=`https://ontrack-team3.herokuapp.com/students/search?location=${searchLocation}&className=${searchClass}&term=${searchName}` \n prop.urlFunc(query);\n }", "function createSearchString()\n{\n//start at one because the arrays are created by extracting the numeric portion of the form element's name\n//for example: searchText1, searchText2\nfor(var i=1; i < this.searchTextArray.length; i++)\n\t{\n\tvar searchVal = this.prepHTMLValue(this.getValue(this.searchTextArray[i]));\n\tvar searchSlice = this.getValue(this.fieldLimitArray[i]);\n\tif( searchVal != \"\" )\n\t\t{\n\t\tif(i != 1 )\n\t\t\t{\n\t\t\tthis.searchString +=this.getValue(this.booleanArray[i-1]);\n\t\t\t}\n\t\tthis.searchString += searchSlice+\"(\"+searchVal+\")\";\n\t\t}\n\t}\n}", "function handleSearch() {\n\n\tvar value = $(\"#searchBox\").val();\n\t\n\tif(value != null && value != \"\") {\n\t\tsearchStationForName(value);\n\t}\n\n}", "function searchThis(e) {\n $('#searchbox').val($(e).text());\n FJS.filter();\n}", "function initSearch(e) {\n e.preventDefault();\n\n const searchType = determineSearch();\n if (searchType.invalid) return;\n\n const deptKey = dept.value.toUpperCase().replace(/\\s+/g, '');\n const courseKey = course.value.toUpperCase().replace(/\\s+/g, '');\n const sectionKey = section.value.toUpperCase().replace(/\\s+/g, '');\n resetInputs();\n\n searchFunc = searchType.searchFunc;\n searchFunc(deptKey, courseKey, sectionKey);\n}", "function executeSearch() {\n\tlet user_input = $('#class-lookup').val().toUpperCase();\n\t\t\n\t// clears search results\n\t$('#search-return').empty();\n\n\t// display search hint when input box is empty\n\tif (user_input == \"\"){\n\t\t$('#search-return').append(emptySearchFieldInfo());\n\t}\n\t\n\tfor (course in catalog) {\n\t\t\n\t\t// user input describes a course code\n\t\tif (user_input == course) {\n\t\t\t$('#search-return').append(createCourseContainer(course));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// user input describes a department code\n\t\tif (user_input == catalog[course]['department']) {\n\t\t\t$('#search-return').append(createCourseContainer(course));\n\t\t}\n\t\t\n\t}\n\t\n\t// display a message if no results is returned\n\tif ($('#search-return').children().length == 0) {\n\t\t$('#search-return').append(`<li style='border: 3px solid black;'>\n\t\t\t\t\t\t\t\t\t\t<h3>Sorry, we couldn't find what you were looking for.</h3>\n\t\t\t\t\t\t\t\t\t</li>`)\n\t}\n}", "function ssearch_do_search() {\n\tvar search_string = d$(\"string_to_search\").value;\n\tif ( !search_string.length )\n\t\treturn;\n\twoas.do_search(search_string);\n}", "function searchVenue(){\n\t\t$(\"#query\").click(function(){\n\t\t\t$(this).val(\"\");\n\t\t});\n\n\t\t$(\"#query\").blur(function(){\n\t\t\tif ($(this).val() == \"\") {\n\t\t\t\t$(this).val(\"Example: Ninja Japanese Restaurant\");\n\t\t\t}\n\t\t\n\t\t\tif ($(this).val() != \"Example: Ninja Japanese Restaurant\") {\n\t\t\t\t$(this).addClass(\"focus\");\n\t\t\t} else {\n\t\t\t\t$(this).removeClass(\"focus\");\n\t\t\t}\n\t\t});\n\n\t\t//Submit search query and call to getVenues\n\t\t$(\"#searchform\").submit(function(event){\n\t\t\tevent.preventDefault();\n\t\t\tif (!lat) {\n\t\t\t\tnavigator.geolocation.getCurrentPosition(getLocation);\n\t\t\t} else {\n\t\t\t\tgetVenues();\n\t\t\t}\t\t\n\t\t});\n\n\t}", "function build_search() {\n\t\t\tvar search_box = element.find(settings.search_box);\n\t\t\tif (!search_box.length) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsearch_box.css({color: settings.css_off}).val('search');\n\t\t\tsearch_box.click(function () {\n\t\t\t\t$(this).css({color: settings.css_on}).val('');\n\t\t\t});\n\t\t\tsearch_box.blur(function () {\n\t\t\t\tif ($(this).val() === '') {\n\t\t\t\t\t$(this).css({color: settings.css_off}).val('search');\n\t\t\t\t}\n\t\t\t});\n\t\t\tsearch_box.on('keyup', function (e) {\n\t\t\t\t//don't count the SHIFT key as a key press\n\t\t\t\tif (e.which == 16) return;\n\t\t\t\tsearch($(this).val());\n\t\t\t});\n\t\t}", "function searchCheck() {\n switch(searchType) {\n case \"my-tweets\":\n\tmyTweets();\n\tbreak;\n case \"spotify-this-song\":\n\tcheckName();\n\tbreak;\n case \"movie-this\":\n checkName();\n\tbreak;\n case \"do-what-this-says\":\n\trandomSearch();\n\tbreak;\n }\n}", "function searchCall() {\n $('#searchButton').click(function () {\n var qString = $('#searchInput').val();\n bindSearchUrl(qString);\n });\n\n $('#searchInput').keypress(keypressHandler);\n }", "function search() {\n restartSearch();\n if (searchField.val()) {\n dt.search(searchField.val()).draw();\n }\n if (searchSelect.val()) {\n dt.columns(2).search(searchSelect.val()).draw();\n }\n}", "function searchWine(){\n setSearchFor();\n whatToSearch();\n watchSubmit();\n}", "function action_filter() {\n\tvar filter_criteria = {};\n\n\tvar search = $('#search').val().toLowerCase();\n\tfilter_document(search);\n\t\n\treturn false;\n}", "function search() {\n if($(\"name\").value.match(/\\S/)) {\n let input = $(\"name\").value;//let something be the word in side\n makeRequest(input);\n }\n }", "function _search()\n {\n var allCategoryNames = [];\n // Incorporate all terms into\n var oepterms = $scope.selectedOepTerms ? $scope.selectedOepTerms : [];\n var situations = $scope.selectedSituations ? $scope.selectedSituations : [];\n var allCategories = oepterms.concat(situations);\n allCategories.forEach(function(categoryObj) {\n allCategoryNames.push(categoryObj.name);\n checkEmergencyTerms(categoryObj.name);\n });\n search.search({ category: allCategoryNames.join(',') });\n }", "function SearchForm() {\n\n}", "function handleSearch() {\n triggerSearch({}); // need empty braces here\n }", "function getInput() {\n\t\t\tsearchBtn.addEventListener('click', () => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsearchTerm = searchValue.value.toLowerCase();\n\t\t\t\tconsole.log(searchTerm);\n\t\t\t\tresults.innerHTML = ''; // clear page for new results\n\t\t\t\tgetData(searchTerm); // run w/ searchTerm\n\t\t\t\tformContainer.reset();\n\t\t\t});\n\t\t}", "function runSearch(e) {\n if (e.target.value === \"\") {\n // On empty string, remove all search results\n // Otherwise this may show all results as everything is a \"match\"\n applySearchResults([]);\n } else {\n const tokens = e.target.value.split(\" \");\n const moddedTokens = tokens.map(function (token) {\n // \"*\" + token + \"*\"\n return token;\n })\n const searchTerm = moddedTokens.join(\" \");\n const searchResults = idx.search(searchTerm);\n const mapResults = searchResults.map(function (result) {\n const resultUrl = docMap.get(result.ref);\n return { name: result.ref, url: resultUrl };\n })\n\n applySearchResults(mapResults);\n }\n\n}", "function searchUser() {\n var WINDOW_LOCATION_SEARCH = \"?search={search}\"\n var term = $('#search').val().trim();\n if (term.length > 3) {\n var bySearchTermUrl = GET_USERS + WINDOW_LOCATION_SEARCH.replace('{search}', term)\n fetchUsers(bySearchTermUrl)\n }\n}", "function querySearchTerm(){ \n\t\tlocalStorage.clear(); //Clears storage for next request\n\t\t// get data from html value,\n\t\tvar inputValue = document.getElementById('btn-search').dataset.valinput; \n\t\tconsole.log(inputValue);\n\t\t\n\t\tif(inputValue == \"email\"){ \n\t\t\tvar email = $('input[type=\"text\"]').val().toLowerCase();\n\t\t\tsearchEmail(email)\n\t\t\treturn true;\n\t\t}else{\n var phone = $('input[type=\"text\"]').val().toLowerCase();\n\t\t\tvalidatePhoneNumber(phone)\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\t\n }", "function runSearch(search, term) {\n // By default, if no search type is provided, search for a movie\n if (!search) {\n search = \"movie-this\";\n }\n\n // this runs the omdb.js if user selects \"movie-this\"\n if (search === \"movie-this\") {\n // By default, if no search term is provided, search for \"Mr. Nobody\"\n if (!term) {\n term = \"Mr. Nobody\";\n };\n //uses constructor from omdb.js to call the findMovie function and pass through the user's term\n movie.findMovie(term);\n // this runs the bands.js if user selects \"concert-this\"\n } else if (search === \"concert-this\") {\n //uses constructor from bands.js to call the findShow function and pass through the user's term\n band.findShow(term);\n // this runs the spotify.js if user selects \"spotify-this-song\"\n } else if (search === \"spotify-this-song\") {\n //By default, if no search term is provided, search for \"The Sign\"\n if (!term) {\n term = \"The Sign\";\n };\n //uses constructor from spotify.js to call the findSong function and pass through the user's term\n spotify.findSong(term);\n // if user types in an unknown search command\n } else {\n console.log(\"I don't know that.\")\n }\n}", "function Search(props) {\n //searchfunction will b called in the same line\n const searchFunction = (event)=>{\n const fullName = event.target.value.trim().toLowerCase();//ignore uppercase\n if(event.keyCode===8){\n props.searchFunction(fullName)//searches through this data item\n }\n props.searchFunction(fullName);\n }\n return (\n //will return this html right under the header component\n <nav className=\"navbar navbar-light bg-light justify-content-center\">\n <form className=\"form-inline\">\n <input className=\"form-control mr-sm-2\" type=\"search\" placeholder=\"Search by Name\" aria-label=\"Search\" onKeyUp={searchFunction}/>\n </form>\n </nav>\n )\n}", "function search() {\n\n // Split the forum input into left (subject) and right (catalog #) parts\n // i.e. \"EECS 211\" is split to \"EECS\" and \"211\", respectively\n var inputArr = $('#classSearchBar').val().split(\" \");\n var subject = inputArr[0]; // LEFT\n var catalogNum = inputArr[1]; // RIGHT\n \n // Search depending on the inputs given by the user\n // If the search form is not undefined/empty, then SEARCH\n if ($('#classSearchBar').val() != undefined &&\n $('#classSearchBar').val() !== \"\") {\n\n // Hold search results in a temporary array of the top 'resultLimit' # of JSON objects\n var searchResults = [];\n var resultLimit = 7;\n\n // CASE 1: Search form contains 'subject' but no 'catalogNum' - search by subject ONLY\n if (catalogNum == undefined || catalogNum === \"\") {\n subject = subject.toUpperCase();\n Caesar.getCourses(4540, subject, function(err, courses) {\n\n // Iterate through the search results and store the top 7 values\n $.each(courses, function(index, element) {\n if (searchResults.length < resultLimit) {\n searchResults.push(element);\n }\n });\n \n // Add it to the website!\n $('#results').empty();\n $('#results').append('<li class=\"listButton\" id=\"add-event\">Add a custom event</li>');\n $.each(searchResults, function(index, element) {\n generateList(index, element);\n });\n });\n\n // CASE 2: Search form contains 'subject' and 'catalogNum' - search by BOTH\n } else {\n subject = subject.toUpperCase();\n Caesar.getCourses(4540, subject, function(err, courses) {\n\n // Iterate through the search results and store the top 7 values that match catalogNum\n $.each(courses, function(index, element) {\n if (searchResults.length < resultLimit && \n element.catalog_num.startsWith(catalogNum)) {\n searchResults.push(element);\n }\n });\n\n // Add it to the website!\n $('#results').empty();\n $('#results').append('<li class=\"listButton\" id=\"add-event\">Add a custom event</li>');\n $.each(searchResults, function(index, element) {\n generateList(index, element);\n });\n });\n }\n }\n }", "function makeSearch(event) {\n event.preventDefault();\n\n toggleError();\n\n searchRepos(\n searchInput.value,\n searchStartCB,\n searchSuccessErrorCB,\n searchFinalCB\n );\n}", "function handleSearchClick(){\r\n var temp = document.getElementById('searchText').value;\r\n fetchRecipesBySearch(temp);\r\n }", "function searchFunction(evt) {\n\tvar title = document.title;\n\tvar searchString = this.value;\n\tconsole.log(searchString);\n\tvar url = \"\";\n\tif(title === 'Home') {\n\t\turl = \"/636800/library/search.php?search_string=\" + searchString;\t\n\t\tproductGetRequest(url, 'products');\n\t}\n\telse {\n\t\tvar category_name = document.title;\n\t\turl = \"/636800/library/search.php?search_string=\" + searchString + \"&category_name=\" + category_name;\t\n\t\tproductGetRequest(url, 'products');\n\t}\n\t\n\t/*\n\tif(title == \"Home\" && search_string === \"\") {\n\t\turl = \"/636800/library/all_json.php\";\n\t\tjsonRequest(url, displayAllProducts, 'products');\n\t}\n\telse if(title === \"Home\") {\n\t\turl = \"/636800/library/search.php?search_string=\" + search_string;\n\t\tproductGetRequest(url, 'products');\n\t}\n\t*/\n\t/*\n\telse if(search_string === \"\") {\n\t\turl = \"/636800/library/category_json.php?category_name=\" + title;\n\t\tjsonRequest(url, displayAllProducts, 'products');\n\t}\n\telse {\n\t\turl = \"/636800/library/search_json_category.php?category_name=\" + title + \"&search_string=\" + search_string;\n\t\tjsonRequest(url, displayAllProducts, 'products');\n\t}\n\t*/\n\n}", "function search(){\n var searchInputValue = searchInput.value;\n var uppercaseValue = searchInputValue.toUpperCase();\n if (uppercaseValue == 'QUEENSTOWN' ||\n uppercaseValue == 'WANAKA' ||\n uppercaseValue == 'CADRONA' ||\n uppercaseValue == 'REMARKABLES' ||\n uppercaseValue == 'THE REMARKABLES' ||\n uppercaseValue == 'THE REMARKS' ||\n uppercaseValue == 'CORONET PEAK' ){\n loadThumbnails(locations.queenstown);\n initMap(168.697751, 45.026377);\n } else if (uppercaseValue == 'CHRISTCHURCH'||\n uppercaseValue == 'CANTERBURY'||\n uppercaseValue == 'MT HUTT' ||\n uppercaseValue == 'MOUNT HUTT' ||\n uppercaseValue == 'TEMPLE BASIN' ||\n uppercaseValue == 'ARTHUR\\'S PASS' ||\n uppercaseValue == 'CHEESEMAN' ||\n uppercaseValue == 'PORTERS' ||\n uppercaseValue == 'MT OLYMPUS' ||\n uppercaseValue == 'MOUNT OLYMPUS' ||\n uppercaseValue == 'BROKEN RIVER'){\n loadThumbnails(locations.christchurch);\n initMap(172.493273, 43.538478);\n } else if (uppercaseValue == 'WHAKAPAPA' ||\n uppercaseValue == 'RUAPEHU' ||\n uppercaseValue == 'MOUNT RUAPEHU' ||\n uppercaseValue == 'MT RUAPEHU' ||\n uppercaseValue == 'TONGARIRO' ||\n uppercaseValue == 'OHAKUNE' ||\n uppercaseValue == 'NATIONAL PARK' ||\n uppercaseValue == 'TUROA'){\n loadThumbnails(locations.whakapapa);\n initMap(175.549994, 39.231289);\n } else {\n thumbnailsBox.innerHTML = '<span class=\"no-results\">No location matched your search, please check your spelling and try again. Hint: Try searching by field name or nearest town, Eg. Queenstown.</span>';\n }\n }", "function userInput(userSelect, userSearch) {\n if (userSelect === \"movie-this\") {\n movieInfo(userSearch);\n } if (userSelect === \"concert-this\") {\n concertInfo(userSearch);\n } if (userSelect === \"spotify-this-song\") {\n songInfo(userSearch);\n } if (userSelect === \"do-what-it-says\") {\n doWhatitSays(userSearch);\n }\n}", "function initSearch() {\n var searchInput=$(\"#search-input\");\n var magnifier=$(\"#magnifier\");\n var filmWrapper=$(\".film-wrapper\");\n var seriesWrapper=$(\".series-wrapper\");\n var myQuery;\n\n searchInput.on('keydown',function(e) {\n if (e.which == 13) {\n myQuery=searchInput.val();\n searchApi(myQuery);\n searchInput.val(\"\");\n }\n });\n\n magnifier.click(function() {\n myQuery=searchInput.val();\n searchApi(myQuery);\n searchInput.val(\"\");\n });\n}", "function searchInput() {\n \t\t\tvar i,\n \t\t\t item,\n \t\t\t searchText = moduleSearch.value.toLowerCase(),\n \t\t\t listItems = dropDownList.children;\n\n \t\t\tfor (i = 0; i < listItems.length; i++) {\n \t\t\t\titem = listItems[i];\n \t\t\t\tif (!searchText || item.textContent.toLowerCase().indexOf(searchText) > -1) {\n \t\t\t\t\titem.style.display = \"\";\n \t\t\t\t} else {\n \t\t\t\t\titem.style.display = \"none\";\n \t\t\t\t}\n \t\t\t}\n \t\t}", "function searchUtil(item,toSearch)\n{\n /* Search Text in all 3 fields */\n return ( item.name.toLowerCase().indexOf(toSearch.toLowerCase()) > -1 || item.Email.toLowerCase().indexOf(toSearch.toLowerCase()) > -1 || item.EmpId == toSearch\n ) \n ? true : false ;\n}", "function search() {\n // get the value of the search input field\n var searchString = $('#search').val().toLowerCase();\n\n markerLayer1.setFilter(showType);\n\n // here we're simply comparing the 'name' property of each marker\n // to the search string, seeing whether the former contains the latter.\n function showType(feature) {\n return feature.properties.name\n .toLowerCase()\n .indexOf(searchString) !== -1;\n }\n}", "function find() {\n\t\tvar query = $(\"#search-query\").val();\n\n\t\t// check to see if the query contains special commands/characters\n\t\tconvert(query);\n\t\t\n\n\t\tfindSimilar(query);\n\t}", "function search(e){\n e.preventDefault();\n searchCriteria.value == 'user' ? fetchUsersByName() : fetchReposByName()\n userList.innerHTML = ''\n form.reset();\n}", "function searchProduct(){\r\n \r\n var go = \"Thing(?i)\";\r\n \r\n submitProduct(go); \r\n \r\n }", "function goSearch(){\r\n\tvar str;\r\n\tif(document.getElementById('q').value == \"Enter product name, company or keyword\"){\r\n\t\tparam = '';\r\n\t\talert(\"Please enter a product name, company or keyword\");\r\n\t\treturn false;\r\n\t}\r\n\tif(document.getElementById('q').value == \"\"){\r\n\t\tparam = '';\r\n\t\talert(\"Please enter a product name, company or keyword\");\r\n\t\treturn false;\r\n\t}\r\n\telse {\r\n\t\tdocument.getElementById(\"search_top\").style.visibility = \"visible\";\r\n\t\t\r\n\t str = escape(document.getElementById('q').value);\t\r\n\t searchStr = document.getElementById('q').value;\r\n\t featureListPopulate();\r\n\t\r\n\r\n\t\tvar url = showTimeUrl+'?q='+str;\t\r\n\t\t\r\n\t\ttextNew = 'true';\r\n\t\r\n\t\tdocument.getElementById('txtHidden').value = param;\t\r\n\t\tdocument.getElementById('featureList').value = featureListString ;\r\n\t\tdocument.searchform.action =url ;\r\n\t\tdocument.searchform.submit();\t\r\n\t\t\t}\r\n\t\t}", "function getInput(event){\n event.preventDefault();\n var searchQuery;\n searchQuery = ($(searchBox).val());\n console.log(searchQuery);\n var ytUrl =`https://youtube.googleapis.com/youtube/v3/search?type=video&part=snippet&maxResults=25&q=${searchQuery}\\\\+'+travel'+'&key=AIzaSyDD9MbkIVSzT2a3sOv97OecaqhyGdF174c`;\n searchVideos(ytUrl);\n\n var key = `AIzaSyDWNMiooGhkXMAhnoTL8pudTR83im36YPo`;\n \n var bookUrl = `https://www.googleapis.com/books/v1/volumes?q=${searchQuery}\\\\+travel+guide&key=${key}`;\n searchBooks(bookUrl);\n}", "function search() {\r\n\r\n\tif (player)\r\n\t\tplayer.stop();\r\n\t$(\"#output\").css(\"border\",\"auto solid #69605d\");\r\n\r\n\t//clear the previous search data\r\n\tdocument.getElementById(\"output\").innerHTML = \"\";\r\n\r\n\t//get the search query from the search box\r\n\tlet term = document.getElementById(\"query\").value;\r\n\tlet filter = document.getElementById(\"wav\").checked ? \"wav\" : null;\r\n\t//set auth to false because we defined auth = true to be the bearer auth token\r\n\tlet auth = false;\r\n\t//finally pass parameters to the create request function\r\n\tcreateRequest(auth,processSearch,undefined,term,filter);\r\n}", "bindSearcher() {\n $('#oompaName').bind(\"change paste keyup\", function() {\n var searchName = $('#oompaName').val().toLowerCase(); \n if((this.actualOompaList !== null)) {\n var a = JSON.parse(this.actualList);\n var tempResults = [];\n a.forEach(function(element){\n var name = element['first_name'].toLowerCase();\n var lastName = element['last_name'].toLowerCase();\n var profession = element['profession'].toLowerCase();\n\n if(name.includes(searchName) || lastName.includes(searchName) ||\n profession.includes(searchName)) {\n tempResults.push(element);\n }\n });\n paintOompaTemp(tempResults);\n }\n });\n }", "function do_search() {\n var query = input_box.val().toLowerCase();\n\n if(query && query.length) {\n if(selected_token) {\n deselect_token($(selected_token), POSITION.AFTER);\n }\n\n if(query.length >= settings.minChars) {\n show_dropdown_searching();\n clearTimeout(timeout);\n\n timeout = setTimeout(function(){\n run_search(query);\n }, settings.searchDelay);\n } else {\n hide_dropdown();\n }\n }\n }", "function do_search() {\n var query = input_box.val().toLowerCase();\n\n if(query && query.length) {\n if(selected_token) {\n deselect_token($(selected_token), POSITION.AFTER);\n }\n\n if(query.length >= settings.minChars) {\n show_dropdown_searching();\n clearTimeout(timeout);\n\n timeout = setTimeout(function(){\n run_search(query);\n }, settings.searchDelay);\n } else {\n hide_dropdown();\n }\n }\n }", "function SearchByName(){\n if(inputSearch.value !== \"\"){\n setTimeout(responsiveVoice.speak(inputSearch.value),0);\n resultHotel= [];\n result = hotels.filter((hotel) =>{\n if( hotel.name.toLocaleLowerCase().indexOf(inputSearch.value.toLocaleLowerCase()) > -1){\n return hotel;\n }\n })\n inputSearch.value=\"\";\n resultHotel = result;\n display(result);\n }else{\n alerts(\"Add your Search\",3000);\n }\n range();\n filterByPrice()\n}", "function handleSearch() {\n const searchInput = $('#search-input')[0].value;\n people.forEach(person => {\n const name = `#${person.name.first}-${person.name.last}-card`;\n $(name).css('display', '');\n if (!(person.name.first + ' ' + person.name.last).includes(searchInput)) {\n $(name).css('display', 'none');\n }\n });\n}", "function search_for_user() {\n\tvar data_query=\"searchuser=1\";\n\t\n\tvar clean_inputs = 1;\n\t\n\tvar fname = $(\"#search_user_fname\").val();\n\tif(fname!='' && fname!=' '){\n\t\tdata_query=data_query+\"&fname=\"+fname;\n\t\tclean_inputs=0;\n\t}\n\tvar lname = $(\"#search_user_lname\").val();\n\tif(lname!='' && lname!=' '){\n\t\tdata_query=data_query+\"&lname=\"+lname;\n\t\tclean_inputs=0;\n\t}\n\tvar aem = $(\"#search_user_aem\").val();\n\tif(aem!='' && aem!=' '){\n\t\tdata_query=data_query+\"&aem=\"+aem;\n\t\tclean_inputs=0;\n\t}\n\t\n\tif(clean_inputs==0){\n\t\t$.ajax({\n\t\t\ttype: \"GET\",\n\t\t\turl: \"functions.php\",\n\t\t\tdata: data_query,\n\t\t\tdataType: \"html\",\n\t\t\tsuccess: function(html){ \n\t\t\t\t$(\"#search_user_results\").html(html);\n\t\t\t}\n\t\t}); \n\t}else{\n\t\tview_all_for_user('aem','ASC');\n\t}\n}", "function search( input ){\n // select chat list -> contacts -> each( user name ? search input )\n $('.chat-list .contact').each( function() {\n //var filter = this.innerText; // < - You, Me , I ( for log user )\n //var _val = input[0].value.toUpperCase();\n\n if ( this.innerText.indexOf( input[0].value.toUpperCase() ) > -1)\n this.style.display = \"\";\n else this.style.display = \"none\";\n\n });\n\n}", "function runSearch (input, searchType) {\n\n //Switch Function - determines input / request type// \n switch(input) {\n //OMDB// \n case \"movie-this\":\n console.log(searchType);\n movieThis(searchType);\n break;\n\n //Bands In Town//\n case \"concert-this\":\n concertThis(searchType);\n break;\n\n //Spotify//\n case \"spotify-this-song\":\n spotifyTrack(searchType);\n break;\n\n //Do Random from File//\n case \"do-what-it-says\":\n doRandom();\n break;\n }\n}", "function onSearchTerm(evt) {\n var text = evt.target.value;\n doSearch(text, $('#types .btn-primary').text());\n }", "function search(to_search, search_type=''){\n\n alert(to_search, search_type);\n\n}", "function userNormalSearch(e){\n\te.preventDefault();\n\tsearchTerm = $('#search').val().trim(); \n\tuserSearch();\n}", "function searchEventListener() {\n\t$(\"#searchbtn\").click(function() {\n\t\tif ($(\"#searchbox\").val() != '') {\n\t\t\tsearchNewspapers($(\"#searchbox\").val());\n\t\t}\n\t});\n}", "function search( event, searchTerms ){\n //console.debug( this, 'searching', searchTerms );\n $( this ).trigger( 'search:searchInput', searchTerms );\n if( typeof options.onfirstsearch === 'function' && firstSearch ){\n firstSearch = false;\n options.onfirstsearch( searchTerms );\n } else {\n options.onsearch( searchTerms );\n }\n }", "function search( event, searchTerms ){\n //console.debug( this, 'searching', searchTerms );\n $( this ).trigger( 'search:searchInput', searchTerms );\n if( typeof options.onfirstsearch === 'function' && firstSearch ){\n firstSearch = false;\n options.onfirstsearch( searchTerms );\n } else {\n options.onsearch( searchTerms );\n }\n }", "search(event){\n this.placeService.textSearch({\n query: `${event.target.value}`,\n type: 'airport'\n }, this.handleSuggestions);\n }", "function Search_what()\n {\n //assigning id's to variables for easier access\n var goo_check = $(\"#Google\");\n var edx_check = $(\"#edX\");\n var youtube_check = $(\"#UTube\");\n var gmail_check = $(\"#GMail\");\n var wiki_check = $(\"#Wiki\");\n\n //storing the query in a vaiable\n var query = $(\"#query\").val();\n\n //do something only if query exists\n if(query != \"\" && query != undefined)\n {\n //wikipedia search\n if(wiki_check.is(':selected'))\n {\n window.open(\"https://en.wikipedia.org/wiki/\"+ encodeURI(query) , '_blank');\n }\n //edX search\n if(edx_check.is(':selected'))\n {\n window.open(\"https://www.edx.org/course?search_query=\"+ encodeURI(query), '_blank');\n }\n //YouTube search\n if(youtube_check.is(':selected'))\n {\n window.open(\"https://www.youtube.com/results?search_query=\"+ encodeURI(query), '_blank');\n }\n //Google search\n if(goo_check.is(':selected'))\n {\n window.open(\"https://www.google.ca/#q=\"+ encodeURI(query), '_blank');\n }\n //GMail search\n if(gmail_check.is(':selected'))\n {\n window.open(\"https://mail.google.com/mail/u/0/#advanced-search/has=\"+ encodeURI(query), '_blank');\n }\n return true;\n }\n\n return false;\n\n\n }", "function search() {\n let input = getSearchCastInput();\n filterCast(input);\n}", "function searchClick() {\n console.log(\"sono qui\");\n var query = $('#titolo_digit').val();\n console.log(query);\n movieResult(query);\n tvResult(query);\n\n}", "function mainSearch() {\n event.preventDefault()\n const cityName = document.querySelector('#cityBox').value\n citySearch(cityName)\n}", "function search(input, trigger, searchType, parentUL) {\n\n if (input.length === 0 || input.toLowerCase() === SN.Global.Settings.placeHolder.toLowerCase()) {\n return false;\n }\n var url, searchWindow;\n if (SN.Global.Settings.searchHandler) {\n resetSearchBox();\n SN.Global.Settings.searchHandler(input, trigger, searchType);\n } else {\n $('#search-box').blur();\n url = getSearchUrl(parentUL) + encodeURI(input);\n searchWindow = window.open(url, '_blank');\n searchWindow.focus();\n resetSearchBox();\n }\n }", "function run_search() {\n var q = $(elem).val();\n if (!/\\S/.test(q)) {\n // Empty / all whitespace.\n show_results({ result_groups: [] });\n } else {\n // Run AJAX query.\n closure[\"working\"] = true;\n $.ajax({\n url: \"/search/_autocomplete\",\n data: {\n q: q\n },\n success: function(res) {\n closure[\"working\"] = false;\n show_results(res);\n }, error: function() {\n closure[\"working\"] = false;\n }\n })\n }\n }", "function onTextSearchInput(inputValue) {\n w3.filterHTML('#resultTable', '.item', inputValue);\n}", "function determineSearch() {\n let val = { invalid: false, searchFunc: searchDept };\n let r1 = /^\\s*[a-z]{2,4}\\s*$/i; // regex for dept code\n let r2 = /^\\s*[a-z0-9]{3,4}\\s*$/i; // regex for course and section code\n let re = /^\\s*$/; // regex for blank field\n\n let deptKeyid = r1.test(dept.value);\n let courseKeyid = r2.test(course.value);\n let sectionValid = r2.test(section.value);\n let deptEmpty = re.test(dept.value);\n let courseEmpty = re.test(course.value);\n let sectionEmpty = re.test(section.value);\n\n if (!sectionEmpty) {\n if (courseEmpty || !courseKeyid) {\n markInput(course, false);\n val.invalid = true;\n } else {\n markInput(course, true);\n }\n if (deptEmpty || !deptKeyid) {\n markInput(dept, false);\n val.invalid = true;\n } else {\n markInput(dept, true);\n }\n markInput(section, sectionValid);\n if (!sectionValid) val.invalid = true;\n val.searchFunc = searchSection;\n } else if (!courseEmpty) {\n if (deptEmpty || !deptKeyid) {\n markInput(dept, false);\n val.invalid = true;\n } else {\n markInput(dept, true);\n }\n markInput(course, courseKeyid);\n markInput(section, true);\n if (!courseKeyid) val.invalid = true;\n val.searchFunc = searchCourse;\n } else if (deptEmpty || !deptKeyid) {\n markInput(dept, false);\n val.invalid = true;\n markInput(course, true);\n markInput(section, true);\n } else {\n markInput(dept, true);\n markInput(course, true);\n markInput(section, true);\n }\n return val;\n}", "function search() {\n // Clear search results when user types in a new name\n $('#search-container').empty();\n\n // Search this text field's value after user types in and hits return\n var q = $('#search-field').val();\n\n var request = gapi.client.youtube.search.list({\n q: q,\n part: 'snippet'\n });\n // Send the request to the API server,\n // and invoke onSearchRepsonse() with the response.\n request.execute(onSearchResponse);\n}", "executeSearch(term) {\n var results;\n try {\n results = this.search.fuse.search(term); // the actual query being run using fuse.js\n } catch (err) {\n if (err instanceof TypeError) {\n console.log(\"hugo-fuse-search: search failed because Fuse.js was not instantiated properly.\")\n } else {\n console.log(\"hugo-fuse-search: search failed: \" + err)\n }\n return;\n }\n let searchitems = '';\n\n if (results.length === 0) { // no results based on what was typed into the input box\n this.resultsAvailable = false;\n searchitems = '';\n } else { // we got results, show 5\n for (let item in results.slice(0,5)) {\n let result = results[item];\n if ('item' in result) {\n let item = result.item;\n searchitems += this.itemHtml(item);\n }\n }\n this.resultsAvailable = true;\n }\n\n this.element_results.innerHTML = searchitems;\n if (results.length > 0) {\n this.top_result = this.element_results.firstChild;\n this.bottom_result = this.element_results.lastChild;\n }\n }", "function appsSearch() {\n\n\n var _search_input = ga('#s_search');\n var _input_timeout;\n\n var _searchGetResult = function(_this) {\n\n if($.trim(_this.val())) {\n ga('#apps_search').removeClass('ui_search_field_empty').addClass('ui_search_loading');\n var _by_genre = _this.data('searcgcateg');\n var send = jAjax('/cmd.php', 'post', 'cmd=searchInApps&genre=' + escape(_by_genre) + '&key=' + _this.val());\n send.done(function(data) {\n ga('#apps_search').removeClass('ui_search_loading');\n if(data === '0') {\n\n return displayErr(lang.err_tehnic);\n\n } else {\n\n ga('.apps_list_content').hide();\n\n ga('#apps_search_res').remove();\n ga('.apps_list_content').after(data);\n\n }\n });\n\n } else {\n ga('#apps_search').addClass('ui_search_field_empty');\n ga('#apps_search_res').remove();\n ga('.apps_list_content').show();\n }\n\n }\n\n\n _search_input.off('keyup.appsSearch').on('keyup.appsSearch', function(e) {\n e.preventDefault();\n e.stopPropagation();\n var _this = ga(this);\n clearTimeout(_input_timeout);\n _input_timeout = setTimeout(function() {\n clearTimeout(_input_timeout);\n _searchGetResult(ga(_this));\n }, 500);\n\n });\n _search_input.off('keypress.appsSearch,keydown.appsSearch').on('keypress.appsSearch,keydown.appsSearch', function(e) {\n\n clearTimeout(_input_timeout);\n });\n}", "function search() {\n var input = document.getElementById('query');\n if (input.value) {\n filter = new RegExp(input.value, 'gi');\n } else {\n filter = null;\n }\n socket.json.send({'search': input.value});\n}", "function search(input)\n{\n\tvar urlBase = initMe(); \n\tvar enteredTerms;\n\tvar recall = false;\n\n\t// We need this in case of very strict selection (see Advanced tab, search modes)\n\t$(\"#disease_list\").data(\"locked\",false);\n\t$(\"#location_list\").data(\"locked\",false);\n\t$(\"#disease_mirna_list\").data(\"locked\",false);\n\t$(\"#location_mirna_list\").data(\"locked\",false);\n\t\n\tvar species = $(\"#species_list\").val();\n\tif (species == 999999) //Nothing selected\n\t{\t\t\n\t\t//displayError('Please select species first!');\n\t\tmodalAlert(\"Please select species first!\",\"Species!\");\n\t\treturn;\n\t}\n\tif (input !== '' && input !== null && input !== undefined)\n\t{\n\t\tenteredTerms = input;\n\t\trecall = true;\n\t}\n\telse if ($(\"#enter_genes\").val() !== '')\n\t{\n\t\tenteredTerms = $(\"#enter_genes\").val().split(/\\n|\\r/);\n\t\t\n\t\tif (!allowedNumberOfTerms(enteredTerms,500))\n\t\t{\n\t\t\tmodalAlert(\"Please restrict your search terms to 500!\",\"Attention!\");\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (!$.isEmptyObject(enteredTerms))\n\t{\n\t\tvar searchJSON = $.toJSON(enteredTerms);\n\t\t$.ajax(\n\t\t{\n\t\t\ttype: 'POST',\n\t\t\turl: urlBase+'php/control.php',\n\t\t\tdata: { species: species, genes: searchJSON },\n\t\t\tbeforeSend: function() { loadingSmall(); },\n\t\t\tcomplete: function() { unloadingSmall(); },\n\t\t\tsuccess: function(data)\n\t\t\t{\t\t\t\t\n\t\t\t\tif ($.isEmptyObject(data))\n\t\t\t\t{\n\t\t\t\t\t$('#color_legend').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t\t$('#shape_legend').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t\t$('#info_section').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t\t$('#element_info').animate({ opacity: 1.0 },250);\n\t\t\t\t\tdisplayError('Sorry! Nothing found... :-(');\n\t\t\t\t}\n\t\t\t\telse //Enable and fill the rest of the lists\n\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$('#color_legend').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t\t$('#shape_legend').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t\t$('#info_section').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t\t$('#element_info').animate({ opacity: 1.0 },250);\n\t\t\t\t\tvar outerkey,innerkey,innermost;\t\t\t\t\t\n\t\t\t\t\tfor (outerkey in data)\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tswitch(outerkey)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase 'disease':\n\t\t\t\t\t\t\t\t$(\"#disease_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#disease_list\").removeData();\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tenable(['disease_list']);\n\t\t\t\t\t\t\t\t\t$(\"#disease_list\").data(\"values\",data[outerkey]); //Cache!\t\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#disease_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\"\n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'location':\n\t\t\t\t\t\t\t\t$(\"#location_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#location_list\").removeData();\t\t\t\t\n\t\t\t\t\t\t\t\t\tenable(['location_list']);\n\t\t\t\t\t\t\t\t\t$(\"#location_list\").data(\"values\",data[outerkey]);\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#location_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\"\n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'dataset':\n\t\t\t\t\t\t\t\t$(\"#dataset_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#dataset_list\").removeData();\n\t\t\t\t\t\t\t\t\tenable(['dataset_list','reset_gene_data_button','color_network_button','disease_gene_check','location_gene_check']);\n\t\t\t\t\t\t\t\t\t$(\"#dataset_list\").data(\"values\",data[outerkey]);\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#dataset_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\"\n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'go':\n\t\t\t\t\t\t\t\t$(\"#go_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#go_list\").removeData();\n\t\t\t\t\t\t\t\t\tenable(['go_list','show_selected_go','show_all_go','clear_selected_go','clear_all_go','clear_all_go_cat']);\n\t\t\t\t\t\t\t\t\t$(\"#go_list\").data(\"values\",data[outerkey]);\n\t\t\t\t\t\t\t\t\t//Initialize with component\n\t\t\t\t\t\t\t\t\tinnerkey = 'Component';\n\t\t\t\t\t\t\t\t\tfor (innermost in data[outerkey][innerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#go_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey][innermost] + \"\\\" value=\" + innermost + \">\" \n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey][innermost] + \"</option>\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$(\"#go_component\").css(\"background-color\",\"#FFE5E0\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'kegg':\n\t\t\t\t\t\t\t\t$(\"#kegg_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#kegg_list\").removeData();\n\t\t\t\t\t\t\t\t\tenable(['kegg_list','show_selected_kegg','show_all_kegg','clear_selected_kegg','clear_all_kegg']);\n\t\t\t\t\t\t\t\t\t$(\"#kegg_list\").data(\"values\",data[outerkey]);\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\n $(\"#kegg_list\").append(\"<optgroup label=\\\"\" + innerkey + \"\\\">\");\n\t\t\t\t\t\t\t\t\t\tfor (innermost in data[outerkey][innerkey]) // Grouping!\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$(\"#kegg_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey][innermost] + \"\\\" value=\" + innermost + \">\" \n\t\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey][innermost] + \"</option>\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'mirna':\n\t\t\t\t\t\t\t\t$(\"#mirna_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#mirna_list\").removeData();\n\t\t\t\t\t\t\t\t\tenable(['mirna_list','show_selected_mirna','show_all_mirna','clear_selected_mirna','clear_all_mirna']);\n\t\t\t\t\t\t\t\t\t$(\"#mirna_list\").data(\"values\",data[outerkey]);\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#mirna_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\" \n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'disease_mirna':\n\t\t\t\t\t\t\t\t$(\"#disease_mirna_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#disease_mirna_list\").removeData();\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tenable(['disease_mirna_list']);\n\t\t\t\t\t\t\t\t\t$(\"#disease_mirna_list\").data(\"values\",data[outerkey]); //Cache!\t\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#disease_mirna_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\"\n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'location_mirna':\n\t\t\t\t\t\t\t\t$(\"#location_mirna_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#location_mirna_list\").removeData();\t\t\t\t\n\t\t\t\t\t\t\t\t\tenable(['location_mirna_list']);\n\t\t\t\t\t\t\t\t\t$(\"#location_mirna_list\").data(\"values\",data[outerkey]);\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#location_mirna_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\"\n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'dataset_mirna':\n\t\t\t\t\t\t\t\t$(\"#dataset_mirna_list\").empty();\n\t\t\t\t\t\t\t\tif (data[outerkey] !== null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(\"#dataset_mirna_list\").removeData();\n\t\t\t\t\t\t\t\t\tenable(['dataset_mirna_list','reset_mirna_data_button','color_mirna_button',\n\t\t\t\t\t\t\t\t\t\t\t'mirna_disease_radio','mirna_location_radio','mirna_both_radio',\n\t\t\t\t\t\t\t\t\t\t\t'allow_click_color_mirna_check','multicolor_mirna_check',\n\t\t\t\t\t\t\t\t\t\t\t'multidisease_mirna_check','multilocation_mirna_check']);\n\t\t\t\t\t\t\t\t\t$(\"#dataset_mirna_list\").data(\"values\",data[outerkey]);\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor (innerkey in data[outerkey])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$(\"#dataset_mirna_list\").append(\"<option title=\\\"\" + data[outerkey][innerkey] + \"\\\" value=\" + innerkey + \">\"\n\t\t\t\t\t\t\t\t\t\t\t+ data[outerkey][innerkey] + \"</option>\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: function(data,error)\n\t\t\t{\n\t\t\t\t$('#color_legend').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t$('#shape_legend').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t$('#info_section').css({ opacity: 0.0, visibility: \"visible\" }).animate({ opacity: 1.0 },500);\n\t\t\t\t$('#element_info').animate({ opacity: 1.0 },250);\n\t\t\t\tdisplayError('Ooops! ' + error + \" \" + data.responseText);\t\t\t\t\t\t\n\t\t\t},\n\t\t\tdataType: \"json\"\n\t\t});\n\n\t\tif (!recall) // If not called again because of the addition of neighbors\n\t\t{\n\t\t\tfetchNetwork(); // Initiate the network\n\t\t}\n\t}\n}", "function searchText() {\r\n var search_term = $(\"#txtSearchText\").val();\r\n if( search_term != '' && search_term != null )\r\n getDocViewer('documentViewer').searchText( search_term );\r\n}", "function searchBar() {\n if (cityVal === '') {\n errorMes.text('Field cannot be empty');\n\n displayError();\n }\n\n // I have this set as and AND statement instead of putting both into one regex because if it's in one regex then it would falsely trigger\n else if (cityVal.match(/[a-z]/i) && cityVal.match(/[0-9]/)) {\n errorMes.text('Please only search for a city or zip');\n\n displayError();\n } \n \n // Check and see if the text is using letters, so this way the code knows to look for a city name.\n else if (cityVal.match(/[a-z]/i)) {\n queryURL = `https://api.openweathermap.org/data/2.5/weather?q=${cityVal}&units=${unit}&APPID=f6526fa7bca044387db97f2d4ab0e83b`;\n\n $('.prevDiv').slideUp('fast');\n\n searchCity();\n }\n\n // Check and see if the text is using numbers, if it is then the code will search for a zip code instead.\n else if (cityVal.match(/[0-9]/)) {\n queryURL = `https://api.openweathermap.org/data/2.5/weather?zip=${cityVal}&units=${unit}&APPID=f6526fa7bca044387db97f2d4ab0e83b`;\n\n $('.prevDiv').slideUp('fast');\n\n searchCity();\n }\n\n // If cityVal's value is just special characters for example\n else {\n errorMes.text('Text cannot be read');\n\n displayError();\n }\n}", "search() {\n this.send('searchWithParams', this.buildSearchQuery());\n }", "function search() {\n var term = document.getElementById(\"searchterm\").value;\n var type = document.getElementById(\"searchtype\").value;\n\n window.location = \"../search/?term=\" + term + \"&type=\" + type;\n}", "function search(searchType, searchText)\n{\t\n\tswitch (searchType){\n\t\tcase \"City\":\n\t\t\tsearchCity(searchText);\n\t\t\tbreak;\n\t\tcase \"Region\":\n\t\t\tsearchRegion(searchText);\n\t\t\tbreak;\n\t\tcase \"Team\":\n\t\t\tsearchTeam(searchText);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\n\t}\n}", "static async search(name) {\n if (name.trim() === \"\") {\n throw new Error(\"Please enter a name.\");\n }\n\n let searchTerms = name.trim().split(' ');\n if (searchTerms.length === 2) {\n\n let searchFirst = `%${searchTerms[0]}%`;\n let searchLast = `%${searchTerms[1]}%`;\n\n const results = await db.query(\n `SELECT id, \n first_name AS \"firstName\", \n last_name AS \"lastName\", \n phone, \n notes\n FROM customers\n WHERE (first_name ILIKE $1 AND last_name ILIKE $2)\n OR (first_name ILIKE $2 AND last_name ILIKE $1)\n ORDER BY last_name, first_name`,\n [searchFirst, searchLast]\n );\n if (results.rows.length === 0) {\n throw new Error(\"Customer not found.\")\n }\n return results.rows.map(c => new Customer(c));\n }\n\n else if (searchTerms.length === 1) {\n let searchTerm = `%${searchTerms[0]}%`;\n\n const results = await db.query(\n `SELECT id, \n first_name AS \"firstName\", \n last_name AS \"lastName\", \n phone, \n notes\n FROM customers\n WHERE first_name ILIKE $1 OR last_name ILIKE $1\n ORDER BY last_name, first_name`,\n [searchTerm]\n );\n if (results.rows.length === 0) {\n throw new Error(\"Customer not found.\")\n }\n return results.rows.map(c => new Customer(c));\n }\n\n else {\n throw new Error('Please enter one or two search terms.');\n }\n }", "function searchEngine(e){\n\n let input = document.getElementById('search-input');\n let html = '';\n let matchingResults = [];\n let heading = document.querySelector('.search-heading');\n\n// Find Matching Results\n if(input.value === ''){\n\n searchResults.forEach(function(obj){\n heading.textContent = 'Most Visited';\n\n if(obj.frequent === true){\n matchingResults.push(obj);\n }\n })\n } else {\n\n heading.textContent = 'Search Results';\n searchResults.forEach(function(obj){\n if(obj.title.toUpperCase().includes(input.value.toUpperCase())){\n matchingResults.push(obj);\n }\n })\n }\n\n\n\n if(matchingResults.length > 0){\n\n matchingResults.forEach(function(el){\n html += `<li><a class=\"grey-text\" href=\"${el.link}\">${boldString(el.title, input.value)}</a></li>`\n })\n document.querySelector('.popup-list').innerHTML = html;\n } else{\n html = `<li>There are no suggestions for your query.</li>`\n document.querySelector('.popup-list').innerHTML = html;\n }\n\n}", "function SearchFunctionality(input, list) {\n const names = document.querySelectorAll(\"h3\");\n const emails = document.querySelectorAll(\"span.email\");\n let searchNamesArray = [];\n for (i = 0; i < list.length; i++) {\n // Check if search bar input contains letters in names or emails arrays ...\n if (names[i].innerHTML.indexOf(input.value) > -1 || emails[i].innerHTML.indexOf(input.value) > -1) {\n searchNamesArray.push(list[i]);\n }\n // ... If not, set the list item to not display\n else {\n list[i].style.display = \"none\";\n }\n }\n ShowPage(searchNamesArray, 1);\n AppendPageLinks(searchNamesArray);\n\n // If there are no results that match the input, show the \"No results found\" message\n if (searchNamesArray.length == 0) {\n noResultsDiv.style.display = \"block\";\n }\n else {\n noResultsDiv.style.display = \"none\";\n }\n}", "function search(e) {\n const input = e.currentTarget.value.toLocaleLowerCase();\n const search_div = document.querySelector('#activity #filter-search');\n const cards_div = document.querySelector('#activity #filter-cards');\n const filter_container = document.querySelector('#activity .filter-container');\n\n if (input.length === 0) {\n clearSearch(e);\n } else {\n if (search_div.dataset.visible !== 'visible') {\n search_div.dataset.visible = 'visible';\n cards_div.dataset.visible = 'hidden';\n filter_container.dataset.visible = 'hidden';\n }\n for (let key of search_div.querySelectorAll('.activity-row .agent')) {\n if (key.textContent.toLocaleLowerCase().includes(input)) {\n key.closest('.activity-row').dataset.active = 'true';\n } else key.closest('.activity-row').dataset.active = 'false';\n }\n }\n}", "function search(current){\n\n}", "function clickSearchBox(object){\n let searchText = document.querySelector(\".form-inline input[type='text']\").value;\n document.location = page.RESULT + '?searchWords='+searchText.toLowerCase();\n}", "function searchParams() {\n let searchLang = lang.value;\n let devLoc = devLocation.value;\n let minRepo = minimumRepos.value;\n\n // test\n // console.log(searchLang);\n // console.log(devLoc);\n // console.log(minRepo);\n //check\n\n // validate client request data here with Joi \n // make API request\n\n // \n apiRequest.getProfiles(searchLang, devLoc, minRepo)\n .then(data => {\n\n uiResults.renderResults(data);\n\n });\n\n}", "function searchForText() {\n // get the keywords to search\n var query = $('form#search input#mapsearch').val();\n\n // extract the fields to search, from the selected 'search category' options\n let category = $('select#search-category').val();\n\n // filter the object for the term in the included fields\n DATA.filtered = searchObject(DATA.tracker_data, query, CONFIG.search_categories[category]);\n\n // suggestions: if the search category is \"company\", include a list of suggestions below \n var suggestions = $('div#suggestions').empty();\n if (category == 'parent') {\n suggestions.show();\n var companies = searchArray(DATA.companies, query).sort();\n companies.forEach(function(company) {\n var entry = $('<div>', {'class': 'suggestion', text: company}).appendTo(suggestions);\n entry.mark(query);\n });\n }\n\n // add the results to map, table, legend\n drawMap(DATA.filtered); // update the map (and legend)\n updateResultsPanel(DATA.filtered, query) // update the results-panel\n drawTable(DATA.filtered, query); // populate the table\n $('form#nav-table-search input').val(query); // sync the table search input with the query\n CONFIG.selected_country.layer.clearLayers(); // clear any selected country\n CONFIG.selected_country.name = ''; // ... and reset the name\n $('div#country-results').show(); // show the results panel, in case hidden\n $('a.clear-search').show(); // show the clear search links\n\n return false;\n}", "onTextInput(event) {\r\n this.searchValue = event.target.value;\r\n if (this.searchValue.trim().length >= 1) {\r\n this.showSearchBoxList = true;\r\n const apiEndpoint = `${process.env.GOOGLE_PLACE_API_URL}${this.apiKey}&types=(${this.searchType})&language=${dxp.i18n.languages[0]}&input=${this.searchValue}`;\r\n this.getData(apiEndpoint).then(async (data) => {\r\n if (data) {\r\n this.filterItemsJson = data;\r\n if (this.filterItemsJson['predictions']) {\r\n this.filterItemsJson = this.filterItemsJson['predictions'];\r\n }\r\n if (this.filterItemsJson.length) {\r\n this.responseFlag = true;\r\n }\r\n }\r\n });\r\n }\r\n if (this.showSearchBoxList === false) {\r\n this.showSearchBoxList = !this.showSearchBoxList;\r\n }\r\n }", "function makeSearchQuery() {\n var active_tab = $('.add_to_search-form .tab-buttons li.active a').attr('href');\n\n if (active_tab === '#simple-search') {\n var current_query = $.trim(searchQueryField.val())\n var new_part = getSimpleQuery()\n setSearchFieldValue(mergeQuery(current_query, new_part))\n cleanSimpleQueryForm()\n } else {\n addAdvancedQueryToSearch()\n $('.add_to_search-form .appender').trigger('click')\n }\n }", "function search(page) {\n\n\tif ('undefined'==typeof(page)) page = 1;\n\tvar $search_form = $('#search_form');\n\tvar $search = $search_form.find('[name=\"search\"]:first');\n\t\n\t$search_form.children().removeClass('has-warning');\n\t$search_form.find('.glyphicon').removeClass('bg-danger');\n\tvar sq = $search.val();\n\tif (!sq.length) {\n\t\t$search_form.children().addClass('has-warning');\n\t\t$search_form.find('.glyphicon').addClass('bg-danger');\n\t\treturn;\n\t}\n\n\tvar obj = $.fn.parse_search(sq);\n\tif (!obj.terms.length) {\n\t\talert('Please enter one or more search terms');\n\t\treturn;\n\t}\n\n\tdo_search(obj, $('#findable_form').children('.clicked'), page);\n\t\n}", "onSearch(e) {\n let term = e.target.value;\n // Clear the current projects/samples selection\n this.props.resetSelection();\n this.props.search(term);\n }", "_handleInputSearch (event) {\n this.filterStringEdit(event);\n this.setState({\n query: event.target.value,\n })\n }", "function readSearchData() {\n var searchTerm = document.getElementById(\"keyword\").value;\n var state = document.getElementById(\"state\").value;\n var city = document.getElementById(\"city\").value;\n orgSearch(searchTerm, state, city);\n}", "function SearchUserObject() {\n concatResult();\n window.searchQuery = searchInput.value;\n CreateURI(centerLat, centerLng);\n}", "function check_paper_search_form() {\n \n}" ]
[ "0.7971002", "0.7590758", "0.75191045", "0.7473071", "0.7234476", "0.7157352", "0.705679", "0.7045577", "0.6978877", "0.6913621", "0.68970305", "0.6886799", "0.68666226", "0.68655246", "0.68519086", "0.6848697", "0.68356663", "0.6817789", "0.6813587", "0.67663354", "0.67614025", "0.67560893", "0.674702", "0.6707856", "0.67018336", "0.66723794", "0.66589135", "0.6639239", "0.66350967", "0.6634656", "0.6626865", "0.66071135", "0.658748", "0.65775645", "0.6575448", "0.65639985", "0.6550757", "0.65499705", "0.65382016", "0.65352947", "0.65176874", "0.650565", "0.65039784", "0.64939773", "0.64910084", "0.64865285", "0.64791274", "0.6475105", "0.6473569", "0.6462056", "0.6459639", "0.64572155", "0.6454167", "0.64477366", "0.64477366", "0.64469445", "0.64386266", "0.6438225", "0.6436269", "0.64346474", "0.6424427", "0.6422734", "0.64221436", "0.64221156", "0.6419474", "0.6419474", "0.64172864", "0.64059377", "0.64016545", "0.63963884", "0.6391961", "0.6387038", "0.6382286", "0.6381741", "0.6381701", "0.63781565", "0.6375728", "0.63743246", "0.637094", "0.63706833", "0.6368712", "0.6368031", "0.6361206", "0.63601303", "0.63568956", "0.6352908", "0.6350081", "0.6348842", "0.6347981", "0.6346746", "0.6342219", "0.63372195", "0.6336436", "0.63353497", "0.6335316", "0.6335315", "0.63258", "0.63244647", "0.6323556", "0.6321534", "0.63198066" ]
0.0
-1
Checks actuality of project migrations
check() { var dbMigrations = this.dbMigrations_, fsMigrations = this.fsMigrations_; if (lodash.difference(fsMigrations, dbMigrations).length) { this.throwError_(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _migrationsCheck(cb) {\n\t\tvar query = connection.query('SELECT COUNT(*) FROM ??', ['_migrations'], function(err, rows, fields) {\n\t\t\tif(err) {\n\t\t\t\tcb(new Error('The _migrations table does not exist.'));\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\t\t});\n\n\t}", "function _migrationsCheck(cb) {\n\t\tvar query = connection.query('SELECT COUNT(*) FROM ??', ['_migrations'], function(err, rows, fields) {\n\t\t\tif(err) {\n\t\t\t\tcb(new Error('The _migrations table does not exist.'));\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\t\t});\n\n\t}", "function _migrationsCheck(cb) {\n\t\tvar query = connection.query('SELECT COUNT(*) FROM ??', ['_migrations'], function(err, rows, fields) {\n\t\t\tif(err) {\n\t\t\t\tcb(new Error('The _migrations table does not exist.'));\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\t\t});\n\n\t}", "function _migrationsCheck(cb) {\n\t\tvar query = connection.query('SELECT COUNT(*) FROM ??', ['_migrations'], function(err, rows, fields) {\n\t\t\tif(err) {\n\t\t\t\tcb(new Error('The _migrations table does not exist.'));\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\t\t});\n\n\t}", "function _migrationsCheck(cb) {\n\t\tvar query = connection.query('SELECT COUNT(*) FROM ??', ['_migrations'], function(err, rows, fields) {\n\t\t\tif(err) {\n\t\t\t\tcb(new Error('The _migrations table does not exist.'));\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\t\t});\n\n\t}", "function _migrationsCheck(cb) {\n\t\tvar query = connection.query('SELECT COUNT(*) FROM ??', ['_migrations'], function(err, rows, fields) {\n\t\t\tif(err) {\n\t\t\t\tcb();\n\t\t\t} else {\n\t\t\t\tcb(new Error('The _migrations table already exists.'));\n\t\t\t}\n\t\t});\n\n\t}", "function migrationsCheck(cb) {\n\t\tfs.stat(path.join(process.cwd(), 'migrations'), function(err, stats) {\n\t\t\tif(err || !stats.isDirectory()) {\n\t\t\t\tcb(new Error('Migrations directory does not exist.'));\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\t\t});\n\t}", "function migrationsCheck(cb) {\n\t\tfs.stat(path.join(process.cwd(), 'migrations'), function(err, stats) {\n\t\t\tif(err || !stats.isDirectory()) {\n\t\t\t\tcb(new Error('Migrations directory does not exist.'));\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\t\t});\n\t}", "function migrationsCheck(cb) {\n\t\tfs.stat(path.join(process.cwd(), 'migrations'), function(err, stats) {\n\t\t\tif(err || !stats.isDirectory()) {\n\t\t\t\tcb(new Error('Migrations directory does not exist.'));\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\t\t});\n\t}", "function migrationsCheck(cb) {\n\t\tfs.stat(path.join(process.cwd(), 'migrations'), function(err, stats) {\n\t\t\tif(err || !stats.isDirectory()) {\n\t\t\t\tcb(new Error('Migrations directory does not exist.'));\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\t\t});\n\t}", "function migrationsCheck(cb) {\n\t\tfs.stat(path.join(process.cwd(), 'migrations'), function(err, stats) {\n\t\t\tif(err || !stats.isDirectory()) {\n\t\t\t\tcb(new Error('Migrations directory does not exist.'));\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\t\t});\n\t}", "validate () {\n /*\n if (!_.includes([ 'none', 'drop', 'create' ], this.app.config.database.models.migrate)) {\n throw new Error('Migrate must be configured to either \"create\" or \"drop\"')\n }\n */\n }", "function performMigrations () {\n /* Each migration has a 'key,' and we must first check to see\n * if that key has already been saved for the current user.\n * If it exists, the user has already run the migration.\n */\n localforage.getItem('schema-11-7-2016_longname_and_stopname_cutoff_fix', function (err, schemaUpdateExists) {\n // If the key isn't found, that means we need to run the migration.\n if (schemaUpdateExists !== true) {\n // This migration simply empties the entire cache. Bye!\n localforage.clear();\n // Save the migration key. The next time this function is run,\n // we won't ever enter this if block.\n localforage.setItem('schema-11-7-2016_longname_and_stopname_cutoff_fix', true);\n }\n });\n }", "function migrationsCheck(cb) {\n\t\tfs.stat(path.join(process.cwd(), 'migrations'), function(err, stats) {\n\t\t\tif(err || !stats.isDirectory()) {\n\t\t\t\tcb();\n\t\t\t} else {\n\t\t\t\tcb(new Error('Migrations directory already exists.'));\n\t\t\t}\n\t\t});\n\t}", "async function runMigration() {\n const groups = await fs.readdir(PROJECTS_DIR);\n for(let i = 0; i < groups.length; i++) {\n const group = groups[i];\n const versionsPath = path.join(PROJECTS_DIR, group);\n const versions = await fs.readdir(versionsPath);\n for(let j = 0; j < versions.length; j++) {\n const version = versions[j];\n const stagesPath = path.join(versionsPath, version)\n const stages = await fs.readdir(stagesPath);\n for(let k = 0; k < stages.length; k++) {\n const stage = stages[k];\n const validationsPath = path.join(stagesPath, stage, 'validations.json');\n if(await fs.exists(validationsPath)) {\n const contents = (await fs.readFile(validationsPath)).toString();\n if(contents) {\n let validations = JSON.parse(contents);\n validations.forEach((validation) => {\n validation.interfaceType = validation.type;\n delete validation.type;\n (validation.inputs || []).forEach(input => {\n input.staticType = input.type;\n delete input.type;\n });\n (validation.outputs || []).forEach(output => {\n output.staticType = output.type;\n delete output.type;\n });\n });\n await fs.writeFile(validationsPath, prettifyJSON(validations));\n }\n }\n }\n }\n }\n}", "function ageCheck(cb) {\n\t\t//console.log('ageCheck');\n\t\tif(db_migs.length) {\n\t\t\tunapplied.sort();\n\t\t\tdb_migs.sort().reverse();\n\n\t\t\tif(unapplied[0] < db_migs[0]) {\n\t\t\t\tcb(new Error('One of the migrations is older than the last applied migration that is in the database. Migrations must be applied in order.'));\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\n\t\t} else {\n\t\t\tcb();\n\t\t}\n\t}", "function ageCheck(cb) {\n\t\t//console.log('ageCheck');\n\t\tif(db_migs.length) {\n\t\t\tunapplied.sort();\n\t\t\tdb_migs.sort().reverse();\n\n\t\t\tif(unapplied[0] < db_migs[0]) {\n\t\t\t\tcb(new Error('One of the migrations is older than the last applied migration that is in the database. Migrations must be applied in order.'));\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\n\t\t} else {\n\t\t\tcb();\n\t\t}\n\t}", "migrateFromV1toV2() {\n // MIGRATION_DATE is set a day after we actually deploy, so the overlap\n // covers all timezones. This means for 1 day songbase will load slowly\n // because it redownloads every session.\n const MIGRATION_DATE = new Date('August 22, 2023 03:45:00').getTime();\n this.log('Last updated at: ' + this.app.state.settings.updated_at);\n this.log('MIGRATION_DATE: ' + MIGRATION_DATE);\n if(this.app.state.settings.updated_at > 0 && this.app.state.settings.updated_at < MIGRATION_DATE){\n this.log(\"Resetting DB for v2 API migration.\")\n this.resetDbData();\n this.migrating = true;\n } else {\n this.log('No need to migrate this db');\n }\n }", "function validateMigrationList(all, completed) {\n var diff = _.difference(completed, all);\n if (!_.isEmpty(diff)) {\n throw new Error(\n 'The migration directory is corrupt, the following files are missing: ' + diff.join(', ')\n );\n }\n}", "async check() {\n return types.MIGRATE;\n }", "async check() {\n return types.MIGRATE;\n }", "function compareMigration(){\n\n var tab\n\n // the model/table already exists.\n if(previous){\n\n tab = getTabs(0, true),\n\n // compare to previous table checking for\n // any dropped columns.\n _.forEach(previous.attributes, function (v,k) {\n if (v._modelAttribute) {\n var curCol = current && current.attributes ? current.attributes[k] : undefined,\n removeAttrs;\n // if curCol is undefined it was removed.\n if(!curCol){\n removeAttrs = attributesToString(filterAttributes(v));\n if(removeAttrs) {\n build.up.removeColumn.push(\n 'migration.removeColumn(' + qwrap(modelName) + ', ' + qwrap(k) + ');'\n );\n build.down.addColumn.push(\n 'migration.addColumn(' + qwrap(modelName) + ', ' + qwrap(k) + ',\\n' +\n tab + '{\\n'+ removeAttrs + '\\n' + tab + '});'\n );\n }\n }\n }\n\n });\n\n // iterate current defined attrs\n // looking for adds & changes.\n _.forEach(current.attributes, function (v,k) {\n\n if(v._modelAttribute){\n // check if is new column or existing.\n var prevCol = previous.attributes ? previous.attributes[k] : undefined,\n prevAttrs, curAttrs;\n\n if(prevCol){\n\n curAttrs = attributesToString(filterAttributes(v), filterAttributes(prevCol));\n prevAttrs = attributesToString(filterAttributes(prevCol), filterAttributes(v));\n\n if(curAttrs) {\n build.up.changeColumn.push(\n 'migration.changeColumn(' + qwrap(modelName) + ', ' + qwrap(k) + ',\\n' +\n tab + '{\\n' + curAttrs + '\\n' + tab + '});'\n );\n }\n\n if(prevAttrs) {\n build.down.changeColumn.push(\n 'migration.changeColumn(' + qwrap(modelName) + ', ' + qwrap(k) + ',\\n' +\n tab + '{\\n' + prevAttrs + '\\n' + tab +'});'\n );\n }\n\n } else {\n\n curAttrs = attributesToString(filterAttributes(v));\n // column needs to be added.\n\n if(curAttrs) {\n build.up.addColumn.push(\n 'migration.addColumn(' + qwrap(modelName) + ', ' + qwrap(k) + ',\\n' +\n '{\\n' + curAttrs + '\\n' + tab + '});'\n );\n build.down.removeColumn.push(\n 'migration.removeColumn(' + qwrap(modelName) + ', ' + qwrap(k) + ');'\n );\n }\n\n }\n }\n\n ctr += 1;\n\n });\n\n }\n\n // this is a new model/table.\n else {\n\n // this is a new table so we need to parse options.\n var newAttrs = [],\n ctr = 0,\n attrTab = getTabs(1, true),\n newOpts;\n\n tab = getTabs(0, true);\n\n parseOptions(current.options);\n newOpts = build.options.join(',\\n')\n\n _.forEach(current.attributes, function (v,k) {\n\n //if (v._modelAttribute) {\n var attrs = attributesToString(filterAttributes(v), null, 2);\n if(attrs) newAttrs.push(attrTab + k + ': {\\n' + attrs + '\\n' + attrTab + '}');\n //}\n ctr +=1;\n });\n\n build.up.createTable.push(\n 'migration.createTable(' + qwrap(modelName) + ',\\n' +\n tab + '{\\n' + newAttrs.join(',\\n') + '\\n' + tab + '},\\n' +\n tab + '{\\n' + newOpts + '\\n' + tab + '});'\n );\n build.down.dropTable.push('migration.dropTable(' + qwrap(modelName) + ');');\n\n }\n\n build.up.toString = upToString;\n build.down.toString = downToString;\n }", "async doMigrations () {\n\t\tthis.idp = new NewRelicIDP();\n\t\tawait this.idp.initialize(this.config);\n\t\tthis.migrationHandler = new NewRelicIDPMigrationHandler({\n\t\t\tdata: this.data,\n\t\t\tlogger: console,\n\t\t\tdryRun: this.dryrun,\n\t\t\tverbose: this.verbose,\n\t\t\tthrottle: this.throttle,\n\t\t\tidp: this.idp\n\t\t});\n\n\t\tconst query = this.company ? \n\t\t\t{\n\t\t\t\t_id: this.data.companies.objectIdSafe(this.company)\n\t\t\t} : {\n\t\t\t\tlinkedNROrgId: { $exists: false },\n\t\t\t\tdeactivated: false\n\t\t\t};\n\t\tconst result = await this.data.companies.getByQuery(query, {\n\t\t\tstream: true,\n\t\t\toverrideHintRequired: true,\n\t\t\tsort: { _id: 1 }\n\t\t});\n\n\t\tlet company;\n\t\tlet totalUsersMigrated = 0;\n\t\tlet totalUsersExisting = 0;\n\t\tlet totalCompaniesMigrated = 0;\n\t\tlet totalCompaniesPartiallyMigrated = 0;\n\t\tlet totalErrors = 0;\n\t\tdo {\n\t\t\tcompany = await result.next();\n\t\t\tif (company) {\n\t\t\t\tconst info = await this.migrateCompany(company);\n\t\t\t\tif (info.error) {\n\t\t\t\t\tconsole.error(`****** COMPANY ${company.id} COULD NOT BE MIGRATED: ${info.error}`);\n\t\t\t\t\ttotalErrors++;\n\t\t\t\t} else if (info.numUserErrors) {\n\t\t\t\t\tconsole.error(`****** COMPANY ${company.id} HAD ${info.numUserErrors} THAT COULD NOT BE MIGRATED`);\n\t\t\t\t\ttotalCompaniesPartiallyMigrated++;\n\t\t\t\t} else {\n\t\t\t\t\ttotalUsersMigrated += info.numUsersMigrated;\n\t\t\t\t\ttotalUsersExisting += info.numUsersExisting;\n\t\t\t\t\ttotalCompaniesMigrated++;\n\t\t\t\t}\n\t\t\t}\n\t\t} while (company);\n\t\tresult.done();\n\t\tconst which = Commander.dryrun ? 'would have been' : 'were'\n\t\tconsole.log(`${totalCompaniesMigrated} companies and ${totalUsersMigrated} users ${which} migrated, ${totalUsersExisting} users already existed`);\n\t\tif (totalCompaniesPartiallyMigrated) {\n\t\t\tconsole.log(`${totalCompaniesPartiallyMigrated} ${which} only partially migrated`);\n\t\t}\n\t}", "migrate() {\n throw new Error('Migration not implemented');\n }", "function onMigrationComplete(context, targetVersion, hasFailures) {\n context.logger.info('');\n context.logger.info(` ✓ Updated Angular Material to ${targetVersion}`);\n context.logger.info('');\n if (hasFailures) {\n context.logger.warn(' ⚠ Some issues were detected but could not be fixed automatically. Please check the ' +\n 'output above and fix these issues manually.');\n }\n }", "function downCheck(cb) {\n\t\t//console.log('downCheck');\n\t\tif(file_migs.length) {\n\t\t\tdb_migs.sort().reverse();\n\n\t\t\tif(file_migs.indexOf(db_migs[0]) != -1) {\n\t\t\t\tunapplied.push(db_migs[0]);\n\t\t\t\tcb();\n\t\t\t} else {\n\t\t\t\tcb(new Error('The last applied migration does not have an associated file.'));\n\t\t\t}\n\n\t\t} else {\n\t\t\tcb(new Error('There are no migration files.'));\n\t\t}\n\t}", "migrate(loadedProject) {\n throw new Error('Invalid Operation calling abstract BaseProject.migrate');\n }", "_maybeMigrate() {\n var self = this;\n\n if (self._retryMigrate && self._readyToMigrate()) {\n self._retryMigrate();\n\n self._retryMigrate = null;\n }\n }", "async up() {\n\n this.check()\n const migrations = this.migrations;\n\n let idx = 0;\n let curStep = await this.getCurentIndex();\n this.logger.info(`latest migration run is @${curStep}`)\n\n for (let el of migrations) {\n let loopStep = ++idx;\n\n this.logger.info(\"\")\n this.logger.info(loopStep, el.fileName)\n if (loopStep > curStep) {\n\n // running migration\n await el.up()\n\n // up succeeded, we now store the result\n //this.logger.info(`saving curent migration index @${loopStep}`)\n\n await this.saveCurentIndex(loopStep, el.fileName)\n this.logger.info(`updating migration index to @${loopStep}`)\n }\n else {\n this.logger.info(`skiping migration @${loopStep} (already done <= ${curStep})`)\n }\n }\n }", "function checkConsistency() {\n var i, id, p, msg, plans, catalog;\n\n catalog = config.catalog;\n plans = config.plans;\n\n for (i = 0; i < catalog.services.length; i += 1) {\n for (p = 0; p < catalog.services[i].plans.length; p += 1) {\n id = catalog.services[i].plans[p].id;\n if (!plans.hasOwnProperty(id)) {\n msg = \"ERROR: plan '\" + catalog.services[i].plans[p].name + \"' of service '\" + catalog.services[i].name + \"' is missing a specification.\";\n throw new Error(msg);\n }\n }\n }\n}", "function runAll() {\n glob.sync( './easy/migrations/*.js' ).forEach( function( file ) {\n if (!file.endsWith('migrations.js')) {\n var migration = require(path.resolve(file));\n migration.run()\n }\n });\n}", "async check() {\n this.logger.log('Checking if the database is healthy...');\n let checkRequired = true;\n await this.dbutil.transaction(async (task) => {\n while (checkRequired) {\n checkRequired = await this.initSubmodules(task);\n }\n });\n this.logger.log('database is healthy');\n }", "static async listPending() {\n // Get all the migration files.\n let migrationFiles = fs.readdirSync(\n path.join(__dirname, '..', '..', 'migrations')\n );\n\n // Ensure that all migrations follow this format.\n const migrationSchema = Joi.object({\n up: Joi.func().required(),\n down: Joi.func(),\n });\n\n // Extract the version from the filename with this regex.\n const versionRe = /(\\d+)_([\\S_]+)\\.js/;\n\n // Get the latest version.\n let latestVersion = await MigrationService.latestVersion();\n\n // Parse the migrations from the file listing.\n let migrations = migrationFiles\n .filter(filename => versionRe.test(filename))\n .map(filename => {\n // Parse the version from the filename.\n let matches = filename.match(versionRe);\n if (matches.length !== 3) {\n return null;\n }\n let version = parseInt(matches[1]);\n\n // Don't rerun migrations from versions already ran.\n if (version <= latestVersion) {\n return null;\n }\n\n // Read the migration from the filesystem.\n let migration = require(`../../migrations/${filename}`);\n Joi.assert(\n migration,\n migrationSchema,\n `Migration ${filename} does did not pass validation`\n );\n\n return {\n filename,\n version,\n migration,\n };\n })\n .filter(migration => migration !== null)\n .sort((a, b) => {\n if (a.version < b.version) {\n return -1;\n }\n\n if (a.version > b.version) {\n return 1;\n }\n\n return 0;\n });\n\n return migrations;\n }", "function onMigrationComplete(targetVersion, hasFailures) {\n console.log();\n console.log(chalk_1.default.green(` ✓ Updated Angular Material to ${targetVersion}`));\n console.log();\n if (hasFailures) {\n console.log(chalk_1.default.yellow(' ⚠ Some issues were detected but could not be fixed automatically. Please check the ' +\n 'output above and fix these issues manually.'));\n }\n}", "function migration() {\n const version = new Date()\n .toISOString()\n .substr(0, 16)\n .replace(/\\D/g, '');\n\n const template = 'module.exports.up = async (db) => {\\n \\n};\\n\\nmodule.exports.down = async (db) => {\\n \\n};\\n\\nmodule.exports.configuration = { transaction: true };\\n';\n\n fs.writeFileSync(\n `migrations/${version}_${process.argv[3] || 'new'}.js`,\n template,\n 'utf8',\n );\n}", "function _versionCheck() {\n // get user's version\n var _version = store.get(\"version\");\n // set version again\n store.set(\"version\", planner.version);\n // reset storage due to update from 0.4.1 -> 0.5.0\n if (_version < \"0.4.9\") {\n store.clear();\n }\n // publish the app wide message related to user\n $.publish(\"app:status:\" + ((!_version) ? \"new\" :\n (_version < planner.version) ? \"updated\" : \"uptodate\"));\n }", "async function haveChangesOccurred() {\n const parentPackage = core.getInput('parent-package');\n const versionResult = await exec(`npm view ${parentPackage}@latest version`);\n const version = versionResult.stdout.trim();\n const diffResult = await exec(`git diff --stat v${version}..master frontend-shared/`)\n return diffResult.stdout.length > 0;\n}", "function isDeployment() {\n return !isDev()\n}", "function isMigrateFile( filename ){\n var args = filename.split(\".\");\n return args.length == 2 && args[1] == \"sql\" && !isNaN(args[0]);\n }", "checkDatabase(){\n var query = `CREATE DATABASE IF NOT EXISTS ` + config.SQL_DATABASE\n this.db.run(query)\n }", "async up(targets) { \n try {\n\n // Add version rows for every comment.\n const insertVersionSQL= `\n INSERT INTO review_comment_versions (comment_id, content, created_date, updated_date)\n SELECT id, content, now(), now() FROM review_comments\n `\n await this.database.query(insertVersionSQL, [])\n\n // Update the review_comment.version to verison 1.\n const updateCommentVersionSQL = `\n UPDATE review_comments set version = review_comment_versions.version\n FROM (SELECT comment_id, version FROM review_comment_versions) as review_comment_versions\n WHERE review_comments.id = review_comment_versions.comment_id\n `\n await this.database.query(updateCommentVersionSQL, [])\n\n } catch (error) {\n try {\n await this.database.query('DELETE FROM review_comment_versions', [])\n } catch (rollbackError) {\n throw new MigrationError('no-rollback', rollbackError.message)\n }\n throw new MigrationError('rolled-back', error.message)\n }\n\n }", "function checkDatabase() {\n const transaction = db.transaction([\"BudgetStore\"], \"readwrite\");\n const budgetStore = transaction.objectStore(\"BudgetStore\");\n const getAll = budgetStore.getAll();\n\n getAll.onsuccess = function () {\n if (getAll.result.length > 0) {\n // found in api.js\n fetch(\"/api/transaction/bulk\", {\n method: \"POST\",\n body: JSON.stringify(getAll.result),\n headers: {\n Accept: \"application/json, text/plain, */*\",\n \"Content-Type\": \"application/json\",\n },\n })\n .then((res) => res.json())\n // deleteAll\n .then(() => {\n const transaction = db.transaction([\"BudgetStore\"], \"readwrite\");\n const budgetStore = transaction.objectStore(\"BudgetStore\");\n budgetStore.clear();\n });\n }\n };\n}", "function migrationsSourceCheck(cb) {\n\t\tfs.stat(migrations_source_dir, function(err, stats) {\n\t\t\tif(err || !stats.isDirectory()) {\n\t\t\t\tcb(new Error('There does not appear to be a migrations source directory.'));\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\t\t});\n\t}", "migrate(){\n const sequencer = Sequence();\n let mgr;\n\n sequencer\n .chain(seq => {\n this.migrationModel.findOne({ }, (err, migration) => {\n if(!migration){\n let newMigration = new this.migrationModel;\n newMigration.version = 0;\n newMigration.save((err, migration) => {\n if(err)\n return seq.reject();\n \n mgr = migration;\n return seq.resolve();\n })\n }else{\n mgr = migration;\n return seq.resolve();\n } \n })\n });\n \n sequencer\n .chain(seq => {\n if(mgr.locked){\n console.warn(`MongooseMigration: Migrations are locked at version: ${mgr.version}`);\n return seq.reject();\n }\n\n return seq.resolve();\n });\n\n sequencer\n .chain(seq => {\n let pendingMigrations = this.migrations.filter(mig => {\n return mig.version > mgr.version;\n }).sort((a, b) => {\n return a.version - b.version;\n });\n\n const innerSequencer = Sequence();\n\n pendingMigrations.forEach(pendMig => {\n innerSequencer.chain(seq => {\n let error = null;\n \n try { \n pendMig.up();\n } \n catch(exception){ \n error = exception;\n } \n finally {\n if(error){\n this.migrationModel.findOne({ _id:mgr._id }, (err, migration) => {\n migration.locked = true;\n\n migration.save((err, updatedMigration) => {\n mgr = updatedMigration;\n console.warn(`MongooseMigration: Unable to migrate. Migrations are locked at version: ${mgr.version}. Error: ${error}`);\n seq.reject(err);\n });\n })\n }else{\n this.migrationModel.findOne({ _id: mgr._id }, (err, migration) => {\n migration.version = pendMig.version;\n\n migration.save((err, updatedMigration) => {\n mgr = updatedMigration;\n console.warn(`MongooseMigration: Migrating compleated to version: ${mgr.version}`);\n seq.resolve();\n });\n })\n }\n } \n });\n });\n\n innerSequencer.execute();\n });\n\n sequencer.execute();\n }", "function checkDataBase(){\n\t// start to check database\n\tfor(var i=0;i<database.length;++i){\n\t\t//console.log(database[i]+\"\\n\");\n\t}\n\t// finish checking database\n}", "updateDatabaseTables(database) {\n let dbVersion = 0;\n console.log('Beginning database updates...');\n\n // First: create tables if they do not already exist\n return database\n .transaction(this.createTables)\n .then(() => this.createConfigs(database))\n .then(() => this.getDatabaseVersion(database))\n .then((version) => {\n dbVersion = version;\n console.log(`Current database version is: ${dbVersion}`);\n\n // Perform DB updates based on this version\n // This is included as an example of how you make database schema changes once the app has been shipped\n if (dbVersion < 1) {\n // Uncomment the next line, and the referenced function below, to enable this\n // return database.transaction(this.preVersion1Inserts);\n }\n })\n .then(() => {\n if (dbVersion < 2) {\n // Uncomment the next line, and the referenced function below, to enable this\n // return database.transaction(this.preVersion2Inserts);\n }\n });\n }", "_checkProjectConfig() {\n return this._projectConfig.checkConfig();\n }", "migrate() {\n\t\tconst settings = this.settingsCollection().document('__settings__');\n\t\tif (settings.version === 'v1.0.0') {\n\t\t\tthis.migrate_v1_0_0_to_v1_1_0();\n\t\t}\n\t}", "async list() {\n\n this.check()\n const migrations = this.migrations;\n let idx = 0;\n\n let curStep = await this.getCurentIndex();\n this.logger.info(`latest migration run is @${curStep}`)\n\n for (let el of migrations) {\n let loopStep = ++idx;\n this.logger.info(loopStep > curStep?'[ ]':'[v]', loopStep, el.fileName, loopStep > curStep?'todo':'done')\n }\n }", "function validateMigrationStructure(migrator) {\n return function(item) {\n var migration = require(migrator.config.directory + '/' + item);\n if (!_.isFunction(migration.up) || !_.isFunction(migration.down)) {\n throw new Error('Invalid migration: ' + item + ' must have both an up and down function');\n }\n return [item, migration];\n };\n}", "onlyUpdating() {\n return Number.isInteger(this.props.projectVersion);\n }", "function filterMigrations(client, log) {\n return (migrations) => {\n // Arrange in ID order\n const orderedMigrations = migrations.sort((a, b) => a.id - b.id)\n\n // Assert their IDs are consecutive integers\n migrations.forEach((mig, i) => {\n if (mig.id !== i) {\n throw new Error(\"Found a non-consecutive migration ID\")\n }\n })\n\n return doesTableExist(client, \"migrations\")\n .then((exists) => {\n if (!exists) {\n // Migrations table hasn't been created,\n // so the database is new and we need to run all migrations\n log(\"Running all migrations\")\n return orderedMigrations\n }\n\n return client.queryAsync(\"SELECT * FROM migrations\")\n .then(filterUnappliedMigrations(orderedMigrations))\n })\n }\n}", "async down() {\n\n this.check()\n const migrations = this.migrations;\n\n let curStep = await this.getCurentIndex();\n let idx = curStep>0?curStep-1:0\n this.logger.info(`latest migration run is @${curStep}`)\n\n if (curStep > 0) {\n //this.logger.info(curStep, migrations)\n let curMigration = migrations[idx];\n let prevMigration = migrations[idx-1];\n if (curMigration) {\n await curMigration.down()\n\n // down migration is done, lets update index\n let nextStep = curStep-1\n await this.saveCurentIndex(nextStep, prevMigration?prevMigration.fileName:\"\")\n this.logger.info(`updating migration index to @${nextStep}`)\n }\n else {\n throw Error(\"Curent migrataion code is missing\")\n }\n }\n else {\n this.logger.info(`no down migration to run`)\n }\n }", "onClickMigrate() {\n if(!User.current.isAdmin) { return; }\n \n new MigrationEditor({ model: this.model });\n }", "function sanityCheck() {\n const errors = [];\n // Webworkers\n if (!window.Worker) errors.push(\"WebWorkers\");\n // IndexedDB\n if (!window.indexedDB) errors.push(\"IndexedDB\");\n // Notifications\n if (!window.Notification) errors.push(\"Notifications\");\n\n errors.length > 0 ? showErrors(errors) : setUp();\n}", "function checkProgress(progressUrl) {\n course.message('Canvas Migration Status:');\n // TODO replace setInterval with recursive calls to avoid multiple calls to stepCallback\n var checkLoop = setInterval(() => {\n canvas.get(progressUrl, (err, migrations) => {\n if (err) {\n course.fatalError(err);\n stepCallback(err, course);\n return;\n }\n var migration = migrations[0];\n\n course.message(`${chalk.blue('Import Progress:')} ${migration.workflow_state}`);\n if (migration.workflow_state === 'completed') {\n clearInterval(checkLoop);\n course.message('Zip successfully uploaded to Canvas');\n stepCallback(null, course);\n return;\n } else if (migration.workflow_state === 'failed' || migration.workflow_state === 'waiting_for_select') {\n clearInterval(checkLoop);\n var unknownErr = new Error('Unknown error occurred. Please check the status of the migration via Canvas UI');\n course.fatalError(unknownErr);\n stepCallback(unknownErr, course);\n return;\n }\n });\n }, 5000);\n }", "function yarnIntegrityCheck() {\n shell.cd(cwd);\n let out = shell.exec('yarn check --integrity').code;\n return out ? false : true;\n}", "async function changesToRelease () {\n const lastCommitWasRelease = /^Bump v[0-9]+.[0-9]+.[0-9]+(-beta.[0-9]+)?(-alpha.[0-9]+)?(-nightly.[0-9]+)?$/g;\n const lastCommit = await GitProcess.exec(['log', '-n', '1', '--pretty=format:\\'%s\\''], ELECTRON_DIR);\n return !lastCommitWasRelease.test(lastCommit.stdout);\n}", "async function down () { \n // Write migration here\n}", "function isSafeToCreateProjectIn(root, name) {\n\t// These files should be allowed to remain on a failed install,\n\t// but then silently removed during the next create.\n\tconst errorLogFilePatterns = [\n\t\t'npm-debug.log',\n\t\t'yarn-error.log',\n\t\t'yarn-debug.log',\n\t];\n\n const validFiles = [\n '.DS_Store',\n 'Thumbs.db',\n '.git',\n '.gitignore',\n '.idea',\n 'README.md',\n 'LICENSE',\n 'web.iml',\n '.hg',\n '.hgignore',\n '.hgcheck',\n '.npmignore',\n 'mkdocs.yml',\n 'docs',\n '.travis.yml',\n '.gitlab-ci.yml',\n '.gitattributes',\n ];\n console.log();\n\n const conflicts = fs\n .readdirSync(root)\n .filter(file => !validFiles.includes(file))\n // Don't treat log files from previous installation as conflicts\n .filter(\n file => !errorLogFilePatterns.some(pattern => file.indexOf(pattern) === 0)\n );\n\n if (conflicts.length > 0) {\n console.log(\n `The directory ${chalk.green(name)} contains files that could conflict:`\n );\n console.log();\n for (const file of conflicts) {\n console.log(` ${file}`);\n }\n console.log();\n console.log(\n 'Either try using a new directory name, or remove the files listed above.'\n );\n\n return false;\n }\n\n // Remove any remnant files from a previous installation\n const currentFiles = fs.readdirSync(path.join(root));\n currentFiles.forEach(file => {\n errorLogFilePatterns.forEach(errorLogFilePattern => {\n // This will catch `(npm-debug|yarn-error|yarn-debug).log*` files\n if (file.indexOf(errorLogFilePattern) === 0) {\n unlinkSync(path.join(root, file));\n }\n });\n });\n return true;\n}", "function checkTargets(tree, schema) {\n if (schema.forceRemove) {\n return;\n }\n const usedIn = [];\n devkit_1.getProjects(tree).forEach((project, projectName) => {\n const findTarget = new RegExp(`${schema.projectName}:`);\n if (projectName === schema.projectName) {\n return;\n }\n if (findTarget.test(JSON.stringify(project))) {\n usedIn.push(projectName);\n }\n });\n if (usedIn.length > 0) {\n let message = `${schema.projectName} is still targeted by the following projects:\\n\\n`;\n for (let project of usedIn) {\n message += `${project}\\n`;\n }\n throw new Error(message);\n }\n}", "checkCurrentDateTargets() {\n let currentDate = new Date()\n let currentMonth = currentDate.getMonth()\n\n let checkTargets = this.checkTargetEnabled()\n\n // Check firebase to see if editing targets is enabled\n // Perhaps allow ability to change which months users can change data from admin panel...\n if (checkTargets || currentMonth <= 3) {\n this.enableTargets()\n } else {\n console.log(\"Current month is nothing the timeframe to enter targets\")\n console.log(\"Data cannot be submitted without admin persmissions\")\n }\n }", "function isDatabaseSeeded({\n projectEuler /* add more sites here if necessary */,\n}) {\n let shouldSeedProjectEuler = false;\n\n if (projectEuler === true) {\n // If there is at least one Project Euler problem, then don't\n // seed the database.\n Puzzle.findOne({ source: \"projecteuler\" }, (err, puzzle) => {\n if (err) console.log(\"err\", err);\n\n if (puzzle) {\n console.log(`project euler database was already seeded`);\n } else {\n shouldSeedProjectEuler = true;\n }\n });\n }\n\n return {\n shouldSeedProjectEuler, // `true` if the seeder should be run\n };\n}", "static isCorrect(version) {\n return ANCHORED_VERSION_PATTERN.test(version);\n }", "migrate () {\n const SchemaMigrationService = this.app.services.SchemaMigrationService\n\n return Promise.all(\n _.map(this.stores, (store, storeName) => {\n if (store.migrate === 'drop') {\n return SchemaMigrationService.drop(store.knex, this.app.models)\n .then(result => SchemaMigrationService.create(store.knex, this.app.models))\n }\n else {\n return SchemaMigrationService[store.migrate](store.knex, this.app.models)\n }\n })\n )\n }", "function verifyStructure() {\n var component, key;\n parameters.structure.integrity = true;\n \n for (key in parameters.structure.components) {\n component = parameters.structure.components[key];\n if (component.integrity !== true) {\n parameters.structure.integrity = false;\n }\n }\n }", "anyUnresolvedMutations() {\n return this.submitted.length > 0 || this.pending.length > 0;\n }", "function filterUnappliedMigrations(orderedMigrations) {\n return ({rows: appliedMigrations}) => {\n return orderedMigrations.filter((mig) => {\n const migRecord = appliedMigrations[mig.id]\n if (!migRecord) {\n return true\n }\n if (migRecord.hash !== mig.hash) {\n // Someone has altered a migration which has already run - gasp!\n throw new Error(dedent`\n Hashes don't match for migration '${mig.name}'.\n This means that the script has changed since it was applied.`)\n }\n return false\n })\n }\n}", "function checkDatabase() {\n // getting the reference to the db\n const transaction = db.transaction([\"pending\"], \"readwrite\");\n const store = transaction.objectStore(\"pending\");\n const getAll = store.getAll();\n\n getAll.onsuccess = function () {\n // posts if you have something bulk\n if (getAll.result.length > 0) {\n fetch(\"/api/transaction/bulk\", {\n method: \"POST\",\n body: JSON.stringify(getAll.result),\n headers: {\n Accept: \"application/json, text/plain, */*\",\n \"Content-Type\": \"application/json\",\n },\n })\n .then((response) => {\n return response.json();\n })\n .then(() => {\n // delete records if successful\n const transaction = db.transaction([\"pending\"], \"readwrite\");\n const store = transaction.objectStore(\"pending\");\n store.clear();\n });\n }\n };\n}", "async function checkYMLs() {\n const knownYMLs = Object.assign({}, constants.COMPOSE_FILES);\n\n const updatableYMLs = Object.values(knownYMLs);\n\n const outdatedYMLs = [];\n\n for (const knownYMLFile of updatableYMLs) {\n try {\n const canonicalMd5 = md5Check.sync(constants.CANONICAL_YML_DIRECTORY.concat('/' + knownYMLFile));\n const ondeviceMd5 = md5Check.sync(constants.WORKING_DIRECTORY.concat('/' + knownYMLFile));\n\n if (canonicalMd5 !== ondeviceMd5) {\n outdatedYMLs.push(knownYMLFile);\n }\n } catch (error) {\n outdatedYMLs.push(knownYMLFile);\n }\n }\n\n if (outdatedYMLs.length !== 0) {\n await updateYMLs(outdatedYMLs);\n }\n}", "checkValidity() {\n return this._staticallyValidateConstraints().result === constraintValidationPositiveResult;\n }", "function runRepoChecks() {\n\n upgradeRepositoriesChecksFactory.getNodesRepoChecks()\n .then(\n // In case of success\n function (repoChecksResponse) {\n\n _.forEach(repoChecksResponse.data, function(value, key) {\n vm.repoChecks.checks[key].status = value;\n });\n\n var repoChecksResult = true;\n // Update prechecks status\n\n _.forEach(vm.repoChecks.checks, function (repoStatus) {\n \n if (false === repoStatus.status) {\n repoChecksResult = false;\n return false;\n }\n });\n\n // Update prechecks validity\n vm.repoChecks.valid = repoChecksResult;\n },\n // In case of failure\n function (errorRepoChecksResponse) {\n // Expose the error list to repoChecks object\n vm.repoChecks.errors = errorRepoChecksResponse.data.errors;\n }\n )\n .finally(function () {\n // Either on sucess or failure, the repoChecks has been completed.\n vm.repoChecks.completed = true;\n });\n }", "function isUpgraded() {\n\treturn config.configVersion === CONFIG_VERSION;\n}", "checkSolution()\n {\n return (this.solutionString == this.givenSolutionString);\n }", "_verifyNoUncommittedChanges() {\n return tslib.__awaiter(this, void 0, void 0, function* () {\n if (this._git.hasUncommittedChanges()) {\n error(red(' ✘ There are changes which are not committed and should be discarded.'));\n return false;\n }\n return true;\n });\n }", "checkRequiredFiles() {\n if (!checkRequiredFiles([\n paths.appServer,\n paths.appPublic,\n paths.appClient,\n paths.appClientPages,\n paths.appNodeModules,\n paths.appLocales,\n paths.appConfig,\n ])) {\n if (process.env.NODE_ENV === 'test') return false;\n process.exit(1);\n }\n return true;\n }", "function doMigration (target, execute) {\n\tif (execute) {\n\t\tpostgrator.migrate( target , (err) => {\n\t\t\tif (err) {\n\t\t\t\tendConnection( error( err ))\n\t\t\t}\n\t\t\telse {\n\t\t\t\tendConnection( success( 'Database migrated' ))\n\t\t\t}\n\t\t})\n\t}\n\telse {\n\t\tendConnection( error( 'Migration aborted' ))\n\t}\n}", "function checkTablesLoaded()\n{\n\tif(numLoadedTables==3)\n\t{\n\t\tupdateProgramOptions();\n\t}\n}", "function checkVersions(conf, callback) {\n\tif (conf.type === \"jira\") {\n\t\tcheckJiraVersion(conf, callback);\n\t} else {\n\t\t// The type of the repository is checked beforehand.\n\t\tconsole.assert(false);\n\t}\n}", "function sanityCheckNotUpdating() {\n expectEquals(null, timelineView().updateIntervalId_);\n sanityCheckWithTimeRange();\n }", "function checkDatabase() {\n console.log(\"Currently checking databse...\");\n\n // Open a transaction on budget db\n let transaction = db.transaction([\"budget\"], \"readwrite\");\n\n // Access the budget object\n const store = transaction.objectStore(\"budget\");\n\n // Get all records from the store and set to a variable\n const getAll = store.getAll();\n\n // If the request was successful\n getAll.onsuccess = function () {\n // If there are items in the store, we need to bulk add them when we are back online\n if (getAll.result.length > 0) {\n fetch(\"/api/transaction/bulk\", {\n method: \"POST\",\n body: JSON.stringify(getAll.result),\n headers: {\n Accept: \"application/json, text/plain, */*\",\n \"Content-Type\": \"application/json\",\n },\n })\n .then((response) => response.json())\n .then((res) => {\n // If the returned response is not empty\n if (res.length !== 0) {\n // Open another transaction to budget with the ability to read and write\n transaction = db.transaction([\"budget\"], \"readwrite\");\n\n // Assign the current store to the variable\n const currentStore = transaction.objectStore(\"budget\");\n\n // Clear existing entries because our bulk add was successful\n currentStore.clear();\n console.log(\"Clearing store...\");\n }\n });\n }\n };\n}", "async function validate (fileOld, fileNew) {\n const dataOld = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'data', fileOld), 'utf8'))\n const dataNew = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'data', fileNew), 'utf8'))\n\n let itemsDeleted = 0\n let itemsChanged = 0\n for (const itemOld of dataOld) {\n const newExists = dataNew.find((i) => i.itemId === itemOld.itemId)\n if (!newExists) itemsDeleted += 1\n else {\n try {\n assert.deepStrictEqual(newExists, itemOld)\n } catch (err) {\n itemsChanged += 1\n }\n }\n }\n const itemsAdded = dataNew.length - (dataOld.length - itemsDeleted)\n\n printValidation(itemsDeleted, 'items missing')\n printValidation(itemsAdded, 'items added')\n printValidation(itemsChanged, 'items changed')\n\n if (itemsDeleted > 0 || itemsAdded > 0 || itemsChanged > 0) {\n console.log(colors.yellow('Changes detected'))\n console.log('Either something went wrong with your build or you improved it somehow (e.g. better sanitization). In the latter case, please make a pull request to get the new data up!')\n } else {\n console.log(colors.green('Build successfully validated'))\n }\n}", "function main() {\n let acc = process.argv[4]\n if(!acc) return showHelp()\n if(process.argv[2] != '--to') return showHelp()\n if(process.argv[3] == 'v2') migrate2v2(acc)\n else if(process.argv[3] == 'v1') migrate2v1(acc)\n else showHelp()\n}", "async initialize() {\n\n try {\n const createTableSql = `\nCREATE TABLE review_comment_versions (\n comment_id bigint REFERENCES review_comments(id) ON DELETE CASCADE,\n version int NOT NULL DEFAULT 1,\n content text,\n created_date timestamptz,\n updated_date timestamptz,\n PRIMARY KEY(comment_id, version)\n)\n `\n const createTableResult = await this.database.query(createTableSql, [])\n\n const alterTableSql = `\n ALTER TABLE review_comments ADD COLUMN version int NOT NULL DEFAULT 0\n `\n const alterTableResult = await this.database.query(alterTableSql, [])\n\n // TECH DEBT - this isn't going to be rolled back. The only way to\n // remove a value from an enum is to drop the whole type which\n // seems unnecessarily costly. \n //\n // In this case, better to just ignore the value.\n const alterTypeEditInProgressSql = `\n ALTER TYPE review_comment_status ADD VALUE IF NOT EXISTS 'edit-in-progress'\n `\n const alterTypeEditInProgressResult = await this.database.query(alterTypeEditInProgressSql, [])\n \n // TECH DEBT - won't be removed, see comment above.\n const alterTypeRevertSql = `\n ALTER TYPE review_comment_status ADD VALUE IF NOT EXISTS 'reverted'\n `\n const alterTypeRevertResult = await this.database.query(alterTypeRevertSql, [])\n } catch (error) {\n try {\n const dropTableSql = `DROP TABLE IF EXISTS review_comment_versions`\n const dropTableResult = await this.database.query(dropTableSql, [])\n\n const dropColumnSql = `ALTER TABLE review_comments DROP COLUMN IF EXISTS version`\n const dropColumnResult = await this.database.query(dropColumnSql, [])\n } catch (rollbackError) {\n throw new MigrationError('no-rollback', rollbackError.message)\n }\n throw new MigrationError('rolled-back', error.message)\n }\n\n }", "static dbExists() {\n return fileExists(`${config.database.path}/db-${config.production ? 'production' : 'testing'}.db`);\n }", "function runMigrateScripts( migrateScripts ) {\n\n var migrateScriptsIterator = new ArrayIterator( migrateScripts );\n\n function iterateScripts() {\n if (migrateScriptsIterator.hasNext()) {\n var mScript = migrateScriptsIterator.next();\n migrator.executeQuery(mScript, [], function (err) {\n if (!!err) {\n console.log(\"unable to execute [\" + mScript + \"]\");\n throw err;\n } else {\n migrator.updateRevision(mScript, function (err) {\n if (!!err) {\n console.log(\"script execution was successfully, but was unable to update version to : \" + mScript);\n throw (err);\n } else {\n iterateScripts();\n }\n })\n }\n });\n }\n }\n iterateScripts();\n } /// end of runMigrateScripts", "[runUpgrades](e) {\n dbUpgrades.slice((e.oldVersion || 0) - e.newVersion).forEach(fn => fn(e));\n }", "function checkActsConsistency(){\n checkConsistency(Action.ACTS);\n //set expections\n verifyCondition = true;\n expectations = Expect.AFTER_ACTS;\n }", "static async checkConflicts(slot, prevHalfHour) {\n const tablesTaken = await this.findAll({\n where: { slot: slot }\n });\n const previousHalfHour = await this.findAll({\n where: { slot: prevHalfHour }\n });\n\n let tablesTakenTotal = tablesTaken.length + previousHalfHour.length;\n //no conflict return false, reservation can be made.\n if (tablesTakenTotal < 10) return false;\n //conflict return true\n else return true;\n }", "function migrationCreate(cb) {\n\t\tfs.writeFile(path.join(process.cwd(), 'migrations', filename), '', cb)\n\t}", "init(database: SQLite.SQLiteDatabase): Promise<void> {\n let dbVersion: number = 1;\n console.log('Beginning database updates...');\n\n // First: create tables if they do not already exist\n return database\n .transaction(this._createTables)\n .then(() => {\n // Get the current database version\n return this._getDatabaseVersion(database);\n })\n .then((version) => {\n dbVersion = version;\n console.log('Current database version is: ' + dbVersion);\n\n // Perform DB updates based on this version\n\n // This is included as an example of how you make database schema changes once the app has been shipped\n if (dbVersion < 1) {\n // Uncomment the next line, and the referenced function below, to enable this\n // return database.transaction(this._preVersion1Inserts);\n }\n // otherwise,\n return;\n })\n .then(() => {\n if (dbVersion < 2) {\n // Uncomment the next line, and the referenced function below, to enable this\n // return database.transaction(this._preVersion2Inserts);\n }\n // otherwise,\n return;\n });\n }", "function CheckVersion() {\n \n}", "check (cb) {\n if (this.checked) return cb()\n binWrapper.run(['version'], (err) => {\n // The binary is ok if no error poped up\n this.checked = !err\n return cb(err)\n })\n }", "static validate(newChangeFilePaths, changedPackages) {\n const changedSet = new Set();\n newChangeFilePaths.forEach((filePath) => {\n console.log(`Found change file: ${filePath}`);\n const changeRequest = node_core_library_1.JsonFile.load(filePath);\n if (changeRequest && changeRequest.changes) {\n changeRequest.changes.forEach(change => {\n changedSet.add(change.packageName);\n });\n }\n else {\n throw new Error(`Invalid change file: ${filePath}`);\n }\n });\n const requiredSet = new Set(changedPackages);\n changedSet.forEach((name) => {\n requiredSet.delete(name);\n });\n if (requiredSet.size > 0) {\n const missingProjects = [];\n requiredSet.forEach(name => {\n missingProjects.push(name);\n });\n throw new Error(`Change file does not contain ${missingProjects.join(',')}.`);\n }\n }", "function shouldReleaseAlgoSolution(project){\n // Make sure we have an algo\n if (project.algo){\n // Create a reference to algo deadline + 1 day to account for 11:59pm\n var algoDeadline = new Date(project.algo.date + '/' + CURRYEAR);\n algoDeadline.setDate(algoDeadline.getDate());\n\n // Return whether or not today's date is after the algo deadline\n var today = new Date();\n return today > algoDeadline;\n }\n return false;\n}", "function importDBRCheck (finalizedDBR) {\n let dbrMonth = finalizedDBR.Month.format('MMMM YYYY')\n return redshift.hasMonth(finalizedDBR.Month).then(function (hasMonth) {\n if (hasMonth) {\n log.info(`No new DBRs to import.`)\n if (args.force) {\n log.warn(`--force specified, importing DBR for ${dbrMonth} anyways`)\n return finalizedDBR\n }\n cliUtils.runCompleteHandler(startTime, 0)\n } else {\n return finalizedDBR\n }\n })\n}", "async function down() {\n // Write migration here\n}", "checkDeployment({ isDeployed, contractName, network_id }) {\n if (!isDeployed())\n throw new Error(\n `${contractName} has not been deployed to detected network (${network_id})`\n );\n }", "checkDeployment({ isDeployed, contractName, network_id }) {\n if (!isDeployed())\n throw new Error(\n `${contractName} has not been deployed to detected network (${network_id})`\n );\n }", "function ensureInitializedProject(config) {\n if (existsSync(getInfoFilePath(config))) {\n // Case 1\n return;\n }\n\n const hasEntries = globSync(joinPath(config.path, '**/*')).length > 0;\n\n saveChangelogInfo(config, {\n version: hasEntries\n // Case 3\n ? -1\n // Case 2\n : CURRENT_VERSION\n });\n}" ]
[ "0.670538", "0.670538", "0.670538", "0.670538", "0.670538", "0.6652473", "0.64209396", "0.64209396", "0.64209396", "0.64209396", "0.64209396", "0.63572294", "0.63440716", "0.633074", "0.6190342", "0.5864363", "0.5864363", "0.58604336", "0.58235604", "0.5782804", "0.5782804", "0.5712914", "0.5690843", "0.5629873", "0.55112946", "0.5484145", "0.54703444", "0.5454507", "0.5347314", "0.53449374", "0.530552", "0.52989197", "0.5290012", "0.5271951", "0.5210475", "0.519065", "0.51675206", "0.5136565", "0.513615", "0.51101965", "0.5095847", "0.50772244", "0.5062301", "0.50592846", "0.5054714", "0.5053101", "0.5006996", "0.4983924", "0.4980569", "0.49492717", "0.491987", "0.48995054", "0.488781", "0.48479807", "0.4846192", "0.4842815", "0.48404744", "0.48384836", "0.48381782", "0.48348725", "0.4832966", "0.48021448", "0.47989795", "0.47856805", "0.47846323", "0.47812316", "0.47771674", "0.4772283", "0.4770799", "0.47243798", "0.47187296", "0.47100884", "0.47059026", "0.47009173", "0.46979582", "0.46963036", "0.46814606", "0.46725446", "0.46631724", "0.46582663", "0.46537155", "0.46527088", "0.46484375", "0.46410567", "0.4632477", "0.46178654", "0.46127874", "0.46120244", "0.46042532", "0.4603676", "0.45975232", "0.45958745", "0.45928568", "0.4584627", "0.45805612", "0.45638952", "0.45627835", "0.4561705", "0.4561705", "0.4559121" ]
0.75518733
0
On click on the delete link, delete its parent.
function deleteItem(link){ $(link).parent().remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function del (e) {\r\n var parent = $(e.target).parent();\r\n var id = parent.attr('id');\r\n parent.remove();\r\n $.ajax({\r\n url: \"core/delete.php\",\r\n type: \"POST\",\r\n dataType: \"text\",\r\n data: \"id=\" + id\r\n });\r\n}", "function deleteItem(){ \n $(this).parent().remove();\n }", "delete() {\n let _this = this;\n\n delete _this._parent._children[_this._childId];\n\n _this._releaseListeners();\n\n //TODO: send delete message ?\n }", "function deleteAfterClick(event){\n event.target.parentNode.remove();\n }", "function deleteListItem(){\n \t\t$(this).parent().remove();\n \t}", "function deleteTodo(todo) {\n $(todo).parent().remove();\n}", "function clickDelete (event) {\n console.log(event.target);\n if (event.target.id === 'delete') {\n console.log(event.target);\n event.target.parentNode.remove();\n }\n}", "function deleteItem(e){\n \n console.log(e.target)\n // we use conditional to fire event only when we click desired items\n // However we want to target the element above it (i and not just the link)\n if(e.target.parentElement.classList.contains('delete-item') ){\n console.log('delete item');\n // Afer clicking i we want to removbe li which is two levels up\n e.target.parentElement.parentElement.remove()\n }\n}", "function delParent() {\n\tvar parentNum = getLastNum(\"parentNum\");\n\t$(`#p` + parentNum).remove();\n\t$(`#pp` + parentNum).remove();\n\t$(`#ppp` + parentNum).remove();\n}", "function deleteItem(element) {\n $(element).parent().remove();\n}", "function deleteListItem() {\n $('.close').on('click', function() {\n var self = $(this);\n self = self.parent();\n self = self.parent();\n self.remove();\n });\n}", "function deleteItem(event) {\r\n event.parentNode.remove();\r\n}", "function deleteItem(e) {\n // Una vez que clickeemos el boton, queremos eliminar la Parent del item.\n // console.log('item Deleted');\n const element = e.currentTarget.parentElement.parentElement;\n const id = element.dataset.id; // Seleccionamos el ID\n // console.log(element); // Parent = Grocery-Item\n list.removeChild(element);\n if (list.children.length === 0) {\n container.classList.remove('show-container');\n }\n displayAlert('Item Removed', 'danger');\n setBackToDefault();\n // LOCAL STORAGE REMOVE\n removeFromLocalStorage(id);\n}", "function del(a){\n var row = a.parentNode.parentNode;\n row.parentNode.removeChild(row)\n \n }", "function deleteListItem() {\n\tthis.parentNode.remove();\n}", "function deleteDiv() {\n $(this).parent().remove();\n}", "function deleteItem(e) {\r\n var btn = e.target;\r\n\r\n while (btn && (btn.tagName != \"A\" || !/\\bdelete\\b/.test(btn.className))) {\r\n btn = btn.parentNode;\r\n if (btn === this) {\r\n btn = null;\r\n }\r\n }\r\n if (btn) {\r\n var btnParent = btn.parentNode.parentNode.parentNode\r\n this.removeChild(btnParent);\r\n updateNotesListOnRemoveItem(btn);\r\n }\r\n}", "function delete_li(rm){\nrm.parentNode.remove()\nsweetAlertSuccessMsg(\"Deleted Successfully\")\n}", "function deleteRow(element) {\n $(element).parent().parent().remove();\n}", "function deleteRow(){\n\tvar table = document.getElementById(\"cues\");\n\t//needs to be edited to get the parent and then find the parent in the table and then delete the proper row\n\ttable.deleteRow(-1);\n}", "function removeParent(e){\n\te.target.parentNode.remove();\n}", "function deleteLi(el){\n parentNode = el.parentNode.parentNode.parentNode\n nodeToDelete = el.parentNode.parentNode;\n parentNode.removeChild(nodeToDelete) \n}", "function deleteItem(e) {\n e.preventDefault();\n if (e.target.localName == 'svg') {\n let parentBtn = e.target.parentElement;\n parentBtn.parentElement.remove();\n } if (e.target.localName == 'button') {\n e.target.parentElement.remove();\n }\n }", "function removeParent(e){\r\n e.target.parentNode.remove();\r\n}", "function Delete(ev) {\r\n mainList.remove(ev.target.parentNode);\r\n }", "function delete_post(e){\n\te.preventDefault();\n\n\tif(e.target.classList.contains(\"delete\")){\n\t\tparent = e.target.parentElement.parentElement.parentElement\n\t\tconst parent_id = parent.id\n\t\tconst postId = parent_id.split(\"-\")[1]\n\t\tconst uid = parent_id.split(\"-\")[2]\n\n\t\t///user/:id/:pid\n\t\tconst url = \"/user/\" + uid + \"/\" + postId\n\t\tfetch(url, {method:\"delete\"})\n\t\t.then((res) => {\n\t\t\tif(res.status === 200){\n\t\t\t\tif(display_allPost_flag === true){\n\t\t\t\t\tdisplay_allPost()\n\t\t\t\t\tdisplay_allPost_flag = false\n\t\t\t\t} else {\n\t\t\t\t\tdisplay_name(false)\n\t\t\t\t}\n\n\t\t\t} else{\n\t\t\t\talert(\"delete failed\")\n\t\t\t}\n\t\t}).catch((error) => {\n\t\t\tconsole.log(error)\n\t\t})\n\t}\n}", "function removeParent(event){\n \t event.target.parentNode.remove();\n }", "function deleteListElement(button){\r\n//This looks a bit wierd, but needs to be so in order to wirk in IE browser\r\n\tlet parent = button.parentElement\r\n\r\n\tlet parentOfParent = parent.parentElement\r\n\r\nparentOfParent.removeChild(parent);\r\n//For other browsers this function will look just like this:\r\n//button.parentElement.remove();\r\n}", "function deleteItem(){\n\tul.removeChild(this.parentElement);\n}", "function removeParent(){\r\n\t\tvar $this = $(this);\r\n\t\t$this.parent().remove();\r\n\t}", "function delete_element(event) {\n\tvar el = event.target.parentElement;\n\tel.remove();\n}", "function Delete(div)\n{\n var parent = div.parentNode;\n var grand_father = parent.parentNode;\n grand_father.removeChild(parent);\n}", "function deletion(parent, changedSelect){\n\tconsole.log(\"deletes!!!\");\t\n\tvar index = -1;\n\tvar arr = parent.parentNode.childNodes; \n\t\n\tif(company_div.hasChildNodes()){\n\t\tcompany_div.removeChild(company_div.firstChild);\n\t\tcompany_div.style.display = \"none\";\n\t}\n\tif(arr){\n\t\tconsole.log(typeof(arr));\n\t\tfor(var i=0; i< arr.length; i++) {\n\t\t\tvar childNode = arr[i];\n\t\t\tconsole.log(childNode);\n\t\t\tif(childNode === parent) {\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t\tif(i > index && index != -1) {\n\t\t\t\tparent.parentNode.removeChild(childNode);\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t}\n}", "static deleteBook(el){\n //checking if the click target has delete-book element(a href value = X)\n if(el.classList.contains('delete')){\n //el.(<td><a href>X</a></td>).(document.createElement('tr')).remove \n //a href parent = <td>. <td> parent =tr \n el.parentElement.parentElement.remove();\n\n }\n }", "function deletePerson2(link) {\n var person = link.parentNode.parentNode;\n document.getElementById('tblPerson').removeChild(person);\n}", "function delete_task(e) {\n console.log('delete task btn pressed...');\n e.target.parentElement.remove();\n\n }", "function removeTask(e) {\n e.stopPropagation();\n /*\n e.target || this === <i class=\"fas fa-times\"></i>\n e.target.parentElement === <a class=\"delete-item secondary-content\">\n e.target.parentElement.parentElement === <li>\n */\n if(confirm('Are you sure?') === true) { \n\n e.target.parentElement.parentElement.remove(); \n }\n }", "deleteForm (event) {\n\n\n // Delete link\n\n let deleteLink = event.currentTarget;\n\n\n // Fetch elt child and retrive the form related\n\n let childs = deleteLink.childNodes;\n\n let form;\n\n childs.forEach(function(e) {\n\n if(e.tagName === \"FORM\")\n\n form = e;\n\n });\n\n\n\n // Submit form\n\n if ( confirm('Confirmer la suppression ?') )\n\n form.submit();\n\n\n }", "function deleteItem() {\n\tlet item = this.parentNode;\n\tdomStrings.todoList.removeChild(item);\n}", "remove() {\n if ( this.parent ) {\n this.parent.removeChild([this]);\n }\n }", "function deleteArticleClick(event){\n \n event.stopPropagation(); //Stop event bubbling\n \n var articles = new Articles(); //New article object\n \n var markedId = $(this).parents('article').attr(\"data-value\"); //Get article ID\n \n // If id was determined correctly delete article\n if(markedId){\n articles.removeArticle(markedId).done(deleteResponse);\n }else{\n popUp(\"error\",\"Failed to get target article ID\");\n }\n\n}//END deleteArticleClick", "static DeleteSelected(){\n ElmentToDelete.parentElement.remove();\n UI.ShowMessage('Elemento eliminado satisfactoriamente','info');\n }", "delete() {\n let $self = $(`#${this.idDOM}`);\n if(this.commentSection !== undefined) {\n this.commentSection.delete();\n this.commentSection = undefined;\n }\n $self.remove();\n Object.keys(this.buttons).forEach(type => this.buttons[type].delete());\n }", "function deleteItem(event) {\n \n //this delete the row from the list not the firebase\n $(this).parent().remove();\n \n \n //this gets the current selected row id \n // from the unordered list\n console.log($(this).attr(\"id\"));\n \n //this calls the firebase to delete the selected id row\n firebase.database().ref().orderByChild('id').equalTo($(this).attr(\"id\")).once(\"value\").then(function (snapshot) {\n snapshot.forEach(function (child) {\n //this remove the selected child row\n child.ref.remove();\n \n }); // a closure is needed here\n }).then(function () {\n console.log(\"Removed!\");\n \n \n });\n \n }", "delete() {\n this.eachElem((node) => {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n });\n }", "delete() {\n this.eachElem((node) => {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n });\n }", "function deleteItem(event) {\n \n //this delete the row from the list not the firebase\n $(this).parent().remove();\n \n \n //this gets the current selected row id\n // from the unordered list\n console.log($(this).attr(\"id\"));\n \n //this calls the firebase to delete the selected id row\n firebase.database().ref().orderByChild('id').equalTo($(this).attr(\"id\")).once(\"value\").then(function (snapshot) {\n snapshot.forEach(function (child) {\n //this remove the selected child row\n child.ref.remove();\n \n }); // a closure is needed here\n }).then(function () {\n console.log(\"Removed!\");\n \n \n });\n \n \n \n }", "function deleteHabit(element) {\n var ref = new Firebase('https://burning-heat-9490.firebaseio.com/');\n var habit = ref.child('Habits');\n var flag = confirm(\"Are you sure you want to delete the habit?\");\n if(flag === true){\n habit.child(element.value).remove();\n var child = element.parentNode.parentNode;\n var parent = child.parentNode;\n\n ///Slides up to delete \n $(child).closest('li').slideUp('slow', function(){\n $(child).remove(); \n });\n }\n}", "deleteProduct(element){\n if(element.name === 'delete'){\n element.parentElement.parentElement.remove();\n }\n }", "function handleEventDelete() {\n var currentEvent = $(this)\n .parent()\n .data();\n console.log(currentEvent)\n deleteEvent(currentEvent.id);\n }", "function removeParent(evt) {\n\tevt.target.removeEventListner(\"click\", removeParent, false);\n\tevt.target.parentNode.remove();\n}", "function delTask(e) {\n e.parentNode.remove()\n}", "function deleteCommentClick(event){\n \n event.stopPropagation();\n \n var comElementId= $(this).parents('li').attr('id'); //Get html element ID\n var commentId = comElementId.replace(\"Comment\",\"\"); //Strip 'Comment' to get actual comment ID from database\n\n // if commetn id was determined correctly call delete method \n \tif(commentId){\n \t \n\t var comment = new Comment();\n\t comment.delete(commentId,user.loggedUserId).done(commentsOperation);\n\t \n\t}else{\n\t popUp(\"error\",\"Delete comment not posible. Failed to get target commet ID!\"); \n\t}\n\t\n}//END deleteComentClick", "function deleteItem(element){\n element.parentNode.remove();\n}", "onRemove(){\n if (this.anchor.parentElement) {\n this.anchor.parentElement.removeChild(this.anchor);\n }\n }", "remove() {\n this.parent.removeChild(this)\n }", "function rem(a) {\n\n $(a).parent().remove();\n\n}", "function deleteelement(deleteButton) {\n\n var elementToDelete = deleteButton.closest(\".el-e\");\n\n elementToDelete.remove();\n}", "function Delete(){ \n\n\t\t$('.additionalInfo').hide();\n\n\t\tvar grandParent = $(this).parent().parent(); \n\n\t\tvar tdName = grandParent.children(\"td:nth-child(1)\");\n\t\tvar tdGrams = grandParent.children(\"td:nth-child(2)\");\n\t\tvar tdDate = grandParent.children(\"td:nth-child(5)\");\n\n\t\tvar name = tdName.text();\n\t\tvar grams = tdGrams.text();\n\t\tvar date = tdDate.text();\n\n\t\tfoodToBeRemovedObject = {name: name, grams:grams, dateadded:date};\n\n\t\tremoveUserFood();\n\n\t grandParent.next().remove();\t\t\t \n grandParent.remove();\n\n addEmptyRow();\n\n\t\tappendDatabaseRowsForChosenDate(date);\n\n}", "function deleteItem() {\n SidebarActions.deleteItem('Content', $scope.data.thisContent);\n}", "function deleteRowOfStudent(button){\nvar deleteRow = button. parentNode.parentNode;\ndeleteRow.parentNode.removeChild(deleteRow);\n }", "remove () {\n var p= this.parent;\n this._remove();\n p.update(true);\n }", "function deleteMenuDeleteClicked() {\n canvas.removeLabel(canvas.getCurrentLabel());\n oPublic.hideDeleteLabel();\n myActionStack.push('deleteLabel', canvas.getCurrentLabel());\n }", "handleDelete(e) {\n let deleteBtn = document.getElementsByClassName(\"del\")\n console.log(deleteBtn)\n for (var i = 0; i < deleteBtn.length; i++) {\n if (e.target === deleteBtn[i]) {\n let x = deleteBtn[i].parentNode\n let y = x.parentNode\n y.removeChild(x)\n }\n }\n }", "handleDelete(e) {\n let deleteBtn = document.getElementsByClassName(\"del\")\n console.log(deleteBtn)\n for (var i = 0; i < deleteBtn.length; i++) {\n if (e.target === deleteBtn[i]) {\n let x = deleteBtn[i].parentNode\n let y = x.parentNode\n y.removeChild(x)\n }\n }\n }", "function deleteItem(elem) {\r\n var id = elem.parent().attr(\"id\");\r\n firebase\r\n .database()\r\n .ref(\"/todos/\" + id)\r\n .remove();\r\n }", "function deleteButtonHandler(event) {\n deleteContact(event.target.parentNode.getAttribute('data-id'));\n render(contacts);\n}", "function handleParentDeletion(){\n let api = collector.getModule('ModalDialogAPI');\n let md = new api.modalDialog(\n function(dialog){\n acceptSendingNotificationMail();\n dialog.waitThenClick(new elementslib.ID(dialog.window.document, \"accept-parent-button\"));\n }\n );\n md.start();\n}", "function deleteButton(buttonName){\n buttonName.parentElement.parentElement.remove();\n}", "static deleteBook (el) {\n\t\tif (el.classList.contains('delete')) {\n\t\t\tel.parentElement.parentElement.remove();\n\t\t}\n\t}", "function removeParent(evt) {\n\tevt.target.removeEventListener(\"click\", removeParent, false);\n\tevt.target.parentNode.remove();\n}", "function deleteTask() {\n this.parentNode.parentNode.removeChild(this.parentNode);\n}", "function deleteButton() {\n var delbtn = document.createElement(\"i\");\n delbtn.className = \"far fa-trash-alt float-right\";\n delbtn.setAttribute(\"id\", \"del\");\n var cbox = document.createElement(\"input\");\n cbox.setAttribute(\"type\", \"checkbox\");\n cbox.className = \"checkbox\";\n //Adds to existing list\n listItems[i].insertBefore(cbox, listItems[i].firstChild);\n listItems[i].appendChild(delbtn);\n delbtn.onclick = removeParent;\n}", "function deleteTask() {\n this.parentNode.parentNode.removeChild(this.parentNode);\n }", "function remove(){\n addEventListener('click',function(e){\n if(e.target.className==='delete'){\n const li= e.target.parentElement;\n\n li.parentNode.removeChild(li);\n }\n });\n}", "function deleteDiv(){\n console.log('delete div activted');\n $(this).parent().remove();\n }", "deleteItem() {\n this.view.removeFromParentWithTransition(\"remove\", 400);\n if (this.item != null) {\n this.itemDao.deleteById(this.item.getId());\n }\n }", "delete() {\n if (this.leftChild !== null && this.rightChild !== null) {\n var inOrderNext = this.inOrderNext()\n var originalParent = this.parent\n var originalLeftChild = this.leftChild\n var originalRightChild = this.rightChild\n Object.assign(this, inOrderNext)\n this.parent = originalParent\n this.leftChild = originalLeftChild\n this.rightChild = originalRightChild\n inOrderNext.delete()\n } else if (this.parent !== null && this.leftChild === null && this.rightChild === null) {\n if (this.parent.leftChild === this)\n this.parent.leftChild = null\n else \n this.parent.rightChild = null\n this.parent = null\n } else if (this.parent !== null) {\n var orphan = this.rightChild !== null ? this.rightChild : this.leftChild\n if (this.parent.leftChild === this)\n this.parent.setLeftChild(orphan)\n else\n this.parent.setRightChild(orphan)\n this.parent = null\n } else {\n console.log('in this case, delete operation requires the change of the root pointer')\n }\n }", "function deleteListItem(e) {\n\t\te.remove();\n\t}", "function deleteItem(e){\n var productRow = e.currentTarget.parentNode.parentNode;\n body.removeChild(productRow);\n getTotalPrice();\n }", "delete() {\n this.removeAllConnections()\n \n let parent = this.getParent()\n let diagram = this.getDiagram()\n \n if (parent) {\n parent.removeChild(this)\n } else {\n diagram.removePane(this)\n }\n \n this.redrawAllConnectionsInDiagram()\n }", "function delAdditForm(event) {\n event.target.parentNode.remove();\n}", "function deleteItem(e){\n e.target.parentElement.parentElement.remove()\n itemDeletedSuccess()\n\n // Delete item from local Storage\n let targetItem = e.target.parentElement.parentElement\n let targetItemText = String(targetItem.children[0].textContent)\n storageRemoveItem(targetItemText)\n\n\n // Remove Clear-button if no more items after deletion\n if(groceryItem.childElementCount == 0){\n clearItems()\n } \n}", "function deleteItem(e) {\n // console.log(e.target);\n console.log(e.currentTarget);\n // console.log(e.target.parentElement.remove());\n e.currentTarget.closest('.playerCard').remove();\n}", "function deleteItem(e){\n const element=e.currentTarget.parentElement.parentElement;\n const id=element.dataset.id;\n list.removeChild(element);\n if (list.children.length===0) {\n container.classList.remove('show-container');\n }\n displayAlert('item removed','danger');\n setBackToDefault();\n removeFromLocalStorage(id);\n //remove from local storage\n // removeFromLocalStorage(id);\n \n}", "function deleteListItem(element){\n element.parentNode.remove(\"li\"); \n}", "function deleteBtnHandler(e){\n //getting the value of mid\n let mId=e.currentTarget.parentNode.getAttribute(\"data-mId\")\n deleteMediaFromGallery(mId);\n //removing from the databse\n e.currentTarget.parentNode.remove()\n}", "function deleteChild(node) {\r\n\t Ext.Msg.confirm('Confirm',' Are u sure to delete?', function(btn, text){\r\n\t if (btn == 'yes'){\r\n\t var child=tree.getSelectionModel().getSelectedNode();\r\n\t if(child.attributes.nodeid=='1')\r\n\t Ext.Msg.alert('File','You cant delete root');\r\n\t else\r\n { child.remove();\r\n deleteNodeSer(child);\r\n Ext.Msg.alert('File','Node deleted');\r\n }\r\n }\r\n\t\t});\r\n\t}", "static deleteBook(el) {\n\t\tif (el.classList.contains('delete')) {\n\t\t\tel.parentElement.parentElement.remove();\n\t\t}\n\t}", "function deleteTaskFromToDoList(event) {\n event.target.parentElement.remove();\n}", "function delChild() {\n\tvar childNum = getLastNum(\"childNum\");\n\t$(`#c` + childNum).remove();\n\t$(`#cc` + childNum).remove();\n\t$(`#ccc` + childNum).remove();\n}", "function deleteSignOutLink() {\n let toDelete = document.getElementById('signOut');\n let parent = toDelete.parentNode;\n parent.removeChild(toDelete);\n}", "static deleteBook(el){\n if(el.classList.contains('delete')){\n el.parentElement.parentElement.remove();\n }\n }", "static deleteBook(element) {\n if (element.classList.contains('delete')) {\n element.parentElement.parentElement.remove();\n }\n }", "function deleteClickEvent(e){\n e.stopPropagation();\n e.stopImmediatePropagation();\n var delID = e.target.id.split(\"del\")[1]; //gets record's id\n if(confirm(\"Are you sure you want to delete this record?\")){\n $.ajax({\n type: \"POST\",\n url: \"deleteRow.php\",\n data: {IDtoDelete: delID},\n success: function(data){\n alert(data);\n hideForm(\"div\"+delID);\n }\n })\n }\n }", "deleteProduct(element) {\n if (element.name === 'delete') {\n element.parentElement.parentElement.parentElement.remove();\n this.showMessage('Product Delete Successfully', 'warning');\n }\n }", "function deleteElement(element){\n\telement.parentNode.remove(element.parentElement);\n}", "function deleteItem() {\n var id = $(this).parent().attr('data-id');\n\n $.ajax(\n {\n url: 'http://157.230.17.132:3017/todos/' + id,\n method: 'DELETE',\n success: function() {\n getAllItemsSaved();\n },\n error: function() {\n alert(\"Attenzione, non sono riuscito a eliminare l'elemento\");\n }\n }\n );\n}", "function delbtn(){\n var pChange = window.confirm(\"Are you sure you want to delete this?\");\n if(pChange){\n window.event.preventDefault();\n var el = window.event.target.closest(\"[data-row]\");\n var ele = el.getAttribute(\"data-row\");\n myBooks.splice(ele, 1);\n build();\n }else{\n return false;\n }\n}", "function deleteMessage() {\n var target = $(\".delete-message\")\n target.click(function () {\n $(this).parents(\".box-messaggio\").remove();\n })\n}" ]
[ "0.74066085", "0.7222667", "0.7190076", "0.7089944", "0.6914718", "0.6873346", "0.6860425", "0.6724399", "0.6719916", "0.66979235", "0.6637335", "0.6600134", "0.6595735", "0.6579235", "0.65606236", "0.6547376", "0.6546643", "0.65332353", "0.653033", "0.6521029", "0.6466569", "0.6461999", "0.6459657", "0.6427813", "0.64264363", "0.64112085", "0.6409344", "0.6391464", "0.63894534", "0.6364758", "0.6342956", "0.6325453", "0.6317508", "0.6316738", "0.6312596", "0.6308556", "0.6281236", "0.6258179", "0.6250193", "0.62399143", "0.6232013", "0.6224294", "0.6222673", "0.62154764", "0.62050754", "0.62050754", "0.61932486", "0.6180166", "0.6174701", "0.6167997", "0.6155254", "0.6147642", "0.6143717", "0.6130626", "0.6104262", "0.6098504", "0.60925454", "0.60875845", "0.60641545", "0.6063125", "0.60617715", "0.60603505", "0.60527486", "0.6037117", "0.6037117", "0.6037113", "0.6035246", "0.60302615", "0.6021164", "0.6017756", "0.60175717", "0.60051435", "0.60044044", "0.6003425", "0.5983551", "0.59828204", "0.59799695", "0.5974824", "0.5969918", "0.5964387", "0.59573436", "0.5952893", "0.5952165", "0.5950445", "0.5950138", "0.59482574", "0.5946373", "0.593947", "0.5933315", "0.591601", "0.59154636", "0.59128875", "0.59127927", "0.59078145", "0.59067756", "0.59054166", "0.5902993", "0.5901438", "0.5896335", "0.58945614" ]
0.72982764
1
should be used for screen transitions
function clearText(){ game.innerText = ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onActiveScreenChanged_() {}", "function menuScreen() {\n if (currentPage === 'highscorepage') {\n $box2.animate({left: $screenWidth}, 150); // slides highscorepage back to original location hidden offscreen - 150 is the speed in mlilliseconds\n } else if (currentPage === 'creditspage') {\n $box3.animate({left: $screenWidth}, 150); // slides creditspage back to original location hidden offscreen - 150 is the speed in mlilliseconds\n } else {\n $box1.animate({left: $screenWidth}, 150); // slides playpage back to original location hidden offscreen - 150 is the speed in mlilliseconds\n }\n currentPage = 'menupage';\n }", "_onScreenTouch() {\n let state = this.state;\n const time = new Date().getTime();\n const delta = time - state.lastScreenPress;\n\n if ( delta < 300 ) {\n // this.methods.toggleFullscreen();\n }\n\n state.lastScreenPress = time;\n\n this.setState( state );\n }", "function navigateGo() {\n $('.screen').hide();\n // $(\".screen button\")\n // .on(\"transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd\",\n // function(e){\n // $('.screen .'+whichButton).removeClass('activated');\n // $('.screen button').show();\n // $('.screen').hide();\n // $(this).off(e);\n // });\n if(currentScreen !== \"screen-home\") {\n $('.' + currentScreen).show();\n }\n $('.order-current').hide();\n $('.lock-current').hide();\n}", "function highScoreScreen() {\n if (currentPage === 'creditspage') {\n $box3.animate({left: $screenWidth}, 150); // slides creditspage back to original location hidden offscreen - 150 is the speed in mlilliseconds\n } else if (currentPage === 'highscorepage') {\n $box2.animate({left: 0}, 150); // slides highscorepage back to original location hidden offscreen - 150 is the speed in mlilliseconds\n } else if (currentPage === 'playpage') {\n $box1.animate({left: $screenWidth}, 150); // slides playpage back to original location hidden offscreen - 150 is the speed in mlilliseconds\n }\n currentPage = 'highscorepage';\n }", "function changeScreen(){\n if (state === `menu`){\n state = `main`;\n }\n else if (state === `end`){\n state = `menu`;\n count = 0;\n }\n }", "function showNextScreen()\n{\n // targets the current screen\n var currentScreen = \"#screen\" + screenNum;\n // sets next screen number\n screenNum++;\n // targets the next screen\n var nextScreen = \"#screen\" + screenNum;\n // transition out navigation\n hideNav();\n // transitions current screen out\n TweenMax.fromTo(currentScreen, duration, {\n x: 0\n }, {\n delay: 0.5,\n x: -960,\n ease: Power2.easeInOut\n });\n // shows next screen\n $(nextScreen).show();\n // transitions next screen in\n TweenMax.fromTo(nextScreen, duration, {\n x: 960\n }, {\n delay: 0.5,\n x: 0,\n ease: Power2.easeInOut,\n onComplete: function() {\n // hide current screen\n $(currentScreen).hide();\n // transition on navigation\n showNav();\n }\n });\n \n // load function to animate on contents of screen\n window[\"loadScreen\" + screenNum]();\n}", "function transition(){\n\t\n\tgame.move(gameInfo.curtain);\n\t\n\t// If the curtain has just fully descended\n\tif(gameInfo.curtain.y == 0 && !gameInfo.curtain.descended) {\n\t\tgameInfo.curtain.descended = true;\n\t\tgameInfo.curtain.vy = 0;\n\t\tgameInfo.transitionInvisible.visible = false;\n\t\tgameInfo.transitionVisible.visible = true;\n\t\tif (gameInfo.currentLevelRunning) {\n\t\t\tgameInfo.currentLevelBackground.visible = true;\n\t\t}\n\t\tfor (var sprite in gameInfo.transitionVisible) {\n\t\t\tsprite.visible = true;\n\t\t}\n\t\t\n\t}\n\t\n\tif (gameInfo.curtain.descended) {\n\t\tgameInfo.ascendCounter -= 1;\n\t}\n\t\n\t// If the player has any new towers unlocked, they are unlocked while the curtain is down \n\tif (gameInfo.ascendCounter == 10) {\n\t\tgame.pause();\n\t\tgameInfo.currentUnlocks = [];\n\t\tfor (let tower in gameInfo.towers) {\n\t\t\tif(gameInfo.towers[tower].locked && gameInfo.towers[tower].unlockAfterScene == gameInfo.lastSceneCompleted) {\n\t\t\t\tgameInfo.towers[tower].locked = false;\n\t\t\t\tgameInfo.towers[tower].portrait.tint = 0xFFFFFF;\n\t\t\t\tgameInfo.towers[tower].portrait.priceLabel.text = gameInfo.towers[tower].price;\n\t\t\t\tgameInfo.levelInterfaceInteractive.push(gameInfo.towers[tower].portrait);\n\t\t\t\tgameInfo.currentUnlocks.push(tower);\n\t\t\t}\n\t\t}\n\t\tif (gameInfo.currentUnlocks.length > 0) {\n\t\t\t// The tower information sprites are created dynamically so they will appear above the curtain\n\t\t\tcreateInfoPane(gameInfo.currentUnlocks[0]);\n\t\t\tgameInfo.currentInfoPane.index = 0;\n\t\t\tgameInfo.currentInfoPane2.interact = true;\n\t\t\tgameInfo.currentInfoPane2.release = nextInfoPane;\n\t\t}\n\t\telse {\n\t\t\tgame.resume();\n\t\t}\n\t}\n\t\n\t\n\t// If it is time for the curtain to ascend\n\tif (gameInfo.ascendCounter == 0) {\n\t\tgameInfo.curtain.vy = -15;\n\t\tgame.move(gameInfo.curtain);\n\t}\n\t\n\t// If the curtain has fully ascended\n\tif (gameInfo.curtain.y == -915) {\n\t\tgame.remove(gameInfo.curtain);\n\t\tfor (let sprite of gameInfo.transitionActivate) {\n\t\t\tgame.makeInteractive(sprite);\n\t\t}\n\t\tgameInfo.transitionActivation();\n\t}\n}", "stateTransition(){return}", "function changeScreen () {\n startScreen = document.querySelector('#start-screen')\n game = document.querySelector('#game')\n startScreen.style.visibility = 'hidden'\n game.style.visibility = 'visible'\n}", "function displayToScreen() {\n\n\n\t}", "function _nextScreen() {\n console.log('nextScreen called');\n setTimeout(function () {\n $state.go(targetState);\n }, 2500);\n\n }", "function mkdOnWindowLoad() {\n mkdSmoothTransition();\n }", "function loadScreen1()\n{\n TweenMax.from(\"#screen1 h1\", duration, {\n delay: delay-1,\n opacity: 0\n });\n TweenMax.from(\"#globe1\", duration-0.5, {\n delay: delay-1,\n scale:0,\n opacity: 0\n });\n TweenMax.from(\"#globe2\", duration-0.5, {\n delay: delay-0.5,\n scale:0,\n opacity: 0\n });\n TweenMax.from(\"#globe3\", duration-0.5, {\n delay: delay,\n scale:0,\n opacity: 0\n });\n \n // update delay to wait for screen transition\n delay = duration + 0.5;\n}", "function appscreennext() {\n document.getElementById(\"app-screen\").style.marginLeft = \"-1280px\"; // move the app-screen to the right\n document.getElementById(\"app-screen-indicator\").className = \"app-screen-indicator-last\";\n}", "function changeScreen(screen) {\n activeScreen = screen;\n}", "function goto(screen) {\r\n\t//screen move\r\n\tvar where = screen || event.target.getAttribute('data-where') || null;\r\n\tvar destination = where ? document.querySelector('.' + where) : '';\r\n\tvar newScreen = destination ? getChildNumber( destination ) : 0;\r\n\r\n\tif (where) {\r\n\t\t//handle ads\r\n\t\tdisplayAdsOnScreenChange(where);\r\n\t\t\r\n\t\t//slide to new screen\r\n\t\tscreens.forEach(function(screen){\r\n\t\t\tscreen.style.transform = 'translate3d(' + ((getChildNumber(screen) - newScreen) * 100) + '%, 0, 0)';\r\n\t\t\tscreen.classList.remove('active');\r\n\t\t});\r\n\t\tsetTimeout(function(){\r\n\t\t\tdestination.classList.add('active');\r\n\t\t}, 700);\r\n\t\tdestination.scrollTop = 0;\r\n\t\t\r\n\t\t//slide background\r\n\t\tvar game = document.getElementById('game');\r\n\t\tvar newX = -(newScreen * screens[0].getBoundingClientRect().width);\r\n\t\tgame.style.backgroundPosition = newX + 'px 0';\r\n\t} else {\r\n\t\treturn;\r\n\t}\r\n}", "function TransitionFromMapLoadingScreen()\n{\n var preGame = $.GetContextPanel();\n preGame.AddClass( 'MapLoadingOutro' );\n\n // Poke the C++ when the transition is finished\n var mapLoadingOutroDuration = 5.0;\n $.Schedule( mapLoadingOutroDuration, function () {\n $.GetContextPanel().MapLoadingOutroFinished();\n } );\n}", "function ShowVersusScreen( versusDuration )\n{\n var preGame = $.GetContextPanel();\n\n preGame.AddClass( 'StrategyVersusTransition' );\n\t$.DispatchEventAsync( 0.0, 'PlaySoundEffect', 'versus_screen.top' );\n $.DispatchEvent( 'DOTAGlobalSceneSetCameraEntity', 'PregameBG', 'shot_cameraC', 5.0 );\n $.DispatchEvent( 'DOTAGlobalSceneFireEntityInput', 'GodRays', 'ui_burst_red', 'stop', 0 );\n $.DispatchEvent( 'DOTAGlobalSceneFireEntityInput', 'GodRays', 'godrays1', 'stop', 0 );\n $.DispatchEvent( 'DOTAGlobalSceneFireEntityInput', 'GodRays', 'godrays2', 'stop', 0 );\n\t$.DispatchEvent( 'DOTAGlobalSceneFireEntityInput', 'GodRays', 'godrays_spin', 'stop', 0 );\n\t$.DispatchEvent( 'DOTAGlobalSceneFireEntityInput', 'VersusFX', 'hbar', 'stop', 0 );\n\t$.DispatchEvent( 'DOTAGlobalSceneFireEntityInput', 'VersusFX', 'hbar2', 'stop', 0 );\n\t\n\t\n $.DispatchEventAsync( 1.5, 'AddStyle', preGame, 'VersusVisible' );\n $.DispatchEventAsync( 1.6, 'AddStyle', $( '#VersusScreen' ), 'StartVersusAnim' );\n $.DispatchEventAsync( 1.8, 'DOTAGlobalSceneFireEntityInput', 'VersusFX', 'hbar', 'start', 1 );\n $.DispatchEventAsync( 1.8, 'DOTAGlobalSceneFireEntityInput', 'VersusFX', 'hbar2', 'start', 1 );\t\t\n $.DispatchEventAsync( 2.0, 'DOTAGlobalSceneSetCameraEntity', 'RadiantAmbient', 'camera_2', 5.0 );\n $.DispatchEventAsync( 2.0, 'DOTAGlobalSceneSetCameraEntity', 'DireAmbient', 'camera_1', 5.0 );\n\t\n //$.DispatchEventAsync( 3.0, 'PlaySoundEffect', 'ui.treasure.spin_music' );\n\n //$.DispatchEventAsync( 3.1, 'PlaySoundEffect', 'Loot_Drop_Stinger_Legendary' );\n //$.DispatchEventAsync( 3.3, 'PlaySoundEffect', 'ui.badge_levelup' );\n $.DispatchEventAsync( 3.58, 'DOTAGlobalSceneFireEntityInput', 'GodRays', 'ui_burst_red', 'start', 1 );\n $.DispatchEventAsync( 3.58, 'DOTAGlobalSceneFireEntityInput', 'GodRays', 'godrays1', 'start', 1 );\n $.DispatchEventAsync( 3.58, 'DOTAGlobalSceneFireEntityInput', 'GodRays', 'godrays2', 'start', 1 );\n\n // If we're passed a duration, then schedule the outro for X seconds before the phase is going to end.\n // If we're not passed a duration, then we're debugging and the code will call it manually.\n if ( versusDuration > 0.0 )\n {\n var versusOutroDuration = 1.5;\n $.DispatchEventAsync( versusDuration - versusOutroDuration, 'DOTAStartVersusScreenOutro' );\n }\n}", "pixelShooterClicked () {\n this.SceneManager.switchToUsingTransaction('PixelShooter/Level1', Transition.named('ScrollFrom', { direction: 'left' }))\n }", "function winScreen() {\n image(introScreenBackground, 0, 0);\n\n push();\n noFill();\n noStroke();\n rect(285, 300, 335, 100);\n pop();\n\n rainRun();\n\n lightningGenerator();\n\n animation(huntAgainAnim, 450, 350);\n\n animation(winMaskAnim, 475, 200);\n}", "function switchScreen()\n{\n\tvar fullScreenContent = document.getElementById(\"fullScreenContent\");\t\n\tvar outputView = document.getElementById(\"outputView\");\n\tvar contents;\n\t\n\tif(fullScreenContent.style.visibility == \"visible\")\n\t{\n\t\t//\tfullScreenContent -> outputView\n\t\tcontents = fullScreenContent.innerHTML;\n\t\tfullScreenContent.innerHTML = \"\";\n\t\thideFullScreen();\n\t\t\n\t\toutputView.innerHTML = contents;\n\t}\n\telse\n\t{\n\t\t//\toutputView -> fullScreenContent\n\t\tcontents = outputView.innerHTML;\n\t\toutputView.innerHTML = \"\";\n\t\tshowFullScreen();\n\t\t\n\t\tfullScreenContent.innerHTML = contents;\n\t}\n}", "_doTransitionToIdle() {\n return false\n }", "function rewardScreen() {\n\n}", "onFullScreenChanged () {}", "function standby(){\n drawStartScene();\n}", "willTransition() {\n this.refresh();\n console.log(\"WILL TANSITION\");\n }", "function navigateScreenAnim(swipeAnim,swipeVal,fadeAnim,fadeVal,callback=null) {\n timingAnim(swipeAnim,swipeVal,200).start();\n timingAnim(fadeAnim,fadeVal,200).start(callback);\n }", "function switchScreen(hide, show) {\n $(hide).fadeOut(\"fast\", function() {\n $(window).scrollTop(0);\n $(show).fadeIn(\"fast\");\n });\n}", "_onUpdateDisplay() {}", "function Screen() {\r\n}", "transitionToRemap() {\n if (this.tick <= 50) {\n this.tutorial.alpha -= 0.02;\n this.fireToContinue.alpha -= 0.02;\n }\n else if (this.tick <= 100) {\n this.remapHeaderText.alpha += 0.02;\n this.remapKB.alpha += 0.02;\n this.remapButtonText.alpha += 0.02;\n }\n else {\n this.state = 4;\n this.tick = 0;\n this.remapPressText.alpha = 1;\n }\n }", "function state() {\r\n\r\n for(var key in views) {\r\n views[key].stage.visible = false;\r\n }\r\n\r\n character.visible = false;\r\n\r\n switch(CURR_STATE) {\r\n case STATES.TITLE_SCREEN:\r\n showView(views.title);\r\n break;\r\n\r\n case STATES.CREDITS_SCREEN: \r\n showView(views.credits);\r\n break;\r\n\r\n case STATES.PRESENT_LAB:\r\n showView(views.staticHUD);\r\n showView(views.presentLab);\r\n character.visible = true;\r\n break;\r\n }\r\n\r\n for(var key in views) {\r\n views[key].visible = views[key].stage.visible;\r\n }\r\n\r\n for(var key in keybinds) {\r\n if (keybinds[key].isDown) {\r\n keybinds[key].press();\r\n }\r\n }\r\n}", "function transitionThreeUp(){\n\n}", "function newGameVideo() {\n //light up the island for the first time\n}", "function mouveMove() {\n refreshDisplay();\n}", "onScreen(screen) {\n return Util.noop('TripUI.onScreen()', screen);\n }", "function creditsScreen() {\n $box3.animate({left: 0}, 150); // moves the screen into the main container display\n currentPage = 'creditspage';\n }", "view_GameMovie(){\n let currMoviePlayInfo = this.model.getCurrentMoviePlayInfo();\n this.view.updateCurrentMoviePiece(currMoviePlayInfo[0][0], currMoviePlayInfo[0][1], currMoviePlayInfo[1][1]);\n this.view.redoPlay(currMoviePlayInfo[0][0], currMoviePlayInfo[0][1], currMoviePlayInfo[1][1]);\n this.state = 'WAIT_GM_ANIMATION_END';\n }", "function showScreen(id) {\n //\n // Remove the active state from all screens. There should only be one...\n let active = document.getElementsByClassName('active');\n for (let screen = 0; screen < active.length; screen++) {\n active[screen].classList.remove('active');\n }\n //\n // Tell the screen to start actively running\n screens[id].run();\n //\n // Then, set the new screen to be active\n document.getElementById(id).classList.add('active');\n }", "function AdjustFlickscreen(){\n\tif (state!==undefined && state.metadata.flickscreen!==undefined){\n\t\toldflickscreendat=[0,0,Math.min(state.metadata.flickscreen[0],level.width),Math.min(state.metadata.flickscreen[1],level.height)];\n\t}\n}", "function updateWelcomeScreen () {}", "afterShown() {}", "function launchTransition()\n\t\t{\n\t\t\t// delete active_class before change :\n\t\t\t_this.$refs.medias.removeClass(_this._getSetting('classes.active'));\n\n\t\t\t// delete active_class before change :\n\t\t\t_this.$refs.current.addClass(_this._getSetting('classes.active'));\n\n\t\t\t// check transition type :\n\t\t\tif (_this._getSetting('transition') && _this._isNativeTransition(_this._getSetting('transition.callback'))) _this._transition(_this._getSetting('transition.callback'));\n\t\t\telse if (_this._getSetting('transition') && _this._getSetting('transition.callback')) _this._getSetting('transition.callback')(_this);\n\t\t\t\n\t\t\t// callback :\n\t\t\tif (_this._getSetting('onChange')) _this._getSetting('onChange')(_this);\n\t\t\t$this.trigger('slidizle.change', [_this]);\n\n\t\t\t// check if the current if greater than the previous :\n\t\t\tif (_this.$refs.current.index() == 0 && _this.$refs.previous)\n\t\t\t{\n\t\t\t\tif (_this.$refs.previous.index() == _this.$refs.medias.length-1) {\n\t\t\t\t\tif (_this._getSetting('onNext')) _this._getSetting('onNext')(_this);\n\t\t\t\t\t$this.trigger('slidizle.next', [_this]);\n\t\t\t\t} else {\n\t\t\t\t\tif (_this._getSetting('onPrevious')) _this._getSetting('onPrevious')(_this);\n\t\t\t\t\t$this.trigger('slidizle.previous', [_this]);\n\t\t\t\t}\n\t\t\t} else if (_this.$refs.current.index() == _this.$refs.medias.length-1 && _this.$refs.previous)\n\t\t\t{\n\t\t\t\tif (_this.$refs.previous.index() == 0) {\n\t\t\t\t\tif (_this._getSetting('onPrevious')) _this._getSetting('onPrevious')(_this);\n\t\t\t\t\t$this.trigger('slidizle.previous', [_this]);\n\t\t\t\t} else {\n\t\t\t\t\tif (_this._getSetting('onNext')) _this._getSetting('onNext')(_this);\n\t\t\t\t\t$this.trigger('slidizle.next', [_this]);\n\t\t\t\t}\n\t\t\t} else if (_this.$refs.previous) {\n\t\t\t\tif (_this.$refs.current.index() > _this.$refs.previous.index()) {\n\t\t\t\t\tif (_this._getSetting('onNext')) _this._getSetting('onNext')(_this);\n\t\t\t\t\t$this.trigger('slidizle.next', [_this]);\n\t\t\t\t} else {\n\t\t\t\t\tif (_this._getSetting('onPrevious')) _this._getSetting('onPrevious')(_this);\n\t\t\t\t\t$this.trigger('slidizle.previous', [_this]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (_this._getSetting('onNext')) _this._getSetting('onNext')(_this);\n\t\t\t\t$this.trigger('slidizle.next', [_this]);\n\t\t\t}\n\n\t\t\t// init the timer :\n\t\t\tif (_this._getSetting('timeout') && _this.$refs.medias.length > 1 && _this.isPlaying && !_this.timer) {\n\t\t\t\tclearInterval(_this.timer);\n\t\t\t\t_this.timer = setInterval(function() {\n\t\t\t\t\t_this._tick();\n\t\t\t\t}, _this._getSetting('timerInterval'));\n\t\t\t}\n\t\t}", "function drawScreen () {\n drawEvents();\n }", "onBeforeShow() {\n traceFirstScreenShown();\n this.propagateOnBeforeShow();\n }", "function onScreenEnter(screen) {\n switch(screen) {\n case ATTRS.api.WorkerUI.Const.SCREEN_VIDEO: {\n const body = loadLayoutFor(ATTRS.api.WorkerUI.Const.PANEL_WORKER_SHOT_BUTTONS);\n //var teststrg=JSON.stringify(body);\n //var teststrg2=JSON.stringify(screen);\n //d(`body=${teststrg}`);\n //d(`screen=${teststrg2}`);\n \n return (body)? {\n screen_id: screen, \n video_bottom: body\n }: null;\n } \n }\n}", "function winOrLoseScreen(){\n if (!win){\n GameOverGraphic()\n BGM.pause()\n } else {\n youWinGraphic()\n BGM.pause()\n }\n }", "function startScreen() {\n screenWin.style.display = 'none';\n board.style.display = 'none';\n}", "function ShowVersusScreenOutro()\n{\n var preGame = $.GetContextPanel();\n preGame.AddClass( 'VersusOutro' );\n\t$.DispatchEventAsync( 0.0, 'PlaySoundEffect', 'versus_screen.end_swipe' );\n $.DispatchEvent( 'DOTAGlobalSceneSetCameraEntity', 'RadiantAmbient', 'camera_end_top', 2.0 );\n $.DispatchEvent( 'DOTAGlobalSceneSetCameraEntity', 'DireAmbient', 'camera_end_bottom', 2.0 );\n $.DispatchEvent( 'DOTAGlobalSceneFireEntityInput', 'GodRays', 'ui_burst_red', 'stop', 0 );\n $.DispatchEvent( 'DOTAGlobalSceneFireEntityInput', 'GodRays', 'godrays1', 'stop', 0 );\n $.DispatchEvent( 'DOTAGlobalSceneFireEntityInput', 'GodRays', 'godrays2', 'stop', 0 );\n\t$.DispatchEvent( 'DOTAGlobalSceneFireEntityInput', 'GodRays', 'godrays_spin', 'start', 1 );\n\t$.DispatchEvent( 'DOTAGlobalSceneFireEntityInput', 'VersusFX', 'hbar', 'stop', 0 );\n\t$.DispatchEvent( 'DOTAGlobalSceneFireEntityInput', 'VersusFX', 'hbar2', 'stop', 0 );\t\n}", "loadScreenHandler() {\n $('.loading_icon').toggleClass('hidden');\n var loadScreenDom = $(\".loading_screen\");\n loadScreenDom.addClass('slide_to_top');\n }", "function onWallboardIdleSlideDisplay(){\n console.log(\"onWallboardIdleSlideDisplay\");\n}", "function onWallboardIdleSlideDisplay(){\n console.log(\"onWallboardIdleSlideDisplay\");\n}", "function startScreen() {\n fill(255, 56, 115, opacity);\n rect(0,0,width,height);\n textSize(12);\n if (frameCount%2 == 0){\n fill(255,opacity);\n textAlign(CENTER);\n textSize(12);\n text(\"CLICK TO PLAY\", width/2, height/2);\n }\n}", "function startTransition(){\n showTransition = true;\n chooseMusic = false;\n chooseStyle = false;\n button5.hide(); \n button6.hide(); \n button7.hide();\n}", "function startGame() {\n gameScreen=1;\n}", "function screen(view) {\n history.pushState({page: view}, view, '#'+view);\n cl(\"Changing to \"+view+\"!\");\n $('#battle, #menu, #shop, #settings, #deckbuilder, #guilds, #trophies, #cutscene, #help').hide();\n $('#'+view).show();\n if(view=='shop') {shopTab('recipes');}\n if(view=='menu') {$('#logo, #extra').show(); $('#menu .mode').addClass('lurking');}\n if(view=='trophies') {\n // set shop height so page doesn't scroll\n cl('hello');\n var busy = $('header:visible').outerHeight(); //cl(busy);\n var winHeight = window.innerHeight; //cl(winHeight);\n var newH = winHeight - busy; //cl(newH);\n $('.achievements').height(newH);\n }\n }", "function welcome_screen()\n{\n $(document).on(\"pagecreate\",\"#welcomeScreen\",function(){\n $(\"#welcomeText\").fadeIn(2000,function(){\n $(\"#easy\").fadeIn(1000,function(){\n $(\"#medium\").fadeIn(1000,function(){\n $(\"#hard\").fadeIn(1000);\n });\n });\n });\n $(\"#logo\").fadeIn();\n $(\"#easy\").on(\"tap\",function(){\n diff_lev=1;\n knock.play();\n computeAndRender();\n });\n $(\"#medium\").on(\"tap\",function(){\n diff_lev=2;\n knock.play();\n computeAndRender();\n });\n $(\"#hard\").on(\"tap\",function(){\n diff_lev=3;\n knock.play();\n computeAndRender();\n });\n });\n}", "onSwitchedAway () {\n // console.log('SceneManager switched away from MainMenu')\n }", "function settingsForScreens(){\n $(\"body\").css(\"visibility\", \"visible\" );\n var menuWidth = parseInt( $(\"#menu-container .menu-content-holder\").css(\"width\"), 10 );\n var menuHider = parseInt( $(\"#menu-container #menu-hider\").width(), 10 );\n var menuHiderIcon = parseInt( $(\"#menu-container #menu-hider #menu-hider-icon\").width(), 10 );\n var menuHeight = parseInt( $(\"#menu-container\").css(\"height\"), 10 );\n\n var menuHiderH = parseInt( $(\"#menu-container #menu-hider\").height(), 10 );\n var menuHiderIconH = parseInt( $(\"#menu-container #menu-hider #menu-hider-icon\").height(), 10 );\n templateMenuW = menuWidth + menuHider;\n $(\"#menu-hider-icon\").click(menuHideClick);\n $(\"#module-container\").css( \"width\", ($(window).width() - templateMenuW) + \"px\" );\n\n if( $(window).width() > 767){\n $(\"#menu-container\").css('left', -(menuWidth + menuHider + menuHiderIcon) + 'px');\n\t\t $(\"#menu-container\").css( 'visibility', 'visible' );\n\n $(\"#menu-hider\").css( 'display', 'inline' );\n $(\"#menu-hider\").css( 'visibility', 'visible' );\n\n /*start-up animation*/\n $(\"#module-container\").css( \"opacity\", 1 );\n \t\t$(\"#module-container\").css( \"left\", menuWidth + menuHider + \"px\" );\n\n $(\"footer\").css( 'display', 'inline' );\n\t\t TweenMax.to( $(\"#menu-container\"), .4, { css:{left: \"0px\"}, ease:Sine.easeInOut, delay: 0.5, onComplete: endStartupAnimation });\n /*end start-up animation*/\n }\n if( $(window).width() <= 767 ){\n templateMenuW = 0;\n var containerH = $(window).height() - (menuHeight + menuHiderH);\n $(\"#menu-container\").css(\"left\", \"0px\");\n $(\"#menu-container\").css(\"top\", -(menuHeight + menuHiderH + menuHiderIconH) + \"px\");\n\t\t $(\"#menu-container\").css( \"visibility\", \"visible\" );\n\n $(\"#menu-hider\").css( \"display\", \"inline\" );\n $(\"#menu-hider\").css( \"visibility\", \"visible\" );\n\n /*start-up animation*/\n $(\"#module-container\").css( \"opacity\", \"1\" );\n \t\t$(\"#module-container\").css( \"left\", \"0px\" );\n $(\"#module-container\").css( \"top\", (menuHeight + menuHiderH) + \"px\" );\n $(\"#module-container\").css( \"height\", containerH );\n\n\t\t TweenMax.to( $(\"#menu-container\"), .4, { css:{top: \"0px\"}, ease:Sine.easeInOut, delay: 0.5, onComplete: endStartupAnimation });\n /*end start-up animation*/\n }\n $(\"#template-smpartphone-menu select\").change(\n function(){\n var customURL = $(this).val();\n if( customURL.indexOf(\"http://\") != -1 ){\n //window.open( customURL, \"_blank\" );\n var custA = '<a id=\"mc-link\" href=\"' + customURL + '\" style=\"display:none;\" target=\"_blank\" />';\n $(\"#template-smpartphone-menu select\").append(custA);\n\n var theNode = document.getElementById('mc-link');\n fireClick(theNode);\n $(\"#template-smpartphone-menu select\").find(\"#mc-link\").remove();\n\n return;\n }\n if( $(this).val() != urlCharDeeplink){\n menuOptionOut(menuOptionID, submenuOptionID, undefined);\n var hashURL = updateMenu( $(this).val(), prevURL, undefined, false);\n window.location.hash = hashURL;\n }\n });\n function fireClick(node){\n \tif ( document.createEvent ) {\n \t\tvar evt = document.createEvent('MouseEvents');\n \t\tevt.initEvent('click', true, false);\n \t\tnode.dispatchEvent(evt);\n \t} else if( document.createEventObject ) {\n \t\tnode.fireEvent('onclick') ;\n \t} else if (typeof node.onclick == 'function' ) {\n \t\tnode.onclick();\n \t}\n }\n }", "function displayNightChoice() {\r\n screens.removeClass('active');\r\n nightScreen.addClass('active');\r\n}", "function toggleTransition() {\n if (device.matches) {\n nav.classList.add(\"notransition\");\n } else {\n nav.classList.remove(\"notransition\");\n }\n }", "onClickScene_() {\n this.portraitToggleScene(true, true);\n }", "function ofChangePage() {\n\tcurrent = getCurrentFromHash(); \n\tloadCurrentShader();\n\tstartFade();\n\n}", "function returnToMain(){\n teleMode = false;\n console.log('reutrn to main');\n fadeAll();\n game.time.events.add(500, function() {\n game.state.start('startScreen');\n }, this);\n}", "onMove() {\n }", "function toMenu() {\n\tclearScreen();\n\tviewPlayScreen();\n}", "function finitoScreen(winClass,text){\r\n $finalScreen.addClass(winClass);\r\n $('.message').text(text)\r\n $finalScreen.show();\r\n $boardScreen.hide();\r\n\r\n }", "function Win(){\n\t\tif (p1lives == 0){\n\t\t\tscreen = 8;\n\t\t}else if(p2lives == 0){\n\t\t\tscreen = 8;\n\t\t}\n\t}", "enterFullScreen() {\n }", "enterFullScreen() {\n }", "enterFullScreen() {\n }", "visualEffectOnActivation() {\n this.transitionEndListenerOn();\n this.changeColour(this.colourGo);\n this.scale(0.97);\n }", "function startup() {\n\tsceneTransition(\"start\");\n}", "function show(){\n Wscreen = window.document.body.clientWidth;\n if(Wscreen<1199){\n message.animate({left:\"0%\",top:\"100%\",opacity:\"1.0\",width:\"100%\",height:\"auto\",zIndex:\"2\"},2000);//2000\n timer = setInterval(OUT, 7500);//000\n }\n if(Wscreen>1199){\n message.animate({left:\"120%\",top:\"-13px\",opacity:\"1.0\",zIndex:\"2\"},2000);//2000\n timer = setInterval(OUT, 7500);//000\n }\n }", "function Start() {\n\tscreenRect = Rect(0,0,Screen.width, Screen.height);\n}", "function Screen() {\n}", "function setBackToNoraml() {\n liveFloorview.style.transform = 'scale(.4)';\n liveFloorview.style.opacity = '0';\n workstation.style.transform = 'translateX(100%)'\n}", "function switchScreen(idToHide, idToReveal) {\n document.getElementById(idToHide).classList.remove('is-visible');\n document.getElementById(idToReveal).classList.add('is-visible');\n}", "function draw_presentsScreen() {\n \tif ( defaultFalse( currentPart.presents ) ) \t\n \t\tpresentsScreen.show();\n \telse \n \t\tpresentsScreen.hide();\n }", "function go_black() { \n var s2=gl.GetMidLay();\n var sh=s2.GetVisibility().toLowerCase();\n //alert(sh);\n if (sh=='show') {\n s2.SetVisibility('hide');\n gl.LinkBtn('screen',go_black,'SCRN ON');\n }\n else {\n s2.SetVisibility('show');\n gl.LinkBtn('screen',go_black,'SCRN OFF');\n }\n}", "transitionToTutorial() {\n if (this.tick <= 50) {\n this.logo.alpha -= 0.02;\n this.pressAnyKey.alpha -= 0.02;\n this.titleText.alpha -= 0.02;\n }\n else if (this.tick <= 100) {\n this.tutorial.alpha += 0.02;\n }\n else {\n this.state = 2;\n this.tick = 0;\n this.fireToContinue.setAlpha(1);\n }\n }", "function redraw(){\n\tscreenManager[screenManager.length - 1].update();\n}", "function largeScreen(mediaScreen) {\n nav = document.querySelector('#nav_house')\n //If screen size is more than 800px\n if (mediaScreen.matches) { // If media query matches\n nav.style.animationName = 'expand';\n nav.style.animationDuration = '1s';\n nav.style.animationPlayState = 'forwards'\n nav.style.display = 'block';\n nav.addEventListener('animationend', function(){\n nav.style.display = 'block';\n })\n nav.style.display = 'block';\n } \n //else If screen size is less than 800px\n else{\n nav.style.animationName = 'contract';\n nav.style.animationDuration = '1s';\n nav.style.animationPlayState = 'forwards'\n nav.addEventListener('animationend', function(){\n nav.style.display = 'none';\n })\n }\n \n }", "function mobileIntroScreen() {\n\n instructionsScreen = new createjs.Container();\n\n var panelBG = new createjs.Bitmap(queue.getResult(\"panel\"));\n panelBG.x = 0;\n panelBG.y = 50;\n\n titleText = new createjs.Text(gameData.Title, \" Bold 18px Comic Sans MS\", \"#000000\");\n titleText.x = panelBG.x + 130;\n titleText.y = panelBG.y + 75;\n titleText.lineWidth = 560;\n\n\n //var shadow = new createjs.Shadow(\"#000\", 0, 0, 3);\n //titleText.shadow = shadow;\n\n //createjs.Tween.get(shadow, { loop: true })\n //.to({ offsetX: 10, offsetY: 10, blur: 20 }, 1000, createjs.Ease.quadInOut)\n //.to({ offsetX: 0, offsetY: 0, blur: 0 }, 1000, createjs.Ease.quadInOut);\n\n\n\n var descriptionText = new createjs.Text(gameData.Description, \"17px Comic Sans MS\", \"#000000\");\n descriptionText.x = panelBG.x + 130;\n descriptionText.y = panelBG.y + 140;\n descriptionText.lineWidth = 550;\n\n\n var directionsText = new createjs.Text(\"Directions: Touch Directional Arrow Buttons to move along the ship.\" +\n \"\\nHarpoons will fire every 2 seconds.\\nEliminate squids for treasure.\" +\n \"\\nIf the pirate gets hit by the ink, you will need to answer a question.\" +\n \"\\nIf the pirate runs out of harpoons, you will need to answer a question.\", \"16px Comic Sans MS\", \"#000000\");\n directionsText.x = panelBG.x + 130;\n directionsText.y = panelBG.y + 280;\n directionsText.lineWidth = 400;\n\n //var logo = new createjs.Bitmap(queue.getResult(\"logo\"))\n // logoContainer.alpha = 0;\n //createjs.Tween.get(logoContainer).wait(500).to({ alpha: 1, visible: true }, 1000).call(handleComplete);\n //function handleComplete() {\n // // self.stage.addChild(logoContainer)\n //}\n\n //logoContainer.regX = 180;\n //logoContainer.regY = 60;\n //logoContainer.x = panelBG.x + 220;\n //logoContainer.y = panelBG.y + 305;\n //logoContainer.scaleX = logoContainer.scaleY = 0.30;\n\n //add a tween\n var shadow = new createjs.Shadow(\"#000\", 0, 0, 3);\n\n createjs.Tween.get(shadow, { loop: false })\n .to({ offsetX: 10, offsetY: 10, blur: 20 }, 1500, createjs.Ease.quadInOut)\n // .to({ offsetX: 0, offsetY: 0, blur: 0 }, 1500, createjs.Ease.quadInOut);\n\n \n instructionsScreen.addChild(panelBG, titleText, descriptionText, directionsText);\n\n\n var soundContain = createSoundContainer();\n\n self.stage.addChild(instructionsScreen);\n self.stage.addChild(soundContain);\n\n var playButton = new createjs.Bitmap(queue.getResult(\"playbutton\"))\n\n playButton.regX = 93;\n playButton.regY = 95;\n playButton.x = panelBG.x + 600;\n playButton.y = panelBG.y + 400;\n playButton.scaleX = playButton.scaleY = 0.20;\n\n createjs.Tween.get(playButton, {\n loop: false\n }).to({\n rotation: 360,\n scaleX: .4,\n scaleY: .4\n }, 2000);\n\n instructionsScreen.addChild(playButton);\n\n playButton.addEventListener(\"click\", handleClickPlay);\n\n function handleClickPlay(event) {\n instructionsScreen.removeChild(playButton);\n self.stage.removeChild(instructionsScreen);\n isMobile = true;\n playBass();\n StartInteraction();\n\n\n };\n\n // titleText.shadow = shadow;\n playButton.shadow = shadow;\n // logoContainer.shadow = shadow;\n panelBG.shadow = shadow;\n\n\n // if (isGamePaused == true) {\n backText = new createjs.Text(\"Back\", \"Bold 20px Comic Sans MS\", \"#000000\");\n backText.x = instructionsScreen.x + 450;\n backText.y = instructionsScreen.y + 450;\n backText.hitArea = new createjs.Shape(new createjs.Graphics().beginFill(\"#FFF\").drawRoundRect(0, 0, 100, 40, 50));\n // self.stage.addChild(backText);\n // backText.alpha = 0;\n\n backText.addEventListener(\"click\", handleClick);\n\n backText.on(\"mouseover\", handleButtonHover);\n backText.on(\"mouseover\", function (evt) {\n evt.currentTarget.color = \"white\";\n });\n\n backText.on(\"mouseout\", handleButtonHover);\n backText.on(\"mouseout\", function (evt) {\n evt.currentTarget.color = \"black\";\n })\n\n\n function handleClick(event) {\n //self.stage.removeChild(backText);\n self.stage.removeChild(instructionsScreen);\n resumeTheGame();\n }\n // }\n\n\n }", "function map_trans_wis() {\n current_background = Graphics[\"background2\"];\n actors.push( new BigText(\"Level 1 Complete\") );\n actors.push( new SubText(\"Hmmm... Gurnok must be close.\", 330) );\n actors.push( new Continue(\"Click to continue!\", map_wizard1) );\n }", "function sectionsScreen() {\r\n if ( isAutoplay ){\r\n play();//Stop autoplay if active\r\n }\r\n \r\n if ( !showingSections ){\r\n $(\"#sectionsFrame\").css(\"visibility\", \"visible\");\r\n showingSections = true;\r\n } else{\r\n $(\"#sectionsFrame\").css(\"visibility\", \"hidden\");\r\n showingSections = false;\r\n }\r\n \r\n }", "onClickUnderlay_() {\n this.portraitToggleScene(false, true);\n }", "static showGreeting() {\n const currentScreen = mainScreen.firstElementChild;\n const greeting = new GreetingScreen();\n const onElementAnimationEnd = () => {\n central.classList.remove(`central--animate-screens`);\n central.classList.remove(`central--stack-screens`);\n\n currentScreen.removeEventListener(`animationend`, onElementAnimationEnd);\n mainScreen.removeChild(currentScreen);\n greeting.changeScreen();\n };\n\n central.classList.add(`central--stack-screens`);\n currentScreen.addEventListener(`animationend`, onElementAnimationEnd);\n mainScreen.appendChild(greeting.element);\n central.classList.add(`central--animate-screens`);\n\n }", "function switchGameState(){\n switch(gameState.scene) {\n\n \t\t\tcase \"pause\":\n \t\t\t\trenderer.render( pauseScreen, pauseCam );\n \t\t\t\tbreak;\n\n \t\t\tcase \"start\":\n \t\t\t\trenderer.render( startScreen, startCam );\n \t\t\t\tbreak;\n\n \t\t\tcase \"gameover\":\n \t\t\t\trenderer.render( gameOver, overCam );\n \t\t\t\tbreak;\n\n case \"end\":\n \t\t\t\trenderer.render( endScreen, endCam );\n \t\t\t\tbreak;\n\n \t\t\tcase \"main\":\n updateCamera();\n cameraZoom();\n updateCharacter();\n animateParticles(snow1);\n animateParticles(snow2);\n animateParticles(snow3);\n animateParticles(snow4);\n\t\t updateStory();\n scene.simulate();\n\n\n // Will be removed with devCamera at another time\n // renderer.render( scene, camera );\n if (devCameraActive){\n renderer.render( scene, devCamera );\n }else {\n renderer.render( scene, camera );\n }\n \t\t\t\tbreak;\n\n \t\t\tdefault:\n \t\t\t console.log(\"don't know the scene \"+gameState.scene);\n \t\t}\n }", "function animation() {\r\n switchOn();\r\n switchOff();\r\n}", "function pageTransition(target) {\n let targetpage = target;\n setTimeout(\n function() {\n let outpage = document.getElementById(currentpage);\n let inpage = document.getElementById(targetpage);\n\n currentpage = targetpage;\n\n outpage.classList.add(\"leftout\");\n outpage.classList.add(\"ontop\");\n\n inpage.classList.add(\"pagecurrent\");\n inpage.classList.add(\"leftin\");\n\n setTimeout(\n function() {\n outpage.classList.remove(\"pagecurrent\");\n outpage.classList.remove(\"leftout\");\n outpage.classList.remove(\"ontop\");\n\n inpage.classList.remove(\"leftin\");\n\n window.location = \"#\"\n }, 800);\n }, 200);\n}", "function ArrowViewStateTransition() {}", "function changeScene(direction) {\n let nextScene = destinationMap[currentScene][direction];\n console.log(`next Scene: ${nextScene}`);\n updateNavigation(nextScene);\n removeInteractables(\"hidden\");\n drawSceneHiddenInteractables(nextScene);\n console.log(`current hidden: ${currentHiddenInteractables}`);\n removeInteractables(\"visible\");\n drawSceneInteractables(nextScene);\n console.log(`current shown: ${currentInteractables}`);\n canvas.requestRenderAll();\n}", "function begin(){\n \n scene.classList.remove(\"hide\");\n scene.classList.add(\"show\");\n \n preload.classList.add(\"hide\");\n preload.classList.remove(\"show\");\n \n}", "function showNextScene() {\n // clear screen\n ((sceneCount + sceneIndex) + 0.5) % sceneCount\n}", "function toWorld(){\r\n endChar1.style.display=\"none\";\r\n endChar2.style.display=\"none\";\r\n lastSceneTxt.style.display=\"block\";\r\n lastScene.style.backgroundImage = \"url('images/worldMap.png')\";\r\n lastFormWrapper.style.display=\"block\";\r\n lastSceneBgMusic.play();\r\n}", "function addScreen(){\n\n\tvar xValue = 2*xCord;\n\tif(green===0){\n\t\txValue++;\n\t}\n\t\n\tscreen[xValue]=screen[xValue]|Math.pow(2,yCord);\n\tif(green===2){\n\tscreen[xValue+1]=screen[xValue+1]|Math.pow(2,yCord);\n\t}\n\tdoScreen();\n\t\n}", "function pageTransitionInit() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('body[data-ajax-transitions=\"true\"]').length > 0 && $('#ajax-loading-screen[data-method=\"standard\"]').length > 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('html').addClass('page-trans-loaded');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Fade loading animation\r\n\t\t\t\t\t\tif ($('#ajax-loading-screen[data-effect=\"standard\"]').length > 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($('.nectar-particles').length == 0) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$loadingScreenEl.transition({\r\n\t\t\t\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t\t\t\t}, 500, function () {\r\n\t\t\t\t\t\t\t\t\t$(this).css({\r\n\t\t\t\t\t\t\t\t\t\t'display': 'none'\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t$('#ajax-loading-screen .loading-icon').transition({\r\n\t\t\t\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t\t\t\t}, 500);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Bind waypoints after loading screen has left\r\n\t\t\t\t\t\t\tif ($('.nectar-box-roll').length == 0) {\r\n\t\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\t\twaypoints();\r\n\t\t\t\t\t\t\t\t}, 550);\r\n\t\t\t\t\t\t\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\r\n\t\t\t\t\t\t// Swipe loading animation\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($('#ajax-loading-screen[data-effect*=\"horizontal_swipe\"]').length > 0) {\r\n\t\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\t\t$loadingScreenEl.addClass('loaded');\r\n\t\t\t\t\t\t\t\t}, 60);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($('#page-header-wrap #page-header-bg[data-animate-in-effect=\"zoom-out\"] .nectar-video-wrap').length == 0) {\r\n\t\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\t\t$('#ajax-loading-screen:not(.loaded)').addClass('loaded');\r\n\t\t\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\t\t\t$loadingScreenEl.addClass('hidden');\r\n\t\t\t\t\t\t\t\t\t}, 1000);\r\n\t\t\t\t\t\t\t\t}, 150);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\r\n\t\t\t\t\t\t\t// Bind waypoints after loading screen has left\r\n\t\t\t\t\t\t\tif ($('.nectar-box-roll').length == 0 && $('#ajax-loading-screen[data-effect*=\"horizontal_swipe\"]').length > 0) {\r\n\t\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\t\twaypoints();\r\n\t\t\t\t\t\t\t\t}, 750);\r\n\t\t\t\t\t\t\t} else if ($('.nectar-box-roll').length == 0) setTimeout(function () {\r\n\t\t\t\t\t\t\t\twaypoints();\r\n\t\t\t\t\t\t\t}, 350);\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\r\n\t\r\n\t\t\t\t\t\t// Safari back/prev fix\r\n\t\t\t\t\t\tif (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1 || \r\n\t\t\t\t\t\tnavigator.userAgent.match(/(iPod|iPhone|iPad)/)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twindow.onunload = function () {\r\n\t\t\t\t\t\t\t\t$loadingScreenEl.stop().transition({\r\n\t\t\t\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t\t\t\t}, 800, function () {\r\n\t\t\t\t\t\t\t\t\t$(this).css({\r\n\t\t\t\t\t\t\t\t\t\t'display': 'none'\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t$('#ajax-loading-screen .loading-icon').transition({\r\n\t\t\t\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t\t\t\t}, 600);\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\twindow.onpageshow = function (event) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (event.persisted) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$loadingScreenEl.stop().transition({\r\n\t\t\t\t\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t\t\t\t\t}, 800, function () {\r\n\t\t\t\t\t\t\t\t\t\t$(this).css({\r\n\t\t\t\t\t\t\t\t\t\t\t'display': 'none'\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t$('#ajax-loading-screen .loading-icon').transition({\r\n\t\t\t\t\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t\t\t\t\t}, 600);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\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\r\n\t\t\t\t\t\telse if (navigator.userAgent.indexOf('Firefox') != -1) {\r\n\t\t\t\t\t\t\twindow.onunload = function () {};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Remove excess loading images if using page transitions.\r\n\t\t\t\t\t\t$('.portfolio-loading, .nectar-slider-loading .loading-icon').remove();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('#ajax-loading-screen[data-disable-fade-on-click=\"1\"]').length == 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($('body.using-mobile-browser #ajax-loading-screen[data-method=\"standard\"][data-disable-mobile=\"1\"]').length == 0) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tvar ignore_onbeforeunload = false;\r\n\t\t\t\t\t\t\t\t$('a[href^=\"mailto\"], a[href^=\"tel\"]').on('click', function () {\r\n\t\t\t\t\t\t\t\t\tignore_onbeforeunload = true;\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\twindow.addEventListener('beforeunload', function () {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (!ignore_onbeforeunload) {\r\n\t\t\t\t\t\t\t\t\t\t$loadingScreenEl.addClass('set-to-fade');\r\n\t\t\t\t\t\t\t\t\t\ttransitionPage();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tignore_onbeforeunload = false;\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\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\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// No page transitions\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('.nectar-box-roll').length == 0 && !nectarDOMInfo.usingFrontEndEditor) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Waypoints.\r\n\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\twaypoints();\r\n\t\t\t\t\t\t\t}, 100);\r\n\t\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\t\r\n\t\r\n\t\t\t\t\tfunction transitionPage() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('#ajax-loading-screen[data-effect*=\"horizontal_swipe\"]').length > 0) {\r\n\t\t\t\t\t\t\t$loadingScreenEl.removeClass('loaded');\r\n\t\t\t\t\t\t\t$loadingScreenEl.addClass('in-from-right');\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\t$loadingScreenEl.addClass('loaded');\r\n\t\t\t\t\t\t\t}, 30);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif ($('#ajax-loading-screen[data-effect=\"center_mask_reveal\"]').length > 0) {\r\n\t\t\t\t\t\t\t\t$loadingScreenEl.css('opacity', '0').css('display', 'block').transition({\r\n\t\t\t\t\t\t\t\t\t'opacity': '1'\r\n\t\t\t\t\t\t\t\t}, 450);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$loadingScreenEl.show().transition({\r\n\t\t\t\t\t\t\t\t\t'opacity': '1'\r\n\t\t\t\t\t\t\t\t}, 450);\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\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function instructionScreen() {\n\n image(introScreenBackground, introScreenBackgroundSpec.x, introScreenBackgroundSpec.y, introScreenBackgroundSpec.w, introScreenBackgroundSpec.h);\n\n rainRun();\n\n lightningGenerator();\n\n push();\n noFill();\n noStroke();\n rect(whyStartAnimHitbox.x, whyStartAnimHitbox.y, whyStartAnimHitbox.w, whyStartAnimHitbox.h);\n pop();\n\n animation(whyStartAnim, whyStartAnimSpec.x, whyStartAnimSpec.y);\n howToAnim.frameDelay = howToAnimSpec.delay;\n animation(howToAnim, howToAnimSpec.x, howToAnimSpec.y);\n animation(controlAnim, controlAnimSpec.x, controlAnimSpec.y);\n\n}", "function displayIntroScreen() {\n image(imgIntroScreen, 0, 0, windowWidth, windowWidth * 0.4);\n\n}" ]
[ "0.7228065", "0.68756604", "0.66280717", "0.65813714", "0.6488404", "0.6467372", "0.63804454", "0.63777447", "0.63670814", "0.635821", "0.635145", "0.6349439", "0.6342494", "0.6310967", "0.6285092", "0.6263857", "0.6247979", "0.622968", "0.62223476", "0.619578", "0.6182944", "0.6165396", "0.6159105", "0.61556077", "0.61423594", "0.61281735", "0.6119679", "0.61167216", "0.6110109", "0.6103311", "0.60924536", "0.6076181", "0.6069272", "0.6057871", "0.6050932", "0.6050284", "0.60453504", "0.6025909", "0.60089135", "0.5998767", "0.5995129", "0.5992647", "0.59730935", "0.5968122", "0.59548384", "0.5953758", "0.5953308", "0.5939735", "0.5936382", "0.5925561", "0.5921034", "0.59194356", "0.59194356", "0.5915726", "0.59082985", "0.5899908", "0.58991396", "0.5898579", "0.58981794", "0.5891254", "0.5889075", "0.5886552", "0.5875889", "0.58705723", "0.58684325", "0.58678424", "0.58676964", "0.58658296", "0.58653075", "0.5862389", "0.5862389", "0.5862389", "0.5859913", "0.5859379", "0.5856823", "0.5848326", "0.5847207", "0.5844503", "0.583988", "0.5832707", "0.5825469", "0.5820217", "0.58193445", "0.5807803", "0.58077383", "0.58065975", "0.5801902", "0.58014095", "0.57874846", "0.57867044", "0.57856226", "0.57835287", "0.57832104", "0.57823485", "0.5781127", "0.57789046", "0.5778189", "0.57717985", "0.5771408", "0.5765631", "0.5764948" ]
0.0
-1
function to start Game
function setGame(){ // Set title color var newColor = rgb(); $("#title").html(newColor); var rightSquare = makeRanNum(0, numSquares -1); $(".col").each(function(square){ // If rightSquare -> rightColor if(square === rightSquare) { changeBackground($(this), newColor); // add click event for right square $(this).on("click", function(){ changeBackground($(".col"), newColor); $("#message").text("Right answer!"); $("#reset").html("Play again"); }); // else -> random colors } else { // if wrong Square -> random color changeBackground($(this), rgb()); // add click event for wrong square $(this).on("click", function(){ changeBackground($(this), "white"); $("#message").html("Try again!"); }) } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startGame() { }", "function startGame() {\n init();\n}", "function start()\r\n{\r\ninit();\r\ngame.start();\r\n}", "function startGame() {\n\tsetup();\n\tmainLoop();\n}", "function startGame(){\n initialiseGame();\n}", "function start(){\n\t\t //Initialize this Game. \n newGame(); \n //Add mouse click event listeners. \n addListeners();\n\t\t}", "function startGame(){\n\tvar game = new Game();\n\tgame.init();\n}", "function startGame() {\n\n\t\tvar gss = new Game(win.canvas);\n\n\t\t// shared zone used to share resources.\n gss.set('keyboard', new KeyboardInput());\n gss.set('loader', loader);\n\n\t\tgss.start();\n\t}", "function startGame() {\n myGameArea.start();\n}", "function startgame() {\t\r\n\tloadImages();\r\nsetupKeyboardListeners();\r\nmain();\r\n}", "function startGame(){\n getDictionary();\n var state = $.deparam.fragment();\n options.variant = state.variant || options.variant;\n makeGameBoard();\n loadState();\n }", "function start() {\n\tclear();\n\tc = new GameManager();\n\tc.startGame();\t\n}", "function startGame() {\n\tinitGame();\n\tsetInterval(updateGame, 90);\n}", "function startGame() {\n\t\tvar game = document.getElementById(\"game-area\");\n\t\ttimeStart();\t\t\t\t\n\t}", "function startGame() {\n\tupdateGameState()\n\tmoveTetroDown()\n}", "function startGame() {\n\t\t\tvm.gameStarted = true;\n\t\t\tMastermind.startGame();\n\t\t\tcurrentAttempt = 1;\n\t\t\tactivateAttemptRow();\n\t\t}", "function startGame()\r\n{\r\n\tcontext = loadCanvasContext();\r\n\tmarker = loadMarkerCanvas();\r\n\r\n\tif(context && marker)\r\n\t{\r\n\t\tsetArrays();\r\n\t\tisNewRound = false;\r\n\t\tstart();\r\n\t\tsetRound();\r\n\t\tdoSpeeding();\r\n\t\tisNewRound = true;\r\n\t\texplainHowToMove();\r\n\t\tspeed = startingSpeed;\r\n\t\t$(\"#rounds\").text(\"1\");\r\n\t\tchangeInterval(speed);\r\n\t}\r\n\telse\r\n\t{\r\n\t\talert(\"Cannot Load Canvas\");\r\n\t}\r\n}", "function startGame () {\n\tplay = true;\n\n}", "function startGame() {\n if(gameState.gameDifficulty === 'easy')\n {\n easyMode();\n } \n if(gameState.gameDifficulty ==='normal'){\n normalMode();\n }\n\n if(gameState.gameDifficulty ==='hard'){\n hardMode();\n }\n\n}", "function startGame(){\n \t\tGameJam.sound.play('start');\n \t\tGameJam.sound.play('run');\n\t\t\n\t\t// Put items in the map\n\t\titemsToObstacles(true);\n\n\t\t// Create the prisoner path\n\t\tGameJam.movePrisoner();\n\n\t\t// Reset items, we dont want the user to be able to drag and drop them\n \t\tGameJam.items = [];\n \t\t\n \t\tfor (var item in GameJam.levels[GameJam.currentLevel].items) {\n \t\t\tGameJam.levels[GameJam.currentLevel].items[item].count = GameJam.levels[GameJam.currentLevel].items[item].countStart;\n \t\t}\n\n\t\t// Reset prisoner speed\n\t\tGameJam.prisoner[0].sprite.speed = 5;\n\n\t\t// Reset game time\n\t\tGameJam.tileCounter = 0;\n\t\tGameJam.timer.className = 'show';\n\t\tdocument.getElementById('obstacles').className = 'hide';\n\t\tdocument.getElementById('slider').className = 'hide';\n\t\tdocument.getElementById('start-button-wrapper').className = 'hide';\n\n\t\t// Game has started\n\t\tGameJam.gameStarted = true;\n\n\t\tGameJam.gameEnded = false;\n\n\t\tdocument.getElementById('static-canvas').className = 'started';\n\n\t\tconsole.log('-- Game started');\n\t}", "function startGame() {\n logger.log('Staring a new game');\n // Hide any dialog that might have started this game\n $('.modal').modal('hide');\n\n // Reset the board\n board.init();\n\n // Init the scores\n level = 1;\n score = 0;\n totalShapesDropped = 1;\n delay = 500; // 1/2 sec\n updateUserProgress();\n\n // Init the shapes\n FallingShape = previewShape;\n previewShape = dropNewShape();\n\n // Reset game state\n drawPreview();\n pauseDetected = false;\n isPaused = false;\n isGameStarted = true;\n isStopped = false;\n\n // Update the button if this is the first game\n $('#newGameButton').text(\"New Game\");\n\n // Start dropping blocks\n advance();\n }", "function startGame() {\n incrementGameStep({ gameId, gameData });\n }", "function startGame() {\n (new SBar.Engine()).startGame();\n}", "function startGame(mapName = 'galaxy'){\n toggleMenu(currentMenu);\n if (showStats)\n $('#statsOutput').show();\n $('#ammoBarsContainer').show();\n scene.stopTheme();\n scene.createBackground(mapName);\n if (firstTime) {\n firstTime = false;\n createGUI(true);\n render();\n } else {\n requestAnimationFrame(render);\n }\n}", "function startGame() {\n\t\tstatus.show();\n\t\tinsertStatusLife();\n\t\tsetLife(100);\n\t\tsetDayPast(1);\n\t}", "function startGame(){\n hideContent();\n unhideContent();\n assignButtonColours();\n generateDiffuseOrder();\n clearInterval(interval);\n setlevel();\n countdown(localStorage.getItem(\"theTime\"));\n listeningForClick();\n}", "function startGame(){\n countdown();\n question();\n solution();\n }", "startGame() {\n //@todo: have this number set to the difficulty, easy = 3, normal = 6, hard = 9\n StateActions.onStart(5, 5, this.state.difficulty);\n StateStore.setGameState(1);\n this.gameState();\n }", "function init() {\n gameStart();\n}", "function loadGame(){\n myGameArea.start();\n}", "function StartGame()\r\n {\r\n\r\n\t\r\n\tinit();\r\n\tanimate();\t\r\n\t}", "function startGame() {\n //init the game\n gWorld = new gameWorld(6);\n gWorld.w = cvs.width;\n gWorld.h = cvs.height;\n \n gWorld.state = 'RUNNING';\n gWorld.addObject(makeGround(gWorld.w, gWorld.h));\n gWorld.addObject(makeCanopy(gWorld.w));\n gWorld.addObject(makeWalker(gWorld.w, gWorld.h));\n gWorld.addObject(makeWalker(gWorld.w, gWorld.h,true));\n gWorld.addObject(makePlayer());\n \n startBox.active = false;\n pauseBtn.active = true;\n soundBtn.active = true;\n touchRightBtn.active = true;\n touchLeftBtn.active = true;\n replayBtn.active = false;\n \n gameLoop();\n }", "function startGame () {\n if (!gameStarted) { // ensure setInterval only fires once\n setInterval(countdown, 1000)\n generateList() // start game generates first order, subsequent order generated by serve\n setTimeout(gameOver, 90000) // cause endGameOverlay DOM\n }\n gameStarted = true\n removeStartScreen() //remove instructions\n createBoard() //create title and bottom burger in playArea\n }", "function startGame() {\n isGameOver = false\n setUpGame()\n alienMoveTimer = setInterval(moveAliens, 1)\n gameTimer = setInterval(playGame, 1000)\n }", "function startGame()\n{\n\tconsole.log(\"startGame()\");\n\n\taddEvent(window, \"keypress\", keyPressed);\n\n\tfor(var i = 0; i < app.coverImgArr.length; i++)\n\t\tapp.coverImgArr[i].style.visibility = 'visible';\n\n\tinitBgImg();\n\tinitTileImg();\n\tinitCoverImg();\n\n\tapp.startBtn.disabled = true;\n\tapp.endBtn.disabled = false;\n\n\tfor(var i = 0; i < app.coverImgArr.length; i++){\n\t\taddEvent(app.coverImgArr[i], \"click\", tileClick);\n\t}\n}", "function startGame() {\n\tinitGlobals();\n\n\t//set the game to call the 'update' method on each tick\n\t_intervalId = setInterval(update, 1000 / fps);\n}", "function startGame () {\n const deck = freshDeck()\n shuffleDeck(deck)\n const deckMidpoint = Math.ceil(deck.length / 2)\n // setPlayerDeck(deck.slice(0, deckMidpoint))\n // setComputerDeck(deck.slice(deckMidpoint, deck.length))\n setPlayerDeck(deck.slice(0, 3))\n setComputerDeck(deck.slice(3, 6))\n console.log(\"started Game\");\n setStart(true);\n setDoneWithGame(false);\n\n\n }", "function startGame() {\n if (isGameRunning) return;\n isGameRunning = true;\n hideAllMenus();\n setupScore();\n updateScoreDisplay();\n shootBulletsRandomlyLoop();\n}", "function startGame() {\n\n game.updateDisplay();\n game.randomizeShips();\n $(\"#resetButton\").toggleClass(\"hidden\");\n $(\"#startButton\").toggleClass(\"hidden\");\n game.startGame();\n game.updateDisplay();\n saveGame();\n}", "function startGame() {\n removeSplashScreen();\n if (gameOverScreen) {\n removeGameOverScreen();\n } else if (youWinScreen){\n removeYouWinScreen();\n }\n createGameScreen();\n\n game = new Game(gameScreen);\n game.start();\n}", "startGame() {\r\n\t\tthis.board.drawHTMLBoard();\r\n\t\tthis.activePlayer.activeToken.drawHTMLToken();\r\n\t\tthis.ready = true;\r\n\t}", "StartGame(player, start){\n this.scene.start('level1');\n }", "function on_load()\n{\n\tgame.start();\n}", "function GameStart() {\n\tGenerateCharacter();\n\tCreateTileGrid();\n\tCreateGraphicsGrid();\n\tCreateNoteGrid();\n\tGenerateDungeon();\n\tRoundTimer();\n}", "function startGame(){\n gBoard = buildBoard()\n renderBoard(gBoard)\n placeMines()\n setMinesNegsCount(gBoard)\n openNegs(gBoard, gGame.safeCell.i, gGame.safeCell.j)\n renderBoard(gBoard)\n startTimer()\n}", "startGame () {\n game.state.start('ticTac')\n }", "function start(){\n initializeBoard();\n playerTurn();\n }", "function gameStart(){\n\t\tplayGame = true;\n\t\tmainContentRow.style.visibility = \"visible\";\n\t\tscoreRow.style.visibility = \"visible\";\n\t\tplayQuitButton.style.visibility = \"hidden\";\n\t\tquestionPool = getQuestionPool(answerPool,hintPool);\n\t\tcurrentQuestion = nextQuestion();\n}", "function startGame()\n{\n\tcreateDeck();\n\tshuffleDeck();\n\tcreatePlayers(2);\n\n\tdrawCard(0, 0);\n\tdrawCard(1, 0);\n\tdrawCard(0, 0);\n\tdrawCard(1, 0);\n\n\n\n\tdisplayCards();\n\tdisplayOptions();\n}", "function startGame() {\n //hide the deal button\n hideDealButton();\n //show the player and dealer's card interface\n showCards();\n //deal the player's cards\n getPlayerCards();\n //after brief pause, show hit and stay buttons\n setTimeout(displayHitAndStayButtons, 2000);\n }", "function startTheGame() {\n if (opponentReady) {\n startNewRound();\n }\n }", "function startGame() {\n createAnsArray();\n playAnswer();\n }", "function startNewGame() {\n const newGame = new GameLoop();\n newGame.startGame(true);\n}", "function StartNewGame() {\n\tsnowStorm.stop();\n\tsnowStorm.freeze();\n\n\tvar params = {\n\t\tchosen: \"riley\"\n\t};\n\n\t_gameObj = new Game();\n\t_gameObj.SetupCanvas(params);\n\t$j(window).resize(function () {\n\t\t_gameObj.SetupCanvas(params);\n\t});\n\n\t$j.mobile.changePage($j('#game'));\n}", "function startGame(){\n startScene.visible = false;\n helpScene.visible = false;\n gameOverScene.visible = false;\n gameScene.visible = true;\n\n //Reset starting variables\n //startTime = new Date;\n time = 0;\n slowTime = 10000; //in milliseconds\n player.x = 640;\n player.y = 360;\n activated = false;\n spawnTime = 0;\n createCircles(5);\n updateTime(time);\n updateSlow(slowTime);\n\n paused = false;\n}", "function startGame(){\n gameArea.start();\n debuggerLog(\"The game has started!\");\n}", "function startGame() {\n\t// Set variables\n\tpreviousNum = null;\n\tgameOn = true;\n\tguessedArray = [];\n\tletterString = \"\";\n\t// Clear displays\n\tclearWord();\n\tclearScreen();\n\tclearScore();\n\tupdateScore();\n\t// Set displays and media\n\tsetMedia();\n\tgetRandomNum();\n\tgetWord();\n\tdisplayWord();\n\n}", "function startGame() {\n\tdisplayCharacterStats(null);\n\n\treturn;\n}", "function startGame() {\n lobby.hide();\n game.start();\n animate();\n}", "function gamestart() {\n\t\tshowquestions();\n\t}", "start() {\n\t\tthis.emit(\"game_start\");\n\t}", "function start() {\n room.sendToPeers(GAME_START);\n onStart();\n}", "function startGame() {\n pairMovieWithSounds();\n randomSounds(movie);\n addPhraseToDisplay();\n keyboardSetup();\n}", "function startGame() {\n gameScreen=1;\n}", "function startGame() {\n hideStart();\n hideSaveScoreForm();\n resetFinalScore();\n clearCurrentQuestion();\n resetUserScore();\n displayCurrentQuestion();\n startTimer();\n}", "function startRandomGame() {\n\n}", "function begin_game(){\n\tload_resources();\n\tController = new Control();\n\n\tPlayerGame = new Game(ctx, gameWidth, gameHeight, 10);\t\t// (context, x_boundary, y_boundary, ms_delay)\n\tPlayerGame.clearColor = \"rgb(50,43,32)\";\n\tCurrPlayer = new Player(50, 400);\t\t\t\t// (x-position, y-position)\n\n\tloadGame();\n\tframe();\n}", "function startGame() {\n console.log('start button clicked')\n $('.instructions').hide();\n $('.title').show();\n $('.grid_container').show();\n $('.score_container').show();\n $('#timer').show();\n // soundIntro('sound/Loading_Loop.wav');\n }", "function startPlayerGame(){\r\n\t\t\t\r\n\t\tdocument.getElementById(\"gameoverTitle\").style.display = 'none';\r\n\t\tdocument.getElementById(\"startTitle\").style.opacity = 0;\r\n\t\t\r\n\t\tlevel = 1;\r\n\t\tlifes = maxLifes;\r\n\t\tscore = 0;\r\n\t\tregisterPlayerGameEvents();\r\n\t\tgame.setLevel(level);\r\n\t\t\r\n\t\t//fade to white -> reset the game -> let the camera look and follow the paddle ->\r\n\t\t//pause the game -> start camera from certain position -> show blocks falling ->\r\n\t\t//fade to normal -> move camera to play position\r\n\t\tfade(0,1,function(){\r\n\t\t\tgame.reset(function(){\r\n\t\t\t\tgame.setCameraLookAtMesh(game.getPaddle().mesh);\r\n\t\t\t\tgame.cameraFollowsPaddle(true);\r\n\t\t\t\t\r\n\t\t\t\tgame.togglePause(function(){\r\n\t\t\r\n\t\t\t\t\tgame.getCamera().setLens(25)\r\n\t\t\t\t\tgame.getCamera().position.x = 0;\r\n\t\t\t\t\tgame.getCamera().position.y = -7;\r\n\t\t\t\t\tgame.getCamera().position.z = 2;\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tanimateBricksFadeIn(function(){\r\n\t\t\r\n\t\t\t\t\t\thud.drawGameStatistics(score,level,lifes);\r\n\t\t\t\t\t\tgame.togglePause();\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t\tfade(1,-1,function(){});\r\n\t\t\t\t\tgame.getComposer().passes[2].copyUniforms.opacity.value = 0.7;\r\n\t\t\t\t\tgame.tweenCamera(Tween.easeInOutQuad,{yTarget:-7,zTarget:6, xTarget:0});\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t}", "function startGame(index){\n\tgamePaused = false;\n\tmapStarted = true;\n}", "function start() {\n\t\t\t/* Stop the engine just in case it's already running. This function is called every time the Launch Button is hit. */\n\t\t\tengine.stop();\n\t\t\t/* Start the engine at 60fps. Why not? This is a simple game, run it at FULL SPEED, CAPTAIN!!! */\n\t\t\tengine.start(1000 / 60);\n\t\t\tdisplay.canvas.addEventListener(\"touchstart\", touchStartDisplay);\n\t\t\twindow.addEventListener(\"resize\", resizeWindow);\n\t\t\tresizeWindow();\n\t\t}", "function playGame() {\n}", "function start () {\n room.sendToPeers(GAME_START)\n onStart()\n}", "startGame() {\n if (this.tick <= 50) {\n this.tutorial.alpha -= 0.02;\n this.fireToContinue.alpha -= 0.02;\n this.bg.alpha -= 0.02;\n this.star.alpha -= 0.02;\n }\n else {\n this.startBgm.stop();\n this.scene.stop();\n this.scene.start('mainGame', { remapped: this.remapped, remapKeys: this.remapKeys });\n }\n }", "startGame() {\n document.getElementById('homemenu-interface').style.display = 'none';\n document.getElementById('character-selection-interface').style.display = 'block';\n this.interface.displayCharacterChoice();\n this.characterChoice();\n }", "function startGame() {\n if(!presence.ballIsSpawned) {\n fill(start.color.c, start.color.saturation, start.color.brightness);\n stroke(start.color.c, start.color.saturation, start.color.brightness)\n if((windowWidth < 600) && (windowHeight < 600)) {\n textSize(20);\n text(\"PRESS ENTER TO START GAME\", windowWidth/4.2, windowHeight/2.5);\n textSize(15);\n text(\"(First to 7 Wins)\", windowWidth * 0.41, windowHeight * 0.47);\n }\n if((windowWidth > 601) && (windowHeight > 601)) {\n textSize(30)\n text(\"PRESS ENTER TO START GAME\", windowWidth * 0.35, windowHeight/2.5);\n textSize(20);\n text(\"(First to 7 Wins)\", start.textX + start.textX * 0.265, windowHeight * 0.44);\n }\n if(mode == 'single'){\n if((windowWidth > 601) && (windowHeight > 601)){\n text(\"Mode: \" + mode, windowWidth * 0.9, windowHeight * 0.08);\n textSize(18);\n text(\"USE ARROWS TO MOVE\", start.textX + start.textX * 0.2, windowHeight * 0.48);\n textSize(14);\n text(\"PRESS SHIFT FOR TWO PLAYER\", start.textX + start.textX * 0.2, windowHeight * 0.52);\n }\n if((windowWidth < 600) && (windowHeight < 600)){\n text(\"Mode: \" + mode, windowWidth * 0.8, windowHeight * 0.08);\n textSize(14);\n text(\"USE ARROWS TO MOVE\", start.textX + start.textX * 0.01, start.textY + start.textY * 0.04);\n textSize(12);\n text(\"PRESS SHIFT FOR TWO PLAYER\", windowWidth * 0.35, start.textY + start.textY * 0.16);\n defaultBallSpeed = 4;\n }\n }\n if(mode == 'two'){\n if((windowWidth > 601) && (windowHeight > 601)) {\n textSize(20);\n text(\"Mode: \" + mode, windowWidth * 0.9, windowHeight * 0.08)\n textSize(18);\n text(\"USE Q, A, P, L TO MOVE\", windowWidth * 0.43, windowHeight * 0.48);\n textSize(14);\n text(\"PRESS SHIFT FOR ONE PLAYER\", start.textX + start.textX * 0.2, windowHeight * 0.52);\n }\n }\n \n start.color.c += 1;\n if(start.color.c > 359) {\n start.color.c = 0;\n }\n }\n }", "function NewGame() {\n\t// Your code goes here for starting a game\n\tprint(\"Complete this method in Singleplayer.js\");\n}", "function gameStart() {\n\t//maybe add gameOverStatus\n\t//initial gameStatus\n\tmessageBoard.innerText = \"Game Start!\\n\" + \"Current Score: \" + counter + \" points\";\n\tcreateBoard();\n\tshuffleCards();\n}", "function startGame () {\n // check to see if everything has been loaded\n let everythingLoaded = true;\n Object.keys(loading).forEach(function (key) {\n if (!loading[key]) everythingLoaded = false;\n });\n\n // only join the Oasis and start ticking/rendering if all game data has been loaded\n if (everythingLoaded) {\n // THE WHOLE GAME HAS LOADED\n joinGame();\n\n // start game loop\n startGameLoop(tick, render, 60);\n }\n}", "function startGame() {\n\t\n\t// fill the question div with new random question\n\tgenerateQuestion();\n\t\n\t// start the timer\n\tmoveProgressBar();\n}", "function startGame(playerCount) {\r\n\t\r\n\tGC.initalizeGame(playerCount);\r\n\t\r\n\tUI.setConsoleHTML(\"The game is ready to begin! There will be a total of \" + GC.playerCount + \" players.<br />Click to begin!\");\r\n\tUI.clearControls();\r\n\tUI.addControl(\"begin\",\"button\",\"Begin\",\"takeTurn()\");\r\n\t\r\n\tGC.drawPlayersOnBoard();\r\n}", "function startGame() {\n water = 0;\n corn = 2;\n beans = 2;\n squash = 2;\n month = 1;\n gameOver = false;\n \n initGameBoard();\n playGame();\n}", "function startGame() {\n removeClicks();\n resetGame();\n addPattern();\n addPattern();\n playPattern();\n}", "function startGame(){\n\t$( \"#button_game0\" ).click(function() {selectGame(0)});\n\t$( \"#button_game1\" ).click(function() {selectGame(1)});\n\t$( \"#button_game2\" ).click(function() {selectGame(2)});\n\tloadRound();\n}", "function startGame() {\n if (!gameInPlay) {\n addSnake()\n addApple(max)\n getFaster = 500\n move = setInterval(snakeMove, getFaster)\n } else {\n clearInterval(move)\n }\n }", "start() {\n this._state = 'RUNNING'\n this._start_time = _.now()\n Logger.info('Enabling the game modes')\n _.forEach(this._games, (game) => game._enable())\n Logger.info(`The game(${this._id}) has started as ${moment(this._start_time).format('l LTS')}...`)\n this.event_manager.trigger('game_start', [this])\n // spectators and players should be handle differently\n this._teams.forEach((team) => team.start())\n }", "function startGame()\r\n{\r\n\t//create the game board based on script parameters\r\n\tboxesClaimed = createArray(\r\n\t\tGAME_GRID_ROWS + BOX_OFFSET,\r\n\t\tGAME_GRID_COLUMNS + BOX_OFFSET\r\n\t);\r\n\r\n\t//show which player's turn it is initially\r\n\talertPlayer(PLAYER_ONE_MARKER);\r\n\r\n\t//return the box grid for testing\r\n\treturn boxesClaimed;\r\n}", "function startGame(){\n var valid = setGame()\n if (valid){\n var elem = document.getElementById(\"alert\");\n elem.innerHTML = `Welcome to the memory game. Change to desired settings and press start to play.`\n elem.style.color = \"black\";\n new MatchGrid( input.width, input.height, input.columns, input.rows, input.timeLimit, input.theme)\n }\n else {\n clearInterval(interval)\n disableGame()\n }\n}", "function startGame(){\n /*\n Start the game.\n */\n bot_enabled = true;\n console.log(\"STARTING\");\n\n // Wait until the conexion is stablished\n start_game();\n setTimeout(update,1000);\n}", "function start(data) {\n startGameTimer();\n}", "function startGame() {\n pacSoundId = setInterval(pacSound, 650)\n countUpid = setInterval(countUp, 1000)\n ghostMoveIdOne = setInterval(function(){\n chooseAndMove(ghostOne)\n }, ghostTimePerMove)\n ghostMoveIdTwo = setInterval(function(){\n chooseAndMove(ghostTwo)\n }, ghostTimePerMove)\n ghostMoveIdThree = setInterval(function(){\n chooseAndMove(ghostThree)\n }, ghostTimePerMove)\n ghostMoveIdFour = setInterval(function(){\n chooseAndMove(ghostFour)\n }, ghostTimePerMove)\n }", "function realStartGame() {\n\t$.unblockUI();\n\n\t//$(\"body\").get(0).style.cursor = \"url('/static/cursor.cur')\";\n\t//$(\"body\").get(0).style.cursor = 'crosshair'; //\"url('/static/cursor.cur')\";\n\t\n\t//$(document).ajaxStop(getAll);\n\tsetTimeout( getAll, 500 );\n\t\n\tsetSelection( null );\n\tsetAction( null );\n\tdrawMap();\n\tshowAllActions( null );\n\t\n\t// Start anims loop\n\tsetInterval( loopObjects, 40 );\n\tsetInterval( loopStatus, 5000 );\n}", "function startGame(freshGame = false) {\n if (freshGame) initState()\n loop()\n}", "function startGame() {\n $controls.addClass(\"hide\");\n $questionWrapper.removeClass(\"hide\");\n showQuestion(0, \"n\");\n points();\n}", "start() {\n if (this.state == STATES.WAITING || this.state == STATES.GAMEOVER) {\n var d = new Date();\n var t = d.getTime();\n this.gameStart = t;\n this.gameStart2 = t;\n this.gameMode = this.scene.gameMode;\n this.gameLevel = this.scene.gameLevel;\n this.makeRequest(\"initialBoard\", this.verifyTabReply);\n this.timeleft = TIME_LEFT;\n this.SaveForMovie();\n // if (this.state == STATES.DISPLAYED) {\n this.state = STATES.READY_TO_PICK_PIECE;\n //}\n }\n }", "function startGame() {\n shuffleDeckEn(); //shuffles the english cards deck on load\n shuffleDeckFrench(); //shuffles the french cards deck on load\n shuffleDeckItalian(); //shuffles the italian cards deck on load\n turns = [];\n matchedPairs = [];\n secondsLeft = 60;\n }", "function startGame(player1Name, player2Name, difficultySetting) {\n window.scoreboard = new Scoreboard(player1Name, player2Name, difficultySetting); \n window.gameboard = new Gameboard(difficultySetting); \n window.clickToPlay = new ClickToPlay(player1Name, player2Name, difficultySetting);\n $('#grid-container-body').removeClass('hide');\n setTimeout(hideWelcomeModal, 500);\n }", "function startGame(g_ctx){\n main.GameState = 1;\n levelTransition.levelIndex = -1;\n}", "start()\r\n {\r\n if(gameState===0)\r\n {\r\n player= new Player();\r\n player.getCount();\r\n\r\n form= new Form();\r\n form.display();\r\n }\r\n }", "runGame(){\n\t\t\tthis.scene.runGame();\n\t\t}", "startGame() {\r\n // Hide start screen overlay\r\n document.getElementById('overlay').style.display = 'none';\r\n\r\n // get a random phrase and set activePhrase property\r\n this.activePhrase = this.getRandomPhrase();\r\n this.activePhrase.addPhrasetoDisplay();\r\n }" ]
[ "0.9150866", "0.86591357", "0.8507101", "0.8457657", "0.8429983", "0.8288381", "0.8282496", "0.8248471", "0.8237043", "0.82207835", "0.8194638", "0.8182284", "0.8077813", "0.80566156", "0.80235064", "0.80219465", "0.80149245", "0.7984115", "0.7973747", "0.7964471", "0.7941669", "0.7931174", "0.79235035", "0.791336", "0.7912794", "0.79117596", "0.7901175", "0.7897642", "0.7849955", "0.7844212", "0.78352857", "0.78227973", "0.7782375", "0.7778676", "0.7777877", "0.7762686", "0.77592885", "0.7758308", "0.77557147", "0.7739566", "0.77280873", "0.7728023", "0.77151513", "0.7704076", "0.76956105", "0.76935726", "0.7692462", "0.7687892", "0.7680494", "0.7674919", "0.7652711", "0.7652369", "0.76493585", "0.7633096", "0.76324064", "0.76222956", "0.7622106", "0.76155174", "0.7615119", "0.76144356", "0.76104856", "0.76048553", "0.7579418", "0.7571841", "0.7567647", "0.7559861", "0.75594485", "0.755826", "0.75576687", "0.75516844", "0.7551187", "0.7550557", "0.7546011", "0.7527283", "0.75204164", "0.75185883", "0.7506217", "0.7502052", "0.74940467", "0.7493564", "0.74925894", "0.74890846", "0.74691993", "0.74690986", "0.7466236", "0.74583054", "0.7456037", "0.74539196", "0.7452566", "0.7446534", "0.7446303", "0.74385566", "0.7425608", "0.7424011", "0.7423226", "0.7414888", "0.74136317", "0.74072087", "0.73940223", "0.73877937", "0.73870516" ]
0.0
-1
Checks form value and set furigana.
checkValue() { let newInput; newInput = this.elName.value; if (newInput === '') { this.initializeValues(); this.setFurigana(); } else { newInput = this.removeString(newInput); if (this.input === newInput) return; // no changes this.input = newInput; if (this.isConverting) return; const newValues = newInput.replace(kanaExtractionPattern, '').split(''); this.checkConvert(newValues); this.setFurigana(newValues); } this.debug(this.input); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFormValue(field, value){\r\n\tvar i=0;\r\n\tif (field.type == \"select-one\"){\r\n\t\tfor(i=0; i< field.options.length; i++){\r\n\t\t\tif (field.options[i].text == value)\r\n\t\t\t\tfield.options[i].selected=true;\r\n\t\t\telse field.options[i],selected=false;\r\n\t\t}//for\r\n\t} else if (field.type == \"checkbox\"){\r\n\t\tif ((value == \"1\") || (value == \"true\"))\r\n\t\t\tfield.checked=true;\r\n\t}else{\r\n\t\tfield.value=value;\r\n\t}\r\n}", "function setFormValue(field, value){\r\n\tvar i=0;\r\n\tif (field.type == \"select-one\"){\r\n\t\tfor(i=0; i< field.options.length; i++){\r\n\t\t\tif (field.options[i].text == value)\r\n\t\t\t\tfield.options[i].selected=true;\r\n\t\t\telse field.options[i],selected=false;\r\n\t\t}//for\r\n\t} else if (field.type == \"checkbox\"){\r\n\t\tif ((value == \"1\") || (value == \"true\"))\r\n\t\t\tfield.checked=true;\r\n\t}else{\r\n\t\tfield.value=value;\r\n\t}\r\n}", "set value(value){\n const thisWidget=this;\n const newValue = thisWidget.parseValue(value);\n\n /*Add validiation */\n if(\n newValue != thisWidget.correctValue && thisWidget.isValid(newValue)){\n thisWidget.correctValue = newValue;\n thisWidget.announce();\n }\n\n thisWidget.renderValue();\n\n }", "function setPopupFormElementValue(formElement, value)\n{\n //bug 17016196, PPR happen in popup, it may remove the form value, so, add this check. \n if(formElement==null) return;\n \n var shadowElem = formElement;\n var elementType = formElement.type\n\n // When we're dealing with an array of elements, find the\n // real element type by looking inside the array.\n if (!elementType && formElement.length)\n {\n for (var i = 0; i < formElement.length; i++)\n {\n elementType = formElement[i].type;\n if (elementType != (void 0))\n {\n shadowElem = formElement[i];\n break;\n }\n }\n }\n if (elementType == \"checkbox\")\n {\n formElement.checked=value;\n }\n else if (elementType.substring(0,6) == \"select\")\n {\n // no selected value\n if(value == \"\")\n {\n formElement.selectedIndex = -1;\n //formElement.selectedIndex = null;\n }\n // selectedIndex exists and non-negative\n else if(!isNaN(parseInt(value)))\n {\n // If there's no value, it could be for two reasons:\n // (1) The user has only specified \"text\".\n // (2) The user explicitly wanted \"value\" to be empty.\n // We can't really tell the difference between the two,\n // unless we assume that users will be consistent with\n // all options of a choice. So, if _any_ option\n // has a value, assume this one was possibility (2)\n for (var i = 0; i < formElement.options.length; i++)\n {\n if (formElement.options[i].value == value)\n {\n formElement.selectedIndex = i;\n break;\n }\n }\n // OK, none had a value set - this is option (1) - default\n // the \"value\" to the \"text\"\n // formElement.selectedIndex = 0;\n }\n // value is index\n else\n formElement.selectedIndex = value;\n }\n else if (elementType == \"radio\")\n {\n // no selected value\n if(value == \"\")\n {\n formElement.checked = false;\n }\n else if (formElement.length)\n {\n for (var i = 0; i < formElement.length; i++)\n {\n // See above for why we check each element's type\n if (formElement[i].type == \"radio\" && formElement[i].value == value)\n {\n formElement[i].checked = true;\n }\n }\n }\n else\n formElement.checked = value;\n }\n else\n {\n formElement.value = value;\n }\n}", "set value(value){\n const thisWidget = this;\n const newValue = thisWidget.parseValue(value);\n \n //add validation\n if (newValue != thisWidget.correctValue && thisWidget.isValid(newValue)) {\n thisWidget.correctValue = newValue;\n thisWidget.announce();\n } \n thisWidget.renderValue();\n }", "function change_form_value(form_field,form_value,inputbox_id){\n //change the input box value\n document.getElementById(form_field).value=form_value;\n \n //Clear the list of ontology terms\n document.getElementById('input'+inputbox_id).innerHTML='';\n document.getElementById('input'+inputbox_id).style.border=\"0px\";\n \n //Add a checkmark next to the input box\n document.getElementById('valid'+form_field).innerHTML='&#10003;';\n document.getElementById('valid'+form_field).style.color=\"green\";\n}", "function change_form_value(form_field,form_value,inputbox_id){\n //change the input box value\n document.getElementById(form_field).value=form_value;\n \n //Clear the list of ontology terms\n document.getElementById('input'+inputbox_id).innerHTML='';\n document.getElementById('input'+inputbox_id).style.border=\"0px\";\n \n //Add a checkmark next to the input box\n document.getElementById('valid'+form_field).innerHTML='&#10003;';\n document.getElementById('valid'+form_field).style.color=\"green\";\n}", "setValue(key, value) {\n \n if(key == 'Wildunfall' || key == 'Unfallaufgenommen'){\n if(value){\n value = 'Ja';\n }else{\n value = 'Nein';\n }\n }\n this.form[key] = value;\n if (this.isValid())\n this._submit.classList.remove('button--disabled');\n }", "function pesca_arrastreVerificar(value, form)\n{\n\tif(value != \"\"){\n\t\tif(value == 1)\n\t\t\thabilita_pesca_arrastre(form);\n\t\telse if(value == 0)\n\t\t\tdeshabilita_pesca_arrastre(form);\t\n\t}\n}", "function valida(f) {\n\t\tif (f.busca.value == \"\") {\n\t\t\talert(\"Es necesario que introduzca un valor\");\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function deseo_incursionVerificar(value, form)\n{\n\tif(value != \"\"){\n\t\tif(value == 1)\n\t\t\thabilita_deseo_incursion(form);\n\t\telse if(value == 0)\n\t\t\tdeshabilita_deseo_incursion(form);\t\n\t}\n}", "function validaTF(){\r\n\tif($.Tf_New_Email_User.getValue()==\"\"){\r\n\t\tEmail=$.Lb_Email_User.text;\r\n\t}\r\n\tif($.Tf_New_Phone_User.getValue()==\"\"){\r\n\t\tTelefono=$.Lb_Phone_User.text;\r\n\t}\r\n\t\r\n\tif($.Tf_New_Ocupacion_User.getValue()==\"\"){\r\n\t\tOcupacion=$.Lb_Ocupacion_User.text;\r\n\t}\r\n}", "fillForm(fSalut) {\n this.salutationForm.setValue({\n firstname: fSalut.firstname,\n gender: fSalut.gender,\n // language: fSalut.language,\n language: this.convertLanguage(fSalut.language),\n lastname: fSalut.lastname,\n letterSalutation: fSalut.letterSalutation,\n salutation: fSalut.salutation,\n salutationTitle: fSalut.salutationTitle,\n title: fSalut.title,\n });\n }", "function correct(value) {\n return Boolean(form(this, value))\n}", "function setupValue(pos, len, xxxvalue,xxxaction){\r\n\tvar elements=hatsForm.elements;\r\n\tvar elementNext,eName,eType,pool;\r\n\tfor (var i=0,iL=elements.length; i<iL; ++i){\r\n\t\telementNext=elements[i];\r\n\t\teName=elementNext.name;\r\n\t\teType=elementNext.type;\r\n\t\tif ((eType==\"text\") || (eType==\"textarea\") || (eType==\"password\") || (eType==\"hidden\") || (eType==\"checkbox\") || (eType==\"radio\")){\r\n\t\t\tif (eName!=null){\r\n\t\t\t\tif (eName.length>0){\r\n\t\t\t\t\tpool = eName.split(\"_\");\r\n\t\t\t\t\tif (pool.length==3){\r\n\t\t\t\t\t\tif (pool[0].indexOf(\"in\")!=-1){\r\n\t\t\t\t\t\t\tif (pool[1] == pos){\r\n\t\t\t\t\t\t\t\telementNext.value = xxxvalue;\r\n\t\t\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\t\t\t}\r\n\t\t}\r\n\t}\r\n\tvar_setupValuepos=pos;\r\n\tvar_setupValuexxxaction=xxxaction;\r\n}", "function setField(question, value)\n{\n var questionId = question.attr('id').split('-')[1];\n var valid = question.attr('required');\n valid = (valid && value) || !valid;\n validFields[questionId-1] = valid;\n verifyForm();\n}", "function fSetFormulario(iCampTipo,iFactor,iVariable,iValor){\n iCampo=iCampTipo;\n iFac=iFactor;\n iVar=iVariable;\n iVal=iValor;\n}", "function validerFam(){\n var result=true;msg=\"\";\n\n if(document.getElementById(\"txtfamCode\").value==\"\")\n msg=\"ajouter un code de Famille s'il te plait\";\n if(msg==\"\" && document.getElementById(\"txtfamNom\").value==\"\")\n msg=\"ajouter un nom de famille s'il te plait\";\n if(msg!=\"\") {\n // bootbox.alert(msg);\n bootbox.alert(msg);\n result=false;\n }\n return result;\n}// end valider", "function ver_valor_onblur(this_obj){\n\t\n\tvar value_obj = $(this_obj).val();\n\t\n\tif(value_obj == ''){\n\t\treturn false;\t\n\t}\n\n\tf\t\t\t\t\t\t\t\t= document.form1;\n\t//=== Combos donde se retornara la información >>>\n\tcombo_codigo_emergente\t\t\t= $(this_obj).attr('name');\n\tcombo_texto_nombre_emergente\t= $('input[name=\"txt_'+combo_codigo_emergente+'\"]');\n\t\t\n\tif(value_obj == ''){\n\t\t$(combo_texto_nombre_emergente).val('');\n\t\treturn false;\n\t}\n\n\tf.txt_nombre_columna_iframe.value\t= combo_codigo_emergente;\n\t//f.target\t\t\t\t\t\t\t= '_blank';\n\tf.target\t\t\t\t\t\t\t= 'frame_oculto';\n\tnavegar(42);\n\tf.target\t\t\t\t\t\t\t= '_self';\n\t\n}", "function buatFormPemintaanPembelian() {\n $('#jumlahBarangRequestBeli').val(1);\n $('#keteranganRequestBeli').val(\"\");\n $('#namaBarangRequestBeli').val(\"\");\n $(\"#tgOrderRequestBeli\").html(changeDateFormat(getDateNow()));\n ajaxGetDropDownKategori();\n\n //keperluan untuk error handling pengisian form permintaan pembelian\n $(\":input\").bind('keyup mouseup blur focusout', function () {\n if($('#jumlahBarangRequestBeli').val() < 1){\n window.alert(\"Minimal jumlah barang 1\");\n $('#jumlahBarangRequestBeli').val(1);\n }\n });\n}", "function InputValue(value){\n\t\tif(value.match(/[-+*\\/.]|[0-9]/g)){\n\t\t\tnewValue += value;\n\t\t\t_render();\n\t\t}\n\t\telse if(value == '='){\n\t\t\tevaluate();\n\t\t}\n\t\telse if(value == 'c'){\n\t\t\tnewValue = \"\";\n\t\t\t_render();\n\t\t}\n\t\telse\n\t\t\tconsole.log(\"Invalid!\");\n\t}", "function checkField(currentElem){\n value = currentElem.val();\n currentElem.removeClass(oParams.errorInputCssClass);\n if(!value){\n //check if it's empty\n handleEmtpyValue(oSetting.name +\" is empty.\\n\");\n }else{\n if(oSetting.type ===\"number\"){\n numberCheck(value, oSetting.name);\n }else if(oSetting.type ===\"hour\"){\n hourCheck(value, oSetting.name);\n }else if(oSetting.type ===\"minute\"){\n minuteCheck(value, oSetting.name);\n }else if(oSetting.type ===\"customFn\"){\n customCheck(value, oSetting.name);\n }\n }\n\n }", "function inputValueChangeHandler(e) {\n if (e.target.value === '') {\n setInputValue(e.target.value);\n } else {\n if (reg.test(e.target.value)) setInputValue(e.target.value);\n }\n }", "function value(kuangValue){\n\tvar oldValue=kuangValue.value;\n\t//console.log(oldValue);\n\tkuangValue.onfocus=function(){\n\t\tif(this.value==oldValue){\n\t\t\tthis.value=\"\";\n\t\t}\t\n\t}\n\tkuangValue.onblur=function(){\n\t\tif (this.value==\"\") {\n\t\t\tthis.value=oldValue;\n\t\t};\n\t}\t\n}", "'validateValue'(value) {}", "function setInputValue(obj,val) {\r\n if ((typeof obj.type != \"string\") && (obj.length > 0) && (obj[0] != null) && (obj[0].type==\"radio\")) {\r\n for (var i=0; i<obj.length; i++) {\r\n if (obj[i].value == val) {\r\n obj[i].checked = true;\r\n }\r\n else {\r\n obj[i].checked = false;\r\n }\r\n }\r\n }\r\n if (obj.type==\"text\")\r\n { obj.value = val; }\r\n if (obj.type==\"hidden\")\r\n { obj.value = val; }\r\n if (obj.type==\"textarea\")\r\n { obj.value = val; }\r\n if (obj.type==\"checkbox\") {\r\n if (obj.value == val) { obj.checked = true; }\r\n else { obj.checked = false; }\r\n }\r\n if ((obj.type==\"select-one\") || (obj.type==\"select-multiple\")) {\r\n for (var i=0; i<obj.options.length; i++) {\r\n if (obj.options[i].value == val) {\r\n obj.options[i].selected = true;\r\n }\r\n else {\r\n obj.options[i].selected = false;\r\n }\r\n }\r\n }\r\n }", "updateFormFieldInState(formField, value) {\n\n }", "function hitungFVA() {\n\t\tvar MASKBr = document.getElementById(\"fva1\").value;\n\t\tvar MASKBi = document.getElementById(\"fva2\").value;\n\t\tvar MASKBn = document.getElementById(\"fva3\").value;\n\n\t\tvar Br = MASKBr.split(',').join('');\n\t\tvar Bi = MASKBi.split(',').join('');\n\t\tvar Bn = MASKBn.split(',').join('');\n\n\t\tvar Bip = Bi / 100;\n\t\tvar Bpengalifv = ( (Math.pow(1+Bip,Bn)) - 1 ) / Bip;\n\t\tvar Bfva = Math.round(Br * Bpengalifv);\n\t\tdocument.getElementById(\"outputFVA\").innerHTML = \n\t\t\"Faktor Pengali FVanuitas : \\n\"+\n\t\t\"\t\t= ( ( 1 + i )^n - 1 ) / i \\n\"+\n\t\t\"\t\t= ( (1 + \"+ Bip +\")^\"+ Bn +\" - 1 ) / \"+ Bip +\" \\n\"+\n\t\t\"\t\t= \"+ Bpengalifv.toFixed(4) +\" \\n\"+\n\t\t\"Future Value Anuitas : \\n\"+\n\t\t\"\t\t= R x Faktor Pengali Fvanuitas \\n\"+\n\t\t\"\t\t= Rp. \"+ MASKBr +\" x \"+ Bpengalifv.toFixed(4) +\" \\n\"+\n\t\t\"\t\t= \"+ uang(Bfva, \"Rp.\");\n\t\t}", "onValueChanged(data) {\n if (!this.userFrm) {\n return;\n }\n const form = this.userFrm;\n // tslint:disable-next-line:forin\n for (const field in this.formErrors) {\n // clear previous error message (if any)\n this.formErrors[field] = '';\n const control = form.get(field);\n // setup custom validation message to form\n if (control && control.dirty && !control.valid) {\n const messages = this.validationMessages[field];\n // tslint:disable-next-line:forin\n for (const key in control.errors) {\n this.formErrors[field] += messages[key] + ' ';\n }\n }\n }\n }", "function SetFieldValue( name, newValue, form, createIfNotFound)\n{\n var field = GetFieldNamed( name, form, createIfNotFound);\n\n if(field != undefined)\n field.value = newValue;\n}", "function CheckValuewonauctionaccept(f1)\r\n{\r\n\tvar wonstatus = f1.Accden.value;\r\n\tif(wonstatus==\"\")\r\n\t{\r\n\t\talert(lng_plsselaccordenied);\r\n\t\tf1.Accden.focus();\r\n\t\treturn false\r\n\t}\r\n}", "function setValue(elem, value, eventType){\n\t\t\n\t\t//Set value\n\t\t$(elem).val(value);\n\n\t\t//Fire native change event\n\t\tvar elem = $(elem).get(0);\n\t\t\n\t\tif (eventType === null){\n\t\t\t\n\t\t\treturn;//don't fire event\n\t\t}\n\t\telse if (eventType === undefined){ //calculate it\n\n\t\t\tif(elem.nodeName == \"SELECT\" ||\n\t\t\t elem.nodeName == \"INPUT\" ||\n\t\t\t elem.nodeName == \"TEXTAREA\" ||\n\t\t\t elem.nodeName == \"METER\" ||\n\t\t\t elem.nodeName == \"PROGRESS\")\n\t\t\t\teventType = \"change\";\n\t\t\telse\n\t\t\t\tthrow \"TEST SPEC: Unknown form type !\";\n\t\t}\n\t\t\n\t\tsendEvent(elem, eventType);\n\t}", "function galadoit (value) {\n\t\tdocument.getElementById('auto').name = value;\n\t\tdocument.getElementById('galaxy_form').submit();\n\t}", "setValue(value){\n const thisWidget = this;\n const newValue = thisWidget.parseValue(value);\n \n /* TODO: Add validation */\n if(newValue !=thisWidget.value && thisWidget.isValid(newValue)){\n thisWidget.value = newValue;\n thisWidget.announce();\n }\n thisWidget.renderValue();\n }", "function angkaValid(input,info){\n\t\tvar x = $('#'+input).val();\n\n\t\tif($('#'+input).val()!=$('#'+input).val().replace(/[^0-9.]/g,'')){\n\t\t\t$('#'+input).val($('#'+input).val().replace(/[^0-9.]/g,''));\n\n\t\t\t$('#'+info).html('<span class=\"label label-important\"> hanya angka</span>').fadeIn();\n\t\t\tsetTimeout(function(){\n\t\t\t\t$('#'+info).fadeOut();\n\t\t\t},1000);\n\t\t}\n\t}", "function validerCodification(form,document){\r\n \r\n //Récupération des heures et minutes de début de fin du créneau\r\n code = form.vcode.value;\r\n nature = form.vnature.value;\r\n libelle = form.vlibelle.value;\r\n \r\n if( \r\n\t code == null \r\n\t || code == \"\" \r\n\t || nature == null \r\n\t || nature == \"\" \t\r\n\t){\t\t\r\n\t\talert(\"Veuillez remplir tous les champs obligatoires.\");\r\n\t\tdocument.getElementById(\"vCodeError\").innerHTML =\"Le code est obligatoire.\";\r\n\t\tdocument.getElementById(\"vNatureError\").innerHTML =\"La nature est obligatoire.\";\r\n\t\treturn false;\r\n\t}\r\n\t//On retroune vrai si la codification est valide\r\n\treturn true;\r\n}", "function valide() {\r\n\tdocument.forms[\"idform\"][\"userName\"].value = \"esse e o novo nome\";\r\n\treturn false;\r\n}", "function setFieldValue2(checkValue, setValue)\r\n{\r\n\t//declare var\r\n\tvar fieldName\t= fieldName;\r\n\t\t\r\n\tif( document.formContact.txtContMesg.innerHTML == checkValue)\r\n\t{\r\n\t\tdocument.formContact.txtContMesg.innerHTML = setValue;\r\n\t}\r\n\t\r\n}", "function carnetConadisVerificar(value, form)\n{\n\t//alert(\"carnetConadisVerificar=\"+value);\n\tif(value != \"\"){\n\t\tif(value == 1)\n\t\t\thabilita_carnet_conadis(form);\n\t\telse if(value == 0)\n\t\t\tdeshabilita_carnet_conadis(form);\t\n\t}\n}", "function vgaleToApotelesma() {\n event.preventDefault();\n const staTosa = parseFloat(document.querySelector(\".statosa\").value);\n const exoumeTosa = parseFloat(document.querySelector(\".exwtosa\").value);\n const staAlla = parseFloat(document.querySelector(\".staalla\").value);\n const zitoumenoValue = document.querySelector(\".stoixeia2\").value;\n //Apotelesma Praksi\n const apotelesmaTriwn = (staAlla / staTosa) * exoumeTosa;\n const roundResult = Math.floor(apotelesmaTriwn);\n if (roundResult < 0) {\n showValidation.classList.add(\"show\");\n showApotelesma.classList.add(\"hide\");\n }\n document.querySelector(\"#resultriwn\").value = roundResult;\n document.querySelector(\"#resultstoixeio\").value = zitoumenoValue;\n const showApotelesma = document.querySelector(\".koutiapotelesmatos\");\n if (roundResult === roundResult) {\n showApotelesma.classList.add(\"show\");\n theForm.classList.add(\"addheight\");\n } else {\n showApotelesma.classList.add(\"hide\");\n }\n}", "handleChange(evt) {\n const field = evt.target.dataset.fieldName;\n const value = evt.detail.value.trim();\n this.form[field] = value;\n }", "function atribuirSiglaGrupo(sSigla, sGrupo) {\n document.forms[0].txt_Sigla.value = sSigla;\n document.forms[0].txt_GrupoCorrente.value = sGrupo;\n}", "function handleChange(e) {\n var key = e.target.name;\n var value = e.target.value;\n setValues(function (values) {\n return _objectSpread(_objectSpread({}, values), {}, _defineProperty({}, key, value));\n });\n } //menangani submit form", "function sin_ceros(e) {\n var id = e.currentTarget.id;\n var valor = e.currentTarget.value;\n\tif (valor[0] == 0) {\n\t\tif (valor.length == 1) {\n\t\t\t$(\"#\" + id).val('1');\n\t\t} else {\n\t\t\tvalor = valor.substring(1)\n\t\t\t$(\"#\" + id).val(valor);\n\t\t\tsin_ceros(e);\n\t\t}\n\t}\n}", "function setQF(){\n\tsetValue(\"qf\");\n}", "function inputHandler(property, value) {\n console.log(value);\n anime[property] = value;\n $('#contactName').text((anime.userName|| \"noname\")+\"\"+(anime.password));\n }", "function onChange(e) {\n setValue(e.target.value);\n }", "function setFieldValue(fieldName, checkValue, setValue)\r\n{\r\n\t//declare var\r\n\tvar fieldName\t= fieldName;\r\n\t\r\n\tif( document.getElementById(fieldName).value == checkValue)\r\n\t{\r\n\t\tdocument.getElementById(fieldName).value \t\t= setValue;\r\n\t}\r\n\t\r\n}", "function onChangeHandler(e) {\n SetFormulario({\n ...Formulario,\n [e.currentTarget.name]: e.currentTarget.value\n })\n\n }", "function valideBlank(F) { \n if( vacio(F.campo.value) == false ) {\n alert(\"Introduzca un cadena de texto.\");\n return false;\n } else {\n alert(\"OK\");\n //cambiar la linea siguiente por return true para que ejecute la accion del formulario\n return false;\n } \n}", "function updateValue(e) {\n //waarom is dit noodzakelijk??\n console.log(e.target.value)\n\n //testen of dit werkt\n\n if (e.target.value.length > 0 && e.target.value.length < 6) {\n message.textContent = \"het huidige wachtwoord bevat te weinig karakters (minimaal 6)\"\n }\n else if (e.target.value.length > 5) {\n message.textContent = \"het huidige wachtwoord voldoet!\"\n } else {\n message.textContent = \"\";\n }\n\n}", "function angkaValid2(input,info,poin){\n\t\tvar n = $('#'+input).val();\n\n\t\tif($('#'+input).val()!=$('#'+input).val().replace(/[^0-9.]/g,'')){\n\t\t\t$('#'+input).val($('#'+input).val().replace(/[^0-9.]/g,''));\n\n\t\t\t$('#'+info).html('<span class=\"label label-important\"> hanya angka</span>').fadeIn();\n\t\t\tsetTimeout(function(){\n\t\t\t\t$('#'+info).fadeOut();\n\t\t\t},1000);\n\t\t}else{\n\t\t\tif(n<1 || n>5){\n\t\t\t\t$('#'+input).val('');\n\t\t\t\t$('#'+info).html('<span class=\"label label-important\"> antara 1 - 5</span>').fadeIn();\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t$('#'+info).fadeOut();\n\t\t\t\t},1000);\n\t\t\t}else{\n\t\t\t\t//rumus pembagian poin ketua = (60% * poin) , anggota = (40% * poin) / n\n\t\t\t\tvar poinx = (40/100 * parseFloat(poin) )/parseInt(n);\n\t\t\t\t$('#poinTB').val(poinx.toFixed(2));\n\t\t\t}\n\t\t}\n\t}", "function giveFormType(){\n return 'anual';\n}", "function avisoFormulario(inf){\n var datos = inf || {}\n \n switch(datos[\"aviso\"]){\n case \"obligatorio\": \n $.notify(`<span class=${datos[\"alerta\"]}>Los campos con * son abligatorios.</span>`); \n break\n case \"errorServidor\":\n $.notify(`<span class=${datos[\"alerta\"]}>No se pudo conectar con el servidor. Verifique su conexión a internet y vuelva a realizar la petición.</span>`);\n break\n } \n}", "function setWidgetValue($field, value) {\n //console.log(\"records to be set in multifields: \", $field, value);\n\n if (_.isEmpty($field)) {\n return;\n }\n \n if (cmf.isSelectOne($field)) {\n cmf.setSelectOne($field, value);\n } else if (cmf.isCheckbox($field)) {\n cmf.setCheckBox($field, value);\n } else if (isImage($field)) {\n setImageField($field, value);\n }else {\n $field.val(value);\n }\n }", "function form_raz(txt, initial_value) {\n\n if(txt.value == initial_value) txt.value = '';\n \n }", "function setBuddySearchBoxValue()\n{\n var searchBox = document.getElementById(\"buddySearch\");\n \n if(searchBox.value == 'Search Users')\n {\n searchBox.value = '';\n searchBox.style.color = 'black';\n }\n else if(searchBox.value == '')\n {\n searchBox.value = \"Search Users\";\n searchBox.style.color = 'grey';\n }\n}", "function inscrire(profil) {\n $('#InscriptionForm_profil').attr('value', profil);\n popup_afficher($('#inscription_popup'))\n}", "function controlCodePostal () {\nconst codepostal = formValues.codepostal;\n \n if(regexcodePostal(codepostal)){\n document.querySelector(\"#Codepostal_manque\").textContent = \"\";\n \n return true;\n }else{\n document.querySelector(\"#Codepostal_manque\").textContent = \"codePostal: doit étre composé de 5 chiffres\";\n alert(\"codePostal: doit étre composé de 5 chiffres\");\n return false;\n }\n \n }", "updateFeatureValue(key, evt) {\n var value = evt.currentTarget.innerHTML;\n if (\n (key === \"target_value\" && isValidTargetValue(value)) ||\n (key === \"spf\" && isNumber(value))\n ) {\n var obj = {};\n obj[key] = value;\n this.props.updateFeature(this.props.feature, obj);\n } else {\n alert(\"Invalid value\");\n }\n }", "function EntryForm() {\n\n const [ value, setValue ]= useState();\n\n function handleChange(evt){\n\t\t\tsetValue(evt.target.value);\n }\n\n function submitForm(evt){\n\t\t\tconsole.log(value);\n\t\t\tevt.preventDefault();\n\t\t\tlet data={'value': value.toLowerCase()};\n\t\t\taxios.post(\"http://localhost:3000/items/\", data)\n .then(res => console.log(res))\n .catch(err => console.log(err));\n }\n\n\n return (\n <div className=\"entryForm\">\n {/* form to add a value */}\n\t\t\t\t<div className=\"card\">\n\t\t\t\t\t<div className=\"card-header\">\n\t\t\t\t\t\t<h5 className=\"card-title\">Value Converter</h5>\n\t\t\t\t\t</div>\n\t\t\t\t\t<form>\n\t\t\t\t\t\t\t<div className=\"card-body\">\n\t\t\t\t\t\t\t\t\t<label htmlFor=\"number\" className=\"form-label\">Enter Value</label>\n\t\t\t\t\t\t\t\t\t<input type=\"value\" onChange={handleChange} className=\"form-control\" id=\"value\" aria-describedby=\"value\" placeholder=\"Example: 10M, 3B, .5M\"/>\n\t\t\t\t\t\t\t\t\t<button onClick={submitForm} type=\"submit\" className=\"submit-button btn btn-primary col-sm-12\">Submit</button>\n\t\t\t\t\t\t\t\t\t<a href=\"/results\">Go to Results </a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\t\n\t\t\t\t</div>\n </div>\n );\n}", "function fill(Value) {\r\n   //Assigning value to searchfields in 'index.php' file.\r\n   $('#berlinbuch').val(Value);\r\n   $('#eberswalde').val(Value);\r\n   $('#badsaarow').val(Value);\r\n   $('#april').val(Value);\r\n   $('#oktober').val(Value);\r\n}", "function toChangeValues(){\n currentClefIndex = 0;\n currentSyllableIndex = 0;\n currentNeumeIndex = 0;\n currentNeumeVariationIndex = 0;\n currentNeumeInVariationIndex = 0;\n currentPitchIndex = 0;\n currentVarPitchIndex = 0;\n currentVarSourceIndex = 0;\n \n document.getElementById(\"input\").innerHTML = changeValueForm();\n}", "function handleChange(event) {\n //event.preventDefault()\n \n if(!event.target.value){\n console.log('Input limpio');\n setValue('limpio');\n }\n setValue(event.target.value);\n \n \n\n }", "function compra() {\n var deuda = document.getElementById(\"prod\").value;\n if (deuda === \"Compra deuda\") {\n document.getElementById(\"tipo\").value = 'Bien Terminado';\n }\n}", "function chutePalavra() {\n if(obj.palavra == document.getElementById('inp-palavra').value.trim().toUpperCase()) {\n alert('Parabéns você ganhou');\n document.forms['formJogo'].style.display = 'none';\n telaPrincipal();\n }\n}", "function veryfyAddFila(){\n //en caso de que no haya llenado se le notifica al usuario\n if(document.getElementById(\"input_9\").value === \"\" || document.getElementById(\"input_10\").value === \"\"){\n alert(\"Digite cantidad y descuento\");\n }else{\n window.add_fila();\n }\n}", "function giveFormType(){\r\n return 'anual';\r\n}", "handler(newVal, oldVal) {\n if(!TypeChecker.isUndefined(oldVal)) {\n this.getValue();\n }\n }", "function form_verif(form, initial_value) { \n \n //\n // V�rifions les choses... \n \n var str = form.texte.value;\n \n if(str == initial_value || str == '') {\n\n aff_menu_div('erreur-comment');\n document.getElementById('erreur-comment').innerHTML = 'Votre message est trop court'; \n \n if(document.getElementById('ok-comment')) caff_menu_div('ok-comment');\n \n return true;\n \n } \n \n caff_menu_div('submit-comment');\n aff_menu_div('loader-comment');\n return false; \n\n }", "function updateValue2(e) {\n //waarom is dit noodzakelijk??\n console.log(e.target.value)\n\n //testen of dit werkt\n\n if (e.target.value.includes(\"@\")) {\n message2.textContent = \"Gebruikersnamen mogen geen @ bevatten\"\n }\n else if (e.target.value.length < 4) {\n message2.textContent = \"Een gebruikersnaam moet minimaal 4 tekens lang zijn\"\n } else {\n message2.textContent = \"\";\n }\n\n}", "function w(ag){return function(){var ah=this.element.val();ag.apply(this,arguments);this._refresh();if(ah!==this.element.val()){this._trigger(\"change\")}}}", "function hola(uno)\n\t {\n\t\t document.getElementById(\"ideart\").value=uno;\n\t\t //alert(uno);\n\t }", "function checkAceptaCondiciones(field){\r\n\tvar acepta = $(\"input[name='acepto_aviso_legal']:checked\").val();\r\n\tif ( acepta === undefined) {\r\n\t\treturn \"Lea y acepta los términos y condiciones de uso.\";\r\n\t}\t\t\t\r\n}", "function setInputValue(star, value, ev) {\n if (isClickEvent(ev)) {\n ratingName = star.parent().parent().parent().attr('class');\n console.log(ratingName + \" : \" + value);\n $('#new_review #review_' + ratingName + '_rating').val(value);\n }\n } // setInputValue", "function validaceldalugar(){\n\tvar sitio=document.getElementById(\"lugar\").value ;\n if(sitio==\"\")\n\t{\n\tdocument.trabajo.lugar.className=\"error\";\t\n\tdocument.trabajo.lugar.focus();\n\t}\n\telse{ document.trabajo.lugar.className=\"correcto\";\n\t}\n }", "handleEmptyValue() {\n if (!this.get('value') || this.get('value') === '') {\n this.set('value', 'Empty');\n }\n }", "function verifyFinalField(fieldName, textAlertStr, changeOrSaveText){\n\n var fieldStr = \"(document.forms[0].\" + fieldName + \".value=='') || (document.forms[0].\" + fieldName + \".value=='-1')\";\n if (eval(fieldStr)){\n if (changeOrSaveText==\"change\"){\n alert(\"The \" + textAlertStr + \" value must be entered in order to change a PFM to Final status\");\n if (document.forms[0].printOption[0]){\n document.forms[0].printOption[0].checked = true;\n }\n } else {\n alert(\"The \" + textAlertStr + \" value must be entered in order to save a PFM in Final status\");\n }\n return true;\n }\n return false;\n}", "function validarRg(rg) {\n if (trim(rg.value) != '') {\n document.formFuncionario.rg.value = retirarAcentos(trim(document.formFuncionario.rg.value)).toUpperCase();\n }\n}", "function igual(element,num,form){\n\tNumer=parseInt(element.value);\n\t//alert(\"igual=\"+element.value.length);\n\tif (!isNaN(Numer)){\n\t\tif(element.value.length != num){ \n\t\t\t//alert(\"noMayor=\"+element.name);\n\t\t\tif(element.name == \"num_tel_fijo1\")\n\t\t\t\tIndex = 10;\t\t\n\t\t\tif(element.name == \"num_tel_fijo2\")\n\t\t\t\tIndex = 11;\t\t\n\t\t\tif(element.name == \"num_celular\")\n\t\t\t\tIndex = 12;\t\n\t\t\telement.value=\"\";\n\t\t\tform.elements[Index].focus();\n\t\t\talert(\"El n\\u00FAmero de caracteres debe ser igual a \"+num);\n\t\t}\n\t}\n}", "function handleAprovar(event) {\n setAvalProf(\"aprovado\");\n setUserFormStatus(event);\n }", "function no_trabajo1Verificar(value, form)\n{\n\tif(value != \"\"){\n\t\tif(value == 1)\n\t\t\thabilita_no_trabajo1(form);\n\t\telse if(value == 0)\n\t\t\tdeshabilita_no_trabajo1(form);\t\n\t}\n}", "function faltante(formulario,campo,msj,enfermedades){\n\n var tipo = $('body').find(formulario+' *[name=\"'+campo+'\"]').prop('type');\n // alert(tipo+' > '+campo+ '='+($('body').find(formulario+' *[name=\"'+campo+'\"]').val()));\n if((tipo=='text') || (tipo=='email') || (tipo=='select-one')){\n if(($('body').find(formulario+' *[name=\"'+campo+'\"]').val()=='') || ($('body').find(formulario+' *[name=\"'+campo+'\"]').val()==0)){\n faltan.push(msj);\n }\n }else{\n if($('input[name=\"'+campo+'\"]:checked').val()==undefined){\n faltan.push(msj);\n }\n }\n }", "function fillField(event){\n\t\tvar inputVal = $.trim($(this).val());\n\t\tif(inputVal === 0){\n\t\t\t$(this).val($(this).data(\"defaultValue\"));\n\t\t}\n\t}", "function validardebe(field) {\r\n\t\t\tvar nombre_elemento = field.id;\r\n\t\t\tif(nombre_elemento==\"debe_dcomprobantes\")\r\n\t\t\t{\r\n\t\t\t\t$(\"#haber_dcomprobantes\").val(\"0.00\");\r\n\t\t\t\t\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\t$(\"#debe_dcomprobantes\").val(\"0.00\");\r\n\t\t\t}\r\n\t\t }", "function loja()\n\t{\n\t\tvalor = jQuery(\"select[name='rede']\").val();\n\t\tjQuery(\"input[name='rede']\").val(valor);\n\t}", "function setSliderValue(e) {\n\n if (e.id == 'contrastInput') {\n document.getElementById(\"contrast\").value = e.value;\n const event = new Event('input');\n document.getElementById(\"contrast\").dispatchEvent(event);\n }\n else if (e.id == 'brightnessInput') {\n document.getElementById(\"brightness\").value = e.value;\n const event = new Event('input');\n document.getElementById(\"brightness\").dispatchEvent(event);\n }\n}", "function validarRg(rg) {\n if (trim(rg.value) != '') {\n document.formPaciente.rg.value = retirarAcentos(trim(document.formPaciente.rg.value)).toUpperCase();\n }\n}", "function validaParametri(handleFrase, handleVelocita)\r\n{\r\n\tfrase = handleFrase.value;\r\n\tvelocita = handleVelocita.value;\r\n\t\r\n\tif (frase == \"\")\r\n\t{\r\n\t\talert(\"Inserire almeno un carattere\");\r\n\t\thandleFrase.focus();\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tif (frase == \"\")\r\n\t{\r\n\t\talert(\"Inserire almeno un carattere\");\r\n\t\thandleFrase.focus();\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tif (frase.match(/[\\|%]/)) // NON FUNZIONA\r\n\t{\r\n\t\talert(\"I caratteri \\, | e % non sono ammessi\");\r\n\t\thandleFrase.focus();\r\n\t\treturn false();\r\n\t}\r\n\t\r\n\tif (isNaN(velocita) || velocita <= 0)\r\n\t{\r\n\t\talert(\"La velocita' e' una quantita' intera positiva non nulla\");\r\n\t\thandleVelocita.value=\"120\";\r\n\t\thandleVelocita.focus();\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\treturn true;\r\n}", "function verifyField(element)\n{\n if (!element.value)\n {\n flashField(element);\n }\n}", "function searchItem(forma,action,value) {\r\n if (forma.toSearch) {\r\n forma.toSearch.value = value;\r\n forma.action = action;\r\n forma.submit();\r\n }\r\n}", "function ingresaVehiculo(e) {\n patente = document.querySelector(\"#patente\").value\n tipo = document.querySelector(\"#ftipo\").value\n console.log(patente)\n console.log(tipo)\n form.reset()\n}", "function formataFone(name, pFmt){\r\n\r\n\tvar fone=document.getElementById(name);\r\n\tvar size = fone.value.length;\r\n\tvar value = fone.value;\r\n\t\r\n\tif ( (pFmt==1 && size>=7) || (pFmt==2 && size>=8) || (pFmt==3 && size>=12) || (pFmt==4 && size>=13) ) {\r\n\t\tevent.returnValue = true;\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ( (pFmt==1 || pFmt==3) && (event.keyCode < 48 || event.keyCode > 57) ) {\r\n\t\tevent.returnValue = false;\r\n\t\treturn;\r\n\t}\r\n\tif ( (pFmt==2 || pFmt==4) && ((event.keyCode < 48 || event.keyCode > 57) && event.keyCode!=45)){\r\n\t\tevent.returnValue = false;\r\n\t\treturn;\r\n\t}\r\n\tif ( pFmt==2 && event.keyCode==45 ) {\r\n\t\tif (size==3 || size==4) {\r\n\t\t\tif (value.indexOf(\"-\")>0) {\r\n\t\t\t\tevent.returnValue = false;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tevent.returnValue = true;\r\n\t\t\t}\r\n\t\t} \r\n\t\telse {\r\n\t\t\tevent.returnValue = false;\r\n\t\t}\r\n\t\treturn\r\n\t}\r\n\tif ( pFmt==4 && event.keyCode==45 ) {\r\n\t\tif (size==8 || size==9) {\r\n\t\t\tif (value.indexOf(\"-\")>0) {\r\n\t\t\t\tevent.returnValue = false;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tevent.returnValue = true;\r\n\t\t\t}\r\n\t\t} \r\n\t\telse {\r\n\t\t\tevent.returnValue = false;\r\n\t\t}\r\n\t\treturn\r\n\t}\r\n\r\n\tif ((pFmt==2 || pFmt==4 ) && size!=4 && size-value.indexOf(\"-\")==5) {\r\n\t event.returnValue = false;\r\n\t return;\r\n\t}\r\n\tif (pFmt==2 && size==4 && value.indexOf(\"-\")==-1){\r\n\t fone.value = value + \"-\";\r\n\t}\r\n\tif (pFmt==4 && size==9 && value.indexOf(\"-\")==-1){\r\n\t fone.value = value + \"-\";\r\n\t}\r\n\tif (pFmt==3 || pFmt==4) {\r\n\t\tif (size==4){\r\n\t\t fone.value = value + \" \";\r\n\t\t}\r\n\t\tif (size==3){\r\n\t\t fone.value = value + \") \";\r\n\t\t}\r\n\t\tif (size==0){\r\n\t\t fone.value = \"(\" + value;\r\n\t\t}\r\n\t}\r\n\r\n\r\n}", "function editGift() {\n let currentGift = document.getElementById(\"giftEdit\").value\n if (currentGift === \"one person\") {\n setGift(\"one person\"); \n setGiftText(\"One person in Particular\");\n }\n\n else if (currentGift === \"small committee\") {\n setGift(\"small committee\"); \n setGiftText(\"A Small Committee\")\n }\n\n else if (currentGift === \"institution\") {\n setGift(\"institution\"); \n setGiftText(\"An Instution\");\n }\n}", "function setValue(type){\n\t//Gets the field to modify and the value to put\n\tvar field = document.getElementById(\"select\"+type).value;\n\tvar value = document.getElementById(\"weight\"+type).value;\n\tif(field!=\"\" && value!=\"\"){\n\t\tif(value>=0){\n\t\t\t$.ajax({\t\t\t//Ajax request to the doPost of the FieldWeight servlet\n\t \ttype: \"POST\",\n\t \turl: \"./../admin/FieldWeight\",\n\t \tdata : \"field=\"+field+\"&type=\"+type+\"&value=\"+value,\n\t \t//if received a response from the server\n\t \tsuccess: function( data, textStatus, jqXHR) {\n\t \t\t//If they're was an error\n\t \t\tif(data.toString().indexOf(\"Error code : \")!==-1){\n\t \t\t\t//print it and disable the selection\n\t \t\t\tdocument.getElementById(\"globalAnswer\").innerHTML = data;\n\t \t\t\t$(\"#globalAnswer\").removeClass(\"success\").addCLass(\"fail\").show();\n\t\t \t\t$('#selectpf').attr(\"disabled\", true);\n\t\t \t\t$('#selectqf').attr(\"disabled\", true);\n\t\t \t\t$('#submitpf').attr(\"disabled\", true);\n\t\t \t\t$('#submitqf').attr(\"disabled\", true);\n\t\t \t\t$('#weight'+type).attr(\"disabled\", true);\n\t\t \t}else{//print modif done and reset the value and disable the submit and input field\n\t\t \t\tdocument.getElementById(\"answer\"+type).innerHTML = window.i18n.msgStore['modifDoneZK'];\n\t\t \t\t$(\"#answer\"+type).removeClass(\"fail\").addClass(\"success\").show();\n\t\t \t\tdocument.getElementById(\"select\"+type).value = \"\";\n\t\t \t\tdocument.getElementById(\"weight\"+type).value = \"\";\n\t\t \t\t$('#weight'+type).attr(\"disabled\", true);\n\t\t \t\t$('#submit'+type).attr(\"disabled\", true);\n\t\t \t}\n\t \t}\n\t\t \t});\n\t\t}else{\n\t\t\t\n\t\t}\n\t}\n}", "function handleChange(event, value) {\n setValue(value);\n }", "function isValidAsignatura(formname){\n \n var varAsignatura = document.forms[formname][\"asignatura\"].value;\n \n //Si el campo asignatura de formname está vacio entonces fallo\n if(varAsignatura.length == 0){\n var x= document.getElementById(\"asignatura\");\n x.innerHTML=\"Campo vacio\";\n return false;\n }\n \n var x= document.getElementById(\"asignatura\");\n if(varAsignatura.length >100){ //Si el nombre de la asignatura tiene más de 100 carácteres entonces fallo\n x.innerHTML=\"Error: nombre de la asignatura debe ser menor de 100 carácteres.\";\n return false; \n }\n x.innerHTML=\"\";\n varAsignatura=varAsignatura.trim();//quitamos los posibles espacios en blancos de los <--extremos-->\n varAsignatura= varAsignatura.replace(/\\s+/g, ' ');//sustituimos los posibles múltiples espacios entre palabras por solamente uno\n document.forms[formname][\"asignatura\"].value=varAsignatura;\n return true;\n}", "function habilitarFusionAumento(element){\n\tmostrarFusionAumento(element.value);\n}", "handleSubmit(user) {\n\t\t\n\t\t\n\t\tif(isNaN(this.value)){\n\t\t\talert('Please only enter whole numeric values.');\n\t\t}\n\t\telse{\n\t\t\tuser.age = this.value;\n\t\t\tthis.state = user;\n\t\t\tthis.props.navigation.navigate('UserInputGoals', { user: this.state });\n\t\t}\n\t}", "function newSchoolValiate() {\n var inputVal = $('#school_session_name').val();\n if(inputVal == '' || inputVal == null){\n $('#school-session-name').addClass('form-error');\n $('#school-session-name').val('can\\'t be blank');\n }\n }" ]
[ "0.598715", "0.598715", "0.5978625", "0.594276", "0.5938196", "0.58861965", "0.58861965", "0.58377993", "0.5763753", "0.569352", "0.56747633", "0.56617063", "0.5653031", "0.5559196", "0.55565095", "0.5542895", "0.5527802", "0.5513095", "0.55099326", "0.550913", "0.5497843", "0.54796684", "0.547932", "0.5475819", "0.54722536", "0.5442818", "0.54376876", "0.5434483", "0.5428404", "0.5413178", "0.5408568", "0.53999186", "0.53978395", "0.5378116", "0.53748596", "0.5369614", "0.53653115", "0.5352661", "0.53383356", "0.53373575", "0.5335889", "0.5313521", "0.53068274", "0.53059244", "0.5302518", "0.5295188", "0.52848494", "0.5284785", "0.5266333", "0.52649426", "0.5256232", "0.52446353", "0.5241189", "0.52241266", "0.5217904", "0.52128", "0.5206829", "0.52024066", "0.5202211", "0.51971614", "0.51967853", "0.5191279", "0.5188309", "0.5185217", "0.51815945", "0.5181329", "0.5175934", "0.5172751", "0.5169719", "0.51666677", "0.5161153", "0.5157104", "0.51555103", "0.51545656", "0.51539713", "0.5153112", "0.51521915", "0.5149211", "0.5148086", "0.5146278", "0.51437366", "0.5131315", "0.512912", "0.5124009", "0.5121529", "0.511931", "0.51159686", "0.5114267", "0.5112715", "0.51055217", "0.5100588", "0.50968546", "0.5093262", "0.5091802", "0.5085603", "0.5082429", "0.50792056", "0.5078524", "0.50752157", "0.5074468" ]
0.6742357
0
handlers : flex box grid
function chunkArray(myArray, chunk_size) { let index = 0; const arrayLength = myArray.length; const tempArray = []; for (index = 0; index < arrayLength; index += chunk_size) { let myChunk = myArray.slice(index, index + chunk_size); tempArray.push(myChunk); } return tempArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createGrids () {\n }", "_resizeHandler() {\n\n\t\tconst bounds= this.getBoundingClientRect();\n\n\t\tthis._dimens.width= bounds.width;\n\t\tthis._dimens.height= bounds.width;\n\n\t\tthis._root.querySelector('.wrapper').style.height= `${this._dimens.height}px`;\n\n\t\tfor(let row of this._grid) {\n\n\t\t\tfor(let col of row) {\n\n\t\t\t\tcol.$elem.style.width= (this._dimens.width/this.rows - 10) + 'px';\n\t\t\t\tcol.$elem.style.height= (this._dimens.height/this.cols - 10) + 'px';\n\t\t\t}\n\t\t}\n\t}", "initGrid() {\n \n // Initialize our packery grid\n let grid = this.$('.grid');\n \n grid.packery({\n percentPosition: true,\n itemSelector: '.grid-item',\n gutter: 10,\n });\n \n // Grid elements are draggable\n grid.find('.grid-item').each( function( i, gridItem ) {\n var draggie = new Draggabilly( gridItem );\n // bind drag events to Packery\n grid.packery( 'bindDraggabillyEvents', draggie );\n });\n \n // Resize grid elements on click \n // NOTE that in the future we want this to be encpsulated in some sort of button, etc.\n // Otherwise it happens any time you drag the element, which is really annoying\n // (Commenting out for now)\n /*grid.on( 'click', '.grid-item', function( event ) {\n var $item = $( event.currentTarget );\n // change size of item by toggling large class\n $item.toggleClass('grid-item--large');\n if ( $item.is('.grid-item--large') ) {\n // fit large item\n grid.packery( 'fit', event.currentTarget );\n } else {\n // back to small, shiftLayout back\n grid.packery('shiftLayout');\n }\n });*/\n \n }", "gridView(canvas) {\n // this method should be completed by the students\n }", "function GridCreate() {\r\n var elBody = document.querySelector('body');\r\n var elDiv = document.createElement('div');\r\n\r\n for (var i = 0; i < 3; i++) {\r\n var elDiv = document.createElement('div');\r\n elDiv.setAttribute('id', 'container');\r\n for (var j = 0; j < 3; j++) {\r\n var elBut = document.createElement('div');\r\n elDiv.appendChild(elBut);\r\n elBut.style.background = '#E0E1E1';\r\n elBut.style.padding = '50px';\r\n elBut.style.cursor = 'pointer';\r\n\r\n elBut.setAttribute('class', 'case');\r\n }\r\n elBody.appendChild(elDiv);\r\n\r\n elDiv.style.display = 'flex';\r\n elDiv.style.justifyContent = 'center';\r\n }\r\n}", "function makeGrid() {\n\n\n}", "_fillLayout(){\n this.scrollView.push(this. _createCell(\"orange\"), {opacity: 0});\n this.scrollView.push(this.horzContainer);\n this.scrollView.push(this._createCell(\"black\"), {opacity: 0});\n this.scrollView.push(this._createCell(\"orange\"), {opacity: 0});\n this.scrollView.push(this._createCell(\"blue\"), {opacity: 0});\n this.scrollView.push(this._createCell(\"green\"),{opacity: 0});\n this.scrollView.push(this._createCell(\"cyan\"), {opacity: 0});\n this.scrollView.push(this._createCell(\"orange\"),{opacity: 0});\n this.scrollView.push(this._createCell(\"red\"), {opacity: 0});\n this.scrollView.push(this._createCell(\"black\"),{opacity: 0});\n this.scrollView.push(this._createCell(\"blue\"), {opacity: 0});\n\n this.horizontalScrollView.push(this._createCell2(\"hor1\",\"red\"));\n this.horizontalScrollView.push(this._createCell2(\"hor2\",\"orange\"));\n this.horizontalScrollView.push(this._createCell2(\"hor1\",\"red\"));\n this.horizontalScrollView.push(this._createCell2(\"hor2\",\"orange\"));\n this.horizontalScrollView.push(this._createCell2(\"hor1\",\"red\"));\n this.horizontalScrollView.push(this._createCell2(\"hor2\",\"orange\"));\n this.horizontalScrollView.push(this._createCell2(\"hor1\",\"red\"));\n this.horizontalScrollView.push(this._createCell2(\"hor2\",\"orange\"));\n\n\n }", "function OsMasonryFlex() {\r\n $('.masonry-container').each(function () {\r\n var minwidth = parseInt($(this).data('masonry-grid-width'), 10) || 370;\r\n var $container = $(this);\r\n var oldWidth = $container.innerWidth();\r\n var oldRatio = oldWidth / minwidth;\r\n var $masonryOpt = {itemSelector: '.masonry-item'};\r\n var $masonry = $container.masonry($masonryOpt);\r\n\r\n function ResizeItem(containerWidth) {\r\n var Ratio = Math.floor(containerWidth / minwidth);\r\n if (Ratio === 0) {\r\n Ratio = 1;\r\n }\r\n else if (Ratio != oldRatio) {\r\n var itemWidth = 1 / Ratio;\r\n $container.children('.masonry-item').css({width: itemWidth * 100 + '%'});\r\n }\r\n }\r\n\r\n ResizeItem(oldWidth);\r\n\r\n // On ImagesLoaded\r\n $masonry.imagesLoaded().progress(function () {\r\n $masonry.masonry('layout');\r\n });\r\n\r\n // Window on resize\r\n $(window).on('resize', function () {\r\n var newWidth = $container.innerWidth();\r\n if (newWidth != oldWidth) {\r\n ResizeItem(newWidth);\r\n oldWidth = newWidth;\r\n }\r\n });\r\n\r\n //Fix parallax background\r\n $masonry.on('layoutComplete', function () {\r\n $(window).trigger('resize.px.parallax');\r\n });\r\n }\r\n )\r\n ;\r\n\r\n }", "function grid() {\n\tif ($('.js-grid').length) {\n\t\t$('.js-grid').isotope({\n\t\t\titemSelector: '.js-grid-item',\n\t\t\tpercentPositijs-grid-itemon: true\n\t\t});\n\t}\n}", "function defaultGrid(){\n gridSize(24)\n createDivs(24)\n}", "function responsCol(){\n if(globItemdiv===''){\n globItemdiv = items;\n }\n\n if(expCol===6){\n if($(window).width()>991){\n col = 6;\n }\n else{\n respDevice();\n }\n }\n else if(expCol===5){\n if($(window).width()>991){\n col = 5;\n }\n else{\n respDevice();\n }\n }\n else if(expCol===3){\n if($(window).width()>991){\n col = 3;\n }\n else{\n respDevice();\n }\n }\n else{\n if($(window).width()>991){\n col = 4;\n }\n else{\n respDevice();\n }\n\n }\n function respDevice(){\n if($(window).width()>767){\n col = medCol;\n }\n else if($(window).width()>479){\n col = smCol;\n }\n else if($(window).width()<=480){\n col = tinyCol;\n }\n }\n if(startgroup !=''){\n globThisData = '.dc-pf-'+ startgroup;\n globItemdiv = $this.children(globThisData);\n }\n if(animationtype !='classic'){\n thisDefault(col, globItemdiv, items, globThisData); \n }\n else{\n thisDefault2(col, globItemdiv, items, globThisData); \n }\n $this.dcLightBox({\n portfolio:true,\n section: globThisData\n })\n }", "function aanmaken_grid_layout() {\n var nummer = 0;\n var kolom__struct = '';\n var grid__struct = '';\n\n for (rij = 0; rij < grid_struct__obj.aantal_rijen; rij++) {\n kolom__struct = '';\n for (kolom = 0; kolom < grid_struct__obj.aantal_kolommen; kolom++) {\n nummer = nummer + 1\n kolom__struct += `<div class=\"grid_${nummer} grid_kolom ${ kolom ? 0 : 'grid_kolom_1' }\"></div>`;\n }\n grid__struct += `<div class=\"uk-child-width-expand@m\" style=\"margin-top:5px;\" uk-grid>${kolom__struct}</div>`;\n }\n return grid__struct; // geeft de grid structuur als resultaat terug\n }", "vista(){\n if(this.state.flex === \"column\"){\n this.setState({flex: \"row\", widthTarjeta:\"50%\", heightTarjeta: \"100%\", widthPadre:\"40%\"})\n } else {\n this.setState({flex: \"column\", widthTarjeta:\"100%\", heightTarjeta: \"50%\", widthPadre: \"20%\"}) \n }\n }", "function resizeHandler() {\n var layout = getLayoutFromSize(container.offsetWidth);\n if (layout !== container.dataset.grid) {\n container.dataset.grid = layout;\n listeners.forEach(function(listener) {\n listener();\n })\n }\n }", "resizeAllGridItems() {\n const $gridCells = [].slice.call(MasonryLayout.$gridBox.children);\n const gridStyle = window.getComputedStyle(MasonryLayout.$gridBox);\n const gridAutoRows = parseInt(gridStyle.getPropertyValue('grid-auto-rows'), 10) || 0;\n const gridRowGap = parseInt(gridStyle.getPropertyValue('grid-row-gap'), 10) || 10;\n $gridCells.forEach($cell => {\n MasonryLayout.resizeGridItem($cell, gridAutoRows, gridRowGap);\n });\n }", "function pack() {\n var boxes = config.boardView.querySelectorAll(\".box\"),\n boxesPerRow = calculateBoxesPerRow(boxes.length),\n margin = parseInt(window.getComputedStyle(boxes[0]).marginTop.replace(\"px\", \"\")),\n boardWidth = boxesPerRow * (boxes[0].offsetWidth + 2 * margin);\n\n if (boxesPerRow === 1) {\n boxesPerRow = boxes.length;\n }\n\n config.boardView.style.width = boardWidth + \"px\";\n }", "renderLayout() {\n\t let self = this;\t \n\t let photoListWrapper = document.querySelector('#photos');\t \n imagesLoaded(photoListWrapper, function() { \t \n\t\t\tself.msnry = new Masonry( photoListWrapper, {\n\t\t\t\titemSelector: '.photo'\n\t\t\t}); \n\t\t\t[...document.querySelectorAll('#photos .photo')].forEach(el => el.classList.add('in-view'));\n });\n }", "function generateLayout() {\n $('.layout-display').each(function () {\n for (var i = 0; i < $(this).attr('data-max'); i++) {\n $(this).append('<div class=\"grid item\"></div>');\n }\n\n\n displayLayoutInfo($(this).parents('.layout'));\n resizeItems($(this));\n });\n}", "function Layout (){\r\n return (\r\n <div style = {{backgroundColor:'brand'}}>\r\n <Grid \r\n rows={['xxsmall', ['large', 'flex']]}\r\n //rows={['1/2', '2/3']}\r\n columns={[['small', 'flex'], ['large', 'flex'], ['medium', 'flex']]}\r\n background = \"Brand\"\r\n gap = 'medium'\r\n fill = {true}\r\n areas={[\r\n { name: 'header', start: [0, 0], end: [2, 1] },\r\n { name: 'left', start: [0, 1], end: [0, 1] },\r\n { name: 'main', start: [1, 1], end: [1, 1] },\r\n { name: 'right', start: [2, 1], end: [2, 1] },\r\n ]}\r\n >\r\n <Stack gridArea=\"header\" background=\"brand\" fill = {true}>\r\n {/* <Box as={Searchbar}/> */}\r\n </Stack>\r\n <Stack gridArea = \"left\">\r\n <Box as={Menubar} /> \r\n </Stack>\r\n <Stack gridArea=\"main\" background=\"light-2\">\r\n <Box as={PostArea}/>\r\n </Stack>\r\n { <Stack gridArea=\"right\" background=\"light-5\" fill = {true}>\r\n <Box as={Sidebar} />\r\n </Stack>}\r\n </Grid>\r\n </div>\r\n\r\n );\r\n}", "generateGridLayout(items) {\n //For now show the grid items as 3x3\n return _.map(items, function (item, i) {\n return {\n x: GRIDCONFIG.compactType === 'vertical' ? (i * item.width) % 12 : Math.floor((i * item.height) / 6) * item.width,\n y: GRIDCONFIG.compactType === 'vertical' ? Math.floor(i / 3) : (i * item.height) % 6,\n w: item.width,\n h: item.height,\n i: i.toString(),\n isResizable: item.resizable,\n isDraggable: item.draggable\n };\n });\n }", "function initButtonGrid() {\n const buttons = document.querySelectorAll(\".button-grid div\");\n buttons.forEach( button => {\n button.style.gridArea = button.id; // Set grid placement\n button.classList.add(\"button\"); // Add button class\n button.classList.add(keys[keyIndexById(button.id)].type); // Add respective type class\n button.addEventListener(\"mousedown\",mouseDown); // Add event listener for mouse input\n button.addEventListener(\"mouseup\",mouseUp); // Add event listener for mouse input\n });\n}", "function layoutTiles() {\n var layout = scope.layout;\n\n if (layout) {\n if (singleColumnMode) {\n moveTilesToContainer(element, column1, layout.one_column_layout);\n } else {\n moveTilesToContainer(element, column1, layout.two_column_layout[0]);\n moveTilesToContainer(element, column2, layout.two_column_layout[1]);\n }\n }\n }", "function createGrid(width, height) {\n\n}", "layoutDom(type = 'gridOne') {\n let randomNum = new Date().getTime();\n let configHeight = $(window).height() - 75 + 'px';\n let domType = {\n gridOne() {\n return (\n '<div class = \"widgetChild\">' +\n '<div class = \"widgetContainer container_' + randomNum + '\">' +\n '<div class = \"columnOne columnOne_' + randomNum + '\"></div>' +\n '</div>' +\n '<div class = \"widgetConfig config_' + randomNum +\n '\"style=\"height:' + configHeight + '\"></div>' +\n '<div class = \"widgetAction\">' +\n '<span class=\"configAction\"><i class=\"config\" title=\"config\"></i>' +\n '<i class=\"move\" title=\"move\"></i>' +\n '<i title=\"delete\" class=\"delete\"></i><i class=\"export\" title=\"export\"></i></span>' +\n '</div>' +\n '</div>'\n );\n },\n gridTwo() {\n return (\n '<div class = \"widgetChild\">' +\n '<div class = \"widgetContainer container_' + randomNum + '\">' +\n '<div class = \"columnTwo columnT_' + randomNum + '\"></div>' +\n '<div class = \"columnTwo columnTwo_' + randomNum + '\"></div>' +\n '</div>' +\n '<div class = \"widgetConfig config_' + randomNum +\n '\"style=\"height:' + configHeight + '\"></div>' +\n '<div class = \"widgetAction\">' +\n '<span class=\"configAction\"><i class=\"config\" title=\"config\"></i>' +\n '<i class=\"move\" title=\"move\"></i>' +\n '<i title=\"delete\" class=\"delete\"></i><i class=\"export\" title=\"export\"></i></span>' +\n '</div>' +\n '</div>'\n );\n },\n gridThree() {\n return (\n '<div class = \"widgetChild\">' +\n '<div class = \"widgetContainer container_' + randomNum + '\">' +\n '<div class = \"columnThree columnTh_' + randomNum + '\"></div>' +\n '<div class = \"columnThree columnThr_' + randomNum + '\"></div>' +\n '<div class = \"columnThree columnThree_' + randomNum + '\"></div>' +\n '</div>' +\n '<div class = \"widgetConfig config_' + randomNum +\n '\"style=\"height:' + configHeight + '\"></div>' +\n '<div class = \"widgetAction\">' +\n '<span class=\"configAction\"><i class=\"config\" title=\"config\"></i>' +\n '<i class=\"move\" title=\"move\"></i>' +\n '<i title=\"delete\" class=\"delete\"></i><i class=\"export\" title=\"export\"></i></span>' +\n '</div>' +\n '</div>'\n );\n },\n gridChart() {\n return (\n '<div class = \"widgetChild\">' +\n '<div class = \"widgetContainer container_' + randomNum + '\">' +\n '</div>' +\n '<div class = \"widgetConfig config_' + randomNum +\n '\"style=\"height:' + configHeight + '\"></div>' +\n '<div class = \"chartAction\">' +\n '<span class = \"chartTitle\"><i class=\"iconType\">chartName</i></span>' +\n '<span class=\"configAction\"><i class=\"config\" title=\"config\"></i>' +\n '<i class=\"move\" title=\"move\"></i>' +\n '<i title=\"delete\" class=\"delete\"></i><i class=\"export\" title=\"export\"></i></span>' +\n '</div>' +\n '</div>'\n );\n }\n };\n\n return domType[type] ? domType[type]() : domType['gridOne']();\n }", "GridRow(cards, id){\n \n //in case null recieved for cards return to avoid runtime errors\n if(cards == null){\n return null;\n }\n \n //in case the total elements did not fill the whole grid\n //we would like to center the contents\n //we do so by creating an empty div that span half of the empty columns \n //and we place this div at the begging \n\t\t\n\t\tlet fillEmptySpace;\n\t\t\n let colUnit = parseInt(this.props.colClass.substr(-1));\n\n let colClassType = this.props.colClass.substr(0, this.props.colClass.length - 1);\n\n if(this.props.rowLength * colUnit < 12){\n \n let centerSpace = Math.floor((12 - (this.props.rowLength * colUnit)) / 2);\n let colClass_temp = colClassType + centerSpace;\n fillEmptySpace = (<div className={colClass_temp}>&nbsp;</div>);\n \n }\n else{\n fillEmptySpace = null;\n }\n\n //for each cell inside the row create a new Card component\n //definde the props for each card\n //note that we have a <div> element in top of <Card> to define our css responsive class\n //which is usually refer to the class=\"col-m-3\" for example\n //the key for each single element should be defined in the top tag\n //note that we need to pass the click event handler and a unique id for each card\n return (\n <div className=\"row\" key={id}>\n {fillEmptySpace}\n {cards.map((item, index) =>\n <div className={this.props.colClass} key={item.id}>\n <Card image={item.photo} \n title={item.title} \n article={item.body} \n onClick = {this.props.onClick}\n id ={item.id}\n />\n </div>\n )} \n </div>\n );\n }", "function makeGrid(height,width) {\n // Your code goes here!\n for(let i = 0; i < height; i++){\n let row = grid.insertRow(i);\n for(let a = 0; a < width; a++){\n let cell = row.insertCell(a);\n cell.addEventListener(\"click\",function(){\n cell.style.backgroundColor=color.value;\n \t })\n \t}\n } \n}", "function load_grid() {\n let container_tag = document.getElementById('append-grid');\n for (let i = 0; i < Math.ceil(dept_arr.length / 4); i++) {\n let row = document.createElement('div');\n row.classList.add('row');\n row.classList.add('no-gutters');\n row.classList.add('px-3');\n row.classList.add('content-row');\n row.style.width = \"100vw\";\n\n (is_mobile() || window.innerWidth < small_screen) ? row.style.height = '100%' : row.style.minHeight = \"25vh\";\n\n for (let j = 0; j < 4; j++) {\n let idx = (i * 4) + j;\n if (idx < dept_arr.length) {\n let col = document.createElement('div');\n col.classList.add('text-center');\n col.classList.add('content-col');\n col.style.width = '100%';\n\n let title_row = document.createElement('div');\n title_row.classList.add('centered');\n\n if (is_mobile() || window.innerWidth < small_screen) { //different styling for mobile devices with smaller screens\n console.log('loading mobile layout');\n col.classList.add('col-12');\n if (is_mobile()) {\n title_row.innerHTML = \"<h3 class='card-text' id='h-\" + String(idx) + \"' style='font-size: 2em' onclick='onclick_fcn'>\" + dept_arr[idx] + \"</h3>\";\n } else {\n title_row.innerHTML = \"<h3 class='card-text' id='h-\" + String(idx) + \"' style='font-size: 1.3em'>\" + dept_arr[idx] + \"</h3>\";\n }\n } else {\n console.log('loading pc layout');\n col.classList.add('col-3');\n title_row.innerHTML = \"<h3 class='card-text' id='h-\" + String(idx) + \"' style='font-size: 1.3em'>\" + dept_arr[idx] + \"</h3>\";\n }\n\n let button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.classList.add('btn');\n button.classList.add('p-0');\n button.style.height = '100%';\n button.style.width = '100%';\n console.log('got here');\n button.addEventListener('click', e => {console.log('HIIII');window.location.href = generate_page_name(dept_arr[idx])});\n\n // title_row.style.fontSize = '0.5em';\n\n let img = document.createElement('img');\n img.classList.add('img-fluid');\n img.classList.add('darker');\n img.style.width = '100%';\n img.style.height = '100%';\n img.style.objectFit = 'cover';\n img.src = 'imgs' + '/' + dept_arr[idx].toLowerCase() + '.jpg';\n\n row.appendChild(col);\n col.appendChild(button);\n button.appendChild(title_row);\n button.appendChild(img);\n\n button.addEventListener('mouseover', function () {\n document.getElementById('h-' + String(idx)).style.transition = 'font-size 0.3s';\n document.getElementById('h-' + String(idx)).style.fontSize = '1.4em';\n });\n button.addEventListener('mouseout', function () {\n img.style.transition = 'transform 1.3s';\n img.style.transform = 'scale (1)';\n document.getElementById('h-' + String(idx)).style.transition = 'font-size 0.3s';\n document.getElementById('h-' + String(idx)).style.fontSize = '1.3em';\n })\n }\n }\n\n container_tag.appendChild(row);\n }\n load_footer();\n}", "function _resize(){\n gi_resize(gi2, gi3, gi4, gi5, gi6, gi7, cp3, cp4, cp5, cp6, cp7, $wW);\n $(window).resize(gi_resize(gi2, gi3, gi4, gi5, gi6, gi7, cp3, cp4, cp5, cp6, cp7,$wW));\n\n // console.log(\"Width 2: \"+gi2);\n\t// console.log(\"Width 3: \"+gi3);\n\t// console.log(\"Width 4: \"+gi4);\n //$('.grid-item-width2').css({height: (gi2)});\n // $('.grid-item-width2.nest').css({height: (gi2*2)});\n // $('.grid-item-width2.nest .nested').css({height: gi2});\n //$('.grid-item-width3').css({height: gi3});\n //$('.grid-item-width4').css({height: gi4});\n //$('.grid-item-width5').css({height: gi5})\n //$('.grid-item-width6').css({height: (gi6*.66)});\n // $('.width6-diamond').css({height: (gi6*0.4)});\n // $('.columns-4.child-links').css({height:cp4});\n //$('.columns-6.promo').css({height: (cp6*.5)});\n // $('.columns-6.cpromo').css({height: (cp6*.66)});\n //console.log(cp6*.66);\n //$('.columns-6 .width6-diamond').css({height: (cp6*0.4)});\n //$('.columns-5.event-feed').css({height: (cp5)});\n // $('.columns-7.trip').css({height: cp5});\n //$('.grid-item-width6.nest').css({height: gi2});\n // $('.grid-item-width6.nest .nested').css({height: gi2});\n //$('.grid-item-width7').css({height: (gi5)});\n $('.grid-item.columns-3').css({height:cp3});\n $('.grid-item.columns-4').css({height:cp4});\n if($wW >= 1000){\n $('.grid-item.columns-6').css({height:cp6*0.66});\n $('.grid-item.columns-4.tweener').css({height:cp4});\n }else{\n $('.grid-item.columns-6').css({height:cp6});\n $('.grid-item.columns-4.tweener').css({height:cp6});\n }\n console.log($wW);\n}", "function grid(dimensions = 16) {\r\n for(let i = 0; i < dimensions; i++) {\r\n divRows[i] = document.createElement(\"div\");\r\n divRows[i].classList.add(\"rows\");\r\n divRows[i].style.height = `calc(100% / ${dimensions})`;\r\n container.appendChild(divRows[i]);\r\n }\r\n \r\n for(let i = 0; i < dimensions; i++) {\r\n for(let j = 0; j < dimensions; j++) {\r\n divCols[j] = document.createElement(\"div\");\r\n divCols[j].classList.add(\"cols\");\r\n divRows[i].appendChild(divCols[j]);\r\n \r\n divRows[i].children[j].onmouseover = function() {\r\n divRows[i].children[j].style.backgroundColor = setColor();\r\n }\r\n \r\n }\r\n }\r\n}", "function drawGrid() {\n\t\t\t// add container styles\n\t\t\t$container.addClass('container gantt');\n\t\t\t\n\t\t\t// empty container\n\t\t\t$container.empty();\n\t\t\t\t\t\t\n\t\t\t// render contents into container\n\t\t\t$container.append(gridTmpl(controller));\t\n\t\t\tinitEls();\n\t\t\t\n\t\t\t// adjust layout components\n\t\t\tadjustLayout();\n\t\t\tinitHScroller();\t\t\t\n\t\t}", "initGrid () {\n\n // Init all rows one by one\n for ( const [ , row ] of this.rows.entries () ) {\n this.initSortableRow ( row );\n }\n\n // Init sortable grid\n Sortable.create (\n this.$el.firstChild,\n {\n ...this.getSortableOptions,\n ...{\n group: {\n name: 'vgd-rows',\n pull: 'vgd-rows',\n put : 'vgd-rows'\n }\n }\n }\n );\n\n this.setModeClass();\n\n this.$emit ( 'ready' );\n\n }", "function generage_grid() {\n\n for (var i = 0; i < rows; i++) {\n $('.grid-container').append('<div class=\"grid-row\"></div>');\n }\n\n\n $('.grid-row').each(function () {\n for (i = 0; i < columns; i++) {\n $(this).append('<div class=\"grid-cell\"></div>')\n }\n });\n\n var game_container_height = (34.5 * rows)\n $('.game-container').height(game_container_height);\n var game_container_width = (34.5 * columns)\n $('.game-container').width(game_container_width);\n }", "setLayout() {\n const {\n container,\n state,\n } = this\n const {\n heights,\n } = state\n var element = document.querySelector('.masonry-panel'),\n elements = document.querySelectorAll('.masonry-panel'),\n style = window.getComputedStyle(element),\n width = style.getPropertyValue('width');\n width = width.replace('px', '');\n width = width/window.innerWidth;\n var cols = Math.ceil(1/width) - 1;\n var number = (Math.ceil(elements.length/cols) + 1);\n this.state.maxHeight = (Math.max(...heights));\n var targetHeight = this.state.maxHeight + (17 * number);\n container.style.height = `${targetHeight}px`\n }", "function simpleLayoutChanges() {\n \"use strict\";\n var container = $('.container').width();\n $('.testimonial_carousel .item').each(function() {\n\n var self = $(this);\n var wpb_column = self.parents('.wpb_column').first().width();\n self.innerWidth(wpb_column + 'px');\n self.height(self.height() + 'px');\n self.parents('.caroufredsel_wrapper').first().height(self.height() + 'px');\n self.parents('.testimonial_carousel').first().height(self.height() + 'px');\n\n });\n\n $('.clients_caro .item').each(function() {\n var self = $(this);\n var wpb_column = self.parents('.vc_column-inner').width();\n\n if (container > 420 && container <= 724) {\n self.innerWidth((wpb_column / 3) + 'px');\n }\n if (container > 724 && container < 940) {\n self.innerWidth((wpb_column / 4) + 'px');\n }\n if (container > 940) {\n self.innerWidth((wpb_column / 6) + 'px');\n }\n });\n\n clientsCarousel();\n }", "_resize() {\n // Reset\n set_css_var('--grid-width', '100%');\n set_css_var('--grid-height', '100%');\n set_css_var('--grid-padding', '0');\n set_css_var('--font-size-normal', '0px');\n set_css_var('--font-size-flash', '0px');\n set_css_var('--font-size-focus', '0px');\n // Compute sizes\n let columns = this.options.grid.columns;\n let rows = Math.ceil(this.options.symbols.length / columns);\n let grid_width = this.options.grid.element.clientWidth;\n let grid_height = this.options.grid.element.clientHeight;\n let grid_padding = 0;\n if (this.options.grid.ratio) {\n let ratio = this.options.grid.ratio.split(':');\n if (ratio[0] * grid_height >= grid_width * ratio[1]) {\n let height = (ratio[1] * grid_width) / ratio[0];\n grid_padding = (grid_height - height) / 2 + \"px 0\";\n grid_height = height;\n\n } else {\n let width = (ratio[0] * grid_height) / ratio[1];\n grid_padding = \"0 \" + (grid_width - width) / 2 + \"px\";\n grid_width = width;\n }\n }\n let cell_width = grid_width / columns;\n let cell_height = grid_height / rows;\n let cell_size = (cell_width > cell_height) ? cell_height : cell_width;\n let cell_size_off = Math.ceil(cell_size * .5);\n let cell_size_on = this.options.stim.magnify ? Math.ceil(cell_size * .80) : cell_size_off;\n // Adjust\n set_css_var('--grid-width', grid_width + 'px');\n set_css_var('--grid-height', grid_height + 'px');\n set_css_var('--grid-padding', grid_padding);\n set_css_var('--font-size-normal', cell_size_off + 'px');\n set_css_var('--font-size-flash', cell_size_on + 'px');\n set_css_var('--font-size-focus', cell_size_on + 'px');\n }", "function Layout(){\r\n for(let i=0;i<squares.length;i++)\r\n {\r\n let divs = document.createElement(\"div\")\r\n grid.appendChild(divs)\r\n square.push(divs)\r\n if(squares[i]===1) square[i].classList.add(\"wall\")\r\n else if(squares[i]===0) square[i].classList.add(\"pac-dots\")\r\n else if(squares[i]===3) square[i].classList.add(\"power-pellet\")\r\n else if(squares[i]===2) square[i].classList.add(\"ghost-liar\")\r\n }\r\n}", "function createGrid(){\n\n etchContainer.style.gridTemplateColumns = `repeat(${gridSize}, 1fr)`;\n etchContainer.style.gridTemplateRows = `repeat(${gridSize}, 1fr)`;\n \n for (let i = 0; i < gridSize * gridSize; i++){\n let etchSquareDiv = document.createElement(\"div\");\n etchSquareDiv.className = 'etchSquare';\n\n //add listener to change the color, for the sketching purposes\n etchSquareDiv.addEventListener(\"mouseenter\", function(){\n etchSquareDiv.style.backgroundColor = 'black';\n })\n\n etchContainer.appendChild(etchSquareDiv);\n } \n}", "_renderGrid() {\n\n\t\tconst $wrapper= document.createElement('div');\n\t\t$wrapper.classList.add('wrapper');\n\n\t\t// Iterate trough the grid and create elements to render\n\t\tthis._grid.forEach( (row, i) => {\n\n\t\t\tconst $row= document.createElement('div');\n\t\t\t$row.classList.add('board-row');\n\n\t\t\trow.forEach( (col, j) => {\n\n\t\t\t\tconst $col= document.createElement('mem-card');\n\n\t\t\t\t// Set properties\n\t\t\t\t$col.setAttribute('cardid', col.id);\n\t\t\t\t$col.setAttribute('image', col.image);\n\t\t\t\t$col.setAttribute('row', i);\n\t\t\t\t$col.setAttribute('col', j);\n\n\t\t\t\t$col.parentClickHandlerHook= (rowID, colID)=> this._cardSelectHandler(rowID, colID);\n\n\t\t\t\t$row.appendChild($col);\n\n\t\t\t\tcol['$elem']= $col;\n\t\t\t});\n\n\t\t\t$wrapper.appendChild($row);\n\t\t});\n\n\t\treturn $wrapper;\n\t}", "function defineGrid(n){\n\t\tvar boardDiv = document.getElementsByClassName(\"boardCls\")[0] ;\n\t\t$(\"#board\").html(\"\")\n\t\tlet cnt=0 ;\n\t\tfor(let i=0;i<n;i++)\n\t\t{\n\t\t\tvar rowDiv = document.createElement(\"div\") ;\n\t\t\trowDiv.classList.add(\"row\") ;\n\t\t\trowDiv.style.height=(580/n)+\"px\";\n\n\t\t\tfor(let j=0;j<n;j++)\n\t\t\t{\n\t\t\t\tvar singleDiv = document.createElement(\"div\") ;\n\t\t\t\tsingleDiv.classList.add(\"block\") ;\n\t\t\t\tsingleDiv.style.width=(580/n)+\"px\" ;\n\t\t\t\tvar para = document.createElement(\"p\") ;\n\t\t\t\tpara.classList.add(\"number\") ;\n\t\t\t\t\n\t\t\t\tsingleDiv.id=\"block-\"+cnt ;\n\t\t\t\tpara.id=\"blk-\"+cnt;\n\t\t\t\tcnt++ ;\n\t\t\t\tsingleDiv.appendChild(para) ;\n\t\t\t\trowDiv.appendChild(singleDiv) ;\n\t\t\t}\n\t\t\tboardDiv.appendChild(rowDiv) ;\n\t\t}\n\t}", "generateGridItems() {\n let items = this.state.items;\n return _.map(this.state.layouts.lg, function (l, i) {\n return (\n <div key={i}>\n <GridItem title={items[i].title} text={items[i].text} />\n </div>);\n });\n }", "function resize(){\n //clearing elements from container\n container.innerHTML = '';\n //making the dimensions of the grid fit to 500x500 pixels \n let gridDimensions = \"\";\n for(let i = 0; i < dimension; i++)\n {\n gridDimensions += gridSize + \" \";\n }\n\n container.style.gridTemplateRows = gridDimensions;\n container.style.gridTemplateColumns = gridDimensions;\n\n for(let i = 1; i <= dimension; i++){\n for(let j = 1; j <= dimension; j++){\n let content = document.createElement('div');\n content.setAttribute(\"class\", \"box\");\n container.appendChild(content);\n content.style.gridColumnStart = j;\n content.style.gridRowStart = i;\n }\n }\n\n //grid elements change color on hover\n let squares = document.querySelectorAll('.box');\n let colors = ['blue', 'red', 'yellow', 'purple', 'peach', 'orange', 'turquoise', 'pink', 'green', 'lime', 'brown', 'teal'];\n squares.forEach(square =>{\n square.addEventListener('mouseover', function(e){\n let num = Math.floor(Math.random()*12);\n e.target.style.background = colors[num];\n })\n })\n}", "function fillGrid() {\n let grid = 9;\n\n let gridArr = [];\n for (let i = 0; i < grid; i++) {\n const newDiv = document.createElement(\"div\");\n newDiv.classList.add(\"gam-layout\");\n newDiv.setAttribute(\"id\", `${i}`);\n gridArr.push(newDiv);\n gridCont.appendChild(newDiv);\n }\n return gridArr;\n }", "function runjsPersoreselGrid(){\n\n if(window.screen.availWidth < 1100){\n $('#optim-big-scr').html('Cet écran a été optimisé pour téléphone mobile.');\n // Mobile\n responsivefields = [\n { name: \"ref_tag\",\n title: \"#\",\n type: \"text\",\n align: \"left\",\n width: 95,\n headercss: \"h-jsG-l\",\n itemTemplate: function(value, item) {\n return '<i class=\"monosp-ft-mob\">' + value + '</i>';\n }\n },\n { name: \"status\",\n title: '<i class=\"far fa-edit\"></i>',\n type: \"text\",\n align: \"center\",\n width: 25,\n headercss: \"h-jsG-c\",\n itemTemplate: function(value, item) {\n\n switch (value.toString()) {\n case '3':\n //return item.type_pack;\n return (item.type_pack == 'P') ? '<i class=\"mgs-red fas fa-pen-square\"></i>' : '<i class=\"fas fa-arrow-circle-right\"></i>';\n break;\n case '10':\n return '<i class=\"fas fa-hand-holding-heart\"></i>';\n break;\n default:\n return '<i class=\"fas fa-arrow-circle-right\"></i>';\n }\n }\n },\n { name: \"part_name\",\n title: 'Part.',\n type: \"text\",\n align: \"center\",\n width: 65,\n headercss: \"h-jsG-c\",\n itemTemplate: function(value, item) {\n return ((value == null) ? '-' : value.substring(0, STR_LENGTH_SM));\n }\n },\n {\n name: \"paid_code\",\n title: '<i class=\"fas fa-receipt\"></i>',\n type: \"number\",\n width: 30,\n headercss: \"h-jsG-c\",\n itemTemplate: function(value, item) {\n return '<p class=\"center\">' + ((item.hdl_price == 'N') ? '<i class=\"fas fa-window-close\"></i>' : value) + '</p>';\n\n }\n },\n //Default width is auto\n { name: \"bcdescription\",\n title: '<i class=\"fas fa-info-circle\"></i>',\n type: \"text\",\n headercss: \"h-jsG-c\",\n itemTemplate: function(value, item) {\n return ((value == null) ? '-' : value.substring(0, STR_LENGTH_SM));\n }\n }\n ];\n }\n else{\n // Big screens\n responsivefields = [\n { name: \"ref_tag\",\n title: \"Référence\",\n type: \"text\",\n align: \"right\",\n width: 43,\n headercss: \"h-jsG-r\",\n itemTemplate: function(value, item) {\n return '<i class=\"monosp-ft\">' + value + '</i>';\n }\n },\n { name: \"step\",\n title: \"Status\",\n type: \"text\",\n width: 55,\n headercss: \"h-jsG-l\",\n itemTemplate: function(value, item) {\n return ((value == null) ? '-' : value.substring(0, STR_LENGTH_XXL));\n }\n },\n { name: \"status\",\n title: '<i class=\"far fa-edit\"></i>',\n type: \"text\",\n align: \"center\",\n width: 10,\n headercss: \"h-jsG-c\",\n itemTemplate: function(value, item) {\n return ((value == '3') && (item.type_pack == 'P')) ? '<i class=\"mgs-red fas fa-pen-square\"></i>' : '<i class=\"fas fa-window-close\"></i>';\n }\n },\n { name: \"type_pack\",\n title: '<i class=\"fas fa-barcode\"></i>',\n type: \"text\",\n align: \"center\",\n width: 10,\n headercss: \"h-jsG-c\",\n itemTemplate: function(value, item) {\n return (value == 'D') ? '<i class=\"c-w fas fa-box\"></i>' : '<i class=\"c-b fas fa-truck\"></i>';\n }\n },\n //Default width is auto\n { name: \"part_name\",\n title: \"Nom partenaire\",\n type: \"text\",\n width: 45,\n headercss: \"h-jsG-l\",\n itemTemplate: function(value, item) {\n return ((value == null) ? '-' : value.substring(0, STR_LENGTH_XL));\n }\n },\n { name: \"bcdescription\",\n title: \"Description\",\n type: \"text\",\n headercss: \"h-jsG-l\",\n itemTemplate: function(value, item) {\n return ((value == null) ? '-' : value.substring(0, STR_LENGTH_XXL));\n }\n },\n { name: \"create_date\", title: \"Créé le\", type: \"text\", width: 30, headercss: \"h-jsG-l\" },\n { name: \"diff_days\",\n title: '<i class=\"fas fa-stopwatch\"></i>',\n type: \"number\",\n width: 3,\n headercss: \"h-jsG-c\",\n itemTemplate: function(value, item) {\n return '<p class=\"center\">' + value + '</p>';\n }\n },\n {\n name: \"paid_code\",\n title: '<i class=\"fas fa-receipt\"></i>',\n type: \"number\",\n width: 3,\n headercss: \"h-jsG-c\",\n itemTemplate: function(value, item) {\n return '<p class=\"center\">' + ((item.hdl_price == 'N') ? '<i class=\"fas fa-window-close\"></i>' : value) + '</p>';\n // return item.hdl_price;\n }\n }\n\n ];\n }\n\n\n $(\"#nb-el-dash\").html(filteredDataTagToJsonArray.length);\n if(dataTagToJsonArray.length > 0){\n $(\"#jsGrid\").jsGrid({\n height: \"auto\",\n width: \"100%\",\n\n sorting: true,\n paging: true,\n // args are item - itemIndex - event\n rowClick: function(args){\n goToBarcode(args.item.id, args.item.secure)\n },\n data: filteredDataTagToJsonArray,\n\n fields: responsivefields\n });\n }\n else{\n $(\"#jsGrid\").hide();\n }\n}", "function social_curator_masonry_callback(element){}", "function changeGridSize(){\n gridContainer.innerHTML = ''; //clear grid Container before adding new divs\n let gridSize = parseInt(slider.value,10);\n for (let i=1; i<=Math.pow(gridSize,2); i++){\n addElement();\n\n };\n gridContainer.style[\"grid-template-columns\"] = \"repeat(\" + gridSize + \", 1fr)\";\n}", "function gridify_the_canvas(canvas){\n\t\n\t\n\tvar counter = 0, row = 0, column = 0 ;\n\t\t\n\tfor(y=0 ; y< canvas.height; y+= gridSpace_height){ \t\n\t\tfor(x=0 ; x < canvas.width; x+= gridSpace_width){ \n\t\t\t\n\t\t\t\n\t\t\tcenterPoint = {'x': column*gridSpace_width + gridSpace_width/2 ,\n\t\t\t\t'y': row*gridSpace_height + gridSpace_height/2 };\n\t\t\tvar topLeft = {'x': x, 'y': y}, topRight = {'x': x +gridSpace_width, 'y': y},\n\t\t\tbottomLeft = { 'x' : x, 'y': y + gridSpace_height }, \n\t\t\tbottomRight = {'x' : x+gridSpace_width, 'y': y + gridSpace_height }\t\n\t\t\t\n\t\t\tvar grid = new createjs.Grid({ 'width' : gridSpace_width,\n\t\t\t 'height' : gridSpace_height, 'row' : row, 'column': column,\n\t\t\t 'centerPoint': centerPoint, 'topLeft': topLeft ,\n\t\t\t 'topRight': topRight, 'bottomLeft': bottomLeft, 'bottomRight': bottomRight,\n\t\t\t 'order': counter, 'name' : 'grid_' + counter\t\t\t \n\t\t\t });\n\t\t\t\n\t\t\tgrids.push( grid);//I want global access to them\n\t\t\tstage.addChild(grid);\n\t\t\t\n\t\t\tcounter++;\n\t\t\tcolumn++; \t\n\t\t\t\n\t\t\t\n\t\t}\n\t\trow++; column = 0;\t\n\t}\n\t\n\t//Lets set some general grid information for snapping\n\tvar number_of_grids_in_one_row = canvas.width / gridSpace_width,\n\t number_of_grids_in_one_column = canvas.height / gridSpace_height;\n\t\t\n\tgridInformation.number_of_grids_in_one_row =number_of_grids_in_one_row;\n\tgridInformation.number_of_grids_in_one_column = number_of_grids_in_one_column;\n\tgridInformation.number_of_grids = number_of_grids_in_one_row\n\t\t* number_of_grids_in_one_column;\n\t\n\tgridInformation.row_index = function(me){\n\t\tvar row_index = [];\n\t\tfor (var i = 0; i <= me.number_of_grids_in_one_column; i++) {\n\t\t\trow_index.push(i);\n\t\t}\n\t\t \n\t\treturn row_index;\t\n\t}(gridInformation)\n\t\n\t\t\t\n\t\t\n}", "function setGridSize(){\n numHorzItems = Math.floor(screenWidth/originalImageSize);\n\n \n var widthOffset = (numHorzItems*originalImageSize) - screenWidth;\n widthOffset = widthOffset/numHorzItems;\n var newwidth = originalImageSize - widthOffset;\n var newHeight = newwidth;\n imageHeight = imageWidth = newwidth;\n\n numVertItems = Math.ceil(screenHeight/newHeight);\n\n numItems = numHorzItems * numVertItems;\n\n if(numItems > 20){\n originalImageSize += 50;\n\n setGridSize();\n }\n else{\n for (var j=0; j<numVertItems; j++)\n {\n for (var i=0; i<numHorzItems; i++)\n {\n var xPos = 0 + (i*newwidth);\n var yPos = 0 + (j*newHeight);\n\n var index = (numHorzItems * j) + i;\n\n indexIsAnimating[index] = false;\n\n $grid = $(\".grid\").append(\"<div class='grid-item' id='image\" + index + \"' style='width:\" + newwidth + \"px; left: \" + xPos + \"px; top: \" + yPos + \"px'></div>\");\n $tiles = $grid.children('.grid-item');\n\n }\n }\n }\n}", "function gridSize(n) {\n const grid = document.getElementById('container');\n // Grid is adaptive and always equal on rows & columns using repeat & 1fr\n grid.style.gridTemplateColumns = `repeat(${n}, 1fr)`\n grid.style.gridTemplateRows = `repeat(${n}, 1fr)`\n let gridXY = n * n;\n\n // Creates divs to act as the rows/columns for the CSS Grid\n for (let i = 0; i < gridXY; i++) {\n const rows = document.createElement('div');\n rows.classList.add('rows');\n rows.style.opacity = '1';\n rows.addEventListener('mouseenter', bgColor);\n container.appendChild(rows);\n }\n}", "function renderGrids(x){\n\t\tfor (var i = 0; i < x; i++){\n\t\t\tvar pixels = document.createElement('div');\n\t\t\tpixels.className = 'miniDiv';\n\t\t\tcontainer.appendChild(pixels);\n\t\t}\n\t}", "function makeGrid(rows, cols) {\n container.style.setProperty('--grid-rows', rows);\n container.style.setProperty('--grid-cols', cols);\n for (c = 0; c < (rows * cols); c++) {\n let cell = document.createElement(\"div\");\n container.appendChild(cell).className = \"grid-item\";\n cells[c] = cell;\n cells[c].style.backgroundColor = \"white\"\n };\n}", "function loadGrid() {\n \n }", "function resizeSmall (rows, columns) {\n container.style.gridTemplateRows = `repeat(${rows}, 25px`;\n container.style.gridTemplateColumns = `repeat(${columns}, 25px`;\n console.log(cSize);\n \n for(var i = 0; i < totalCells; i++) {\n var cell = document.createElement('div');\n container.appendChild(cell).className = 'item';\n console.log('Test1'); \n }\n}", "function makeGrid(cols, rows) {\n for (let i = 0; i < (cols * rows); i++) {\n const div = document.createElement('div');\n div.style.border = '1px solid black';\n container.style.gridTemplateColumns = `repeat(${cols}, 1fr)`;\n container.style.gridTemplateRows = `repeat(${rows}, 1fr)`;\n container.appendChild(div).classList.add('box');\n }\n}", "function makeGrid(number) {\nfor (i = 0; i < (number * number); i++) {\n container.style.gridTemplateColumns = `repeat(${number}, auto)`;\n const square1 = document.createElement('div');\n square1.classList.add('square1');\n let size = 700/number\n square1.style.width = size;\n square1.style.height = size;\n container.appendChild(square1);\n }\n}", "updateInnerHeightDependingOnChilds(){this.__cacheWidthPerColumn=null,this.__asyncWorkData[\"System.TcHmiGrid.triggerRebuildAll\"]=!0,this.__asyncWorkData[\"System.TcHmiGrid.triggerRecheckHeight\"]=!0,this.__requestAsyncWork()}", "fixSizes() {\n // subGrid width\n this.callEachSubGrid('fixWidths');\n }", "fixSizes() {\n // subGrid width\n this.callEachSubGrid('fixWidths');\n }", "function createGrid(rows, cols) {\n for (i=0; i < (rows * cols); i++) {\n let grid = document.createElement('div');\n newContainer.appendChild(grid).className = 'grid-item';\n \n grid.addEventListener('mouseover', () => {\n console.log('mouse over');\n grid.style.backgroundColor = \"purple\";\n })\n \n grid.addEventListener('mouseleave', () => {\n console.log('mouse leave');\n })\n \n };\n}", "updateInnerWidthDependingOnChilds(){this.__cacheWidthPerColumn=null,this.__asyncWorkData[\"System.TcHmiGrid.triggerRebuildAll\"]=!0,this.__requestAsyncWork()}", "function updateVideoContainerLayout(){\n let cnt = 0;\n $('.ele',videosContainer).each(function(i,e){\n if(e.style.display!='none')cnt++;\n })\n if(cnt<=1){\n $(videosContainer).css('grid-template-columns','repeat(1, minmax(0, 1fr))');\n $(videosContainer).css('grid-template-rows','repeat(1, minmax(0, 1fr))');\n }\n else if(cnt<=2){\n $(videosContainer).css('grid-template-columns','repeat(2, minmax(0, 1fr))');\n $(videosContainer).css('grid-template-rows','repeat(1, minmax(0, 1fr))');\n }\n else if (cnt<=4){\n $(videosContainer).css('grid-template-columns','repeat(2, minmax(0, 1fr))');\n $(videosContainer).css('grid-template-rows','repeat(2, minmax(0, 1fr))');\n }\n else if (cnt<=6){\n $(videosContainer).css('grid-template-columns','repeat(3, minmax(0, 1fr))');\n $(videosContainer).css('grid-template-rows','repeat(2, minmax(0, 1fr))');\n }\n else if (cnt<=9){\n $(videosContainer).css('grid-template-columns','repeat(3, minmax(0, 1fr))');\n $(videosContainer).css('grid-template-rows','repeat(3, minmax(0, 1fr))');\n }else{\n $(videosContainer).css('grid-template-rows','unset');\n $('.ele').css('min-height', '220px')\n }\n}", "_updateFlexibleRects() {\n this.__views.forEach(_view => {\n if (_view && (_view.flexRight || _view.flexBottom)) {\n _view.rect._updateFlexibleDimensions();\n }\n });\n }", "gridHeight(x,z,index,col,row) {\n return 0;\n }", "calcGridBody(props,scrollBarWide)\n {\n if(props.debugGridMath){\n console.log('do the math');\n }\n \n // object to return\n var result={};\n result.keyNames=[]; // always the keys present either from data inspection, or column definition\n result.showBottomGridLine=false;\n result.rowHeaderList=[];\n result.colHeaderKeyList=[]; // when pivoted, this will NOT match the keyNames list.\n result.saveColumnForRowHeader=0;\n result.debugGridMath = props.debugGridMath;\n\n // math needs access to columns by key name.\n if (props.columnList && props.columnList.length>0) {\n result.colDefListByKey = {};\n // make a map of keys to objects for easy access later.\n for (var clctr = 0; clctr < props.columnList.length; clctr++) {\n result.colDefListByKey[props.columnList[clctr].key] = props.columnList[clctr];\n }\n }\n else {\n result.colDefListByKey = {};\n } \n\n // empty object checking & data cleanup\n if(!scrollBarWide){ result.notReady='missing scrollbar size'; return result }\n if(!props){ result.notReady='missing grid props'; return result }\n if(!props.data && !props.columnList){ result.notReady = \"No Data Provided\"; return result } \n\n // try to handle bad input data\n var data = props.data;\n if(!props.data && props.columnList){ data=[]; } \n\n if( (typeof data === 'string' || data instanceof String) || // array of strings\n (typeof data === 'number' && isFinite(data) ) || // array of numbers\n (typeof data === 'boolean') ){ // array of booleans\n result.notReady='Grid data must be an array'; return result;\n }\n\n // don't us foo.isArray because MobX and other arrays don't look like arrays, but are.\n if(!data.length && 0!==data.length){ result.notReady = \"Input Data is not an array\"; return result } \n if(data.length===0 && !props.columnList){ result.notReady = \"No sample data supplied and no column definition list supplied. To start with an empty array, please define the columns.\"; return result; }\n if(data.length>0 && !props.columnList &&\n (data[0]===null || typeof data[0] === 'undefined')){ \n result.notReady = \"Falsey sample data supplied with no column definition list supplied.\"; return result; \n }\n\n // add validation that \"px\" should not be used, and only numbers should be passed as parameters.\n\n if( data[0] && typeof data[0] === 'object' && data[0].constructor === RegExp){ result.notReady = \"Grids of RegExp objects are not supported.\"; return result; }\n if(typeof data[0] === 'symbol'){ result.notReady = \"Grids of Symbol objects are not supported.\"; return result; }\n if(typeof data[0] === 'function'){ result.notReady = \"Grids of Function objects are not supported.\"; return result; }\n\n // if it's an array of primitivs, make sure to treat it as if it were an array of objects\n if( (typeof data[0] === 'string' || data[0] instanceof String) || // array of strings\n (typeof data[0] === 'number' && isFinite(data[0]) ) || // array of numbers\n (typeof data[0] === 'boolean') ){ // array of booleans\n result.isPrimitiveData=true;\n }\n\n // general info\n result.borderWide = this.makeValidInt(props.borderWide,1);\n result.padWide = this.makeValidInt(props.padWide, 3);\n \n result.gridWide = this.makeValidInt(props.gridWide,800);\n result.autoColWide = 0; // width of the default filled column, before weights\n result.fixedRowCount = props.rowCount; // what is the rowCount limit\n\n result.editDisabled = props.editDisabled || false;\n\n // how high is each row: user requested height does NOT include padding. \n result.rowHighNoPad = this.makeValidInt(props.rowHigh, 18);\n if (-1 === result.rowHighNoPad) { result.rowHighNoPad=23;}\n result.rowHighWithPad = this.makeValidInt(result.rowHighNoPad, 18);\n result.rowHighWithPad += result.padWide;\n result.rowHighWithPad += result.padWide;\n \n // column header height\n result.colHeaderHigh = (props.colHeaderHigh||-1);\n if (-1 === result.colHeaderHigh) { result.colHeaderHigh = 18; }\n if (props.colHeaderHide) { result.colHeaderHigh = 0; } // hide not wide or high\n\n // grid height\n var testStyleHeight = null;\n if(props.style){ testStyleHeight = props.style.height}; // needed for null safety on props.style. Needs to remove trailing px or % !!! \n result.gridHigh = testStyleHeight || this.makeValidInt(props.gridHigh) || 400; // read from style, read from attributes, read from gridHigh attribute, default to 300\n if (result.gridHigh === -1) {\n result.gridHigh = 400;\n }\n\n // header height\n if (props.colHeaderHide || result.forceColHeaderHide) { // provide a header row.\n result.headerUsage=1;\n }\n else{\n result.headerUsage=(result.colHeaderHigh+(2*result.padWide)+(2*result.borderWide));\n }\n\n // tools height\n result.toolUsage = 0;\n if(props.showToolsAddCut || props.showToolsImpExp || props.showToolsPage || props.showToolsCustom){\n result.toolUsage = 35;\n }\n\n // collapsed grid height\n result.collapseAmount=0;\n\n result.formatDate = props.formatDate||'YYYY-MM-DD';\n result.formatTime = props.formatTime||'HH:mm';\n\n var autoColCount=0;\n // look at the data to display and figure out what we need to do.\n if( (data && data.length>0) || (props.columnList && props.columnList.length>0) ){ // col def from colList or from data\n if(result.isPrimitiveData){\n // ==== PRIMITIVES we have only one line of data to display\n result.keyNames.push('data');\n if(props.pivotOn){\n result.rowHeaderList=['data']; // one row header\n result.fixedRowCount = 1; // one row\n result.saveColumnForRowHeader=1; // will have a row header.\n result.forceColHeaderHide=true; // no column headers allowed on pivoted primitives.\n result.headerUsage=1;\n result.colHeaderKeyList=[]; // I mean it: no column headers allowed!\n result.colHeaderKeyList.push('\\\\'); // extra column on header for row headers.\n for(var pctr=0;pctr<data.length;pctr++){ // pivot uses pivotOn key for column header keys\n result.colHeaderKeyList.push(pctr); // key (or maybe value) for the column header. Only used for autoColWide calculation\n }\n result.dataWide = data.length; // length => width\n result.dataHigh = 1; // 1 row hight\n }\n else{\n result.colHeaderKeyList=result.keyNames; // just one header\n result.fixedRowCount = data.length; // amount of data is the rows\n result.dataWide = 1; // 1 item wide.\n result.dataHigh = data.length; // length items tall.\n }\n }\n else{\n // ==== OBJECTS we have rows of objects to display\n if(props.pivotOn){ // pivot the data using this key as the col header\n //---- PIVOTED FLOW\n /*\n if(props.columnList){ // pull key data from col def list first, but from data if cols are not defined\n result.colHeaderKeyList.push('\\\\'); // extra column on header for row headers.\n for (var pctr = 0; pctr < props.columnList.length;pctr++){ // pivot uses pivotOn key for column header keys\n result.colHeaderKeyList.push(props.columnList[pctr].key); // key (or maybe value) for the column header\n }\n }\n else{ \n */\n result.colHeaderKeyList.push('\\\\'); // extra column on header for row headers.\n var temp = Object.keys(data[0]);\n for(var pctr=0;pctr<data.length;pctr++){ // pivot uses pivotOn key for column header keys\n result.colHeaderKeyList.push(temp[pctr]);\n }\n //}\n\n result.rowHeaderList = Object.keys(data[0]); // pull headers from data. Should there be a colDef check here?\n result.keyNames = result.rowHeaderList; // object props are row headers\n result.saveColumnForRowHeader=1; // save a space for the row header.\n result.fixedRowCount = result.rowHeaderList.length; // one row per property\n result.dataWide = data.length; // one col per data item\n result.dataHigh = result.rowHeaderList.length; // one row per property.\n }\n else{\n //---- NORMAL FLOW\n if(props.columnList){ // pull key data from col def list first, but from data if cols are not defined\n for(var cctr=0;cctr<props.columnList.length;cctr++){\n result.colHeaderKeyList.push(props.columnList[cctr]['key']); // column for each definition\n }\n if(data && data[0]){\n result.keyNames = Object.keys(data[0]); // hang on to the key names from the object if they're around\n }\n else{\n result.keyNames = result.colHeaderKeyList; // otherwise use the column defs if we don't have any data to use as a template.\n }\n result.dataWide = result.colHeaderKeyList.length; // column definition count => data width. (data high handled later)\n }\n else{ // no column defs, inspect the first object.\n if(data[0].length){ // probably an array-look-alike. Use indexes\n for (var ictr = 0; ictr < data[0].length;ictr++){\n result.keyNames.push(ictr);\n }\n result.colHeaderKeyList = result.keyNames; // keys => columns here\n result.dataWide = data[0].length; // keynames is width (data high handled later)\n }\n else{ // likely an object. Treat it normally.\n result.keyNames = Object.keys(data[0]); // pull the key names\n result.colHeaderKeyList = result.keyNames; // keys => columns here\n result.dataWide = result.keyNames.length; // keynames is width (data high handled later)\n }\n } \n\n result.fixedRowCount = data.length; // allow over-ride item count.\n result.dataHigh = result.fixedRowCount; \n } \n }\n\n // fix degenerate sizing\n if(result.gridWide < scrollBarWide + 10*result.keyNames.length){\n result.gridWide = scrollBarWide + 10*result.keyNames.length;\n }\n result.rowWide = result.gridWide - (scrollBarWide||16); // how wide is each row.\n autoColCount = result.colHeaderKeyList.length;\n if(props.pivotOn && props.pivotRowHeaderWide && props.pivotRowHeaderWide!==-1){\n // don't autoColCount the rowHeader\n autoColCount--;\n }\n\n //==== now calculate column actual sizes and autocol size\n\n var availableWide = result.rowWide; // amount of space to allocate evenly\n var fixedWide = 0; // becomes the new rowWide is all columns are specified\n var change = 0;\n if (props.columnList && result.colHeaderKeyList.length && !props.pivotOn){ // only autosize allowed on pivoted data\n autoColCount = 0; // number of columns that need auto width, i.e. column defs without a pct or px\n for (var cctr = 0; cctr < result.colHeaderKeyList.length;cctr++){\n change=0;\n \n if (result.colDefListByKey[result.colHeaderKeyList[cctr]]) { // is there a colDef that uses this key?\n if (result.colDefListByKey[result.colHeaderKeyList[cctr]].widePx) {\n change = Number(result.colDefListByKey[result.colHeaderKeyList[cctr]].widePx);\n result.colDefListByKey[result.colHeaderKeyList[cctr]].forceColWide = change; // do this before considering the pad and border.\n change += Number(result.borderWide) + Number(result.padWide) + Number(result.padWide);\n fixedWide+=change;\n availableWide -= change;\n }\n else if (result.colDefListByKey[result.colHeaderKeyList[cctr]].widePct) {\n change = (Number(result.rowWide) * (Number(result.colDefListByKey[result.colHeaderKeyList[cctr]].widePct) / 100));\n result.colDefListByKey[result.colHeaderKeyList[cctr]].forceColWide = change; // do this before considering the pad and border.\n change += Number(result.borderWide) + Number(result.padWide) + Number(result.padWide);\n fixedWide += change;\n availableWide -= change;\n }\n else{\n autoColCount++;\n }\n }\n }\n }\n if(props.pivotOn && props.pivotRowHeaderWide && props.pivotRowHeaderWide!==-1){\n result.pivotRowHeaderWide = Number(props.pivotRowHeaderWide);\n result.pivotRowHeaderWideTotal = result.pivotRowHeaderWide;\n result.pivotRowHeaderWideTotal += (result.borderWide); // each column minus right border amount\n result.pivotRowHeaderWideTotal += (result.padWide); // each column minus left pad amount\n result.pivotRowHeaderWideTotal += (result.padWide); // each column minus right pad amount\n availableWide -= result.pivotRowHeaderWideTotal; // allow a set width pivot header, but still only autocol for pivoted data\n }\n else{\n result.pivotRowHeaderWide = 0;\n result.pivotRowHeaderWideTotal=0;\n }\n //if(autoColCount===0 && fixedWide<result.rowWide){ result.rowWide=fixedWide; } // all columns have a fixed width & smaller than available space. This basically moves the scroll bar;\n\n //--- no column width data\n if(autoColCount>0){\n result.autoColWide = \n ( availableWide - // total width\n result.borderWide // minus left most border bar\n // scrollbar already handled by basin on rowWide.\n ) / (autoColCount)\n }\n else{ result.autoColWide=0; }\n result.autoColWideWithBorderAndPad = result.autoColWide;\n result.autoColWide -= (result.borderWide); // each column minus right border amount\n result.autoColWide -= (result.padWide); // each column minus left pad amount\n result.autoColWide -= (result.padWide); // each column minus right pad amount\n\n // calculate the used row width\n result.rowWide= fixedWide + (result.autoColWideWithBorderAndPad * autoColCount) - result.borderWide;\n\n // How high should the grid be?\n result.dataFullHigh = result.dataHigh * (result.rowHighWithPad + result.borderWide);\n result.dataAvailableHigh = result.gridHigh-result.headerUsage-result.toolUsage; // this is the virtList height.\n \n if(result.dataFullHigh > result.dataAvailableHigh){\n result.showBottomGridLine=true; // less data than space: no bottom line is needed.\n } \n else{\n result.showBottomGridLine=false;\n result.dataAvailableHigh -= (result.borderWide)\n }\n //result.bottomGridLineWide = (result.keyNames.length * (result.autoColWide + result.borderWide + result.padWide + result.padWide))-result.borderWide;\n result.bottomGridLineWide = result.rowWide;\n\n result.bottomLineUsage=0;\n if (result.showBottomGridLine) {\n result.bottomLineUsage = result.borderWide;\n result.dataAvailableHigh -= result.bottomLineUsage;\n }\n\n // fix a degenerate case\n if(result.dataAvailableHigh<0){\n result.dataAvailableHigh=100;\n result.gridHigh=150;\n result.showBottomGridLine=false;\n }\n \n\n // check wether to shrink the grid if there is not enough data to fill it.\n result.collapseAvailable = result.gridHigh - result.headerUsage \n - result.dataFullHigh \n - result.bottomLineUsage \n - (result.borderWide*2)\n - result.toolUsage ; // amount to fill\n\n if(result.collapseAvailable < 0) { result.collapseAvailable = 0 } // amount to shrink by\n result.dataAvailableHigh -= result.collapseAvailable; // don't let the grid consume needless space.\n if (props.gridHighCollapse){\n result.gridHigh -= result.collapseAvailable; // shrink whole component if requested\n }\n\n }\n else if(props.getRowData){\n // ==== ROW DATA METHOD we have rows of objects to display ( check for an array ) \n result.autoColWide=\n result.gridWide -\n (scrollBarWide||20) -\n (result.borderWide*2);\n result.colHeaderKeyList = [\"No Data Provided\"];\n }\n else{\n // ==== NO DATA PROVIDED\n result.autoColWide =\n result.gridWide -\n (scrollBarWide||20) -\n (result.borderWide * 2);\n result.colHeaderKeyList = [\"No Data Provided\"];\n }\n\n \n return result;\n }", "function makeGrid(sizeNum) {\n // remove previous grid?\n for(let i = 0; i < Math.pow(sizeNum, 2); i++) {\n const newDiv = document.createElement('div');\n container.append(newDiv);\n // add class to the new div, \n container.style.gridTemplateColumns = `repeat(${sizeNum}, 1fr)`;\n container.style.gridTemplateRows = `repeat(${sizeNum}, 1fr)`;\n //remove the class from the div\n //on hover change the background color of the current div\n newDiv.addEventListener(\"mouseenter\", function( event ) {\n event.target.classList.add('grid');\n });\n }\n}", "function createGrid(numBox){\n var box = '<div class=\"box\"></div>';\n for(var i = 1; i <= numBox; i++){\n for(var j = 1; j <= numBox; j++){\n $('#container').append('<div class=\"box\"></div>');\n }\n }\n var size = (400 - (numBox * 2)) / numBox;\n $('.box').css({'height': size, 'width': size});\n }", "function makeGrid(height, width) {\n\n for (let r = 0; r < height; r++) {\n let row = shape.insertRow(r);\n\n for (let c = 0; c < width; c++) {\n let cell = row.insertCell(c);\n\n cell.addEventListener('click', (event) => {\n cell.style.backgroundColor = chooseColor.value;\n });\n }\n }\n}", "function addFlexGridDiv(dParent) { return addDivU({ dParent: dParent, className: 'flex-grid' }); }", "function getTreeGrid(data, profileId, blockId, config, divId, changeEventFields, clickEventFields, hierarchyName,gridTheme,mode) {\r\n\tgrid = new flexiciousNmsp.FlexDataGrid(document.getElementById(divId), {\r\n\t\tconfiguration: config,\r\n\t\tdataProvider: data,\r\n\t\tstyles: flexiciousNmsp.UIUtils.getThemeById('viewTemplate').styles\r\n\t});\r\n\t//grid.setFilterVisible(false);\t\r\n\tvar subAction = 'ENTRY';\r\n\t// var jsonData = getInitialData(grid, '&gridId=' + divId + '&blockId=' + blockId + '&previousAction=' + nmsp.previousAction);\r\n\t// grid.maxAutoAdjustHeight = getContentAreaHeight() - 100;\r\n\tgrid.getBodyContainer().verticalMask = 150;\r\n\tgrid.getBodyContainer().enableHorizontalRecycling = false;\r\n\tgrid.profileId = profileId;\r\n\tgrid.blockId = blockId;\r\n\tgrid.mode = mode;\r\n\tgrid.subAction = subAction;\r\n\tgrid.themeId='viewTemplate';\r\n\t// grid.setVerticalScrollPolicy(\"on\");\r\n\t// grid.setHorizontalScrollPolicy(\"on\");\r\n\tgrid.autoSelection = 'Y';\r\n\tgrid.hierarchyName = hierarchyName;\r\n\tgrid.changeEventFields = changeEventFields;\r\n\tgrid.clickEventFields = clickEventFields;\r\n\tgrid.openedLinkDetailsList = [];\r\n\tgrid.errorList={};\r\n\tgrid.toolbarImagesRoot = \"assets/css/images/\";\r\n\t// flexiciousNmsp.Constants.IMAGE_PATH = \"/xelerate/datagrid/flexicious/css/images/\";\r\n\tcreateNameSapceObject(profileId, blockId, subAction, mode, changeEventFields, clickEventFields);\r\n\tgrid.validateNow();\r\n\tvar nmsp = getDataGridNameSpace(profileId, blockId, subAction, mode);\r\n\texpandGridToLevel(grid);\r\n\t$(\":focus\").blur();\r\n\t// columnGroupCreate(grid);\r\n\t// nmsp.dynamicFieldVariation = (jsonData && jsonData.dynamicVariation) ? jsonData.dynamicVariation : [];\r\n\t// if (nmsp.errorListArray && nmsp.errorListArray.length > 0) {\r\n\t// dataGridErrorHighlight($(grid.domElement).closest('form'), nmsp.errorListArray, true);\r\n\t// }\r\n\tvar gridDiv = divId;\r\n\tvar gridblockId = blockId;\r\n\t// createSnapShot(profileId, blockId, subAction, mode);\r\n\treturn grid;\r\n}", "function component_grid_resize() {\n for (var i = 0; i < $grid_components.length; i++) {\n var $grid = $($grid_components[i]);\n var $table = $grid.find('.webform-grid');\n var has_overflow = $grid.width() < $table.width();\n if (has_overflow && !is_overflowing) {\n is_overflowing = true;\n $grid.addClass('is-overflowing');\n }\n else if (!has_overflow && is_overflowing) {\n is_overflowing = false;\n $grid.removeClass('is-overflowing');\n }\n }\n }", "function createGrid(size = 4) {\n \n if ( size > 64 || isNaN(size)) return alert('the number has to be less than 64');\n \n for (let i = 0 ; i<size*size; i++){\n const createDivs = document.createElement('div');\n createDivs.style.width = `${(100/size)-0.4}%`;\n createDivs.classList.add('grid');\n main.appendChild(createDivs);\n}\n mouseOver();\n}", "drawGrid() {\n translate(this.xOffset, this.yOffset);\n background(color('black'));\n for (let x = 0; x <= this.width; x++) {\n\n for (let y = 0; y <= this.height; y++) {\n fill(color('white'))\n strokeWeight(1);\n rect(x * this.boxSize, y * this.boxSize, this.boxSize, this.boxSize);\n\n // Draw the position of the entry\n fill(color('gray'));\n if (this.gridLayout[x][y] != null)\n text(x + \",\" + y + \"\\n\" + this.gridLayout[x][y].name, x * this.boxSize, y * this.boxSize, this.boxSize, this.boxSize);\n else\n text(x + \",\" + y + \"\\n\", x * this.boxSize, y * this.boxSize, this.boxSize, this.boxSize);\n }\n }\n }", "function makeGrid() {\n for (var i=0;i<height.value;i++) {\n const height=canvas.insertRow(i);\n for (var j=0; j <weight.value;j++){\n const weight=height.insertCell(j);\n weight.addEventListener(\"click\", click_color);\n }\n }\n}", "function createGrid (num)\n\t{\n\t\tfor( var i = 0; i < (num * num); i++)\n\t\t{\n\t\t\tvar $grid = $('<div></div>');\n\t\t\t$('#container').append($grid);\n\t\t}\t\n\n\t\t//Sets grid === to height and width of container\n\t\t//2 is used to account for the margin around the boxes.\n\t\t$('div div').height($('#container').height() / num - 2); \n\t\t$('div div').width($('#container').width() / num - 2);\n\t}", "function createGrid(h, v){\n let width = 960 / h;\n for (var i = 1; i <= v * h; i++) {\n var div = document.createElement('div');\n div.className = 'cell';\n div.style.border = 'solid 1px black';\n container.appendChild(div);\n container.appendChild(br);\n }\n cellsEvent();\n container.style.display = 'grid';\n container.style.gridTemplateRows = 'repeat(' + v + ', ' + width + 'px)';\n container.style.gridTemplateColumns = 'repeat(' + h + ', ' + width + 'px)';\n container.style.justifyContent = 'center';\n}", "function createGrid(gridSize) {\n const outerContainer = document.querySelector(\"#outer-container\");\n const container = document.createElement('div');\n container.setAttribute(\"id\", \"container\");\n outerContainer.appendChild(container);\n container.style = \"grid-template-columns: repeat(\"+ gridSize +\", 1fr)\";\n const informationBox = document.querySelector(\"#information-box\");\n outerContainer.insertBefore(container,informationBox);\n for (let i = 0; i < (gridSize * gridSize); i++) {\n const container = document.querySelector('#container');\n\n const div = document.createElement('div');\n div.className = 'grid-block';\n container.appendChild(div);\n }\n}", "_createGrids() {\n this.settingsGridOption = this.artifactoryGridFactory.getGridInstance(this.$scope)\n .setColumns(this._getSettingsColumns())\n //.setMultiSelect(this.)\n .setDraggable(this.reorderLdap.bind(this))\n .setButtons(this._getSettingsActions());\n //.setBatchActions(this._getSettingsBatchActions());\n\n this.groupsGridOption = this.artifactoryGridFactory.getGridInstance(this.$scope)\n .setColumns(this._getGroupsColumns())\n //.setMultiSelect()\n .setRowTemplate('default')\n .setButtons(this._getGroupsActions());\n //.setBatchActions(this._getGroupsBatchActions());\n }", "function assignGrid(ghostOne, ghostTwo, ghostThree, ghostFour) {\n infoBox.innerHTML = 'Click ↑'\n for (let i = 0; i < layout.length; i++) {\n // gridSquare[i].classList.add(layoutClasses[layout[i]])\n if (layout[i] === 1) {\n gridSquare[i].classList.add('wall')\n } else if (layout[i] === 2) {\n gridSquare[i].classList.add('food')\n } else if (layout[i] === 3) {\n gridSquare[i].classList.add('pacmanRight')\n } else if (layout[i] === 5) {\n gridSquare[i].classList.add('pill')\n } else if (layout[i] === 6) {\n gridSquare[i].classList.add('warp')\n } else if (layout[i] === 4) {\n gridSquare[i].classList.add('ghostOne')\n ghostOne.ghostIndex = i\n } else if (layout[i] === 7) {\n gridSquare[i].classList.add('ghostTwo')\n ghostTwo.ghostIndex = i\n } else if (layout[i] === 8) {\n gridSquare[i].classList.add('ghostThree')\n ghostThree.ghostIndex = i\n } else if (layout[i] === 9) {\n gridSquare[i].classList.add('ghostFour')\n ghostFour.ghostIndex = i\n }\n }\n }", "function JustifiedGrid() {\r\n\t\t\r\n\t\tif( $('#justified-grid').length > 0 ){\r\n\t\t\r\n\t\t\t$('#justified-grid').justifiedGallery({\r\n\t\t\t\trowHeight : 300,\r\n\t\t\t\tlastRow : 'nojustify',\r\n\t\t\t\tmargins : 10\r\n\t\t\t});\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "function JustifiedGrid() {\r\n\t\t\r\n\t\tif( $('#justified-grid').length > 0 ){\r\n\t\t\r\n\t\t\t$('#justified-grid').justifiedGallery({\r\n\t\t\t\trowHeight : 300,\r\n\t\t\t\tlastRow : 'nojustify',\r\n\t\t\t\tmargins : 10\r\n\t\t\t});\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "function createGrid() {\n for (let i = 0; i < DIMENSION; ++i) {\n const container = document.querySelector('#gridContainer');\n const row = document.createElement('div');\n\n row.classList.add('row');\n container.appendChild(row);\n\n for (let j = 0; j < DIMENSION; ++j) {\n const cell = document.createElement('div');\n cell.classList.add('cell');\n\n row.appendChild(cell);\n paint(cell);\n }\n }\n}", "function gridDPad() {\n var focusCount = 0,\n gridSum,\n domList,\n viewW,\n viewH,\n viewXCount,\n viewYCount,\n viewCount,\n scrollCount;\n function initView() {\n viewW = window.document.documentElement.clientWidth;\n viewH = window.document.documentElement.clientHeight - 42;\n viewXCount = Math.floor(viewW/gridW);\n viewYCount = Math.floor(viewH/gridH);\n viewCount = viewXCount*viewYCount;\n }\n function resetCount(count) {\n focusCount = count || 0;\n }\n function moveUp() {\n focusCount = focusCount - viewXCount;\n if (0 >= focusCount) {\n focusCount = 0;\n }\n domList[focusCount].classList.add('focus');\n }\n function moveDown() {\n focusCount = focusCount + viewXCount;\n if (focusCount >= gridsSum - 1) {\n focusCount = gridsSum - 1;\n }\n domList[focusCount].classList.add('focus');\n }\n function moveLeft() {\n focusCount--;\n if (0 >= focusCount) {\n focusCount = 0;\n }\n domList[focusCount].classList.add('focus');\n }\n function moveRight() {\n focusCount++;\n if (focusCount >= gridsSum) {\n focusCount = gridsSum - 1;\n }\n domList[focusCount].classList.add('focus');\n }\n function move(type, currentCount) {\n domList = document.querySelectorAll('.videos_grid');\n gridsSum = domList.length;\n // focusCount = currentCount;\n domList[focusCount].classList.remove('focus');\n switch (type) {\n case 'up':\n moveUp();\n break;\n case 'down':\n moveDown();\n break;\n case 'left':\n moveLeft();\n break;\n case 'right':\n moveRight();\n break;\n default:\n console.error('gridDPad move type error');\n break;\n }\n scrollCount = Math.floor(focusCount/viewCount);\n node('#video_list_ul').style.top = - gridH*viewYCount*scrollCount + 'px';\n }\n initView();\n this.initView = initView;\n this.move = move;\n this.resetCount = resetCount;\n}", "function makeGrid(x, y) {\n for (var rows = 0; rows < x; rows++) {\n for (var columns = 0; columns < y; columns++) {\n $(\"#container\").append(\"<div class='grid'></div>\");\n };\n };\n $(\".grid\").height(960/x);\n $(\".grid\").width(960/y);\n}", "generateGrid(grid) {\n return grid.map((item, idx) =>\n <Square\n key={idx}\n cellNum={idx}\n mark={item ? item : null}\n onClick={this.handleSquareClick}\n />\n );\n }", "function createGrid() {\n\t// create 2 rows\n // for (var rows = 0; rows < 2; rows++) {\n // $(document.body).append(\"<div class='cards'>khjhjh</div>\");\n // }\n\t// create 2 tiles inside each row\n\tfor (var columns = 0; columns < 4; columns++) {\n\t $('.cards').append(\"<div class='tile'></div>\");\n\t}\n}", "constructor() {\n super();\n this.attachShadow({mode: 'open'});\n this.render();\n\n this._grid = this.shadowRoot.querySelector(\"#grid\");\n this._slot = this.shadowRoot.querySelector(\"#slot\");\n this._slot.addEventListener('slotchange', this._setUpBoxes.bind(this));\n\n this._setUpBoxes();\n this.state.minWidth = 120;\n this.state.sepWidth = 6;\n }", "function refreshView() {\nrefreshFlex()\n//two.width = flexWidth+200\n//two.height = flexLength+100\n\n//two.update()\n\n}", "function loadGrid(x){\n for (let i = 0; i < x; i++){\n let row = document.createElement('div');\n row.style.height = (640/x) + 'px';\n row.style.width = '640px';\n row.className = 'gridRows';\n gridContainer.appendChild(row); \n \n for (let j = 0; j < x; j++){\n let square = document.createElement('div');\n square.style.width = 640/x + 'px';\n square.style.height = 640/x + 'px';\n square.className = 'gridSquares';\n row.appendChild(square);\n square.onmouseover = function(){\n square.style.backgroundColor = whichColor;\n square.style.border = 'none';\n };\n } \n }\n}", "function wrapContent() {\n canvas.find('.column').each(function() {\n var col = $(this);\n var contents = $();\n col.children().each(function() {\n var child = $(this);\n if (child.is('.row, .ge-tools-drawer, .ge-content')) {\n doWrap(contents);\n } else {\n contents = contents.add(child);\n }\n });\n doWrap(contents);\n });\n }", "function _masonry( container ) {\n\n\t\t/* Gallery Grid */\n\t\t$( '.gallery-grid' ).isotope({\n\t\t\t\titemSelector : '.gallery-grid-item',\n\t\t\t\ttransitionDuration: 0,\n\t\t});\n\t\tsetTimeout( function(){ $( '.gallery-grid' ).isotope( 'layout' ) }, 3000);\n\n\t}", "function WR_Masonry() {\n\t \tvar el = $( '.wr-nitro-masonry' );\n\n\t \tel.each( function( i, val ) {\n\t \t\tvar _option = $( this ).data( 'masonry' );\n\n\t \t\tif ( _option !== undefined ) {\n\t \t\t\tvar _selector = _option.selector, _width = _option.columnWidth;\n\n\t \t\t\t$( this ).WR_ImagesLoaded( function() {\n\t \t\t\t\t$( val ).isotope( {\n\t \t\t\t\t\tpercentPosition: true,\n\t \t\t\t\t\titemSelector: _selector,\n\t \t\t\t\t\tmasonry: {\n\t \t\t\t\t\t\tcolumnWidth: _width\n\t \t\t\t\t\t}\n\t \t\t\t\t} );\n\t \t\t\t} )\n\t \t\t}\n\t \t} );\n\t }", "addGridLines () {\n }", "function creategrid(lists){for(var i=0,len=lists.length;i<len;i++){var node=lists[i];if($('#'+node.key).length>0){continue;}\n var jQgrid=$('<div class=\"grid\"></div>');jQgrid.attr('id',node.key);\n var jQtext=$('<div class=\"text\"></div>');jQtext.text(node.text);jQtext.appendTo(jQgrid);\n if(node.leftlen>0){var jQMore=$('<a class=\"text\"></a>');jQMore.text('<还有'+node.leftlen+'个字>');jQMore.attr('href',siteurl+'/detail/'+node.key);jQMore.appendTo(jQtext);}\n var jQtagdiv=$('<div class=\"tag gridInner\"></div>');var jQtag=$('<span class=\"margin5 label label-info\"></span>');jQtag.text(node.pubtime);jQtag.appendTo(jQtagdiv);jQtag=$('<span class=\"margin5 label label-info\"></span>');jQtag.text(sexSwitcher[node.sex]);jQtag.appendTo(jQtagdiv);jQtagdiv.appendTo(jQgrid);var jQshare=createsharenode(siteurl+'/detail/'+node.key,'客官来这里|你室友知道吗',siteurl+'/images/logo.png',node.text.substr(0,100)+'[客官不可以]');jQshare.appendTo(jQgrid);jQgrid.appendTo($('#container'));}}", "function schedule_layout(){\n $('.schedule_t_row_schedule').each(function(index){\n var dataHeight = Math.round( $(this).children('.schedule_data').height() ),\n \tdataTop = $(this).children('.schedule_list').offset.top;\n $(this).find('.schedule_data .grid_wrap').css('height', dataHeight+'px');\n });\n}", "function simplePortfolioInGrid() {\n \"use strict\";\n //$('#portfolio-preview-items .portfolio-item img').on(\"load\", function(){\n if ($('.page-template-portfolio .portfolio-item .filter-row').hasClass('in_grid')) {\n var height_filter = $('.portfolio-item:nth-child(2)').innerHeight();\n $('.filter-row.in_grid').css('height', height_filter + 'px');\n }\n //});\n\n\n }", "all(callback){\n\t\tfor (let i = 0 ; i < this.GRID_DOM.length; i++) {\n\t\t\tfor (let j = 0 ; j < this.GRID_DOM[i].length; j++) {\n\t\t\t\tcallback(this.GRID_DOM[i][j])\n\t\t\t}\n\t\t}\n\t}", "function runGridMain(opt,newelementadded) {\n\n\n\n\t// BASIC VARIABLES\n \tvar container = opt.container,\n \t\t items = container.find('.itemtoshow, .isvisiblenow').not('.ui-sortable-helper'),\n \t \t p = new Object,\n\t \t ul = container.find('ul').first(),\n\t \t esgo = container.find('.esg-overflowtrick').first(),\n\t \t ar = opt.aspectratio,\n\t \t aratio,\n\t \t coh = 0;\n\n\t \topt.aspectratioOrig = opt.aspectratio;\n\n\n\tcontainer.find('.mainul').addClass(\"gridorganising\");\n\t// CALCULATE THE ASPECT RATIO\n\n\n\tar = ar.split(\":\");\n \taratio=parseInt(ar[0],0) / parseInt(ar[1],0);\n\n\n\n\n\tp.item = 0;\n\tp.pagetoanimate=0-opt.currentpage;\t\t\t// Page Offsets\n\tp.col=0;\t\t\t\t\t\t\t\t\t// Current Col\n\tp.row=0;\t\t\t\t\t\t\t\t\t// Current Row\n\tp.pagecounter=0;\t\t\t\t\t\t\t// Counter\n\tp.itemcounter=0;\n\n\tp.fakecol=0;\n\tp.fakerow=0;\n\tp.maxheight=0;\n\n\tp.allcol =0;\n\tp.allrow = 0;\n\tp.ulcurheight = 0;\n\tp.ulwidth = ul.width();\n\n\tp.verticalsteps = 1;\n\n\n\n\n\tp.currentcolumnheight = new Array;\n\tfor (var i=0;i<opt.column;i++)\n\t\tp.currentcolumnheight[i] = 0;\n\n\tp.pageitemcounterfake=0;\n\tp.pageitemcounter=0;\n\n\t// GET DELAY BASIC\n\tif (opt.delayBasic!=undefined)\n\t\tp.delaybasic = opt.delayBasic;\n\telse\n\t\tp.delaybasic = 0.08;\n\n\n\tp.anim = opt.pageAnimation;\n\n\tp.itemtowait=0;\n\tp.itemouttowait=0;\n\n\tp.ease = \"punchgs.Power1.easeInOut\";\n\tp.easeout = p.ease;\n\tp.row=0;\n\tp.col=0;\n\n\t// MULTIPLIER SETTINGS\n\tvar mp = opt.rowItemMultiplier,\n\t\tmpl = mp.length,\n\t\torigcol = opt.column;\n\n\n\tp.y = 0;\n\tp.fakey = 0;\n\tcontainer.find('.esg-overflowtrick').css({width:\"100%\"});\n\tif (container.find('.esg-overflowtrick').width()==100)\n\t\tcontainer.find('.esg-overflowtrick').css({width:container.find('.esg-overflowtrick').parent().width()});\n\tp.cwidth = container.find('.esg-overflowtrick').width()-(opt.overflowoffset*2)\t\t\t// Current Width of Parrent Container\n\n\topt.inanimation = true;\n\n\tp.cwidth_n_spaces = p.cwidth - ((opt.column-1)*opt.space);\n\n\tp.itemw = Math.round(p.cwidth_n_spaces/opt.column);\t// Current Item Width in PX\n\tp.originalitemw = p.itemw;\n\n\n\t// CHANGE ASPECT RATIO IF FULLSCREEN IS SET\n\tif (opt.forceFullScreen==\"on\") {\n\t\tcoh = jQuery(window).height();\n\t\tif (opt.fullScreenOffsetContainer!=undefined) {\n\t\t\ttry{\n\t\t\t\tvar offcontainers = opt.fullScreenOffsetContainer.split(\",\");\n\t\t\t\tjQuery.each(offcontainers,function(index,searchedcont) {\n\t\t\t\t\tcoh = coh - jQuery(searchedcont).outerHeight(true);\n\t\t\t\t\tif (coh<opt.minFullScreenHeight) coh=opt.minFullScreenHeight;\n\t\t\t\t});\n\t\t\t} catch(e) {}\n\t\t}\n\t}\n\n\n\n\tif (opt.layout==\"even\") {\n\n\t\t\tp.itemh = Math.round(coh) == 0 ? Math.round((p.cwidth_n_spaces / opt.column) / aratio) : Math.round(coh/opt.row);\n\t\t\topt.aspectratio = coh == 0 ? opt.aspectratio : p.itemw+\":\"+p.itemh;\n\n\t\t\tif (mpl>0)\n\t\t\t\tpunchgs.TweenLite.set(items,{display:\"block\",visibility:\"visible\",overwrite:\"auto\"});\n\t\t\telse\n\t\t\t\tpunchgs.TweenLite.set(items,{display:\"block\",width:p.itemw,height:p.itemh,visibility:\"visible\",overwrite:\"auto\"});\n\n\t} else {\n\t\tpunchgs.TweenLite.set(items,{display:\"block\",width:p.itemw,height:\"auto\",visibility:\"visible\",overwrite:\"auto\"});\n\t}\n\tif (!newelementadded) {\n\n\t\tpunchgs.TweenLite.killTweensOf(items);\n\t}\n\n\tp.originalitemh = p.itemh;\n\n\t// PREPARE A GRID FOR CALCULATE THE POSITIONS OF COBBLES\n\tvar thegrid = new Array(),\n\t\tmaxcobblerow = opt.row*opt.column*2;\n\n\tfor (var rrr = 0 ; rrr<maxcobblerow; rrr++) {\n\t\tvar newrow = new Array();\n\t\tfor (var ccc = 0; ccc<opt.column;ccc++) {\n\t\t\t\tnewrow.push(0);\n\t\t}\n\t\tthegrid.push(newrow);\n\t}\n\n\tvar cobblepatternindex = 0;\n\n\n\tif (items.length==0) container.trigger('itemsinposition');\n\t// REPARSE THE ITEMS TO MAKE\n \tjQuery.each(items,function(index,$item) {\n\t\tvar item = jQuery($item);\n\t\tp.itemw = \tp.originalitemw;\n\n\t\t//fixCenteredCoverElement(item);\n\n\n\n\n\t\t//! COBBLES\n\t\tif (opt.evenCobbles == \"on\" && !item.hasClass(\"itemonotherpage\") && !item.hasClass(\"itemishidden\")) {\n\t\t\t\tvar cobblesw = item.data('cobblesw'),\n\t\t\t\t\tcobblesh = item.data('cobblesh');\n\n\t\t\t\tif (opt.cobblesPattern!=undefined && opt.cobblesPattern.length>2) {\n\n\t\t\t\t\tvar newcobblevalues = getCobblePat(opt.cobblesPattern,cobblepatternindex);\n\t\t\t\t\tcobblesw = parseInt(newcobblevalues.w,0);\n\t\t\t\t\tcobblesh = parseInt(newcobblevalues.h,0);\n\t\t\t\t\tcobblepatternindex++;\n\t\t\t\t}\n\n\n\t\t\t\tcobblesw = cobblesw==undefined ? 1 : cobblesw;\n\t\t\t\tcobblesh = cobblesh==undefined ? 1 : cobblesh;\n\n\n\t\t\t\tif (opt.column < cobblesw) cobblesw = opt.column;\n\n\t\t\t\tp.cobblesorigw = p.originalitemw;\n\t\t\t\tp.cobblesorigh = p.originalitemh;\n\t\t\t\tp.itemw = p.itemw * cobblesw + ((cobblesw-1) * opt.space);\n\t\t\t\tp.itemh = p.originalitemh;\n\n\t\t\t\tp.itemh = p.itemh * cobblesh + ((cobblesh-1) * opt.space);\n\n\t\t\t\tvar cobblepattern = cobblesw+\":\"+cobblesh\t,\n\t\t\t\t\tspacefound = false,\n\t\t\t\t\tr = 0,\n\t\t\t\t\tc = 0;\n\n\t\t\t\tswitch (cobblepattern) {\n\t\t\t\t\t\t\t\tcase \"1:1\":\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tif (thegrid[r][c]==0) {\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c] = \"1:1\";\n\t\t\t\t\t\t\t\t\t\t\tspacefound = true;\n\t\t\t\t\t\t\t\t\t\t\tp.cobblesx = c;\n\t\t\t\t\t\t\t\t\t\t\tp.cobblesy = r;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t\t\t\t\tif (c==opt.column) {\n\t\t\t\t\t\t\t\t\t\t\tc=0;r++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (r>=maxcobblerow) spacefound= true;\n\t\t\t\t\t\t\t\t\t} while (!spacefound);\n\t\t\t\t\t\t\t\tbreak;\n\n\n\n\t\t\t\t\t\t\t\tcase \"1:2\":\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tif (thegrid[r][c]==0 && r<maxcobblerow-1 && thegrid[r+1][c]==0) {\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c] = \"1:2\";\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c] = \"1:2\";\n\t\t\t\t\t\t\t\t\t\t\tp.cobblesx = c;\n\t\t\t\t\t\t\t\t\t\t\tp.cobblesy = r;\n\n\t\t\t\t\t\t\t\t\t\t\tspacefound = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t\t\t\t\tif (c==opt.column) {\n\t\t\t\t\t\t\t\t\t\t\tc=0;r++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (r>=maxcobblerow) spacefound= true;\n\t\t\t\t\t\t\t\t\t} while (!spacefound);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase \"1:3\":\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tif (thegrid[r][c]==0 && r<maxcobblerow-2 && thegrid[r+1][c]==0 && thegrid[r+2][c]==0) {\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c] = \"1:3\";\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c] = \"1:3\";\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+2][c] = \"1:3\";\n\t\t\t\t\t\t\t\t\t\t\tp.cobblesx = c;\n\t\t\t\t\t\t\t\t\t\t\tp.cobblesy = r;\n\n\t\t\t\t\t\t\t\t\t\t\tspacefound = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t\t\t\t\tif (c==opt.column) {\n\t\t\t\t\t\t\t\t\t\t\tc=0;r++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (r>=maxcobblerow) spacefound= true;\n\t\t\t\t\t\t\t\t\t} while (!spacefound);\n\t\t\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\t\t\t\tcase \"2:1\":\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tif (thegrid[r][c]==0 && c<opt.column-1 && thegrid[r][c+1]==0) {\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c] = \"2:1\";\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+1] = \"2:1\";\n\t\t\t\t\t\t\t\t\t\t\tp.cobblesx = c;\n\t\t\t\t\t\t\t\t\t\t\tp.cobblesy = r;\n\t\t\t\t\t\t\t\t\t\t\tspacefound = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t\t\t\t\tif (c==opt.column) {\n\t\t\t\t\t\t\t\t\t\t\tc=0;r++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (r>=maxcobblerow) spacefound= true;\n\t\t\t\t\t\t\t\t\t} while (!spacefound);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase \"3:1\":\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tif (thegrid[r][c]==0 && c<opt.column-2 && thegrid[r][c+1]==0 && thegrid[r][c+2]==0) {\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c] = \"3:1\";\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+1] = \"3:1\";\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+2] = \"3:1\";\n\t\t\t\t\t\t\t\t\t\t\tp.cobblesx = c;\n\t\t\t\t\t\t\t\t\t\t\tp.cobblesy = r;\n\t\t\t\t\t\t\t\t\t\t\tspacefound = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t\t\t\t\tif (c==opt.column) {\n\t\t\t\t\t\t\t\t\t\t\tc=0;r++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (r>=maxcobblerow) spacefound= true;\n\t\t\t\t\t\t\t\t\t} while (!spacefound);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase \"2:2\":\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tif (c<opt.column-1 && r<maxcobblerow-1 && thegrid[r][c]==0 && thegrid[r][c+1]==0 && thegrid[r+1][c]==0 && thegrid[r+1][c+1]==0) {\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c] = \"2:2\";\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c] = \"2:2\";\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+1] = \"2:2\";\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c+1] = \"2:2\";\n\n\t\t\t\t\t\t\t\t\t\t\tp.cobblesx = c;\n\t\t\t\t\t\t\t\t\t\t\tp.cobblesy = r;\n\n\t\t\t\t\t\t\t\t\t\t\tspacefound = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t\t\t\t\tif (c==opt.column) {\n\t\t\t\t\t\t\t\t\t\t\tc=0;r++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (r>=maxcobblerow) spacefound= true;\n\t\t\t\t\t\t\t\t\t} while (!spacefound);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase \"3:2\":\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tif (c<opt.column-2 && r<maxcobblerow-1 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+1]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+2]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c+1]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c+2]==0\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c] = \"3:2\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+1] = \"3:2\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+2] = \"3:2\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c] = \"3:2\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c+1] = \"3:2\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c+2] = \"3:2\";\n\n\t\t\t\t\t\t\t\t\t\t\t\tp.cobblesx = c;\n\t\t\t\t\t\t\t\t\t\t\t\tp.cobblesy = r;\n\n\t\t\t\t\t\t\t\t\t\t\t\tspacefound = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t\t\t\t\tif (c==opt.column) {\n\t\t\t\t\t\t\t\t\t\t\tc=0;r++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (r>=maxcobblerow) spacefound= true;\n\t\t\t\t\t\t\t\t\t} while (!spacefound);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase \"2:3\":\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tif (c<opt.column-1 && r<maxcobblerow-2 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+1]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c+1]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+2][c+1]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+2][c+1]==0\n\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c] = \"2:3\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+1] = \"2:3\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c] = \"2:3\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c+1] = \"2:3\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r+2][c] = \"2:3\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r+2][c+1] = \"2:3\";\n\n\t\t\t\t\t\t\t\t\t\t\t\tp.cobblesx = c;\n\t\t\t\t\t\t\t\t\t\t\t\tp.cobblesy = r;\n\n\t\t\t\t\t\t\t\t\t\t\t\tspacefound = true;\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t\t\t\t\tif (c==opt.column) {\n\t\t\t\t\t\t\t\t\t\t\tc=0;r++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (r>=maxcobblerow) spacefound= true;\n\t\t\t\t\t\t\t\t\t} while (!spacefound);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase \"3:3\":\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\tif (c<opt.column-2 && r<maxcobblerow-2 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+1]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+2]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c+1]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c+2]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+2][c]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+2][c+1]==0 &&\n\t\t\t\t\t\t\t\t\t\t\tthegrid[r+2][c+2]==0\n\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c] = \"3:3\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+1] = \"3:3\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r][c+2] = \"3:3\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c] = \"3:3\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c+1] = \"3:3\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r+1][c+2] = \"3:3\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r+2][c] = \"3:3\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r+2][c+1] = \"3:3\";\n\t\t\t\t\t\t\t\t\t\t\t\tthegrid[r+2][c+2] = \"3:3\";\n\n\t\t\t\t\t\t\t\t\t\t\t\tp.cobblesx = c;\n\t\t\t\t\t\t\t\t\t\t\t\tp.cobblesy = r;\n\n\t\t\t\t\t\t\t\t\t\t\t\tspacefound = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t\t\t\t\tif (c==opt.column) {\n\t\t\t\t\t\t\t\t\t\t\tc=0;r++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (r>=maxcobblerow) spacefound= true;\n\t\t\t\t\t\t\t\t\t} while (!spacefound);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\topt.aspectratio = p.itemw+\":\"+p.itemh;\n\n\t\t\t\tpunchgs.TweenLite.set(item,{width:p.itemw,height:p.itemh,overwrite:\"auto\"});\n\t\t\t\tvar img = item.find('.esg-entry-media').find('img');\n\t\t\t\tif (img.length>0) {\n\t\t\t\t\t\tevenImageRatio(img,opt,true)\n\t\t\t\t}\n\n\n\t\t} else {\n\n\t\t\t\t//IF ITEMW IS DIFFERENT BASED ON MULTIPLIER, WE NEED TO RESET SIZES\n\t\t\t\tvar cle = p.row - (mpl*Math.floor(p.row/mpl));\n\n\t\t\t\tif (opt.layout==\"even\" && mpl>0) {\n\t\t\t\t\t/*if (origcol!=1)*/ opt.column = mp[cle][opt.columnindex];\n\t\t\t\t\tp.cwidth = container.find('.esg-overflowtrick').width()-(opt.overflowoffset*2)\t\t\t// Current Width of Parrent Container\n\t\t\t\t\tp.cwidth_n_spaces = p.cwidth - ((opt.column-1)*opt.space);\n\t\t\t\t\tp.itemw = Math.round(p.cwidth_n_spaces/opt.column);\t// Current Item Width in PX\n\n\t\t\t\t\tp.itemh = coh == 0 ? (p.cwidth_n_spaces / opt.column) / aratio : coh/opt.row;\n\t\t\t\t\topt.aspectratio = coh == 0 ? opt.aspectratio : p.itemw+\":\"+p.itemh;\n\n\n\n\n\t\t\t\t\tpunchgs.TweenLite.set(item,{width:p.itemw,height:p.itemh,overwrite:\"auto\"});\t\t\t// KRIKI KRIKI\n\t\t\t\t}// END OF MULTIPLIER CALCULATION#\n\t\t}\n\n\n\t\tif (opt.layout==\"even\") {\n\t\t\tvar img = item.find('.esg-entry-media').find('img');\n\t\t\tif (img.length>0)\n\t\t\t\t\tevenImageRatio(img,opt,true)\n\t\t} else {\n\n\n\n\t\t\tif (item.hasClass(\"itemtoshow\"))\n\t\t\t\tif (item.width() != p.itemw || item.css(\"opacity\")==0 || item.css(\"visibility\")==\"hidden\")\n\t\t\t\t\t\tp = prepareItemToMessure(item,p,container);\n\t\t\t\telse {\n\t\t\t\t\tadjustMediaSize(item,true,p,opt);\n\t\t\t\t\tp.itemh = item.height();\n\n\t\t\t\t}\n\t\t else {\n\t\t \tadjustMediaSize(item,true,p,opt);\n\t\t \tp.itemh = item.height();\n\t\t }\n\n\n\t\t}\n\n\t\t//adjustMediaSize(item,true,p);\n\n\t\tp = animateGrid($item,opt,p);\n\t\tp.itemcounter++;\n\n\t\tif (ul.height()<p.maxheight) container.trigger('itemsinposition');\n\n\n\t});\n\n\topt.aspectratio = opt.aspectratioOrig;\n\n\n\n\tif (p.itemtowait==0) {\n\t\topt.container.trigger('itemsinposition');\n\t\tcontainer.find('.mainul').removeClass(\"gridorganising\");\n\t}\n\n\tvar gbfc = getBestFitColumn(opt,jQuery(window).width(),\"id\");\n\topt.column = gbfc.column;\n\topt.columnindex = gbfc.index;\n\n\topt.maxheight = p.maxheight;\n\topt.container.trigger('itemsinposition');\n\topt.inanimation = true;\n\n\t// RESET FILTER AND STARTER VALUES\n\topt.started = false;\n\topt.filterchanged=false;\n\topt.silent=false;\n\topt.silentout=false;\n\topt.changedAnim = \"\";\n\tsetOptions(container,opt);\n\n\tvar esgloader = container.parent().parent().find('.esg-loader');\n\tif (esgloader.length>0)\n\t\tpunchgs.TweenLite.to(esgloader,0.2,{autoAlpha:0});\n\n }", "function searchResultMasonry() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $searchContainer = $('#search-results'),\r\n\t\t\t\t\t$dividerNum = ($searchContainer.is('[data-layout=\"masonry-no-sidebar\"]')) ? 4 : 3;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$searchContainer.imagesLoaded(function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$searchContainer.isotope({\r\n\t\t\t\t\t\t\titemSelector: '.result',\r\n\t\t\t\t\t\t\tlayoutMode: 'packery',\r\n\t\t\t\t\t\t\tpackery: {\r\n\t\t\t\t\t\t\t\tcolumnWidth: $('#search-results').width() / $dividerNum\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\r\n\t\t\t\t\t\t$searchContainer\r\n\t\t\t\t\t\t\t.find('article')\r\n\t\t\t\t\t\t\t.css('opacity', '1');\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$window.on('resize', function () {\r\n\t\t\t\t\t\t$searchContainer.isotope({\r\n\t\t\t\t\t\t\tlayoutMode: 'packery',\r\n\t\t\t\t\t\t\tpackery: {\r\n\t\t\t\t\t\t\t\tcolumnWidth: $('#search-results').width() / $dividerNum\r\n\t\t\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\t\r\n\t\t\t\t}", "function gridToStack(){\n subNavHandler(0, 'singlestack', 10);\n }", "gridCreator() {\n let picturesWrapper = [];\n let mappedPictures = this.props.pictures.map((pic) => {\n return(\n <div key={pic.id} className=\"cell\">\n <img id={pic.id} src={pic.pictures}\n className=\"responsiveImage\"\n alt={pic.description}\n onClick={(event) => this.props.activateModal(event)} \n />\n </div>\n )\n });\n picturesWrapper.push(<div className=\"grid\" key=\"0\">{mappedPictures.slice(0, 7)}</div>)\n picturesWrapper.push(<div className=\"grid\" key=\"1\">{mappedPictures.slice(7, 13)}</div>)\n picturesWrapper.push(<div className=\"grid\" key=\"2\">{mappedPictures.slice(13, 19)}</div>)\n picturesWrapper.push(<div className=\"grid\" key=\"3\">{mappedPictures.slice(19, 25)}</div>)\n picturesWrapper.push(<div className=\"grid\" key=\"4\">{mappedPictures.slice(25, 31)}</div>)\n return picturesWrapper;\n }", "function createGrid() {\nfor (i = 0; i < slider.value * slider.value; i++) {\n const gridItem = document.createElement('div');\n gridItem.classList.add('gridBox');\n gridItem.addEventListener('mouseenter', function(e) {\n e.target.style.backgroundColor = chosenColor;\n gridItem.classList.add('gridBoxOnHover');\n })\n // This is just a cool mouse tracking function I accidently made\n /*gridItem.addEventListener('mouseleave', function(e) {\n e.target.style.backgroundColor = 'white';\n gridItem.classList.remove('gridBoxOnHover');\n })*/\n gridWrapper.appendChild(gridItem);\n gridBoxesArray.push(gridItem);\n }\n}", "componentDidMount() {\n this.resizeDetector.listenTo(this.virtualCSSGrid.container, this.handleResize)\n }" ]
[ "0.64756095", "0.64339733", "0.6404272", "0.6381941", "0.63145596", "0.625547", "0.62475514", "0.6220626", "0.6202054", "0.6182024", "0.61632854", "0.61545014", "0.6123108", "0.6119058", "0.6117883", "0.60896647", "0.6065565", "0.6062991", "0.60616195", "0.60548025", "0.6034578", "0.6008131", "0.6001811", "0.5992688", "0.5983859", "0.5969423", "0.596466", "0.5948126", "0.59384286", "0.593454", "0.59174323", "0.59148747", "0.5897563", "0.5893433", "0.5863929", "0.58587337", "0.5833584", "0.58319163", "0.5819935", "0.58110875", "0.5801284", "0.5782832", "0.5775179", "0.5774787", "0.5767731", "0.57585955", "0.5746057", "0.5735251", "0.5725546", "0.57220745", "0.5714106", "0.5709817", "0.57068926", "0.56882435", "0.56873965", "0.5671402", "0.5671402", "0.56699324", "0.56695414", "0.56683904", "0.5664144", "0.56619793", "0.56591445", "0.5658553", "0.56562173", "0.5656149", "0.565603", "0.56551373", "0.5645305", "0.564365", "0.56401104", "0.56315154", "0.56310487", "0.56273365", "0.562318", "0.5618429", "0.56137323", "0.561069", "0.561069", "0.56036097", "0.5601234", "0.56004375", "0.55967265", "0.55964714", "0.5592703", "0.5588503", "0.55877453", "0.5586586", "0.55775714", "0.55737394", "0.55724525", "0.55675006", "0.55640376", "0.556175", "0.55597794", "0.5556857", "0.5556073", "0.5555786", "0.55557525", "0.55490905", "0.5546085" ]
0.0
-1
Constructor: create new object
constructor(level) { this.fields = []; this.level = level; this.score = 0; this.levelSettings = [ {id: 0, xWidth: 0, yWidth: 1, Ystart: 0, speed: 0, lines: 0}, {id: 1, xWidth: 10, yWidth: 10, Ystart: 7, speed: 500, lines: 10}, {id: 2, xWidth: 16, yWidth: 10, Ystart: 5, speed: 550, lines: 12}, {id: 3, xWidth: 11, yWidth: 10, Ystart: 6, speed: 500, lines: 14}, {id: 4, xWidth: 12, yWidth: 10, Ystart: 7, speed: 450, lines: 16}, {id: 5, xWidth: 13, yWidth: 11, Ystart: 8, speed: 400, lines: 18}, {id: 6, xWidth: 14, yWidth: 12, Ystart: 9, speed: 350, lines: 20}, {id: 7, xWidth: 15, yWidth: 13, Ystart: 10, speed: 300, lines: 22}, ] this.START_LEVEL(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructur() {}", "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "constructor (){}", "function construct() { }", "constructor() {\n copy(this, create());\n }", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor( ) {}", "function Ctor() {}", "consructor() {\n }", "function _construct()\n\t\t{;\n\t\t}", "function NewObj(){}", "function Ctor() {\r\n }", "function _ctor() {\n\t}", "static create () {}", "constructor() {\n\t\t// ...\n\t}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "constructor() {}", "function Ctor() {\n\t// Empty...\n}", "new() {\n let newInstance = Object.create(this);\n\n newInstance.init(...arguments);\n\n return newInstance;\n }", "constructor(data) { }", "function NewObject() {\n\t// returns an object\n}", "function NewObj() {}", "function Constructor() {\n // All construction is actually done in the init method\n if ( this.initialize )\n this.initialize.apply(this, arguments);\n }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() {\r\n // ohne Inhalt\r\n }", "constructor(){\r\n\t}", "constructor(){\r\n }", "constructor(x, y) { // Constructor function to initialize new instances.\n this.x = x; // This keyword is the new object being initialized.\n this.y = y; // Store function arguments as object properties.\n }", "function createObj(a, b)\n{\n //var newObject = {}; // Not needed ctor function\n this.a = a; //newObject.a = a;\n this.b = b; //newObject.b = b;\n //return newObject; // Not needed for ctor function\n}", "create() {}", "create() {}", "create () {}", "create () {}", "constructor(data = {}) {\n super(data);\n \n this.init(data);\n }", "construct (target, args) {\n return new target(...args)\n }", "static create(params) {\n return {type: `${this.prefix}${this.name}`, _instance: new this(params)}; //eslint-disable-line\n }", "constructor() {\n\t}", "constructor() {\n\t}", "create() {\n return this.new();\n }", "constructor(){\n\n }", "constructor(){\n\n }", "function MyConstructor(){\n\t\tthis.prop1 = \"Maxsuel\";\n\t\tthis.prop2 = \"Storch\";\n\t}", "constructor() {\n }", "constructor(make, model, year, color){\n //this. creates local instances\n this.make = make;\n this.model = model;\n this.year = year;\n this.color = color;\n\n }", "function _constructor(dom) {\n\t\tthis.dom = dom;\n\t\t// capture 'this'\n\t\tlet thiz = this;\n\n\t\t_init.call(thiz);\n\n\t\t_setObserver.call(thiz);\n\n\t\t_getOptions.call(thiz);\n\n\t\t_setListeners.call(thiz);\n\n\t\treturn thiz;\n\t}", "constructor() {\r\n }", "constructor(){\r\n\r\n }", "constructor() {\n\n\t}", "static new() {\n let g = new this();\n g.init();\n return g;\n }", "constructor() {\n }" ]
[ "0.8215886", "0.7869028", "0.7869028", "0.7869028", "0.7735315", "0.76863563", "0.7643994", "0.7638926", "0.7638926", "0.7638926", "0.7638926", "0.7638926", "0.7638926", "0.7638926", "0.7543506", "0.7535734", "0.7437763", "0.74086356", "0.7402952", "0.7357677", "0.7318883", "0.7267926", "0.7222378", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.721124", "0.7138574", "0.7116981", "0.7034229", "0.7032838", "0.7030247", "0.6978266", "0.68949825", "0.68949825", "0.68949825", "0.68949825", "0.68949825", "0.68949825", "0.68949825", "0.68949825", "0.68949825", "0.68949825", "0.68949825", "0.68842375", "0.6858495", "0.68553966", "0.6839345", "0.68366927", "0.6808778", "0.6808778", "0.67716575", "0.67716575", "0.6715307", "0.67116797", "0.6688658", "0.66723806", "0.66723806", "0.66658956", "0.6654272", "0.6654272", "0.6648784", "0.66476655", "0.6637968", "0.6632512", "0.66299653", "0.66290325", "0.66274226", "0.6620903", "0.6616502" ]
0.0
-1
Fill fields random cubes
START_LEVEL(level) { this.level = level; this.levelSettings[0].xWidth = this.levelSettings[this.level].xWidth; for (let x = 1; x <= this.levelSettings[this.level].xWidth; x++) { for (let y = 1; y <= this.levelSettings[this.level].yWidth; y++) { if (!level || y <= this.levelSettings[this.level].yWidth - this.levelSettings[this.level].Ystart) { this.fields.push({ x, y, value: 0 }); } else { this.fields.push({ x, y, value: this.__RANDOM_VALUE() }); } } } if (level == 0) { this.__START_LINES(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Builder_sample(cubebox) {\n var i, j, k;// i RIGHE, j COLONNE, k indice per tenere il conto e scorrere l'array delle altezze data\n k = 0;\n //cube = new THREE.Mesh(geometry, new THREE.MeshPhongMaterial({ color: 0xff0000 }));\n var deep, diff;\n for (i = 0; i < groundNumBoxX; i++) {\n for (j = 0; j < groundNumBoxZ; j++) {\n\n cube = new THREE.Mesh(geometry, new THREE.MeshPhongMaterial({ color: 0xf00f0, shininess: 97, specular: 0x20202 }));\n cube.position.x = i;\n cube.position.z = j;\n\n var c = g = Math.floor(map_range(data[k], Math.min.apply(Math, data), Math.max.apply(Math, data), 0, 255));\n c = (c.toString(16).length < 2 ? \"0\" : \"\") + c.toString(16);\n cube.material.color.setHex(\"0X\" + c + \"\" + c + \"\" + c);\n\n cubebox.add(cube.clone());\n\n k++;\n }\n }\n\n}", "function initCubes(){\n\tfor(var i = 0; i<numCubes; i++){\n\t for(var j = 0; j<rubikSize*rubikSize; j++){\n\t\t for(var k = 0; k<rubikSize; k++){\n\t\t\t var newCube = cubeModel();\n\t\t\t newCube.scale(0.25, 0.25, 0.25);\n\t\t\t newCube.translate(cubeOffset[i%3], cubeOffset[j%3], cubeOffset[k%3]);\n\t\t\t cubes.push(newCube);\n\t\t\t points = points.concat(newCube.points);\n\t\t\t colors = colors.concat(newCube.colors);\n\t\t }\n\t\t j+=k;\n\t }\n\t i+=j;\n\t}\n}", "function produceCubes(fromZero = true) {\n for (let i = 0; i < Util.getRandomInt(fromZero ? 0 : 1, 3); ++i)\n produceCube();\n }", "function fillcubeStates() {\n for (i = -1; i < 2; i++) {\n for (j = -1; j < 2; j++) {\n for (k = -1; k < 2; k++) {\n cubeState[i+1][j+1][k+1][0] = i; // x Position\n cubeState[i+1][j+1][k+1][1] = j; // y Position\n cubeState[i+1][j+1][k+1][2] = k; // z Position\n cubeState[i+1][j+1][k+1][3] = [vec3(-1,0,0),vec3(0,-1,0),vec3(0,0,-1)]; // Cube reference Axis\n cubeState[i+1][j+1][k+1][4] = mat4(); // Cube rotation matrix\n }\n }\n }\n}", "static random() {\n return new Cube().randomize();\n }", "function fillRandom() { \n for (var i = 0; i < gridHeight; i++) { \n for (var j = 0; j < gridWidth; j++) { \n theGrid[i][j] = Math.floor(Math.random()*6); //randomly picks from our 5 colonies\n }\n }\n}", "function fillRandom() {\n grid = makeGrid(cols, rows);\n for (let i = 0; i < cols; i++) {\n for (let j = 0; j < rows; j++) {\n grid[i][j] = Math.floor(Math.random() * 2);\n }\n }\n}", "function addBasicCube() {\n var geometry = new THREE.BoxGeometry(20, 20, 20, 10, 10, 10);\n for (var i = 0; i < objectCounts; i++) {\n var cube = new THREE.Mesh(geometry, new THREE.MeshBasicMaterial({\n color: 0xffffff, //\n wireframe: true,\n wireframeLinejoin: 'bevel'\n }));\n cube.position.x = Math.random() * range * 2 - range; //-400~400\n cube.position.y = Math.random() * range * 2 - range;\n cube.position.z = Math.random() * range * 2 - range;\n\n cube.rotation.x = Math.random() * 2 * Math.PI; //0~2PI\n cube.rotation.y = Math.random() * 2 * Math.PI;\n cube.rotation.z = Math.random() * 2 * Math.PI;\n\n cube.scale.x = Math.random(); //0~1\n cube.scale.y = Math.random();\n cube.scale.z = Math.random();\n\n scene.add(cube);\n }\n}", "function populateRandom(n) {\n var x, y;\n for (var i = 0; i < n; i++) {\n do {\n x = Math.floor(Math.random() * 100);\n y = Math.floor(Math.random() * 100);\n } while (world[x][y]);\n world[x][y] = true;\n }\n }", "function glider() {\n let h = parseInt(Math.random() * (height - 3));\n let w = parseInt(Math.random() * (width - 3));\n field[h][w + 1] = true;\n field[h + 1][w + 2] = true\n field[h + 2][w + 2] = true\n field[h + 2][w + 1] = true\n field[h + 2][w] = true;\n draw();\n }", "static random () {\n var randomInt = (max) => {\n return Math.floor(Math.random() * (max + 1))\n }\n\n // Verify if both edges and corners have the same parity\n var verifyParity = (cp, ep) => {\n var getSum = (data, num_pieces) => {\n var sum = 0\n for (var i = 1; i <= num_pieces; i++) {\n sum += data % i\n data = Math.floor(data / i)\n }\n return sum\n }\n return (getSum(cp, 8) % 2) == (getSum(ep, 12) % 2)\n }\n\n var data\n do {\n data = {\n co: randomInt(2186),\n eo: randomInt(2047),\n cp: randomInt(40319),\n ep: randomInt(479001599),\n c: 0\n }\n } while (!verifyParity(data.cp, data.ep))\n\n return new Cube(data)\n }", "function RadialCubes(count, space, location){\n \n for(var i = 0; i < count; i++){\n var cube = new SoundBlock();\n var angle = (Math.PI/2) + (i / count) * 2 * Math.PI;\n \n var x = space * Math.cos(angle);\n var y = space * Math.sin(angle);\n scene.add(cube);\n \n //cube.applyMatrix(new THREE.Matrix4().makeTranslation(0, 0, 1));\n cube.geometry.translate(0, 0, 0.5);\n cube.name = count.length;\n cube.position.setY(x);\n cube.position.setX(y);\n cube.lookAt(location);\n }\n}", "function fillRandomPlaces(){\r\n\tvar fillArray = [];//Initialize a local array\r\n\tfor (var i = 0; i < size; i++) { \r\n\t\tfor (var j = 0; j < size; j++) { \r\n\t\t\tif(grid[i][j]==0){\r\n\t\t\t\tfillArray.push({x:i,y:j});//Storing all the blocks with zero\r\n\t\t\t}\r\n\t\t} \r\n\t\t\r\n\t}\r\n\tvar rand = Math.random();//Getting a random value < 1 && > 0\r\n\tvar total = fillArray.length;//Length of all zero containing blocks\r\n\tvar randIndex = Math.floor(rand * total);//Getting a random Index\r\n\tvar randomGrid= fillArray[randIndex];//Getting one random spot\r\n\tgrid[randomGrid.x][randomGrid.y] = rand > 0.2 ? 2 : 4; //With 80% chance of 2 fill 2 or 4 on that empty spot\r\n}", "function fillBox(props) {\n let solution = props.solution.slice();\n for (let i = 0; i < 3; i++) {\n for (let x = 0; x < 3; x++) {\n let tempNum = randomNum(9) + 1;\n let data = {\n row: props.row,\n col: props.col,\n solution: solution,\n num: tempNum\n };\n while (!notInBox(data)) {\n tempNum = randomNum(9) + 1;\n data.num = tempNum;\n data.solution = solution;\n }\n\n solution[props.row + i][props.col + x] = data.num;\n\n data.solution = solution;\n }\n }\n return solution;\n}", "refresh() {\n this.x = Math.random()*x_canv;\n this.depth = -20;\n this.radius = Math.random()*30+10;\n }", "function genCube(){\n //Chunk in voxel.js is defined as a single array of numbers. Each different number as respresent a different block type. Types stored in 2d array, number reference the index.\n //You must know the dimensions of the chunk multiply the height times width time depth to get the total size of the array/chunk.\n //\n //Chunk array seems to be ordered as follows. Fill 1 row from x=0tox=31, then fill all rows to the top, then start over on filling x on the bottom row over to the originial row.\n\tvar voxels = new Int8Array(32 * 32 * 32)\n\t//forward to end, first row and last.\n\tfor(i = 0;i < 31;i++){\n\t\t//last row\n\t\tvoxels[(32*32*i)+30] = 1\n\t\t//first row\n\t\tvoxels[32*32*i] = 1\n\n\t\t//fill in all floor blocks(grass)\n\t\tfor(i2 = 0;i2 < 31;i2++){\n\t\t\tvoxels[(32*32*i)+i2] = 1\n\t\t}\n\n\t\t//bottom to top\n\t\t//corner 1\n\t\tvoxels[32*i] = 1\n\n\t}\n\tvoxels[0] = 2\n\tvoxels[32] = 2\n\tvar z,x,y\n\tx=1;\n\ty=0;\n\tz=4;\n\t//test code to figure out how to render roads. Place a lineblock in the middle,\n\t//and sideroad blocks around it.\n\tvar pos = 32*32*16+16\n\tvoxels[32*32*16+16] = 2\n\tvoxels[pos-1] = 3\n\tvoxels[pos+1] = 3\n\tvoxels[(32*32)+pos] = 3\n\tvoxels[pos-(32*32)] = 3\n\t//voxels[(32*32*z)+(32*y)+x] = 2\n\t//this.voxels = voxels\n\treturn voxels\n}", "function setupField() { //////////////////////////////////////创建田\n\t\t\tfor (var i = 0; i < 5; i++) {\n\t\t\t\tplantsArray[i] = new Array();\n\t\t\t\tzombiesArray[i] = new Array();\n\t\t\t\tfor (var j = 0; j < 9; j++) {\n\t\t\t\t\tplantsArray[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function setupBoxes() {\n\tgirl.setupBoxes([[false,[3,2],0],[false,[6,2],0],[false,[3,9],0],[false,[1,12],0]]);\n\tguy.setupBoxes([[false,[16,2],0],[false,[10,2],0],[false,[11,11],0],[false,[17,8],0]]);\n}", "function colorFieldes() {\n fields.map(field => {\n field.style.backgroundColor =\n colors[Math.floor(Math.random() * colors.length)];\n });\n}", "static generateField(height, width, holes) {\n let newField = [];\n for (let i = 0; i < height; i++) {\n newField.push([]);\n for (let j = 0; j < height; j++) {\n newField[i].push(fieldCharacter)\n };\n };\n newField[0][0] = pathCharacter;\n let hatX = Math.floor(Math.random() * width);\n let hatY = Math.floor(Math.random() * height);\n newField[hatY][hatX] = hat;\n \n for (let k = holes; k > 0; k--) {\n let holeX = hatX;\n let holeY = hatY;\n while (holeX === hatX) {\n holeX = Math.floor(Math.random() * width)\n };\n while (holeY === hatY) {\n holeY = Math.floor(Math.random() * height)\n };\n newField[holeY][holeX] = hole; \n }\n return newField;\n }", "setDataWithRandom() {\n for (let key in this.qKey) {\n if (this.qKey[key] === this.field) {\n this.entryPoint = Number(key);\n }\n }\n var qKey = Math.floor(Math.random() * this.items.length);\n this.dataPoint = this.items[qKey][this.entryPoint];\n this.render();\n }", "randomize () {\n\n // loop for the x coordinates\n for (let x = 0; x < this.config.get(colsKey); ++x) {\n\n // loop over the y coordinates\n for (let y = 0; y < this.config.get(rowsKey); ++y) {\n\n // assign a random 0 or 1\n this.grid.set((x + y * this.config.get(colsKey)), Math.round(Math.random()));\n }\n }\n }", "function initCube() {\n var cubeMaterial = new THREE.MeshNormalMaterial();\n var cubeMaterial = new THREE.MeshBasicMaterial();\n\n var cube = new THREE.Mesh(new THREE.CubeGeometry(50, 50, 50), cubeMaterial);\n\n cube.material.color.setHex( 0xabcdef );\n cube.overdraw = true;\n return cube;\n}", "function cubemapGenerator() {\n const cubemap = [\n \"cubemap/px.png\", \"cubemap/nx.png\",\n \"cubemap/py.png\", \"cubemap/ny.png\",\n \"cubemap/pz.png\", \"cubemap/nz.png\"\n ];\n\n const textureCube = new THREE.CubeTextureLoader().load(cubemap);\n textureCube.mapping = THREE.CubeRefractionMapping;\n scene.background = textureCube;\n}", "function generateCube() {\n var geometry = new THREE.CubeGeometry(100, 100, 100);\n\n this.addGeometry(geometry);\n _camera.position.z = 500;\n\n return this;\n }", "function populate() {\n rainFall = [];\n rainFallLength = maxLength.value;\n rainFallMaxHeight = maxHeight.value;\n rainFallGenerator();\n bucket = 0;\n maxDim = rainFall.reduce(function (a, b) {\n return Math.max(a, b);\n });\n squares = [];\n canvasWidth = rainFall.length * 50 + 100;\n canvasHeight = maxDim * 50 + 100;\n structurePainter();\n for (var k = maxDim; k >= 1; k--) {\n oneDimFiller(k);\n }\n canvas = createCanvas(canvasWidth, canvasHeight);\n canvas.parent('canvasHome');\n background(34, 139, 34);\n function draw() {\n for (var i = 0; i < squares.length; i++) {\n squares[i].display();\n }\n base.display();\n }\n rainFallString = rainFallStringify();\n $('#rainArray').text(rainFallString);\n $('#bucket').text(bucket);\n}", "function randomGrid() {\n if (generate) return\n const randGrid = new Array(cols).fill(null)\n .map(() => new Array(rows).fill(null)\n .map(() => Math.floor(Math.random() * 2)));\n setGrid(randGrid)\n genCount.current = 0\n }", "function add(){\n var free = [];\n for(var i=0; i<HEIGHT; i++){\n for(var j=0; j<WIDTH; j++){\n if(GAME[i][j] == 0){\n free.push([i, j]);\n }\n }\n }\n var fieldIndex = random(free.length);\n var added = SPAWNS[random(2)];\n GAME[free[fieldIndex][0]] [free[fieldIndex][1]] = added;\n}", "randomize() {\n for (let h = 0; h < this.height; h++) {\n for (let w = 0; w < this.width; w++) {\n this.cells[this.currentBufferIndex][h][w] = Math.random() * MODULO | 0;\n }\n }\n }", "function createCubesBall(num, scene) {\n const cubes = [];\n for (let i = 0; i < num; i++) {\n if (i === 0) cubes[i] = BABYLON.Mesh.CreateCylinder('b', 0.05, 0.05, 0.01, scene);\n else cubes[i] = cubes[0].createInstance(`b${i}`);\n\n let x = 0;\n let y = 0;\n let z = 0;\n do {\n x = rnd(-5, 5);\n y = rnd(-5, 5);\n z = rnd(-5, 5);\n } while (allWithin(1.5, x, y, z));\n\n cubes[i].scaling = new BABYLON.Vector3(rnd(1.0, 1.5), rnd(1.0, 1.5), rnd(1.0, 10.0));\n\n cubes[i].position = new BABYLON.Vector3(x, y, z);\n\n cubes[i].lookAt(new BABYLON.Vector3(0, 0, 0));\n }\n return cubes;\n}", "function init_grid() {\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < cols; j++) {\n if (random() < 0.9) {\n grid[i][j] = 1;\n }\n if (random() < 0.04) {\n grid[i][j] = 2;\n }\n }\n }\n}", "function addLambertCube() {\n var geometry = new THREE.BoxGeometry(cubeLength, cubeLength, cubeLength);\n for (var i = 0; i < objectCounts; i++) {\n var cube = new THREE.Mesh(geometry, new THREE.MeshLambertMaterial({\n color: Math.random() * 0xffffff\n }));\n\n cube.position.x = Math.random() * range * 2 - range; //-400~400\n cube.position.y = Math.random() * range * 2 - range;\n cube.position.z = Math.random() * range * 2 - range;\n\n cube.rotation.x = Math.random() * 2 * Math.PI; //0~2PI\n cube.rotation.y = Math.random() * 2 * Math.PI;\n cube.rotation.z = Math.random() * 2 * Math.PI;\n\n cube.scale.x = Math.random(); //0~1\n cube.scale.y = Math.random();\n cube.scale.z = Math.random();\n\n if (boxHelper) {\n var box = new THREE.BoxHelper(cube, 0xffff00);\n scene.add(box);\n }\n\n scene.add(cube);\n }\n}", "createGrid() {\r\n const material = new THREE.MeshPhysicalMaterial({\r\n color: '#060025',\r\n metalness: 0.6,\r\n roughness: 0.05,\r\n });\r\n\r\n const gutter = { //To separate rows and Cols\r\n size: 4\r\n };\r\n\r\n //For rows\r\n for (let row = 0; row < this.grid.rows; row++) {\r\n this.meshes[row] = [];\r\n\r\n //For cols\r\n for (let index = 0; index < 1; index++) {\r\n const totalCol = this.getTotalRows(row);\r\n\r\n for (let col = 0; col < totalCol; col++) {\r\n const geometry = this.getRandomGeometry();\r\n const mesh = this.getMesh(geometry.geom, material);\r\n\r\n mesh.position.y = 0;\r\n mesh.position.x = col + (col * gutter.size) + (totalCol === this.grid.cols ? 0 : 2.5);\r\n mesh.position.z = row + (row * (index + .25));\r\n\r\n mesh.rotation.x = geometry.rotationX;\r\n mesh.rotation.y = geometry.rotationY;\r\n mesh.rotation.z = geometry.rotationZ;\r\n\r\n mesh.initialRotation = {\r\n x: mesh.rotation.x,\r\n y: mesh.rotation.y,\r\n z: mesh.rotation.z,\r\n };\r\n\r\n this.groupMesh.add(mesh);\r\n\r\n this.meshes[row][col] = mesh;\r\n }\r\n }\r\n }\r\n\r\n const centerX = -(this.grid.cols / 2) * gutter.size - 1;\r\n const centerZ = -(this.grid.rows / 2) - .8;\r\n\r\n this.groupMesh.position.set(centerX, 0, centerZ);\r\n\r\n this.scene.add(this.groupMesh);\r\n }", "seed(grid) {\n const nextGrid = grid.slice();\n const seed = (x, y, grid, cb) => {\n const nextGrid = grid.slice();\n if (cb) {\n return cb();\n } else {\n if (Math.random() > 0.82) {\n nextGrid[y][x] = \"live\";\n } else {\n nextGrid[y][x] = undefined;\n }\n }\n return nextGrid;\n };\n\n nextGrid.map((row, y) => {\n return row.map((cell, x) => {\n return seed(x, y, nextGrid);\n });\n });\n return nextGrid;\n }", "function setupTower(){\n //you code here\n for(var i=0; i<6; i++)\n {\n for(var j=0; j<3; j++)\n { \n colors.push(color(0, random(150,255), 0));\n boxes.push(Bodies.rectangle(750+j*80, 0, 80, 80));\n }\n }\n World.add(engine.world, boxes);\n}", "function randomBucketReq(){\r\n\t var myBucket = document.querySelectorAll(\".bucket\");\r\n\t var randomNum = Math.floor((Math.random() * 17) + 0);\r\n\t //var randomNum = 9; //for testing purposes\r\n\t for(i = 0; i < 3; i++){\r\n\t\tmyBucket[i].shape = randomNum;\r\n\t }\r\n }", "populateBoard() {\n for (let col = 0; col < this.board.getSize(); col++) {\n for (let row = 0; row < this.board.getSize(); row++) {\n // Check the empty candy position (hole), fill with new candy\n if (this.board.getCandyAt(row, col) == null) {\n this.board.addRandomCandy(row, col);\n }\n }\n }\n }", "function initEmptyField(){\r\n\tgame_field = [];\r\n\tfor (var i = 0; i<10; i++){\r\n\t\tgame_field.push([]);\r\n\t\tfor (var j = 0; j<10; j++){\r\n\t\t\tgame_field[i].push(0);\r\n\t\t\tdrawCell(i, j);\r\n\t\t}\r\n\t}\r\n}", "createRandomMaterials (nb) {\n\n var materials = []\n\n for (var i = 0; i < nb; ++i) {\n\n var clr = Math.random() * 16777215\n\n materials.push(this.createMaterial({\n shading: THREE.FlatShading,\n name: Toolkit.guid(),\n shininess: 50,\n specular: clr,\n color: clr\n }))\n }\n\n return materials\n }", "function AddRandom() {\n\n\n var location = [];\n\n for (var j = 0; j < 5; j++) {\n for (var i = 0; i < 5; i++) {\n\n if (grid[j][i].name == \"empty\") {\n\n location.push([i, j]);\n }\n }\n }\n\n if (location.length > 0) {\n\n var random = location[Math.floor(Math.random() * location.length)];\n scene.remove(grid[random[1]][random[0]]);\n\n grid[random[1]][random[0]] = Blocks[0].clone();\n\n grid[random[1]][random[0]].position.x = random[0];\n grid[random[1]][random[0]].position.y = random[1];\n grid[random[1]][random[0]].scale.x = 0.1;\n grid[random[1]][random[0]].scale.y = 0.1;\n scene.add(grid[random[1]][random[0]]);\n \n return 0;\n }\n \n return 1;\n\n}", "function Autofill(){\n for(var i = 0; i < mesh.Length; i++)\n {\n \tbones += mesh[i].bones;\n }\n}", "function addCubesToGrid(grid, size){\n //var counter = 0;\n var i = 0;\n for(y = 0; y < size; y++){\n for(x = 0; x < size; x++){\n var cube = document.createElement('cube');//create div element and assign it to var cube\n cube.classList.add('firstState');//apply a green color to cube \n cube.id = i++;\n cube.setAttribute('x',x);//add x to cube\n cube.setAttribute('y',y);//add y to cube\n grid.appendChild(cube);//add cube to grid \n };\n };\n clickToTimes(size);\n}", "function initObjects() {\n /* Randomize forest */\n for (var i = 0; i < cattail_count; i++) {\n addCattail();\n }\n /* Randomize Dragonflies */\n for (var i = 0; i < dragonfly_count; i++) {\n addDragonfly();\n }\n /* Randomize Lily Pads */\n for (var i = 0; i < lily_count; i++) {\n g_lilys.push([\n Math.random() * 40 - 20, // x\n Math.random() * 40 - 20, // y\n Math.random() * 360, // rot\n Math.random() + 1, // scale\n ]);\n }\n /* Randomize Logs */\n for (var i = 0; i < log_count; i++) {\n g_logs.push([\n Math.random() * 40 - 20, // x\n Math.random() * 40 - 20, // y\n Math.random() * 360, // rot\n Math.random() * 4 + 4, // scale\n ]);\n }\n /* Randomize Rocks */\n for (var i = 0; i < rock_count; i++) {\n g_rocks.push([\n Math.random() * 40 - 20, // x\n Math.random() * 40 - 20, // y\n Math.random() * 360, // rot\n Math.random() * 2 + 1, // scale\n ]);\n }\n}", "function randGenInvValues(){\n for(var i = 0; i < itemList1.length; i++){\n itemList1[i].value = Math.floor(Math.random() * 300)\n }\n for(var i = 0; i < itemList2.length; i++){\n itemList2[i].value = Math.floor(Math.random() * 300)\n }\n for(var i = 0; i < itemList3.length; i++){\n itemList3[i].value = Math.floor(Math.random() * 300)\n }\n}", "function createGrid(xCols, yRows, zMod) {\n // grid\n for (var i = 0; i < objects.length; i++) {\n var object = new THREE.Object3D();\n object.position.x = ((i % xCols) * 300) - 800;\n object.position.y = (-(Math.floor(i / 5) % yRows) * 400) + 800;\n object.position.z = (Math.floor(i / zMod)) * 500 - 2000;\n object.id = Math.random() * 300;\n targets.grid.push(object);\n }\n}", "function setFieldCards()\n {\n var cardCovers = properties.cardCovers.front.slice(),\n cells = [];\n\n for (var counterRow = 0; counterRow < sizes.field.rows; counterRow++)\n {\n for (var counterCol = 0; counterCol < sizes.field.cols; counterCol++)\n {\n cells[counterRow * sizes.field.cols + counterCol] =\n {\n row: counterRow,\n col: counterCol\n };\n }\n }\n\n for (var counter = 0; counter < cards.length; counter++)\n {\n cards[counter].remove(false);\n }\n cards = [];\n\n for (var counter = 0; counter < sizes.field.rows * sizes.field.cols / 2; counter++)\n {\n var randomCover = cardCovers.popRandom();\n\n cards.push(createCard(randomCover, true, turnCard.bind(this), counter, cells.popRandom()));\n cards.push(createCard(randomCover, true, turnCard.bind(this), counter, cells.popRandom()));\n }\n }", "function fillCubeSelector($CubeSelector, setids, themeids, graph){\n //1. if no themeids passed and a graph is, try to make a list of graph's map and pointsetids that are part of a theme (only these can be part of cubes)\n if(!themeids.length && graph){\n setids = [];\n graph.eachComponent(function(){\n if((this.isMapSet() || this.isPointSet()) && this.themeid) {\n if(setids.indexOf(this.setid)===-1) setids.push(this.setid);\n if(themeids.indexOf(this.themeid)===-1) themeids.push(this.themeid);\n }\n });\n setids.sort(); //ensure the array joins to a predictable string\n }\n\n //fetch a list of applicable cubes (if they have not already been fetched for these setids)\n var possibleCubes = graph ? graph.possibleCubes : false;\n if(setids.length>0 && !(possibleCubes && possibleCubes.setsids==setids.join())) {\n callApi({command: \"GetCubeList\", setids: setids, themeids: themeids},\n function(jsoData, textStatus, jqXH){\n possibleCubes = { //save on the main graph to ensure availibility betweeon prove panel ops.\n setsids: setids.join(),\n cubes: jsoData.cubes\n };\n if(graph) graph.possibleCubes = possibleCubes;\n _fillSelector();\n });\n } else _fillSelector();\n return possibleCubes;\n\n function _fillSelector(){\n var cubeOptions = '<option value=\"none\">none </option>' +\n '<optgroup class=\"non-cube-vizes\" label=\"visualizations with mouseover interactions\">' +\n '<option value=\"scatter\">scatter plot of maps with linear regression and correlation coefficient</option>' +\n '<option value=\"line\">line chart of highlighted geographies</option>' +\n '<option value=\"line-bunnies\">line chart with national data of highlighted geographies</option>' +\n '<option value=\"components-bar\">bar chart of map&rsquo;s components of selected geographies</option>' +\n '<option value=\"components-line\">line chart of map&rsquo;s components of selected geographies</option>' +\n '<option value=\"components-area\">stacked area chart of map&rsquo;s components for selected geography</option>' +\n '<option value=\"list-asc\">ordered list (ascending)</option>' +\n '<option value=\"list-desc\">ordered list (descending)</option>' +\n '</optgroup>';\n var i, currentCubeAccountedFor = false, cube, type = false;\n if(possibleCubes&&possibleCubes.cubes.length){\n for(i=0;i<possibleCubes.cubes.length;i++){\n cube = possibleCubes.cubes[i];\n if(type!=cube.type){\n cubeOptions += (type?'</optgroup>':'') + '<optgroup class=\"cubes\" label=\"show supplementary data '+cube.type+' on geography click\">';\n type = cube.type;\n }\n cubeOptions += '<option value=\"'+cube.cubeid+'\"'+(graph&&cube.cubeid==graph.cubeid?' selected':'')+'>'+cube.name+'</option>';\n if(graph&&cube.cubeid==graph.cubeid) currentCubeAccountedFor = true;\n }\n cubeOptions += '</optgroup>'\n }\n if(!currentCubeAccountedFor && graph && graph.cubeid) cubeOptions = '<select value=\"' + graph.cubeid + '\" selected>' + graph.cubename || 'data cube' + '</select>' + cubeOptions;\n $CubeSelector.html(cubeOptions);\n if(graph && graph.mapconfig && !graph.cubeid) $CubeSelector.val(graph.mapconfig.mapViz);\n $CubeSelector.show();\n }\n}", "generateField(rows, cols){\n\n let field = [];\n\n if(rows <= 0 || cols <= 0){\n throw Error(\"Row and column should be larger than zero. Try again.\");\n }\n else{\n let totalTiles = rows * cols;\n let holesNumber = Math.floor(totalTiles * this.holesPercentage);\n // init domain (all tiles)\n for(let i = 0; i < this.rows; i++){\n field.push([]);\n for(let j = 0; j < this.cols; j++){\n field[i].push(fieldCharacter);\n }\n }\n // set the (0, 0) node as starting point\n field[0][0] = pathCharacter;\n\n // pick hat location (except (0. 0))\n while(true){\n let hatY = Math.floor(Math.random() * this.rows);\n let hatX = Math.floor(Math.random() * this.cols);\n if(!(hatX === 0 && hatY === 0)){\n field[hatY][hatX] = hat;\n break;\n }\n }\n\n // pick holes location\n while(holesNumber > 0){\n let holeY = Math.floor(Math.random() * this.rows);\n let holeX = Math.floor(Math.random() * this.cols);\n\n if(field[holeY][holeX] === fieldCharacter){\n field[holeY][holeX] = hole;\n holesNumber -= 1;\n }\n }\n }\n return field;\n }", "function populatePuzzle(pics, cells) {\r\n for (i = 0; i < pics.length; i++) {\r\n var rand = Math.floor(Math.random() * pics.length);\r\n if (!pics[rand].used) {\r\n pics[rand].id.style.gridArea = cells[i];\r\n pics[rand].used = true;\r\n pics[rand].position = i;\r\n } else {\r\n i--;\r\n }\r\n }\r\n }", "randomize() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.cols; j++) {\n this.data[i][j] = Math.random() * 2 - 1;\n }\n }\n }", "function reset() {\n grid.set(function() { return random(2); });\n}", "function initializeVariables(){\n MAX_POINTS = 500;\n drawCount = 0;\n colors = [0x8f00ff,0x4b0082,0x0000ff,0x00ff00,0xffff00,0xff7f00,0xff0000];\n cords = [2.02,2.11,2.18,2.25,2.32,2.40,2.47];\n cords2 = [1.55,1.74,1.94,2.18,2.34,2.52,2.70];\n \n randAllgeometries = new Array(4);\n randAllMaterials = new Array(4);\n randAllLines = new Array(4);\n randAllPositions = new Array(4);\n\n allgeometries = new Array(7);\n allMaterials = new Array(7);\n allLines = new Array(7);\n allPositions = new Array(7);\n\n allgeometries2 = new Array(7);\n allMaterials2 = new Array(7);\n allLines2 = new Array(7);\n allPositions2 = new Array(7);\n\n allgeometries3 = new Array(7);\n allMaterials3 = new Array(7);\n allLines3 = new Array(7);\n allPositions3 = new Array(7);\n}", "function setFood() {\r\n var empty = [];\r\n var foodCount = 0;\r\n // iterate through the grid and find all empty cells\r\n for (var x=0; x < grid.width; x++) {\r\n for (var y=0; y < grid.height; y++) {\r\n if (grid.get(x, y) === EMPTY) {\r\n empty.push({x:x, y:y}); //add to empty array\r\n }\r\n if (grid.get(x, y) === FRUIT) {\r\n foodCount += 1;\r\n }\r\n }\r\n }\r\n // chooses a random cell to place fruit max of 3 at all times\r\n var i = 0;\r\n if (foodCount == 0) {\r\n i = 3;\r\n }\r\n else{\r\n i = 4;\r\n }\r\n for (i; foodCount < i; i--) {\r\n var randpos = empty[Math.round(Math.random()*(empty.length - 1))];\r\n grid.set(FRUIT, randpos.x, randpos.y);\r\n };\r\n\r\n}", "function buildGrid() {\n for(var i=0; i<60; i++) {\n grid.push([]);\n for(var j=0; j<60; j++) {\n grid[i].push(new Cell(1, 0, Math.floor(Math.random()*(100-50))+50)); // mostly dead grass\n //console.log(grid[i][j].rate);\n //console.log(grid[i][j].timeRemaining);\n }\n }\n}", "function addBlock() {\n var index = Math.floor(Math.random() * (7));\n\n var name = blockNames[index];\n var blocktype = blocks[index]\n var center = centers[index];\n var pos = [20, 0];\n center[0] += 20;\n curBlock = new Block(blocktype, name, center, pos);\n\n //add to grid\n for (var k = 0; k < blocktype.length; k++) {\n for (var l = 0; l < blocktype[0].length; l++) {\n grid[k + 20][l] = blocktype[k][l];//start from 20th row\n }\n }\n\n\n}", "function generate_rubikscube() {\n\t\t\tvar cube = new THREE.Mesh(\n\t\t\t\tnew THREE.BoxGeometry(4,4,4),\n\t\t\t\tnew THREE.MeshLambertMaterial({\n\t\t\t\t\tcolor: 0xff0000,\n\t\t\t\t\tside: THREE.DoubleSide\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tcube.position.set( 0, 0, 0 );\n return cube;\n }", "function initField(){\n\t\n\t// Get field size from html size-display\n\tsize = parseInt($('#game-btn-size').val());\n\t\n\t// For every x (maximum x = size)\n\tfor(var x = 0; x < size; x++){\n\t\t\n\t\t// Init empty x into field array\n\t\tfield[x] = [];\n\t\t\n\t\t// For every y (maximum y = size)\n\t\tfor(var y = 0; y < size; y++){ \n\t\t\n\t\t\t// Init y in x-array with object-parameter status as 'dead'\n\t\t\tfield[x][y] = {\n\t\t\t\tstatus: 'dead'\n\t\t\t}; \n\t\t} \n\t}\n\t\n\t// Draw the new field\n\tdrawField();\n}", "createPlayField() {\n const playField = [];\n\n for (let y = 0; y < 20; y++) {\n playField[y] = [];\n\n for (let x = 0; x < 10; x++) {\n playField[y][x] = 0;\n }\n }\n\n return playField;\n }", "function processSimulate() {\n //Reset variable for new round\n fieldsUser = ['', '', '', '', ''];\n fieldsPC = ['', '', '', '', ''];\n\n let fieldsEmptyUser = [0, 1, 2, 3, 4];\n let fieldsEmptyPC = [0, 1, 2, 3, 4];\n\n for (let j = 0; j < 5; j++) {\n let rand = Math.floor(Math.random() * 10);\n totalRandom += rand;\n\n fieldsUser[fieldsEmptyUser.splice(values.values[rand][j] - 1, 1)] = rand;\n\n if (check)\n fieldsPC[fieldsEmptyPC.splice(valuesPC[rand][j] - 1, 1)] = rand;\n }\n}", "constructor(height, width) {\n this.x = random(-width/1.5, width/1.5);\n this.y = random(-height/1.5, height/1.5);\n this.z = random(width);\n this.pz = this.z;\n\n }", "CreateGeo() {\n // DEBUG: b2.Assert(FrackerSettings.k_dirtProbability +\n // DEBUG: FrackerSettings.k_emptyProbability +\n // DEBUG: FrackerSettings.k_oilProbability +\n // DEBUG: FrackerSettings.k_waterProbability === 100);\n for (let x = 0; x < FrackerSettings.k_worldWidthTiles; x++) {\n for (let y = 0; y < FrackerSettings.k_worldHeightTiles; y++) {\n if (this.GetMaterial(x, y) !== Fracker_Material.EMPTY) {\n continue;\n }\n // Choose a tile at random.\n const chance = Math.random() * 100.0;\n // Create dirt if this is the bottom row or chance dictates it.\n if (chance < FrackerSettings.k_dirtProbability || y === 0) {\n this.CreateDirtBlock(x, y);\n }\n else if (chance < FrackerSettings.k_dirtProbability +\n FrackerSettings.k_emptyProbability) {\n this.SetMaterial(x, y, Fracker_Material.EMPTY);\n }\n else if (chance < FrackerSettings.k_dirtProbability +\n FrackerSettings.k_emptyProbability +\n FrackerSettings.k_oilProbability) {\n this.CreateReservoirBlock(x, y, Fracker_Material.OIL);\n }\n else {\n this.CreateReservoirBlock(x, y, Fracker_Material.WATER);\n }\n }\n }\n }", "set_colors()\r\n {\r\n /* colors */\r\n let colors = [\r\n Color.of( 0.9,0.9,0.9,1 ), /*white*/\r\n Color.of( 1,0,0,1 ), /*red*/\r\n Color.of( 1,0.647,0,1 ), /*orange*/\r\n Color.of( 1,1,0,1 ), /*yellow*/\r\n Color.of( 0,1,0,1 ), /*green*/\r\n Color.of( 0,0,1,1 ), /*blue*/\r\n Color.of( 1,0,1,1 ), /*purple*/\r\n Color.of( 0.588,0.294,0,1 ) /*brown*/\r\n ]\r\n\r\n this.boxColors = Array();\r\n for (let i = 0; i < 8; i++ ) {\r\n let randomIndex = Math.floor(Math.random() * colors.length);\r\n this.boxColors.push(colors[randomIndex]);\r\n colors[randomIndex] = colors[colors.length-1];\r\n colors.pop();\r\n }\r\n\r\n }", "function initCube(vCube, position, geometry) {\n var vertices = new Array(8);\n for (let i in geometry)\n {\n vertices[i] = new Array(3);\n for (let j in geometry[i])\n vertices[i][j] = add(vCube, geometry[i][j]);\n }\n\n var indices = [];\n var first = points.length;\n for (let i = 0; i < 96; i++)\n indices.push(first + i);\n\n var s1 = initSquare(vertices[1][Z], vertices[5][Z], vertices[3][Z], vertices[7][Z], \n position, F, WHITE); //Front\n var s2 = initSquare(vertices[0][Z], vertices[4][Z], vertices[2][Z], vertices[6][Z], \n position, Ba, RED); //Back\n var s3 = initSquare(vertices[1][X], vertices[0][X], vertices[3][X], vertices[2][X], \n position, L, YELLOW); //Left\n var s4 = initSquare(vertices[5][X], vertices[4][X], vertices[7][X], vertices[6][X], \n position, R, GREEN); //right\n var s5 = initSquare(vertices[3][Y], vertices[7][Y], vertices[2][Y], vertices[6][Y], \n position, T, CYAN); //top\n var s6 = initSquare(vertices[1][Y], vertices[5][Y], vertices[0][Y], vertices[4][Y], \n position, Bo, BLUE); //bottom\n var sqrs = [s1, s2, s3, s4, s5, s6];\n sqrs = sqrs.filter(function(square, ind) {\n return position.includes(ind);\n })\n\n // drawing edges of cube\n points.push(vertices[0][X], vertices[0][Y], vertices[1][X], vertices[1][Y],\n vertices[2][X], vertices[2][Y], vertices[3][X], vertices[3][Y],\n vertices[4][X], vertices[4][Y], vertices[5][X], vertices[5][Y],\n vertices[6][X], vertices[6][Y], vertices[7][X], vertices[7][Y],\n vertices[0][X], vertices[0][Z], vertices[2][X], vertices[2][Z],\n vertices[1][X], vertices[1][Z], vertices[3][X], vertices[3][Z],\n vertices[4][X], vertices[4][Z], vertices[6][X], vertices[6][Z],\n vertices[5][X], vertices[5][Z], vertices[7][X], vertices[7][Z],\n vertices[0][Y], vertices[0][Z], vertices[4][Y], vertices[4][Z],\n vertices[1][Y], vertices[1][Z], vertices[5][Y], vertices[5][Z],\n vertices[2][Y], vertices[2][Z], vertices[6][Y], vertices[6][Z],\n vertices[3][Y], vertices[3][Z], vertices[7][Y], vertices[7][Z]);\n\n for (let i in vertices) {\n for (let j in vertices[i]) {\n points.push(vertices[i][j]);\n }\n }\n\n for (let i = 0; i < 72; i++) {\n colors.push(BLACK);\n pick_squares.push(255);\n }\n\n return new Cube(position, indices, sqrs);\n}", "randomize() {\n // Goes through width and height of grid\n for (let height = 0; height < this.height; height++) {\n for (let width = 0; width < this.width; width++) {\n this.cells[this.currentBufferIndex][height][width] =\n (Math.random() * MODULO) | 0; // CHECK THIS???\n }\n }\n }", "reset() {\n this.x = (floor(random(0, 20))) * this.size;\n this.y = (floor(random(0, 10))) * this.size;\n\n }", "plantMines(data, height, width, totalMines) {\n let randomx,\n randomy,\n minesPlanted = 0;\n while (minesPlanted < totalMines) {\n randomx = Math.floor(Math.random() * width);\n randomy = Math.floor(Math.random() * height);\n if (!data[randomy][randomx].isMine) {\n data[randomy][randomx].isMine = true;\n minesPlanted++;\n }\n }\n return data;\n }", "function produceCube() {\n if (Cube.getTotalArea() < field.getArea() / 3\n && Cube.getCubesNumber() < 15 ) {// Prevent too many cubes on a field\n let mover = {};\n let cubePoints = 1;\n const cube = new Cube(getCubeSizeByGameTime(), getCubeColor(), (event, flag) => {\n if (flag) { // mover action\n if ('pause' == flag)\n mover.pause();\n else if ('resume' == flag)\n mover.resume();\n else if('stop' == flag)\n mover.stop(); // Stop movement after cube destruction\n else throw 0;\n } else if(running && 1 === event.buttons) { // left mouse button\n if( cube.color == 'blue') {\n cube.setColor('yellow')\n ++cubePoints;\n }\n else if( cube.color == 'yellow') {\n cube.setColor('red')\n ++cubePoints;\n }\n else if( cube.color == 'red') {\n cubeOnMouseDown(event, cubePoints);\n mover.stop();\n } \n else if( cube.color == 'time') {\n cubePoints = 0;\n gameTimer.addTime(1000);\n cubeOnMouseDown(event, cubePoints);\n mover.stop();\n }\n }\n });\n\n field.addElement(cube.jElement);\n mover = new Mover(cube.jElement, field); // Make cube moveable\n }\n }", "function addDensity(data) {\n\t\t\t// the geometry that will contain all our cubes\n\t\t\tvar geom = new THREE.Geometry();\n\t\t\t// material to use for each of our elements. Could use a set of materials to\n\t\t\t// add colors relative to the density. Not done here.\n\t\t\tvar cubeMat = new THREE.MeshBasicMaterial({color: 0xffffff, emissive:0xffffff});\n\t\t\tvar cubeMat3 = new THREE.MeshBasicMaterial({color: 0xffffff, opacity: 0.6, emissive:0xffffff});\n\t\t\tvar cubeMat2 = new THREE.MeshBasicMaterial( {color: 0x0F9CFF} );\n\t\t\tfor (var i = 0 ; i < data.length-1 ; i++) {\n\n\t\t\t\t//get the data, and set the offset, we need to do this since the x,y coordinates\n\t\t\t\t//from the data aren't in the correct format\n\t\t\t\tvar x = parseInt(data[i][0])+180;\n\t\t\t\tvar y = parseInt((data[i][1])-84)*-1;\n\t\t\t\tvar value = parseFloat(data[i][2]);\n\n\t\t\t\t// calculate the position where we need to start the cube\n\t\t\t\tvar position = latLongToVector3(y, x, 400 + 1+value/30/4 * bli2, 2);\n\t\t\t\tvar position2 = latLongToVector3(y, x, 400 + 1+value/30/2 * bli2, 2);\n\n\t\t\t\t// create the cube\n\t\t\t\tvar cube2 = new THREE.Mesh(new THREE.CubeGeometry(1 * bli2,1 * bli2,1 * bli2,1,1,1,cubeMat));\n\t\t\t\tcube2.position = position2;\n\t\t\t\tcube2.lookAt( new THREE.Vector3(0,0,0) );\n\t\t\t\tTHREE.GeometryUtils.merge(geom, cube2);\n\n\t\t\t\tif(1+value/30/2 * bli2 >= 8 * bli2){\n\t\t\t\t\tvar cube = new THREE.Mesh(new THREE.CubeGeometry(1 * bli2,1 * bli2,1+value/30/2 * bli2,1,1,1,cubeMat3));\n\t\t\t\t\tcube.position = position;\n\t\t\t\t\tcube.lookAt( new THREE.Vector3(0,0,0) );\n\n\t\t\t\t\tvar spGeo = new THREE.SphereGeometry(3 * bli2, 3 * bli2, 3 * bli2);\n\t\t\t\t\tvar mat2 = new THREE.MeshBasicMaterial( {color: 0xffffff} );\n\t\t\t\t\tvar sp = new THREE.Mesh(spGeo,mat2);\n\t\t\t\t\tsp.position = position2;\n\t\t\t\t\tsp.lookAt( new THREE.Vector3(0,0,0) );\n\t\t\t\t\tscene.add(sp);\n\n\t\t\t\t\tTHREE.GeometryUtils.merge(geom, cube);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// create a new mesh, containing all the other meshes.\n\t\t\tvar total = new THREE.Mesh(geom, new THREE.MeshFaceMaterial());\n\n\t\t\t// and add the total mesh to the scene\n\t\t\tscene.add(total);\n\t\t}", "generateResultGrid () {\n this.results = this.shuffleArray(this.baseNumbers)\n }", "function fillArray(z) {\n var length = z.length;\n for (i=0;i<length;i++) {\n for (j=0;j<length;j++) {\n var die = Math.random();\n if (die<0.3) {\n z[i][j] = \"red\";\n }\n else if (die<0.6) {\n z[i][j] = \"blue\";\n }\n else {\n z[i][j] = \"white\";\n }\n }\n }\n return z;\n}", "function removeCubesFromGrid(size){\n for(i = 0; i < size * size; i++){\n document.getElementById(i).remove();//removing cubes\n }; \n}", "function createField (rows, heights){\n for(let x=0; x< rows; x++){\n let rowArray = [];\n for(let y=0; y<heights; y++)\n { \n const inputX = Math.round(Math.random()*10);\n if (inputX <= 8){\n rowArray.push(fieldCharacter);\n }\n \n else{\n rowArray.push(hole);\n }\n }\n field.push(rowArray);\n }\n do{\n field[Math.floor(Math.random()*rows)][Math.floor(Math.random()*heights)] = hat;\n } \n while (field[0][0] === hat);\n \n field[0][0] = pathCharacter;\n return field;\n}", "function setBeerCollectionData() {\n shuffleArray(beer_Collection);\n}", "function createCity(buildingCount, rangeX, rangeY, scale, startingX) {\n\n var startingZ = -4000;\n // create the basic buildingblock\n var buildingBlock = new THREE.BoxGeometry(30,30,100);\n buildingBlock.applyMatrix( new THREE.Matrix4().makeTranslation( 0, 0.5, 0 ) );\n // setup the texture for the roof\n var uvPixel = 0.0;\n buildingBlock.faceVertexUvs[0][4][0]=new THREE.Vector2(uvPixel,uvPixel);\n buildingBlock.faceVertexUvs[0][4][1]=new THREE.Vector2(uvPixel,uvPixel);\n buildingBlock.faceVertexUvs[0][4][2]=new THREE.Vector2(uvPixel,uvPixel);\n buildingBlock.faceVertexUvs[0][5][0]=new THREE.Vector2(uvPixel,uvPixel);\n buildingBlock.faceVertexUvs[0][5][1]=new THREE.Vector2(uvPixel,uvPixel);\n buildingBlock.faceVertexUvs[0][5][2]=new THREE.Vector2(uvPixel,uvPixel);\n\n var baseScaleY = 35;\n\n // create buildings\n for (var i = 0 ; i < buildingCount ; i++) {\n // create a custom material for each building\n var material = new THREE.MeshLambertMaterial();\n material.color = new THREE.Color(0xffffff);\n material.map = new THREE.Texture(generateBuildingTexture());\n material.map.anisotropy = renderer.getMaxAnisotropy();\n material.map.needsUpdate = true;\n // create the mesh\n var building = new THREE.Mesh(buildingBlock, material);\n //var scale =((Math.random()/1.2)+0.5) * scale;\n //var scale = 1.2 * scale;\n // scale the buildings\n building.scale.x = scale * 2;\n building.scale.z = scale;\n building.scale.y = baseScaleY + Math.random() * 15;\n building.rotation.y = Math.PI / 180 * 90;\n // position the buildings\n building.position.x= startingX;\n building.position.z= startingZ;\n building.position.y = 150;\n console.log(buildingBlock.parameters.height);\n // add to scene\n\n scene.add(building);\n buildingArr.push(building);\n\n\n if (startingX < 0) {\n startingX += 375;\n }\n else {\n startingX -= 375;\n }\n\n\n if (i === (buildingCount/2) - 1){\n\n if (startingX < 0) {\n startingX = -3900;\n }\n else {\n startingX = 3900;\n }\n\n startingZ -= 300;\n baseScaleY += 15;\n }\n\n\n\n }\n}", "fill () {\n\n\t\t//console.log(\"Filling up\",this.size,this.Dudes.length);\n\t\twhile (this.Dudes.length < this.size) {\n\t\t\tlet freshGenome = new Genome(this.fitnessFunction,null);\n\t\t\t//console.log(\"freshGenome\", JSON.stringify(freshGenome.genome));\n\t\t\tthis.Dudes.push(freshGenome);\n\t\t}\n\t\t//console.log(\"Filling up\",this.size,this.Dudes.length);\n\n\t}", "function generateFlowData() {\n\td3.range(numFlowData).forEach((i) => {\n\t flowData[i] = normalize([\n Math.random() * 2 - 1, // column\n Math.random() * 2 - 1, // row\n 3 * Math.random(), // magnitude\n ]);\n\t});\n}", "function init() {\r\n\t\t\t\r\n\t\t\tvar grid = document.getElementById(\"grid\");\r\n\t\t\tfor(var i=1; i<=4; i++){\r\n\t\t\t\tvar riga = document.createElement(\"div\");\r\n\t\t\t\triga.setAttribute(\"Id\", \"riga\"+i);\r\n\t\t\t\tfor(var j=0; j<4; j++){\r\n\t\t\t\t\tvar casella = document.createElement(\"input\");\r\n\t\t\t\t\tvar n = i*4+j;\r\n\t\t\t\t\tcasella.setAttribute(\"Id\", \"casella\"+n );\r\n\t\t\t\t\tcasella.setAttribute(\"readonly\", \"readonly\");\r\n\t\t\t\t\tcasella.setAttribute(\"value\", 0);\r\n\t\t\t\t\triga.appendChild(casella);\r\n\t\t\t\t}\r\n\t\t\t\tgrid.appendChild(riga);\r\n\t\t\t\t}\t\t\t\r\n\t\t}", "function paintFields(net) {\n const colorArr = [\n 'blue',\n 'red',\n 'lime',\n 'orange',\n 'blue',\n 'coral',\n 'blueviolet',\n 'pink',\n 'green',\n 'black',\n 'PapayaWhip',\n 'cyan',\n 'brown',\n 'DarkOliveGreen',\n 'grey',\n ];\n // console.log('a negyzetem ', net);\n // console.log('a colorArr merete: ', colorArr.length);\n\n let ujEl = eleMaker(DOMelems.box, 'div', 'colorBox');\n net == 4 ? ujEl.classList.add('box2') : ujEl.classList.add('box3');\n\n //feltolti a jatekmezot szines negyzetekkel\n while (tovabb) {\n let ind = Math.floor(Math.random() * colorArr.length);\n // console.log('index: ', ind);\n if (!pcColorArr.includes(colorArr[ind])) {\n tovabb = false;\n pcColorArr.push(colorArr[ind]);\n ujEl.style.background = colorArr[ind];\n }\n // console.log('pcColorArr: ', pcColorArr);\n // console.log('OK?', tovabb);\n }\n\n DOMelems.messageBox.innerText = `van hátra: ${\n DOMelems.gLevel - playerTrials\n } lépés`;\n // const colorBoxes = document.querySelectorAll('.colorBox');\n\n return {\n square: ujEl, // a mezo egyes elemei\n };\n}", "_assignRandomCords(){\n let newRow,newCol;\n while(true){\n newRow=Math.floor(Math.random()*(this._maxRows-1));\n newCol = Math.floor(Math.random()*(this._maxCols-1));\n if(this._snake.filter(cords=> cords.col==newCol && cords.row==newRow).length ==0) break;\n }\n this._fruit[0].row=newRow;\n this._fruit[0].col=newCol;\n \n }", "function initialize(){\n // sets to number betwee 19-120\n randomNum = Math.floor((Math.random() * 120) + 19);\n // sets each crystal to a unique random value 1-12\n $(\"#crystal1\").attr(\"value\",randomCrystalNum());\n $(\"#crystal2\").attr(\"value\",randomCrystalNum());\n $(\"#crystal3\").attr(\"value\",randomCrystalNum());\n $(\"#crystal4\").attr(\"value\",randomCrystalNum());\n render(); \n}", "function updateCubes() {\n cubePositionVectors = [];\n for (let i = 0; i < cubeFactor; ++i) {\n for (let j = 0; j < cubeFactor; ++j) {\n for (let k = 0; k < cubeFactor; ++k) {\n cubePositionVectors.push(i * 4);\n cubePositionVectors.push(j * 4);\n cubePositionVectors.push(k * 4);\n }\n }\n }\n\n const cubeCount = document.getElementById('cube_count');\n cubeCount.innerText = cubeFactor ** 3;\n }", "function updateCubes() {\n cubePositionVectors = [];\n for (let i = 0; i < cubeFactor; ++i) {\n for (let j = 0; j < cubeFactor; ++j) {\n for (let k = 0; k < cubeFactor; ++k) {\n cubePositionVectors.push(i * 4);\n cubePositionVectors.push(j * 4);\n cubePositionVectors.push(k * 4);\n }\n }\n }\n\n const cubeCount = document.getElementById('cube_count');\n cubeCount.innerText = cubeFactor ** 3;\n }", "function init()\n{\n for (var y = 0; y < dimen; y++) {\n for (var x = 0; x < dimen; x++) {\n setAlive( cells, x, y, Math.random() < 0.3 );\n }\n }\n}", "get randomData() {\n let data = { rows: 0, cols: 0 , x: 0 };\n\n //formula for generating a random value within the set range\n // const randomNumber = min + Math.round(Math.random() * (max - min));\n\n //generate the random properties of the new platofrm and updates the 'data' properties for each one\n const offset = this.ranges.offset.min + Math.round(Math.random() * (this.ranges.offset.max - this.ranges.offset.min));\n\n data.x = this.current.right + offset;\n\n data.cols = this.ranges.cols.min + Math.round(Math.random() * (this.ranges.cols.max - this.ranges.cols.min));\n\n data.rows = this.ranges.rows.min + Math.round(Math.random() * (this.ranges.rows.max - this.ranges.rows.min));\n\n \n\n //return the generated random data\n return data;\n \n }", "randomize() {\n // !!!! IMPLEMENT ME !!!!\n for (let height = 0; height < this.height; height++) {\n for (let width = 0; width < this.width; width++) {\n this.cells[this.currentBufferIndex][height][width] = (Math.random() * 2) | 0;\n }\n }\n }", "static generateField(width, height, holes) {\n let newField = [];\n for (let i = 0; i < width; i++) {\n newField.push([]);\n for (let j = 0; j < height; j++) {\n newField[i].push(fieldCharacter)\n };\n };\n //5.2 return a randomized two-dimensional array representing the field with a hat and one or more holes.\n newField[0][0] = pathCharacter;\n let hatX = Math.floor(Math.random() * width);\n let hatY = Math.floor(Math.random() * height);\n newField[hatX][hatY] = hat;\n\n //generate hole location\n for (let h = holes; h > 0; h--) {\n let holeX = hatX;\n let holeY = hatY;\n //make sure hole =/= hat\n while (holeX === hatX) {\n holeX = Math.floor(Math.random() * width)\n };\n while (holeY === hatY) {\n holeY = Math.floor(Math.random() * height)\n };\n newField[holeX][holeY] = hole;\n }\n return newField;\n }", "function loadElements(){\n\tvar rand = Math.floor(Math.random() * 2);\t//random number {0,1}: 0=cone, 1=cup \n\tvar posX = randomPosX(); //randomly deciding in which lane spawn it\n\tif(rand == 0 && numcones < totalcones){\t\n\t\tcones.push(models['cone'].clone()); //crea ostacolo\n\t\tcones[numcones].position.set(posX,-43,-650); //position of cone/cup\n\t\tcones[numcones].scale.set(6,6,6);//size of cone\n\t\tcones[numcones].rotation.y = 210; \n\t\tscene.add(cones[numcones]); //pusho l'ultimo ostacolo creato\n\t\tnumcones+=1; //aumento il numero di ostacoli\n\t}else if(rand == 1 && numcups < totalcups){ //analog to cone\n\t\tcups.push(models['cup'].clone());\n\t\tcups[numcups].position.set(posX, -43, -650);\n\t\tcups[numcups].scale.set(0.25,0.25,0.25);\n\t\tscene.add(cups[numcups]);\n\t\tnumcups+=1;\n\t}\n}", "function creategemValues() {\n oneValue = Math.floor(Math.random() * 12 + 2);\n twoValue = Math.floor(Math.random() * 12 + 2);\n threeValue = Math.floor(Math.random() * 12 + 2);\n fourValue = Math.floor(Math.random() * 12 + 2);\n}", "function buildGrid() {\n return new Array(COLS).fill(null)\n .map(()=> new Array(ROWS).fill(null)\n .map(()=> Math.floor(Math.random()*2)));\n}", "newRandom()\n {\n super.newRandom();\n\n this.data = [];\n\n // random integers 10-90\n let random = d3.randomInt(10, 91);\n for(let i = 0; i < this.features.length; i++)\n {\n this.data[i] = random();\n }\n }", "function generateRandomColors() {\r\n color1.value = getRandom();\r\n color2.value = getRandom();\r\n setGradient();\r\n}", "fillCellsRandomly(cellsY, cellsX, colors){\n let colorsPool = colors.flat()\n let randomPoolIndex;\n this.cells = new Array(cellsY);\n for (let y = 0; y<cellsY; y++){\n this.cells[y] = new Array(cellsX)\n for (let x = 0; x<cellsX; x++){\n randomPoolIndex = Math.round( Math.random()*colorsPool.length)-1;\n let randomColor = colorsPool.splice(randomPoolIndex,1);\n this.cells[y][x]= new Cell(randomColor[0], y, x, this.cellWidth, this.cellHight, this.node);\n }\n }\n }", "function generateFood(count) {\n var cols = floor(width/scl);\n var rows = floor(height/scl);\n\n for(var i = currentFoodItems.length; i < count; i++) {\n currentFoodItems.push(new createVector(floor(random(cols)), floor(random(rows))));\n currentFoodItems[i].mult(scl);\n pics[i] = new Pic(currentFoodItems[i].x, currentFoodItems[i].y, img[floor(random(0, img.length))]);\n }\n}", "function parseCube() {\n count ++;\n\n // while (scene.children.length > 0) {\n // scene.remove(scene.children[0]);\n // }\n\n scene.remove.apply(scene, scene.children);\n\n\n newCubes.forEach(function(cube) {\n var h = cube.height;\n var currentPos = cube.position;\n // console.log(pos.x);\n for (i = -1; i < 2; i ++) {\n for (j = -1; j < 2; j ++) {\n for (k = -1; k < 2; k ++) {\n // yes, has to be h/2 here instead of h:\n pos.set(currentPos.x + i * h/2, currentPos.y + j * h/2, currentPos.z + k * h/2);\n var geom = new THREE.BoxGeometry(h / 2.04, h / 2.04, h / 2.04);\n\n // var mat = new THREE.MeshBasicMaterial( { color: color2, transparent: true } );\n\n\n // Logic: if two or more of x, y, z are 0, do NOT draw the box:\n if (!(i == 0 && j==0) && !(k == 0 && j==0) && !(i == 0 && k==0)) {\n // if ((i ==0 && j==0) || (i ==0 && k==0) || (k ==0 && j==0)) {\n var newCube = new THREE.Mesh(geom, material2);\n newCube.position.copy(pos);\n newCube.receiveShadow = true;\n newCube.height = size / (Math.pow(3, count));\n scene.add( newCube );\n newerCubes.push(newCube);\n }\n\n }\n }\n }\n\n\n\n });\n\n //Oh, of course, what we really need to do is cut out pieces, not keep redrawing cubes.\n // Or, we can redraw cubes as long as we clear each time.\n newCubes = newerCubes;\n newerCubes = [];\n\n}", "function cloudFunc() {\n\ti = new Clouds(createVector(random(0, width / 2), random(0, 230)));\n\tcloudCollage.push(i);\n\tfor (var i = 0; i < cloudCollage.length; i += 30) {\n\t\tcloudCollage[i].run();\n\t}\n}", "function fillPositionTexture(texture) {\n const theArray = texture.image.data;\n //put the position data into the texture.\n for (let k = 0, kl = theArray.length; k < kl; k += 4) {\n const x = Math.random() * BOUNDS - BOUNDS_HALF;// BOUNDS = 800, BOUNDS_HALF = BOUNDS / 2;\n const y = Math.random() * BOUNDS - BOUNDS_HALF;\n const z = Math.random() * BOUNDS - BOUNDS_HALF;\n theArray[k + 0] = x;\n theArray[k + 1] = y;\n theArray[k + 2] = z;\n theArray[k + 3] = 1;\n }\n}", "randomAll () {\n var baseMatrix = this.getBaseMatrix()\n var dt = distance_transform.distanceTransform(baseMatrix)\n\n /* Get core structures */\n var core_position = this.corePos ? this.corePos : this.getPositionFor(dt, LAYOUT_CORE_BUFFER)\n if (!core_position) {\n return false\n }\n baseMatrix = this.addToMatrix(baseMatrix, core_position, LAYOUT_CORE_BUFFER)\n dt = distance_transform.distanceTransform(baseMatrix);\n\n /* Get flower1 structures */\n var flower1_position = this.getPositionFor(dt, LAYOUT_FLOWER_BUFFER)\n if (!flower1_position) {\n return false\n }\n baseMatrix = this.addToMatrix(baseMatrix, flower1_position, LAYOUT_FLOWER_BUFFER)\n dt = distance_transform.distanceTransform(baseMatrix);\n\n\n /* Get flower2 structures */\n var flower2_position = this.getPositionFor(dt, LAYOUT_FLOWER_BUFFER)\n if (!flower2_position) {\n return false\n }\n\n return this.planLayout(core_position, flower1_position, flower2_position)\n }", "function giveRandomPolygons() {\n\t\t\n\t\tvar count = Math.floor(Math.random() * 10 + 1);\n\t\tvar num_vertices = Math.floor(Math.random() * 5 + 1);\n\n\t\treturn givePolygons(count, num_vertices);\n\t}", "_fillThis() {\n\n for (let row = 0; row < this.length; row++) {\n this[row] = [];\n\n for (let newCol = 0; newCol < 4; newCol++) {\n this[row][newCol] = 0;\n }\n }\n }", "function createMeteors(){\n for (var i = 0; i < numberOfMeteors; i++) {\n ArrayOfMeteors[i] = new Meteor();\n newX = Math.floor(Math.random()* c.width);\n if (newX < 30){\n ArrayOfMeteors[i].updateX(30);\n }\n else if (newX > c.width) {\n ArrayOfMeteors[i].updateX(c.width - 30);\n }\n else{\n ArrayOfMeteors[i].updateX(newX);\n }\n }\n}", "random(min,max) {\r\n this.data = this.data.map(row => row.map(col => Matrix.randomInt(min || 0,max || 1)));\r\n }" ]
[ "0.6558459", "0.64572215", "0.6215722", "0.6192971", "0.61664", "0.61379504", "0.61324257", "0.60917443", "0.60540926", "0.60522866", "0.60404885", "0.60181916", "0.59854", "0.5962769", "0.5874931", "0.58394414", "0.58081186", "0.58079106", "0.57972693", "0.57824177", "0.5780213", "0.5770148", "0.57668525", "0.5743543", "0.5725255", "0.5713322", "0.57110083", "0.5700992", "0.5699712", "0.5685119", "0.56736404", "0.5661889", "0.565915", "0.56577367", "0.5656101", "0.56537914", "0.5653074", "0.5648979", "0.56401", "0.56369704", "0.5634843", "0.56312597", "0.5629022", "0.5624218", "0.56151205", "0.5613189", "0.56127113", "0.5610059", "0.5608085", "0.55964065", "0.5591834", "0.5583347", "0.55742216", "0.556838", "0.5562962", "0.5559043", "0.5557432", "0.5555988", "0.5550034", "0.55397445", "0.5534155", "0.5534071", "0.5532456", "0.55120826", "0.5504502", "0.5500245", "0.54988045", "0.5498072", "0.54964", "0.5495805", "0.54895234", "0.54892987", "0.54879254", "0.54833114", "0.5474035", "0.5473882", "0.5471877", "0.54713833", "0.54686266", "0.5463971", "0.5452632", "0.5452632", "0.5446659", "0.544605", "0.54424995", "0.54407364", "0.5437834", "0.54366344", "0.5434451", "0.5432822", "0.54311544", "0.5419541", "0.54191005", "0.5414536", "0.5408959", "0.5400055", "0.5395059", "0.5394255", "0.5391612", "0.53877234", "0.5385456" ]
0.0
-1
METHODS FOR 1 LINES
async __START_LINES() { let full_line = false; let timer = await setInterval(()=>{ this.fields.forEach(el => { if (el.value === 0) { el.value = this.__RANDOM_VALUE(); full_line = true; } }); if (full_line) { full_line = false; clearInterval(timer); return this.fields; } }, levelSettings[this.level].speed ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Line() {}", "function Line() {}", "function Line() {}", "function Line() {}", "function Line() {}", "function Line(){}", "getLine() { return this.line; }", "voidLine() {\r\n\t\treturn null\r\n\t}", "setLine(line) { this.line = line; return this; }", "function PatchLine() { }", "unvoidLine() {\r\n\t\treturn null\r\n\t}", "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t line = merged.find(-1, true).line;\n\t\t return line;\n\t\t }", "setLine(line) {\n this.line = line;\n return this;\n }", "function visualLine(line) {\n\t\t var merged;\n\t\t while (merged = collapsedSpanAtStart(line))\n\t\t { line = merged.find(-1, true).line; }\n\t\t return line\n\t\t }", "moveToNextLine(line) {\n let paragraph = line.paragraph;\n let paraFormat = paragraph.paragraphFormat;\n let isParagraphStart = line.isFirstLine();\n let isParagraphEnd = line.isLastLine();\n let height = 0;\n let maxDescent = 0;\n let afterSpacing = 0;\n let beforeSpacing = 0;\n let lineSpacing = 0;\n let firstLineIndent = 0;\n this.updateLineWidget(line);\n height = this.maxTextHeight;\n maxDescent = height - this.maxTextBaseline;\n //Updates before spacing at the top of Paragraph first line.\n if (isParagraphStart) {\n beforeSpacing = this.getBeforeSpacing(paragraph);\n firstLineIndent = HelperMethods.convertPointToPixel(paraFormat.firstLineIndent);\n }\n //Updates after spacing at the bottom of Paragraph last line.\n if (isParagraphEnd) {\n afterSpacing = HelperMethods.convertPointToPixel(this.getAfterSpacing(paragraph));\n }\n if (!this.isBidiReLayout && (paraFormat.bidi || this.isContainsRtl(line))) {\n this.reArrangeElementsForRtl(line, paraFormat.bidi);\n this.isRTLLayout = true;\n }\n if (isNaN(this.maxTextHeight)) {\n //Calculate line height and descent based on formatting defined in paragraph.\n let measurement = this.viewer.textHelper.measureText('a', paragraph.characterFormat);\n height = measurement.Height;\n maxDescent = height - measurement.BaselineOffset;\n }\n else {\n height = this.maxTextHeight;\n maxDescent = height - this.maxTextBaseline;\n }\n // Gets line spacing.\n lineSpacing = this.getLineSpacing(paragraph, height);\n if (paraFormat.lineSpacingType === 'Exactly'\n && lineSpacing < maxDescent + this.maxBaseline) {\n lineSpacing = maxDescent + this.maxBaseline;\n }\n let subWidth = 0;\n let whiteSpaceCount = 0;\n let textAlignment = paraFormat.textAlignment;\n // calculates the sub width, for text alignments - Center, Right, Justify.\n // if the element is paragraph end and para bidi is true and text alignment is justify\n // we need to calculate subwidth and add it to the left margin of the element.\n if (textAlignment !== 'Left' && this.viewer.textWrap && (!(textAlignment === 'Justify' && isParagraphEnd)\n || (textAlignment === 'Justify' && paraFormat.bidi))) {\n // tslint:disable-next-line:max-line-length\n let getWidthAndSpace = this.getSubWidth(line, textAlignment === 'Justify', whiteSpaceCount, firstLineIndent, isParagraphEnd);\n subWidth = getWidthAndSpace.subWidth;\n whiteSpaceCount = getWidthAndSpace.spaceCount;\n }\n let addSubWidth = false;\n let lineSpacingType = paraFormat.lineSpacingType;\n for (let i = 0; i < line.children.length; i++) {\n let topMargin = 0;\n let bottomMargin = 0;\n let leftMargin = 0;\n let elementBox = line.children[i];\n // tslint:disable-next-line:max-line-length\n let alignElements = this.alignLineElements(elementBox, topMargin, bottomMargin, maxDescent, addSubWidth, subWidth, textAlignment, whiteSpaceCount, i === line.children.length - 1);\n topMargin = alignElements.topMargin;\n bottomMargin = alignElements.bottomMargin;\n addSubWidth = alignElements.addSubWidth;\n whiteSpaceCount = alignElements.whiteSpaceCount;\n //Updates line spacing, paragraph after/ before spacing and aligns the text to base line offset.\n if (lineSpacingType === 'Multiple') {\n if (lineSpacing > height) {\n bottomMargin += lineSpacing - height;\n }\n else {\n topMargin += lineSpacing - height;\n }\n }\n else if (lineSpacingType === 'Exactly') {\n topMargin += lineSpacing - (topMargin + elementBox.height + bottomMargin);\n }\n else if (lineSpacing > topMargin + elementBox.height + bottomMargin) {\n topMargin += lineSpacing - (topMargin + elementBox.height + bottomMargin);\n }\n topMargin += beforeSpacing;\n bottomMargin += afterSpacing;\n if (i === 0) {\n line.height = topMargin + elementBox.height + bottomMargin;\n if (textAlignment === 'Right' || (textAlignment === 'Justify' && paraFormat.bidi && isParagraphEnd)) {\n //Aligns the text as right justified and consider subwidth for bidirectional paragrph with justify.\n leftMargin = subWidth;\n }\n else if (textAlignment === 'Center') {\n //Aligns the text as center justified.\n leftMargin = subWidth / 2;\n }\n }\n elementBox.margin = new Margin(leftMargin, topMargin, 0, bottomMargin);\n elementBox.line = line;\n }\n this.viewer.cutFromTop(this.viewer.clientActiveArea.y + line.height);\n }", "static CalcLineTranslation() {}", "function changeLine(doc, handle, changeType, op) {\n\t\t var no = handle, line = handle;\n\t\t if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n\t\t else { no = lineNo(handle); }\n\t\t if (no == null) { return null }\n\t\t if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n\t\t return line\n\t\t }", "function LineView(doc, line, lineN) {\n\t\t // The starting line\n\t\t this.line = line;\n\t\t // Continuing lines, if any\n\t\t this.rest = visualLineContinued(line);\n\t\t // Number of logical lines in this visual line\n\t\t this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n\t\t this.node = this.text = null;\n\t\t this.hidden = lineIsHidden(doc, line);\n\t\t }", "function LineView(doc, line, lineN) {\n\t\t // The starting line\n\t\t this.line = line;\n\t\t // Continuing lines, if any\n\t\t this.rest = visualLineContinued(line);\n\t\t // Number of logical lines in this visual line\n\t\t this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n\t\t this.node = this.text = null;\n\t\t this.hidden = lineIsHidden(doc, line);\n\t\t }", "function RendererTextLine() {\n\n /*\n * The width of the line in pixels.\n * @property width\n * @type number\n * @protected\n */\n this.width = 0;\n\n /*\n * The height of the line in pixels.\n * @property width\n * @type number\n * @protected\n */\n this.height = 0;\n\n /*\n * The descent of the line in pixels.\n * @property descent\n * @type number\n * @protected\n */\n this.descent = 0;\n\n /*\n * The content of the line as token objects.\n * @property content\n * @type Object[]\n * @protected\n */\n this.content = [];\n }", "function changeLine(doc, handle, changeType, op) {\n\t\t var no = handle, line = handle;\n\t\t if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n\t\t else no = lineNo(handle);\n\t\t if (no == null) return null;\n\t\t if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n\t\t return line;\n\t\t }", "function single(){\n ctx.moveTo(0, height-(rows*step));\n ctx.lineTo((width/2), height-((rows-1)*step));\n }", "moveToNextLine() {\n this.moveDown();\n }", "line(n) {\n if (n < 1 || n > this.lines)\n throw new RangeError(`Invalid line number ${n} in ${this.lines}-line document`);\n return this.lineInner(n, true, 1, 0);\n }", "function Br(e,t,a,n){a<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}", "function changeLine(doc, handle, changeType, op) {\r\n var no = handle, line = handle;\r\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\r\n else { no = lineNo(handle); }\r\n if (no == null) { return null }\r\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\r\n return line\r\n}", "updateLastLine(line) { // this is used when drawing with the pen\r\n if (line.length < 2) return;\r\n var point1 = line.points[line.points.length - 1];\r\n var point2 = line.points[line.points.length - 2];\r\n point1 = this.worldPointToChunkScreenPoint(point1);\r\n point2 = this.worldPointToChunkScreenPoint(point2);\r\n this.ctx.beginPath();\r\n this.ctx.lineWidth = Main.Camera.getRelativeWidth(line.width);\r\n this.ctx.strokeStyle = line.style;\r\n this.ctx.lineTo(point1.x, point1.y);\r\n this.ctx.lineTo(point2.x, point2.y);\r\n this.ctx.stroke();\r\n }", "function LineView(doc, line, lineN) {\n\t // The starting line\n\t this.line = line;\n\t // Continuing lines, if any\n\t this.rest = visualLineContinued(line);\n\t // Number of logical lines in this visual line\n\t this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n\t this.node = this.text = null;\n\t this.hidden = lineIsHidden(doc, line);\n\t }", "function LineView(doc, line, lineN) {\n\t // The starting line\n\t this.line = line;\n\t // Continuing lines, if any\n\t this.rest = visualLineContinued(line);\n\t // Number of logical lines in this visual line\n\t this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n\t this.node = this.text = null;\n\t this.hidden = lineIsHidden(doc, line);\n\t }", "function LineView(doc, line, lineN) {\n\t // The starting line\n\t this.line = line;\n\t // Continuing lines, if any\n\t this.rest = visualLineContinued(line);\n\t // Number of logical lines in this visual line\n\t this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n\t this.node = this.text = null;\n\t this.hidden = lineIsHidden(doc, line);\n\t }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }", "function nextLine() {\n\t\t_this._compConst('LINE', _this.currentLine+1);\n\t\treturn lines[_this.currentLine++];\n\t}", "function changeLine(doc, handle, changeType, op) {\n\t var no = handle, line = handle;\n\t if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n\t else no = lineNo(handle);\n\t if (no == null) return null;\n\t if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n\t return line;\n\t }", "function changeLine(doc, handle, changeType, op) {\n\t var no = handle, line = handle;\n\t if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n\t else no = lineNo(handle);\n\t if (no == null) return null;\n\t if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n\t return line;\n\t }", "function changeLine(doc, handle, changeType, op) {\n\t var no = handle, line = handle;\n\t if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n\t else no = lineNo(handle);\n\t if (no == null) return null;\n\t if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n\t return line;\n\t }", "function LineView(doc, line, lineN) {\r\n // The starting line\r\n this.line = line;\r\n // Continuing lines, if any\r\n this.rest = visualLineContinued(line);\r\n // Number of logical lines in this visual line\r\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\r\n this.node = this.text = null;\r\n this.hidden = lineIsHidden(doc, line);\r\n }", "function changeLine(doc, handle, changeType, op) {\r\n var no = handle, line = handle;\r\n if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\r\n else no = lineNo(handle);\r\n if (no == null) return null;\r\n if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\r\n return line;\r\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line\n // Continuing lines, if any\n this.rest = visualLineContinued(line)\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1\n this.node = this.text = null\n this.hidden = lineIsHidden(doc, line)\n}", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line\n // Continuing lines, if any\n this.rest = visualLineContinued(line)\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1\n this.node = this.text = null\n this.hidden = lineIsHidden(doc, line)\n}", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function visualLine(line) {\n\t var merged;\n\t while (merged = collapsedSpanAtStart(line))\n\t line = merged.find(-1, true).line;\n\t return line;\n\t }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n else no = lineNo(handle);\n if (no == null) return null;\n if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n return line;\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n else no = lineNo(handle);\n if (no == null) return null;\n if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n return line;\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n else no = lineNo(handle);\n if (no == null) return null;\n if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n return line;\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n else no = lineNo(handle);\n if (no == null) return null;\n if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n return line;\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n else no = lineNo(handle);\n if (no == null) return null;\n if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n return line;\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n else no = lineNo(handle);\n if (no == null) return null;\n if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n return line;\n }", "function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n else no = lineNo(handle);\n if (no == null) return null;\n if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n return line;\n }", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}", "function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n}" ]
[ "0.7112591", "0.7112591", "0.7112591", "0.7112591", "0.7112591", "0.6919993", "0.6578272", "0.6437243", "0.6334404", "0.6232989", "0.61582845", "0.60624677", "0.6043118", "0.60402125", "0.60015595", "0.59855163", "0.5984257", "0.5975097", "0.5975097", "0.5964914", "0.59510005", "0.5947062", "0.5930796", "0.59139276", "0.59061307", "0.59032047", "0.59006757", "0.58954716", "0.58954716", "0.58954716", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.5895068", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.58874345", "0.5884483", "0.5882526", "0.5882526", "0.5882526", "0.5882323", "0.5880048", "0.58663625", "0.58663625", "0.585726", "0.585726", "0.585726", "0.58432925", "0.58432925", "0.58432925", "0.58432925", "0.58432925", "0.58432925", "0.58432925", "0.58380485", "0.58380485", "0.58380485", "0.58380485", "0.58380485", "0.58380485", "0.58380485", "0.58380485", "0.58380485", "0.58380485", "0.58380485" ]
0.0
-1
Fill fields random cubes
__RANDOM_VALUE() { function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; } return getRandomInt(1, 5); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Builder_sample(cubebox) {\n var i, j, k;// i RIGHE, j COLONNE, k indice per tenere il conto e scorrere l'array delle altezze data\n k = 0;\n //cube = new THREE.Mesh(geometry, new THREE.MeshPhongMaterial({ color: 0xff0000 }));\n var deep, diff;\n for (i = 0; i < groundNumBoxX; i++) {\n for (j = 0; j < groundNumBoxZ; j++) {\n\n cube = new THREE.Mesh(geometry, new THREE.MeshPhongMaterial({ color: 0xf00f0, shininess: 97, specular: 0x20202 }));\n cube.position.x = i;\n cube.position.z = j;\n\n var c = g = Math.floor(map_range(data[k], Math.min.apply(Math, data), Math.max.apply(Math, data), 0, 255));\n c = (c.toString(16).length < 2 ? \"0\" : \"\") + c.toString(16);\n cube.material.color.setHex(\"0X\" + c + \"\" + c + \"\" + c);\n\n cubebox.add(cube.clone());\n\n k++;\n }\n }\n\n}", "function initCubes(){\n\tfor(var i = 0; i<numCubes; i++){\n\t for(var j = 0; j<rubikSize*rubikSize; j++){\n\t\t for(var k = 0; k<rubikSize; k++){\n\t\t\t var newCube = cubeModel();\n\t\t\t newCube.scale(0.25, 0.25, 0.25);\n\t\t\t newCube.translate(cubeOffset[i%3], cubeOffset[j%3], cubeOffset[k%3]);\n\t\t\t cubes.push(newCube);\n\t\t\t points = points.concat(newCube.points);\n\t\t\t colors = colors.concat(newCube.colors);\n\t\t }\n\t\t j+=k;\n\t }\n\t i+=j;\n\t}\n}", "function produceCubes(fromZero = true) {\n for (let i = 0; i < Util.getRandomInt(fromZero ? 0 : 1, 3); ++i)\n produceCube();\n }", "function fillcubeStates() {\n for (i = -1; i < 2; i++) {\n for (j = -1; j < 2; j++) {\n for (k = -1; k < 2; k++) {\n cubeState[i+1][j+1][k+1][0] = i; // x Position\n cubeState[i+1][j+1][k+1][1] = j; // y Position\n cubeState[i+1][j+1][k+1][2] = k; // z Position\n cubeState[i+1][j+1][k+1][3] = [vec3(-1,0,0),vec3(0,-1,0),vec3(0,0,-1)]; // Cube reference Axis\n cubeState[i+1][j+1][k+1][4] = mat4(); // Cube rotation matrix\n }\n }\n }\n}", "static random() {\n return new Cube().randomize();\n }", "function fillRandom() { \n for (var i = 0; i < gridHeight; i++) { \n for (var j = 0; j < gridWidth; j++) { \n theGrid[i][j] = Math.floor(Math.random()*6); //randomly picks from our 5 colonies\n }\n }\n}", "function fillRandom() {\n grid = makeGrid(cols, rows);\n for (let i = 0; i < cols; i++) {\n for (let j = 0; j < rows; j++) {\n grid[i][j] = Math.floor(Math.random() * 2);\n }\n }\n}", "function addBasicCube() {\n var geometry = new THREE.BoxGeometry(20, 20, 20, 10, 10, 10);\n for (var i = 0; i < objectCounts; i++) {\n var cube = new THREE.Mesh(geometry, new THREE.MeshBasicMaterial({\n color: 0xffffff, //\n wireframe: true,\n wireframeLinejoin: 'bevel'\n }));\n cube.position.x = Math.random() * range * 2 - range; //-400~400\n cube.position.y = Math.random() * range * 2 - range;\n cube.position.z = Math.random() * range * 2 - range;\n\n cube.rotation.x = Math.random() * 2 * Math.PI; //0~2PI\n cube.rotation.y = Math.random() * 2 * Math.PI;\n cube.rotation.z = Math.random() * 2 * Math.PI;\n\n cube.scale.x = Math.random(); //0~1\n cube.scale.y = Math.random();\n cube.scale.z = Math.random();\n\n scene.add(cube);\n }\n}", "function populateRandom(n) {\n var x, y;\n for (var i = 0; i < n; i++) {\n do {\n x = Math.floor(Math.random() * 100);\n y = Math.floor(Math.random() * 100);\n } while (world[x][y]);\n world[x][y] = true;\n }\n }", "function glider() {\n let h = parseInt(Math.random() * (height - 3));\n let w = parseInt(Math.random() * (width - 3));\n field[h][w + 1] = true;\n field[h + 1][w + 2] = true\n field[h + 2][w + 2] = true\n field[h + 2][w + 1] = true\n field[h + 2][w] = true;\n draw();\n }", "static random () {\n var randomInt = (max) => {\n return Math.floor(Math.random() * (max + 1))\n }\n\n // Verify if both edges and corners have the same parity\n var verifyParity = (cp, ep) => {\n var getSum = (data, num_pieces) => {\n var sum = 0\n for (var i = 1; i <= num_pieces; i++) {\n sum += data % i\n data = Math.floor(data / i)\n }\n return sum\n }\n return (getSum(cp, 8) % 2) == (getSum(ep, 12) % 2)\n }\n\n var data\n do {\n data = {\n co: randomInt(2186),\n eo: randomInt(2047),\n cp: randomInt(40319),\n ep: randomInt(479001599),\n c: 0\n }\n } while (!verifyParity(data.cp, data.ep))\n\n return new Cube(data)\n }", "function RadialCubes(count, space, location){\n \n for(var i = 0; i < count; i++){\n var cube = new SoundBlock();\n var angle = (Math.PI/2) + (i / count) * 2 * Math.PI;\n \n var x = space * Math.cos(angle);\n var y = space * Math.sin(angle);\n scene.add(cube);\n \n //cube.applyMatrix(new THREE.Matrix4().makeTranslation(0, 0, 1));\n cube.geometry.translate(0, 0, 0.5);\n cube.name = count.length;\n cube.position.setY(x);\n cube.position.setX(y);\n cube.lookAt(location);\n }\n}", "function fillRandomPlaces(){\r\n\tvar fillArray = [];//Initialize a local array\r\n\tfor (var i = 0; i < size; i++) { \r\n\t\tfor (var j = 0; j < size; j++) { \r\n\t\t\tif(grid[i][j]==0){\r\n\t\t\t\tfillArray.push({x:i,y:j});//Storing all the blocks with zero\r\n\t\t\t}\r\n\t\t} \r\n\t\t\r\n\t}\r\n\tvar rand = Math.random();//Getting a random value < 1 && > 0\r\n\tvar total = fillArray.length;//Length of all zero containing blocks\r\n\tvar randIndex = Math.floor(rand * total);//Getting a random Index\r\n\tvar randomGrid= fillArray[randIndex];//Getting one random spot\r\n\tgrid[randomGrid.x][randomGrid.y] = rand > 0.2 ? 2 : 4; //With 80% chance of 2 fill 2 or 4 on that empty spot\r\n}", "function fillBox(props) {\n let solution = props.solution.slice();\n for (let i = 0; i < 3; i++) {\n for (let x = 0; x < 3; x++) {\n let tempNum = randomNum(9) + 1;\n let data = {\n row: props.row,\n col: props.col,\n solution: solution,\n num: tempNum\n };\n while (!notInBox(data)) {\n tempNum = randomNum(9) + 1;\n data.num = tempNum;\n data.solution = solution;\n }\n\n solution[props.row + i][props.col + x] = data.num;\n\n data.solution = solution;\n }\n }\n return solution;\n}", "refresh() {\n this.x = Math.random()*x_canv;\n this.depth = -20;\n this.radius = Math.random()*30+10;\n }", "function genCube(){\n //Chunk in voxel.js is defined as a single array of numbers. Each different number as respresent a different block type. Types stored in 2d array, number reference the index.\n //You must know the dimensions of the chunk multiply the height times width time depth to get the total size of the array/chunk.\n //\n //Chunk array seems to be ordered as follows. Fill 1 row from x=0tox=31, then fill all rows to the top, then start over on filling x on the bottom row over to the originial row.\n\tvar voxels = new Int8Array(32 * 32 * 32)\n\t//forward to end, first row and last.\n\tfor(i = 0;i < 31;i++){\n\t\t//last row\n\t\tvoxels[(32*32*i)+30] = 1\n\t\t//first row\n\t\tvoxels[32*32*i] = 1\n\n\t\t//fill in all floor blocks(grass)\n\t\tfor(i2 = 0;i2 < 31;i2++){\n\t\t\tvoxels[(32*32*i)+i2] = 1\n\t\t}\n\n\t\t//bottom to top\n\t\t//corner 1\n\t\tvoxels[32*i] = 1\n\n\t}\n\tvoxels[0] = 2\n\tvoxels[32] = 2\n\tvar z,x,y\n\tx=1;\n\ty=0;\n\tz=4;\n\t//test code to figure out how to render roads. Place a lineblock in the middle,\n\t//and sideroad blocks around it.\n\tvar pos = 32*32*16+16\n\tvoxels[32*32*16+16] = 2\n\tvoxels[pos-1] = 3\n\tvoxels[pos+1] = 3\n\tvoxels[(32*32)+pos] = 3\n\tvoxels[pos-(32*32)] = 3\n\t//voxels[(32*32*z)+(32*y)+x] = 2\n\t//this.voxels = voxels\n\treturn voxels\n}", "function setupField() { //////////////////////////////////////创建田\n\t\t\tfor (var i = 0; i < 5; i++) {\n\t\t\t\tplantsArray[i] = new Array();\n\t\t\t\tzombiesArray[i] = new Array();\n\t\t\t\tfor (var j = 0; j < 9; j++) {\n\t\t\t\t\tplantsArray[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function setupBoxes() {\n\tgirl.setupBoxes([[false,[3,2],0],[false,[6,2],0],[false,[3,9],0],[false,[1,12],0]]);\n\tguy.setupBoxes([[false,[16,2],0],[false,[10,2],0],[false,[11,11],0],[false,[17,8],0]]);\n}", "function colorFieldes() {\n fields.map(field => {\n field.style.backgroundColor =\n colors[Math.floor(Math.random() * colors.length)];\n });\n}", "static generateField(height, width, holes) {\n let newField = [];\n for (let i = 0; i < height; i++) {\n newField.push([]);\n for (let j = 0; j < height; j++) {\n newField[i].push(fieldCharacter)\n };\n };\n newField[0][0] = pathCharacter;\n let hatX = Math.floor(Math.random() * width);\n let hatY = Math.floor(Math.random() * height);\n newField[hatY][hatX] = hat;\n \n for (let k = holes; k > 0; k--) {\n let holeX = hatX;\n let holeY = hatY;\n while (holeX === hatX) {\n holeX = Math.floor(Math.random() * width)\n };\n while (holeY === hatY) {\n holeY = Math.floor(Math.random() * height)\n };\n newField[holeY][holeX] = hole; \n }\n return newField;\n }", "setDataWithRandom() {\n for (let key in this.qKey) {\n if (this.qKey[key] === this.field) {\n this.entryPoint = Number(key);\n }\n }\n var qKey = Math.floor(Math.random() * this.items.length);\n this.dataPoint = this.items[qKey][this.entryPoint];\n this.render();\n }", "randomize () {\n\n // loop for the x coordinates\n for (let x = 0; x < this.config.get(colsKey); ++x) {\n\n // loop over the y coordinates\n for (let y = 0; y < this.config.get(rowsKey); ++y) {\n\n // assign a random 0 or 1\n this.grid.set((x + y * this.config.get(colsKey)), Math.round(Math.random()));\n }\n }\n }", "function initCube() {\n var cubeMaterial = new THREE.MeshNormalMaterial();\n var cubeMaterial = new THREE.MeshBasicMaterial();\n\n var cube = new THREE.Mesh(new THREE.CubeGeometry(50, 50, 50), cubeMaterial);\n\n cube.material.color.setHex( 0xabcdef );\n cube.overdraw = true;\n return cube;\n}", "function cubemapGenerator() {\n const cubemap = [\n \"cubemap/px.png\", \"cubemap/nx.png\",\n \"cubemap/py.png\", \"cubemap/ny.png\",\n \"cubemap/pz.png\", \"cubemap/nz.png\"\n ];\n\n const textureCube = new THREE.CubeTextureLoader().load(cubemap);\n textureCube.mapping = THREE.CubeRefractionMapping;\n scene.background = textureCube;\n}", "function generateCube() {\n var geometry = new THREE.CubeGeometry(100, 100, 100);\n\n this.addGeometry(geometry);\n _camera.position.z = 500;\n\n return this;\n }", "function populate() {\n rainFall = [];\n rainFallLength = maxLength.value;\n rainFallMaxHeight = maxHeight.value;\n rainFallGenerator();\n bucket = 0;\n maxDim = rainFall.reduce(function (a, b) {\n return Math.max(a, b);\n });\n squares = [];\n canvasWidth = rainFall.length * 50 + 100;\n canvasHeight = maxDim * 50 + 100;\n structurePainter();\n for (var k = maxDim; k >= 1; k--) {\n oneDimFiller(k);\n }\n canvas = createCanvas(canvasWidth, canvasHeight);\n canvas.parent('canvasHome');\n background(34, 139, 34);\n function draw() {\n for (var i = 0; i < squares.length; i++) {\n squares[i].display();\n }\n base.display();\n }\n rainFallString = rainFallStringify();\n $('#rainArray').text(rainFallString);\n $('#bucket').text(bucket);\n}", "function randomGrid() {\n if (generate) return\n const randGrid = new Array(cols).fill(null)\n .map(() => new Array(rows).fill(null)\n .map(() => Math.floor(Math.random() * 2)));\n setGrid(randGrid)\n genCount.current = 0\n }", "function add(){\n var free = [];\n for(var i=0; i<HEIGHT; i++){\n for(var j=0; j<WIDTH; j++){\n if(GAME[i][j] == 0){\n free.push([i, j]);\n }\n }\n }\n var fieldIndex = random(free.length);\n var added = SPAWNS[random(2)];\n GAME[free[fieldIndex][0]] [free[fieldIndex][1]] = added;\n}", "randomize() {\n for (let h = 0; h < this.height; h++) {\n for (let w = 0; w < this.width; w++) {\n this.cells[this.currentBufferIndex][h][w] = Math.random() * MODULO | 0;\n }\n }\n }", "function createCubesBall(num, scene) {\n const cubes = [];\n for (let i = 0; i < num; i++) {\n if (i === 0) cubes[i] = BABYLON.Mesh.CreateCylinder('b', 0.05, 0.05, 0.01, scene);\n else cubes[i] = cubes[0].createInstance(`b${i}`);\n\n let x = 0;\n let y = 0;\n let z = 0;\n do {\n x = rnd(-5, 5);\n y = rnd(-5, 5);\n z = rnd(-5, 5);\n } while (allWithin(1.5, x, y, z));\n\n cubes[i].scaling = new BABYLON.Vector3(rnd(1.0, 1.5), rnd(1.0, 1.5), rnd(1.0, 10.0));\n\n cubes[i].position = new BABYLON.Vector3(x, y, z);\n\n cubes[i].lookAt(new BABYLON.Vector3(0, 0, 0));\n }\n return cubes;\n}", "function init_grid() {\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < cols; j++) {\n if (random() < 0.9) {\n grid[i][j] = 1;\n }\n if (random() < 0.04) {\n grid[i][j] = 2;\n }\n }\n }\n}", "function addLambertCube() {\n var geometry = new THREE.BoxGeometry(cubeLength, cubeLength, cubeLength);\n for (var i = 0; i < objectCounts; i++) {\n var cube = new THREE.Mesh(geometry, new THREE.MeshLambertMaterial({\n color: Math.random() * 0xffffff\n }));\n\n cube.position.x = Math.random() * range * 2 - range; //-400~400\n cube.position.y = Math.random() * range * 2 - range;\n cube.position.z = Math.random() * range * 2 - range;\n\n cube.rotation.x = Math.random() * 2 * Math.PI; //0~2PI\n cube.rotation.y = Math.random() * 2 * Math.PI;\n cube.rotation.z = Math.random() * 2 * Math.PI;\n\n cube.scale.x = Math.random(); //0~1\n cube.scale.y = Math.random();\n cube.scale.z = Math.random();\n\n if (boxHelper) {\n var box = new THREE.BoxHelper(cube, 0xffff00);\n scene.add(box);\n }\n\n scene.add(cube);\n }\n}", "createGrid() {\r\n const material = new THREE.MeshPhysicalMaterial({\r\n color: '#060025',\r\n metalness: 0.6,\r\n roughness: 0.05,\r\n });\r\n\r\n const gutter = { //To separate rows and Cols\r\n size: 4\r\n };\r\n\r\n //For rows\r\n for (let row = 0; row < this.grid.rows; row++) {\r\n this.meshes[row] = [];\r\n\r\n //For cols\r\n for (let index = 0; index < 1; index++) {\r\n const totalCol = this.getTotalRows(row);\r\n\r\n for (let col = 0; col < totalCol; col++) {\r\n const geometry = this.getRandomGeometry();\r\n const mesh = this.getMesh(geometry.geom, material);\r\n\r\n mesh.position.y = 0;\r\n mesh.position.x = col + (col * gutter.size) + (totalCol === this.grid.cols ? 0 : 2.5);\r\n mesh.position.z = row + (row * (index + .25));\r\n\r\n mesh.rotation.x = geometry.rotationX;\r\n mesh.rotation.y = geometry.rotationY;\r\n mesh.rotation.z = geometry.rotationZ;\r\n\r\n mesh.initialRotation = {\r\n x: mesh.rotation.x,\r\n y: mesh.rotation.y,\r\n z: mesh.rotation.z,\r\n };\r\n\r\n this.groupMesh.add(mesh);\r\n\r\n this.meshes[row][col] = mesh;\r\n }\r\n }\r\n }\r\n\r\n const centerX = -(this.grid.cols / 2) * gutter.size - 1;\r\n const centerZ = -(this.grid.rows / 2) - .8;\r\n\r\n this.groupMesh.position.set(centerX, 0, centerZ);\r\n\r\n this.scene.add(this.groupMesh);\r\n }", "seed(grid) {\n const nextGrid = grid.slice();\n const seed = (x, y, grid, cb) => {\n const nextGrid = grid.slice();\n if (cb) {\n return cb();\n } else {\n if (Math.random() > 0.82) {\n nextGrid[y][x] = \"live\";\n } else {\n nextGrid[y][x] = undefined;\n }\n }\n return nextGrid;\n };\n\n nextGrid.map((row, y) => {\n return row.map((cell, x) => {\n return seed(x, y, nextGrid);\n });\n });\n return nextGrid;\n }", "function setupTower(){\n //you code here\n for(var i=0; i<6; i++)\n {\n for(var j=0; j<3; j++)\n { \n colors.push(color(0, random(150,255), 0));\n boxes.push(Bodies.rectangle(750+j*80, 0, 80, 80));\n }\n }\n World.add(engine.world, boxes);\n}", "function randomBucketReq(){\r\n\t var myBucket = document.querySelectorAll(\".bucket\");\r\n\t var randomNum = Math.floor((Math.random() * 17) + 0);\r\n\t //var randomNum = 9; //for testing purposes\r\n\t for(i = 0; i < 3; i++){\r\n\t\tmyBucket[i].shape = randomNum;\r\n\t }\r\n }", "populateBoard() {\n for (let col = 0; col < this.board.getSize(); col++) {\n for (let row = 0; row < this.board.getSize(); row++) {\n // Check the empty candy position (hole), fill with new candy\n if (this.board.getCandyAt(row, col) == null) {\n this.board.addRandomCandy(row, col);\n }\n }\n }\n }", "function initEmptyField(){\r\n\tgame_field = [];\r\n\tfor (var i = 0; i<10; i++){\r\n\t\tgame_field.push([]);\r\n\t\tfor (var j = 0; j<10; j++){\r\n\t\t\tgame_field[i].push(0);\r\n\t\t\tdrawCell(i, j);\r\n\t\t}\r\n\t}\r\n}", "createRandomMaterials (nb) {\n\n var materials = []\n\n for (var i = 0; i < nb; ++i) {\n\n var clr = Math.random() * 16777215\n\n materials.push(this.createMaterial({\n shading: THREE.FlatShading,\n name: Toolkit.guid(),\n shininess: 50,\n specular: clr,\n color: clr\n }))\n }\n\n return materials\n }", "function AddRandom() {\n\n\n var location = [];\n\n for (var j = 0; j < 5; j++) {\n for (var i = 0; i < 5; i++) {\n\n if (grid[j][i].name == \"empty\") {\n\n location.push([i, j]);\n }\n }\n }\n\n if (location.length > 0) {\n\n var random = location[Math.floor(Math.random() * location.length)];\n scene.remove(grid[random[1]][random[0]]);\n\n grid[random[1]][random[0]] = Blocks[0].clone();\n\n grid[random[1]][random[0]].position.x = random[0];\n grid[random[1]][random[0]].position.y = random[1];\n grid[random[1]][random[0]].scale.x = 0.1;\n grid[random[1]][random[0]].scale.y = 0.1;\n scene.add(grid[random[1]][random[0]]);\n \n return 0;\n }\n \n return 1;\n\n}", "function Autofill(){\n for(var i = 0; i < mesh.Length; i++)\n {\n \tbones += mesh[i].bones;\n }\n}", "function addCubesToGrid(grid, size){\n //var counter = 0;\n var i = 0;\n for(y = 0; y < size; y++){\n for(x = 0; x < size; x++){\n var cube = document.createElement('cube');//create div element and assign it to var cube\n cube.classList.add('firstState');//apply a green color to cube \n cube.id = i++;\n cube.setAttribute('x',x);//add x to cube\n cube.setAttribute('y',y);//add y to cube\n grid.appendChild(cube);//add cube to grid \n };\n };\n clickToTimes(size);\n}", "function initObjects() {\n /* Randomize forest */\n for (var i = 0; i < cattail_count; i++) {\n addCattail();\n }\n /* Randomize Dragonflies */\n for (var i = 0; i < dragonfly_count; i++) {\n addDragonfly();\n }\n /* Randomize Lily Pads */\n for (var i = 0; i < lily_count; i++) {\n g_lilys.push([\n Math.random() * 40 - 20, // x\n Math.random() * 40 - 20, // y\n Math.random() * 360, // rot\n Math.random() + 1, // scale\n ]);\n }\n /* Randomize Logs */\n for (var i = 0; i < log_count; i++) {\n g_logs.push([\n Math.random() * 40 - 20, // x\n Math.random() * 40 - 20, // y\n Math.random() * 360, // rot\n Math.random() * 4 + 4, // scale\n ]);\n }\n /* Randomize Rocks */\n for (var i = 0; i < rock_count; i++) {\n g_rocks.push([\n Math.random() * 40 - 20, // x\n Math.random() * 40 - 20, // y\n Math.random() * 360, // rot\n Math.random() * 2 + 1, // scale\n ]);\n }\n}", "function randGenInvValues(){\n for(var i = 0; i < itemList1.length; i++){\n itemList1[i].value = Math.floor(Math.random() * 300)\n }\n for(var i = 0; i < itemList2.length; i++){\n itemList2[i].value = Math.floor(Math.random() * 300)\n }\n for(var i = 0; i < itemList3.length; i++){\n itemList3[i].value = Math.floor(Math.random() * 300)\n }\n}", "function createGrid(xCols, yRows, zMod) {\n // grid\n for (var i = 0; i < objects.length; i++) {\n var object = new THREE.Object3D();\n object.position.x = ((i % xCols) * 300) - 800;\n object.position.y = (-(Math.floor(i / 5) % yRows) * 400) + 800;\n object.position.z = (Math.floor(i / zMod)) * 500 - 2000;\n object.id = Math.random() * 300;\n targets.grid.push(object);\n }\n}", "function setFieldCards()\n {\n var cardCovers = properties.cardCovers.front.slice(),\n cells = [];\n\n for (var counterRow = 0; counterRow < sizes.field.rows; counterRow++)\n {\n for (var counterCol = 0; counterCol < sizes.field.cols; counterCol++)\n {\n cells[counterRow * sizes.field.cols + counterCol] =\n {\n row: counterRow,\n col: counterCol\n };\n }\n }\n\n for (var counter = 0; counter < cards.length; counter++)\n {\n cards[counter].remove(false);\n }\n cards = [];\n\n for (var counter = 0; counter < sizes.field.rows * sizes.field.cols / 2; counter++)\n {\n var randomCover = cardCovers.popRandom();\n\n cards.push(createCard(randomCover, true, turnCard.bind(this), counter, cells.popRandom()));\n cards.push(createCard(randomCover, true, turnCard.bind(this), counter, cells.popRandom()));\n }\n }", "function fillCubeSelector($CubeSelector, setids, themeids, graph){\n //1. if no themeids passed and a graph is, try to make a list of graph's map and pointsetids that are part of a theme (only these can be part of cubes)\n if(!themeids.length && graph){\n setids = [];\n graph.eachComponent(function(){\n if((this.isMapSet() || this.isPointSet()) && this.themeid) {\n if(setids.indexOf(this.setid)===-1) setids.push(this.setid);\n if(themeids.indexOf(this.themeid)===-1) themeids.push(this.themeid);\n }\n });\n setids.sort(); //ensure the array joins to a predictable string\n }\n\n //fetch a list of applicable cubes (if they have not already been fetched for these setids)\n var possibleCubes = graph ? graph.possibleCubes : false;\n if(setids.length>0 && !(possibleCubes && possibleCubes.setsids==setids.join())) {\n callApi({command: \"GetCubeList\", setids: setids, themeids: themeids},\n function(jsoData, textStatus, jqXH){\n possibleCubes = { //save on the main graph to ensure availibility betweeon prove panel ops.\n setsids: setids.join(),\n cubes: jsoData.cubes\n };\n if(graph) graph.possibleCubes = possibleCubes;\n _fillSelector();\n });\n } else _fillSelector();\n return possibleCubes;\n\n function _fillSelector(){\n var cubeOptions = '<option value=\"none\">none </option>' +\n '<optgroup class=\"non-cube-vizes\" label=\"visualizations with mouseover interactions\">' +\n '<option value=\"scatter\">scatter plot of maps with linear regression and correlation coefficient</option>' +\n '<option value=\"line\">line chart of highlighted geographies</option>' +\n '<option value=\"line-bunnies\">line chart with national data of highlighted geographies</option>' +\n '<option value=\"components-bar\">bar chart of map&rsquo;s components of selected geographies</option>' +\n '<option value=\"components-line\">line chart of map&rsquo;s components of selected geographies</option>' +\n '<option value=\"components-area\">stacked area chart of map&rsquo;s components for selected geography</option>' +\n '<option value=\"list-asc\">ordered list (ascending)</option>' +\n '<option value=\"list-desc\">ordered list (descending)</option>' +\n '</optgroup>';\n var i, currentCubeAccountedFor = false, cube, type = false;\n if(possibleCubes&&possibleCubes.cubes.length){\n for(i=0;i<possibleCubes.cubes.length;i++){\n cube = possibleCubes.cubes[i];\n if(type!=cube.type){\n cubeOptions += (type?'</optgroup>':'') + '<optgroup class=\"cubes\" label=\"show supplementary data '+cube.type+' on geography click\">';\n type = cube.type;\n }\n cubeOptions += '<option value=\"'+cube.cubeid+'\"'+(graph&&cube.cubeid==graph.cubeid?' selected':'')+'>'+cube.name+'</option>';\n if(graph&&cube.cubeid==graph.cubeid) currentCubeAccountedFor = true;\n }\n cubeOptions += '</optgroup>'\n }\n if(!currentCubeAccountedFor && graph && graph.cubeid) cubeOptions = '<select value=\"' + graph.cubeid + '\" selected>' + graph.cubename || 'data cube' + '</select>' + cubeOptions;\n $CubeSelector.html(cubeOptions);\n if(graph && graph.mapconfig && !graph.cubeid) $CubeSelector.val(graph.mapconfig.mapViz);\n $CubeSelector.show();\n }\n}", "generateField(rows, cols){\n\n let field = [];\n\n if(rows <= 0 || cols <= 0){\n throw Error(\"Row and column should be larger than zero. Try again.\");\n }\n else{\n let totalTiles = rows * cols;\n let holesNumber = Math.floor(totalTiles * this.holesPercentage);\n // init domain (all tiles)\n for(let i = 0; i < this.rows; i++){\n field.push([]);\n for(let j = 0; j < this.cols; j++){\n field[i].push(fieldCharacter);\n }\n }\n // set the (0, 0) node as starting point\n field[0][0] = pathCharacter;\n\n // pick hat location (except (0. 0))\n while(true){\n let hatY = Math.floor(Math.random() * this.rows);\n let hatX = Math.floor(Math.random() * this.cols);\n if(!(hatX === 0 && hatY === 0)){\n field[hatY][hatX] = hat;\n break;\n }\n }\n\n // pick holes location\n while(holesNumber > 0){\n let holeY = Math.floor(Math.random() * this.rows);\n let holeX = Math.floor(Math.random() * this.cols);\n\n if(field[holeY][holeX] === fieldCharacter){\n field[holeY][holeX] = hole;\n holesNumber -= 1;\n }\n }\n }\n return field;\n }", "function populatePuzzle(pics, cells) {\r\n for (i = 0; i < pics.length; i++) {\r\n var rand = Math.floor(Math.random() * pics.length);\r\n if (!pics[rand].used) {\r\n pics[rand].id.style.gridArea = cells[i];\r\n pics[rand].used = true;\r\n pics[rand].position = i;\r\n } else {\r\n i--;\r\n }\r\n }\r\n }", "randomize() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.cols; j++) {\n this.data[i][j] = Math.random() * 2 - 1;\n }\n }\n }", "function reset() {\n grid.set(function() { return random(2); });\n}", "function initializeVariables(){\n MAX_POINTS = 500;\n drawCount = 0;\n colors = [0x8f00ff,0x4b0082,0x0000ff,0x00ff00,0xffff00,0xff7f00,0xff0000];\n cords = [2.02,2.11,2.18,2.25,2.32,2.40,2.47];\n cords2 = [1.55,1.74,1.94,2.18,2.34,2.52,2.70];\n \n randAllgeometries = new Array(4);\n randAllMaterials = new Array(4);\n randAllLines = new Array(4);\n randAllPositions = new Array(4);\n\n allgeometries = new Array(7);\n allMaterials = new Array(7);\n allLines = new Array(7);\n allPositions = new Array(7);\n\n allgeometries2 = new Array(7);\n allMaterials2 = new Array(7);\n allLines2 = new Array(7);\n allPositions2 = new Array(7);\n\n allgeometries3 = new Array(7);\n allMaterials3 = new Array(7);\n allLines3 = new Array(7);\n allPositions3 = new Array(7);\n}", "function setFood() {\r\n var empty = [];\r\n var foodCount = 0;\r\n // iterate through the grid and find all empty cells\r\n for (var x=0; x < grid.width; x++) {\r\n for (var y=0; y < grid.height; y++) {\r\n if (grid.get(x, y) === EMPTY) {\r\n empty.push({x:x, y:y}); //add to empty array\r\n }\r\n if (grid.get(x, y) === FRUIT) {\r\n foodCount += 1;\r\n }\r\n }\r\n }\r\n // chooses a random cell to place fruit max of 3 at all times\r\n var i = 0;\r\n if (foodCount == 0) {\r\n i = 3;\r\n }\r\n else{\r\n i = 4;\r\n }\r\n for (i; foodCount < i; i--) {\r\n var randpos = empty[Math.round(Math.random()*(empty.length - 1))];\r\n grid.set(FRUIT, randpos.x, randpos.y);\r\n };\r\n\r\n}", "function buildGrid() {\n for(var i=0; i<60; i++) {\n grid.push([]);\n for(var j=0; j<60; j++) {\n grid[i].push(new Cell(1, 0, Math.floor(Math.random()*(100-50))+50)); // mostly dead grass\n //console.log(grid[i][j].rate);\n //console.log(grid[i][j].timeRemaining);\n }\n }\n}", "function addBlock() {\n var index = Math.floor(Math.random() * (7));\n\n var name = blockNames[index];\n var blocktype = blocks[index]\n var center = centers[index];\n var pos = [20, 0];\n center[0] += 20;\n curBlock = new Block(blocktype, name, center, pos);\n\n //add to grid\n for (var k = 0; k < blocktype.length; k++) {\n for (var l = 0; l < blocktype[0].length; l++) {\n grid[k + 20][l] = blocktype[k][l];//start from 20th row\n }\n }\n\n\n}", "function generate_rubikscube() {\n\t\t\tvar cube = new THREE.Mesh(\n\t\t\t\tnew THREE.BoxGeometry(4,4,4),\n\t\t\t\tnew THREE.MeshLambertMaterial({\n\t\t\t\t\tcolor: 0xff0000,\n\t\t\t\t\tside: THREE.DoubleSide\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tcube.position.set( 0, 0, 0 );\n return cube;\n }", "function initField(){\n\t\n\t// Get field size from html size-display\n\tsize = parseInt($('#game-btn-size').val());\n\t\n\t// For every x (maximum x = size)\n\tfor(var x = 0; x < size; x++){\n\t\t\n\t\t// Init empty x into field array\n\t\tfield[x] = [];\n\t\t\n\t\t// For every y (maximum y = size)\n\t\tfor(var y = 0; y < size; y++){ \n\t\t\n\t\t\t// Init y in x-array with object-parameter status as 'dead'\n\t\t\tfield[x][y] = {\n\t\t\t\tstatus: 'dead'\n\t\t\t}; \n\t\t} \n\t}\n\t\n\t// Draw the new field\n\tdrawField();\n}", "createPlayField() {\n const playField = [];\n\n for (let y = 0; y < 20; y++) {\n playField[y] = [];\n\n for (let x = 0; x < 10; x++) {\n playField[y][x] = 0;\n }\n }\n\n return playField;\n }", "function processSimulate() {\n //Reset variable for new round\n fieldsUser = ['', '', '', '', ''];\n fieldsPC = ['', '', '', '', ''];\n\n let fieldsEmptyUser = [0, 1, 2, 3, 4];\n let fieldsEmptyPC = [0, 1, 2, 3, 4];\n\n for (let j = 0; j < 5; j++) {\n let rand = Math.floor(Math.random() * 10);\n totalRandom += rand;\n\n fieldsUser[fieldsEmptyUser.splice(values.values[rand][j] - 1, 1)] = rand;\n\n if (check)\n fieldsPC[fieldsEmptyPC.splice(valuesPC[rand][j] - 1, 1)] = rand;\n }\n}", "constructor(height, width) {\n this.x = random(-width/1.5, width/1.5);\n this.y = random(-height/1.5, height/1.5);\n this.z = random(width);\n this.pz = this.z;\n\n }", "CreateGeo() {\n // DEBUG: b2.Assert(FrackerSettings.k_dirtProbability +\n // DEBUG: FrackerSettings.k_emptyProbability +\n // DEBUG: FrackerSettings.k_oilProbability +\n // DEBUG: FrackerSettings.k_waterProbability === 100);\n for (let x = 0; x < FrackerSettings.k_worldWidthTiles; x++) {\n for (let y = 0; y < FrackerSettings.k_worldHeightTiles; y++) {\n if (this.GetMaterial(x, y) !== Fracker_Material.EMPTY) {\n continue;\n }\n // Choose a tile at random.\n const chance = Math.random() * 100.0;\n // Create dirt if this is the bottom row or chance dictates it.\n if (chance < FrackerSettings.k_dirtProbability || y === 0) {\n this.CreateDirtBlock(x, y);\n }\n else if (chance < FrackerSettings.k_dirtProbability +\n FrackerSettings.k_emptyProbability) {\n this.SetMaterial(x, y, Fracker_Material.EMPTY);\n }\n else if (chance < FrackerSettings.k_dirtProbability +\n FrackerSettings.k_emptyProbability +\n FrackerSettings.k_oilProbability) {\n this.CreateReservoirBlock(x, y, Fracker_Material.OIL);\n }\n else {\n this.CreateReservoirBlock(x, y, Fracker_Material.WATER);\n }\n }\n }\n }", "set_colors()\r\n {\r\n /* colors */\r\n let colors = [\r\n Color.of( 0.9,0.9,0.9,1 ), /*white*/\r\n Color.of( 1,0,0,1 ), /*red*/\r\n Color.of( 1,0.647,0,1 ), /*orange*/\r\n Color.of( 1,1,0,1 ), /*yellow*/\r\n Color.of( 0,1,0,1 ), /*green*/\r\n Color.of( 0,0,1,1 ), /*blue*/\r\n Color.of( 1,0,1,1 ), /*purple*/\r\n Color.of( 0.588,0.294,0,1 ) /*brown*/\r\n ]\r\n\r\n this.boxColors = Array();\r\n for (let i = 0; i < 8; i++ ) {\r\n let randomIndex = Math.floor(Math.random() * colors.length);\r\n this.boxColors.push(colors[randomIndex]);\r\n colors[randomIndex] = colors[colors.length-1];\r\n colors.pop();\r\n }\r\n\r\n }", "function initCube(vCube, position, geometry) {\n var vertices = new Array(8);\n for (let i in geometry)\n {\n vertices[i] = new Array(3);\n for (let j in geometry[i])\n vertices[i][j] = add(vCube, geometry[i][j]);\n }\n\n var indices = [];\n var first = points.length;\n for (let i = 0; i < 96; i++)\n indices.push(first + i);\n\n var s1 = initSquare(vertices[1][Z], vertices[5][Z], vertices[3][Z], vertices[7][Z], \n position, F, WHITE); //Front\n var s2 = initSquare(vertices[0][Z], vertices[4][Z], vertices[2][Z], vertices[6][Z], \n position, Ba, RED); //Back\n var s3 = initSquare(vertices[1][X], vertices[0][X], vertices[3][X], vertices[2][X], \n position, L, YELLOW); //Left\n var s4 = initSquare(vertices[5][X], vertices[4][X], vertices[7][X], vertices[6][X], \n position, R, GREEN); //right\n var s5 = initSquare(vertices[3][Y], vertices[7][Y], vertices[2][Y], vertices[6][Y], \n position, T, CYAN); //top\n var s6 = initSquare(vertices[1][Y], vertices[5][Y], vertices[0][Y], vertices[4][Y], \n position, Bo, BLUE); //bottom\n var sqrs = [s1, s2, s3, s4, s5, s6];\n sqrs = sqrs.filter(function(square, ind) {\n return position.includes(ind);\n })\n\n // drawing edges of cube\n points.push(vertices[0][X], vertices[0][Y], vertices[1][X], vertices[1][Y],\n vertices[2][X], vertices[2][Y], vertices[3][X], vertices[3][Y],\n vertices[4][X], vertices[4][Y], vertices[5][X], vertices[5][Y],\n vertices[6][X], vertices[6][Y], vertices[7][X], vertices[7][Y],\n vertices[0][X], vertices[0][Z], vertices[2][X], vertices[2][Z],\n vertices[1][X], vertices[1][Z], vertices[3][X], vertices[3][Z],\n vertices[4][X], vertices[4][Z], vertices[6][X], vertices[6][Z],\n vertices[5][X], vertices[5][Z], vertices[7][X], vertices[7][Z],\n vertices[0][Y], vertices[0][Z], vertices[4][Y], vertices[4][Z],\n vertices[1][Y], vertices[1][Z], vertices[5][Y], vertices[5][Z],\n vertices[2][Y], vertices[2][Z], vertices[6][Y], vertices[6][Z],\n vertices[3][Y], vertices[3][Z], vertices[7][Y], vertices[7][Z]);\n\n for (let i in vertices) {\n for (let j in vertices[i]) {\n points.push(vertices[i][j]);\n }\n }\n\n for (let i = 0; i < 72; i++) {\n colors.push(BLACK);\n pick_squares.push(255);\n }\n\n return new Cube(position, indices, sqrs);\n}", "randomize() {\n // Goes through width and height of grid\n for (let height = 0; height < this.height; height++) {\n for (let width = 0; width < this.width; width++) {\n this.cells[this.currentBufferIndex][height][width] =\n (Math.random() * MODULO) | 0; // CHECK THIS???\n }\n }\n }", "reset() {\n this.x = (floor(random(0, 20))) * this.size;\n this.y = (floor(random(0, 10))) * this.size;\n\n }", "plantMines(data, height, width, totalMines) {\n let randomx,\n randomy,\n minesPlanted = 0;\n while (minesPlanted < totalMines) {\n randomx = Math.floor(Math.random() * width);\n randomy = Math.floor(Math.random() * height);\n if (!data[randomy][randomx].isMine) {\n data[randomy][randomx].isMine = true;\n minesPlanted++;\n }\n }\n return data;\n }", "function produceCube() {\n if (Cube.getTotalArea() < field.getArea() / 3\n && Cube.getCubesNumber() < 15 ) {// Prevent too many cubes on a field\n let mover = {};\n let cubePoints = 1;\n const cube = new Cube(getCubeSizeByGameTime(), getCubeColor(), (event, flag) => {\n if (flag) { // mover action\n if ('pause' == flag)\n mover.pause();\n else if ('resume' == flag)\n mover.resume();\n else if('stop' == flag)\n mover.stop(); // Stop movement after cube destruction\n else throw 0;\n } else if(running && 1 === event.buttons) { // left mouse button\n if( cube.color == 'blue') {\n cube.setColor('yellow')\n ++cubePoints;\n }\n else if( cube.color == 'yellow') {\n cube.setColor('red')\n ++cubePoints;\n }\n else if( cube.color == 'red') {\n cubeOnMouseDown(event, cubePoints);\n mover.stop();\n } \n else if( cube.color == 'time') {\n cubePoints = 0;\n gameTimer.addTime(1000);\n cubeOnMouseDown(event, cubePoints);\n mover.stop();\n }\n }\n });\n\n field.addElement(cube.jElement);\n mover = new Mover(cube.jElement, field); // Make cube moveable\n }\n }", "function addDensity(data) {\n\t\t\t// the geometry that will contain all our cubes\n\t\t\tvar geom = new THREE.Geometry();\n\t\t\t// material to use for each of our elements. Could use a set of materials to\n\t\t\t// add colors relative to the density. Not done here.\n\t\t\tvar cubeMat = new THREE.MeshBasicMaterial({color: 0xffffff, emissive:0xffffff});\n\t\t\tvar cubeMat3 = new THREE.MeshBasicMaterial({color: 0xffffff, opacity: 0.6, emissive:0xffffff});\n\t\t\tvar cubeMat2 = new THREE.MeshBasicMaterial( {color: 0x0F9CFF} );\n\t\t\tfor (var i = 0 ; i < data.length-1 ; i++) {\n\n\t\t\t\t//get the data, and set the offset, we need to do this since the x,y coordinates\n\t\t\t\t//from the data aren't in the correct format\n\t\t\t\tvar x = parseInt(data[i][0])+180;\n\t\t\t\tvar y = parseInt((data[i][1])-84)*-1;\n\t\t\t\tvar value = parseFloat(data[i][2]);\n\n\t\t\t\t// calculate the position where we need to start the cube\n\t\t\t\tvar position = latLongToVector3(y, x, 400 + 1+value/30/4 * bli2, 2);\n\t\t\t\tvar position2 = latLongToVector3(y, x, 400 + 1+value/30/2 * bli2, 2);\n\n\t\t\t\t// create the cube\n\t\t\t\tvar cube2 = new THREE.Mesh(new THREE.CubeGeometry(1 * bli2,1 * bli2,1 * bli2,1,1,1,cubeMat));\n\t\t\t\tcube2.position = position2;\n\t\t\t\tcube2.lookAt( new THREE.Vector3(0,0,0) );\n\t\t\t\tTHREE.GeometryUtils.merge(geom, cube2);\n\n\t\t\t\tif(1+value/30/2 * bli2 >= 8 * bli2){\n\t\t\t\t\tvar cube = new THREE.Mesh(new THREE.CubeGeometry(1 * bli2,1 * bli2,1+value/30/2 * bli2,1,1,1,cubeMat3));\n\t\t\t\t\tcube.position = position;\n\t\t\t\t\tcube.lookAt( new THREE.Vector3(0,0,0) );\n\n\t\t\t\t\tvar spGeo = new THREE.SphereGeometry(3 * bli2, 3 * bli2, 3 * bli2);\n\t\t\t\t\tvar mat2 = new THREE.MeshBasicMaterial( {color: 0xffffff} );\n\t\t\t\t\tvar sp = new THREE.Mesh(spGeo,mat2);\n\t\t\t\t\tsp.position = position2;\n\t\t\t\t\tsp.lookAt( new THREE.Vector3(0,0,0) );\n\t\t\t\t\tscene.add(sp);\n\n\t\t\t\t\tTHREE.GeometryUtils.merge(geom, cube);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// create a new mesh, containing all the other meshes.\n\t\t\tvar total = new THREE.Mesh(geom, new THREE.MeshFaceMaterial());\n\n\t\t\t// and add the total mesh to the scene\n\t\t\tscene.add(total);\n\t\t}", "generateResultGrid () {\n this.results = this.shuffleArray(this.baseNumbers)\n }", "function fillArray(z) {\n var length = z.length;\n for (i=0;i<length;i++) {\n for (j=0;j<length;j++) {\n var die = Math.random();\n if (die<0.3) {\n z[i][j] = \"red\";\n }\n else if (die<0.6) {\n z[i][j] = \"blue\";\n }\n else {\n z[i][j] = \"white\";\n }\n }\n }\n return z;\n}", "function removeCubesFromGrid(size){\n for(i = 0; i < size * size; i++){\n document.getElementById(i).remove();//removing cubes\n }; \n}", "function createField (rows, heights){\n for(let x=0; x< rows; x++){\n let rowArray = [];\n for(let y=0; y<heights; y++)\n { \n const inputX = Math.round(Math.random()*10);\n if (inputX <= 8){\n rowArray.push(fieldCharacter);\n }\n \n else{\n rowArray.push(hole);\n }\n }\n field.push(rowArray);\n }\n do{\n field[Math.floor(Math.random()*rows)][Math.floor(Math.random()*heights)] = hat;\n } \n while (field[0][0] === hat);\n \n field[0][0] = pathCharacter;\n return field;\n}", "function setBeerCollectionData() {\n shuffleArray(beer_Collection);\n}", "function createCity(buildingCount, rangeX, rangeY, scale, startingX) {\n\n var startingZ = -4000;\n // create the basic buildingblock\n var buildingBlock = new THREE.BoxGeometry(30,30,100);\n buildingBlock.applyMatrix( new THREE.Matrix4().makeTranslation( 0, 0.5, 0 ) );\n // setup the texture for the roof\n var uvPixel = 0.0;\n buildingBlock.faceVertexUvs[0][4][0]=new THREE.Vector2(uvPixel,uvPixel);\n buildingBlock.faceVertexUvs[0][4][1]=new THREE.Vector2(uvPixel,uvPixel);\n buildingBlock.faceVertexUvs[0][4][2]=new THREE.Vector2(uvPixel,uvPixel);\n buildingBlock.faceVertexUvs[0][5][0]=new THREE.Vector2(uvPixel,uvPixel);\n buildingBlock.faceVertexUvs[0][5][1]=new THREE.Vector2(uvPixel,uvPixel);\n buildingBlock.faceVertexUvs[0][5][2]=new THREE.Vector2(uvPixel,uvPixel);\n\n var baseScaleY = 35;\n\n // create buildings\n for (var i = 0 ; i < buildingCount ; i++) {\n // create a custom material for each building\n var material = new THREE.MeshLambertMaterial();\n material.color = new THREE.Color(0xffffff);\n material.map = new THREE.Texture(generateBuildingTexture());\n material.map.anisotropy = renderer.getMaxAnisotropy();\n material.map.needsUpdate = true;\n // create the mesh\n var building = new THREE.Mesh(buildingBlock, material);\n //var scale =((Math.random()/1.2)+0.5) * scale;\n //var scale = 1.2 * scale;\n // scale the buildings\n building.scale.x = scale * 2;\n building.scale.z = scale;\n building.scale.y = baseScaleY + Math.random() * 15;\n building.rotation.y = Math.PI / 180 * 90;\n // position the buildings\n building.position.x= startingX;\n building.position.z= startingZ;\n building.position.y = 150;\n console.log(buildingBlock.parameters.height);\n // add to scene\n\n scene.add(building);\n buildingArr.push(building);\n\n\n if (startingX < 0) {\n startingX += 375;\n }\n else {\n startingX -= 375;\n }\n\n\n if (i === (buildingCount/2) - 1){\n\n if (startingX < 0) {\n startingX = -3900;\n }\n else {\n startingX = 3900;\n }\n\n startingZ -= 300;\n baseScaleY += 15;\n }\n\n\n\n }\n}", "fill () {\n\n\t\t//console.log(\"Filling up\",this.size,this.Dudes.length);\n\t\twhile (this.Dudes.length < this.size) {\n\t\t\tlet freshGenome = new Genome(this.fitnessFunction,null);\n\t\t\t//console.log(\"freshGenome\", JSON.stringify(freshGenome.genome));\n\t\t\tthis.Dudes.push(freshGenome);\n\t\t}\n\t\t//console.log(\"Filling up\",this.size,this.Dudes.length);\n\n\t}", "function generateFlowData() {\n\td3.range(numFlowData).forEach((i) => {\n\t flowData[i] = normalize([\n Math.random() * 2 - 1, // column\n Math.random() * 2 - 1, // row\n 3 * Math.random(), // magnitude\n ]);\n\t});\n}", "function init() {\r\n\t\t\t\r\n\t\t\tvar grid = document.getElementById(\"grid\");\r\n\t\t\tfor(var i=1; i<=4; i++){\r\n\t\t\t\tvar riga = document.createElement(\"div\");\r\n\t\t\t\triga.setAttribute(\"Id\", \"riga\"+i);\r\n\t\t\t\tfor(var j=0; j<4; j++){\r\n\t\t\t\t\tvar casella = document.createElement(\"input\");\r\n\t\t\t\t\tvar n = i*4+j;\r\n\t\t\t\t\tcasella.setAttribute(\"Id\", \"casella\"+n );\r\n\t\t\t\t\tcasella.setAttribute(\"readonly\", \"readonly\");\r\n\t\t\t\t\tcasella.setAttribute(\"value\", 0);\r\n\t\t\t\t\triga.appendChild(casella);\r\n\t\t\t\t}\r\n\t\t\t\tgrid.appendChild(riga);\r\n\t\t\t\t}\t\t\t\r\n\t\t}", "function paintFields(net) {\n const colorArr = [\n 'blue',\n 'red',\n 'lime',\n 'orange',\n 'blue',\n 'coral',\n 'blueviolet',\n 'pink',\n 'green',\n 'black',\n 'PapayaWhip',\n 'cyan',\n 'brown',\n 'DarkOliveGreen',\n 'grey',\n ];\n // console.log('a negyzetem ', net);\n // console.log('a colorArr merete: ', colorArr.length);\n\n let ujEl = eleMaker(DOMelems.box, 'div', 'colorBox');\n net == 4 ? ujEl.classList.add('box2') : ujEl.classList.add('box3');\n\n //feltolti a jatekmezot szines negyzetekkel\n while (tovabb) {\n let ind = Math.floor(Math.random() * colorArr.length);\n // console.log('index: ', ind);\n if (!pcColorArr.includes(colorArr[ind])) {\n tovabb = false;\n pcColorArr.push(colorArr[ind]);\n ujEl.style.background = colorArr[ind];\n }\n // console.log('pcColorArr: ', pcColorArr);\n // console.log('OK?', tovabb);\n }\n\n DOMelems.messageBox.innerText = `van hátra: ${\n DOMelems.gLevel - playerTrials\n } lépés`;\n // const colorBoxes = document.querySelectorAll('.colorBox');\n\n return {\n square: ujEl, // a mezo egyes elemei\n };\n}", "_assignRandomCords(){\n let newRow,newCol;\n while(true){\n newRow=Math.floor(Math.random()*(this._maxRows-1));\n newCol = Math.floor(Math.random()*(this._maxCols-1));\n if(this._snake.filter(cords=> cords.col==newCol && cords.row==newRow).length ==0) break;\n }\n this._fruit[0].row=newRow;\n this._fruit[0].col=newCol;\n \n }", "function initialize(){\n // sets to number betwee 19-120\n randomNum = Math.floor((Math.random() * 120) + 19);\n // sets each crystal to a unique random value 1-12\n $(\"#crystal1\").attr(\"value\",randomCrystalNum());\n $(\"#crystal2\").attr(\"value\",randomCrystalNum());\n $(\"#crystal3\").attr(\"value\",randomCrystalNum());\n $(\"#crystal4\").attr(\"value\",randomCrystalNum());\n render(); \n}", "function updateCubes() {\n cubePositionVectors = [];\n for (let i = 0; i < cubeFactor; ++i) {\n for (let j = 0; j < cubeFactor; ++j) {\n for (let k = 0; k < cubeFactor; ++k) {\n cubePositionVectors.push(i * 4);\n cubePositionVectors.push(j * 4);\n cubePositionVectors.push(k * 4);\n }\n }\n }\n\n const cubeCount = document.getElementById('cube_count');\n cubeCount.innerText = cubeFactor ** 3;\n }", "function updateCubes() {\n cubePositionVectors = [];\n for (let i = 0; i < cubeFactor; ++i) {\n for (let j = 0; j < cubeFactor; ++j) {\n for (let k = 0; k < cubeFactor; ++k) {\n cubePositionVectors.push(i * 4);\n cubePositionVectors.push(j * 4);\n cubePositionVectors.push(k * 4);\n }\n }\n }\n\n const cubeCount = document.getElementById('cube_count');\n cubeCount.innerText = cubeFactor ** 3;\n }", "function init()\n{\n for (var y = 0; y < dimen; y++) {\n for (var x = 0; x < dimen; x++) {\n setAlive( cells, x, y, Math.random() < 0.3 );\n }\n }\n}", "get randomData() {\n let data = { rows: 0, cols: 0 , x: 0 };\n\n //formula for generating a random value within the set range\n // const randomNumber = min + Math.round(Math.random() * (max - min));\n\n //generate the random properties of the new platofrm and updates the 'data' properties for each one\n const offset = this.ranges.offset.min + Math.round(Math.random() * (this.ranges.offset.max - this.ranges.offset.min));\n\n data.x = this.current.right + offset;\n\n data.cols = this.ranges.cols.min + Math.round(Math.random() * (this.ranges.cols.max - this.ranges.cols.min));\n\n data.rows = this.ranges.rows.min + Math.round(Math.random() * (this.ranges.rows.max - this.ranges.rows.min));\n\n \n\n //return the generated random data\n return data;\n \n }", "randomize() {\n // !!!! IMPLEMENT ME !!!!\n for (let height = 0; height < this.height; height++) {\n for (let width = 0; width < this.width; width++) {\n this.cells[this.currentBufferIndex][height][width] = (Math.random() * 2) | 0;\n }\n }\n }", "static generateField(width, height, holes) {\n let newField = [];\n for (let i = 0; i < width; i++) {\n newField.push([]);\n for (let j = 0; j < height; j++) {\n newField[i].push(fieldCharacter)\n };\n };\n //5.2 return a randomized two-dimensional array representing the field with a hat and one or more holes.\n newField[0][0] = pathCharacter;\n let hatX = Math.floor(Math.random() * width);\n let hatY = Math.floor(Math.random() * height);\n newField[hatX][hatY] = hat;\n\n //generate hole location\n for (let h = holes; h > 0; h--) {\n let holeX = hatX;\n let holeY = hatY;\n //make sure hole =/= hat\n while (holeX === hatX) {\n holeX = Math.floor(Math.random() * width)\n };\n while (holeY === hatY) {\n holeY = Math.floor(Math.random() * height)\n };\n newField[holeX][holeY] = hole;\n }\n return newField;\n }", "function loadElements(){\n\tvar rand = Math.floor(Math.random() * 2);\t//random number {0,1}: 0=cone, 1=cup \n\tvar posX = randomPosX(); //randomly deciding in which lane spawn it\n\tif(rand == 0 && numcones < totalcones){\t\n\t\tcones.push(models['cone'].clone()); //crea ostacolo\n\t\tcones[numcones].position.set(posX,-43,-650); //position of cone/cup\n\t\tcones[numcones].scale.set(6,6,6);//size of cone\n\t\tcones[numcones].rotation.y = 210; \n\t\tscene.add(cones[numcones]); //pusho l'ultimo ostacolo creato\n\t\tnumcones+=1; //aumento il numero di ostacoli\n\t}else if(rand == 1 && numcups < totalcups){ //analog to cone\n\t\tcups.push(models['cup'].clone());\n\t\tcups[numcups].position.set(posX, -43, -650);\n\t\tcups[numcups].scale.set(0.25,0.25,0.25);\n\t\tscene.add(cups[numcups]);\n\t\tnumcups+=1;\n\t}\n}", "function creategemValues() {\n oneValue = Math.floor(Math.random() * 12 + 2);\n twoValue = Math.floor(Math.random() * 12 + 2);\n threeValue = Math.floor(Math.random() * 12 + 2);\n fourValue = Math.floor(Math.random() * 12 + 2);\n}", "function buildGrid() {\n return new Array(COLS).fill(null)\n .map(()=> new Array(ROWS).fill(null)\n .map(()=> Math.floor(Math.random()*2)));\n}", "newRandom()\n {\n super.newRandom();\n\n this.data = [];\n\n // random integers 10-90\n let random = d3.randomInt(10, 91);\n for(let i = 0; i < this.features.length; i++)\n {\n this.data[i] = random();\n }\n }", "function generateRandomColors() {\r\n color1.value = getRandom();\r\n color2.value = getRandom();\r\n setGradient();\r\n}", "fillCellsRandomly(cellsY, cellsX, colors){\n let colorsPool = colors.flat()\n let randomPoolIndex;\n this.cells = new Array(cellsY);\n for (let y = 0; y<cellsY; y++){\n this.cells[y] = new Array(cellsX)\n for (let x = 0; x<cellsX; x++){\n randomPoolIndex = Math.round( Math.random()*colorsPool.length)-1;\n let randomColor = colorsPool.splice(randomPoolIndex,1);\n this.cells[y][x]= new Cell(randomColor[0], y, x, this.cellWidth, this.cellHight, this.node);\n }\n }\n }", "function generateFood(count) {\n var cols = floor(width/scl);\n var rows = floor(height/scl);\n\n for(var i = currentFoodItems.length; i < count; i++) {\n currentFoodItems.push(new createVector(floor(random(cols)), floor(random(rows))));\n currentFoodItems[i].mult(scl);\n pics[i] = new Pic(currentFoodItems[i].x, currentFoodItems[i].y, img[floor(random(0, img.length))]);\n }\n}", "function parseCube() {\n count ++;\n\n // while (scene.children.length > 0) {\n // scene.remove(scene.children[0]);\n // }\n\n scene.remove.apply(scene, scene.children);\n\n\n newCubes.forEach(function(cube) {\n var h = cube.height;\n var currentPos = cube.position;\n // console.log(pos.x);\n for (i = -1; i < 2; i ++) {\n for (j = -1; j < 2; j ++) {\n for (k = -1; k < 2; k ++) {\n // yes, has to be h/2 here instead of h:\n pos.set(currentPos.x + i * h/2, currentPos.y + j * h/2, currentPos.z + k * h/2);\n var geom = new THREE.BoxGeometry(h / 2.04, h / 2.04, h / 2.04);\n\n // var mat = new THREE.MeshBasicMaterial( { color: color2, transparent: true } );\n\n\n // Logic: if two or more of x, y, z are 0, do NOT draw the box:\n if (!(i == 0 && j==0) && !(k == 0 && j==0) && !(i == 0 && k==0)) {\n // if ((i ==0 && j==0) || (i ==0 && k==0) || (k ==0 && j==0)) {\n var newCube = new THREE.Mesh(geom, material2);\n newCube.position.copy(pos);\n newCube.receiveShadow = true;\n newCube.height = size / (Math.pow(3, count));\n scene.add( newCube );\n newerCubes.push(newCube);\n }\n\n }\n }\n }\n\n\n\n });\n\n //Oh, of course, what we really need to do is cut out pieces, not keep redrawing cubes.\n // Or, we can redraw cubes as long as we clear each time.\n newCubes = newerCubes;\n newerCubes = [];\n\n}", "function cloudFunc() {\n\ti = new Clouds(createVector(random(0, width / 2), random(0, 230)));\n\tcloudCollage.push(i);\n\tfor (var i = 0; i < cloudCollage.length; i += 30) {\n\t\tcloudCollage[i].run();\n\t}\n}", "function fillPositionTexture(texture) {\n const theArray = texture.image.data;\n //put the position data into the texture.\n for (let k = 0, kl = theArray.length; k < kl; k += 4) {\n const x = Math.random() * BOUNDS - BOUNDS_HALF;// BOUNDS = 800, BOUNDS_HALF = BOUNDS / 2;\n const y = Math.random() * BOUNDS - BOUNDS_HALF;\n const z = Math.random() * BOUNDS - BOUNDS_HALF;\n theArray[k + 0] = x;\n theArray[k + 1] = y;\n theArray[k + 2] = z;\n theArray[k + 3] = 1;\n }\n}", "randomAll () {\n var baseMatrix = this.getBaseMatrix()\n var dt = distance_transform.distanceTransform(baseMatrix)\n\n /* Get core structures */\n var core_position = this.corePos ? this.corePos : this.getPositionFor(dt, LAYOUT_CORE_BUFFER)\n if (!core_position) {\n return false\n }\n baseMatrix = this.addToMatrix(baseMatrix, core_position, LAYOUT_CORE_BUFFER)\n dt = distance_transform.distanceTransform(baseMatrix);\n\n /* Get flower1 structures */\n var flower1_position = this.getPositionFor(dt, LAYOUT_FLOWER_BUFFER)\n if (!flower1_position) {\n return false\n }\n baseMatrix = this.addToMatrix(baseMatrix, flower1_position, LAYOUT_FLOWER_BUFFER)\n dt = distance_transform.distanceTransform(baseMatrix);\n\n\n /* Get flower2 structures */\n var flower2_position = this.getPositionFor(dt, LAYOUT_FLOWER_BUFFER)\n if (!flower2_position) {\n return false\n }\n\n return this.planLayout(core_position, flower1_position, flower2_position)\n }", "function giveRandomPolygons() {\n\t\t\n\t\tvar count = Math.floor(Math.random() * 10 + 1);\n\t\tvar num_vertices = Math.floor(Math.random() * 5 + 1);\n\n\t\treturn givePolygons(count, num_vertices);\n\t}", "_fillThis() {\n\n for (let row = 0; row < this.length; row++) {\n this[row] = [];\n\n for (let newCol = 0; newCol < 4; newCol++) {\n this[row][newCol] = 0;\n }\n }\n }", "function createMeteors(){\n for (var i = 0; i < numberOfMeteors; i++) {\n ArrayOfMeteors[i] = new Meteor();\n newX = Math.floor(Math.random()* c.width);\n if (newX < 30){\n ArrayOfMeteors[i].updateX(30);\n }\n else if (newX > c.width) {\n ArrayOfMeteors[i].updateX(c.width - 30);\n }\n else{\n ArrayOfMeteors[i].updateX(newX);\n }\n }\n}", "random(min,max) {\r\n this.data = this.data.map(row => row.map(col => Matrix.randomInt(min || 0,max || 1)));\r\n }" ]
[ "0.6558459", "0.64572215", "0.6215722", "0.6192971", "0.61664", "0.61379504", "0.61324257", "0.60917443", "0.60540926", "0.60522866", "0.60404885", "0.60181916", "0.59854", "0.5962769", "0.5874931", "0.58394414", "0.58081186", "0.58079106", "0.57972693", "0.57824177", "0.5780213", "0.5770148", "0.57668525", "0.5743543", "0.5725255", "0.5713322", "0.57110083", "0.5700992", "0.5699712", "0.5685119", "0.56736404", "0.5661889", "0.565915", "0.56577367", "0.5656101", "0.56537914", "0.5653074", "0.5648979", "0.56401", "0.56369704", "0.5634843", "0.56312597", "0.5629022", "0.5624218", "0.56151205", "0.5613189", "0.56127113", "0.5610059", "0.5608085", "0.55964065", "0.5591834", "0.5583347", "0.55742216", "0.556838", "0.5562962", "0.5559043", "0.5557432", "0.5555988", "0.5550034", "0.55397445", "0.5534155", "0.5534071", "0.5532456", "0.55120826", "0.5504502", "0.5500245", "0.54988045", "0.5498072", "0.54964", "0.5495805", "0.54895234", "0.54892987", "0.54879254", "0.54833114", "0.5474035", "0.5473882", "0.5471877", "0.54713833", "0.54686266", "0.5463971", "0.5452632", "0.5452632", "0.5446659", "0.544605", "0.54424995", "0.54407364", "0.5437834", "0.54366344", "0.5434451", "0.5432822", "0.54311544", "0.5419541", "0.54191005", "0.5414536", "0.5408959", "0.5400055", "0.5395059", "0.5394255", "0.5391612", "0.53877234", "0.5385456" ]
0.0
-1
function to get form values
function getInputVal(id) { return document.getElementById(id).value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFormValuesAndDisplayResults() {\n}", "function getFormValues() {\n\tname = document.getElementById(\"name\").value;\n\temail = document.getElementById(\"email\").value;\n\tsubject = document.getElementById(\"subject\").value;\n\tmessage = document.getElementById(\"message\").value;\n}", "function formValues() {\n var data = {};\n traceLib.stored.forEach(function(field) {\n data[field] = $('#' + field).val() || '';\n });\n return data;\n}", "function getFormValues() { \n\t\tvar firstname = document.getElementById(\"form1\").fname.value;\n\t\tvar lastname = document.getElementById(\"form1\").lname.value;\n\t\tconsole.log(firstname + \" \" + lastname);\n\t}", "function getFormValues(){\r\n\tvar values=\"\",eType,element;\r\n\tvar elements=hatsForm.elements;\r\n\tfor (var i=0,iL=elements.length; i<iL; ++i){\r\n\t\tvar elementVal = \"\";\r\n\t\telement=elements[i];\r\n\t\teType=element.type;\r\n\t\tvar computeValue = true;\r\n\t\tif ((eType == \"radio\") ||(eType == \"checkbox\"))\r\n\t\t\tcomputeValue = element.checked;\r\n\t\tif(computeValue){\r\n\t\t\tif (appletInitialized && document.HATSApplet){\r\n\t\t\t\telementVal = document.HATSApplet.encode(element.value,document.charset);\r\n\t\t\t}else if(window.encodeURIComponent){\r\n\t\t\t\telementVal = encodeURIComponent(element.value);\r\n\t\t\t}else if (window.escape){\r\n\t\t\t\telementVal = escape(element.value);\r\n\t\t\t}\r\n\t\t\tvalues += \"&\" + element.name + \"=\" + elementVal;\r\n\t\t}\r\n\t}\r\n\treturn values;\r\n}", "function getFormValues() {\n\t\t// function to send first and last names\n\t\t// to an 'alert' message.\n\t\t\n\t\tvar fname= document.getElementById('fname').value;\n\t\tvar lname= document.getElementById('lname').value;\n\t\talert(\"First name: \" +fname+\" \"+\"Last name: \"+lname);\n\t\t \n\t}", "formValues() {\n if (this.refs.form) {\n return this.refs.form.getValues();\n } else {\n return {};\n }\n }", "function getFormValues (myForm){\r\n var myParms = \"\";\r\n for (var i = 0, d, v; i < myForm.elements.length; i++) {\r\n d = myForm.elements[i];\r\n if (d.name && d.value) {\r\n v = (d.type == \"checkbox\" || d.type == \"radio\" ? (d.checked ? d.value : '') : d.value);\r\n if (v) myParms += d.name + \"=\" + escape(v) + \"&\";\r\n }\r\n }\r\n myParms = myParms.substr(0,myParms.length-1);\r\n // alert(\"myParms = \" + myParms);\r\n return myParms;\r\n}", "function getValues(form) {\n processCheckbox(form);\n processSelect(form);\n processInput(form);\n processTextarea(form);\n setDateTime(helpData);\n if (helpData.kind === 'need') {\n getTime(form)\n }\n helpData.userName = $(\"#username\").val();\n return helpData;\n}", "function get_form_values(fobj)\n\t\t{\n\t\t\tvar str = \"\";\n\t\t\tvar valueArr = null;\n\t\t\tvar val = \"\";\n\t\t\tvar cmd = \"\";\n\t\t\n\t\t\tfor(var i = 0;i < fobj.elements.length;i++)\n\t\t\t{\n\t\t\t\tswitch(fobj.elements[i].type)\n\t\t\t\t{\n\t\t\t\t\tcase \"text\":\n\t\t\t\t\t\tstr += fobj.elements[i].name + \"=\" + escape(fobj.elements[i].value) + \"&\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"textarea\":\n\t\t\t\t\t\tstr += fobj.elements[i].name + \"=\" + escape(fobj.elements[i].value) + \"&\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"select-one\":\n\t\t\t\t\t\tstr += fobj.elements[i].name + \"=\" + fobj.elements[i].options[fobj.elements[i].selectedIndex].value + \"&\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tstr = str.substr(0,(str.length - 1));\n\t\t\treturn str;\n\t\t}", "function getAllformvalues(formid) \r\n\t{\r\n\t\t\r\n\t var inputValues = {};\r\n\t jQuery('#' + formid + ' input').each(function () {\r\n\t var type = jQuery(this).attr('type');\r\n\t var name = jQuery(this).attr('name');\r\n\t var id = jQuery(this).attr('id');\r\n\t var type = jQuery(this).attr(\"type\");\r\n\t if ((type == \"checkbox\" || type == \"radio\") ) {\r\n\t \tif($(this).prop('checked'))\r\n\t inputValues[name] = jQuery(this).val();\r\n\t } else if (type != \"button\" ) {\r\n\t inputValues[name] = jQuery(this).val();\r\n\t }\r\n\t });\r\n\t \r\n\t \r\n\t jQuery('select').each(function () {\r\n\t var name = jQuery(this).attr('name');\r\n\t inputValues[name] = jQuery(this).val();\r\n\t\r\n\t });\r\n\t jQuery('textarea').each(function () {\r\n\t var name = jQuery(this).attr('name');\r\n\t var id = jQuery(this).attr('id');\r\n\t inputValues[name] = jQuery(this).val();\r\n\t });\r\n\t return inputValues;\r\n\t}", "function getFormValues() { \n\t\tvar first = document.getElementById(\"first\").value;\n\t\tconsole.log(first);\n\t\tvar last = document.getElementById(\"last\").value;\n\t\tconsole.log(last);\n\t}", "function get_form_data() {\n var data = {};\n data[\"out\"] = $(\"#outcome-resp\").val();\n data[\"int\"] = $(\"#intervention-resp\").val();\n data[\"cmp\"] = $(\"#comparator-resp\").val();\n data[\"ans\"] = getCheckBoxSelection();\n data[\"res\"] = $(\"#reasoning-resp\").val();\n data[\"xml\"] = $(\"#reasoning-resp\").attr('xml_offsets');\n return data;\n}", "function getFormVariables() {\n return [$(\"#art_name\").val(),\n $(\"#id_field\").val(),\n $(\"#birthyear\").val(),\n $(\"#img_url\").val()\n ]\n}", "function getFormValues(){\n var form = document.getElementById (\"the_form\");\n var todo = form.elements.task.value;\n return {task: todo}; \n}", "function getFormValues() {\n\n if ($.textFieldName.value.length == 0) {\n alert(\"Name is required\");\n return;\n }\n var formValues = {\n name: $.textFieldName.value,\n content: $.textFieldContent.value ? $.textFieldContent.value : ''\n };\n\n return formValues;\n}", "function getFormValues($form, fields) {\n\tvar form_values = {}, i, len;\n\n\tfor (i = 0, len = fields.length; i < len; i++) {\n\t\tform_values[fields[i]] = $form.find('#' + fields[i]).val();\n\t}\n\treturn form_values;\n}", "function tiendaGetFormInputData(form) {\r\n\tvar str = new Array();\r\n\tfor ( i = 0; i < form.elements.length; i++) {\r\n\t\tpostvar = {\r\n\t\t\tname : form.elements[i].name,\r\n\t\t\tvalue : form.elements[i].value,\r\n\t\t\tchecked : form.elements[i].checked,\r\n\t\t\tid : form.elements[i].id\r\n\t\t};\r\n\t\tstr[i] = postvar;\r\n\t}\r\n\treturn str;\r\n}", "function get_form_data(form) {\n var values = {};\n $.each($(form).serializeArray(), function(i, field) {\n values[field.name] = field.value;\n });\n return values;\n}", "getValues() {\n return {\n description: Form.description.value, \n amount: Form.amount.value,\n date: Form.date.value\n }\n }", "function fetchformdata() {\nlet form = document.forms[0];\nlet day, month, year, gender;\n\ngender = form.gender.value;\n\nday = parseInt(form.day.value);\nmonth = parseInt(form.month.value);\nyear = parseInt(form.year.value);\n\nreturn [gender, day, month, year];\n\n}", "function getFormValues(fields) {\n const valuesObj = {\n name: fields[0].value,\n color: fields[1].value,\n primary: fields[2].value,\n secondary: fields[3].value\n };\n // the function returns the value of valuesObj\n return valuesObj;\n }", "function getFormValues(){\n\nsignupInfo.email = document.getElementById('email').value;\nsignupInfo.username = document.getElementById('username').value;\nsignupInfo.password = document.getElementById('password').value;\nsignupInfo.firstName = document.getElementById('firstName').value;\nsignupInfo.lastName = document.getElementById('lastName').value;\n\nsendToApi ();\n}", "function getFormValues() {\n let emailV = $('#email').val();\n let firstNameV = $('#firstName').val();\n let lastNameV = $('#lastName').val();\n let textAreaV = $('#taMessage').val();\n setUsersData(emailV, firstNameV, lastNameV, textAreaV);\n}", "getValues() {\n return {\n description: Form.description.value,\n amount: Form.amount.value,\n date: Form.date.value\n }\n }", "function citruscartGetFormInputData(form) {\r\n\tvar str = new Array();\r\n\t\r\n\tfor ( i = 0; i < form.elements.length; i++) {\r\n\t\tpostvar = {\r\n\t\t\tname : form.elements[i].name,\r\n\t\t\tvalue : form.elements[i].value,\r\n\t\t\tchecked : form.elements[i].checked,\r\n\t\t\tid : form.elements[i].id\r\n\t\t};\r\n\t\tstr[i] = postvar;\r\n\t}\r\n\t\r\n\treturn str;\r\n}", "function getFormData(formName) {\n var elements = document.getElementById(formName).elements; // all form elements\n var fields = Object.keys(elements).filter(function(k){\n return k.length > 1 && elements[k].name && elements[k].name.length > 0 ;\n });\n var data = {};\n fields.forEach(function(k){\n data[k] = elements[k].value;\n });\n console.log(data);\n return data;\n }", "function getFormValues($form) {\n var formValuesObj = {};\n\n $form.find(':input:not(button)').each(function(){\n var input = $(this),\n value = input.val(),\n name = input[0]['name'],\n is_required = input.prop('required');\n \n if (name && name.indexOf('[]') >= 0) {\n var checkboxes = document.getElementsByName(name);\n var vals = \"\";\n for (var i=0, n=checkboxes.length;i<n;i++) {\n if (checkboxes[i].checked) {\n vals += \",\"+checkboxes[i].value;\n }\n }\n\n if (vals) value = vals.substring(1);\n if (!vals) value = '';\n name = name.replace('[]', '');\n }\n\n formValuesObj[name] = {\n value: value,\n is_required: is_required\n }\n });\n\n return formValuesObj;\n}", "function getFormValues(formName)\n{\n\n\treturnString =\"\";\n\t\n\tif( formName == \"\" ) return returnString;\n\t\n\tformElements=document.forms[formName].elements;\n\t\n\tfor ( var i=formElements.length-1; i>=0; --i ) {\n\t\tif (formElements[i].name!=\"\"){ \n\t\t\t//añade elementos radio y checkbox\n\t\t\tif (formElements[i].type==\"checkbox\" && !formElements[i].checked){\n\t\t\t//este checkbox si no ha sido seleccionado es ignorado\n\t\t\t}else{\n\t\t\t\tif (formElements[i].type==\"radio\" && !formElements[i].checked){\n\t\t\t\t//este radio si no ha sido seleccionado es ignorado\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar value = formElements[i].value;\n\t\t\t\t\t\n\t\t\t\t\t//NumericInput control? quitar formato de mascara antes de postear\n\t\t\t\t\tif (formElements[i].alt!=null && formElements[i].alt==\"numeric\") {\n\t\t\t\t\t\tvalue = value.replace(/\\./g ,\"\");\n\t\t\t\t\t\tvalue = value.replace(/,/g ,\".\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//chrome y safari dispositivo movil \n\t\t\t\t\tif (formElements[i].type!=null && formElements[i].type==\"date\" && value!=null && value!=\"\") {\n\t\t\t\t\t\tvar s = value.split(\"-\");\n\t\t\t\t\t\tvar d = s[2]+'-'+s[1]+'-'+s[0];\n\t\t\t\t\t\tvalue = d;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvalue = encodeURI(value);\n\t\t\t\t\tvalue = value.replace(new RegExp(\"&\", \"g\") ,\"%26\");\n\t\t\t\t\t\n\t\t\t\t\t//patch 2013-01-24\n\t\t\t\t\tvalue = value.replace(new RegExp(\"\\\\+\", \"g\") ,\"%2B\");\n\t\t\t\t\t\n\t\t\t\t\treturnString = returnString + formElements[i].name + \"=\" + value + \"&\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturnString = returnString.substring(0, returnString.length - 1);\n\treturn returnString;\n\n}", "function getFormParams(formX){\n\tvar returnString = \"\";\t\n\tfor(var i = 0; i < formX.elements.length; i++){\n\t\tvar element = formX.elements[i];\n\t\tif(element.type == \"text\" || element.type == 'password'){\n\t\t\treturnString += \"&\"\t + element.name + \"=\" + element.value;\n\t\t}else if(element.type == \"file\"){\t\t\t\n\t\t}\n\t}\n\treturn returnString;\n}", "function get_form_data() {\n\t\tvar inputs = $('form').find('.form-group').find('input, textarea');\n\t\tvar data = {};\n\t\tinputs.each(function(index, input) {\n\t\t\tvar $input = $(input);\n\t\t\tif ($input.attr('type') === 'checkbox') {\n\t\t\t\tdata[$input.attr('name')] = $input.is(':checked');\n\t\t\t} else {\n\t\t\t\tdata[$input.attr('name')] = $input.val();\n\t\t\t}\n\t\t});\n\t\treturn data;\n\t}", "function getFormValues( p_formId ){\n\tvar form_answers;\n\tvar answers = {};\n\n\t// The input:hidden messes up when getting hte results for filters\n\t// To fix this check if the p_formId contains a substring\n\tvar pattern = /Form/gi;\n\tif( pattern.test(p_formId) ){\n\t\tform_answers = $('#'+p_formId).find('input:checked, input:text, textarea, input:hidden, select');\n\t}else{\n\t\tform_answers = $('#'+p_formId).find('input:checked, input:text, textarea, select');\n\t}\n\tconsole.log(\"FORM A: \" +form_answers);\n\tfor( var i=0; i<form_answers.length; i++){\n\t\t// Current answer\n\t\tvar ans = form_answers[i];\n\t\tif( !answers.hasOwnProperty(ans.name) ){\n\t\t\tanswers[ans.name] = [ans.value];\n\t\t}else{\n\t\t\t// When its checckboces dont include the 'Other' \n\t\t\t// if its checked or if it's text field is empty\n\t\t\tif(ans.value != \"Other\"){\n\t\t\t\tif(ans.value != \"\")\n\t\t\t\tanswers[ans.name].push(ans.value);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\treturn answers;\n}", "getFormDataToKeyValue(form) {\n let formData = [];\n for (let i = 0; i < form.elements.length; i++) {\n let element = form.elements[i];\n formData.push(element.name + \"=\" + element.value);\n }\n return formData;\n }", "function getFormContents(form) {\n var data = $(form).serializeArray(), attributes = {};\n\n for(var key in data) {\n if(data.hasOwnProperty(key)) {\n var innerKey = data[key].name\n attributes[innerKey] = data[key].value\n }\n }\n\n return attributes;\n}", "function getValuesForm(mixForm, booNotDisabled)\n{\n if (empty(mixForm))\n return false;\n var form = getObject(mixForm);\n if (empty(form))\n return false;\n if (!isBoolean(booNotDisabled))\n booNotDisabled = true;\n var arrInput = (booNotDisabled) ? form.querySelectorAll('input:not([disabled]') : form.getElementsByTagName('INPUT');\n var arrSelect = (booNotDisabled) ? form.querySelectorAll('select:not([disabled]') : form.getElementsByTagName('SELECT');\n var arrTextarea = (booNotDisabled) ? form.querySelectorAll('textarea:not([disabled]') : form.getElementsByTagName('TEXTAREA');\n var arrValuesForm = [];\n var strName;\n var intKey;\n var strValue;\n for (var intCount = 0; intCount < arrInput.length; ++intCount) {\n var input = arrInput[intCount];\n if (empty(input.getAttribute('name')))\n continue;\n var booExec = ((input.type == 'checkbox') || (input.type == 'radio')) ? input.checked : true;\n if (booExec) {\n strValue = input.value;\n strName = input.getAttribute('name');\n if ((document.all) && (input.getAttribute('placeholder') == strValue))\n strValue = '';\n if (input.getAttribute('name') !== '') {\n intKey = arrValuesForm.length;\n arrValuesForm[intKey] = [];\n arrValuesForm[intKey][strName] = strValue;\n }\n }\n }\n for (intCount = 0; intCount < arrSelect.length; ++intCount) {\n var select = arrSelect[intCount];\n if (empty(select.getAttribute('name')))\n continue;\n if ((isSelectMultiple(select)) && (select.getAttribute('name').indexOf(strGlobalSufixTransferNotSelectable) != -1))\n continue;\n var mixValue = captureValueFromElement(select);\n strName = select.getAttribute('name');\n if (select.getAttribute('name') !== '') {\n intKey = arrValuesForm.length;\n arrValuesForm[intKey] = [];\n arrValuesForm[intKey][strName] = mixValue;\n }\n }\n for (intCount = 0; intCount < arrTextarea.length; ++intCount) {\n var textarea = arrTextarea[intCount];\n if (empty(textarea.getAttribute('name')))\n continue;\n strValue = textarea.value;\n strName = textarea.getAttribute('name');\n if ((document.all) && (textarea.getAttribute('placeholder') == strValue))\n strValue = '';\n if (textarea.getAttribute('name') !== '') {\n intKey = arrValuesForm.length;\n arrValuesForm[intKey] = [];\n arrValuesForm[intKey][strName] = strValue;\n }\n }\n return arrValuesForm;\n}", "function getFormValues(form) \r\n{\r\n\t//initialize vars\r\n\tvar locationOption = \"\";\r\n\tvar groupOption = \"\";\r\n var metricOption = \"\";\r\n var yearOption = \"\";\r\n var gpaOption = \"\";\r\n var mathOption = \"\";\r\n var verbalOption = \"\";\r\n var genderOption = \"\";\r\n \r\n //for each element in the form...\r\n for (var i = 0; i < form.elements.length; i++ ) {\r\n \t\r\n \t//get which location the user has selected\r\n \tif (form.elements[i].name == \"Location\") {\r\n \tlocationOption += form.elements[i].value;\r\n }\r\n \t\r\n \t//get which \"group\" button is checked\r\n if (form.elements[i].name == \"groups\") {\r\n if (form.elements[i].checked == true) {\r\n groupOption += form.elements[i].value;\r\n }\r\n }\r\n \r\n //and which \"metric\" button is checked\r\n if (form.elements[i].name == \"metrics\") {\r\n if (form.elements[i].checked == true) {\r\n metricOption += form.elements[i].value;\r\n }\r\n }\r\n \r\n //get the metric drop-down-menu values\r\n if (form.elements[i].name == \"gpaSelector\") {\r\n \tgpaOption += form.elements[i].value;\r\n }\r\n \r\n if (form.elements[i].name == \"satMathSelector\") {\r\n \tmathOption += form.elements[i].value;\r\n }\r\n \r\n if (form.elements[i].name == \"satVerbalSelector\") {\r\n \tverbalOption += form.elements[i].value;\r\n }\r\n \r\n if (form.elements[i].name == \"genderSelector\") {\r\n \tgenderOption += form.elements[i].value;\r\n }\r\n \r\n //and which \"year\" button is checked\r\n if (form.elements[i].name == \"years\") {\r\n if (form.elements[i].checked == true) {\r\n yearOption += form.elements[i].value;\r\n }\r\n }\r\n }\r\n \r\n //update globals\r\n selectedLocation = locationOption;\r\n selectedGroup = groupOption;\r\n selectedMetric = metricOption;\r\n selectedYear = yearOption;\r\n selectedGPA = gpaOption;\r\n\tselectedMath = mathOption;\r\n\tselectedVerbal = verbalOption;\r\n\tselectedGender = genderOption;\r\n\t\r\n\t//we only care about the drop-down associated with the selected metric\r\n\tswitch(selectedMetric)\r\n\t{\r\n\t\tcase \"None\":\r\n\t\t\timportantMetric = \"None\";\r\n\t\t\tbreak;\r\n\t\tcase \"GPA\":\r\n\t\t\timportantMetric = selectedGPA;\r\n\t\t\tbreak;\r\n\t\tcase \"SAT Math\":\r\n\t\t\timportantMetric = selectedMath;\r\n\t\t\tbreak;\r\n\t\tcase \"SAT Verbal\":\r\n\t\t\timportantMetric = selectedVerbal;\r\n\t\t\tbreak;\r\n\t\tcase \"Male / Female\":\r\n\t\t\timportantMetric = selectedGender;\r\n\t\t\tbreak;\r\n\t\tcase \"Visited\":\r\n\t\t\timportantMetric = \"Visited\";\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\timportantMetric = \"ERROR\";\r\n\t}\r\n \r\n //create associative array\r\n\tvar optionSettings = {};\r\n\toptionSettings['location'] = selectedLocation;\r\n\toptionSettings['group'] = selectedGroup;\r\n\toptionSettings['metric'] = selectedMetric;\r\n\toptionSettings['year'] = selectedYear;\r\n\toptionSettings['dropVal'] = importantMetric;\r\n\t\r\n\treturn optionSettings; \r\n}//end getValues", "function get_field_data_value () \n {\n var $idvl = $params('.wp_gcf_inner-top .form-id-value').val();\n var $name = $params('.wp_gcf_inner-top .form-name-value').val();\n var $exct = $params('.wp_gcf_inner-bottom .add-field-item .add-field-excerpt').val();\n var $desc = $params('.wp_gcf_inner-bottom .add-field-item .add-field-desc').val();\n var $brow = $params('.wp_gcf_inner-bottom .add-field-item .field-item-browse .browse-input').val();\n\n return { 'id':$idvl, 'name':$name, 'excerpt':$exct, 'content':$desc, 'browse':$brow };\n }", "function tiendaStoreFormInputs(form) {\r\n\tvar values = new Array();\r\n\tfor ( i = 0; i < form.elements.length; i++) {\r\n\t\tvalue = {\r\n\t\t\tvalue : form.elements[i].value,\r\n\t\t\tchecked : form.elements[i].checked\r\n\t\t};\r\n\t\tvalues[form.elements[i].name] = value;\r\n\t}\r\n\treturn values;\r\n}", "function getInputValues(id){\n return document.getElementById(id).value;\n}", "getData() {\n var ret = {};\n var elements = $(\"input, textarea, checkbox, select\", this);\n elements.each((i, e) => this._gather_form_data(e, ret));\n this._log(\"getData():\", ret);\n return ret;\n }", "function serializeForm() {\r\n var inputFields = $(mainElement).find('form :input');\r\n var result = {};\r\n $.each(inputFields, function (index, value) {\r\n if ($(value).attr('name')) {\r\n result[$(value).attr('name')] = $(value).val();\r\n }\r\n });\r\n return result;\r\n }", "function getInput() {\n \tvar data = {},\n \t form = pageElements.input,\n \t tagString;\n\n\n \tdata.id = form.id.value;\n \tdata.title = form.title.value;\n \tdata.url = form.url.value\n \tdata.author = form.author.value;\n \tdata.tags = \"\";\n \tdata.comments = form.comments.value;\n\n \ttagString = form.tags.value;\n \tif(tagString.length) {\n \t\tdata.tags = tagString.toLowerCase().replace(/\\s*/g, \"\").split(\",\");\n \t}\n\n \treturn data;\n }", "function getInputValues(id) {\n return document.getElementById(id).value;\n}", "function getFormData () {\n var unitVal = $(\"#units\").val();\n var activationVal = $(\"#activation\").val();\n return {\"units\":unitVal,\"activation\":activationVal};\n}", "function get_values()\r\n {\r\n $(\"input\").each(\r\n function()\r\n {\r\n var $ele = $(this);\r\n locals[$ele.attr(\"id\")]=$ele.val();\r\n });\r\n locals.amount = parseFloat($(\"#amount\").val().replace(\"$\",\"\"));\r\n locals.create_account = $(\"#create_account\").is(\":checked\");\r\n locals.accept_guest_terms = $(\"#accept_guest_terms\").is(\":checked\");\r\n locals.accept_member_terms = $(\"#accept_member_terms\").is(\":checked\");\r\n locals.account_type = $(\"#account_type\").val();\r\n }", "function citruscartStoreFormInputs(form) {\r\n\tvar values = new Array();\r\n\tfor ( i = 0; i < form.elements.length; i++) {\r\n\t\tvalue = {\r\n\t\t\tvalue : form.elements[i].value,\r\n\t\t\tchecked : form.elements[i].checked\r\n\t\t};\r\n\t\tvalues[form.elements[i].name] = value;\r\n\t}\r\n\treturn values;\r\n}", "function get_form_data(el) {\n var data = {};\n el.find('input, select').each(function() {\n var name = $(this).attr('name'),\n val = $(this).val(),\n type = $(this).attr('type');\n\n // Handle checkboxes and radio fields specially\n if (type === 'checkbox') {\n val = $(this).is(':checked');\n } else if (type === 'radio') {\n ok = $(this).is(':checked');\n if (!ok) return\n }\n data[name] = val;\n });\n return data;\n }", "_getInputValues() {\n this._formValues = {};\n\n this._inputList.forEach(input => {\n this._formValues[input.name] = input.value;\n });\n\n // console.log(this._formValues);\n return this._formValues;\n }", "function form_values(event){\n\t\tevent.preventDefault();\n\t\tvar return_object = {};\n\t\tvar dynamic_multi_objects = {};\n\t\tObject.keys(event.target.elements).forEach(function(k){\n\t\t\tswitch(event.target.elements[k].field_type){\n\t\t\t\tcase 'radio':\n\t\t\t\t\tswitch(typeof event.target.elements[k].rownum){\n\t\t\t\t\t\tcase 'number':\n\t\t\t\t\t\t\tvar parent_name = event.target.elements[k].parentNode.name;\n\t\t\t\t\t\t\tvar my_name = event.target.elements[k].name;\n\t\t\t\t\t\t\tvar my_row = event.target.elements[k].rownum;\n\t\t\t\t\t\t\tif (dynamic_multi_objects[parent_name]) {\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tdynamic_multi_objects[parent_name] = {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (dynamic_multi_objects[parent_name][my_row]) {\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tdynamic_multi_objects[parent_name][my_row] = {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(event.target.elements[k].checked){\n\t\t\t\t\t\t\t\tdynamic_multi_objects[parent_name][my_row][my_name] = event.target.elements[k].value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tif(event.target.elements[k].checked){\n\t\t\t\t\t\t\t\treturn_object[event.target.elements[k].name] = event.target.elements[k].value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'int':\n\t\t\t\t\tswitch(typeof event.target.elements[k].rownum){\n\t\t\t\t\t\tcase 'number':\n\t\t\t\t\t\t\tvar parent_name = event.target.elements[k].parentNode.name;\n\t\t\t\t\t\t\tvar my_name = event.target.elements[k].name;\n\t\t\t\t\t\t\tvar my_row = event.target.elements[k].rownum;\n\t\t\t\t\t\t\tif (dynamic_multi_objects[parent_name]) {\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tdynamic_multi_objects[parent_name] = {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (dynamic_multi_objects[parent_name][my_row]) {\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tdynamic_multi_objects[parent_name][my_row] = {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(event.target.elements[k].value){\n\t\t\t\t\t\t\t\tdynamic_multi_objects[parent_name][my_row][my_name] = parseInt(event.target.elements[k].value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tif(event.target.elements[k].value){\n\t\t\t\t\t\t\t\treturn_object[event.target.elements[k].name] = parseInt(event.target.elements[k].value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'float':\n\t\t\t\tcase 'percent':\n\t\t\t\t\tswitch(typeof event.target.elements[k].rownum){\n\t\t\t\t\t\tcase 'number':\n\t\t\t\t\t\t\tvar parent_name = event.target.elements[k].parentNode.name;\n\t\t\t\t\t\t\tvar my_name = event.target.elements[k].name;\n\t\t\t\t\t\t\tvar my_row = event.target.elements[k].rownum;\n\t\t\t\t\t\t\tif (dynamic_multi_objects[parent_name]) {\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tdynamic_multi_objects[parent_name] = {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (dynamic_multi_objects[parent_name][my_row]) {\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tdynamic_multi_objects[parent_name][my_row] = {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(event.target.elements[k].value){\n\t\t\t\t\t\t\t\tdynamic_multi_objects[parent_name][my_row][my_name] = parseFloat(event.target.elements[k].value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tif(event.target.elements[k].value){\n\t\t\t\t\t\t\t\treturn_object[event.target.elements[k].name] = parseFloat(event.target.elements[k].value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tswitch(typeof event.target.elements[k].rownum){\n\t\t\t\t\t\tcase 'number':\n\t\t\t\t\t\t\tvar parent = event.target.elements[k].parentNode;\n\t\t\t\t\t\t\twhile(parent.name===undefined){\n\t\t\t\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar parent_name = parent.name;\n\t\t\t\t\t\t\tvar my_name = event.target.elements[k].name;\n\t\t\t\t\t\t\tvar my_row = event.target.elements[k].rownum;\n\t\t\t\t\t\t\tif (dynamic_multi_objects[parent_name]) {\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tdynamic_multi_objects[parent_name] = {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (dynamic_multi_objects[parent_name][my_row]) {\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tdynamic_multi_objects[parent_name][my_row] = {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(event.target.elements[k].value){\n\t\t\t\t\t\t\t\tdynamic_multi_objects[parent_name][my_row][my_name] = event.target.elements[k].value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tif(event.target.elements[k].value){\n\t\t\t\t\t\t\t\treturn_object[event.target.elements[k].name] = event.target.elements[k].value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t\t\n\t\t// console.log(dynamic_multi_objects);\n\t\tObject.keys(dynamic_multi_objects).forEach(function(parent_name){\n\t\t\t// if(return_object[parent_name]){console.log(parent_name+\" Found\");console.log(return_object[parent_name]);}else{return_object[parent_name]=Array();}\n\t\t\treturn_object[parent_name]=Array();\n\t\t\tObject.keys(dynamic_multi_objects[parent_name]).forEach(function(rownum){\n\t\t\t\tvar row = {};\n\t\t\t\tObject.keys(dynamic_multi_objects[parent_name][rownum]).forEach(function(fieldname){\n\t\t\t\t\trow[fieldname]=dynamic_multi_objects[parent_name][rownum][fieldname];\n\t\t\t\t});\n\t\t\t\treturn_object[parent_name].push(row);\n\t\t\t});\n\t\t});\n\t\tconsole.log(return_object);\n\t\t// event.target.parentElement.innerHTML=\"\";\n\t}", "function get_form_values(selector) {\n\tvar values = {};\n\tjQuery(selector).find('input,select,textarea').each(function (index) {\n\t\tif ( !this.name ) {\n\t\t\treturn;\n\t\t}\n\t\tif (! values[this.name]) {\n\t\t\tvalues[this.name] = [];\n\t\t}\n\t\tif ( this.nodeName.toLowerCase() === 'select') {\n\t\t\tvar valarray = values[this.name];\n\t\t\t$(this).find('option').each(function(index) {\n\t\t\t\t\tif(this.selected) {\n\t\t\t\t\t\tvalarray.push(this.value);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif ( this.nodeName.toLowerCase() === 'input' && (this.type === 'checkbox' || \n\t\t\t\tthis.type === 'radio') && !this.checked ) {\n\t\t\treturn;\n\t\t}\n\t\tvalues[this.name].push(this.value || '');\n\t});\n\treturn values;\n}", "getFormDataToKeyValue(form) {\n let formData = [];\n for (let i = 0; i < form.elements.length; i++) {\n let element = form.elements[i];\n\n //HTML custom attribute\n let elementName = element.getAttribute(\"data-name\");\n let elementValue = element.value;\n if (elementName !== null) {\n\n\n //anticipate checkbox validation\n if (element.type === \"checkbox\") {\n if (element.checked === false) {\n elementValue = \"frCheckBoxNoValue\";\n }\n }\n\n\n //anticipate radio validation\n if (element.type === \"radio\") {\n if (element.checked === false) {\n elementValue = \"frRadioNoValue\";\n }\n }\n\n\n formData.push(elementName + \"=\" + elementValue);\n }\n }\n return formData;\n }", "function getParams(){\n let inputs = d3.select(\".list-group-item\").selectAll(\".form-control\")\n let params = {}\n\n inputs.each(function() {\n if (this.value){\n params[this.id] = this.value\n }\n });\n return params\n }", "function getDataFromForm() {\n var nombre = document.getElementById('full_name');\n var correo = document.getElementById('email');\n var tel = document.getElementById('telephone');\n var clase = getValueFromRadio('clase');\n var posicion = document.getElementById('position');\n var comunidad = document.getElementById('community');\n \n // this validates the precence of inportant inputs and add the invalid class in case of empty \n var inputsAreValid = isValidInputField(nombre) && isValidInputField(correo) && isValidInputField(tel) && isValidInputField(posicion);\n if (inputsAreValid) {\n return {\n nombre: nombre.value,\n correo: correo.value,\n tel: tel.value,\n clase: clase,\n posicion : posicion.value,\n comunidad: comunidad.value\n }\n }\n \n return false;\n }", "function getFormData() {\n var elements = document.getElementById(\"gform\").elements; // all form elements\n var fields = Object.keys(elements).map(function(k) {\n if (elements[k].name !== undefined) {\n return elements[k].name;\n // special case for Edge's html collection\n } else if (elements[k].length > 0) {\n return elements[k].item(0).name;\n }\n }).filter(function(item, pos, self) {\n return self.indexOf(item) == pos && item;\n });\n var data = {};\n fields.forEach(function(k) {\n data[k] = elements[k].value;\n if (elements[k].type === \"checkbox\") {\n data[k] = elements[k].checked;\n // special case for Edge's html collection\n } else if (elements[k].length) {\n for (var i = 0; i < elements[k].length; i++) {\n if (elements[k].item(i).checked) {\n data[k] = elements[k].item(i).value;\n }\n }\n }\n });\n return data;\n}", "function getRegInputData() {\n const name = userName.value;\n const email = userEmail.value;\n const password = userPassword.value;\n const passwordConfirm = userPasswordCnfrm.value;\n return { name, email, password, passwordConfirm };\n}", "function getDataForCustomHtmlForm()\n{\n var sets = getHtmlFormSettings_();\n var data = {\n values: getDatatForHtmpFormSelect_(),\n header: sets.listName,\n listHeight: sets.listHeight\n }\n return data; \n}", "function getFieldValue(form, fieldName) {\n\tvar fieldValue = '';\n\tvar fields = $(form).serializeArray();\n\tfor (var i = 0; i < fields.length; i++) {\n\t\tif ((fields[i].name.toLowerCase().indexOf(fieldName) >= 0) && (fields[i].value != '')) {\n\t\t\tif (fieldName.toLowerCase() !== 'name' || (fields[i].name.toLowerCase() !== 'ibname' && fields[i].name.toLowerCase() !== 'elqformname')) {\n\t\t\t fieldValue+= (fieldValue ? ' ' : '') + fields[i].value;\n\t\t\t}\n\t\t}\n\t}\n\treturn fieldValue;\n}", "function captureFormData(inputs) {\n var values = {};\n inputs.each(function() {\n values[this.name] = $(this).val();\n });\n return values;\n}", "getFormData(form) {\n const type = form['query_type'].value || 1\n \n let content = form['query_content'].value\n const values = {\n query: content,\n name: form['query_name'].value,\n uri: form['query_endpoint'].value.trim(),\n params: {\n type: type,\n period: [ content.includes(\"$beginYear\") ? +form['from_year'].value : '', \n content.includes(\"$endYear\") ? +form['to_year'].value : '' ],\n lab: [ content.includes(\"$lab1\") ? form['query_lab1'].value : '', \n content.includes(\"$lab2\") ? form['query_lab2'].value : '' ],\n country: content.includes(\"$country\") ? form['query_country'].value : '',\n list_authors: form['query_list_authors'].value.split(',').map(d => `\"${d.trim()}\"`)\n }\n };\n\n this.getVariables(values.params)\n\n values.params.prefixes = this.getPrefixes()\n \n return values;\n }", "function value(request) {\n return document.getElementById(request).value;\n}", "function getFormValue ( form_name, field_name )\n {\n\tvar elt = document.forms[form_name][field_name];\n\n\tif ( elt && elt.type && elt.type == \"checkbox\" )\n\t return elt.checked;\n\n\telse if ( elt )\n\t return elt.value;\n\n\telse\n\t return \"\";\n }", "function getFormData(){\n var result = {};\n var fields = document.querySelectorAll('[name=linkform] [name]');\n\n for(var i in fields){\n var name = fields[i].name;\n // Excludes useless fields.\n if(['save_edit', 'cancel_edit', 'delete_link', 'token', 'returnurl'].indexOf(name) < 0){\n if(typeof name === 'string' && name.length > 0){\n if(fields[i].type === 'checkbox'){\n result[name] = fields[i].checked;\n } else if(fields[i].type === 'radio'){\n if(fields[i].checked){\n result[name] = fields[i].value;\n }\n } else{\n result[name] = fields[i].value;\n }\n }\n\n if(result[name]){\n result[name] = result[name];\n }\n }\n }\n\n return result;\n}", "function getExpenseForm(){\n var formData = {};\n formData[amount.name] = amount.value;\n formData[fileDate.name] = fileDate.value;\n formData[description.name] = description.value;\n return formData;\n}", "function getData(formId) {\n formId += \"\";\n let data = {};\n\n let elements = document.querySelectorAll(`[id^=\"${formId + '_'}\"]`);\n for (let el of Array.from(elements)) {\n if (el.type === \"checkbox\" && !el.checked) continue;\n data[el.id.substr(formId.length + 1)] = el.value;\n }\n return data;\n}", "function values () {\n totalCost = document.getElementById('cost__input').value;\n service = document.getElementById('service__options').value;\n people = document.getElementById('share__amount').value;\n}", "_getValues() {\n var options = {};\n var form = this.$form;\n var values = form.find('form').serializeArray();\n\n $.each(values, function(index, object) {\n var input = form.find(`[name=\"${object.name}\"][data-attribute]`);\n var key = input.attr('data-attribute');\n\n if (key) {\n if (/^.*\\[\\]$/.test(object.name)) {\n if (options[key]) {\n options[key] = `${options[key]},${object.value}`;\n } else {\n options[key] = object.value;\n }\n } else {\n options[key] = object.value;\n }\n }\n });\n\n return options;\n }", "function getForm() {\n inputNombre.value = localStorage.getItem('nombre');\n inputApellido.value = localStorage.getItem('apellido');\n inputTel.value = localStorage.getItem('tel');\n inputDir.value = localStorage.getItem('dir');\n inputObs.value = localStorage.getItem('obs');\n console.log('data loaded');\n}", "function getContactFormData() {\n const contactId = document.getElementById('id').value\n const primaryContact = document.getElementById('primary-contact').value\n const firstName = document.getElementById('firstN').value\n const lastName = document.getElementById('lastN').value\n const emailAddress = document.getElementById('emailN').value\n const homePhoneNumber = document.getElementById('home-phone').value\n const businessPhoneNumber = document.getElementById('business-phone').value\n const buddy = document.getElementById('buddy').checked\n\n return { contactId, primaryContact, firstName, lastName, emailAddress, homePhoneNumber, businessPhoneNumber, buddy }\n}", "function form_contents() {\n var form = $$('form').first();\n \n var form_els = form.getElements().reject(function(el) {\n return $w(\"_method authenticity_token\").include(el.name);\n });\n var url_encoded = form_els.collect(function(el) {\n return(el.name + \"=\" + el.value);\n });\n \n return url_encoded.join(\"&\");\n}", "function getInputValues() {\n\tfligherName = document.getElementById('name').value;\n\tconsole.log(fligherName);\n\tfligherEmail = document.getElementById('email').value;\n\tconsole.log(fligherEmail);\n\tairlineValue = document.getElementById('airline').value;\n\tconsole.log(airline);\n\tdestinationValue = document.getElementById('destination').value;\n\tconsole.log(destination);\n}", "function readFormData(){\n var formData = {};\n formData[\"namamahasiswa\"] = document.getElementById(\"namamahasiswa\").value;\n formData[\"NomorInduk\"] = document.getElementById(\"NomorInduk\").value;\n formData[\"Jurusan\"] = document.getElementById(\"Jurusan\").value;\n formData[\"Angkatan\"] = document.getElementById(\"Angkatan\").value;\n return formData\n}", "function getNames(){\n\tvar input = document.getElementById(\"testForm2\");\n\tif (input == null){return;}\n\tfor (i=0; i < input.length; i++){\n\t\tif(input[i].type==\"text\"){console.log(input[i].value);}\n\t}\n}", "function getFromFieldValue(formId,fieldName)\n{\n //var form = document.querySelector(\"#formId\");\n var form = document.getElementById(formId);\n var field = form.elements.namedItem(fieldName);\n return field.value;\n}", "function getForm() {\n return questionForm;\n}", "function getInputValue(form, limit) {\n\tvar inputs = [];\n\n\tfor (var i = 0; i <= limit; i++) {\n\t\tinputs[i] = $(form).find('input').eq(i).val();\n\t}\n\n\treturn inputs;\n}", "function getReviewFormFields() {\n var rating = $('#cr-rating').raty('score');\n var title = $('#cr-title').val();\n var reviewText = $('#cr-review-text').val();\n var progress = $('#cr-progress').val();\n var certificateLink = $('#cr-certificate-link').val();\n var topicCoverage = $('#cr-topic-coverage').raty('score');\n var jobReadiness = $('#cr-job-readiness').raty('score');\n var support = $('#cr-support').raty('score');\n var effort = $('#cr-effort').val();\n var duration = $('#cr-duration').val();\n\n return {\n 'rating' : rating,\n 'title': title,\n 'reviewText': reviewText,\n 'progress' : progress,\n 'certificateLink' : certificateLink,\n 'topicCoverage': topicCoverage,\n 'jobReadiness' : jobReadiness,\n 'support' : support,\n 'effort' : effort,\n 'duration' : duration,\n 'name' : $('#cr-name').val(),\n 'email' : $('#cr-email').val(),\n 'jobTitle': $('#cr-job-title').val(),\n 'highestDegree' : $('#cr-highest-degree').val(),\n 'fieldOfStudy' : $('#cr-field-of-study').val()\n };\n }", "function getValues() {\n fileCond = $fileCondSelect.val();\n nameCond = $nameCondSelect.val();\n dateCond = $dateCondSelect.val();\n rankCond = $rankCondSelect.val();\n tournyCond = $tournyCondSelect.val();\n playerInput = $playerInput.val().trim();\n dateInput = $dateInput.val().trim();\n // conversion here so only one is made for date search\n dateInputInt = parseInt(dateInput, 10) || 0;\n }", "function value(form, inputField) {\n\tvar getInput = form.find(inputField);\n\treturn getInput.val();\n}", "function CHMgetValues(formName, fieldName, otherFieldNames)\r\n{\r\n if(otherFieldNames)\r\n {\r\n var retValues = new Array();\r\n var len = 0;\r\n if(eval('document.'+formName+'.'+fieldName)) \r\n len = eval('document.'+formName+'.'+fieldName).length;\r\n \r\n if(len != 0 && len == null )\r\n {\r\n retValues[0] = new Array();\r\n retValues[0][0] = eval('document.'+formName+'.'+fieldName).value;\r\n for(var j=1; j<=otherFieldNames.length; j++)\r\n retValues[0][j] = eval('document.'+formName+'.'+otherFieldNames[j-1]).value;\r\n }\r\n else\r\n {\r\n var i=0;\r\n for(var cnt=0; cnt < len; cnt++)\r\n {\r\n retValues[i] = new Array();\r\n retValues[i][0] = eval('document.'+formName+'.'+fieldName)[cnt].value;\r\n for(var j=1; j<=otherFieldNames.length; j++)\r\n retValues[i][j] = eval('document.'+formName+'.'+otherFieldNames[j-1])[cnt].value;\r\n\r\n i++;\r\n }\r\n }\r\n \t\t\t\r\n return retValues;\r\n }\r\n }", "function getDataTaskForm() {\n const dataTaskForm = {};\n fieldsTaskForm.forEach(({ name, value = '' }) => {\n dataTaskForm[name] = value;\n });\n\n return dataTaskForm;\n}", "function getFormData(form_selector) {\n var out = {};\n var s_data = jQuery(form_selector).serializeArray();\n\n //transform into simple data/value object\n for (var i = 0; i < s_data.length; i++) {\n var record = s_data[i];\n out[record.name] = record.value;\n }\n return out;\n}", "function datosFormulario(frm) {\n let nombre= frm.nombre.value;\n let email = frm.email.value;\n let asunto= frm.asunto.value;\n let mensaje = frm.mensaje.value\n \n console.log(\"Nombre \",nombre);\n console.log(\"Email \",email);\n console.log(\"Asunto \",asunto);\n console.log(\"Mensaje \",mensaje);\n\n}", "getDataFromInputs()\n {\n let data = [];\n for(const input in this.inputStrcture)\n data.push(document.getElementById(input.toLowerCase()).value);\n \n return data;\n }", "getValues() {\r\n let isValid = isValidForm(this.picSchema, this.refs);\r\n if (!isValid)\r\n return isValid;\r\n else {\r\n let { Suburb, BrandFile, LogoFile } = this.refs;\r\n\r\n let form = getForm(this.picSchema, this.refs);\r\n let SuburbId = Suburb.state.suburbId;\r\n let Brand = BrandFile.getValues();\r\n let Logo = LogoFile.getValues();\r\n\r\n return {\r\n ...form,\r\n SuburbId: SuburbId == \"\" ? null : SuburbId,\r\n BrandFile: Brand.file,\r\n BrandDeletedFile: Brand.deletedFile,\r\n BrandFileId: Brand.fileId,\r\n LogoFile: Logo.file,\r\n LogoDeletedFile: Logo.deletedFile,\r\n LogoFileId: Logo.fileId\r\n };\r\n }\r\n }", "function getInputValue(obj) {\r\n if ((typeof obj.type != \"string\") && (obj.length > 0) && (obj[0] != null) && (obj[0].type==\"radio\")) {\r\n for (var i=0; i<obj.length; i++) {\r\n if (obj[i].checked == true) { return obj[i].value; }\r\n }\r\n return \"\";\r\n }\r\n if (obj.type==\"text\")\r\n { return obj.value; }\r\n if (obj.type==\"hidden\")\r\n { return obj.value; }\r\n if (obj.type==\"textarea\")\r\n { return obj.value; }\r\n if (obj.type==\"checkbox\") {\r\n if (obj.checked == true) {\r\n return obj.value;\r\n }\r\n return \"\";\r\n }\r\n if (obj.type==\"select-one\") {\r\n if (obj.options.length > 0) {\r\n return obj.options[obj.selectedIndex].value;\r\n }\r\n else {\r\n return \"\";\r\n }\r\n }\r\n if (obj.type==\"select-multiple\") {\r\n var val = \"\";\r\n for (var i=0; i<obj.options.length; i++) {\r\n if (obj.options[i].selected) {\r\n val = val + \"\" + obj.options[i].value + \",\";\r\n }\r\n }\r\n if (val.length > 0) {\r\n val = val.substring(0,val.length-1); // remove trailing comma\r\n }\r\n return val;\r\n }\r\n return \"\";\r\n }", "function get_form_url_data(oForm)\r\n{\r\n\tif(oForm==null)return \"\";\r\n\tif(oForm.elements==null)return \"\";\r\n\tif(oForm.elements.length==null)return \"\";\r\n\t//-- create url\r\n\tvar arrElements = new Array();\r\n\tvar strURL = \"\";\r\n\tvar oEle;\r\n\tfor(i=0; i<oForm.elements.length; i++)\r\n\t{\r\n\t\tif(strURL != \"\")strURL += \"&\";\r\n\t\toEle=oForm.elements[i];\r\n\t\tvar strID = oEle.id;\r\n\t\t\r\n\t\tif(strID !=\"\")\r\n\t\t{\r\n\t\t\tvar useID = strID;\r\n\t\t\tif(arrElements[strID])\r\n\t\t\t{\r\n\t\t\t\t//-- element is part of a control group so make __elementid\r\n\t\t\t\tuseID = strID + \"__\" + arrElements[strID];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tarrElements[strID] = 0;\r\n\t\t\t}\r\n\r\n\t\t\t//-- see if we have a dbvalue\r\n\t\t\tstrValue = getEleValue(oEle);\r\n\t\t\tif((oEle.className=='mandatory')&&(strValue==\"\"))\r\n\t\t\t{\r\n\t\t\t\tvar strDisplayName = oEle.getAttribute('displayname');\r\n\t\t\t\talert(\"The field [\" + strDisplayName + \"] is mandatory and requires your input.\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\t\t\t\r\n\r\n\t\t\tstrURL+=useID + \"=\" + encodeURIComponent(strValue);\r\n\t\t\tarrElements[strID]++;\r\n\t\t}\r\n\t}\r\n\treturn strURL;\r\n\t\r\n}", "function getFormValuesObject() {\n let valuesString = getLocal(currentMode, \"FormValues\");\n if (!valuesString) {\n return {};\n }\n \n try {\n return JSON.parse(valuesString);\n } catch (err) {\n return {};\n }\n}", "function form2Array(form_name) {\n var form_array = {};\n $('form :input[name^=\"' + form_name + '[\"]').each(function (id, object) {\n // INPUT name is in the form of \"form_name[value]\", get value only\n form_array[$(this).attr('name').substr(form_name.length + 1, $(this).attr('name').length - form_name.length - 2)] = $(this).val();\n });\n return form_array;\n}", "function showformValues(form){\n\tvar formValues = $(form).serializeArray(); \n\t\n\t\t\n\t$.each(formValues, function(index, field){\n\t\t$(\"#results\").find(\"#\"+field.name+\"_result\").text(field.value);\n\n\t\t// special check for email to add a link instead of just string\n\t\tif(field.name==\"email\"){\n\t\t\t$(\"#results\").find(\"#\"+field.name+\"_result\").attr(\"href\", \"mailto:\"+field.value);\n\t\t}\n\t});\t\t\t\t\n}", "function getFormData() {\n var elements = document.getElementById(\"gform\").elements; // all form elements\n var fields = Object.keys(elements).map(function (k) {\n if (elements[k].name !== undefined) {\n return elements[k].name;\n // special case for Edge's html collection\n } else if (elements[k].length > 0) {\n return elements[k].item(0).name;\n }\n }).filter(function (item, pos, self) {\n return self.indexOf(item) == pos && item;\n });\n var data = {};\n fields.forEach(function (k) {\n data[k] = elements[k].value;\n var str = \"\"; // declare empty string outside of loop to allow\n // it to be appended to for each item in the loop\n if (elements[k].type === \"checkbox\") { // special case for Edge's html collection\n str = str + elements[k].checked + \", \"; // take the string and append \n // the current checked value to \n // the end of it, along with \n // a comma and a space\n data[k] = str.slice(0, -2); // remove the last comma and space \n // from the string to make the output \n // prettier in the spreadsheet\n } else if (elements[k].length) {\n for (var i = 0; i < elements[k].length; i++) {\n if (elements[k].item(i).checked) {\n str = str + elements[k].item(i).value + \", \"; // same as above\n data[k] = str.slice(0, -2);\n }\n }\n }\n });\n console.log(data);\n return data;\n}", "function getFormData(form) {\n var data = {};\n $(form).find('input, select').each(function() {\n if (this.tagName.toLowerCase() == 'input') {\n if (this.type.toLowerCase() == 'checkbox') {\n data[this.name] = this.checked;\n } else if (this.type.toLowerCase() != 'submit') {\n data[this.name] = this.value;\n }\n } else {\n data[this.name] = this.value;\n }\n });\n return data;\n}", "function getFormData($form) {\n var unindexed_array = $form.serializeArray();\n var indexed_array = {};\n\n $.map(unindexed_array, function (n, i) {\n indexed_array[n['name']] = n['value'];\n });\n\n return indexed_array;\n}", "function getPostArgs(t) {\n var ts = t.parentNode.parentNode.parentNode.getElementsByTagName(\"input\")\n var o = {}\n\n for (var i = 0; i < ts.length; i++)\n if (ts[i].type === \"hidden\") o[ts[i].name] = ts[i].value\n\n o[\"sd\"] = '1'\n\n return o\n}", "function getDataForm(form) {\n var $form = $(form);\n var formData = {\n firstName: $form.find('input[name=\"firstName\"]').val(),\n lastName: $form.find('input[name=\"lastName\"]').val(),\n email: $form.find('input[name=\"email\"]').val(),\n password: $form.find('input[name=\"password\"]').val(),\n password_again: $form.find('input[name=\"password_again\"]').val(),\n institution: $form.find('input[name=\"institution\"]').val(),\n country: $form.find('select[name=\"country\"]').val(),\n occupation: $form.find('input[name=\"occupation\"]').val(),\n interest: $form.find('textarea[name=\"interest\"]').val()\n };\n return formData;\n}", "getParams() {\n const params = {};\n // Get the values for each parameter\n for (let param of this.operation.params) {\n let id = param.id\n params[id] = document.getElementById(id).value;\n }\n return params;\n }", "function getFormData(form){\r\n\tvar obj=form.serializeArray(),result=new Array();\r\n\tresult['options']=new Array();\r\n\tresult['ays']=new Array();\r\n\t$.each(obj, function(i, p) {\r\n\t\tvar reg=/(.*)\\[(.*)\\]/g,found = reg.exec( p.name ); \r\n\t\tif(found)\r\n\t\t\tresult[found[1]][found[2]]=p.value; else\r\n\t\tresult[p.name]=p.value;\r\n\t});\r\n\t\r\n\treturn result;\r\n}", "function getValuesFromForm(form) {\n var email = form.email,\n gender = form.gender,\n country = form.country,\n note = form.note,\n ssId =\n '0Amdsdq7IKB9ydExEanFqMm5ocmRSMndyRmFOeTgxckE',\n ss = SpreadsheetApp.openById(ssId),\n shName = 'Feedback',\n sheet = ss.getSheetByName(shName);\n sheet.appendRow([email,\n gender,\n country,\n note]);\n}", "getFormData(form) {\n var elements = form.elements;\n\n var fields = Object.keys(elements).filter(function (k) {\n return (elements[k].name !== '_honeypot');\n }).map(function (k) {\n if (elements[k].name !== undefined) {\n return elements[k].name;\n // special case for Edge's html collection\n } else if (elements[k].length > 0) {\n return elements[k].item(0).name;\n }\n }).filter(function (item, pos, self) {\n return self.indexOf(item) === pos && item;\n });\n\n var formData = {};\n fields.forEach(function (name) {\n var element = elements[name];\n\n formData[name] = element.value;\n\n // when our element has multiple items, get their values\n if (element.length) {\n var data = [];\n for (var i = 0; i < element.length; i++) {\n var item = element.item(i);\n if (item.checked || item.selected) {\n data.push(item.value);\n }\n }\n formData[name] = data.join(', ');\n }\n });\n\n // add form-specific values into the data\n formData.formDataNameOrder = JSON.stringify(fields);\n formData.formGoogleSheetName = form.dataset.sheet || 'responses';\n formData.formGoogleSendEmail = form.dataset.email || '';\n\n return formData;\n }", "function getFormHandleForm(seq)\n{\nvar name = 'iiiFormHandle_' + seq;\nvar obj = getObj(name);\nreturn obj.form;\n}", "function getFormData(form) {\n const email = form.querySelector(\"#email\");\n const msg = form.querySelector(\"#message\");\n return { email: email.value, msg: msg.value };\n }", "function getFormValues() {\n const storedValues = localStorage.getItem(\"emission_key\");\n if (!storedValues)\n return {\n totalCarbon: 0,\n transportTotal: 0,\n vehicleType: 0,\n cabinClass: 0,\n airDistance: 0,\n transportMethod: 0,\n transportType: 0,\n pubDistance: 0,\n\n // TEST INPUT FOR CALC TYPE -- will implement all once client provides us with calculation data...\n ADVANCED_INPUT: 0,\n\n electricityTotal: 0,\n consumption: 0,\n\n gasTotal: 0,\n lpgConsumption: 0,\n gasConsumption: 0,\n unitOfMeasurement: 0,\n stateOrTerritory: 0,\n\n wasteTotal: 0,\n wasteType: 0,\n wasteWeight: 0,\n\n waterTotal: 0,\n waterUtilityLocation: 0,\n\n paperTotal: 0,\n source: 0,\n paperType: 0,\n paperWeight: 0,\n\n foodAndDrinkTotal: 0,\n foodType: 0,\n expenditure: 0,\n\n eventsTotal: 0,\n totalAccommodation: 0,\n totalMeals: 0,\n totalDrinks: 0,\n totalEventProducts: 0,\n };\n\n return JSON.parse(storedValues);\n }" ]
[ "0.8115061", "0.7739999", "0.7729837", "0.7690455", "0.7588425", "0.7514238", "0.7499329", "0.7498871", "0.74585134", "0.74411017", "0.7435742", "0.7373737", "0.7328542", "0.73269343", "0.7287043", "0.72496235", "0.71228313", "0.7111757", "0.71078146", "0.7081316", "0.7077044", "0.7023775", "0.6970929", "0.6955117", "0.69528204", "0.69496804", "0.6913327", "0.68565357", "0.68318033", "0.6807553", "0.6794219", "0.67733914", "0.6768899", "0.6756408", "0.67498195", "0.6738987", "0.66990197", "0.66857624", "0.6685462", "0.6656134", "0.6646025", "0.6626096", "0.6612127", "0.66063654", "0.65982294", "0.65797806", "0.6573124", "0.65628785", "0.6541418", "0.65233874", "0.6502097", "0.6484438", "0.647949", "0.64744467", "0.6461116", "0.6456739", "0.64413", "0.6437848", "0.6434704", "0.6420115", "0.6405988", "0.6404132", "0.6402316", "0.6396801", "0.6382716", "0.63808453", "0.6376034", "0.6362212", "0.6358222", "0.63547957", "0.6348479", "0.63419557", "0.63258475", "0.6321542", "0.631071", "0.6306701", "0.6294901", "0.6276433", "0.6260521", "0.62593305", "0.625418", "0.6240745", "0.6237901", "0.6226907", "0.622099", "0.6220194", "0.62179554", "0.6195877", "0.6194805", "0.6191782", "0.61839265", "0.6170243", "0.61639076", "0.61552477", "0.6154514", "0.6137228", "0.6135621", "0.6129929", "0.6128038", "0.61238956", "0.6119547" ]
0.0
-1
save messages to firebase
function saveMessage(name, email, message) { var newMessageRef = messageRef.push(); newMessageRef.set({ name: name, email: email, message: message }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveMessages(name,email,phone,message, fecha){\n var newMessagesRef=messageRef.push();\n newMessagesRef.set({\n name: name,\n email: email,\n phone: phone,\n message: message,\n fecha : fecha\n })\n \n \n}", "function saveMessage(firstname, lastname, email, phone, message){\r\nvar newMessageRef = messagesRef.push();\r\nnewMessageRef.set({\r\n firstname: firstname,\r\n lastname: lastname,\r\n email:email,\r\n phone:phone,\r\n message:message\r\n});\r\n}", "function saveMessage(name, email, phone, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n phone:phone,\n message: message\n\n });\n\n\n}", "function saveMessage(type,name,age,sex,bloodGroup,state,district,email, phone,address){\r\n\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n type:type,\r\n name: name,\r\n age:age,\r\n sex:sex,\r\n bloodGroup:bloodGroup,\r\n state:state,\r\n district:district,\r\n email:email,\r\n phone:phone,\r\n address:address\r\n });\r\n\r\n // firebasenew.initializeApp(firebaseConfig2);\r\n \r\n // Reference messages collection\r\n var messagesReftweets = firebase.database().ref('tweets');\r\n\r\n var msg= \"@BloodAid @BloodDonorsIn Urgent need of \"+bloodGroup+\" plasma for\"+\" Patient-\"+name +\" \"+sex+\" \"+age+\" \"+\" at \"+\" \"+district+\" \"+state+\" Contact: \"+phone +\" \"+email+\" at \"+address\r\n \r\n datatweet={\r\n message:msg,\r\n type:\"plasma request\",\r\n tweetstatus:\"0\"\r\n }\r\n messagesReftweets.push(datatweet)\r\n\r\n results() ;\r\n // patient_mail_sending(name,age,sex,bloodGroup,state,district,email, phone,address);\r\n }", "function saveMessage(appid,name,dob,gname,prclass,schooltype,bsid,regID,meet){\r\n /*\r\n var newMessageRef = messagesRef.push();\r\n MessageRef.set({\r\n */\r\n firebase.database().ref('vtoix2023/' + appid).update({\r\nappid:appid.toString(),\r\nname:name,\r\ndob:dob,\r\ngname:gname,\r\nprclass:prclass,\r\nschooltype:schooltype,\r\nbsid:bsid,\r\nregID:regID,\r\nacyear:\"2023\",\r\nmeet:meet\r\n });\r\n}", "function saveMessage(name, subject, phone, email, message){\nvar newMessageRef = messagesRef.push();\nnewMessageRef.set({\n name: name,\n subject: subject,\n phone: phone,\n email: email,\n message: message,\n});\n}", "function saveMessage(name, email, topic, movie, message){\n messagesRef.collection(\"messages\").add({\n name: name,\n email: email,\n topic: topic,\n movie: movie,\n message: message,\n timestamp: firebase.firestore.FieldValue.serverTimestamp(),\n }).then(function (docRef){\n console.log(\"Contact Us message written with ID:\",docRef.id);\n }).catch(function (error){\n console.error(\"Error sending your message\",error);\n });\n\n\n \n}", "function saveMessage(nombre, email, asunto, mensaje){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n nombre: nombre,\n email:email,\n asunto:asunto,\n mensaje:mensaje\n });\n}", "function saveMessage(msg){\n const result = messageRef.push().set(msg);\n console.log(result);\n}", "function saveMessage(userId, fstName, lstName, phone, currency){\n firebase.database().ref('Users/' + userId).set({\n firstName: fstName,\n lastName: lstName,\n phone: phone,\n currency: currency\n });\n\n console.log(\"Sent\");\n\n}", "function saveMessage(fname, lname, age, gender, phone, email, desc) {\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n fname: fname,\r\n lname: lname,\r\n age: age,\r\n gender: gender,\r\n phone: phone,\r\n email: email,\r\n desc: desc\r\n });\r\n}", "function saveMessage(name, email, message){\n messagesRef.collection(\"messages\").add({\n name: name,\n email: email,\n message: message,\n timestamp: firebase.firestore.FieldValue.serverTimestamp(),\n }).then(function (docRef){\n console.log(\"Your message has been sent and will be replied soon!ID:\",docRef.id);\n }).catch(function (error){\n console.error(\"Error sending your message\",error);\n });\n\n\n \n}", "function saveMessage() {\r\n var messageText=document.querySelector('#messages').value;\r\n // Add a new message entry to the database.\r\n return firebase.firestore().collection('messages').add({\r\n name: getUserName(),\r\n text: messageText,\r\n timestamp: firebase.firestore.FieldValue.serverTimestamp()\r\n }).catch(function(error) {\r\n console.error('Error writing new message to database', error);\r\n });\r\n}", "function saveMessage(messageObj) {\n\n /// make the push ready....\n var message = messageRef.push();\n message.set(messageObj);\n}", "function saveMessage(name,email,phone,track){\r\n var newMessageRef= messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n email: email,\r\n phone: phone,\r\n track: track } );\r\n}", "function saveMessage(type,name,age,email, phone){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n type:type,\n name: name,\n age:age,\n email:email,\n phone:phone,\n \n });\n\n}", "function saveMessage(name, email, boulderName, grade, location, date, details){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n boulderName: boulderName,\n grade: grade,\n location: location,\n date: date,\n details: details,\n\n });\n\n}", "function saveMessage(name, email, phone, message){\r\n\tvar newMessagesRef = messagesRef.push();\r\n\tnewMessagesRef.set({\r\n\t\tname: name,\r\n\t\temail: email,\r\n\t\tphone: phone,\r\n\t\tmessage: message\r\n\t});\r\n}", "function saveMessage(name, email, phone){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email:email,\n phone:phone\n });\n }", "function saveMessage(name,company,email,phone,message){\n const newMessageRef = messageRef.push();\n newMessageRef.set({\n name:name,\n company:company,\n email:email,\n phone:phone,\n message:message\n });\n}", "function saveMessage(name, email, phone, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email:email,\n phone:phone,\n message:message\n });\n }", "function saveMessage(name, phone, email, altphone, degree, experience, role){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n phone:phone,\n email:email,\n altphone:altphone,\n degree:degree,\n experience:experience,\n role:role\n });\n}", "function saveMessage(name, company, email, phone, message){\n let newMessageRef = messageRef.push();\n newMessageRef.set({\n name: name,\n company: company,\n email: email, \n phone: phone, \n message: message\n })\n}", "function saveMessages(name, company, email, phone, message) {\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n company: company,\n email: email,\n phone: phone,\n message: message\n })\n}", "function saveMessage( username,password){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n username:username,\n password: password\n });\n}", "function saveMessage(email) {\n var newMessageref = messageRef.push();\n newMessageref.set({\n email: email\n })\n\n}", "function saveMessage(email,password,message){\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n email:email,\r\n password:password,\r\n message:message,\r\n });\r\n }", "saveMessage(name, email, message) {\n var newMessageRef = this.messageRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n message: message\n })\n }", "function sendData() {\r\n var key = firebase.database().ref(`messages`).push().key;\r\n let obj = {\r\n key: key,\r\n sender: name,\r\n msg: input.value,\r\n msgTime: time,\r\n };\r\n firebase.database().ref(`messages/${key}`).set(obj);\r\n input.value = \"\";\r\n}", "function saveMessage(name, company, email, phone, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n company:company,\n email:email,\n phone:phone,\n message:message\n });\n}", "function saveMessage(name, company, email, phone, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n company:company,\n email:email,\n phone:phone,\n message:message\n });\n}", "function saveMessage(age,name,email, phone,to,from,dep,ret,pass){\r\n var newMessageRef = messagesR.push();\r\n newMessageRef.set({\r\n age:age,\r\n name: name,\r\n email:email,\r\n phone:phone,\r\n to:to,\r\n from:from,\r\n dep:dep,\r\n ret:ret,\r\n pass:pass\r\n });\r\n}", "function saveMessage(name, message, email){\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n message: message,\r\n email: email,\r\n });\r\n}", "function saveMessage(color, rng1, rng2, limit){\n\n var database = firebase.database();\n var newMessageRef = messagesRef.push();\n\nfirebase.database().ref('User Settings').update({\n color: color,\n rng1:rng1,\n rng2:rng2,\n limit:limit\n \n\n});\n\n\n}", "function saveMessage(userid, password) {\r\n var newMessageRef = messageRef.push();\r\n newMessageRef.set({\r\n userid: userid,\r\n password: password,\r\n });\r\n}", "function saveMessage(name, email, zipcode, phone, password){\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n email: email,\r\n zipcode: zipcode,\r\n phone: phone,\r\n password: password\r\n });\r\n}", "function savemessage(name,phone,email,subject,message){\r\n var newmessageref=messagesref.push();\r\n newmessageref.set({\r\n\r\n name: name,\r\n phone:phone,\r\n email: email,\r\n subject:subject,\r\n message:message\r\n\r\n\r\n\r\n\r\n \r\n })\r\n}", "function saveMessage(name, email, phone, message) {\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n phone: phone,\n message: message\n });\n}", "function saveMessage(utilisateur, telephoneClient, mailClient, messageClient) {\n let newMessageRef = messagesRef.push();\n newMessageRef.set({\n utilisateur : utilisateur,\n telephoneClient : telephoneClient,\n mailClient : mailClient,\n messageClient : messageClient\n });\n}", "function saveMessage(title, ingredients, steps) {\n //var newMessageRef = formMessage.push();\n\n var formMessage = firebase.database().ref(\"Recipes\");\n\n formMessage.push({\n Title: title,\n\n Ingredients: ingredients,\n\n Steps: steps\n });\n}", "function saveMessage(name, company, email, phone, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n company: company,\n email: email,\n phone: phone,\n message: message\n });\n}", "function saveMessage(name, dob, disease, cost, doa, message){\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n dob:dob,\r\n disease:disease,\r\n cost:cost,\r\n doa:doa,\r\n message:message\r\n });\r\n}", "function saveMessage(fname, lname, emailid, name, address, postalcode, medno, phno, govlic) {\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n fname: fname,\n lname: lname,\n emailid: emailid,\n name: name,\n address: address,\n postalcode: postalcode,\n medno: medno,\n phno: phno,\n govlic: govlic\n });\n}", "function saveMessage(name,email,subject,message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n\temail: email,\n\tsubject: subject,\n message:message\n });\n}", "function saveMessage(namect, selectct, emailct, numberct)\r\n{\r\n var newMessageRef=messagesRef.push();\r\n newMessageRef.set(\r\n {namect:namect,\r\n selectct:selectct,\r\n emailct:emailct, \r\n numberct:numberct\r\n });\r\n \r\n}", "function saveMessage(messageText) {\n // Add a new message entry to the Firebase database.\n return firebase.firestore().collection('messages').add({\n name: getUserName(),\n title: ,//get title placeholder value\n text: messageText,\n profilePicUrl: getProfilePicUrl(),\n timestamp: firebase.firestore.FieldValue.serverTimestamp(),\n tag_id: , //get tag id for the same\n \n }).catch(function(error) {\n console.error('Error writing new message to Firebase Database', error);\n });\n}", "function saveMessage (name,email,phone,message){\n db.collection('messages').add({\n name: name,\n email:email,\n phone: phone,\n message:message\n })\n}", "function savedata(){\n var message = messageField.value;\n\n messagesRef.push({fieldName:'messageField', text:message});\n messageField.value = '';\n }", "function saveMessage(name, lastName, email, phone, message, password, confirm_password) { \n var verifyUser = firebase.auth().createUserWithEmailAndPassword(email, password); \n verifyUser.then(data => {\n const { uid } = data.user;\n var messageRef2 = firebase.database().ref(`message/${uid}`); \n var newMessageRef = messageRef2.push()\n newMessageRef.set({\n name: name,\n lastName: lastName,\n email: email,\n confirm_password: confirm_password,\n phone: phone,\n message: message\n }).then((data) => {\n console.log('dta', data);\n });\n })\n}", "function saveMessage(message) {\n db\n .collection('messages') //In which collection the message will be saved\n .add({ //Method add() create a new document into the collection\n message,\n timestamp: firebase.firestore.Timestamp.now()\n })\n .then(function() { // .then() is when the promise is resolved\n console.log(\"Mensaje agregado a la DB\")\n messageInput.value = '' // Clear input after the message is saved in the DB\n })\n .catch(function(error) { // If the promise fails (rejected)\n console.log(\"Algo falló al guardar mensaje\")\n console.log(\"Error\", error)\n });\n}", "function saveMessage(name, numberOfRooms, email, phone, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n numberOfRooms: numberOfRooms,\n email: email,\n phone: phone,\n message: message\n });\n}", "function saveMessage(name, email, comment){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name:name,\n email:email,\n comment:comment, \n }); \n}", "function saveMessage(name, email, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email:email,\n message:message\n });\n}", "function saveMessage(name, email, message) {\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n email: email,\r\n message: message\r\n });\r\n}", "function saveMessage(name, email, phone, message) {\n\tvar newMessageRef = messagesRef.push();\n\tnewMessageRef.set({\n\t\tname: name,\n\t\temail: email,\n\t\tphone: phone,\n\t\tmessage: message\n\t})\n}", "function saveMessage(name, email, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n message: message\n });\n}", "function saveMessage(name, phone, message) {\n let newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n phone: phone,\n message: message,\n });\n}", "function saveMessage(name, email, message){\n var newMessageRef = messageRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n message: message\n })\n}", "function saveMessage(name, email, subject, message){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n subject: subject,\n message: message\n });\n}", "function saveMessage(data) {\n db.collection(\"messages\")\n .add(data)\n .then((docRef) => {\n console.log(\"Document written with ID: \", docRef.id);\n })\n .catch((error) => {\n console.error(\"Error adding document: \", error);\n });\n}", "function saveMessage(name, email, phone, note) {\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n phone: phone,\n note: note\n });\n }", "function saveMessage(name, title, company, email, attend, questions) {\n let newMessageRef = messageRef.push();\n newMessageRef.set({\n name: name,\n title: title,\n company: company,\n email: email,\n attend: attend,\n questions: questions\n });\n}", "function saveMessage(name,email,message){\n\tvar newMessageRef = messagesRef.push();\n\tnewMessageRef.set({\n\t\tname:name,\n\t\temail:email,\n\t\tmessage:message\n\t});\n}", "function saveMessage(name, email, phone, comments) {\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n phone: phone,\n comments: comments\n });\n}", "function saveMessage(name, Description,password){\n var newMessageRef = userRef.push();\n newMessageRef.set({\n name: name,\n Description:Descwription,\n password:password,\n \n \n }\n );\n \n }", "function saveMessage(name, email, contact, message){\n var newMessageRef = messageRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n contact: contact,\n message: message\n });\n}", "function saveMessage1(mailNewsLetter) {\n let newMessageRef1 = messagesRef1.push();\n newMessageRef1.set({\n mailNewsLetter : mailNewsLetter\n });\n}", "function saveMessage(name, email, subject, message){\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n email: email,\r\n subject: subject,\r\n message: message\r\n });\r\n }", "function saveMessage() {\n console.log('SaveMessage function');\n // e.preventDefault();\n // Check that the user entered a message and is signed in.\n if (checkSignedInWithMessage()) {\n var auth = firebase.auth();\n var currentUser = auth.currentUser;\n var studentname = document.getElementById('studentname');\n var admissionnumber = document.getElementById('admissionnumber');\n var e = document.getElementById(\"schools-select\");\n var selectedbankcode = e.options[e.selectedIndex].value;\n var selectedschool = e.options[e.selectedIndex].text;\n // Add a new message entry to the Firebase Database.\n //firebase.database().ref('students/' + currentUser.uid + \"/\" + admissionnumber.value).set({\n // stundent_name: studentname.value,\n //student_admision_number: admissionnumber.value,\n // bank_transfer_code: selectedbankcode\n //});\n \n // A post entry.\n var postData = {\n stundent_name: studentname.value,\n student_admision_number: admissionnumber.value,\n school: selectedschool,\n bank_transfer_code: selectedbankcode\n };\n\n // Get a key for a new Post.\n var newPostKey = firebase.database().ref().child('students').push().key;\n\n // Write the new post's data simultaneously in the posts list and the user's post list.\n // Write the new post's data simultaneously in the posts list and the user's post list.\n var updates = {};\n //updates['/posts/' + newPostKey] = postData;\n updates['/students/' + currentUser.uid + '/' + newPostKey] = postData;\n\n return firebase.database().ref().update(updates);\n\n\n\n\n\n \n /*this.messagesRef.push({\n name: currentUser.email,\n stundent_name: this.studentname,\n student_admision_number: this.admissionnumber,\n bank_transfer_code: this.selectedbankcode\n //text: this.messageInput.value,\n //photoUrl: currentUser.photoURL || '/images/profile_placeholder.png'\n }).then(function() {\n // Clear message text field and SEND button state.\n //FriendlyChat.resetMaterialTextfield(this.messageInput);\n //this.toggleButton();\n }.bind(this)).catch(function(error) {\n console.error('Error writing new message to Firebase Database', error);\n });*/\n }\n }", "function saveMessage(data_structure) {\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n first_name: data_structure[0],\n last_name: data_structure[1],\n email: data_structure[2],\n gender: data_structure[3]\n });\n}", "function saveMessage(name, subject, email, message) {\r\n let newMessage = messageRef.push();\r\n \r\n newMessage.set({\r\n name: name,\r\n subject: subject,\r\n email: email,\r\n message: message\r\n });\r\n}", "function saveMessage(name, email, message) {\n var newMessageRef = messageRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n message: message\n });\n}", "function SaveMessage(PatientName,MobileNumber,EmailId,Address){\n var newMessageRef= messagesRef.push();\n newMessageRef.set({\n PatientName: PatientName,\n MobileNumber:MobileNumber,\n EmailId:EmailId,\n Address:Address\n });\n}", "function saveMessage(name, company, email, phone, message) {\n\tvar newMessageRef = messagesRef.push();\n\tnewMessageRef.set({\n\t\tname: name,\n\t\tcompany: company,\n\t\temail: email,\n\t\tphone: phone,\n\t\tmessage: message\n\t});\n}", "function saveMessage(name, company, email, phone, message) {\n var newMessageRef = messagesReference.push();\n newMessageRef.set({\n name: name,\n company: company,\n email: email,\n phone: phone,\n message: message,\n });\n}", "function send()\r\n {\r\n var me = document.getElementById(\"msg\").value\r\n firebase.database().ref(room_names).push({\r\n msg:me,\r\n noofliks:0,\r\n by:sendby\r\n })\r\n document.getElementById(\"msg\").value = \"\";\r\n }", "function saveMessage(name, need, email, phone, q1, q3, q5, q7, q8){\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n need:need,\r\n email:email,\r\n phone:phone,\r\n q1:q1,\r\n q3:q3,\r\n q5:q5,\r\n q7:q7,\r\n q8:q8\r\n });\r\n }", "function saveMessage(name, email, valid_age, additionalinfo, star_rate) {\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n name: name,\n email: email,\n valid_age: valid_age,\n additionalinfo: additionalinfo,\n star_rate: star_rate\n\n });\n}", "function saveMessage(\n first_name,\n last_name,\n email,\n phone,\n profession,\n state,\n skills,\n gender\n) {\n // Add new document to collection messages\n db.collection('messages')\n .add({\n first_name: first_name,\n last_name: last_name,\n email: email,\n phone: phone,\n profession: profession,\n state: state,\n skills: skills,\n gender: gender\n })\n .then((docRef) => {\n console.log('Document written with ID: ', docRef.id);\n })\n .catch((error) => {\n console.error('Error adding document: ', error);\n });\n}", "function saveMessage(rating){\n var newMessageRef = messageRef.push();\n newMessageRef.set({\n rating: rating\n })\n\n}", "function saveMessage(messageText) {\n // Add a new message entry to the Firebase database.\n return firebase.firestore().collection('group').doc(userGroup).collection(\"messages\").add({\n name: getUserName(),\n text: messageText,\n profilePicUrl: getProfilePicUrl(),\n timestamp: firebase.firestore.FieldValue.serverTimestamp()\n }).catch(function (error) {\n console.error('Error writing new message to Firebase Database', error);\n });\n}", "function saveMessage(name, company, email, phone, message)\n{\n\tvar newMessageRef = messagesRef.push();\n\tnewMessageRef.set(\n\t\t{\n\t\t\tname: name,\n\t\t\tcompany: company,\n\t\t\temail: email,\n\t\t\tphone: phone,\n\t\t\tmessage: message\n\t\t});\n}", "async function saveMessage(messageText) {\n // Add a new message entry to the Firebase database.\n try {\n await addDoc(collection(db, 'spaces', String(getSpaceId()), 'messages'), {\n name: getUserName(),\n text: messageText,\n profilePicUrl: getProfilePicUrl(),\n timestamp: serverTimestamp()\n });\n }\n catch (error) {\n console.error('Error writing new message to Firebase Database', error);\n }\n}", "function saveMessage(name, company, q1, q2, q3, comment){\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n company:company,\r\n q1:q1,\r\n q2:q2,\r\n q3:q3,\r\n comment : comment\r\n });\r\n }", "function saveMessage(name, email,reason,contact) {\r\n var newMessageRef = messagesRef.push();\r\n newMessageRef.set({\r\n name: name,\r\n email: email,\r\n reason: reason,\r\n contact: contact\r\n });\r\n }", "saveMessages () {\n this._context.db.get('clients')\n .find({ id: this.id })\n .assign({\n messages: this.messages.map(msg => { return {\n _telegramMessage: msg._telegramMessage,\n groupMessage: msg.groupMessage\n }})\n })\n .write()\n }", "function saveMessage(messageText) {\n // Add a new message entry to the database.\n return firebase.firestore().collection('messages').add({\n name: getUserName(),\n text: messageText,\n lat: pos_lat,\n lng: pos_lng,\n accuracy: pos_accuracy,\n profilePicUrl: getProfilePicUrl(),\n timestamp: firebase.firestore.FieldValue.serverTimestamp()\n }).catch(function (error) {\n console.error('Error writing new message to database', error);\n });\n}", "sendMessage(message) {\n for (let i = 0; i < message.length; i++) {\n this.messagesRef.push({\n text: message[i].text,\n user: message[i].user,\n createdAt: firebase.database.ServerValue.TIMESTAMP,\n });\n }\n }", "sendMessage(message) {\n for (let i = 0; i < message.length; i++) {\n this.messagesRef.push({\n text: message[i].text,\n user: message[i].user,\n createdAt: firebase.database.ServerValue.TIMESTAMP,\n });\n }\n }", "function sendToFirebase() {\n dataRef.ref().push({\n\n trainName: trainName,\n destination: destination,\n firstTime: firstTime,\n frequency: frequency,\n tMinutesTillTrain: tMinutesTillTrain,\n nextTrainTime: nextTrainTime,\n dateAdded: firebase.database.ServerValue.TIMESTAMP\n });\n }", "function addMessageToDb() {\n const messageRef = database.ref('messages/');\n let messageContent = document.querySelectorAll('input.message-type-area')[0].value;\n let Message = {\n receiver: ownerKey,\n senderKey: currentUser,\n senderName: senderName,\n content: messageContent,\n date: datetime\n }\n messageRef.push(Message);\n window.location.replace('#/student-listview');\n }", "function firebasePush() {\n\n\n //prevents from braking\n if (!firebase.apps.length) {\n firebase.initializeApp(config);\n }\n\n //push itself\n var mailsRef = firebase.database().ref('emails').push().set(\n {\n Name: Name.value,\n Email: Email.value,\n Message: Message.value\n }\n );\n success();\n}", "enviarMensaje() {\n if (this.mensajes.msg != \"\" && this.mensajes.para != \"\") {\n firebaseDB\n .ref(\"/chat\")\n .push({\n De: appChat.mensajes.de,\n Para: appChat.mensajes.para,\n Mensaje: appChat.mensajes.msg,\n })\n .then((this.mensajes.msg = \"\"));\n }\n }", "function saveMessage(issue,qrCode){\n var newMessageRef = messagesRef.push();\n newMessageRef.set({\n theIssue:issue,\n qrCode:qrCode,\n dateAndTime:date\n });\n }", "async function saveMessage(msg) {\n const db = firebase.firestore();\n const roomDocument = db.collection(\"rooms\").doc(roomID.value);\n await roomDocument.update({\n messages: firebase.firestore.FieldValue.arrayUnion(msg),\n });\n }", "function sendMessage(){\n const currentUser = firebase.auth().currentUser;\n const messageAreaText = messageArea.value;\n\n // para obtener una nueva llave en la coleccion message\n const newMessageKey = firebase.database().ref().child(`messages`).push().key;\n\n firebase.database().ref(`messages/${newMessageKey}`).set({\n creator : currentUser.uid,\n creatorName : currentUser.email || currentUser.displayName,\n text : messageAreaText\n });\n}", "function saveMessage(suggemail, suggname, suggmessage, dateTime) {\n\t\tvar newsuggMessageRef = suggmessagesRef.push();\n\t\tnewsuggMessageRef.set({\n\t\t\tName: suggname,\n\t\t\tEmail: suggemail,\n\t\t\tMessage: suggmessage,\n\t\t\tDate: dateTime\n\t\t});\n\t}", "function firebasePush() {\n\n\n //prevents from braking\n if (!firebase.apps.length) {\n firebase.initializeApp(config);\n }\n\n //push itself\n var mailsRef = firebase.database().ref('emails').push().set(\n {\n Name: Name.value,\n Email: Email.value,\n Message: Message.value\n\n }\n );\n}", "async saveMessages() {\n try {\n await AsyncStorage.setItem(\n 'messages',\n JSON.stringify(this.state.messages)\n );\n } catch (error) {\n console.log(error.message);\n }\n }", "function saveMessage(messageText,tagName) {\n // Add a new message entry to the database.\n return firebase.firestore().collection(tagName).add({\n name: getUserName(),\n text: messageText,\n profilePicUrl: getProfilePicUrl(),\n timestamp: firebase.firestore.FieldValue.serverTimestamp()\n }).catch(function(error) {\n console.error('Error writing new message to database', error);\n });\n}" ]
[ "0.7946064", "0.7919147", "0.787037", "0.7861598", "0.78244805", "0.78002125", "0.7796876", "0.77646154", "0.77426314", "0.7739127", "0.77224004", "0.7711819", "0.76604503", "0.7632143", "0.76304954", "0.7626349", "0.76042545", "0.76006633", "0.75826246", "0.7579342", "0.75683147", "0.75483644", "0.7534253", "0.74979746", "0.74952894", "0.74920094", "0.7490788", "0.74887025", "0.74874276", "0.74858785", "0.74858785", "0.7471983", "0.7471591", "0.7470792", "0.74689186", "0.7455975", "0.7447908", "0.7437764", "0.7429835", "0.742552", "0.7419943", "0.7416277", "0.7410597", "0.7408047", "0.74061155", "0.7405831", "0.74049133", "0.74026483", "0.7399553", "0.73961437", "0.739343", "0.73732674", "0.73695314", "0.73422986", "0.73249114", "0.7323697", "0.7321694", "0.7307889", "0.7281413", "0.72742313", "0.7270134", "0.72676444", "0.7235528", "0.7234331", "0.7225989", "0.7223996", "0.7216072", "0.7196097", "0.71802664", "0.7160471", "0.71539015", "0.7152288", "0.7141232", "0.71212494", "0.71208274", "0.71151286", "0.7088799", "0.70703804", "0.70672256", "0.7042082", "0.70270765", "0.7005003", "0.6988528", "0.6977636", "0.6972872", "0.6953161", "0.69507396", "0.69423753", "0.69423753", "0.6928652", "0.6885146", "0.6818758", "0.68168426", "0.68165195", "0.6811025", "0.68102765", "0.6802165", "0.6782875", "0.67631984", "0.6754074" ]
0.71750194
69
These functions calculate the lesion area, maximum depth, lesion width at 0%, 50%, and 95% of maximum depth, and the length of the affected surface. The input parameters are a pair of points defining the medial tibial plateau, a set of points defining the border of the lesion, and a pair of points defining the surface of the lesion. helper function to create new coordinate system
function translate (slope, x0, y0, points){ // defines each point relative to the line with a given slope passing through (x0,y0) var closest_points = []; // closest points along surface line var leftmost_point = []; var leftmost_x = 10000000; // arbitrarily large number for (var i = 0; i < points.length; i++){ var current_point = points[i]; var distance = Math.abs(-slope*current_point[0] + current_point[1] + slope*x0 - y0) / Math.sqrt(slope*slope + 1); var x = (current_point[0] + slope*current_point[1] + slope*(slope*x0-y0)) / (slope*slope + 1); var y = (-slope*(-current_point[0] - slope*current_point[1]) - slope*x0 + y0) / (slope*slope + 1); closest_points.push([x,y,distance]); if (x < leftmost_x){ leftmost_point = [x,y]; leftmost_x = x; } } // define points on new coordinate system with leftmost point along the surface line as the origin var new_points = []; for (var i = 0; i < closest_points.length; i++){ var new_x = Math.sqrt(Math.pow(closest_points[i][0]-leftmost_point[0], 2) + Math.pow(closest_points[i][1]-leftmost_point[1], 2)); // distance from leftmost point var new_y = -closest_points[i][2]; new_points.push([new_x,new_y]); } return new_points; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateArea(){\n // get all points\n pointObjects = [];\n for(var i=0; i<4; i++){\n pointObjects[i] = stage.getChildByName(\"corner\"+i);\n points[i] = new createjs.Point(pointObjects[i].x, pointObjects[i].y);\n }\n\n // pythagoras to get height\n heightX = Math.abs(points[0].x - points[3].x);\n heightY = Math.abs(points[0].y - points[3].y);\n height = Math.sqrt(Math.pow(heightX, 2) + Math.pow(heightY, 2));\n\n // pythagoras to get width\n widthX = Math.abs(points[2].x - points[3].x);\n widthY = Math.abs(points[2].y - points[3].y);\n width = Math.sqrt(Math.pow(widthX, 2) + Math.pow(widthY, 2));\n\n return Math.round(width * height);\n}", "function elevation(latStation,LonStation,hStation,X_GRASP,Y_GRASP,Z_GRASP,angleLim){\n\t\tconsole.log(\"latStation = \"+latStation);\n\t\tconsole.log(\"LonStation = \"+LonStation);\n\t\tconsole.log(\"hStation = \"+hStation);\n\t\tconsole.log(\"X_GRASP = \"+X_GRASP);\n\t\tconsole.log(\"Y_GRASP = \"+Y_GRASP);\n\t\tconsole.log(\"Z_GRASP = \"+Z_GRASP);\n\t\tconsole.log(\"angleLim = \"+angleLim);\n\t// Definition de l'angle du cone de visibilite du satellite.\n\tvar angleLim=60;\n\t\tconsole.log(\"angleLim = \"+angleLim);\n\t\n\t// Constantes pour l'ellipsoide GRS80\n\tvar a = 6378137;\n\t\tconsole.log(\"a = \"+a);\n\tvar e = Math.sqrt(0.0066943800222);\n\t\tconsole.log(\"e = \"+e);\n\tvar W = Math.sqrt (1-Math.pow(e,2)*Math.pow(Math.sin(latStation),2));\n\t\tconsole.log(\"W = \"+W);\n\tvar N = a/W;\n\t\tconsole.log(\"N = \"+N);\n\t\n\n\t// 1) Passage d'un repere geocentrique a un repere local, de centre le station. \n\n\t// On calcule la matrice de changement de repere pour une station.\n\tvar matriceChangementRepere= Math.matrix([-Math.sin(LonStation),Math.cos(LonStation),0],[-Math.sin(latStation)*Math.cos(LonStation),-Math.sin(latStation)*Math.sin(LonStation),Math.cos(latStation)],[Math.cos(latStation)*Math.cos(LonStation),Math.cos(latStation)*Math.sin(LonStation),Math.sin(latStation)]);\n\t\tconsole.log(\"matriceChangementRepere = \"+matriceChangementRepere);\n\t\n\t// \n\tvar matriceSat= Math.matrix([X_GRASP-N*Math.cos(LonStation)*Math.cos(latStation)],\n\t\t\t\t\t\t\t\t[Y_GRASP-N*Math.sin(LonStation)*Math.cos(latStation)],\n\t\t\t\t\t\t\t\t[Z_GRASP-N*(1-Math.pow(e,2))*Math.sin(latStation)]);\n\t\tconsole.log(\"matriceSat = \"+matriceSat);\n\n\t// On calcule les nouvelles coordonnees du satellite dans le repere local.\n\tvar SatLocal=Math.multiply(matriceChangementRepere,matriceSat);\n\t\tconsole.log(\"Les coordonnees du satellite dans le repere local sont :\"+SatLocal);\n\t\n\t// 2) On calcule la distance separant le satellite de la station.\n\tvar Xlocal=Math.subset(SatLocal, Math.index(1));\n\t\tconsole.log(\"Xlocal = \"+Xlocal);\n\tvar Ylocal=Math.subset(SatLocal, Math.index(2));\n\t\tconsole.log(\"Ylocal = \"+Ylocal);\n\tvar Zlocal=Math.subset(SatLocal, Math.index(3));\n\t\tconsole.log(\"Zlocal = \"+Zlocal);\n\tvar Distance= Math.sqrt(Math.pow(Xlocal,2) + Math.pow(Ylocal,2));\n\t\tconsole.log(\"Distance = \"+Distance);\n\t\n\t// 3) On calcule l'angle (en degres) entre le satellite et la verticale a la station.\n\tvar angleRadian=Math.acos(Zlocal/Distance)*(180/Math.PI);\n\t\tconsole.log(\"angleRadian = \"+angleRadian);\n\t\n\t// 4) Si cet angle est inferieur a l'angle delimitant le cone de visibilite, alors le satellite est visible.\n\tif(angleDegre<angleLim)\n\t{\n\t\tconsole.log(\"angleDegre = \"+angleDegre);\n\t}\n\telse\n\t{\n\t\tconsole.log(\"satellite non visible\");\n\t}\n}", "function area_rectangulo(base,altura){\n return base*altura\n}", "function areaParallelogram(base, height){\n return -1;\n }", "function land_squares(){\r\n\t\tvar land_width = $('#land_wrapper').width();\r\n\t\tvar box_width = Math.floor((land_width - 4*gridN)/gridN);\r\n\t\tvar plant_width = box_width;\r\n\t\r\n\t\t$('.land-box').height(box_width); \r\n\t\t$('.land-box').width(box_width);\r\n\t\t$('.plant-img').height(plant_width);\r\n\t\t$('.plant-img').width(plant_width);\r\n\r\n\t}", "CalculateBoundingBoxParameters() {\n\n\n\n /**\n * Initialize the minimum and the maximum x,y,z components of the bounding box.\n */\n var maxX = Number.MIN_SAFE_INTEGER;\n var maxY = Number.MIN_SAFE_INTEGER;\n var maxZ = Number.MIN_SAFE_INTEGER;\n\n var minX = Number.MAX_SAFE_INTEGER;\n var minY = Number.MAX_SAFE_INTEGER;\n var minZ = Number.MAX_SAFE_INTEGER;\n\n\n\n //Get the children meshes of the tank.\n var children = this.root.getChildren();\n\n\n\n //There are actually 12 childeren meshes.\n\n\n for (var i = 0; i < children.length; i++) {\n\n //The positions are returned in the model reference frame. The positions are stored\n //in the (x,y,z),(x,y,z) fashion.\n var positions = new BABYLON.VertexData.ExtractFromGeometry(children[i]).positions;\n if (!positions) continue;\n\n var index = 0;\n\n\n //Starting from j = 0, in j+3, j+6 .... there are all the x components.\n for (var j = index; j < positions.length; j += 3) {\n if (positions[j] < minX)\n minX = positions[j];\n if (positions[j] > maxX)\n maxX = positions[j];\n }\n\n index = 1;\n //Starting from j = 1, in j+3, j+6 .... there are all the y components.\n for (var j = index; j < positions.length; j += 3) {\n if (positions[j] < minY)\n minY = positions[j];\n if (positions[j] > maxY)\n maxY = positions[j];\n }\n\n //Starting from j = 2, in j+3, j+6 .... there are all the z components.\n index = 2;\n for (var j = index; j < positions.length; j += 3) {\n if (positions[j] < minZ)\n minZ = positions[j];\n if (positions[j] > maxZ)\n maxZ = positions[j];\n\n }\n\n\n /** \n * Take the length of the segment with a simple yet effective mathematical \n * formula: the absolute value of the maximum value - the minimum value for \n * each component.\n */\n\n var _lengthX = Math.abs(maxX - minX);\n var _lengthY = Math.abs(maxY - minY);\n var _lengthZ = Math.abs(maxZ - minZ);\n\n\n\n }\n\n\n\n //Return an object with all the three variables (the dimensions of the bounding box).\n return { lengthX: _lengthX, lengthY: _lengthY, lengthZ: _lengthZ }\n\n\n\n }", "function areaTringulo(base,altura){\n return (base*altura)/2;\n}", "function calculateArea(width, heigth, depth) {\n\tvar area = width * heigth;\n\tvar volume = width * heigth * depth;\n\tvar sizes = [area, volume];\n\treturn sizes;\n}", "function worldAlt(worldX,worldZ){\n if(worldX===undefined){return 0;}\n //console.log(heightMap.length);\n var half=useSize/2;\n var a=0;\n var z=Math.floor(worldZ+half-.5);\n var x=Math.floor(worldX+half-.5);\n //console.log(x+\" \"+z);\n if((x<0)||(x>=useSize-2)||(z<0)||(z>=useSize-2)){return a;}\n var xFrac=(worldX+half-.5)-x; // excursion from nw\n var zFrac=(worldZ+half-.5)-z;\n var xInv=1-xFrac;\n var zInv=1-zFrac;\n var nw=heightMap[x][z];\n var ne=heightMap[x+1][z];\n var sw=heightMap[x][z+1];\n var se=heightMap[x+1][z+1];\n var dnw=Math.sqrt(xFrac*xFrac+zFrac*zFrac);\n var dne=Math.sqrt(xInv*xInv+zFrac*zFrac);\n var dsw=Math.sqrt(xFrac*xFrac+zInv*zInv);\n var dse=Math.sqrt(xInv*xInv+zInv*zInv);\n if(dnw>1){dnw=1};\n if(dne>1){dne=1};\n if(dsw>1){dsw=1};\n if(dse>1){dse=1};\n var cnw=1-dnw;\n var cne=1-dne;\n var csw=1-dsw;\n var cse=1-dse;\n var cSum=cnw+cne+csw+cse;\n a=(nw*(cnw/cSum)+ne*(cne/cSum)+sw*(csw/cSum)+se*(cse/cSum));\n return a;\n}", "function calcArea (){\n //Create variables for W,H,A\n\n var width=20;\n var height=30;\n var area=width*height;\n console.log(\"The area of the recatangle is \" + area + \"sq Feet\");\n}", "place_on_slope(xcord,zcord) {\n var px = xcord % this.grid_spacing;\n var pz = zcord % this.grid_spacing;\n var cell_x = Math.trunc(xcord / this.grid_spacing) % this.grid_size;\n var cell_z = Math.trunc(zcord / this.grid_spacing) % this.grid_size;\n var normal;\n if(px + pz < this.grid_spacing) { //lower triangle\n var l11_index = cell_x + (cell_z+1) * (this.grid_size+1);\n var l12_index = cell_x + cell_z*(this.grid_size+1);\n var l21_index = (cell_x + 1) + cell_z * (this.grid_size+1);\n var l22_index = l12_index;\n normal = vec3.normalize(vec3.cross([this.verts[l21_index*3] - this.verts[l22_index*3],\n this.verts[l21_index*3+1] - this.verts[l22_index*3+1],\n this.verts[l21_index*3+2] - this.verts[l22_index*3+2]],\n [this.verts[l11_index*3] - this.verts[l12_index*3],\n this.verts[l11_index*3+1] - this.verts[l12_index*3+1],\n this.verts[l11_index*3+2] - this.verts[l12_index*3+2]],\n\n new Float32Array(3)\n ), new Float32Array(3)\n )\n } else { //higher triagnle\n var l11_index = (cell_x+1) + cell_z * (this.grid_size+1);\n var l12_index = (cell_x+1) + (cell_z+1)*(this.grid_size+1);\n var l21_index = cell_x + (cell_z+1) * (this.grid_size+1);\n var l22_index = l12_index;\n normal = vec3.normalize(vec3.cross([this.verts[l21_index*3] - this.verts[l22_index*3],\n this.verts[l21_index*3+1] - this.verts[l22_index*3+1],\n this.verts[l21_index*3+2] - this.verts[l22_index*3+2]],\n [this.verts[l11_index*3] - this.verts[l12_index*3],\n this.verts[l11_index*3+1] - this.verts[l12_index*3+1],\n this.verts[l11_index*3+2] - this.verts[l12_index*3+2]],\n\n new Float32Array(3)\n ), new Float32Array(3)\n )\n }\n //don't place on walls\n if(normal[1] <= 0.5) {\n return;\n }\n //find elevation of terrain\n var index = (cell_x + 1) + cell_z * (this.grid_size + 1);\n var ycord = -(((xcord - this.verts[index*3]) * normal[0] +\n (zcord- this.verts[index*3+2]) * normal[2])\n / normal[1]) + this.verts[index*3+1];\n //do not place under water\n if(ycord < 0) {\n return;\n }\n\n //var position = new Float32Array([this.parent.position[0] + xcord,this.parent.position[1] + ycord,this.parent.position[2] + zcord,0]);\n var position = new Float32Array([xcord,ycord,zcord,0]);\n var rotation = quaternion.getRotaionBetweenVectors([0,1,0],normal,new Float32Array(4));\n var model = null;\n if(ycord < 0.5) { //TODO: move measurements to shared place\n model = this.weighted_choice(this.beach_models)\n } else if(ycord < 3.0) {\n model = this.weighted_choice(this.grass_models);\n } else {\n //place less things on hills\n if( Math.random() < 0.75 ) return;\n model = this.weighted_choice(this.hill_models);\n }\n if(model in this.bakers){\n this.bakers[model].addInstance(position, rotation);\n }else{\n var baker = new InstanceBaker(new Float32Array(this.parent.position), new Float32Array(this.parent.rotation),model);\n baker.addInstance(position, rotation);\n this.bakers[model] = baker;\n }\n }", "function createClubShape (width, height) {\n var shape = new THREE.Shape();\n\n var baseWidth = 0.3 * width;\n shape.moveTo(width/2 - baseWidth/2, 0);\n shape.splineThru(\n [\n new THREE.Vector2(width/2.0 - baseWidth/3.0, height/4.0),\n new THREE.Vector2(width/2.0, height/2.0)\n ]\n );\n \n // parameters of the leaves\n const leafWidth = 0.4*width;\n const leafHeight = 0.2*width;\n const branchLength = width/2.0 - leafWidth;\n\n // left leaf\n shape.splineThru(\n [\n new THREE.Vector2(width/2.0 - leafWidth/3.0 - branchLength, height/2.0-leafHeight),\n new THREE.Vector2(width/2.0 - 2.0*leafWidth/3.0 - branchLength, height/2.0-leafHeight),\n new THREE.Vector2(width/2.0 - leafWidth - branchLength, height/2.0),\n new THREE.Vector2(width/2.0 - 2.0*leafWidth/3.0 - branchLength, height/2.0+leafHeight),\n new THREE.Vector2(width/2.0 - leafWidth/3.0 - branchLength, height/2.0+leafHeight),\n new THREE.Vector2(width/2.0 - branchLength, height/2.0),\n new THREE.Vector2(width/2.0, height/2.0)\n ]\n );\n \n // top leaf\n shape.splineThru(\n [\n new THREE.Vector2(width/2.0-leafHeight, height/2.0 + leafWidth/3.0 + branchLength),\n new THREE.Vector2(width/2.0-leafHeight, height/2.0 + 2.0*leafWidth/3.0 + branchLength),\n new THREE.Vector2(width/2.0, height/2.0+leafWidth + branchLength),\n new THREE.Vector2(width/2.0+leafHeight, height/2.0 + 2.0*leafWidth/3.0 + branchLength),\n new THREE.Vector2(width/2.0+leafHeight, height/2.0 + leafWidth/3.0 + branchLength),\n new THREE.Vector2(width/2.0, height/2.0 + branchLength),\n new THREE.Vector2(width/2.0, height/2.0)\n ]\n );\n \n // right leaf\n shape.splineThru(\n [\n new THREE.Vector2(width/2.0 + leafWidth/3.0 + branchLength, height/2.0+leafHeight),\n new THREE.Vector2(width/2.0 + 2.0*leafWidth/3.0 + branchLength, height/2.0+leafHeight),\n new THREE.Vector2(width/2.0 + leafWidth + branchLength, height/2.0),\n new THREE.Vector2(width/2.0 + 2.0*leafWidth/3.0 + branchLength, height/2.0-leafHeight),\n new THREE.Vector2(width/2.0 + leafWidth/3.0 + branchLength, height/2.0-leafHeight),\n new THREE.Vector2(width/2.0 + branchLength, height/2.0),\n new THREE.Vector2(width/2.0, height/2.0)\n ]\n );\n \n shape.lineTo(width/2 + baseWidth/2, 0);\n\n return shape;\n}", "function draw_cei_lamp(gl, n, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, red, green, blue, alpha, u_BoxColor){\r\n let cei_fix_draw = () => {\r\n drawBox(gl, n, 3, 2, 3, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, red, green, blue, alpha, u_BoxColor);\r\n };\r\n let cei_t_stalk_draw = () => {\r\n drawBox(gl, n, 0.5, 6, 0.5, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, red, green, blue, alpha, u_BoxColor);\r\n };\r\n let cei_t_plate_draw = () => {\r\n drawBox(gl, n, 4, 0.5, 4, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, 0.75, 0.75, 0.75, alpha, u_BoxColor)\r\n }\r\n let cei_b_stalk_draw = () => {\r\n drawBox(gl, n, 0.5, 2, 0.5, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, red, green, blue, alpha, u_BoxColor);\r\n };\r\n let cei_bulb_draw = () => {\r\n drawBox(gl, n, 2, 2, 2, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, 0.98, 0.93, 0.64, alpha, u_BoxColor);\r\n };\r\n let cei_lr_plate = () => {\r\n drawBox(gl, n, 0.5, 8, 4, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, 0.46, 0.53, 0.6, 0.6, u_BoxColor);\r\n };\r\n let cei_bf_plate = () => {\r\n drawBox(gl, n, 4, 8, 0.5, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, 0.46, 0.53, 0.6, 0.6, u_BoxColor);\r\n };\r\n\r\n cei_lamp.setDraw(cei_fix_draw);\r\n cei_t_stalk.setDraw(cei_t_stalk_draw);\r\n cei_t_plate.setDraw(cei_t_plate_draw);\r\n cei_b_stalk.setDraw(cei_b_stalk_draw);\r\n cei_bulb.setDraw(cei_bulb_draw);\r\n cei_l_plate.setDraw(cei_lr_plate);\r\n cei_r_plate.setDraw(cei_lr_plate);\r\n cei_b_plate.setDraw(cei_bf_plate);\r\n cei_f_plate.setDraw(cei_bf_plate);\r\n\r\n}", "function createWorld() {\n\taddObject3(500,-200,7000, 1000,-1000,7000, 3000,1500,7000);\n\taddObject3(500,-200,7000, 1000,1000,7000, 3000,1500,7000);\n\taddObject3(500,-200,7000, 1000,1000,7000, 0,0,7000);\n\taddObject3(0,300,7000, 1000,1000,7000, 0,0,7000);\n\taddObject3(0,300,7000, -300,200,7000, 0,0,7000);\n\taddObject3(0,300,7000, -300,200,7000, -500,500,7000);\n\taddObject3(0,300,7000, -300,2000,7000, -500,500,7000);\n\taddObject3(0,300,7000, -300,2000,7000, 1000,1000,7000);\n\taddObject3(-700,0,7000, -300,200,7000, -500,500,7000);\n\taddObject3(-700,0,7000, -2000,2000,7000, -500,500,7000);\n\taddObject3(-700,0,7000, -2000,2000,7000, -800,-200,7000);\n\taddObject3(-700,-2000,7000, -2000,2000,7000, -800,-200,7000);\n\taddObject3(-700,-2000,7000, -400,-200,7000, -800,-200,7000);\n\taddObject3(-700,0,7000, -400,-200,7000, -800,-200,7000);\n\taddObject3(0,0,7000, -400,-200,7000, -100,-400,7000);\n\taddObject3(0,0,7000, 500,-200,7000, -100,-400,7000);\n\taddObject3(-700,-2000,7000, 500,-200,7000, -100,-400,7000);\n\taddObject3(-700,-2000,7000, 500,-200,7000, 1000,-1000,7000);\n\taddObject3(-700,-2000,7000, -400,-200,7000, -100,-400,7000);\n}", "function draw_lamp(gl, n, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, red, green, blue, alpha, u_BoxColor){\r\n let lamp_base = () => {\r\n drawBox(gl, n, 4, 4, 4, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, red, green, blue, alpha, u_BoxColor);\r\n };\r\n let lamp_stand_draw = () => {\r\n drawBox(gl, n, 1, 4, 1, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, 0.15, 0.15, 0.15, 1, u_BoxColor);\r\n };\r\n let lamp_light_draw = () => {\r\n drawBox(gl, n, 4, 1, 4, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, 0.98, 0.93, 0.64, alpha, u_BoxColor);\r\n };\r\n let shade_l1_draw = () => {\r\n drawBox(gl, n, 5, 1, 5, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, 0, 0.81, 0.82, alpha, u_BoxColor);\r\n };\r\n let shade_l2_draw = () => {\r\n drawBox(gl, n, 4, 1, 4, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, 0, 0.81, 0.82, alpha, u_BoxColor);\r\n };\r\n let shade_l3_draw = () => {\r\n drawBox(gl, n, 3, 1, 3, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, 0, 0.81, 0.82, alpha, u_BoxColor);\r\n };\r\n let shade_l4_draw = () => {\r\n drawBox(gl, n, 2, 1, 2, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, 0, 0.81, 0.82, alpha, u_BoxColor);\r\n };\r\n let shade_l5_draw = () => {\r\n drawBox(gl, n, 1, 1, 1, viewProjMatrix, u_MvpMatrix, u_NormalMatrix, 0, 0.81, 0.82, alpha, u_BoxColor);\r\n };\r\n\r\n \r\n lamp.setDraw(lamp_base);\r\n lamp_stand.setDraw(lamp_stand_draw);\r\n lamp_light.setDraw(lamp_light_draw);\r\n shade_l1.setDraw(shade_l1_draw);\r\n shade_l2.setDraw(shade_l2_draw);\r\n shade_l3.setDraw(shade_l3_draw);\r\n shade_l4.setDraw(shade_l4_draw);\r\n shade_l5.setDraw(shade_l5_draw);\r\n}", "function area(l,w,b) {\nvar Areax = l * w * b;\nconsole.log (Areax); \n}", "function areaTriangulo (base,altura){\n\n return (base*altura)/2;\n}", "function draw(construction, window) {\r\n let plan = document.getElementById(\"plan\");\r\n let contextP = plan.getContext(\"2d\");\r\n const DOOR_X = (plan.width * 2) / 3;\r\n const INIT_DOOR_Y = (178 * 3) / 4;\r\n const FIN_DOOR_Y = 178 * 27 * MAGNIFIER;\r\n contextP.clearRect(0, 0, plan.width, 178);\r\n\r\n let elevation = document.getElementById(\"elevation\");\r\n let contextE = elevation.getContext(\"2d\");\r\n contextE.clearRect(0, 0, elevation.width, elevation.height);\r\n\r\n // elevation canvas\r\n // filled wall\r\n contextE.fillStyle = \"#a3bcfd\";\r\n contextE.fillRect(0, 0, elevation.width, elevation.height);\r\n\r\n // elevation door OUTER\r\n contextE.strokeStyle = \"black\";\r\n contextE.strokeRect(\r\n (elevation.width * 2) / 3,\r\n (elevation.height * 3) / 10 + MAGNIFIER,\r\n MAGNIFIER * 3 * 12,\r\n MAGNIFIER * (6 * 12) + 3\r\n );\r\n\r\n // elevation door INNER\r\n contextE.strokeStyle = \"black\";\r\n contextE.strokeRect(\r\n (elevation.width * 2) / 3 + 2 * MAGNIFIER,\r\n (elevation.height * 3) / 10 + 3 * MAGNIFIER,\r\n (MAGNIFIER * 3 * 12 * 9) / 10,\r\n ((MAGNIFIER * (6 * 12) + 3) * 18) / 19\r\n );\r\n\r\n //elevation door-knob\r\n contextE.strokeStyle = \"black\";\r\n contextE.arc(250, 100, 3, 0, 2 * Math.PI);\r\n contextE.stroke();\r\n contextE.closePath();\r\n\r\n // elevation window\r\n if (window >= 4) {\r\n // Outer Window\r\n contextE.strokeStyle = \"black\";\r\n contextE.lineWidth = MAGNIFIER;\r\n contextE.strokeRect(\r\n ((100 * MAGNIFIER - window * MAGNIFIER) / 2) * MAGNIFIER + 25 * MAGNIFIER,\r\n ((25 * MAGNIFIER) / 2) * MAGNIFIER + 10 * MAGNIFIER,\r\n (((2 * window * MAGNIFIER + Number(4)) / 2) * MAGNIFIER * 3) / 4,\r\n (((Number(((3 * window) / 2) * MAGNIFIER) + Number(4)) / 2) *\r\n MAGNIFIER *\r\n 3) /\r\n 4\r\n );\r\n\r\n // Inner Window\r\n contextE.strokeRect(\r\n ((104 * MAGNIFIER - window * MAGNIFIER) / 2) * MAGNIFIER + 25 * MAGNIFIER,\r\n ((29 * MAGNIFIER) / 2) * MAGNIFIER + 10 * MAGNIFIER,\r\n (((2 * window * MAGNIFIER) / 2) * MAGNIFIER * 3) / 4 - 4 * MAGNIFIER,\r\n (((Number(((3 * window) / 2) * MAGNIFIER) / 2) * MAGNIFIER -\r\n 2 * MAGNIFIER) *\r\n 3) /\r\n 4 -\r\n 3 * MAGNIFIER\r\n );\r\n contextE.closePath();\r\n }\r\n\r\n // PLAN\r\n // Plan Slab\r\n contextP.fillStyle = \"#d2cbcd\";\r\n contextP.fillRect(0, 0, plan.width, 182);\r\n\r\n // Draw Plan Door\r\n\r\n contextP.strokeStyle = \"black\";\r\n contextP.lineWidth = MAGNIFIER * 2;\r\n\r\n contextP.beginPath();\r\n contextP.setLineDash([0]);\r\n contextP.moveTo(DOOR_X, INIT_DOOR_Y);\r\n contextP.lineTo(DOOR_X, FIN_DOOR_Y);\r\n contextP.stroke();\r\n contextP.closePath();\r\n\r\n // Draw insulation\r\n changeInsulation();\r\n\r\n const END_RECT_Y = (178 * 3) / 4 - 2 * MAGNIFIER;\r\n //Draw outer wall\r\n contextP.setLineDash([0]);\r\n contextP.strokeStyle = \"#3104fb\";\r\n contextP.lineWidth = MAGNIFIER;\r\n contextP.beginPath();\r\n contextP.strokeRect(\r\n MAGNIFIER,\r\n MAGNIFIER,\r\n plan.width - MAGNIFIER * 2,\r\n END_RECT_Y\r\n );\r\n contextP.closePath();\r\n\r\n // Inner Wall\r\n contextP.beginPath();\r\n contextP.fillStyle = \"#d2cbcd\";\r\n contextP.lineWidth = MAGNIFIER * 2;\r\n contextP.strokeStyle = \"#3104fb\";\r\n contextP.strokeRect(\r\n construction * MAGNIFIER + 4,\r\n construction * MAGNIFIER + 4,\r\n plan.width - 2 * construction * MAGNIFIER - 8,\r\n END_RECT_Y - 2 * construction * MAGNIFIER - Number(4)\r\n );\r\n\r\n // Draw door swing\r\n contextP.strokeStyle = \"black\";\r\n contextP.lineWidth = MAGNIFIER;\r\n contextP.beginPath();\r\n contextP.setLineDash([4, 3]);\r\n contextP.arc(DOOR_X, (178 * 3) / 4, 3 * 12 * MAGNIFIER, 0, Math.PI * 0.5);\r\n contextP.stroke();\r\n\r\n //Inner slab\r\n contextP.fillStyle = \"#d2cbcd\";\r\n contextP.beginPath();\r\n contextP.fillRect(\r\n construction * MAGNIFIER + 4,\r\n construction * MAGNIFIER + 4,\r\n plan.width - 2 * construction * MAGNIFIER - 8,\r\n END_RECT_Y - 2 * construction * MAGNIFIER - Number(4)\r\n );\r\n contextP.closePath();\r\n\r\n const PLACEMENT = (window / 2) * MAGNIFIER;\r\n\r\n // Draw Plan Window\r\n if (window >= 4) {\r\n contextP.lineWidth = MAGNIFIER;\r\n contextP.setLineDash([4, 3]);\r\n contextP.strokeStyle = \"black\";\r\n contextP.fillStyle = \"#07ebf8\";\r\n contextP.beginPath();\r\n contextP.fillRect(\r\n (plan.width / 3) * MAGNIFIER - PLACEMENT - 25,\r\n ((178 * 3) / 4 -\r\n Number(2 * MAGNIFIER) -\r\n 2 * construction * MAGNIFIER -\r\n 4 +\r\n ((178 * 3) / 4 - 2 * MAGNIFIER)) /\r\n 2 +\r\n MAGNIFIER,\r\n Number(2 * PLACEMENT),\r\n construction * MAGNIFIER + Number(2 * MAGNIFIER)\r\n );\r\n contextP.closePath();\r\n\r\n // Top Dashed Line--PLAN\r\n contextP.setLineDash([3, 4]);\r\n contextP.strokeStyle = \"black\";\r\n contextP.moveTo(\r\n (plan.width / 3) * MAGNIFIER - PLACEMENT - 25,\r\n END_RECT_Y - construction * MAGNIFIER\r\n );\r\n contextP.lineTo(\r\n (plan.width / 3) * MAGNIFIER - PLACEMENT - 25 + Number(2 * PLACEMENT),\r\n END_RECT_Y - construction * MAGNIFIER\r\n );\r\n contextP.stroke();\r\n contextP.closePath();\r\n\r\n // Bottom Dashed Line--PLAN\r\n contextP.setLineDash([3, 4]);\r\n contextP.strokeStyle = \"black\";\r\n contextP.moveTo((plan.width / 3) * MAGNIFIER - PLACEMENT - 25, END_RECT_Y);\r\n contextP.lineTo(\r\n (plan.width / 3) * MAGNIFIER - PLACEMENT - 25 + Number(2 * PLACEMENT),\r\n END_RECT_Y\r\n );\r\n contextP.stroke();\r\n contextP.closePath();\r\n }\r\n\r\n contextP.setLineDash([4, 3]);\r\n contextP.fillStyle = \"#d2cbcd\";\r\n contextP.beginPath();\r\n\r\n contextP.fillRect(\r\n DOOR_X,\r\n ((178 * 3) / 4 -\r\n Number(2 * MAGNIFIER) -\r\n 2 * construction * MAGNIFIER -\r\n 4 +\r\n ((178 * 3) / 4 - 2 * MAGNIFIER)) /\r\n 2 +\r\n MAGNIFIER,\r\n 3 * 12 * MAGNIFIER,\r\n construction * MAGNIFIER + Number(2 * MAGNIFIER) * 2\r\n );\r\n contextP.closePath();\r\n\r\n if (construction * MAGNIFIER >= 4) {\r\n contextP.setLineDash([4, 3]);\r\n contextP.strokeStyle = \"black\";\r\n contextP.beginPath();\r\n // Top dashed line\r\n contextP.moveTo(\r\n DOOR_X,\r\n ((178 * 3) / 4 -\r\n Number(2 * MAGNIFIER) -\r\n 2 * construction * MAGNIFIER -\r\n 4 +\r\n ((178 * 3) / 4 - 2 * MAGNIFIER)) /\r\n 2 +\r\n MAGNIFIER\r\n );\r\n contextP.lineTo(\r\n DOOR_X + 3 * 12 * MAGNIFIER,\r\n ((178 * 3) / 4 -\r\n Number(2 * MAGNIFIER) -\r\n 2 * construction * MAGNIFIER -\r\n 4 +\r\n ((178 * 3) / 4 - 2 * MAGNIFIER)) /\r\n 2 +\r\n MAGNIFIER\r\n );\r\n }\r\n\r\n // Bottom dashed line PLAN\r\n contextP.moveTo(\r\n DOOR_X,\r\n ((178 * 3) / 4 -\r\n Number(2 * MAGNIFIER) -\r\n 2 * construction * MAGNIFIER -\r\n 4 +\r\n ((178 * 3) / 4 - 2 * MAGNIFIER)) /\r\n 2 +\r\n MAGNIFIER +\r\n construction * MAGNIFIER +\r\n 2 * MAGNIFIER\r\n );\r\n contextP.lineTo(\r\n DOOR_X + 3 * 12 * MAGNIFIER,\r\n ((178 * 3) / 4 -\r\n Number(2 * MAGNIFIER) -\r\n 2 * construction * MAGNIFIER -\r\n 4 +\r\n ((178 * 3) / 4 - 2 * MAGNIFIER)) /\r\n 2 +\r\n MAGNIFIER +\r\n construction * MAGNIFIER +\r\n 2 * MAGNIFIER\r\n );\r\n contextP.stroke();\r\n contextP.closePath();\r\n}", "function createLeaves(inters, originPath, leafShape){\r\n\r\n\tvar calcLine = new Path();\r\n\tif(inters[0] === undefined){\r\n\t\t//leaf can not be calculated here\r\n\t\treturn null;\r\n\t}\r\n\r\n\tcalcLine.add(inters[0].point);\r\n\tcalcLine.add(inters[inters.length-1].point);\r\n\tvar point = calcLine.getPointAt(calcLine.length/2);\r\n\tvar normal = calcLine.getNormalAt(calcLine.length/2);\r\n\r\n\tif(originPath.contains(point.add(normal.multiply(5)))){\r\n\t\tnormal = normal.multiply(-1);\r\n\t}\r\n\r\n\tvar middleLine = new Path();\r\n\tmiddleLine.strokeWidth = 6;\r\n\tmiddleLine.strokeColor = leafColor;\r\n\tmiddleLine.opacity = 0;\r\n\tvar angle = normal.angle+90;\r\n\tif(angle>180){\r\n\t\tangle = angle-360;\r\n\t}\r\n\tvar side = 1;\r\n\tif(angle<0){\r\n\t\tside = -1\r\n\t}\r\n\r\n\tvar height = state.getNextInt(20,40);\r\n\ttip = point.add(normal.multiply(height));\r\n\r\n\tvar l1 = state.getNextInt(15,20);\r\n\tvar l2 = state.getNextInt(20,40);\r\n\tvar l3 = state.getNextInt(45,70);\r\n\tvar outerLine = new Path();\r\n\touterLine.strokeColor = leafColor;\r\n\touterLine.opacity = 0;\r\n\touterLine.strokeWidth = 6;\r\n\touterLine.add(point);\r\n\touterLine.add(tip);\r\n\touterLine.lineBy(0,-l1);\r\n\touterLine.lineBy(side*l2,-l2);\r\n\touterLine.lineBy(side*l3,0);\r\n\r\n\tvar innerLine = new Path();\r\n\tinnerLine.strokeColor = leafColor;\r\n\tinnerLine.opacity = 0;\r\n\tinnerLine.strokeWidth = 6;\r\n\tinnerLine.add(tip);\r\n\tinnerLine.lineBy(side*l2,-l2);\r\n\tinnerLine.lineBy(side*l3*0.5,0);\r\n\r\n\touterLine.add(new Point(innerLine.lastSegment.point.x, tip.y));\r\n\touterLine.add(new Point(innerLine.segments[1].point.x, tip.y));\r\n\r\n\tvar innerCircle = new Path.Circle(innerLine.lastSegment.point, 6);\r\n\tinnerCircle.fillColor = leafColor;\r\n\tvar outerCircle = new Path.Circle(outerLine.lastSegment.point, 6);\r\n\touterCircle.fillColor = leafColor;\r\n\r\n\tvar offs1 = leafShape.getOffsetOf(inters[0].point);\r\n\tvar offs2 = leafShape.getOffsetOf(inters[inters.length-1].point);\r\n\tconsole.log(offs1+\" \"+offs2);\r\n\tvar root = new Path();\r\n\troot.add(tip);\r\n\troot.add(inters[0].point);\r\n\tfor(var i = 0; i<leafShape.segments.length; i++){\r\n\t\tvar offs = leafShape.getOffsetOf(leafShape.segments[i].point);\r\n\t\tif(offs>offs1 && offs<offs2){\r\n\t\t\troot.add(leafShape.segments[i].point);\r\n\t\t}\r\n\t}\r\n\troot.add(inters[inters.length-1].point);\r\n\troot.fillColor = leafColor;\r\n\troot.opacity = 0;\r\n\tconsole.log(root);\r\n\r\n\tvar leafGroup = new Group();\r\n\tleafGroup.addChild(root);\r\n\tleafGroup.addChild(innerLine);\r\n\tleafGroup.addChild(outerLine);\r\n\tleafGroup.addChild(innerCircle);\r\n\tleafGroup.addChild(outerCircle);\r\n\treturn leafGroup;\r\n}", "function matteDim() {\t\n\tvar outer = document.getElementById('outer'); \n\tvar outerWidth = outer.clientWidth; \n\tvar outerHeight = outer.clientHeight; \n\tvar boxSize\n\tvar scale\n\tif (outerHeight > 2500 || outerWidth > 2500) {\n\t\tboxSize = 2500\n\t\tscale = 1\t\t\n\t} else {\n\t\tif (outerHeight < outerWidth) {\n\t\t\tboxSize = outerWidth\n\t\t} else {\n\t\t\tboxSize = outerHeight\n\t\t}\n\t\tscale = outerWidth/2500\n\t}\n\t//$('#scenesContainer').height(boxSize+'px')\n\t//$('#scenesContainer').width(boxSize+'px')\n\t//console.log('Outer Height: ' + outerHeight + ' Width: ' + outerWidth)\n\t//console.log('Scenes Height: ' + $('#scenesContainer').height() + ' Width: ' + $('#scenesContainer').width())\n\tvar hoffset = (outerWidth - boxSize)/2\n\tvar voffset = (outerHeight - boxSize)/2\n\t//console.log(hoffset)\n\t$('#scenesContainer').css({left:hoffset,top:voffset})\n\treturn(scale)\t\n}", "function calcArea(base, height) {\n return (base * height) / 2;\n}", "function drawLeftRight(left, n) {\n\t \t\tif(left) {\n\t \t\t\t\tvar a = [(main.segments[0].point.x + main.segments[3].point.x)/2, (main.segments[0].point.y + main.segments[3].point.y)/2]\n\t \t\t\t//console.log(a);\n\t \t\t\tvar b = [(main.segments[4].point.x + main.segments[5].point.x)/2, (main.segments[4].point.y + main.segments[5].point.y)/2];\n\t \t\t\t}\n\t \t\t\telse {\n\t \t\t\t\tvar a = [(main.segments[0].point.x + main.segments[3].point.x)/2, (main.segments[0].point.y + main.segments[3].point.y)/2]\n\t \t\t\t//console.log(a);\n\t \t\t\tvar b = [(main.segments[1].point.x + main.segments[2].point.x)/2, (main.segments[1].point.y + main.segments[2].point.y)/2];\n\t \t\t\t}\n\n\t \t\tvar x = a[0]-b[0];\n\t \t\tvar y = a[1]-b[1];\n\t \t\tvar dist = Math.sqrt(x*x + y*y);\n\t \t\t// depending on the number of figures\n\t \t\tvar step = dist/(n+1);\n\t \t\tfor (var i = 1; i <= n; i++) {\n\t \t\t\tvar new_x = a[0]-((step*i)*(a[0]-b[0]))/dist;\n\t \t\t\tvar new_y = a[1]-((step*i)*(a[1]-b[1]))/dist;\n\t \t\t\tvar new_coord = [new_x, new_y];\n\t \t\t\tvar raster = getFigur(fig);\n\t \t\t\traster.bounds.x = 0;\n\t\t \t\traster.bounds.y = 0;\n\t\t \t\traster.bounds.width = max*0.4;\n\t\t \t\traster.bounds.height = max*0.4;\n\t\t \t\traster.position = new paper.Point(new_x, new_y);\n\n\t\t \t\tgroup.addChild(raster);\n\t \t\t}\n\t \t}", "function calcArea(w,l){//parameters go here.\n //var width=10;\n //var length=20;\n //var area=width*length;\n\n var area=w*l;\n console.log(\"area of rectangle is \"+area);\n\n}", "function equilatRep(L,R,dx,dy){\n let temp = g.points[0];\n let ytip = 70;\n let xtip = 300;\n \n if(!g.inPhaseEnvelope){\n // Solute line and box display\n let x1, y1, x2, y2;\n push();\n stroke(0,0,255);\n strokeWeight(2);\n fill(0,0,255);\n x1 = temp.x;\n y1 = temp.y;\n y2 = temp.y;\n x2 = (y2 - R[1])/R[0];\n push();\n drawingContext.setLineDash([5,5]);\n line(x1,y1,x2-3,y2);\n pop();\n triangle(x2,y2,x2-15,y2+5,x2-15,y2-5)\n pop();\n let solFractemp = map(temp.y,ytip+dy,ytip,0,1); // storing a non-fixed version for improved graphics of the carrier line\n g.soluteFrac = (map(temp.y,ytip+dy,ytip,0,1)).toFixed(2);\n if(g.soluteFrac == 0){ // Correction for -0.00\n let t = (0).toFixed(2);\n g.soluteFrac == t;\n }\n\n if(g.soluteTruth){\n push();\n fill(255);\n rect(x2+10,y2-15,45,30);\n textSize(18); noStroke();\n fill(0,0,255);\n text(g.soluteFrac,x2+15,y2+5)\n pop();\n }\n\n //Solvent line\n push();\n let angle = 30*Math.PI/180;\n stroke(128,0,128); strokeWeight(2); fill(128,0,128);\n x1 = temp.x;\n y1 = temp.y;\n y2 = ytip+dy-5;\n let btemp = y1-L[0]*temp.x;\n x2 = (y2-btemp)/L[0];\n push();\n drawingContext.setLineDash([5,5]);\n line(x1,y1,x2,y2);\n pop();\n y2 = y2 + 5;\n x2 = (y2-btemp)/L[0];\n let pos = equilatSolventTriangleRep(x2,y2);\n triangle(pos[0],pos[1],pos[2],pos[3],pos[4],pos[5]);\n pop();\n let solvFractemp = map(x2,xtip-dx,xtip+dx,0,1); // Non-fixed version\n g.solventFrac = (map(x2,xtip-dx,xtip+dx,0,1)).toFixed(2);\n if(g.solventFrac <= 0){ // Correction for -0.00\n \n g.solventFrac = g.solventFrac.replace(/-/g,'')\n }\n \n\n if(g.solventTruth){\n push();\n fill(255);\n rect(x2-22.5,y2+10,45,30);\n textSize(18); noStroke();\n fill(128,0,128);\n text(g.solventFrac,x2-17.5,y2+30);\n pop();\n }\n \n // Carrier line\n let carFractemp = 1 - solFractemp - solvFractemp; // For drawing the carrier line\n g.carrierFrac = (1 - g.solventFrac - g.soluteFrac).toFixed(2);\n if(g.carrierFrac == 0){ // Correcting for -0.00\n let t = (0).toFixed(2);\n g.carrierFrac = t;\n }\n \n x2 = map(carFractemp,0,1,xtip,xtip-dx); // This is kind of clunky -> I should work on a better method\n y2 = L[0]*x2 + L[1];\n push();\n stroke(255,100,0); strokeWeight(2); fill(255,100,0);\n push();\n drawingContext.setLineDash([5,5]);\n line(temp.x,temp.y,x2,y2);\n pop();\n \n if(g.carrierTruth){\n push();\n fill(255); stroke(0); strokeWeight(1);\n rect(x2-45,y2-30,45,30);\n textSize(18); noStroke();\n fill(255,100,0);\n text(g.carrierFrac,x2-40,y2-10);\n pop();\n }\n pos = equilatCarrierTriangleRep(x2,y2);\n triangle(pos[0],pos[1],pos[2],pos[3],pos[4],pos[5]);\n pop(); \n }\n \n}", "shapeTerrain() {\r\n // MP2: Implement this function!\r\n\r\n // set up some variables\r\n let iter = 200\r\n let delta = 0.015\r\n let H = 0.008\r\n\r\n for(let i = 0; i < iter; i++) {\r\n // construct a random fault plane\r\n let p = this.generateRandomPoint();\r\n let n = this.generateRandomNormalVec();\r\n\r\n // raise and lower vertices\r\n for(let j = 0; j < this.numVertices; j++) {\r\n // step1: get vertex b, test which side (b - p) * n >= 0\r\n let b = glMatrix.vec3.create();\r\n this.getVertex(b, j);\r\n\r\n let sub = glMatrix.vec3.create();\r\n glMatrix.vec3.subtract(sub, b, p);\r\n\r\n let dist = glMatrix.vec3.distance(b, p);\r\n\r\n let funcValue = this.calculateCoefficientFunction(dist);\r\n\r\n if (glMatrix.vec3.dot(sub, n) > 0)\r\n b[2] += delta * funcValue\r\n else\r\n b[2] -= delta * funcValue\r\n\r\n this.setVertex(b, j);\r\n }\r\n delta = delta / (Math.pow(2, H));\r\n }\r\n }", "function updateParameters() {\n // update the state of the system\n x = x0;\n y = y0;\n z = z0;\n x0 = sigma*(y-x)*dt + x;\n y0 = (r*x-y-x*z)*dt + y;\n z0 = (x*y-b*z)*dt + z;\n\n // update the cell parameters\n for (var i = 0; i <corner_points.length; i++) {\n row = corner_points[i];\n row.radius = scale*Math.sqrt( Math.pow(row.y - center_y,2) + Math.pow(row.x - center_x,2) );\n row.theta = Math.atan2(row.y - center_y, row.x - center_x)-Math.PI/2;\n }\n\n // convert units of the Lorenz system to pixels\n center_x = 0.015*size*y0 + 0.50*size;\n center_y = -0.015*size*z0 + 0.85*size;\n\n // if magnitude is small then normalization creates a jittery trajectory\n var vel = Math.sqrt( Math.pow(temp_y - center_y,2) + Math.pow(temp_x - center_x,2) )/size;\n if (vel > 0.01) {\n center_x = temp_x + 0.01*(center_x - temp_x)/vel;\n center_y = temp_y + 0.01*(center_y - temp_y)/vel;\n }\n temp_x = center_x;\n temp_y = center_y;\n }", "function calcArea(w , h){\n\n //create var for height , width , and area\n\n //var width = 20;\n //var height = 10;\n //var are = height * width\n\n //create var area using parimeters\n var area = w*h;\n console.log(area)\n}", "function calcArea(base, height) {\n return (base * height) / 2;\n}", "function superBuild(nlat, nlon,e1,e2) \n{\n superQ_points = [];\n superQ_normals = [];\n superQ_faces = [];\n superQ_edges = [];\n // phi will be latitude\n // theta will be longitude\n \n var d_phi = (Math.PI / (nlat+1));\n var d_theta = (2*Math.PI / nlon);\n var r = 0.5;\n \n // Generate north polar cap\n var north = vec3(0,r,0);\n superQ_points.push(north);\n superQ_normals.push(vec3(0,1,0));\n \n // Generate middle\n for(var i=0, phi=Math.PI/2 - d_phi; i<nlat; i++, phi-=d_phi) {\n for(var j=0, theta=-Math.PI; j<nlon; j++, theta+=d_theta) {\n var cosphi = Math.cos(phi);\n var sinphi = Math.sin(phi);\n var costheta = Math.cos(theta);\n var sintheta = Math.sin(theta);\n\n var x = r*\n \t(Math.sign(cosphi)*Math.pow(Math.abs(cosphi),e1))*\n (Math.sign(costheta)*Math.pow(Math.abs(costheta),e2));\n var y = r*\n (Math.sign(sinphi)*Math.pow(Math.abs(sinphi),e1));\n var z = r*\n (Math.sign(cosphi)*Math.pow(Math.abs(cosphi),e1))*\n (Math.sign(sintheta)*Math.pow(Math.abs(sintheta),e2));\n var pt = vec3(x,y,z);\n superQ_points.push(pt);\n var n = vec3(pt);\n superQ_normals.push(normalize(n));\n }\n }\n \n // Generate norh south cap\n var south = vec3(0,-r,0);\n superQ_points.push(south);\n superQ_normals.push(vec3(0,-1,0));\n \n // Generate the faces\n \n // north pole faces\n for(var i=0; i<nlon-1; i++) {\n superQ_faces.push(0);\n superQ_faces.push(i+2);\n superQ_faces.push(i+1);\n }\n superQ_faces.push(0);\n superQ_faces.push(1);\n superQ_faces.push(nlon);\n \n // general middle faces\n var offset=1;\n \n for(var i=0; i<nlat-1; i++) {\n for(var j=0; j<nlon-1; j++) {\n var p = offset+i*nlon+j;\n superQ_faces.push(p);\n superQ_faces.push(p+nlon+1);\n superQ_faces.push(p+nlon);\n \n superQ_faces.push(p);\n superQ_faces.push(p+1);\n superQ_faces.push(p+nlon+1);\n }\n var p = offset+i*nlon+nlon-1;\n superQ_faces.push(p);\n superQ_faces.push(p+1);\n superQ_faces.push(p+nlon);\n\n superQ_faces.push(p);\n superQ_faces.push(p-nlon+1);\n superQ_faces.push(p+1);\n }\n \n // south pole faces\n var offset = 1 + (nlat-1) * nlon;\n for(var j=0; j<nlon-1; j++) {\n superQ_faces.push(offset+nlon);\n superQ_faces.push(offset+j);\n superQ_faces.push(offset+j+1);\n }\n superQ_faces.push(offset+nlon);\n superQ_faces.push(offset+nlon-1);\n superQ_faces.push(offset);\n \n // Build the edges\n for(var i=0; i<nlon; i++) {\n superQ_edges.push(0); // North pole \n superQ_edges.push(i+1);\n }\n\n for(var i=0; i<nlat; i++, p++) {\n for(var j=0; j<nlon;j++, p++) {\n var p = 1 + i*nlon + j;\n superQ_edges.push(p); // horizontal line (same latitude)\n if(j!=nlon-1) \n superQ_edges.push(p+1);\n else superQ_edges.push(p+1-nlon);\n \n if(i!=nlat-1) {\n superQ_edges.push(p); // vertical line (same longitude)\n superQ_edges.push(p+nlon);\n }\n else {\n superQ_edges.push(p);\n superQ_edges.push(superQ_points.length-1);\n }\n }\n }\n \n}", "constructor(minV, maxV, minA, maxA) {\n this.minV = minV;\n this.maxV = maxV;\n this.minA = minA;\n this.maxA = maxA;\n\n var size = 0.1;\n this.partNegative = (minV < 0) ? size : 0;\n this.partZero = this.partNegative + size;\n\n this.bounds = new Rectangle();\n\n this.steering_rate = 2.5;\n }", "function setGeometry(gl) {\n var positions = new Float32Array([\n // left column front\n 0, 0, 0,\n 0, 150, 0,\n 30, 0, 0,\n 0, 150, 0,\n 30, 150, 0,\n 30, 0, 0,\n\n // top rung front\n 30, 0, 0,\n 30, 30, 0,\n 100, 0, 0,\n 30, 30, 0,\n 100, 30, 0,\n 100, 0, 0,\n\n // middle rung front\n 30, 60, 0,\n 30, 90, 0,\n 67, 60, 0,\n 30, 90, 0,\n 67, 90, 0,\n 67, 60, 0,\n\n // left column back\n 0, 0, 30,\n 30, 0, 30,\n 0, 150, 30,\n 0, 150, 30,\n 30, 0, 30,\n 30, 150, 30,\n\n // top rung back\n 30, 0, 30,\n 100, 0, 30,\n 30, 30, 30,\n 30, 30, 30,\n 100, 0, 30,\n 100, 30, 30,\n\n // middle rung back\n 30, 60, 30,\n 67, 60, 30,\n 30, 90, 30,\n 30, 90, 30,\n 67, 60, 30,\n 67, 90, 30,\n\n // top\n 0, 0, 0,\n 100, 0, 0,\n 100, 0, 30,\n 0, 0, 0,\n 100, 0, 30,\n 0, 0, 30,\n\n // top rung right\n 100, 0, 0,\n 100, 30, 0,\n 100, 30, 30,\n 100, 0, 0,\n 100, 30, 30,\n 100, 0, 30,\n\n // under top rung\n 30, 30, 0,\n 30, 30, 30,\n 100, 30, 30,\n 30, 30, 0,\n 100, 30, 30,\n 100, 30, 0,\n\n // between top rung and middle\n 30, 30, 0,\n 30, 60, 30,\n 30, 30, 30,\n 30, 30, 0,\n 30, 60, 0,\n 30, 60, 30,\n\n // top of middle rung\n 30, 60, 0,\n 67, 60, 30,\n 30, 60, 30,\n 30, 60, 0,\n 67, 60, 0,\n 67, 60, 30,\n\n // right of middle rung\n 67, 60, 0,\n 67, 90, 30,\n 67, 60, 30,\n 67, 60, 0,\n 67, 90, 0,\n 67, 90, 30,\n\n // bottom of middle rung.\n 30, 90, 0,\n 30, 90, 30,\n 67, 90, 30,\n 30, 90, 0,\n 67, 90, 30,\n 67, 90, 0,\n\n // right of bottom\n 30, 90, 0,\n 30, 150, 30,\n 30, 90, 30,\n 30, 90, 0,\n 30, 150, 0,\n 30, 150, 30,\n\n // bottom\n 0, 150, 0,\n 0, 150, 30,\n 30, 150, 30,\n 0, 150, 0,\n 30, 150, 30,\n 30, 150, 0,\n\n // left side\n 0, 0, 0,\n 0, 0, 30,\n 0, 150, 30,\n 0, 0, 0,\n 0, 150, 30,\n 0, 150, 0]);\n\n // Center the F around the origin and Flip it around. We do this because\n // we're in 3D now with and +Y is up where as before when we started with 2D\n // we had +Y as down.\n\n // We could do by changing all the values above but I'm lazy.\n // We could also do it with a matrix at draw time but you should\n // never do stuff at draw time if you can do it at init time.\n var matrix = m4.xRotation(Math.PI);\n matrix = m4.translate(matrix, -50, -75, -15);\n\n for (var ii = 0; ii < positions.length; ii += 3) {\n var vector = m4.transformPoint(matrix, [positions[ii + 0], positions[ii + 1], positions[ii + 2], 1]);\n positions[ii + 0] = vector[0];\n positions[ii + 1] = vector[1];\n positions[ii + 2] = vector[2];\n }\n\n gl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);\n}", "function createMeshes(){\r\n\r\n createCtrlBox();\r\n // делаем брусчатку\r\n createPlane(170, 148, 0, 0, 0, -0.5, 0, 'img/road2.jpg', 10, true);\r\n // основная башня\r\n createRectangle(30, 66, 30, 0, 33, 0, 'img/Black_brics.jpg', false);\r\n // боковые пристройки\r\n createRectangle(70, 26, 4, -50, 13, 0, 'img/Black_brics.jpg', false);\r\n createRectangle(70, 26, 4, 50, 13, 0, 'img/Black_brics.jpg', false);\r\n // передняя пристройка\r\n createRectangle(18, 26, 16, 0, 13, 23, 'img/Black_brics.jpg', false);\r\n // пристройка сверху\r\n createRectangle(20, 16, 20, 0, 74, 0, 'img/Black_brics.jpg', false);\r\n // еще сверху\r\n createRectangle(10, 28, 10, 0, 84, 0, 'img/Black_brics.jpg', false);\r\n // пристраиваем конус\r\n createCone(4.5, 18, 12, 0, 106, 0, 0x00693A);\r\n // делаем звезду-шар\r\n createSphere(2, 3, 2, 0, 116, 0, 0xE40000);\r\n // делаем часики\r\n createPlane(10, 10, 0, 74, 10.1, 0, 0, 'img/Clock_cut.PNG', 1, false);\r\n createPlane(10, 10, 0, 74, -10.1, 1, 0, 'img/Clock_cut.PNG', 1, false);\r\n createPlane(10, 10, 10.1, 74, 0, 0, 0.5, 'img/Clock_cut.PNG', 1, false);\r\n createPlane(10, 10, -10.1, 74, 0, 0, -0.5, 'img/Clock_cut.PNG', 1, false);\r\n // делаем дверь\r\n createPlane(10, 20, 0, 14, 31.1, 0, 0, 'img/doors.PNG', 1, false);\r\n // делаем заборчики\r\n // правый\r\n for (let i = 18; i < 85; i+=5) {\r\n createRectangle(3, 4, 2, i, 28, 1, 'img/Black_brics.jpg', false);\r\n }\r\n // левый\r\n for (let i = -18; i > -85; i-=5) {\r\n createRectangle(3, 4, 2, i, 28, 1, 'img/Black_brics.jpg', false);\r\n }\r\n // передний спереди\r\n for (let i = -7.5; i < 11; i+=5) {\r\n createRectangle(3, 4, 2, i, 28, 30, 'img/Black_brics.jpg', false);\r\n }\r\n // боковые спереди\r\n for (let i = 26; i > 15; i-=5) {\r\n createRectangle(2, 4, 3, -8, 28, i, 'img/Black_brics.jpg', false);\r\n }\r\n\r\n for (let i = 26; i > 15; i-=5) {\r\n createRectangle(2, 4, 3, 8, 28, i, 'img/Black_brics.jpg', false);\r\n }\r\n\r\n // а теперь верхние 4 заборчика\r\n for (let i = -9.5; i < 10; i+=2) {\r\n createRectangle(1, 2, 1, i, 83, 9.5, 'img/wbricks.jpg', false);\r\n }\r\n\r\n for (let i = -9.5; i < 10; i+=2) {\r\n createRectangle(1, 2, 1, i, 83, -9.5, 'img/wbricks.jpg', false);\r\n }\r\n\r\n for (let i = -9.5; i < 10; i+=2.5) {\r\n createRectangle(1, 2, 1, -9.5, 83, i, 'img/wbricks.jpg', false);\r\n }\r\n\r\n for (let i = -9.5; i < 10; i+=2) {\r\n createRectangle(1, 2, 1, 9.5, 83, i, 'img/wbricks.jpg', false);\r\n }\r\n // добавим конусов\r\n createCone(2, 10, 4, -13, 71, 13, 0xF6F3F3);\r\n createCone(2, 10, 4, 13, 71, 13, 0xF6F3F3);\r\n createCone(2, 10, 4, 13, 71, -13, 0xF6F3F3);\r\n createCone(2, 10, 4, -13, 71, -13, 0xF6F3F3);\r\n // добавим слова\r\n createWords();\r\n // добавим дорогу\r\n createRectangle(18, 4, 42, 0, 2, 52, 'img/road.jpg', true);\r\n // добавим приведений\r\n createBaloon(-20, 80, 20, \"img/ghost1.png\");\r\n createBaloon(30, 70, 30, \"img/ghost2.png\");\r\n createBaloon(-30, 50, 30, \"img/ghost3.png\");\r\n // добавим волков\r\n createWolf(-30, 2, 30, 4, 10);\r\n createWolf(30, 6, 30, 3, 20);\r\n // добавим луну\r\n createMoonObjMTL();\r\n}", "function lanczosCreate(lobes){\n return function(x){\n if (x > lobes)\n return 0;\n x *= Math.PI;\n if (Math.abs(x) < 1e-16)\n return 1\n var xx = x / lobes;\n return Math.sin(x) * Math.sin(xx) / x / xx;\n };\n }", "function width_at_depth (points, percent_depth){\n var lowest = 1000000;\n var highest = -1000000;\n for (var i = 0; i < points.length; i++){\n if (points[i][1] < lowest){\n lowest = points[i][1];\n }\n if (points[i][1] > highest){\n highest = points[i][1];\n }\n }\n var pair1 = [];\n var pair2 = []; // defines the line segments that intersect with y = -max_depth/2\n var target_y = highest - (Math.abs(highest-lowest)*percent_depth);\n console.log(target_y);\n for (var i = 0; i < points.length; i++){\n if (i === 0){\n // if on the first point, compare with the last point\n if (((points[points.length-1][1]-target_y) * (points[0][1]-target_y)) <= 0){\n // if the differences between the y-coordinates and half of max_depth have opposite signs\n if (pair1.length === 0) {\n pair1 = [points[0], points[points.length - 1]];\n } else{\n pair2 = [points[0], points[points.length - 1]];\n }\n }\n } else {\n if (((points[i-1][1]-target_y) * (points[i][1]-target_y)) <= 0){\n if (pair1.length === 0) {\n pair1 = [points[i-1], points[i]];\n } else{\n pair2 = [points[i-1], points[i]];\n }\n }\n }\n }\n // find x-coordinates of intersections\n var slope1 = (pair1[1][1]-pair1[0][1]) / (pair1[1][0]-pair1[0][0]);\n var slope2 = (pair2[1][1]-pair2[0][1]) / (pair2[1][0]-pair2[0][0]);\n var intersection1 = (target_y-pair1[0][1]) / slope1 + pair1[0][0];\n var intersection2 = (target_y-pair2[0][1]) / slope2 + pair2[0][0];\n return Math.abs(intersection1-intersection2);\n}", "static CreateLevelFour() {\r\n\t\tvar blockSize = 48;\r\n\t\tvar width = 20 * blockSize;\r\n\t\tvar height = 15 * blockSize;\r\n\t\t// Draw walls as transparent\r\n\t\tvar wallColor = \"rgba(0, 0, 0, 0.0)\";\r\n\t\tvar objColor = \"#cccccc\";\r\n\t\tvar walls = [\r\n\t\t\t// House boundaries\r\n\t\t\tnew Wall(\"wall0\", -2, -2, 2, 17, blockSize, wallColor),\r\n\t\t\tnew Wall(\"wall1\", 20, -2, 2, 17, blockSize, wallColor),\r\n\t\t\tnew Wall(\"wall2\", 0, -2, 20, 2, blockSize, wallColor),\r\n\t\t\tnew Wall(\"wall3\", 0, 15, 20, 2, blockSize, wallColor),\r\n\r\n\t\t\t// Interior walls\r\n\t\t\tnew Wall(\"wall4\", 9, 0, 2, 5, blockSize, wallColor),\r\n\t\t\tnew Wall(\"wall5\", 9, 8, 4, 3, blockSize, wallColor),\r\n\t\t\tnew Wall(\"wall6\", 15, 8, 5, 3, blockSize, wallColor),\r\n\t\t\tnew Wall(\"wall7\", 9, 11, 2, 4, blockSize, wallColor),\r\n\r\n\t\t\t// Kitchen table\r\n\t\t\tnew Table(\"table1\", 3.5, 10, 2, 3, blockSize, wallColor),\r\n\r\n\t\t\t// Placeholder objects\r\n\t\t\t// Bedroom\r\n\t\t\tnew CoffeeTable(\"wall12\", 4, 6, 1, 1, blockSize, objColor),\r\n\r\n\t\t\t//Bathroom\r\n\t\t\tnew Wall(\"wall8\", 15, 11, 4.5, 1, blockSize, \"#afafaf\"),\r\n\r\n\t\t\t// Kitchen\r\n\t\t\tnew Wall(\"wall11\", 14, 0, 6, 1, blockSize, \"#afafaf\"),\r\n\t\t];\r\n\r\n\t\t// Interactable objects\r\n\t\tvar interactableObjects = [\r\n\t\t\t// Bedroom\r\n\t\t\tLevelFactory._makeBed(3, 0, 3, 3, 2, blockSize),\r\n\t\t\tLevelFactory._makePlant(1, 0, 1, 1, 2, blockSize),\r\n\t\t\tLevelFactory._makePlant(7, 0, 1, 1, 2, blockSize),\r\n\r\n\t\t\t// Living area\r\n\t\t\tLevelFactory._makeBench(0, 10, 1, 3, 1, false, blockSize),\r\n\t\t\tLevelFactory._makeBench(8, 10, 1, 3, 3, true, blockSize),\r\n\r\n\t\t\t// Bathroom\r\n\t\t\tLevelFactory._makeTub(11, 11.5, 2, 3, 1, blockSize),\r\n\t\t\tLevelFactory._makeBathSink(16, 11, 1, 1, 2, blockSize),\r\n\t\t\tLevelFactory._makePlant(19, 14, 1, 1, 3, blockSize),\r\n\r\n\t\t\t// Kitchen\r\n\t\t\tLevelFactory._makeSink(15, 0, 3, 1, 2, blockSize),\r\n\t\t\tLevelFactory._makeFridge(12, 0, 1, 1, 2, blockSize),\r\n\t\t\tLevelFactory._makeTrash(19, 3, 1, 1, 3, blockSize),\r\n\t\t];\r\n\r\n\t \t// Combine the walls and interactable objects\r\n\t \tvar collidables = [];\r\n\t \tcollidables.push(...walls);\r\n\t \tcollidables.push(...interactableObjects);\r\n\r\n\t\t// TODO add rooms\r\n\t\tvar rooms = [];\r\n\r\n\t\t// Title overlay\r\n\t\tvar screenWidth = GoodDogPrototype.getInstance().width;\r\n\t\tvar screenHeight = GoodDogPrototype.getInstance().height;\r\n\t\tvar titleOverlay = new TitleOverlay(\"TitleOverlay\", \"Episode IV\", \"A Poo Hope\", screenWidth, screenHeight);\r\n\r\n\t\t// Set the min damage value for the level\r\n\t\tvar minDamageValue = 70;\r\n\r\n\t\t// Create the dog\r\n\t\tvar dog = new Dog(13*blockSize, 7*blockSize);\r\n\r\n\t\t// Create the owner\r\n\t\tvar owner = new Owner(16*blockSize, 7*blockSize);\r\n\r\n\t // Set the background for the level\r\n\t var bgSprite = new Sprite(\"background\", \"sprites/levels/level4_bg.png\");\r\n\t bgSprite.setPosition(-3*blockSize, -3*blockSize);\r\n\r\n\t\t// Return the objects for the level\r\n\t\treturn {\r\n\t\t\twidth: width,\r\n\t\t\theight: height,\r\n\t\t\tcollidables: collidables,\r\n\t\t\trooms: rooms,\r\n\t\t\ttitleOverlay: titleOverlay,\r\n\t\t\tminDamageValue: minDamageValue,\r\n\t\t\tdog: dog,\r\n\t\t\towner: owner,\r\n\t\t\tinteractableObjects: interactableObjects,\r\n\t\t\tbackgroundSprite: bgSprite,\r\n\t\t};\r\n\t}", "function lanczosCreate(lobes){\n return function(x){\n if (x > lobes) \n return 0;\n x *= Math.PI;\n if (Math.abs(x) < 1e-16) \n return 1;\n var xx = x / lobes;\n return Math.sin(x) * Math.sin(xx) / x / xx;\n }\n}", "function initPolygons () {\n pgSouth = new Array(8); // Polygon für den Südpol des Hufeisenmagneten\n setPoint(pgSouth,0,-XM1,YM3,0);\n setPoint(pgSouth,1,-XM1,YM3,-ZM2);\n setPoint(pgSouth,2,-XM1,YM1,-ZM2);\n setPoint(pgSouth,3,XM1,YM1,-ZM2);\n setPoint(pgSouth,4,XM1,YM1,-ZM1);\n setPoint(pgSouth,5,XM1,YM2,-ZM1);\n setPoint(pgSouth,6,XM1,YM2,0);\n setPoint(pgSouth,7,-XM1,YM2,0);\n pgNorth = new Array(9); // Polygon für den Nordpol des Hufeisenmagneten\n setPoint(pgNorth,0,-XM1,YM3,0);\n setPoint(pgNorth,1,-XM1,YM2,0);\n setPoint(pgNorth,2,XM1,YM2,0);\n var u0 = screenU(-XM1,YM1);\n var v0 = screenV(-XM1,YM1,ZM1);\n var u1 = screenU(-XM1,YM2);\n var v1 = screenV(-XM1,YM2,ZM1); \n var uS = screenU(XM1,YM2);\n var q = (uS-u0)/(u1-u0);\n var vS = v0+q*(v1-v0);\n pgNorth[3] = {u: uS, v: vS};\n setPoint(pgNorth,4,-XM1,YM1,ZM1);\n setPoint(pgNorth,5,XM1,YM1,ZM1);\n setPoint(pgNorth,6,XM1,YM1,ZM2);\n setPoint(pgNorth,7,XM1,YM3,ZM2);\n setPoint(pgNorth,8,-XM1,YM3,ZM2);\n pgContact1 = new Array(6); // Polygon für den oberen Schleifkontakt\n pointContact1 = initContact(pgContact1,XC1,YC1,ZC1); // Zugehöriger innerer Punkt\n pgContact2 = new Array(6); // Polygon für den unteren Schleifkontakt (mit Kommutator)\n pointContact2 = initContact(pgContact2,XC1,YC1,-ZC1); // Zugehöriger innerer Punkt\n pgContact3 = new Array(6); // Polygon für den unteren Schleifkontakt (ohne Kommutator)\n pointContact3 = initContact(pgContact3,XC1,YC2,-ZC1); // Zugehöriger innerer Punkt\n pgVoltmeter1 = new Array(6); // Polygon für Voltmeter insgesamt\n pointVoltmeter = initCuboid(pgVoltmeter1,XV1,XV2,YV1,YV2,ZV1,ZV2); // Zugehöriger innerer Punkt\n pgVoltmeter2 = new Array(4); // Polygon für Skala des Voltmeters\n setPoint(pgVoltmeter2,0,XV1,YV1,ZV3);\n setPoint(pgVoltmeter2,1,XV2,YV1,ZV3);\n setPoint(pgVoltmeter2,2,XV2,YV1,ZV2);\n setPoint(pgVoltmeter2,3,XV1,YV1,ZV2);\n pgVoltmeter3 = new Array(4); // Polygon für unteren Teil des Voltmeters\n pgVoltmeter3[0] = pgVoltmeter1[1];\n pgVoltmeter3[1] = pgVoltmeter1[2];\n pgVoltmeter3[2] = pgVoltmeter2[1];\n pgVoltmeter3[3] = pgVoltmeter2[0];\n pgInsulator1 = new Array(20); // Polygon für Isolierschicht\n pgInsulator2 = new Array(20); // Polygon für Isolierschicht \n for (i=0; i<20; i++) { // Vorläufige Koordinaten\n pgInsulator1[i] = {u: 0, v: 0};\n pgInsulator2[i] = {u: 0, v: 0};\n }\n }", "function calculation () {\n base = document.getElementById('inputbase').value\n base = parseInt(base)\n height = document.getElementById('inputheight').value\n height = parseInt(height)\n basetwo = document.getElementById('inputbasetwo').value\n basetwo = parseInt(basetwo)\n // Like with math, starting off with addition of the two base values, then divide them by two, and then following by multiplying them by the height to get the area of a trapezoid.\n area = base + basetwo\n area = area * half\n area = area * height\n document.getElementById('textbox').innerHTML = area\n alert(area)\n}", "function changeAreaSize() {\n changeBackgroundSize();\n for (i = 0; i <= width; i++) {\n changeLineSize(0, i);\n }\n for (i = 0; i <= height; i++) {\n changeLineSize(1, i);\n }\n for (i = 0; i < $MAX_WIDTH_DIMENSION; i++) {\n for (j = 0; j < $MAX_HEIGTH_DIMENSION; j++) {\n changeSquareSize(i, j);\n changeSquareAuxSize(i, j);\n }\n }\n changeCalculatedSize(0);\n changeCalculatedSize(1);\n changeDecreaseArrowSize(0);\n changeIncreaseArrowSize(0);\n changeDecreaseArrowSize(1);\n changeIncreaseArrowSize(1);\n changeDecreaseArrowSize(2);\n changeIncreaseArrowSize(2);\n}", "function boxArea(l,w,h) {\n var bxArea = 0;\n bxArea += 2 * l * w;\n bxArea += 2 * w * h;\n bxArea += 2 * h * l;\n\n return bxArea;\n}", "function LaplaceBeltramiWeightFunc(v1, v2, v3, v4) {\n var w = 0.0;\n if (!(v3 === null)) {\n w = w + getCotangent(v1.pos, v2.pos, v3.pos);\n }\n if (!(v4 === null)) {\n w = w + getCotangent(v1.pos, v2.pos, v4.pos);\n }\n //TODO: Fix area scaling\n //return (3.0/(2.0*v1.getOneRingArea()))*w;\n return w;\n }", "function lvlCtor(width, height, maxAltitude){\n\n\n\n console.log('populating map...');\n\tvar percentage = (Math.random() * maxAltitude);\n\tvar seed = Math.random() * 100000;\n\n\treturn level.initLevel(seed, percentage, width, height, maxAltitude);\n}", "function lanczosCreate(lobes) {\n return function(x) {\n if (x > lobes)\n return 0;\n x *= Math.PI;\n if (Math.abs(x) < 1e-16)\n return 1;\n let xx = x / lobes;\n return Math.sin(x) * Math.sin(xx) / x / xx;\n };\n }", "calcWallsArea( height, length, width ){\n\t\tconst wallsArea = ( ( height * length ) + ( height * width ) ) * 2 ;\n\t\treturn wallsArea ;\n\t}", "function firsFunction(){\n var width = 80;\n var heigth = 2;\n var area = width * heigth;\n console.log(area);\n \n var wid = 1000;\n var area = wid - area;\n // var heigth = 160;\n \n return area;\n \n}", "function create_lava(){ // Create 3 lava ellipses that fall from sky in second level\n\n let counter = 2000; // With a tag that groes from 2000 and on\n\n // Create it at random position in the Left, Middle and Right parts of the level\n let random_x1 = Math.floor(Math.random() * (409 - 390 + 1) + 390);\n let random_x2 = Math.floor(Math.random() * (424 - 439 + 1) + 439);\n let random_x3 = Math.floor(Math.random() * (454 - 468 + 1) + 468);\n\n let random_xs = [random_x1, random_x2, random_x3];\n\n random_xs.forEach(x => { // Create the mesh, add a light and a body to the obejct and save it in an array to update the position in the run method\n let path = new THREE.Shape();\n path.absellipse(0,0,0.35,0.7,0, Math.PI*2, false,0);\n let geometry = new THREE.ShapeBufferGeometry( path );\n let ellipse_mesh = new THREE.Mesh( geometry, materials.lava );\n \n if(ellipse_mesh != null){\n let light = new THREE.PointLight( 0xFA7726, 100); // Color and intensity as parameters\n ellipse_mesh.position.set(x, 40, 0 );\n let ellipse_body = addPhysicalBody(counter, ellipse_mesh, {mass: 0.1}, true);\n ellipse = {mesh: ellipse_mesh , body: ellipse_body}\n lava_ellipse = {lava_object: ellipse, lava_light: light};\n lava_ellipses.push(lava_ellipse);\n scene.add(ellipse_mesh);\n counter++;\n }\n })\n}", "getCartesianPlane(){ \n //origem do plano fica a 6% da origem do gráfico\n // O(0.06*h , 0.94h)\n \n //desenha ponto na origem\n\n noStroke()\n //ellipse(this.origin.x,this.origin.y,0.035*this.height,0.035*this.height)\n //fill(255)\n \n\n //desenha eixos do plano\n \n let arrowLength = 0.02*this.height \n stroke(255)\n strokeWeight(4)\n\n //desenha eixo y\n line(this.origin.x, this.origin.y, this.origin.x, 0.05*this.height)\n //desenha flecha à esquerda do eixo Y\n line(this.origin.x, 0.05*this.height, this.origin.x-(arrowLength)*cos(PI/3), 0.05*this.height+(arrowLength)*sin(PI/3))\n //desenha flecha à direita do eixo y\n line(this.origin.x, 0.05*this.height, this.origin.x+(arrowLength)*cos(PI/3), 0.05*this.height+(arrowLength)*sin(PI/3))\n \n //desenha eixo x\n line(this.origin.x, this.origin.y, 0.95*this.width, this.origin.y)\n //desenha flecha abaixo do eixo x\n line(0.95*this.width,this.origin.y, 0.95*this.width-(arrowLength*cos(-PI/6)) , this.origin.y-(arrowLength*sin(-PI/6)))\n //desenha flecha acima do eixo y\n line(0.95*this.width,this.origin.y, 0.95*this.width-(arrowLength*cos(-PI/6)) , this.origin.y+(arrowLength*sin(-PI/6)))\n \n }", "function box_base_size(base, height, width, depth) {\n var trans1 = translate(0, .5, 0);\n var scale = scalem(width, height, depth);\n var trans = translate(base[0], base[1], base[2]);\n var both = mult(trans, mult(scale,trans1));\n return box_model().map((p) => mult(both,p));\n}", "function SetupLevel (){\n\tif(levelData.length <= 0){\n\t\tconsole.log(\"No Level data detected\");\n\t\treturn;\n\t}\n\tconsole.log(\"setting up the level\");\n\tgridData = levelData[0];\n\tcanvWidth = gridData[0];\n\tcanvHeight = gridData[1];\n\tgridSize = gridData[2];\n\t\n\twinPlace = null;\n\twallPoints = [];\n\tlavaPoints = [];\n\t\n\tif(levelData[0][4] == 1){\n\t\tDrawGrid();\n\t}\n\t\n\tif(levelData[1].length >0){\n\t\tDrawAppleAt(levelData[1][0][0], levelData[1][0][1]);\n\t}\n\t\n\tfor(var i = 0; i < levelData[2].length; i++){\n\t\tDrawWallAt(levelData[2][i][0], levelData[2][i][1], levelData[2][i][2]);\n\t}\n\t\n\tfor(var i = 0; i < levelData[3].length; i++){\n\t\tDrawDoorwayAt(levelData[3][i][0], levelData[3][i][1], levelData[3][i][2]);\n\t}\n\t\n\tfor(var i = 0; i < levelData[4].length; i++){\n\t\tDrawDeadlyCellAt(levelData[4][i][0], levelData[4][i][1]);\n\t}\n\t\n\tfor(var i = 0; i < levelData[5].length; i++){\n\t\tDrawBridgeAt(levelData[5][i][0], levelData[5][i][1], levelData[5][i][2]);\n\t}\n\t\n\t\n\tconsole.log(\"level setup complete\");\n}", "calcolaArea() {\n\n return (this.base * this.altezza) / 2; \n }", "function borders(){\n var N;\n N = getShape(\"halcon\");\n console.log(N);\n if (N.x >1000){\n N.x = 0;\n }\n if (N.x < 0){\n N.x = 1000;\n }\n if(N.y<-50){\n N.y = 500;\n }\n if(N.y >500){\n N.y = -50;\n }\n}", "function makelabyrinth(){\n\t// dibujando el borde\n\tlines.push(new line(10, 10, 580, 20));\n\tlines.push(new line(10, 570, 580, 20));\n\tlines.push(new line(10, 10, 20, 290));\n\tlines.push(new line(0, 280, 20, 20));\n\tlines.push(new line(0, 340, 20, 20));\n\tlines.push(new line(10, 340, 20, 250));\n\tlines.push(new line(570, 340, 20, 250));\n\tlines.push(new line(570, 10, 20, 290));\n\tlines.push(new line(570, 340, 40, 20));\n\tlines.push(new line(570, 280, 40, 20));\n\n\t// dibujando dentro\n\t// t rara\n\tlines.push(new line(60, 60, 70, 20));\n\tlines.push(new line(130, 60, 20, 100));\n\tlines.push(new line(180, 60, 90, 100));\n\tlines.push(new line(60, 110, 40, 50));\n\n\t// bordes que sobresalen\n\tlines.push(new line(300, 10, 20, 150));\n\tlines.push(new line(300, 460, 20, 110));\n\n\t// cuadrados\n\tlines.push(new line(250, 195, 120, 30));\n\tlines.push(new line(350, 120, 190, 40));\n\tlines.push(new line(350, 60, 190, 30));\n\tlines.push(new line(400, 195, 140, 30));\n\tlines.push(new line(60, 195, 160, 30));\n\tlines.push(new line(350, 460, 90, 80));\n\tlines.push(new line(170, 460, 100, 80));\n\tlines.push(new line(110, 460, 30, 110));\n\tlines.push(new line(65, 460, 10, 80));\n\tlines.push(new line(470, 460, 30, 110));\n\tlines.push(new line(530, 460, 10, 80));\n\tlines.push(new line(60, 260, 120, 130));\n\tlines.push(new line(440, 260, 100, 130));\n\n\n\t// centro de salida de fantasmas\n\tlines.push(new line(250, 340, 120, 10));\n\tlines.push(new line(250, 260, 10, 80));\n\tlines.push(new line(250, 260, 40, 10));\n\tlines.push(new line(330, 260, 40, 10));\n\tlines.push(new line(360, 260, 10, 80));\n\n\t// relleno luego del centro\n\tlines.push(new line(210, 340, 10, 80));\n\tlines.push(new line(210, 220, 10, 80));\n\tlines.push(new line(250, 390, 120, 40));\n\tlines.push(new line(250, 195, 120, 0));\n\tlines.push(new line(60, 420, 160, 10));\n\tlines.push(new line(400, 220, 140, 10));\n\tlines.push(new line(60, 220, 160, 10));\n\tlines.push(new line(400, 220, 10, 80));\n\tlines.push(new line(400, 340, 10, 80));\n\tlines.push(new line(400, 420, 140, 10));\n\n}", "subdivide(){\n\tthis.divided = true;\n\tlet x = this.boundary.x;\n\tlet y = this.boundary.y;\n\tlet w = this.boundary.w;\n\tlet h = this.boundary.h;\n\n\tlet ne = new Rectangle(x+0.5*w, y-0.5*h, 0.5*w, 0.5*h);\n\tlet se = new Rectangle(x+0.5*w, y+0.5*h, 0.5*w, 0.5*h);\n\tlet sw = new Rectangle(x-0.5*w, y+0.5*h, 0.5*w, 0.5*h);\n\tlet nw = new Rectangle(x-0.5*w, y-0.5*h, 0.5*w, 0.5*h);\n\tthis.northeast = new QuadTree(ne, this.capacity);\n\tthis.southeast = new QuadTree(se, this.capacity);\n\tthis.southwest = new QuadTree(sw, this.capacity);\n\tthis.northwest = new QuadTree(nw, this.capacity);\n }", "function area(r) {\n \n return r*r\n}", "function triArea(base, height) {\n return (base*height)/2;\n}", "function templateHighIsland() {\n addStep(\"Hill\", \"1\", \"90-100\", \"65-75\", \"47-53\");\n addStep(\"Add\", 5, \"all\");\n addStep(\"Hill\", \"6\", \"20-23\", \"25-55\", \"45-55\");\n addStep(\"Range\", \"1\", \"40-50\", \"45-55\", \"45-55\");\n addStep(\"Smooth\", 2);\n addStep(\"Trough\", \"2-3\", \"20-30\", \"20-30\", \"20-30\");\n addStep(\"Trough\", \"2-3\", \"20-30\", \"60-80\", \"70-80\");\n addStep(\"Hill\", \"1\", \"10-15\", \"60-60\", \"50-50\");\n addStep(\"Hill\", \"1.5\", \"13-16\", \"15-20\", \"20-75\");\n addStep(\"Multiply\", .8, \"20-100\");\n addStep(\"Range\", \"1.5\", \"30-40\", \"15-85\", \"30-40\");\n addStep(\"Range\", \"1.5\", \"30-40\", \"15-85\", \"60-70\");\n addStep(\"Pit\", \"2-3\", \"10-15\", \"15-85\", \"20-80\");\n }", "function equilatGrid(L,R,dx,dy){\n let yVals = [];\n let ytip = 70;\n let xtip = 300;\n let yChange = dy/10;\n let xChange = 2*dx/10\n for(let i = 0; i < 9; i++){\n yVals.push((ytip+dy)-yChange*(i+1));\n }\n push();\n let x1, x2, y1, y2;\n // Carrier grid\n stroke(255,100,0,80);\n for(let i = 0; i < yVals.length; i++){\n y1 = yVals[i];\n x1 = (y1-L[1])/L[0];\n y2 = ytip + dy;\n x2 = (xtip-dx) + xChange*(i+1);\n line(x1,y1,x2,y2);\n }\n \n // Solvent grid\n stroke(128,0,128,80);\n for(let i = 0; i < yVals.length; i++){\n y1 = yVals[i];\n x1 = (y1-R[1])/R[0];\n y2 = ytip + dy;\n x2 = (xtip+dx) - xChange*(i+1);\n line(x1,y1,x2,y2);\n }\n // Solute grid\n stroke(0,0,255,80);\n for(let i = 0; i < yVals.length; i++){\n y1 = yVals[i];\n x1 = (y1-L[1])/L[0];\n y2 = y1;\n x2 = (y2-R[1])/R[0];\n line(x1,y1,x2,y2);\n }\n pop();\n}", "function calculateActualDoorDimension(width, height, type) {\n\n //If the type is Cabana, perform the following block\n if (type === 'Cabana') {\n //Return width and height, may change if the model is M400\n return {\n width: (model === 'M400') ? width + 3.625 : width + 2.125,\n height: (model === 'M400') ? height + 2.125 : height + 0.875\n };\n }\n //If the type is French, perform the following block\n else if (type === 'French') {\n //Return width and height, may change if the model is M400\n return {\n width: (model === 'M400') ? ((width/2 + 3.625) - 1.625)*2 + 2 : ((width/2 + 2.125) - 1.625)*2 + 2,\n height: (model === 'M400') ? height + 2.125 : height + 0.875\n };\n }\n //If the type is Patio, perform the following block\n else if (type == 'Patio') {\n //Return width and height, may change if the model is M400\n return {\n width: (model === 'M400') ? width + 3.625 : width + 2.125,\n height: (model === 'M400') ? height + 1.625 : height + 1.125\n };\n }\n //Else, perform the following block\n else {\n //Return width and height, no changes for no door (Open space)\n return {\n width: width,\n height: height\n };\n }\n}", "function makeCone (radialdivision, heightdivision) {\n // fill in your code here.\n\tvar triangles = [];\n\tvar circ_triangles = []; // Contains triangles from the top and bottom\n\tvar side_triangles = []; // Contains triangles from the side and \n\n\tvar Bottom_Center = [0, -0.5, 0];\n\tvar Apex = [0, 0.5, 0];\n\n\tconst radius = 0.5;\n\tvar alpha_deg = 0.0;\n\tvar step = 360 / radialdivision;\n\n\t\n\n\tfor(var i=0; i<radialdivision; i++){\n\t\tvar b0 = [radius * Math.cos(radians(alpha_deg)), -0.5, radius * Math.sin(radians(alpha_deg))];\n\t\talpha_deg += step;\n\t\tvar b1 = [radius * Math.cos(radians(alpha_deg)), -0.5, radius * Math.sin(radians(alpha_deg))];\n\n\t\tcirc_triangles.push([Bottom_Center, b0, b1]);\n\n\t\t//side_triangles.push([Apex, b1, b0]);\n\t\tvar m0 = [b0[0], b0[1], b0[2]];\n\t\tvar m1 = [b1[0], b1[1], b1[2]];\n\t\tvar x0_step = (Apex[0] - b0[0]) / heightdivision;\n\t\tvar y0_step = (Apex[1] - b0[1]) / heightdivision;\n\t\tvar z0_step = (Apex[2] - b0[2]) / heightdivision;\n\t\tvar x1_step = (Apex[0] - b1[0]) / heightdivision;\n\t\tvar y1_step = (Apex[1] - b1[1]) / heightdivision;\n\t\tvar z1_step = (Apex[2] - b1[2]) / heightdivision;\n\n\t\tfor(var j=0; j<heightdivision; j++){\n\t\t\tif(j == heightdivision - 1){\n\t\t\t\tside_triangles.push([Apex, m1, m0]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tvar m2 = [m0[0] + x0_step, m0[1]+y0_step, m0[2]+z0_step];\n\t\t\t\tvar m3 = [m1[0] + x1_step, m1[1]+y1_step, m1[2]+z1_step];\n\t\t\t\tside_triangles.push([m2, m1, m0]);\n\t\t\t\tside_triangles.push([m3, m1, m2]);\n\n\t\t\t\tm0 = m2;\n\t\t\t\tm1 = m3;\n\t\t\t}\n\t\t}\n\t}\n\n\ttriangles = circ_triangles.concat(side_triangles);\n\n\t// add triangles to finish the make process\n\tfor (tri of triangles){\n\t\taddTriangle(\n\t\t\ttri[0][0], tri[0][1], tri[0][2],\n\t\t\ttri[1][0], tri[1][1], tri[1][2],\n\t\t\ttri[2][0], tri[2][1], tri[2][2]\n\t\t\t);\n\t}\n}", "function area() {\n var area = 0;\n area += (p1.x + p3.x) * (p3.y - p1.y);\n area += (p2.x + p1.x) * (p1.y - p2.y);\n area += (p3.x + p2.x) * (p2.y - p3.y);\n return area / 2;\n }", "function momentNormalize() {\n\t\t\t\n\t\tnewHeight = 256;\n\t\tnewWidth = 256;\n\t\txMin = 256;\n\t\txMax = 0;\n\t\tyMin = 256;\n\t\tyMax = 0;\n\t\t// first determine drawn character width / length\n\t\tfor(var i = 0;i<recordedPattern.length;i++) {\n\t\t var stroke_i = recordedPattern[i];\n\t\t for(var j = 0; j<stroke_i.length;j++) {\n\t\t\tx = stroke_i[j][0];\n\t\t\ty = stroke_i[j][1];\n\t\t\tif(x < xMin) {\n\t\t\t xMin = x;\n\t\t\t}\n\t\t\tif(x > xMax) {\n\t\t\t xMax = x;\n\t\t\t}\n\t\t\tif(y < yMin) {\n\t\t\t yMin = y;\n\t\t\t}\n\t\t\tif(y > yMax) {\n\t\t\t yMax = y;\n\t\t\t}\n\t\t }\n\t\t}\t\n\t\toldHeight = Math.abs(yMax - yMin);\n\t\toldWidth = Math.abs(xMax - xMin);\n\t\t\t\n\t\tvar r2 = aran(oldWidth, oldHeight);\n\t\t\n\t\tvar aranWidth = newWidth;\n\t\tvar aranHeight = newHeight;\n\t\t\n\t\tif(oldHeight > oldWidth) {\n\t\t\taranWidth = r2 * newWidth; \n\t\t} else {\n\t\t\taranHeight = r2 * newHeight;\n\t\t}\t\t\n\t\t\t\t\n\t\tvar xOffset = (newWidth - aranWidth)/2;\n\t\tvar yOffset = (newHeight - aranHeight)/2; \n\t\t\n\t\tvar m00_ = m00(recordedPattern);\n\t\tvar m01_ = m01(recordedPattern);\n\t\tvar m10_ = m10(recordedPattern);\n\t\t\t\t\n\t\tvar xc_ = (m10_/m00_);\n\t\tvar yc_ = (m01_/m00_);\n\t\t\t\t\n\t\tvar xc_half = aranWidth/2;\n\t\tvar yc_half = aranHeight/2;\n\t\t\n\t\tvar mu20_ = mu20(recordedPattern, xc_);\n\t\tvar mu02_ = mu02(recordedPattern, yc_);\n\n\t\tvar alpha = (aranWidth) / (4 * Math.sqrt(mu20_/m00_));\n\t\tvar beta = (aranHeight) / (4 * Math.sqrt(mu02_/m00_));\n\t\t\t\n\t\tvar nf = new Array();\n\t\tfor(var i=0;i<recordedPattern.length;i++) {\n\t\t\tvar si = recordedPattern[i];\n\t\t\tvar nsi = new Array();\n\t\t\tfor(var j=0;j<si.length;j++) {\n\t\t\t\t\n\t\t\t\tvar newX = (alpha * (si[j][0] - xc_) + xc_half);\n\t\t\t\tvar newY = (beta * (si[j][1] - yc_) + yc_half);\n\t\t\t\t\n\t\t\t\tnsi.push([newX,newY]);\n\t\t\t}\n\t\t\tnf.push(nsi);\n\t\t}\n\n\t\treturn transform(nf, xOffset, yOffset);\n\t}", "function PlanarCoordinates() {\n var x1 = parseFloat(document.getElementById('x1').value);\n var y1 = parseFloat(document.getElementById('y1').value);\n var x2 = parseFloat(document.getElementById('x2').value);\n var y2 = parseFloat(document.getElementById('y2').value);\n var x3 = parseFloat(document.getElementById('x3').value);\n var y3 = parseFloat(document.getElementById('y3').value);\n\n var length = {\n lineLengthAtoB: countDistance(x1, y1, x2, y2),\n lineLengthBtoC: countDistance(x2, y2, x3, y3),\n lineLengthAtoC: countDistance(x1, y1, x3, y3)\n }\n\n function countDistance(varX1, varY1, varX2, varY2) {\n var result = Math.sqrt(((varX2 - varX1) * (varX2 - varX1)) +\n ((varY2 - varY1) * (varY2 - varY1)));\n\n return result;\n }\n\n var resultAtoB = Count(length.lineLengthAtoB.toString());\n var resultBtoC = Count(length.lineLengthBtoC.toString());\n var resultAtoC = Count(length.lineLengthAtoC.toString());\n\n function Count(str) {\n var i;\n var index = str.length;\n\n for (i = 0; i < str.length; i++) {\n if (str[i] === '.'.toString()) {\n index = i + 4;\n\n break;\n }\n }\n\n return str.substring(0, index);\n }\n\n var form = formTriangle(parseFloat(resultAtoB), parseFloat(resultBtoC), parseFloat(resultAtoC));\n\n function formTriangle(a, b, c) {\n var biggest = a;\n var second = b;\n var third = c;\n if (b > a && b > c) {\n biggest = b;\n second = a;\n } else if (c > a && c > b) {\n biggest = c;\n second = a;\n }\n\n var val = second + third;\n\n if (val > biggest) {\n return true;\n } else {\n return false;\n }\n }\n\n var endResult = 'Distanance:<br />A to B = <span style=\"color: red;\">' + resultAtoB + \n '</span><br />B to C = <span style=\"color: red;\">' + resultBtoC + '</span><br />A to C = <span style=\"color: red;\">' + \n resultAtoC + '</span><br />';\n endResult += 'Can the lines form a triangle? <span style=\"color: red;\">' + form + '</span>';\n\n document.getElementById('result1').innerHTML = '<h4>Result Task 1:</h4> ' + endResult;\n}", "function triArea(base, height) {\n return (base * height) / 2;\n}", "function triArea(base, height) {\n return (base * height) / 2;\n}", "function pyramid(nameOrM, l, bd, c) {\n var transform = new Transform();\n if (nameOrM[0]) scene.new_Part(nameOrM[1]);\n else transform = nameOrM[1];\n\n function isol() { // use l , bd ,c\n var norm = [0,0,1];\n var ts = transform.get_Trans();\n var tn = transform.get_Tnorm();\n var index = scene.get_Indexbase();\n\n function point(i, j) {\n var a = Math.sin(Math.PI / 3);\n if (i == 0) return [0, a * l, 0];\n return [l * (i / bd) * (j / i - 0.5), a * l * (1- i / bd), 0];\n }\n\n for(var i=0; i<=bd; i++){\n for(var j=0;j<=i;j++){\n var poi = point(i,j);\n scene.append_VBuffer([m4.transformPoint(ts,poi), c, m4.transformPoint(tn,norm)]);\n }\n }\n\n for(var i=0; i<bd; i++){\n var lu0 = index + i * (1+i)/2;\n var ld0 = lu0 + (i+ 1);\n scene.append_IBuffer([lu0, ld0 , ld0 + 1]);\n\n for(var j=0;j<i;j++){\n var lu = lu0 + j;\n var ld = ld0 + j+1;\n scene.append_IBuffer([lu, ld + 1, lu + 1, lu, ld, ld + 1]);\n }\n }\n }\n\n var theta = Math.acos(1/3);\n var alp = Math.sqrt(3);\n\n transform.save();\n transform.trans(m4.translation([0,-l*alp/6,0]),true);\n transform.trans(m4.scaling([1,1,-1]));\n isol();\n transform.restore();\n\n var Trans = new Transform();\n Trans.trans(m4.translation([0,-l*alp/6,0]),true);\n Trans.trans(m4.axisRotation([1,0,0],theta));\n\n transform.save();\n transform.trans_ByTrans(Trans);\n isol();\n transform.restore();\n\n transform.save();\n transform.trans(m4.rotationZ(Math.PI/3*2));\n transform.trans_ByTrans(Trans);\n isol();\n transform.restore();\n\n transform.save();\n transform.trans(m4.rotationZ(Math.PI/3*4));\n transform.trans_ByTrans(Trans);\n isol();\n transform.restore();\n }", "function calculate_the_length(x1,y1,x2,y2){\n let length_AB = Math.sqrt ((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2));\n console.log(length_AB)\n}", "function trajectoryGraphic () {\n var width = $window.innerWidth * .3;\n var height = $window.innerHeight * .52;\n var scene = new THREE.Scene();\n var camera = new THREE.PerspectiveCamera( 75, width/height , 0.1, 1000 );\n\n var renderer = new THREE.WebGLRenderer({antialias: true});\n renderer.setSize( width, height );\n $(\".trajectory\").append( renderer.domElement );\n \n var orbit = new THREE.OrbitControls(camera, renderer.domElement);\n\n var light = new THREE.AmbientLight( 0x888888 )\n scene.add( light )\n\n var light = new THREE.DirectionalLight( 0xFFFFFF)\n light.position.set(50,50,50)\n scene.add( light )\n\n //Define parameters for scaling data values to map size\n var scale = 50 / 6731;\n var offset = 50;\n var apogee = vm.mission.apogee * scale + offset;\n var perigee = vm.mission.perigee * scale + offset;\n var target_apogee = vm.mission.target_apogee * scale + offset;\n var target_perigee = vm.mission.target_perigee * scale + offset;\n\n //Given altitude, latitude, and longitude, determine (x,y,z)\n //Convert lat, lng to radians\n var lat = vm.mission.latitude * (Math.PI / 180);\n var lng = vm.mission.longitude * (Math.PI / 180);\n var altitude = vm.mission.altitude * scale + offset;\n var pos_y = altitude * Math.sin(lat);\n var pos_x = altitude * Math.cos(lng);\n var pos_z = altitude * Math.sin(lng);\n var position = [pos_x, pos_y, pos_z];\n var cam_position = [position[0], position[1] - offset/2, position[2]];\n\n var inclination = vm.mission.inclination * (Math.PI / 180);\n var targetInclination = vm.mission.target_inclination * (Math.PI / 180);\n console.log(altitude);\n console.log(position);\n\n\n //EARTH\n var radius = 50;\n var segments = 32;\n var rings = 32;\n\n var earthGeometry = new THREE.SphereGeometry(radius, segments, rings);\n var earthMaterial = new THREE.MeshPhongMaterial({\n map: THREE.ImageUtils.loadTexture(\"../../assets/earth_3.jpg\")\n // bumpMap: THREE.ImageUtils.loadTexture(\"../../assets/earth_bump.jpg\"),\n // color: 0xaaaaaa,\n // ambient: 0xaaaaaa,\n // specular: 0x333333,\n // bumpScale: 0.2,\n // shininess: 10\n });\n var earth = new THREE.Mesh( earthGeometry, earthMaterial );\n scene.add( earth );\n\n //Clouds\n var cloudGeometry = new THREE.SphereGeometry(51, 50, 50);\n var cloudMaterial = new THREE.MeshPhongMaterial({\n map: new THREE.ImageUtils.loadTexture(\"../../assets/earthcloudmaptrans.jpg\"),\n transparent: true,\n opacity: 0.08\n });\n var clouds = new THREE.Mesh(cloudGeometry, cloudMaterial);\n scene.add(clouds);\n\n //Stars\n var starsGeometry = new THREE.SphereGeometry(150, 32, 32)\n var starMaterial = new THREE.MeshBasicMaterial()\n starMaterial.map = THREE.ImageUtils.loadTexture('../../assets/galaxy_starfield.png')\n starMaterial.side = THREE.BackSide\n var starField = new THREE.Mesh(starsGeometry, starMaterial)\n scene.add(starField);\n\n //Spacecraft\n var radius = .5;\n var segments = 32;\n var rings = 32;\n\n var craftGeometry = new THREE.SphereGeometry(radius, segments, rings);\n var craftMaterial = new THREE.MeshPhongMaterial({color: 0xffffff});\n var craft = new THREE.Mesh( craftGeometry, craftMaterial );\n craft.position.set(position[0], position[1], position[2]);\n scene.add( craft );\n\n //Current Trajectory - Conditional check for changing camera location/orientation\n //based on current vehicle perigee.\n var focus_vector;\n if (vm.mission.perigee > 0) {\n //Draw elliptical orbit\n var ellipseMaterial = new THREE.LineBasicMaterial({color:0xffffff, opacity:1});\n var ellipse = new THREE.EllipseCurve(\n 0, 0, \n perigee, apogee,\n 0, 2.0 * Math.PI, \n false);\n var ellipsePath = new THREE.CurvePath(ellipse.getPoints(1000));\n ellipsePath.add(ellipse);\n var ellipseGeometry = ellipsePath.createPointsGeometry(100);\n var currentTrajectory = new THREE.Line(ellipseGeometry, ellipseMaterial);\n scene.add( currentTrajectory );\n currentTrajectory.rotation.x = Math.PI / 2;\n currentTrajectory.rotation.y = inclination;\n\n focus_vector = new THREE.Vector3(0, 0, 0);\n camera.position.set(0, 20, 100);\n } else {\n //Draw parabolic trajectory based off of current apogee\n var curve = new THREE.QuadraticBezierCurve(\n new THREE.Vector3( offset, 0, -apogee ),\n new THREE.Vector3( offset + apogee, 0, 0 ),\n new THREE.Vector3( offset, 0, apogee )\n );\n var path = new THREE.Path( curve.getPoints( 50 ) );\n var geometry = path.createPointsGeometry( 50 );\n var material = new THREE.LineBasicMaterial( { color : 0xffffff } );\n var currentTrajectory = new THREE.Line( geometry, material );\n scene.add(currentTrajectory);\n\n focus_vector = new THREE.Vector3(position[0], position[1], position[2]);\n camera.position.set(cam_position[0], cam_position[1], cam_position[2]);\n }\n\n //Target trajectory / orbit\n var targetMaterial = new THREE.LineDashedMaterial({\n color: 0xb3ebff, \n opacity:1, \n dashSize: 8,\n gapSize: 1\n });\n var targetOrbit = new THREE.EllipseCurve(\n 0,0,\n target_perigee, target_apogee, \n 0, 2.0 * Math.PI, \n false);\n var targetPath = new THREE.CurvePath(targetOrbit.getPoints(1000));\n targetPath.add(targetOrbit);\n var targetGeometry = targetPath.createPointsGeometry(100);\n var targetTrajectory = new THREE.Line(targetGeometry, targetMaterial);\n scene.add( targetTrajectory );\n targetTrajectory.rotation.x = Math.PI / 2;\n targetTrajectory.rotation.y = targetInclination;\n\n var vec = new THREE.Vector3( 0, 0, 0 );\n\n\n var render = function (actions) {\n earth.rotation.y += .0003;\n clouds.rotation.y += .0001;\n camera.lookAt(focus_vector);\n renderer.render(scene, camera);\n requestAnimationFrame( render );\n };\n render();\n }", "function NormalTerrain(width, persistence, iterations, frequency) {\n if (persistence <= 0 || persistence >= 1) {\n throw new Exception(\"0<p<1\");\n }\n var w = width;\n var p = persistence;\n var iter = iterations;\n var f = frequency;\n var interp = function(f00, f10, f01, f11, x, y) {\n var a00 = f00;\n var a10 = f10 - f00;\n var a01 = f01 - f00;\n var a11 = f11 + f00 - (f10 + f01);\n return a00 + a10 * x + a01 * y + a11 * x * y;\n }\n var generateFunction = function(amplitude, frequency) {\n var map = [];\n for (var i = 0; i < frequency; i++) {\n map[i] = [];\n for (var j = 0; j < frequency; j++) {\n map[i][j] = Math.random() * amplitude;\n }\n }\n return map;\n }\n\n var generatePerlin = function(amplitude, frequency) {\n var layers = [];\n var max = 0;\n for (var i = 0; i < iter; i++) {\n layers[i] = generateFunction(amplitude, frequency);\n max += amplitude;\n amplitude *= persistence;\n frequency /= persistence;\n }\n var map = [];\n for (var x = 0; x < width; x++) {\n map[x] = [];\n for (var y = 0; y < width; y++) {\n map[x][y] = 0;\n /*Iterate through layers*/\n for (var it = 0; it < iter; it++) {\n /*Iterate through layer*/\n var left = Math.floor((layers[it].length - 1) * x / width);\n var top = Math.floor((layers[it][0].length - 1) * y / width);\n\n if (!layers[it][left + 1] || !layers[it][left][top + 1]) {\n continue;\n }\n\n var f00 = layers[it][left][top];\n var f10 = layers[it][left + 1][top];\n var f01 = layers[it][left][top + 1];\n var f11 = layers[it][left + 1][top + 1];\n\n var square_width = width * 1 / (layers[it].length - 1);\n\n map[x][y] += interp(f00, f10, f01, f11, (x % square_width) / square_width, (y % square_width) / square_width) / max;\n }\n }\n }\n return map;\n }\n this.generate = function() {\n return generatePerlin(1, f);\n }\n}", "function DrawTheTree2(geom, x_init, y_init, z_init){\n var geometry = geom;\n var Wrule = GetAxiomTree();\n var n = Wrule.length;\n var stackX = []; var stackY = []; var stackZ = []; var stackA = [];\n var stackV = []; var stackAxis = [];\n\n var theta = params.theta * Math.PI / 180;\n var scale = params.scale;\n var angle = params.angle * Math.PI / 180;\n\n var x0 = x_init; var y0 = y_init; var z0 = z_init ;\n var x; var y; var z;\n var rota = 0, rota2 = 0,\n deltarota = 18 * Math.PI/180;\n var newbranch = false;\n var axis_x = new THREE.Vector3( 1, 0, 0 );\n var axis_y = new THREE.Vector3( 0, 1, 0 );\n var axis_z = new THREE.Vector3( 0, 0, 1 );\n var zero = new THREE.Vector3( 0, 0, 0 );\n var axis_delta = new THREE.Vector3(),\n prev_startpoint = new THREE.Vector3();\n\n\n // NEW\n var decrease = params.treeDecrease;\n var treeWidth = params.treeWidth;\n // END\n\n\n var startpoint = new THREE.Vector3(x0,y0,z0),\n endpoint = new THREE.Vector3();\n var bush_mark;\n var vector_delta = new THREE.Vector3(scale, scale, 0);\n var cylindermesh = new THREE.Object3D();\n\n for (var j=0; j<n; j++){\n\n treeWidth = treeWidth-decrease;\n var a = Wrule[j];\n if (a == \"+\"){angle -= theta;}\n if (a == \"-\"){angle += theta;}\n if (a == \"F\"){\n\n var a = vector_delta.clone().applyAxisAngle( axis_y, angle );\n endpoint.addVectors(startpoint, a);\n\n cylindermesh.add(cylinderMesh(startpoint,endpoint,treeWidth));\n\n prev_startpoint.copy(startpoint);\n startpoint.copy(endpoint);\n\n axis_delta = new THREE.Vector3().copy(a).normalize();\n rota += deltarota;\n }\n if (a == \"L\"){\n endpoint.copy(startpoint);\n endpoint.add(new THREE.Vector3(0, scale*1.5, 0));\n var vector_delta2 = new THREE.Vector3().subVectors(endpoint, startpoint);\n vector_delta2.applyAxisAngle( axis_delta, rota2 );\n endpoint.addVectors(startpoint, vector_delta2);\n\n cylindermesh.add(cylinderMesh(startpoint,endpoint,treeWidth));\n\n rota2 += 45 * Math.PI/180;\n }\n if (a == \"%\"){\n\n }\n if (a == \"[\"){\n stackV.push(new THREE.Vector3(startpoint.x, startpoint.y, startpoint.z));\n stackA[stackA.length] = angle;\n }\n if (a == \"]\"){\n var point = stackV.pop();\n startpoint.copy(new THREE.Vector3(point.x, point.y, point.z));\n angle = stackA.pop();\n }\n bush_mark = a;\n }\n return cylindermesh;\n}", "function Ay(t,e,n){var r=t.getResolution(n),i=my(t,e[0],e[1],r,!1),o=py(i,2),a=o[0],s=o[1],l=my(t,e[2],e[3],r,!0),u=py(l,2),c=u[0],d=u[1];return{minX:a,minY:s,maxX:c,maxY:d}}", "function setupTavern() {\n\n//draw a grid\n//make objects of each area\n\n\n}", "function calcArea () {\n\tvar width = 20;\n\tvar height = 30;\n\tvar area = width * height;\n console.log(area);\n}", "function areaCalculator(length, width) {\n let area = length * width;\n return area;\n}", "function Grid(pins, x_max, y_max) {\n //this.Density = density;\n this.x_max = x_max;\n this.y_max = y_max;\n var H_Lat = -91;\n var L_Lat = 91;\n var H_Long = -181;\n var L_Long = 181;\n\n pins.forEach(function(pin){\n if (pin.Latitude > H_Lat && pin.Latitude !== null) {\n H_Lat = pin.Latitude;\n console.log(\"New H_Lat: \" + pin.Latitude);\n }\n\n if (pin.Latitude < L_Lat && pin.Latitude !== null){\n L_Lat = pin.Latitude;\n console.log(\"New L_Lat: \" + pin.Latitude);\n }\n\n if (pin.Longitude > H_Long && pin.Longitude !== null){\n H_Long = pin.Longitude;\n console.log(\"New H_Long: \" + pin.Longitude);\n }\n\n if (pin.Longitude < L_Long && pin.Longitude !== null) {\n L_Long = pin.Longitude;\n console.log(\"New L_Long: \" + pin.Longitude);\n }\n\n });\n\n var lat_extend = (H_Lat - L_Lat) * .025;\n var long_extend = (H_Long - L_Long) * .025;\n\n H_Lat = H_Lat + lat_extend;\n L_Lat = L_Lat - lat_extend;\n H_Long = H_Long + long_extend;\n L_Long = L_Long - long_extend;\n\n //console.log(\"HLat: \" + String(H_Lat) + \" \\ LLat: \" + String(L_Lat));\n //console.log(\"HLong: \" + String(H_Long) + \" \\ LLong: \" + String(L_Long));\n\n var chunkCollection = [];\n\n for (var a = 0; a <= this.y_max; a++) {\n chunkCollection.push(new Array(this.x_max));\n }\n\n// solve for distance\n\n var recHeight = (H_Lat - L_Lat) / y_max;\n var recWidth = (H_Long - L_Long) / x_max;\n\n //console.log(\"rec width: \" + recWidth);\n //console.log(\"rec height: \" + recHeight);\n\n// the distance from point 10 and point 4 is\n// Density is how many rectangles will be on screen.\n\n\n for (var y = 0; y < y_max; y++) {\n for (var x = 0; x < x_max; x++) {\n // Creates the boundary, lowest point with lowest corner\n // to create a side of the cube.\n // merge the google maps.\n\n chunkCollection[x][y] = new Chunk(x, y,\n recWidth, recHeight, L_Lat, L_Long);\n }\n }\n\n pins.forEach(function (p) {\n\n var lat_index = (p.Latitude - L_Lat) / recHeight;\n var long_index = (p.Longitude - L_Long) / recWidth;\n\n lat_index = parseInt(lat_index);\n long_index = parseInt(long_index);\n\n try {\n chunkCollection[long_index][lat_index].addPin(p);\n } catch (e) {\n console.log(\"valid: \" + p.isValid());\n\n console.log(\"P| lat:\" + p.Latitude + \" long:\" + p.Longitude);\n console.log(\"P| latI:\" + lat_index + \" longI:\" + long_index);\n console.error(\"Data is not possible! Something fucked up\");\n }\n\n });\n\n this.getChunk = function (x, y) {\n try {\n return chunkCollection[y][x];\n } catch (e) {\n console.warn(\"Out of bounds!\");\n }\n };\n\n this.getChunks = function() {\n var chunks = [];\n\n for (var y = 0; y < this.y_max; y++) {\n for (var x = 0; x < this.x_max; x++) {\n if (!chunkCollection[x][y].isEmpty()){\n chunks.push(chunkCollection[x][y]);\n }\n }\n }\n\n return chunks;\n };\n\n this.draw = function(map){\n chunkCollection.forEach(function(col){\n col.forEach(function(chunk){\n chunk.draw(map);\n });\n });\n };\n\n this.getFarms = function () {\n var farms = [];\n for (var y = 0; y < this.y_max; y++) {\n for (var x = 0; x < this.x_max; x++) {\n var chunk = chunkCollection[x][y];\n if (chunk !== null && !chunk.isEmpty()){\n var chunks = chunk.getSurrounding(this, null);\n var pins = [];\n for (var i = 0; i < chunks.length; i++){\n for (var ii = 0; ii < chunks[i].pins.length; ii++){\n pins.push(chunks[i].pins[ii]);\n }\n }\n var farm = new Farm(pins, false);\n chunks.forEach(function(chunk){\n chunkCollection[chunk.x][chunk.y] = new Chunk();\n });\n if (!(farm.pins.length < 100))\n farms.push(farm);\n }\n }\n }\n return farms;\n };\n\n this.getEdgeChunks = function (){\n var edgeChunks = [];\n var that = this;\n\n chunkCollection.forEach(function(col){\n col.forEach(function(chunk){\n if (chunk.isEdge(that, this.x_max, this.y_max))\n edgeChunks.push(chunk)\n });\n });\n\n return edgeChunks;\n };\n\n this.getLiveChunks = function (){\n var live = [];\n var chunks = this.getChunks();\n for (var i = 0; i < chunks.getChunks().length; i++){\n if (chunks[i].pinCount > 0)\n live.push(chunks[i]);\n }\n return live;\n };\n\n this.getCenter = function(){\n return {lat: L_Lat + ((H_Lat - L_Lat)/2), lng: L_Long + ((H_Long - L_Long)/2)};\n }\n}", "addMazeOuterWalls(level, gridSize, gridScale) {\n for (let j = 0; j < gridSize; j++) {\n const normal = new Vector3(1, 0, 0);\n let x = -1 * gridScale;\n let y = level * gridScale;\n let z = (j - 0.5) * gridScale;\n const pos = new Vector3(x, y, z);\n this.addWall(pos, normal, gridScale);\n x = gridScale * (gridSize - 1);\n pos = new Vector3(x, y, z);\n this.addWall(pos, normal, gridScale);\n }\n for (let i = 0; i < gridSize; i++) {\n const normal = new Vector3(0, 0, 1);\n let x = (i - 0.5) * gridScale;\n let y = level * gridScale;\n let z = -1 * gridScale;\n const pos = new Vector3(x, y, z);\n this.addWall(pos, normal, gridScale);\n z = gridScale * (gridSize - 1);\n pos = new Vector3(x, y, z);\n this.addWall(pos, normal, gridScale);\n }\n //this.addFloor(0, gridSize, gridScale, true);\n //this.addFloor(1, gridSize, gridScale, false);\n }", "createLights() {\n var lightA = this.matter.add.image(1270, 780, 'light', null, {\n shape: 'rectangle'\n\n }).setScale(1);\n\n this.matter.add.worldConstraint(lightA, 80, 0.1, {\n pointA: {\n x: 1220,\n y: 750\n },\n pointB: {\n x: -20,\n y: 0\n },\n });\n\n this.matter.add.worldConstraint(lightA, 80, 0.1, {\n pointA: {\n x: 1300,\n y: 750\n },\n pointB: {\n x: 20,\n y: 0\n }\n });\n\n var lightB = this.matter.add.image(1370, 780, 'light', null, {\n shape: 'rectangle'\n }).setScale(1);\n\n this.matter.add.worldConstraint(lightB, 80, 0.1, {\n pointA: {\n x: 1320,\n y: 750\n },\n pointB: {\n x: -20,\n y: 0\n }\n });\n\n this.matter.add.worldConstraint(lightB, 80, 0.1, {\n pointA: {\n x: 1400,\n y: 750\n },\n pointB: {\n x: 20,\n y: 0\n }\n });\n\n var lightC = this.matter.add.image(1470, 780, 'light', null, {\n shape: 'rectangle'\n }).setScale(1);\n\n this.matter.add.worldConstraint(lightC, 80, 0.1, {\n pointA: {\n x: 1420,\n y: 750\n },\n pointB: {\n x: -20,\n y: 0\n }\n });\n\n this.matter.add.worldConstraint(lightC, 80, 0.1, {\n pointA: {\n x: 1500,\n y: 750\n },\n pointB: {\n x: 20,\n y: 0\n }\n });\n\n var lightD = this.matter.add.image(1570, 780, 'light', null, {\n shape: 'rectangle'\n }).setScale(1);\n\n this.matter.add.worldConstraint(lightD, 80, 0.1, {\n pointA: {\n x: 1520,\n y: 750\n },\n pointB: {\n x: -20,\n y: 0\n }\n });\n\n this.matter.add.worldConstraint(lightD, 80, 0.1, {\n pointA: {\n x: 1600,\n y: 750\n },\n pointB: {\n x: 20,\n y: 0\n }\n });\n\n var lightE = this.matter.add.image(1670, 780, 'light', null, {\n shape: 'rectangle'\n }).setScale(1);\n\n this.matter.add.worldConstraint(lightE, 80, 0.1, {\n pointA: {\n x: 1620,\n y: 750\n },\n pointB: {\n x: -20,\n y: 0\n }\n });\n\n this.matter.add.worldConstraint(lightE, 80, 0.1, {\n pointA: {\n x: 1700,\n y: 750\n },\n pointB: {\n x: 20,\n y: 0\n }\n });\n\n var lightF = this.matter.add.image(1770, 780, 'light', null, {\n shape: 'rectangle'\n }).setScale(1);\n\n this.matter.add.worldConstraint(lightF, 80, 0.1, {\n pointA: {\n x: 1720,\n y: 750\n },\n pointB: {\n x: -20,\n y: 0\n }\n });\n\n this.matter.add.worldConstraint(lightF, 80, 0.1, {\n pointA: {\n x: 1800,\n y: 750\n },\n pointB: {\n x: 20,\n y: 0\n }\n });\n }", "update_xyz_limits(){\n //get the model in meters\n let z = this.xyz[2] //already in meters\n let dir = this.direction\n let [inner_r, outer_r, outer_circle_center_xy] = Kin.xy_donut_slice_approx(z, dir)\n let inner_xy = [0, 0] //and by the way, for now, outer_circle_center_xy will also always be [0,0],\n // but that will likely change\n\n let current_max_z = Kin.max_z(this.xyz[0], this.xyz[1], dir) //*might* return NaN\n let current_max_z_px = (Number.isNaN(current_max_z) ? 0 : Math.round(this.meters_to_z_px(current_max_z)) + \"px\")\n\n //convert to pixels\n let outer_r_px = (Number.isNaN(current_max_z) ? 0 : this.radius_meters_to_px(outer_r))\n let outer_x_px = this.meters_to_x_px(outer_circle_center_xy[0])\n let outer_y_px = this.meters_to_y_px(outer_circle_center_xy[1])\n\n let inner_r_px = (Number.isNaN(current_max_z) ? 0 : this.radius_meters_to_px(inner_r))\n let inner_x_px = this.meters_to_x_px(inner_xy[0])\n let inner_y_px = this.meters_to_y_px(inner_xy[1])\n //draw\n selector_set_in_ui(\"#\" + this.show_window_elt_id + \" svg [style] [background-color]\", dui2.xy_background_color)\n //ebugger;\n selector_set_in_ui(\"#\" + this.show_window_elt_id + \" svg [id=outer_circle] [r]\", outer_r_px)\n selector_set_in_ui(\"#\" + this.show_window_elt_id + \" svg [id=outer_circle] [cx]\", outer_x_px)\n selector_set_in_ui(\"#\" + this.show_window_elt_id + \" svg [id=outer_circle] [cy]\", outer_y_px)\n\n selector_set_in_ui(\"#\" + this.show_window_elt_id + \" svg [id=inner_circle] [r]\", inner_r_px)\n selector_set_in_ui(\"#\" + this.show_window_elt_id + \" svg [id=inner_circle] [cx]\", inner_x_px)\n selector_set_in_ui(\"#\" + this.show_window_elt_id + \" svg [id=inner_circle] [cy]\", inner_y_px)\n\n selector_set_in_ui(\"#\" + this.show_window_elt_id + \" [name=z_slider] [max]\", current_max_z)\n selector_set_in_ui(\"#\" + this.show_window_elt_id + \" [name=z_slider] [value]\", z)\n selector_set_in_ui(\"#\" + this.show_window_elt_id + \" [name=z_slider] [style] [width]\", current_max_z_px)\n\n\n }", "function draw() {\n\n// This is the colourful wall.\nbackground(bg.r,bg.g,bg.b);\n\n\nbg.r= map(mouseX,0, width,20,255);\nbg.r= map(mouseY,0, height,50,255);\nbg.g= map(mouseX,0, width,0,255);\nbg.b= map(mouseY,0, height,0,255);\n\n// This is the house perimeter.\nrectMode(CENTER);\nfill(house.fill.r, house.fill.g, house.fill.b, house.alpha);\nrect(house.x, house.y, house.size, house.size);\nhouse.size += house.biggerSize;\nhouse.size = constrain(house.size,0,house.maxSize);\n\n\n\n// Alien1 (Perry)\nalien1.x+=alien1.speed;\nalien1.x = constrain(alien1.x,0,380);\nfill(alien1.fill.r,alien1.fill.g,alien1.fill.b);\nellipse(alien1.x,alien1.y,alien1.width,alien1.height);\n\n// Alien1's eyes.\nfill(alien1.eye1.fill);\nfill(alien1.eye2.fill);\nalien1.eye1.x+=alien1.speed;\nalien1.eye1.x = constrain(alien1.eye1.x,0,390);\nalien1.eye2.x+=alien1.speed;\nalien1.eye2.x = constrain(alien1.eye2.x,0,350);\nellipse(alien1.eye1.x,alien1.eye1.y,alien1.eye1.size);\nellipse(alien1.eye2.x,alien1.eye2.y,alien1.eye2.size);\n\n\n// Alien2 (Lola)\nalien2.x-=alien2.speed;\nalien2.x = constrain(alien2.x,100,380);\nfill(alien2.fill.r,alien2.fill.g,alien2.fill.b);\nellipse(alien2.x,alien2.y,alien2.width,alien2.height);\n\n// Alien2's eyes.\nfill(alien2.eye1.fill);\nfill(alien2.eye2.fill);\nalien2.eye1.x-=alien2.speed;\nalien2.eye1.x = constrain(alien2.eye1.x,70,380);\nalien2.eye2.x-=alien2.speed;\nalien2.eye2.x = constrain(alien2.eye2.x,110,340);\nellipse(alien2.eye1.x,alien2.eye1.y,alien2.eye1.size);\nellipse(alien2.eye2.x,alien2.eye2.y,alien2.eye2.size);\n\n\n\n\n}", "function smurfBox(){\n\tvar width =2;\n\tvar height = 3;\n\tvar length = 3;\n\tvar area = width*height*length;\n\tconsole.log(area);\n}", "function fitToBorders() {\n\t\t\t\t\tvar xa = Math.abs(plane.position.z) * Math.tan(angleX),\n\t\t\t\t\t\tya = Math.abs(plane.position.z) * Math.tan(angleY);\n\n\t\t\t\t\tvar cWidth = 2 * xa,\n\t\t\t\t\t\tcHeight = 2 * ya;\n\t\t\t\t\tvar iWidth = Math.abs(plane.position.x - imageAspect / 2) + Math.abs(plane.position.x + imageAspect / 2),\n\t\t\t\t\t\tiHeight = Math.abs(plane.position.y - 0.5) + Math.abs(plane.position.y + 0.5);\n\n\n\t\t\t\t\tif (imageAspect < canvasAspect && cWidth > iWidth) {\n\t\t\t\t\t\tif (xa < plane.position.x + imageAspect / 2)\n\t\t\t\t\t\t\tplane.translateX(xa - (plane.position.x + imageAspect / 2));\n\t\t\t\t\t\tif (-xa > plane.position.x - imageAspect / 2)\n\t\t\t\t\t\t\tplane.translateX(-xa - (plane.position.x - imageAspect / 2));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (xa > plane.position.x + imageAspect / 2)\n\t\t\t\t\t\t\tplane.translateX(xa - (plane.position.x + imageAspect / 2));\n\t\t\t\t\t\tif (-xa < plane.position.x - imageAspect / 2)\n\t\t\t\t\t\t\tplane.translateX(-xa - (plane.position.x - imageAspect / 2));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (imageAspect > canvasAspect && cHeight > iHeight) {\n\t\t\t\t\t\tif (ya < plane.position.y + 0.5)\n\t\t\t\t\t\t\tplane.translateY(ya - (plane.position.y + 0.5));\n\t\t\t\t\t\tif (-ya > plane.position.y - 0.5)\n\t\t\t\t\t\t\tplane.translateY(-ya - (plane.position.y - 0.5));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (ya > plane.position.y + 0.5)\n\t\t\t\t\t\t\tplane.translateY(ya - (plane.position.y + 0.5));\n\t\t\t\t\t\tif (-ya < plane.position.y - 0.5)\n\t\t\t\t\t\t\tplane.translateY(-ya - (plane.position.y - 0.5));\n\t\t\t\t\t}\n\n\t\t\t\t}", "function areaTriangulo (base, altura){\n return (base * altura)/ 2;\n}", "getSurfaceArea() {\n const surfaceArea = 6 * Math.pow(this.length, 2);\n return +surfaceArea.toFixed(3);\n }", "function drawMountains()\n{\n for (var i = 0; i < mountains.length; i++)\n {\n fill(160,90,50);\n triangle(mountains[i].x_pos+380, mountains[i].y_pos+435, mountains[i].x_pos+580, mountains[i].y_pos+200, mountains[i].x_pos+750, mountains[i].y_pos+435);\n fill(255,222,173);\n ellipse(mountains[i].x_pos+650, mountains[i].y_pos+230, mountains[i].size+50, mountains[i].size+50);\n ellipse(mountains[i].x_pos+650, mountains[i].y_pos+280, mountains[i].size+70, mountains[i].size+60);\n ellipse(mountains[i].x_pos+590, mountains[i].y_pos+280, mountains[i].size+100, mountains[i].size+55);\n ellipse(mountains[i].x_pos+550, mountains[i].y_pos+275, mountains[i].size+100, mountains[i].size+55);\n ellipse(mountains[i].x_pos+590, mountains[i].y_pos+220, mountains[i].size+100, mountains[i].size+55);\n ellipse(mountains[i].x_pos+600, mountains[i].y_pos+250, mountains[i].size+100, mountains[i].size+55);\n ellipse(mountains[i].x_pos+565, mountains[i].y_pos+250, mountains[i].size+100, mountains[i].size+55);\n ellipse(mountains[i].x_pos+570, mountains[i].y_pos+270, mountains[i].size+100, mountains[i].size+55);\n fill(150,80,10);\n triangle(mountains[i].x_pos+480, mountains[i].y_pos+435, mountains[i].x_pos+650, mountains[i].y_pos+300, mountains[i].x_pos+840, mountains[i].y_pos+435);\n }\n}", "function Tracador3DWGL (aExpressao, aDominioInicial, aDominioIntervalo, aDominioPontos, aCor)\r\n\r\n{\r\n\tthis.erro= '';\r\n\tthis.angulo= 45;\r\n\tthis.calculadora3D= new Calculadora (aExpressao, ['x', 'y']);\r\n\tthis.dominioInicial= parseFloat (aDominioInicial);\r\n\tthis.dominioIntervalo= parseFloat (aDominioIntervalo);\r\n\tthis.dominioPontos= parseInt (aDominioPontos, 10);\r\n\tthis.dominioFinal= this.dominioInicial + this.dominioIntervalo*(this.dominioPontos-1);\r\n\tthis.imagemInicial= 0;\r\n\tthis.imagemFinal= 0;\r\n\tthis.cor= aCor ? aCor : [0.25, 0.41, 0.88, 1];\r\n\tthis.wgl= 0;\r\n\tthis.operador= 0;\r\n\tthis.matrizProjection= 0;\r\n\r\n\tif (isNaN (this.dominioInicial))\r\n\t\tthis.erro= 'Dominio inicial deve ser um numero real';\r\n\telse if (isNaN (this.dominioFinal))\r\n\t\tthis.erro= 'Dominio final deve ser um numero real';\r\n\telse if (isNaN (this.dominioIntervalo) || (this.dominioIntervalo == 0) || (this.dominioIntervalo < -16384) || (this.dominioIntervalo > 16384))\r\n\t\tthis.erro= 'Intervalo entre pontos do dominio deve ser um numero real diferente de 0 entre -16384 e 16384';\r\n\telse if (isNaN (this.dominioPontos) || (this.dominioPontos < 2) || (this.dominioPontos > 16384))\r\n\t\tthis.erro= 'Qtd pontos do dominio deve ser um numero inteiro entre 2 e 16384';\r\n\telse if (this.dominioInicial >= this.dominioFinal)\r\n\t\tthis.erro= 'Dominio inicial (' + this.dominioInicial + ') deve ser menor que o final (' + this.dominioFinal + ')';\r\n\telse if (this.calculadora3D.erroExp != '')\r\n\t\tthis.erro= 'Expressao incorreta: ' + this.calculadora3D.erroExp;\r\n}", "createRooms() {\n // Generates all the rooms and hallways for this Leaf and all of its children\n if (this.leftChild !== null || this.rightChild !== null) {\n // This leaf has been split, so go into the children leafs\n if (this.leftChild !== null) this.leftChild.createRooms();\n if (this.rightChild !== null) this.rightChild.createRooms();\n\n // If there are both left and right children in this Leaf, create a hallway between them\n if (this.leftChild !== null && this.rightChild !== null) {\n this.createHall(this.leftChild.getRoom(), this.rightChild.getRoom());\n }\n } else {\n // This Leaf is ready to make a room\n let roomSize = new Vector2();\n let roomPos = new Vector2();\n // The room can be between 3 x 3 tiles to the size of the leaf - 2\n roomSize = new Vector2(randomRegInt(3, this.width - 2), randomRegInt(3, this.height - 2));\n\n // Place the room within the Leaf, but don't put it right against the side of the Leaf (that would merge rooms together)\n roomPos = new Vector2(\n randomRegInt(1, this.width - roomSize.x - 1),\n randomRegInt(1, this.height - roomSize.y - 1)\n );\n\n // this.room = {x: this.x + roomPos.x, y: this.y + roomPos.y, width: roomSize.x, height: roomSize.y}\n // this.room = new Rect(this.x + roomPos.x, this.y + roomPos.y, roomSize.x, roomSize.y);\n const rect = new Rect(this.x + roomPos.x, this.y + roomPos.y, roomSize.x, roomSize.y);\n const area = this.generateRectArea(rect);\n this.room = {\n rect,\n area,\n };\n }\n }", "function createMountain() {\n beginShape();\n\n noStroke();\n fill(255)\n fill(foliage); // mountain\n var t12 = 0;\n var y12 = 0;\n var k12 = 0;\n var array2 = [];\n for (var x12 = 0; x12 < width + 1; x12++) {\n t12 = x12 * 0.02;\n y12 = noise(t12) * height;\n k12 = map(y12, 0, height, 465, 605);\n array2[x12] = vertex(x12, k12);\n }\n array2[width + 1] = vertex(width + 1, height);\n array2[width + 2] = vertex(0, height);\n\n endShape(CLOSE);\n}", "function areaTriangulo (base, altura) {\n return (base * altura)/2;\n}", "function calcEW(){\n // console.log(\"in calcEW\");\n ew_arr = [];\n fw_arr = [];\n dw_arr = [];\n _hp = hp*Math.pow(10,-6);\n _hg = hg*Math.pow(10,-6);\n _Ep = Ep*Math.pow(10,6);\n _Es = Es*Math.pow(10,6);\n _w = w*Math.pow(10,-6);\n _L = L*Math.pow(10,-6);\n _A=w*L;\n\n\n for(f=f_min; f<=f_max; f=f+df){\n var Ri= math.divide(1,sigi);\n Ri = math.divide(Ri,_w);// Ri = 1/sigi/w; // Ri: ionic resistane per thickness\n \n var Rs = math.divide(_hg,_w);\n Rs = math.divide(Rs,sigs);\n Rs = math.divide(Rs,2);// Rs = hg/w/sigs/2; // Rs: electrolyte resistance\n \n var Re= math.divide(1,_w);\n Re = math.divide(Re,_hp);\n Re = math.divide(Re,sige);// Re=1/w/hp/sige; // Re: electronic resistance per unit length\n \n var Zc= math.divide(1,j);\n Zc = math.divide(Zc,2);\n Zc = math.divide(Zc,Math.PI);\n Zc = math.divide(Zc,f);\n Zc = math.divide(Zc,Cv);\n Zc = math.divide(Zc,_w);//Zc=1./1j./2./pi./f./Cv./A;\n\n // console.log(Zc);\n \n var Z1D = math.multiply(Ri,Zc);\n Z1D = math.sqrt(Z1D);\n\n var temp = math.divide(Ri,Zc);\n temp = math.sqrt(temp);\n temp = math.multiply(temp,_hp);\n temp = math.coth(temp);\n\n Z1D = math.multiply(Z1D,temp);\n Z1D = math.add(Z1D,Rs);//Z1D=2.*sqrt(Ri.*Zc).*coth(sqrt(Ri./Zc).*hp)+Rs;\n \n var Z2D = math.multiply(Re,Z1D);\n Z2D = math.sqrt(Z2D);\n temp = math.divide(Re,Z1D);\n temp = math.sqrt(temp);\n temp = math.multiply(temp,_L);\n temp = math.coth(temp);\n Z2D = math.multiply(Z2D,temp);// Z2D=sqrt(Re.*Z1D).*coth(sqrt(Re./Z1D).*L);\n //console.log(Z2D);\n\n\n var Iw = math.divide(1,Z2D);//iw=1./Z2D;\n var pw = math.divide(Iw,j);\n pw = math.divide(pw,2);\n pw = math.divide(pw,Math.PI);\n pw = math.divide(pw,f);\n pw = math.divide(pw,_hp);\n pw = math.divide(pw,_w);\n pw = math.divide(pw,_L); //pw=Iw./1j./2./pi./f./hp./w./L;\n //console.log(pw);\n\n\n /**********Strain ***********/\n var ew = math.multiply(al,pw); //ew=al*pw;\n var ew_polar = ew.toPolar();\n var ew_abs = ew_polar.r;\n ew_arr.push(ew_abs);//ABS=abs(ew);\n\n /**********Force ***********/\n var temp = _Ep*3*Math.pow(10,6);\n temp = temp*al;\n temp = math.multiply(temp,pw);//1E6*3*Ep*al*pw\n\n var temp2 = _w*_hp*(_hp+_hg);//w*hp*(hp+hg)\n\n var fw = math.multiply(temp,temp2);\n fw = math.divide(fw,2);\n fw = math.divide(fw,_L);///2/L;\n //Fw=1E6*3*Ep*al*pw*w*hp*(hp+hg)/2/L;\n var fw_polar = fw.toPolar();\n var fw_abs = fw_polar.r;\n fw_arr.push(fw_abs);\n\n /**********Displacement ****/\n temp = 2*_hp+_hg; //(2*hp+hg) \n temp2 = Math.pow(_L,2); //^2\n temp2 = temp2*Math.pow(10,3); //1E3*L\n var dw = math.multiply(temp2,ew);\n dw = math.divide(dw,temp);\n // Dw=1E3*L.^2*ew/(2*hp+hg) \n var dw_polar = dw.toPolar();\n var dw_abs = dw_polar.r;\n dw_arr.push(dw_abs);\n \n // console.log(ew_abs);\n\n }//end of four\n\n \n // var min_ew = Math.min.apply(null, ew_arr);\n var max_ew = Math.max.apply(null, ew_arr); //MAX=max(ABS);\n var max_fw = Math.max.apply(null, fw_arr); //MAX=max(ABS);\n var max_dw = Math.max.apply(null, dw_arr); //MAX=max(ABS);\n\n\n F0 = max_ew*0.7079; //F0=max(ABS)*0.7079;\n for(i=0; i<ew_arr.length; i++){\n if(ew_arr[i]<=F0){\n cutoff_arr.push(f_arr[i]);\n console.log(\"cutoff F: \"+f_arr[i]);\n break;\n }\n } //indices = find(ABS <= F0); a(1,count)=min(f(indices)); aa(1,count)=MAX;\n // console.log(cutoff_arr);\n maxEW_arr.push(max_ew);\n maxFW_arr.push(max_fw);\n maxDW_arr.push(max_dw);\n\n // console.log(\"max_ew: \"+max_ew)\n}", "function ST_LUNA(njd,LON,LAT,ALT){\n\n // metodo iterativo per calcolare il sorgere e il tramontare della Luna\n // compresi gli azimut del sorgere e del tramontare.\n // nel calcolo si tiene conto della rifrazione, altitudine dell'osservatore e della parallasse lunare.\n // by Salvatore Ruiu Irgoli-Sardegna (Italy). 10 Dicembre 2011.\n\n var p_astro=0; // posizione della Luna. \n var tempo_sorgere=0; // tempo del sorgere.\n var tempo_tramonto=0; // tempo del tramonto.\n var tempo_transito=0; // tempo transito.\n var azimut_sorgere=0; // azimut sorgere.\n var azimut_tramonto=0; // azimut tramonto.\n var st_astri_sl=0; //\n\n njd=jdHO(njd); // riporta il g.g. della data all'ora H0(zero) del giorno. \n\n var njd1=njd; // giorno giuliano corretto per il sorgere o per il tramonto.\n var raggio=0.25; // raggio apparente della Luna.\n\n // **** inizio delle 10 iterazioni previste per il calcolo del Sorgere della Luna.\n\n for (a=0; a<10; a++) {\n\n p_astro=pos_luna(njd1); // recupera l'AR la DE e il raggio apparente del Sole.\n raggio=p_astro[6]/3600/2; // raggio della Luna in gradi.\n p_app=pos_app_pa(njd1,p_astro[0],p_astro[1],p_astro[5],LAT,LON,ALT); \n\n st_astri_sl=ST_ASTRO_DATA(njd1,p_app[0],p_app[1],LON,LAT,ALT,raggio);\n\n tempo_sorgere=st_astri_sl[2]; // istante del sorgere.\n njd1=njd+tempo_sorgere/24;\n }\n\n azimut_sorgere=st_astri_sl[0]; // azimut del sorgere.\n \n \n // **** inizio delle 10 iterazioni previste per il calcolo del transito della Luna.\n\n for (a=0; a<10; a++) {\n\n p_astro=pos_luna(njd1);\n raggio=p_astro[6]/3600/2; // astro di riferimento: sole.\n p_app=pos_app_pa(njd1,p_astro[0],p_astro[1],p_astro[5],LAT,LON,ALT);\n \n st_astri_sl=ST_ASTRO_DATA(njd1,p_app[0],p_app[1],LON,LAT,ALT,raggio);\n\n tempo_transito=st_astri_sl[3]; // istante del transito.\n njd1=njd+tempo_transito/24;\n }\n \n // **** inizio delle 10 iterazioni previste per il calcolo del tramontare della Luna.\n\n for (a=0; a<10; a++) {\n\n p_astro=pos_luna(njd1);\n raggio=p_astro[6]/3600/2;\n p_app=pos_app_pa(njd1,p_astro[0],p_astro[1],p_astro[5],LAT,LON,ALT);\n \n st_astri_sl=ST_ASTRO_DATA(njd1,p_app[0],p_app[1],LON,LAT,ALT,raggio);\n\n tempo_tramonto=st_astri_sl[4]; // istante del tramonto.\n njd1=njd+tempo_tramonto/24;\n }\n \n azimut_tramonto=st_astri_sl[1]; // azimut del tramontare.\n\n//alert(st_astri_sl[5]);\n\nvar tempi_st= new Array(azimut_sorgere,azimut_tramonto,tempo_sorgere,tempo_transito,tempo_tramonto) ; \n// VARIABILI RESTITUITE 0 1 2 3 4\n\nreturn tempi_st;\n\n}", "function createHaloGeometry(TimePeriods) {\n\n for (var i = 0; i < TimePeriods.length; i++) {\n\n for (var j = 0; j < TimePeriods[i].length; j++) {\n\n\n var id = TimePeriods[i][j];\n\n if (!(id in __traversed)) {\n\n var points = intoTheVoid(id, [], 0);\n Lines[i].push( { 'points': points, 'id': id } );\n }\n\n createSphere(id, colorKey(i), i);\n }\n }\n\n for (i = 0; i < Lines.length; i++) {\n\n for (j = 0; j < Lines[i].length; j++){\n var id = Lines[i][j].id\n var segment = Lines[i][j].points;\n if (segment.length > 1)\n createPathLine(segment, colorKey(i), id, i);\n }\n }\n\n // set the visibility of the halo data\n displayHaloData();\n\n}", "function init(points) {\n\n var extremePoints = findExtremePoints(points);\n var mostDistantExtremePointIndices = findMostDistantExpremePointIndices(extremePoints);\n\n // The remaining points with the most distant ones removed\n // Sort so that the lower index remains consistent\n mostDistantExtremePointIndices.sort();\n var remaining = extremePoints.slice(0);\n remaining.splice(mostDistantExtremePointIndices[1], 1);\n remaining.splice(mostDistantExtremePointIndices[0], 1);\n\n var a = extremePoints[mostDistantExtremePointIndices[0]];\n var b = extremePoints[mostDistantExtremePointIndices[1]];\n var c = findMostDistantToLine(remaining, a, b);\n\n // Correct normal for positive apex distance\n var basePlane = new Plane(a,c,b);\n var apex = findMostDistantFromPlane(basePlane, points);\n\n // Correct normal so that right-hand base normal points away from apex\n var base = apex.distance > 0 ? [a,b,c] : [a,c,b];\n var mesh = {\n vertices: base.concat(apex.point),\n faces: [{a:0, b:1, c:2}, {a:0, b:3, c:1}, {a:3, b:2, c:1}, {a:0, b:2, c:3}]\n };\n\n assignPointsToFaces(points, mesh);\n return mesh;\n\n}", "calculateArea(vectors) {\n let newVecs = [];\n for (let v of vectors) {\n newVecs.push(v);\n }\n newVecs.push(vectors[0]);\n let areaSum = 0;\n for (let i = 0; i < newVecs.length - 1; i++) {\n areaSum += (newVecs[i + 1].x + newVecs[i].x) * (newVecs[i + 1].y - newVecs[i].y);\n }\n areaSum /= 2;\n return abs(areaSum);\n }", "function square(nx, ny, nz, u, bounds) {\n if (!exists(px + nx, py + ny, pz + nz, bounds)) {\n\n // horizontal extent vector of the plane\n var ax = ny;\n var ay = nz;\n var az = nx;\n\n // vertical extent vector of the plane\n var bx = ay * nz - ay * nx;\n var by = az * nx - ax * nz;\n var bz = ax * ny - ay * nx;\n\n // half-sized normal vector\n var dx = nx * 0.5;\n var dy = ny * 0.5;\n var dz = nz * 0.5;\n\n // half-sized horizontal vector\n var sx = ax * 0.5;\n var sy = ay * 0.5;\n var sz = az * 0.5;\n\n // half-sized vertical vector\n var tx = bx * 0.5;\n var ty = by * 0.5;\n var tz = bz * 0.5;\n\n // center of the plane\n var vx = px + 0.5 + dx;\n var vy = py + 0.5 + dy;\n var vz = pz + 0.5 + dz;\n\n // vertex index offset\n var offset = store.offset;\n\n store.indices.push(offset + 0);\n store.indices.push(offset + 1);\n store.indices.push(offset + 2);\n store.indices.push(offset + 0);\n store.indices.push(offset + 2);\n store.indices.push(offset + 3);\n\n store.positions.push(vx - sx - tx);\n store.positions.push(vy - sy - ty);\n store.positions.push(vz - sz - tz);\n store.positions.push(vx + sx - tx);\n store.positions.push(vy + sy - ty);\n store.positions.push(vz + sz - tz);\n store.positions.push(vx + sx + tx);\n store.positions.push(vy + sy + ty);\n store.positions.push(vz + sz + tz);\n store.positions.push(vx - sx + tx);\n store.positions.push(vy - sy + ty);\n store.positions.push(vz - sz + tz);\n\n store.normals.push(nx);\n store.normals.push(ny);\n store.normals.push(nz);\n store.normals.push(nx);\n store.normals.push(ny);\n store.normals.push(nz);\n store.normals.push(nx);\n store.normals.push(ny);\n store.normals.push(nz);\n store.normals.push(nx);\n store.normals.push(ny);\n store.normals.push(nz);\n\n\n var add = 0.2;\n var base = 0.4;\n\n var brightness =\n (exists(px + nx - ax, py + ny - ay, pz + nz - az, bounds) ? 0 : add) +\n (exists(px + nx - bx, py + ny - by, pz + nz - bz, bounds) ? 0 : add) +\n (exists(px + nx - ax - bx, py + ny - ay - by, pz + nz - az - bz, bounds) ? 0 : add) + base;\n\n store.colors.push(brightness);\n store.colors.push(brightness);\n store.colors.push(brightness);\n store.colors.push(1.0);\n\n\n var brightness =\n (exists(px + nx + ax, py + ny + ay, pz + nz + az, bounds) ? 0 : add) +\n (exists(px + nx - bx, py + ny - by, pz + nz - bz, bounds) ? 0 : add) +\n (exists(px + nx + ax - bx, py + ny + ay - by, pz + nz + az - bz, bounds) ? 0 : add) + base;\n store.colors.push(brightness);\n store.colors.push(brightness);\n store.colors.push(brightness);\n store.colors.push(1.0);\n\n var brightness =\n (exists(px + nx + ax, py + ny + ay, pz + nz + az, bounds) ? 0 : add) +\n (exists(px + nx + bx, py + ny + by, pz + nz + bz, bounds) ? 0 : add) +\n (exists(px + nx + ax + bx, py + ny + ay + by, pz + nz + az + bz, bounds) ? 0 : add) + base;\n store.colors.push(brightness);\n store.colors.push(brightness);\n store.colors.push(brightness);\n store.colors.push(1.0);\n\n var brightness =\n (exists(px + nx - ax, py + ny - ay, pz + nz - az, bounds) ? 0 : add) +\n (exists(px + nx + bx, py + ny + by, pz + nz + bz, bounds) ? 0 : add) +\n (exists(px + nx - ax + bx, py + ny - ay + by, pz + nz - az + bz, bounds) ? 0 : add) + base;\n store.colors.push(brightness);\n store.colors.push(brightness);\n store.colors.push(brightness);\n store.colors.push(1.0);\n\n //u(store.uvs, CHIP_RATIO_1 * block);\n u(store.uvs, CHIP_RATIO_1 * block);\n\n store.offset += 4;\n }\n }", "function area(d) {\n var a = [],\n i = 0,\n p = d[0];\n a.push(\"M\", x.call(this, p, i), \",\" + y0 + \"V\", y1.call(this, p, i));\n while (p = d[++i]) a.push(\"L\", x.call(this, p, i), \",\", y1.call(this, p, i));\n a.push(\"V\" + y0 + \"Z\");\n return a.join(\"\");\n }", "function test() {\n let s = world.size;\n // makes the floor solid\n world.fillArea([0, 0, 0 ], [s-1, s-1, 0 ]);\n // adds a tiny pedestal in the middle\n world.fillArea([3, 3, 1 ], [4, 4, 1 ]);\n // adds a frame\n world.fillArea([0, 0, 1 ], [0, 0, s-1]);\n world.fillArea([0, s-1, 1 ], [0, s-1, s-1]);\n world.fillArea([s-1, 0, 1 ], [s-1, 0, s-1]);\n world.fillArea([s-1, s-1, 1 ], [s-1, s-1, s-1]);\n world.fillArea([0, 1, s-1], [0, s-2, s-1]);\n world.fillArea([1, 0, s-1], [s-2, 0, s-1]);\n world.fillArea([s-1, 1, s-1], [s-1, s-2, s-1]);\n world.fillArea([1, s-1, s-1], [s-2, s-1, s-1]);\n }", "area() {\n return 4 * (3.14) * (this.radius**2)\n }", "_computeInitialHull() {\n\n\t\tlet v0, v1, v2, v3;\n\n\t\tconst vertices = this._vertices;\n\t\tconst extremes = this._computeExtremes();\n\t\tconst min = extremes.min;\n\t\tconst max = extremes.max;\n\n\t\t// 1. Find the two points 'p0' and 'p1' with the greatest 1d separation\n\t\t// (max.x - min.x)\n\t\t// (max.y - min.y)\n\t\t// (max.z - min.z)\n\n\t\t// check x\n\n\t\tlet distance, maxDistance;\n\n\t\tmaxDistance = max.x.point.x - min.x.point.x;\n\n\t\tv0 = min.x;\n\t\tv1 = max.x;\n\n\t\t// check y\n\n\t\tdistance = max.y.point.y - min.y.point.y;\n\n\t\tif ( distance > maxDistance ) {\n\n\t\t\tv0 = min.y;\n\t\t\tv1 = max.y;\n\n\t\t\tmaxDistance = distance;\n\n\t\t}\n\n\t\t// check z\n\n\t\tdistance = max.z.point.z - min.z.point.z;\n\n\t\tif ( distance > maxDistance ) {\n\n\t\t\tv0 = min.z;\n\t\t\tv1 = max.z;\n\n\t\t}\n\n\t\t// 2. The next vertex 'v2' is the one farthest to the line formed by 'v0' and 'v1'\n\n\t\tmaxDistance = - Infinity;\n\t\tline.set( v0.point, v1.point );\n\n\t\tfor ( let i = 0, l = vertices.length; i < l; i ++ ) {\n\n\t\t\tconst vertex = vertices[ i ];\n\n\t\t\tif ( vertex !== v0 && vertex !== v1 ) {\n\n\t\t\t\tline.closestPointToPoint( vertex.point, true, closestPoint );\n\n\t\t\t\tdistance = closestPoint.squaredDistanceTo( vertex.point );\n\n\t\t\t\tif ( distance > maxDistance ) {\n\n\t\t\t\t\tmaxDistance = distance;\n\t\t\t\t\tv2 = vertex;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// 3. The next vertex 'v3' is the one farthest to the plane 'v0', 'v1', 'v2'\n\n\t\tmaxDistance = - Infinity;\n\t\tplane.fromCoplanarPoints( v0.point, v1.point, v2.point );\n\n\t\tfor ( let i = 0, l = vertices.length; i < l; i ++ ) {\n\n\t\t\tconst vertex = vertices[ i ];\n\n\t\t\tif ( vertex !== v0 && vertex !== v1 && vertex !== v2 ) {\n\n\t\t\t\tdistance = Math.abs( plane.distanceToPoint( vertex.point ) );\n\n\t\t\t\tif ( distance > maxDistance ) {\n\n\t\t\t\t\tmaxDistance = distance;\n\t\t\t\t\tv3 = vertex;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// handle case where all points lie in one plane\n\n\t\tif ( plane.distanceToPoint( v3.point ) === 0 ) {\n\n\t\t\tthrow 'ERROR: YUKA.ConvexHull: All extreme points lie in a single plane. Unable to compute convex hull.';\n\n\t\t}\n\n\t\t// build initial tetrahedron\n\n\t\tconst faces = this.faces;\n\n\t\tif ( plane.distanceToPoint( v3.point ) < 0 ) {\n\n\t\t\t// the face is not able to see the point so 'plane.normal' is pointing outside the tetrahedron\n\n\t\t\tfaces.push(\n\t\t\t\tnew Face( v0.point, v1.point, v2.point ),\n\t\t\t\tnew Face( v3.point, v1.point, v0.point ),\n\t\t\t\tnew Face( v3.point, v2.point, v1.point ),\n\t\t\t\tnew Face( v3.point, v0.point, v2.point )\n\t\t\t);\n\n\t\t\t// set the twin edge\n\n\t\t\t// join face[ i ] i > 0, with the first face\n\n\t\t\tfaces[ 1 ].getEdge( 2 ).linkOpponent( faces[ 0 ].getEdge( 1 ) );\n\t\t\tfaces[ 2 ].getEdge( 2 ).linkOpponent( faces[ 0 ].getEdge( 2 ) );\n\t\t\tfaces[ 3 ].getEdge( 2 ).linkOpponent( faces[ 0 ].getEdge( 0 ) );\n\n\t\t\t// join face[ i ] with face[ i + 1 ], 1 <= i <= 3\n\n\t\t\tfaces[ 1 ].getEdge( 1 ).linkOpponent( faces[ 2 ].getEdge( 0 ) );\n\t\t\tfaces[ 2 ].getEdge( 1 ).linkOpponent( faces[ 3 ].getEdge( 0 ) );\n\t\t\tfaces[ 3 ].getEdge( 1 ).linkOpponent( faces[ 1 ].getEdge( 0 ) );\n\n\t\t} else {\n\n\t\t\t// the face is able to see the point so 'plane.normal' is pointing inside the tetrahedron\n\n\t\t\tfaces.push(\n\t\t\t\tnew Face( v0.point, v2.point, v1.point ),\n\t\t\t\tnew Face( v3.point, v0.point, v1.point ),\n\t\t\t\tnew Face( v3.point, v1.point, v2.point ),\n\t\t\t\tnew Face( v3.point, v2.point, v0.point )\n\t\t\t);\n\n\t\t\t// set the twin edge\n\n\t\t\t// join face[ i ] i > 0, with the first face\n\n\t\t\tfaces[ 1 ].getEdge( 2 ).linkOpponent( faces[ 0 ].getEdge( 0 ) );\n\t\t\tfaces[ 2 ].getEdge( 2 ).linkOpponent( faces[ 0 ].getEdge( 2 ) );\n\t\t\tfaces[ 3 ].getEdge( 2 ).linkOpponent( faces[ 0 ].getEdge( 1 ) );\n\n\t\t\t// join face[ i ] with face[ i + 1 ], 1 <= i <= 3\n\n\t\t\tfaces[ 1 ].getEdge( 0 ).linkOpponent( faces[ 2 ].getEdge( 1 ) );\n\t\t\tfaces[ 2 ].getEdge( 0 ).linkOpponent( faces[ 3 ].getEdge( 1 ) );\n\t\t\tfaces[ 3 ].getEdge( 0 ).linkOpponent( faces[ 1 ].getEdge( 1 ) );\n\n\t\t}\n\n\t\t// initial assignment of vertices to the faces of the tetrahedron\n\n\t\tfor ( let i = 0, l = vertices.length; i < l; i ++ ) {\n\n\t\t\tconst vertex = vertices[ i ];\n\n\t\t\tif ( vertex !== v0 && vertex !== v1 && vertex !== v2 && vertex !== v3 ) {\n\n\t\t\t\tmaxDistance = this._tolerance;\n\t\t\t\tlet maxFace = null;\n\n\t\t\t\tfor ( let j = 0; j < 4; j ++ ) {\n\n\t\t\t\t\tdistance = faces[ j ].distanceToPoint( vertex.point );\n\n\t\t\t\t\tif ( distance > maxDistance ) {\n\n\t\t\t\t\t\tmaxDistance = distance;\n\t\t\t\t\t\tmaxFace = faces[ j ];\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( maxFace !== null ) {\n\n\t\t\t\t\tthis._addVertexToFace( vertex, maxFace );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}", "function add_boundaries(scene) {\n // Bottom and top grid\n var line, d1, d2, step=50, geometry, material, line;\n d1 = scene_depth_half;\n d2 = scene_width_half;\n geometry = new THREE.Geometry();\n for ( var i = - d1; i <= d1; i += step ) {\n geometry.vertices.push( new THREE.Vector3( - d2, 0, i ) );\n geometry.vertices.push( new THREE.Vector3( d2, 0, i ) );\n \n }\n for ( var i = - d2; i <= d2; i += step ) {\n geometry.vertices.push( new THREE.Vector3( i, 0, - d1 ) );\n geometry.vertices.push( new THREE.Vector3( i, 0, d1 ) );\n }\n material = new THREE.LineBasicMaterial( { color: 0xaaaaaa, opacity: 0.2, transparent: true } );\n line = new THREE.LineSegments( geometry, material );\n line.position.copy(new THREE.Vector3(0, -scene_height_half, 0));\n scene.add( line );\n line = line.clone();\n line.position.copy(new THREE.Vector3(0, scene_height_half, 0));\n scene.add( line );\n\n // Back and Front grid\n d1 = scene_height_half;\n d2 = scene_width_half;\n geometry = new THREE.Geometry();\n for ( var i = - d1; i <= d1; i += step ) {\n geometry.vertices.push( new THREE.Vector3( - d2, 0, i ) );\n geometry.vertices.push( new THREE.Vector3( d2, 0, i ) );\n \n }\n for ( var i = - d2; i <= d2; i += step ) {\n geometry.vertices.push( new THREE.Vector3( i, 0, - d1 ) );\n geometry.vertices.push( new THREE.Vector3( i, 0, d1 ) );\n }\n material = new THREE.LineBasicMaterial( { color: 0xaaaaaa, opacity: 0.2, transparent: true } );\n line = new THREE.LineSegments( geometry, material );\n \n line.rotateX(Math.PI / 2);\n line.position.copy(new THREE.Vector3(0, 0, -scene_depth_half));\n scene.add( line );\n line = line.clone();\n line.position.copy(new THREE.Vector3(0, 0, scene_depth_half));\n scene.add( line );\n\n // Back and Front grid\n d1 = scene_depth_half;\n d2 = scene_height_half;\n geometry = new THREE.Geometry();\n for ( var i = - d1; i <= d1; i += step ) {\n geometry.vertices.push( new THREE.Vector3( - d2, 0, i ) );\n geometry.vertices.push( new THREE.Vector3( d2, 0, i ) );\n \n }\n for ( var i = - d2; i <= d2; i += step ) {\n geometry.vertices.push( new THREE.Vector3( i, 0, - d1 ) );\n geometry.vertices.push( new THREE.Vector3( i, 0, d1 ) );\n }\n material = new THREE.LineBasicMaterial( { color: 0xaaaaaa, opacity: 0.2, transparent: true } );\n line = new THREE.LineSegments( geometry, material );\n \n line.rotateZ(Math.PI / 2);\n line.position.copy(new THREE.Vector3(-scene_width_half, 0, 0));\n scene.add( line );\n line = line.clone();\n line.position.copy(new THREE.Vector3(scene_width_half, 0, 0));\n scene.add( line );\n}", "function equilateralArea(value){\n var area = (Math.sqrt(3)/4)* (value * value);\n return area;\n}", "creatPlatforms(){\n \n for(let i = 0;i < 10;i++){\n let desplazamiento = this.width/10\n this.platforms.push(new Platform(this.ctx, desplazamiento*i,this.height - 65 * i)); \n } \n\n for(let i = 0; i < 10; i++){\n \n const desplazamiento = this.height/6;\n this.platformhorizontal.push(new Platform(this.ctx, 220*i+100,desplazamiento*i )); \n // this.height -= 150 \n \n \n } \n \n\n\n \n // for(let i = 0; i < 4; i++){\n // let newWidth = this.width \n // this.platforms.push(new Platform(this.ctx,newWidth,this.height)); \n // this.height -= 150 \n \n // } \n }", "function calcArea() {\n //create variables for the width, height and area\n var width =20\n var height=30\n var area= width*height\n console.log(\"The area is \"+area)\n}" ]
[ "0.56769", "0.56072694", "0.5537143", "0.5513721", "0.55104095", "0.5491142", "0.5470988", "0.5327976", "0.5269172", "0.5238173", "0.52078885", "0.51599115", "0.51258713", "0.5100492", "0.5092558", "0.50836784", "0.50821376", "0.5070948", "0.5069678", "0.5058628", "0.50546706", "0.50486404", "0.5041886", "0.50409824", "0.503951", "0.503413", "0.50298756", "0.5027011", "0.50077295", "0.5006879", "0.5004483", "0.49920207", "0.49806866", "0.4976271", "0.49734026", "0.49708027", "0.4964362", "0.49585629", "0.49575752", "0.49570256", "0.49560153", "0.49495018", "0.49458036", "0.49420768", "0.49320897", "0.49307355", "0.4927605", "0.49259728", "0.49177095", "0.49086574", "0.49070936", "0.4903009", "0.49013507", "0.48931336", "0.4889714", "0.48829502", "0.48810434", "0.48792896", "0.4879065", "0.4871093", "0.48708057", "0.486986", "0.48666972", "0.48666972", "0.48622832", "0.4861786", "0.48577455", "0.48570848", "0.48564446", "0.48562357", "0.48557958", "0.485512", "0.48505917", "0.484766", "0.48474446", "0.48464584", "0.48446792", "0.483655", "0.48329717", "0.48315233", "0.48306733", "0.48301938", "0.48236728", "0.4820487", "0.48176524", "0.4811715", "0.48082194", "0.4808055", "0.47991896", "0.47989023", "0.4796194", "0.47894362", "0.4785285", "0.47850525", "0.47750914", "0.47721183", "0.47685176", "0.4768498", "0.47672886", "0.47664914", "0.4764462" ]
0.0
-1
helper function for finding distance between two points
function distance(point1, point2){ return Math.sqrt(Math.pow(point1[0]-point2[0], 2) + Math.pow(point1[1]-point2[1], 2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_distance(x1, y1, x2, y2)\n{\n return Math.sqrt(Math.pow(x2-x1,2) + Math.pow(y2-y1,2));\n}", "function distance (point1, point2) {\n Math.sqrt(Math.pow(point1[0] - point1[1], 2) + Math.pow(point2[0] - point2[1], 2))\n}", "function getDistance(point1, point2) {\n return Math.pow(point1.x - point2.x, 2) + Math.pow(point1.y - point2.y, 2);\n}", "static distance(p1, p2) {\n const dx = (p1.x - p2.x);\n const dy = (p1.y - p2.y);\n return Math.sqrt(dx * dx + dy * dy);\n }", "function getDistance(x1, y1, x2, y2) {\r\n var a = 0.0;\r\n var b = 0.0;\r\n a = x1 - x2;\r\n b = y1 - y2;\r\n return Math.sqrt(a * a + b * b);\r\n}", "function _distance(point1, point2) {\n return Math.sqrt((point1[0] - point2[0]) * (point1[0] - point2[0]) + (point1[1] - point2[1]) * (point1[1] - point2[1]) + (point1[2] - point2[2]) * (point1[2] - point2[2]));\n}", "function getTwoPointsDistance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n }", "function calculateDistance(point1, point2) {\n\treturn Math.sqrt(Math.pow((point1.x - point2.x), 2) + Math.pow((point1.y - point2.y), 2));\n}", "function getDistance(x1,y1,x2,y2){\r\n\tlet xOff = x1 - x2;\r\n\tlet yOff = y1 - y2;\r\n\treturn Math.sqrt(xOff * xOff + yOff * yOff);\r\n}", "function distance(x1, y1, x2, y2)\n{\n return Math.sqrt(\n Math.pow(Math.abs(x2 - x1), 2) +\n Math.pow(Math.abs(y2 - y1), 2));\n}", "function distance(p1, p2)\n{\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}", "function find_distance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));\n}", "function distance(x1, y1, x2, y2) {\n return Math.abs(x1 - x2) + Math.abs(y1 - y2)\n}", "distance(x1, y1, x2, y2) {\n\t\treturn Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n\t}", "function getDistance(p1, p2) {\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)); \n }", "function getDistance(x1, y1, x2, y2)\n{\n var l1 = x2 - x1;\n var l2 = y2 - y1;\n \n return Math.sqrt(l1 * l1 + l2 * l2);\n}", "function distance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2-x1, 2) + Math.pow(y2-y1, 2))\n}", "function getDistance(x1, y1, x2, y2)\r\n{\r\n\treturn (((x2-x1)**2)+((y2-y1)**2))**(1/2);\r\n}", "function distance(a, b){\n return Math.sqrt(Math.pow((a.x - b.x), 2) + Math.pow((a.y - b.y), 2));\n}", "function getDistance(x1, y1, x2, y2) {\n\treturn Math.sqrt(Math.pow((x1 - x2), 2) + Math.pow((y1 - y2), 2));\n}", "distance(x0, y0, x1, y1) {\n return Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2));\n }", "function distance(x1,y1,x2,y2) {\n return sqrt(pow(x2-x1,2)+pow(y2-y1,2)) \n}", "function distance (x1, y1, x2, y2){\r\n return Math.sqrt( (x2-=x1)*x2 + (y2-=y1)*y2 );\r\n}", "function getDistance(a, b) {\n return Math.sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));\n }", "function distance(x1, x2, y1, y2) {\n\treturn Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}", "function distance_to(x1, y1, x2, y2){\n return Math.sqrt((x2-x1)**2 + (y2-y1)**2);\n}", "function pointDistance(x1,y1, x2,y2) {\n return Math.sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) );\n}", "function distance (x1, y1, x2, y2){\r\n\tvar a = x1 - x2;\r\n\tvar b = y1 - y2;\r\n\treturn Math.sqrt(a*a + b*b);\r\n}", "function distBetweenPoints(a,b){\r\n return Math.sqrt((a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y));\r\n}", "function getDistance(p1, p2) {\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}", "function getDistance(p1, p2) {\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}", "function getDistance(p1, p2) {\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}", "function getDistance(p1, p2) {\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}", "function pointDistance(x1, y1, x2, y2) {\n return Math.sqrt((y2-y1)*(y2-y1) + (x2-x1)*(x2-x1));\n}", "function distance(pt1, pt2) { \n\n return Math.sqrt(Math.pow((pt1.x - pt2.x), 2) + Math.pow((pt1.y - pt2.y), 2));\n}", "function distance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}", "function distance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));\n }", "function pointDistance(a, b) {\n // get the distance between two points.\n return Math.abs(Math.sqrt(((a.x - b.x) ** 2) + ((a.y - b.y) ** 2)))\n}", "function pointDistance(x1,y1,x2,y2){\r\n\tvar dist = Math.sqrt( Math.abs((x2 - x1)*(x2-x1)) + Math.abs((y2 - y1)*(y2-y1)));\r\n\treturn dist;\r\n}", "function distance(x1, y1, x2, y2){\n var s = Math.sqrt(Math.pow(x1-x2, 2) + Math.pow(y1-y2, 2));\n //console.log(\"s: \", s);\n return s;\n}", "function calculateDistance(x1,x2,y1,y2){\n return Math.sqrt(Math.pow((x2-x1),2)+Math.pow((y2-y1),2));\n}", "function distance(x1, y1, x2, y2){ \n\t\treturn Math.abs(Math.sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) ));\n\t}", "function getDistance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n }", "function distance(a, b) {\r\n return Math.sqrt((a.x - b.x)**2 + (a.y - b.y)**2);\r\n}", "function distance(p1, p2) {\n\treturn Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}", "getDistance(x1, y1, x2, y2){\r\n let dx = x2 - x1;\r\n let dy = y2 - y1;\r\n\r\n return Math.sqrt(Math.pow(dx,2) + Math.pow(dy,2));\r\n }", "function distance(a,b){\r\n return Math.sqrt(Math.abs((a.x-b.x)*(a.x-b.x))+Math.abs((a.y-b.y)*(a.y-b.y)));\r\n}", "function getDistance(x1,y1,x2,y2)\n{\n var xD = (x2-x1);\n var yD = (y2-y1);\n var power = Math.pow(xD,2)+Math.pow(yD,2);\n return Math.sqrt(power);\n}", "function getDistance(a, b) {\n\tconst x = a.x - b.x;\n\tconst y = a.y - b.y;\n\n\treturn Math.sqrt(x * x + y * y);\n}", "function calcDistance(x1, y1, x2, y2)\n{\n\treturn Math.sqrt(Math.pow((x2 - x1),2) + Math.pow((y2 - y1),2));\n}", "distance (a, b) {\n return Math.sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));\n }", "function distance (point1, point2) {\n var deltaX = point1[0] - point2[0]\n var deltaY = point1[1] - point2[1]\n\n var deltaXSquared = Math.pow(deltaX, 2)\n var deltaYSquared = Math.pow(deltaY, 2)\n\n var answer = Math.sqrt(deltaXSquared + deltaYSquared)\n return answer\n}", "function distance(point1, point2) {\n return Math.hypot(point1.x-point2.x, point1.y-point2.y);\n}", "function distance(point1, point2) {\n var xDiff = point2.cx - point1.cx;\n var\tyDiff = point2.cy - point1.cy;\n return Math.sqrt( xDiff*xDiff + yDiff*yDiff);\n}", "function getDistance(x1,y1,x2,y2) {\n\treturn Math.sqrt(((x2-x1)*(x2-x1))+((y2-y1)*(y2-y1)));\n}", "function getDistance(a, b) {\n 'use strict';\n return Math.sqrt((a[0] - b[0]) * (a[0] - b[0]) +\n (a[1] - b[1]) * (a[1] - b[1]));\n}", "function calculateDistanceBetweenTwoPoints(x1, y1, x2, y2) {\r\n let distance = Math.sqrt(Math.pow((x1-x2),2) + Math.pow((y1-y2),2));\r\n console.log(distance);\r\n}", "function distance(p1, p2) {\n var firstPoint;\n var secondPoint;\n var theXs;\n var theYs;\n var result;\n\n firstPoint = new createjs.Point();\n secondPoint = new createjs.Point();\n\n firstPoint.x = p1.x;\n firstPoint.y = p1.y;\n\n secondPoint.x = p2.x;\n secondPoint.y = p2.y;\n\n theXs = secondPoint.x - firstPoint.x;\n theYs = secondPoint.y - firstPoint.y;\n\n theXs = theXs * theXs;\n theYs = theYs * theYs;\n\n result = Math.sqrt(theXs + theYs);\n\n return result;\n}", "function get_dist(x1,y1,x2,y2){\n return Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));\n}", "function distance(p1, p2) {\n return Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) +\n (p1.y - p2.y) * (p1.y - p2.y));\n}", "function distanceBetweenPoints(a, b) {\n \n return Math.hypot(a.x-b.x, a.y-b.y)\n}", "function distance(x1, y1, x2, y2) {\r\n\t\t return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\r\n\t\t}", "function getDistance(a, b) {\n const distX = a.x - b.x;\n const distY = a.y - b.y;\n return Math.sqrt(distX ** 2 + distY ** 2); // ** exponentiation\n}", "function distance(a, b) {\n var dx = a.x - b.x;\n var dy = a.y - b.y;\n return Math.sqrt(dx * dx + dy * dy);\n}", "function getDistance(x1, y1, x2, y2) {\n var x = x2 - x1;\n var y = y2 - y1;\n return Math.sqrt((x * x) + (y * y));\n }", "function distance(P1, P2) {\n var x1 = P1[0];\n var y1 = P1[1];\n var x2 = P2[0];\n var y2 = P2[1];\n var d = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n return d;\n}", "function disPoint(x1,y1,x2,y2){\n var distanceX=Math.pow((x1-x2),2)\n var distanceY=Math.pow((y1-y2),2)\n return Math.sqrt(distanceX+distanceY);\n \n}", "function distance(p1, p2) { return length_v2(diff_v2(p1, p2)); }", "function distBetweenPoints(x1, y1, x2, y2) {\n\treturn Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}", "function distance(p1, p2) {\n\t return Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));\n\t}", "function distance(x1, x2, y1, y2){\n\treturn Math.sqrt(((x2-x1)*(x2-x1))+((y2-y1)*(y2-y1)));\n}", "function distance(p1, p2) {\n return Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));\n }", "function distance(p1, p2) {\r\n\treturn Math.sqrt(Math.pow(p1[0] - p2[0], 2) + Math.pow(p1[1] - p2[1], 2) + Math.pow(p1[2] - p2[2], 2));\r\n}", "function pointDistance(p1, p2) {\n var d1 = p1.x - p2.x;\n var d2 = p1.y - p2.y;\n return Math.sqrt(d1 * d1 + d2 * d2);\n}", "function dist(x1, y1, x2, y2) {\r\n return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));\r\n }", "function calculeDistance(x1, y1, x2, y2) {\r\n return Math.sqrt(Math.pow((y2 - y1),2) + Math.pow((x2 - x1),2));\r\n}", "function distance(a, b) {\n\treturn Math.sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));\n}", "function distance( x1, y1, x2, y2 ) {\n var a = x2 - x1;\n var b = y2 - y1;\n return Math.sqrt( a * a + b * b );\n }", "function dist(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}", "function getDist(point1, point2) {\r\n\tif (samePoint(point1, nullPoint) || samePoint(point2, nullPoint))\r\n\t\treturn -1;\r\n\treturn game.math.distance(point1.x, point1.y, point2.x, point2.y);\r\n}", "function computeDistance(a, b) {\n var dx = a.x - b.x;\n var dy = a.y - b.y;\n return Math.sqrt(dx * dx + dy * dy);\n}", "function distance(p1, p2) {\n\t\treturn Math.sqrt(Math.pow(p2.y - p1.y, 2) + Math.pow(p2.x - p1.x, 2));\n\t}", "function getDistance(c1 ,c2){\n \n let x1 = c1.x ;\n let y1 = c1.y ;\n let x2 = c2.x ;\n let y2 = c2.y ;\n let x = x2-x1;\n let y = y2-y1;\n return (Math.sqrt(Math.pow(x,2)+Math.pow(y,2)));\n\n }", "function getDistance(x1, y1, x2, y2) {\n return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }", "static pointDistance(p1, p2) {\n return Math.sqrt((p2.x-p1.x)*(p2.x-p1.x) + (p2.y-p1.y)*(p2.y-p1.y));\n }", "function dist(x1,y1,x2,y2) {\n return Math.sqrt( (x2-=x1)*x2 + (y2-=y1)*y2 );\n}", "function getDistance(x1,y1,x2,y2){\n // this is the equation: square root of (x1-y1)*(x1-y2)+(y1-y2)*(y2-y1)\n return Math.sqrt( Math.pow((x1-x2), 2) + Math.pow((y1-y2), 2) );\n}", "function distanceBetweenPoints(a, b) {\n return Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y, 2));\n}", "function distance(p1, p2) {\n return Math.floor(Math.sqrt(Math.pow((p2.x - p1.x), 2) + Math.pow((p2.y - p1.y), 2)));\n }", "DistanceFromPoint(x,y,x2,y2) {\n return Math.abs(Math.sqrt(Math.pow((x-x2),2) + Math.pow((y-y2),2)));\n }", "function distance(pointA,pointB){\r\n // return Math.abs(pointA-pointB)\r\n return _.chain(pointA)\r\n .zip(pointB)\r\n .map(([a,b])=>(a-b)**2)\r\n .sum()\r\n .value()**0.5\r\n}", "function dist(p1, p2) {\n var dx = p1.x - p2.x;\n var dy = p1.y - p2.y;\n return Math.sqrt(dx*dx + dy*dy);\n}", "function dist(x1, x2, y1, y2) {\r\n var a = x1 - x2;\r\n var b = y1 - y2;\r\n\r\n var c = Math.sqrt(a * a + b * b);\r\n return c;\r\n}", "function distancia(x1, y1, x2, y2) {\r\n\treturn Math.sqrt(Math.pow((x1 - x2), 2) + Math.pow((y1 - y2), 2));\r\n}", "function getDistance(x1, x2, y1, y2) {\n var a = x1 - x2;\n var b = y1 - y2;\n var c = Math.sqrt( a*a + b*b );\n return c;\n }", "static distance(p1, p2) {\n return Math.sqrt((p1.x - p2.x) ** 2 + (p1.y - p2.y) ** 2);\n }", "function dist(p1, p2)\n{\n return (p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y);\n}", "function distance(x1,y1, x2,y2){\n var dx = x2-x1;\n var dy = y2-y1;\n with(Math){ return sqrt(pow(dx,2)+pow(dy,2)); }\n}", "function dist(x1, y1, x2, y2) {\n var a = x1 - x2;\n var b = y1 - y2;\n var c = Math.sqrt( a*a + b*b );\n return c;\n}", "function getDist(x1, y1, x2, y2){\n\treturn Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow((y2 - y1), 2))\n}" ]
[ "0.8243939", "0.8183616", "0.8136859", "0.8123683", "0.8104037", "0.8086833", "0.8083388", "0.8081029", "0.8078473", "0.8078468", "0.80752033", "0.8067622", "0.806442", "0.80597097", "0.8055251", "0.8052093", "0.80468726", "0.80447924", "0.80439895", "0.8043439", "0.804286", "0.80413234", "0.8035606", "0.8032012", "0.80318403", "0.80314904", "0.8024714", "0.80179656", "0.801623", "0.80155444", "0.80155444", "0.80155444", "0.80155444", "0.80152124", "0.80147487", "0.8012571", "0.8008606", "0.79888314", "0.7983711", "0.7976177", "0.79712385", "0.79702103", "0.7966484", "0.7965306", "0.796427", "0.79623216", "0.79615223", "0.7958249", "0.79564315", "0.7949434", "0.79395056", "0.7937131", "0.7935086", "0.79313904", "0.7928934", "0.7925351", "0.7923835", "0.7922262", "0.7916583", "0.7915642", "0.7914616", "0.79018235", "0.79001546", "0.7894507", "0.7892735", "0.789245", "0.7891425", "0.7888436", "0.7887814", "0.7880454", "0.7876957", "0.7871697", "0.78657496", "0.78648615", "0.78639096", "0.7857575", "0.78567755", "0.7850234", "0.7848711", "0.78485376", "0.7847307", "0.78395814", "0.78369975", "0.78278244", "0.7826057", "0.7819473", "0.7813687", "0.78123146", "0.7808428", "0.779993", "0.77887136", "0.7786153", "0.7773026", "0.77696747", "0.7764363", "0.7763062", "0.77582186", "0.775553", "0.77552265", "0.77538" ]
0.8088127
5
helper function to find average
function avg(values){ var sum = 0; for (var i = 0; i < values.length; i++){ sum += values[i]; } return sum/values.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function find_avg(arr) {\n\t\tvar sum = 0, avg;\n\t\tfor (var i = 0; i < arr.length; i++) {\n\t\t\tsum += arr[i];\n\t\t}\n\t\tavg = sum / arr.length;\n\t\treturn avg;\n\t}", "function average() {\n\t\tvar sum = 0;\n\t\tif (avgNum.length != 0) {\n\t\t\tfor (var i = 0; i < avgNum.length; i++) {\n\t\t\t\tsum = sum + parseInt(avgNum[i]);\n\t\t\t}\n\t\t}\n\t\treturn sum/avgNum.length;\n\t}", "function calculateAverage() {\r\n var sum = 0;\r\n for (var i = 0; i < arguments.length; i++) {\r\n sum += arguments[i];\r\n }\r\n return sum / 4;\r\n }", "function findAVG(arr){\n var avg = 0;\n for(var i = 0; i < arr.length; i++){\n avg += arr[i];\n }\n return avg/arr.length;\n}", "function averageFinder(arr) {\n var average = 0;\n var sum = 0;\n for(var i = 0; i < arr.length; i++) {\n sum+= arr[i]\n } \n average = (sum / arr.length);\n return average; \n }", "function avg( arr ){\n\treturn sum( arr ) / arr.length\n}", "avg(arr) {\r\n let sum = 0;\r\n for(let i = 0; i < arr.length; i++){\r\n sum += parseFloat(arr[i]);\r\n }\r\n return sum / arr.length;\r\n }", "function findAvg(arr) {\n var sum = 0;\n var avg = 0;\n for(var i = 0; i < arr.length; i++) {\n sum += arr[i];\n }\n avg = sum / arr.length;\n return avg; \n}", "function avg(arr) {\n return arr.reduce((a,b) => +a + +b) / arr.length;\n }", "avg() {\n\t\tlet argArr = this.args;\n\t\tfunction avgSet(s,c,f) {\n\t\t\taverage: s;\n\t\t\tceiling: c;\n\t\t\tfloor: f;\n\t\t}\n\t\tlet evaluate = function() {\n\t\t\tlet sum = 0;\n\t\t\tfor(let c=0;c<argArr.length;c++) {\n\t\t\t\tsum += argArr[c];\n\t\t\t}\n\t\t\tsum /= argArr.length\n\t\t\tlet ceil = Math.ceil(sum)\n\t\t\tlet floor = Math.floor(sum)\n\n\t\t\tlet avg = avgSet(sum,ceil,floor); //{average:sum,ceiling:ceil,floor:floor}\n\t\t\treturn avg;\n\t\t};\n\t\t// console.log(evaluate())\n\t\tthis.record(`Evaluated avg: ${evaluate().average} | fxnCount: ${this.fxnCount} | avgCount: ${this.avgCount}`,evaluate());\n\t}", "avg() {}", "function average(arr){\n return sum(arr) / arr.length;\n }", "function averageFinder2(arr) {\n var average = 0;\n var sum = 0;\n for(var i = 0; i < arr.length; i++) {\n sum+= arr[i]\n } \n return Math.ceil(sum / arr.length); \n }", "function calcAVG(array) {\n var total = 0;\n for (var i = 0; i < array.length; i++) {\n total += array[i];\n }\n var avg = total / array.length;\n return (avg);\n}", "function avg() {\n var sum = 0;\n for (var i = 0, j = arguments.length; i < j; i++) {\n sum += arguments[i];\n }\n return sum / arguments.length;\n}", "function avg() {\n var sum = 0;\n for (var i = 0, j = arguments.length; i < j; i++) {\n sum += arguments[i];\n }\n return sum / arguments.length;\n}", "function avg(array) {\r\n\tvar sum = array.reduce(function(prev,current){\r\n\t\treturn prev + current;\r\n\t});\r\n\treturn sum/array.length;\r\n}", "function find_average(array) {\n // your code here\n var sum = 0;\n array.forEach( element => sum += element); \n return sum / array.length;\n}", "function average(array) {\n function plus(a, b) { return a + b; }\n return array.reduce(plus) / array.length;\n }", "function getAverage(arr){\n var avg = 0;\n for(var i = 0; i < arr.length; i++){\n avg += arr[i];\n }\n avg = avg/arr.length;\n return avg;\n}", "function average(array){\n function plus(a, b){return a + b;}\n return array.reduce(plus) / array.length;\n}", "function findAvg(numArr) {\n var sum = 0;\n for (var i = 0; i < numArr.length; i++) {\n sum = sum + numArr[i];\n }\n avg = sum / numArr.length;\n return avg;\n}", "function average(data){\n\treturn _.round(_.sum(data) / data.length);\n}", "function avg(arr) {\n\tvar sum = 0;\n\tfor (var i = arr.length - 1; i >= 0; i--) {\n\t\tsum += arr[i]\n\t}\n\treturn sum / arr.length\n}", "function findAvg(numArr){\n var sum = 0;\n var avg = 0;\n for (var i = 0; i < numArr.length; i++){\n sum = sum + numArr[i];\n }\n avg = sum / numArr.length;\n return avg;\n}", "function average(arr) {\n return _.reduce(arr, function (memo, num) {\n return memo + num;\n }, 0) / arr.length;\n }", "function average(array){\n function plus(a,b){return a+b}\n return array.reduce(plus)/array.length;\n}", "function find_average(array) {\n\tlet sum = array.reduce((prev, next) => prev + next, 0);\n\treturn Math.floor(sum / array.length);\n}", "function average(a){\n\tvar store=0;\n\tif (a.length === 0){\n\t\treturn 0;\n\t};\n\n\tfor (var i=0; i < a.length; i++){\n\t\tstore+= a[i];\n\t\t\n\t}return store/a.length;\n\n}", "function find_average(array) {\n var average = 0\n array.forEach(x => average += x)\n return average/array.length\n}", "function average() { \n\treturn a;\n}", "function average(array) {\n function plus(a, b) { return a + b; }\n return array.reduce(plus) / array.length;\n}", "function average(array) {\n function plus(a, b) { return a + b; }\n return array.reduce(plus) / array.length;\n}", "function average(array) {\n function plus(a, b) { return a + b; }\n return array.reduce(plus) / array.length;\n}", "function average(array) {\n function plus(a, b) { return a + b; }\n return array.reduce(plus) / array.length;\n}", "function average(array) {\n function plus(a, b) { return a + b; }\n return array.reduce(plus) / array.length;\n}", "function average(array) {\n function plus(a, b) { return a + b; }\n return array.reduce(plus) / array.length;\n}", "function average(array) {\n function plus(a, b) { return a + b; }\n return array.reduce(plus) / array.length;\n}", "function calcAverage (arr){\n // needs to initialize\n var sum = 0;\n for ( var i = 0 ; i < arr .length; i ++ ){\n sum += arr [ i ];\n }\n // must divide by the length\n return sum/arr.length;\n}", "function avg(arr){\n var sum =0;\n \n for(var i=0; i<arr.length; i++){\n sum+=arr[i]\n \n }\n return sum/arr.length;\n}", "function average(array) {\n function plus(a, b) {\n return a + b;\n }\n return array.reduce(plus) / array.length;\n}", "function findAverage(arr){\n var sum = 0;\n for(var i = 0; i < arr.length; i++){\n sum = sum + arr[i]; //or: sum += arr[i]\n }\n var avg = sum / arr.length;\n console.log(avg); //or: return avg;\n}", "function average(a, b) {\n return (a + b) / 2;\n}", "function avg(arr){\n return arr.reduce((a,b) => a + b, 0) / arr.length\n }", "function aveArray(arr){\n\tvar sum1=0;\n\tvar avg=0;\n for(i=0 ; i<arr.length ; i++){\n sum1 += arr[i];\n avg= sum1/arr.length;\n }return avg;\n}", "function compute_average (array_in) {\n console.log(array_in)\n //console.log(array_in.length)\n console.log(typeof(array_in))\n\n var sum = 0;\n \n for (var i = 0; i < array_in.length; i++ ) {\n //console.log(array_in[i].count)\n sum += array_in[i].count\n }\n var ave = sum / array_in.length;\n //console.log(ave)\n return ave;\n }", "function getAvg(data) {\r\n\r\n\t\tvar sum = 0;\r\n\r\n\t\tfor (var i = 0; i < data.length; i++) {\r\n\t\t\tsum = sum + data[i];\r\n\t\t}\r\n\r\n\t\tvar average = (sum / data.length).toFixed(4);\r\n\t\treturn average;\r\n\t}", "function getAvg(grades) {\n var sum = 0;\n for (var i = 0; i < grades.length; i++) {\n sum += parseInt(grades[i], 10);\n }\n return sum / grades.length;\n }", "function average(array) {\n function plus(a, b) {\n return a + b;\n }\n\n return array.reduce(plus) / array.length;\n}", "average() {\n if (this.length)\n return this.reduce((accumulator, value) => accumulator + value, 0) / this.length;\n else\n return 0;\n }", "avg(){\n let t=data[0];\n var avg;\n var sum;\n for(x=0;x<t.length; x++){\n sum=sum+t[x];\n }//for\n avg=sum/t.length;\n return avg;\n }", "function avg() {\n\t var clean = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : filter.ignoreMissing;\n\t\n\t return function (values) {\n\t var cleanValues = clean(values);\n\t if (!cleanValues) return null;\n\t var sum = _underscore2.default.reduce(cleanValues, function (a, b) {\n\t return a + b;\n\t }, 0);\n\t return sum / cleanValues.length;\n\t };\n\t}", "function average(array){\n\tvar result= 0;\n\tvar total= 0;\n\tfor (var i= 0; i<array.length; i++){\n\t\tresult+= array[i];\n\t\ttotal= result / array.length;\n\t} \n\treturn total; \t\n}", "function average(data){\n var sum = data.reduce(function(sum, value){\n return sum + value;\n }, 0);\n var avg = sum / data.length;\n return avg;\n}", "function avg_array(arr) {\n var sum = 0\n for( var i = 0; i < arr.length; i++) {\n sum += arr[i];\n }\n return sum / arr.length;\n}", "function findAvg(gradesList){\n let total = 0;\n for (let i = 0; i < gradesList.length; i++){\n total += gradesList[i];\n }\n let avg = total / gradesList.length;\n console.log(avg);\n return avg;\n}", "function avg(arr) {\n\tlet total = 0;\n\t//loop over each num\n\tfor (let num of arr) {\n\t\t//add them together\n\t\ttotal += num;\n\t}\n\t//divide by number of nums\n\treturn total / arr.length;\n}", "function average(array){\n //함수를 완성하세요\n var result = 0;\n for (var i = 0; i < array.length; i++) {\n result = result + array[i]\n }\n return result/array.length ;\n}", "function getAverage(a,b){\n var result = (a+b)/2\n return result\n}", "function m_average(table) //table -> tableau contenant les chiffres\n{\n var _sum = 0;\n\n for(var i = 0; i < table.length; i=i+1)\n {\n _sum = _sum + table[i];\n }\n\n return _sum/table.length;\n}", "average() {\n const length = this.length();\n let sum = 0;\n // this.traverse(function (node) {\n // sum += node.value;\n // });\n this.traverse(node => sum += node.value);\n\n return this.isEmpty() ? null : sum / length;\n }", "function avg(arr){\n let denom = arr.length;\n let numerator = sum(arr);\n \n return numerator / denom;\n}", "function find_average(array) {\n var sum = array.reduce((a, b) => a + b, 0);\n return sum/array.length;\n}", "function average(data){\n let sum = data.reduce(function(sum, value){\n return sum + value;\n }, 0);\n \n let avg = sum / data.length;\n return avg;\n}", "function average(arr){\n var sum = 0;\n for(var i = 0; i < arr.length; i++){\n sum += arr[i];\n }\n return sum / arr.length;\n}", "function avg(arr) {\n const total = arr.reduce((sum, b) => (sum + b));\n return (total / arr.length);\n}", "function getAverage (data) {\n return data.reduce((acc, curr) => (acc += curr), 0) / data.length\n}", "function find_average(array) {\n return array.reduce((a, b) => (a + b)) / array.length;\n}", "function calculateAverage(){\r\n var average = 0;\r\n for (var i=0; i<students.length;i++){\r\n average+=students[i].score; \r\n }\r\n //console.log(average/students.length);\r\n\r\n return (average/(students.length)); \r\n}", "function avg(a, b) {\r\n c = ((a + b) / 2);\r\n return c;\r\n\r\n}", "function simple_average(data) {\n\tlet sum = 0\n\tfor(var i = 0; i < data.length; i++) {\n\t\tsum += data[i]\n\t}\n\treturn sum / data.length\n}", "function getAverage(marks){\n\nlet totalMarks = marks.reduce(function(a,b){return a+b})\nlet marksLen = marks.length\n\nreturn Math.floor(totalMarks/marksLen)\n\n}", "function Average(arr){\n var av = 0;\n for(var i = 0 ; i < arr.length ;i++){\n av += arr[i]\n }\n av = av/arr.length\n return(av)\n}", "getAverageGrades() {\n let total = 0\n for (let i = 0; i < this.grades.length; i++) {\n total += this.grades[i];\n }\n return total / this.grades.length\n }", "function getAvg(array) {\n return array.reduce(function (p, c) {\n return p + c;\n }) / array.length;\n}", "function findAverage(array) {\n var sum = 0;\n var dividedBy = array.length;\n\n for (let i = 0; i < array.length; i++) {\n sum += array[i];\n }\nconsole.log(\"sum is \" + sum);\nconsole.log(\"div is\" + dividedBy);\n return sum / dividedBy;\n}", "function calcAverage(array) {\n let sum = 0;\n for (let i=0;i<array.length;i++){\n sum += array[i]; \n };\n avg = sum/array.length;\n return avg;\n }", "function average(arr){\n let total = 0;\n\n //for the length of the given array, we will count up the given amount and devide it by the length.\n for(var i = 0; i < arr.length; i++){\n total += arr[i];\n }\n\n return total/arr.length;\n}", "function average(data) {\n\tvar total = data.reduce(function(a, b){return a+b;},0);\n\tvar sum = data.reduce(function(a, b, i){return a+b*(i+1);},0);\n\treturn [total,sum/total]; \n}", "function avg(num1, num2) {\n return (num1 + num2)/2;\n}", "function getAverage(marks){\n return Math.floor(marks.reduce((acc, c) =>(acc+c))/marks.length)\n}", "function aveArray(arr){\r\n\t\tvar sum=0\r\n\t\tfor (i=0;i<arr.length;i++) {\r\n\t\t\tsum+=arr[i]\r\n\t\t}\r\n\t\tvar avg=sum/arr.length;\r\n\t\treturn avg;\r\n\t}", "function find_average(array) {\n // your code here\n if (array.length === 0) {\n return 0;\n }\n const average =\n array.reduce(function (acc, cur, i, arr) {\n return acc + cur;\n }, 0) / array.length;\n return average;\n}", "function mean(arr){\n var ave = 0;\n if(arr.length === 0){\n return null;\n }else{\n for (var i = 0; i < arr.length; i++) {\n ave += arr[i];\n }\n }return ave/arr.length;\n}", "function avg(num1, num2, num3) {\n return (num1 + num2 + num3) / 3; \n}", "function average (array) {\n\tvar n = array.length ;\n\tvar a = 0 ;\n\tfor (var i=0 ; i<n ; i++) {\n\t\ta+= array[i]\n\t}\n\treturn a/n ;\n}", "function calcuateAverage(arr) {\n let n = arr.length\n let sum = 0\n for (const element of arr) {\n sum = sum + element\n }\n return sum / n\n}", "function average (array) {\n\tvar total = 0;\nfor(var i = 0; i < array.length; i++){\n\t\ttotal = sum (array) / array.length;\n }return total;\n}", "getAverageRating() {\n let ratingsSum = this.ratings.reduce((currentSum, rating) => currentSum + rating, 0);\n const lengthOfArray = this._ratings.length;\n return ratingsSum/lengthOfArray;\n }", "function getAvg(stats) {\n let total = 0;\n for (let i = 0; i < stats.length; i++) {\n total += Number(stats[i])\n }\n\n let avg = total / stats.length\n console.log(\"average\", avg)\n return avg\n }", "function avg(a,b){\r\n c=(a+b)/2\r\n return c;\r\n\r\n}", "function average (array) {\n\tif (sum(array) === 0) {\n\treturn 0;\n\t}\n\telse {\n\ta = (sum(array)) / (array.length);\n\treturn a;\n\t}\n}", "function avgAll(myarray) {\n var tot = 0;\n for(var i = 0; i < myarray.length; i++) {\n tot += myarray[i];\n }\n return tot / myarray.length;\n}", "function averageOf(no1, no2, no3) {\n return (no1 + no2 + no3)/3;\n}", "function getAverage(marks) {\n\tvar totalScore = 0;\n\tmarks.forEach(function(element){\n\t\ttotalScore = totalScore + element;\n\t\treturn totalScore;\n\t})\n\treturn Math.floor(totalScore / marks.length);\n}", "function average(array) {\n if (array.length === 0) {\n return Number.NaN;\n }\n\n const result = Math.floor(totalled(array) / array.length);\n\n if (!Number.isFinite(result)) {\n return Number.NaN;\n }\n\n return result;\n}", "function getAvg(numTotal, numAmount) {\n\treturn numTotal / numAmount;\n}", "average() {\n\n }", "function average (arr){\n var sum = 0;\n for (var i= 0;i<arr.length;i++){\n\n sum = sum + arr[i];\n\n }\n\n return sum/arr.length\n}", "function getOneAverage(array){\n // console.log(array);\n var sum = array.reduce(getSum); // sum of all nums in array\n var avg = sum / array.length;\n // console.log(avg);\n return avg;\n}" ]
[ "0.81655014", "0.8126148", "0.81075734", "0.7911035", "0.7857189", "0.7830829", "0.77762526", "0.77736145", "0.7769261", "0.77690023", "0.7748383", "0.77255243", "0.7715681", "0.7705366", "0.76876277", "0.76876277", "0.7662708", "0.7655033", "0.763717", "0.76056564", "0.76043063", "0.7595238", "0.7590694", "0.7569999", "0.7563227", "0.75617087", "0.75359434", "0.75357616", "0.75304323", "0.7530002", "0.7529218", "0.75178355", "0.7513776", "0.7513776", "0.7513776", "0.7513776", "0.7513776", "0.7513776", "0.7512245", "0.7506618", "0.74990624", "0.74786013", "0.7473594", "0.7471543", "0.7467217", "0.7465237", "0.7462589", "0.7459374", "0.7447741", "0.744746", "0.744177", "0.74384034", "0.7438173", "0.74373204", "0.74335593", "0.74294984", "0.7428652", "0.7422255", "0.7414651", "0.74035114", "0.74025244", "0.73969203", "0.739445", "0.7393868", "0.7392483", "0.7381833", "0.7375356", "0.73742115", "0.73614633", "0.7358153", "0.73485994", "0.73476666", "0.734759", "0.7340942", "0.7325036", "0.7324242", "0.73197", "0.7316766", "0.7312114", "0.73069495", "0.72942203", "0.7293672", "0.7291529", "0.7289613", "0.7288133", "0.728796", "0.72849023", "0.7284891", "0.7283476", "0.7281111", "0.7279516", "0.72760326", "0.72704786", "0.72669566", "0.7264697", "0.7254076", "0.72528756", "0.72519726", "0.72504365", "0.7246191" ]
0.741781
58
helper function to find standard deviation
function std(values){ var total = 0; var mean = avg(values); for (var i = 0; i < values.length; i++){ total += Math.pow((values[i]-mean), 2); } return Math.sqrt(total/values.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stdev() {\r\n\tvar data = stdev.arguments;\r\n\tvar deviation = new Array();\r\n\tvar valid_data = new Array();\r\n\tvar sum = 0;\r\n\tvar devnsum = 0;\r\n\tvar stddevn = 0;\r\n\tvar len = data.length;\r\n\tvar valid_len = 0;\r\n\tfor (var i=0; i<len; i++) {\r\n\t\tthisnum = data[i];\r\n\t\tif (isFloat(thisnum) && thisnum != 'NaN') {\r\n\t\t\tsum = sum + (thisnum * 1); // ensure number\r\n\t\t\tvalid_data[valid_len] = thisnum;\r\n\t\t\tvalid_len++;\r\n\t\t} else if (thisnum != null && thisnum != \"undefined\" && thisnum != \"\" && thisnum != 'NaN') {\r\n\t\t\treturn 'NaN';\r\n\t\t}\r\n\t}\r\n\tdata = new Array(); // clear data from memory\r\n\tif (valid_len == 0) return 'NaN';\r\n\tvar mean = (sum/valid_len);\r\n\tfor (i=0; i<valid_len; i++) {\r\n\t\tdeviation[i] = valid_data[i] - mean;\r\n\t\tdeviation[i] = deviation[i] * deviation[i];\r\n\t\tdevnsum = devnsum + deviation[i];\r\n\t}\r\n\treturn Math.sqrt(devnsum/(valid_len-1));\r\n}", "function stdev(vals) {\n return Math.sqrt(variance(vals))\n}", "function standardDeviation(values) {\r\n\t\tvar avg = getAvg(values);\r\n\r\n\t\tvar squareDiffs = values.map(function(value) {\r\n\t\t\tvar diff = value - avg;\r\n\t\t\tvar sqrDiff = diff * diff;\r\n\t\t\treturn sqrDiff;\r\n\t\t});\r\n\r\n\t\tvar avgSquareDiff = getAvg(squareDiffs);\r\n\r\n\t\tvar stdDev = Math.sqrt(avgSquareDiff);\r\n\t\treturn stdDev;\r\n\t}", "function standardDeviation(values){\n var avg = average(values);\n\n var squareDiffs = values.map(function(value){\n var diff = value - avg;\n var sqrDiff = diff * diff;\n return sqrDiff;\n });\n\n var avgSquareDiff = average(squareDiffs);\n\n var stdDev = Math.sqrt(avgSquareDiff);\n return stdDev;\n}", "function standardDeviation(values){\n let avg = average(values);\n \n let squareDiffs = values.map(function(value){\n let diff = value - avg;\n let sqrDiff = diff * diff;\n return sqrDiff;\n });\n \n let avgSquareDiff = average(squareDiffs);\n \n let stdDev = Math.sqrt(avgSquareDiff);\n return stdDev;\n}", "function stddev() {\n\t\tvar stddev = 0;\n\t\tvar avg = average();\n\t\tif (avgNum.length != 0) {\n\t\t\tfor (var i = 0; i < avgNum.length; i++) {\n\t\t\t\tstddev = stddev + Math.pow((parseInt(avgNum[i])-avg),2);\n\t\t\t}\n\t\t}\n\t\treturn Math.sqrt(stddev/avgNum.length);\n\t}", "function stddev(values) {\n\tlet avg = average(values)\n\tlet sumOfDeviationsSquared = values.reduce((a, b) => {\n\t\treturn a + (Math.abs(avg - b) ** 2)\n\t}, 0)\n\tlet avgOfDeviationsSquared = sumOfDeviationsSquared / values.length\n\treturn Math.sqrt(avgOfDeviationsSquared)\n}", "function standardDeviation(arr) {\r\n let varianceValue = variance(arr);\r\n let standardDeviationValue = Math.sqrt(varianceValue);\r\n\r\n return standardDeviationValue;\r\n}", "function standardDeviation(data) {\n if (data.length === 0) return null;\n\n const avg = average(data);\n const squareDiffs = data.map((value) => {\n const diff = value - avg;\n const sqrDiff = diff * diff;\n return sqrDiff;\n });\n const avgSquareDiff = average(squareDiffs);\n const standardDeviation_ = Math.sqrt(avgSquareDiff);\n return Math.floor(standardDeviation_);\n}", "function standardDeviation(arr) {\n const n = arr.length;\n const [tot, sqDev] = arr.reduce(\n (acc, curr) => {\n acc[0] += curr;\n acc[1] += curr ** 2;\n return acc;\n },\n [0, 0]\n );\n\n let ans = Math.pow(sqDev / n - (tot / n) ** 2, 0.5);\n return Number.isInteger(ans) ? ans : Math.round(ans * 1000) / 1000;\n}", "function calcStdDev(array) {\r\n\tvar svariance = calcVariance(array);\r\n\tvar sstddev = Math.sqrt(svariance);\r\n\treturn sstddev.toFixed(2);\r\n}", "function stddev(values, avg) {\n if (values.length <= 1) {\n return 0;\n }\n\n return Math.sqrt(\n values.map(function (v) { return Math.pow(v - avg, 2); })\n .reduce(function (a, b) { return a + b; }) / (values.length - 1));\n}", "function standard_deviation(x) {\n // The standard deviation of no numbers is null\n if (x.length === 0) return null;\n\n return Math.sqrt(variance(x));\n }", "function standard_deviation(x) {\n // The standard deviation of no numbers is null\n if (x.length === 0) return null;\n\n return Math.sqrt(variance(x));\n }", "function standard_deviation(x) {\n // The standard deviation of no numbers is null\n if (x.length === 0) return null;\n\n return Math.sqrt(variance(x));\n }", "function findStandardDeviation(inputData){\n var arr= inputData.data;\n var length=arr.length;\n\n const squared_arr =[];\n var sum=0;\n for(let i=0;i<length;i++){\n squared_arr[i]=(arr[i]) ** 2;\n sum=sum+squared_arr[i];\n }\n\n const mean_of_squared=sum/length;\n let mean=findMean(inputData);\n const StandardDeviation= (mean_of_squared-(mean)**2)**(1/2);\n return StandardDeviation;\n\n}", "static stddev( scores ) {\n\n /* Make sure we are working with floating point\n * numbers.\n */\n //There is also a minor check here that makes sure that\n //we dont include NULL scores in the sd calculations.\n //We wont need this when the annotation tool is being used\n //as this should catch all 'bad' data.\n //This is only partially correct anyway because there are no checks\n //within the ci functions and so the data will still be wrong\n //and include NULL data.\n if (scores !== null) {\n let bad_data = 0;\n let scores_sum = 0;\n\n scores.forEach((x) => {\n if (x === null) {\n bad_data++\n } else {\n scores_sum += x;\n }\n });\n\n let count = scores.length - bad_data;\n\n if (count === 0 || scores_sum === 0) { \n return null;\n }\n\n let mean = scores_sum / count;\n let sum = 0;\n \n scores.forEach((x) => {\n if (x !== null) {\n sum += (x - mean)**2\n }\n });\n\n if (sum !== 0 && count !== 0) {\n let stddev = Math.sqrt(sum / (count - 1));\n return stddev;\t\n } else {\n return null;\n }\n\n } else {\n return null;\n }\n }", "function sampleStdev(vals) {\n return Math.sqrt(sampleVariance(vals))\n}", "function sample_standard_deviation(x) {\n // The standard deviation of no numbers is null\n if (x.length <= 1) return null;\n\n return Math.sqrt(sample_variance(x));\n }", "function sample_standard_deviation(x) {\n // The standard deviation of no numbers is null\n if (x.length <= 1) return null;\n\n return Math.sqrt(sample_variance(x));\n }", "function sample_standard_deviation(x) {\n // The standard deviation of no numbers is null\n if (x.length <= 1) return null;\n\n return Math.sqrt(sample_variance(x));\n }", "function sampleStandardDeviation(list_data)\n{\n\tvar m = mean(list_data);\n\tvar result = 0;\n\tfor(var i = 0; i < list_data.length; i++)\n\t{\n\t\tresult+= Math.pow(list_data[i] - m, 2);\n\t}\n\treturn Math.sqrt(result/(list_data.length-1));\n}", "std_dev() {\n return Utils.std_dev(this.series)\n }", "function computeStandardDev(listOfValues, sampleSize, average) {\n var vals = [];\n for (var i=0; i<sampleSize; i++) {\n vals.push(Math$pow((listOfValues[i] - average), 2));\n }\n return Math$sqrt(Array$sum(vals)/vals.length);\n}", "function populationStdev(vals) {\n return Math.sqrt(populationVariance(vals))\n}", "function getStandardDev(data, dataAvg) {\n var summation = 0;\n if (dataAvg) {\n for (var i = 0; i < data.length; i++) {\n item = data[i];\n summation = summation + ((item.intensity - dataAvg) * (item.intensity - dataAvg));\n }\n }\n return Math.sqrt(summation / data.length);\n}", "function stdDay(){\n\tvar dayStd = Math.sqrt((totDayReadMinMeanSqrt / dayPop));\n\treturn dayStd;\n}", "function getStandardDeviation (integers) {\r\n const n = integers.length\r\n const mean = integers.reduce((a, b) => a + b) / n\r\n return Math.sqrt(integers.map(x => Math.pow(x - mean, 2)).reduce((a, b) => a + b) / n)\r\n }", "function RSD(stdev, mean) {\n if (!(typeof stdev === 'number' && typeof mean === 'number')) {\n throw {\n 'name': 'TypeError',\n 'message':\n 'Function \"RSD()\" requires ' +\n 'two numeric arguments'\n };\n }\n return (100 * (stdev / mean)).toFixed(2) * 1;\n}", "function deviation(nArr) {\n var total = 0;\n nArr.forEach(function (data) {\n total = total + parseFloat(data);\n });\n var meanVal = total / nArr.length;\n var devCal = 0;\n for (var key in nArr) {\n devCal += Math.pow((parseFloat(nArr[key]) - meanVal), 2);\n }\n var result = Math.sqrt(devCal / nArr.length);\n return result;\n}", "function STDEV(data_array, window_len)\n\t{\n\t\tvar i, j;\n\n\t\t// Number of performance objectives\n\t\tvar perf_obj_count = data_array[0].length;\n\n\t\tvar stdev_array = [];\n\t\tfor(i = 0; i < perf_obj_count; i++)\n\t\t{\n\t\t\t// Retreive data for a maximum of window_len elements\n\t\t\tvar data = [];\n\t\t\tfor(j = data_array.length - 1; j >= (data_array.length - window_len); j--)\n\t\t\t\tdata.push(parseFloat(data_array[j][i]));\n\n\t\t\t// Calculate mean\n\t\t\tvar sum = 0;\n\t\t\tfor(j = 0; j < window_len; j++)\n\t\t\t\tsum = sum + data[j];\n\t\t\tvar mean = sum/window_len;\n\n\t\t\t// Calculation variance\n\t\t\tvar var_sum = 0;\n\t\t\tfor(j = 0; j < window_len; j++)\n\t\t\t\tvar_sum = var_sum + Math.pow((data[j] - mean), 2);\n\t\t\tvar variance = var_sum/window_len;\n\n\t\t\t// Calculate standard daviation\n\t\t\tvar stdev = Math.sqrt(variance);\n\n\t\t\t// Push standard deviation value into an array\n\t\t\tstdev_array.push(stdev);\n\t\t}\n\n\t\treturn stdev_array;\n\t}", "function __VStdev(arrayInput, population = false) {\r\n return Math.sqrt(__VVar(arrayInput, population));\r\n}", "function rds(values) {\n\treturn Math.abs(stddev(values) / average(values))\n}", "function stdev($close, window) {\n return rolling(function (x) {\n return sd(x);\n }, window, $close);\n }", "function stdWeek(){\n\tvar weekStd = Math.sqrt((totWeekReadMinMeanSqrt / weekPop));\n\treturn weekStd;\n}", "function computeMeanStdev(list) {\n let sum = 0;\n for (let v of list) {\n sum += v\n }\n let mean = sum / list.length;\n\n let stdev = 0;\n for (let v of list) {\n stdev += (v - mean) * (v - mean)\n }\n stdev /= list.length;\n stdev = Math.sqrt(stdev);\n return [mean, stdev]\n}", "function standardize(point, mean, standardDeviation) {\n return point.sub(mean).div(standardDeviation);\n}", "function get_modelcoef_std(xData, index, np){\n let temp = xData.filter((val, i) => i % np == index)\n let mean = temp.reduce((total, c) => total += c, 0) / temp.length;\n let diff = temp.map((d) => Math.pow(d - mean, 2));\n let diff_total = diff.reduce((total, c) => total += c, 0);\n return Math.sqrt(diff_total / temp.length);\n}", "function gaussian(mean, stdev) {\n var y2;\n var useLast = false;\n var y1;\n if (useLast) {\n y1 = y2;\n useLast = false;\n } else {\n var x1, x2, w;\n do {\n x1 = 2.0 * Math.random() - 1.0;\n x2 = 2.0 * Math.random() - 1.0;\n w = x1 * x1 + x2 * x2; \n } while ( w >= 1.0);\n w = Math.sqrt((-2.0 * Math.log(w))/w);\n y1 = x1 * w;\n y2 = x2 * w;\n useLast = true;\n }\n\n var retval = mean + stdev * y1;\n if (retval > 0) {\n return retval;\n }\n return -retval;\n}", "function averagedev() {\n\t\t var avrg = average();\n\t\t var standarddev = stddev();\n\t\t var arrayresult = [avrg,standarddev];\n\t\t \n\t\t //For Printing to page\n\t\t $('#avg').val(arrayresult[0]);\n\t\t $(\"#stddev\").val(arrayresult[1]);\n\t\t \n\t\t //Returning the array\n\t\t return arrayresult;\n\t}", "function calcStats(xs) {\n let m = 0,\n ssq = 0;\n for(let i = 0; i < xs.length; i += 1) {\n m += (xs[i] - m) / (i + 1);\n }\n for(let i = 0; i < xs.length; i += 1) {\n ssq += Math.pow(xs[i] - m, 2);\n }\n return {mean: m, std: Math.sqrt(ssq / (xs.length - 1))};\n}", "function normal(avg, stdev){ return avg + (stdev * Math.sqrt(-2 * Math.log(Math.random())) * Math.cos(2 * Math.PI * Math.random())); }", "function dev( p, points, size){\r\n\tvar l=linear_reg(points,size);\r\n\treturn deviation(p,l);\r\n}", "function z_score(x, mean, standard_deviation) {\n return (x - mean) / standard_deviation;\n }", "function z_score(x, mean, standard_deviation) {\n return (x - mean) / standard_deviation;\n }", "function z_score(x, mean, standard_deviation) {\n return (x - mean) / standard_deviation;\n }", "function sample_variance(x) {\n // The variance of no numbers is null\n if (x.length <= 1) return null;\n\n var sum_squared_deviations_value = sum_nth_power_deviations(x, 2);\n\n // Find the mean value of that list\n return sum_squared_deviations_value / (x.length - 1);\n }", "function sample_variance(x) {\n // The variance of no numbers is null\n if (x.length <= 1) return null;\n\n var sum_squared_deviations_value = sum_nth_power_deviations(x, 2);\n\n // Find the mean value of that list\n return sum_squared_deviations_value / (x.length - 1);\n }", "function sample_variance(x) {\n // The variance of no numbers is null\n if (x.length <= 1) return null;\n\n var sum_squared_deviations_value = sum_nth_power_deviations(x, 2);\n\n // Find the mean value of that list\n return sum_squared_deviations_value / (x.length - 1);\n }", "function stdDevDiffCheck({ scores, threshold, minDev = 10, chance = 90 }) {\n if (roll(chance) && scores.length > 1) {\n let n = 1;\n // find first N scores with std dev less than 10\n for (; n < scores.length; n++) {\n const stdDev = standardDeviation(scores.slice(0, n + 1));\n if (stdDev > minDev) break;\n }\n const diff = scores[0] - scores[n];\n const picked = diff > threshold;\n console.log(\"stddev check\", picked, \"slot\", n, \"diff\", diff, \"threshold\", threshold);\n return picked;\n }\n console.log(\"chance no stddev\");\n return false;\n}", "function rnorm(mean, stdev) {\n var u1, u2, v1, v2, s;\n if (mean === undefined) {\n mean = 0.0;\n }\n if (stdev === undefined) {\n stdev = 1.0;\n }\n if (rnorm.v2 === null) {\n do {\n u1 = Math.random();\n u2 = Math.random();\n\n v1 = 2 * u1 - 1;\n v2 = 2 * u2 - 1;\n s = v1 * v1 + v2 * v2;\n } while (s === 0 || s >= 1);\n\n rnorm.v2 = v2 * Math.sqrt(-2 * Math.log(s) / s);\n return stdev * v1 * Math.sqrt(-2 * Math.log(s) / s) + mean;\n }\n\n v2 = rnorm.v2;\n rnorm.v2 = null;\n return stdev * v2 + mean;\n}", "function rnorm(mean, stdev) {\n var u1, u2, v1, v2, s;\n if (mean === undefined) {\n mean = 0.0;\n }\n if (stdev === undefined) {\n stdev = 1.0;\n }\n if (rnorm.v2 === null) {\n do {\n u1 = Math.random();\n u2 = Math.random();\n\n v1 = 2 * u1 - 1;\n v2 = 2 * u2 - 1;\n s = v1 * v1 + v2 * v2;\n } while (s === 0 || s >= 1);\n\n rnorm.v2 = v2 * Math.sqrt(-2 * Math.log(s) / s);\n return stdev * v1 * Math.sqrt(-2 * Math.log(s) / s) + mean;\n }\n\n v2 = rnorm.v2;\n rnorm.v2 = null;\n return stdev * v2 + mean;\n}", "function rnorm(mean, stdev) {\n\tvar u1, u2, v1, v2, s;\n\tif (mean === undefined) {\n\t\tmean = 0.0;\n\t}\n\tif (stdev === undefined) {\n\t\tstdev = 1.0;\n\t}\n\tif (rnorm.v2 === null) {\n\t\tdo {\n\t\t\tu1 = Math.random();\n\t\t\tu2 = Math.random();\n\n\t\t\tv1 = 2 * u1 - 1;\n\t\t\tv2 = 2 * u2 - 1;\n\t\t\ts = v1 * v1 + v2 * v2;\n\t\t} while (s === 0 || s >= 1);\n\n\t\trnorm.v2 = v2 * Math.sqrt(-2 * Math.log(s) / s);\n\t\treturn stdev * v1 * Math.sqrt(-2 * Math.log(s) / s) + mean;\n\t}\n\n\tv2 = rnorm.v2;\n\trnorm.v2 = null;\n\treturn stdev * v2 + mean;\n}", "function normalDistrRandom (mean,stdDev) {\n let u = 0, v = 0;\n while(u === 0) u = Math.random(); \n while(v === 0) v = Math.random();\n return Math.sqrt(-2*Math.log(u))*Math.cos(2*Math.PI*v)*stdDev+mean\n}", "function variance( crashes, mean ) {\n var multiplex = 1/(crashes.length-1);\n var tempSum = 0;\n var temp = 0;\n for ( var i = 0; i < crashes.length; i++ ) {\n temp = Math.pow( crashes[i] - mean, 2 );\n if ( temp < 0 ) {\n temp = temp*-1;\n }\n tempSum += temp;\n }\n return multiplex * tempSum;\n}", "function var2(data) {\r\n var sum = 0;\r\n\tmean_ = mean(data);\r\n\tfor (dt = 0; dt < data.length; dt++) {\r\n\t sum += Math.pow(data[dt]-mean_, 2);\r\n\t}\r\n\tvar S2 = sum/(data.length-1);\r\n\treturn S2;\r\n}", "function variance(arr) {\r\n let meanValue = mean(arr);\r\n let total = 0;\r\n\r\n for (let i = 0; i < arr.length; i++) {\r\n total += (arr[i] - meanValue) ** 2;\r\n }\r\n let varianceValue = total / arr.length;\r\n return varianceValue;\r\n}", "function fitness(solution, callback) {\n const values = getValuesFromSolution(solution);\n const standardDeviation = jStat.stdev(values);\n\n callback(standardDeviation);\n}", "get stOrderDev(){\n var output = { sdevW: 0, sdevL: 0, sdevH: 0, tO: 0, sumW: 0, sumL: 0, sumH: 0, tO: 0 };\n var avg = this.avgOrderDims;\n for(var index in this.orders){\n output.tO += this.orders[index].quantity;\n output.sumW += Math.pow((this.orders[index].width - avg.avgW), 2) * this.orders[index].quantity;\n output.sumL += Math.pow((this.orders[index].length - avg.avgL), 2) * this.orders[index].quantity;\n output.sumH += Math.pow((this.orders[index].height - avg.avgH), 2) * this.orders[index].quantity;\n }\n output.sdevW = Math.sqrt(output.sumW / output.tO);\n output.sdevL = Math.sqrt(output.sumL / output.tO);\n output.sdevH = Math.sqrt(output.sumH / output.tO);\n return output;\n }", "function variance(x) {\n // The variance of no numbers is null\n if (x.length === 0) return null;\n\n var mean_value = mean(x),\n deviations = [];\n\n // Make a list of squared deviations from the mean.\n for (var i = 0; i < x.length; i++) {\n deviations.push(Math.pow(x[i] - mean_value, 2));\n }\n\n // Find the mean value of that list\n return mean(deviations);\n }", "function variance(x) {\n // The variance of no numbers is null\n if (x.length === 0) return null;\n\n var mean_value = mean(x),\n deviations = [];\n\n // Make a list of squared deviations from the mean.\n for (var i = 0; i < x.length; i++) {\n deviations.push(Math.pow(x[i] - mean_value, 2));\n }\n\n // Find the mean value of that list\n return mean(deviations);\n }", "function variance(x) {\n // The variance of no numbers is null\n if (x.length === 0) return null;\n\n var mean_value = mean(x),\n deviations = [];\n\n // Make a list of squared deviations from the mean.\n for (var i = 0; i < x.length; i++) {\n deviations.push(Math.pow(x[i] - mean_value, 2));\n }\n\n // Find the mean value of that list\n return mean(deviations);\n }", "function rnd_std_normal() {\n\treturn (Math.random()*2-1)+(Math.random()*2-1)+(Math.random()*2-1);\n}", "function variance(n, data)\n{\n\tlet sum= data.reduce( (t,s) => t+(s*s) ); //sum of squares\n\tlet m= mean(n, data);\n\treturn ( (sum/n) - m*m ); // Var(x) = E[x²] - E[x]²\n}", "function variance(vals) {\n vals = numbers(vals)\n var avg = mean(vals)\n var diffs = []\n for (var i = 0; i < vals.length; i++) {\n diffs.push(Math.pow((vals[i] - avg), 2))\n }\n return mean(diffs)\n}", "function weightedMeanCalc(prArray){\n valSum = 0;\n weights = [];\n weightsSum = 0;\n weightedSum = 0;\n swds=[];\n swdsSums = 0;\n unsNumer= 0;\n unsDenom=0;\n resUns=0;\n unsType = \"Weighted Standard Deviation\";\n //Non zero weights\n nzw=0;\n //First loop\n _.each(prArray,function(val){\n pr = val[0];\n uns = val[1];\n w = 1 / (uns *uns);\n if(w!==0)\n nzw++;\n weights.push(w);\n weightsSum = weightsSum + w;\n valSum = valSum + pr;\n });\n\n //calculate Mean value\n moy = valSum / prArray.length;\n //Second loop\n _.each(prArray,function(val){\n pr = val[0];\n uns = val[1];\n swd = (pr - moy) / uns;\n swd = swd*swd;\n swds.push(swd);\n swdsSums =swdsSums + swd;\n });\n\n // //Calculate mswd\n mswd = swdsSums / (prArray.length - 1);\n\n //Calculate Weighted Mean \n _.each(prArray, function(val,key){\n weightedSum = weightedSum + val[0] * weights[key]; \n });\n weightedMean = weightedSum / weightsSum;\n\n\n //Calculate WSTD\n unsDenom = (nzw -1) * weightsSum / nzw;\n _.each(prArray,function(val,key){\n a = (val[0]-weightedMean);\n a = a*a;\n unsNumer = unsNumer + (a*weights[key]);\n\n });\n\n\n if(prArray.length >1){\n resUnsMSWD = Math.sqrt(1/weightsSum);\n if (mswd > 1){\n resUnsMSWD *= Math.sqrt(mswd);\n }\n resUns= Math.sqrt(unsNumer/unsDenom);\n\n //Take highest uncert\n if(resUnsMSWD>resUns){\n resUns = resUnsMSWD;\n unsType = \"Error of the weighted mean\";\n }\n }\n else{\n resUns = prArray[0][1];\n unsType= null;\n }\n\n console.log(\"weighted mean : \"+ weightedMean,\",\", resUns);\n return [weightedMean, resUns,mswd, unsType]; \n}", "dev(p, points, size) {\r\n let l = this.linear_reg(points, size);\r\n return this.dev2(p, l);\r\n }", "function zScore(mean, sd, value) {\n var score = (value - mean) / sd;\n if (score < -2.9) {\n return -2.9;\n } else if (score > 3) {\n return 3;\n } else {\n return score;\n }\n}", "function variance(x,size){\r\nvar av=avg(x,size);\r\nvar sum=0;\r\nfor(var i=0;i<size;i++){\r\n sum+=x[i]*x[i];\r\n}\r\nvar t = sum/size\r\nvar z = av*av\r\nvar total = t - z\r\n//console.log(\"variance : \" + total)\r\nreturn total;\r\n}", "function finalCalculations (stats, dim, name, numVals) {\r\n stats[dim][name].mean *= (1 / numVals);\r\n stats[dim][name].meanOfSquares *= (1 / numVals);\r\n stats[dim][name].stdev = Math.sqrt(stats[dim][name].meanOfSquares - Math.pow(stats[dim][name].mean, 2));\r\n }", "function variance(array) {\n var demeaned = tfc.sub(toArray1D(array), tfjs_core_1.scalar(mean(array)));\n var sumSquare = tfc.sum(tfc.mulStrict(demeaned, demeaned)).dataSync()[0];\n return sumSquare / array.length;\n}", "function variance(array) {\n var demeaned = tfc.sub(toArray1D(array), tfjs_core_1.scalar(mean(array)));\n var sumSquare = tfc.sum(tfc.mulStrict(demeaned, demeaned)).dataSync()[0];\n return sumSquare / array.length;\n}", "function deviation(data,holeIndices,dim,triangles){var hasHoles=holeIndices&&holeIndices.length;var outerLen=hasHoles?holeIndices[0]*dim:data.length;var polygonArea=Math.abs(signedArea(data,0,outerLen,dim));if(hasHoles){for(var i=0,len=holeIndices.length;i<len;i++){var start=holeIndices[i]*dim;var end=i<len-1?holeIndices[i+1]*dim:data.length;polygonArea-=Math.abs(signedArea(data,start,end,dim));}}var trianglesArea=0;for(i=0;i<triangles.length;i+=3){var a=triangles[i]*dim;var b=triangles[i+1]*dim;var c=triangles[i+2]*dim;trianglesArea+=Math.abs((data[a]-data[c])*(data[b+1]-data[a+1])-(data[a]-data[b])*(data[c+1]-data[a+1]));}return polygonArea===0&&trianglesArea===0?0:Math.abs((trianglesArea-polygonArea)/polygonArea);}", "function cumulativeNormal(value, mean, stdev) {\n mean = mean || 0;\n stdev = stdev == null ? 1 : stdev;\n\n let cd,\n z = (value - mean) / stdev,\n Z = Math.abs(z);\n\n if (Z > 37) {\n cd = 0;\n } else {\n let sum, exp = Math.exp(-Z * Z / 2);\n if (Z < 7.07106781186547) {\n sum = 3.52624965998911e-02 * Z + 0.700383064443688;\n sum = sum * Z + 6.37396220353165;\n sum = sum * Z + 33.912866078383;\n sum = sum * Z + 112.079291497871;\n sum = sum * Z + 221.213596169931;\n sum = sum * Z + 220.206867912376;\n cd = exp * sum;\n sum = 8.83883476483184e-02 * Z + 1.75566716318264;\n sum = sum * Z + 16.064177579207;\n sum = sum * Z + 86.7807322029461;\n sum = sum * Z + 296.564248779674;\n sum = sum * Z + 637.333633378831;\n sum = sum * Z + 793.826512519948;\n sum = sum * Z + 440.413735824752;\n cd = cd / sum;\n } else {\n sum = Z + 0.65;\n sum = Z + 4 / sum;\n sum = Z + 3 / sum;\n sum = Z + 2 / sum;\n sum = Z + 1 / sum;\n cd = exp / sum / 2.506628274631;\n }\n }\n return z > 0 ? 1 - cd : cd;\n}", "function valuesMinusMeanSquared(vals) {\n vals = numbers(vals)\n var avg = mean(vals)\n var diffs = []\n for (var i = 0; i < vals.length; i++) {\n diffs.push(Math.pow((vals[i] - avg), 2))\n }\n return diffs\n}", "getLengthOf( t, dim ){\n\t\t\n\t\t// get mean and sd in x direction\n\t\tvar stats = this.cellStats( t, dim )\n\t\treturn stats.variance\n\n\t}", "function normal_pdf(x, mu=0, sd=1){\n return Math.exp(-1*(x-mu)**2/(2*sd**2))/Math.sqrt(2*Math.PI)/sd;\n}", "function variance(x) {\n var n = x.length;\n if (n < 1) return NaN;\n if (n === 1) return 0;\n var mean$1 = mean(x),\n i = -1,\n s = 0;\n\n while (++i < n) {\n var v = x[i] - mean$1;\n s += v * v;\n }\n\n return s / (n - 1);\n}", "function calculate_drdtheta(decs) {\n\n\tvar pre=-10000; \n\tvar mean_dr=0; var mean_dtheta=0; var mean_drdtheta =0; var mean_drdtime = 0; \n\tfor (var i=0; i<(userSpiral.length-1); i++) {\n\t\t\n\t\t//Now find the mean of the difference from i to i+1. \n\t\tmean_dr += (userSpiral[i+1].r-userSpiral[i].r);\n\t\tvar temp=(userSpiral[i+1].theta-userSpiral[i].theta); \n\t\tmean_dtheta += temp;\n\t\tif (temp!=0) { mean_drdtheta += (userSpiral[i+1].r-userSpiral[i].r)/(userSpiral[i+1].theta-userSpiral[i].theta); }\n\t\ttemp=(userSpiral[i+1].time-userSpiral[i].time); \n\t\tif (temp!=0) { mean_drdtime += (userSpiral[i+1].r-userSpiral[i].r)/temp; }\n\t\t\n\t\tuserSpiral[i].dr=(userSpiral[i+1].r-userSpiral[i].r);\n\t\tuserSpiral[i].dtheta=(userSpiral[i+1].theta-userSpiral[i].theta);\n\t\tif (temp!=0) \n\t\t\tuserSpiral[i].drdtime=(userSpiral[i+1].dr)/temp;\n\t\telse\n\t\t\tuserSpiral[i].drdtime=0; \n\t}\n\n\tvar res = ([(mean_dr/(userSpiral.length-1)).toFixed(decs) + \"\", \n\t(mean_dtheta/(userSpiral.length-1)).toFixed(decs), \n\t(mean_drdtheta/(userSpiral.length-1)).toFixed(decs), \n\t(mean_drdtime/(userSpiral.length-1)).toFixed(decs)]); \n\t\n\tvar sdev=[0,0,0,0];\n\tfor (var i=0; i<(userSpiral.length-1); i++) {\n\t\tsdev[0] += Math.pow(userSpiral[i+1].r-userSpiral[i].r-res[0],2);\n\t\tvar temp=(userSpiral[i+1].theta-userSpiral[i].theta); \n\t\tsdev[1] += Math.pow(temp - res[1],2);\n\t\tif (temp!=0)\n\t\t\tsdev[2] += Math.pow((userSpiral[i+1].r-userSpiral[i].r)/(userSpiral[i+1].theta-userSpiral[i].theta) - res[2],2);\n\t\ttemp=(userSpiral[i+1].time-userSpiral[i].time); \n\t\tif (temp!=0) { sdev[3] += Math.pow((userSpiral[i+1].r-userSpiral[i].r)/temp - res[3],2); }\n\t}\n\t\n\tfor (var i=0; i<4; i++)\n\t\tsdev[i] /= (userSpiral.length-1);\n\t\t\n\treturn ([res[0] + \"±\" + Math.sqrt(sdev[0]).toFixed(decs),\n\t\tres[1] + \"±\" + Math.sqrt(sdev[1]).toFixed(decs),\n\t\tres[2] + \"±\" + Math.sqrt(sdev[2]).toFixed(decs),\n\t\tres[3] + \"±\" + Math.sqrt(sdev[3]).toFixed(decs),\n\t]);\n}", "function limitScoresByStdDev({ scores, limit, chance = 90 }) {\n if (roll(chance) && scores.length > 1) {\n let n = 1;\n // find first N scores with std dev less than 10\n for (; n < scores.length; n++) {\n const stdDev = standardDeviation(scores.slice(0, n + 1));\n if (stdDev > limit) break;\n }\n return scores.slice(0, n);\n }\n\n return scores;\n}", "function variance(x) {\n var n = x.length;\n if (n < 1) return NaN;\n if (n === 1) return 0;\n var m = mean(x),\n i = -1,\n s = 0;\n while (++i < n) {\n var v = x[i] - m;\n s += v * v;\n }\n return s / (n - 1);\n }", "function sd(dt, d) {\n if (dt === SD) {\n startDate = d;\n } else if (dt === ED) {\n endDate = d;\n }\n }", "function hypTestForMean(dataArray, mean, total, std){\n let t = Math.abs((mean - ((dataArray.length - 1)/2))/(std/Math.sqrt(total))); //t-test statistic\n return [t, (t < 1.96)];\n }", "function standart_array(rssi_array, mean, sum){\n \tvar temp = 0;\n for(var i= 0;i<rssi_array.length;i++){\n \t\ttemp += Math.pow(rssi_array[i]-mean,2);\n \t}\n\n \treturn Math.sqrt((1/sum)*temp);\n }", "function normal1(mean, deviation) {\n return function() {\n return mean + deviation * normal();\n };\n }", "function delta(value, array, length){\n array.unshift(value);\n if(array.length > length){\n array.pop();\n }\n return standardDeviation(array);\n}", "function testStatistic2_populationVarianceNotSame (sample_mean1, sample_standard_deviation1, sample_size1, sample_mean2, sample_standard_deviation2, sample_size2)\n{\n\treturn (sample_mean1 - sample_mean2)/ Math.sqrt(\n\t\t(((sample_size1-1)*Math.pow(sample_standard_deviation1, 2) + (sample_size2-1)*Math.pow(sample_standard_deviation2, 2)) / (sample_size1 + sample_size2 - 2))\n\t\t* (1/sample_size1 + 1/sample_size2)\n\t\t);\n\n}", "function r1norm(mean, stdev) {\n var u1, u2, v1, v2, s;\n if (mean === undefined) {\n mean = 0.0;\n }\n if (stdev === undefined) {\n stdev = 1.0;\n }\n if (r1norm.v2 === null) {\n do {\n u1 = Math.random();\n u2 = Math.random();\n\n v1 = 2 * u1 - 1;\n v2 = 2 * u2 - 1;\n s = v1 * v1 + v2 * v2;\n } while (s === 0 || s >= 1);\n\n r1norm.v2 = v2 * Math.sqrt(-2 * Math.log(s) / s);\n return stdev * v1 * Math.sqrt(-2 * Math.log(s) / s) + mean;\n }\n\n v2 = r1norm.v2;\n r1norm.v2 = null;\n return stdev * v2 + mean;\n}", "cov(arr1, arr2) {\r\n let sum = 0;\r\n let size = arr1.length;\r\n let ex = this.avg(arr1, size);\r\n let ey = this.avg(arr2, size);\r\n for(let i = 0; i < size; i++)\r\n sum = sum + (parseFloat(arr1[i]) - ex) *\r\n (parseFloat(arr2[i]) - ey);\r\n return sum / size;\r\n }", "function ztest1(opt, X, f) {\n\t var nullH = opt && opt.nullh || 0,\n\t gaussian = gen.random.normal(0, 1),\n\t mu = stats.mean(X,f),\n\t SE = stats.stdev(X,f) / Math.sqrt(stats.count.valid(X,f));\n\n\t if (SE===0) {\n\t // Test not well defined when standard error is 0.\n\t return (mu - nullH) === 0 ? 1 : 0;\n\t }\n\t // Two-sided, so twice the one-sided cdf.\n\t var z = (mu - nullH) / SE;\n\t return 2 * gaussian.cdf(-Math.abs(z));\n\t}", "function variance(array) {\n const demeaned = _tensorflow_tfjs_core__WEBPACK_IMPORTED_MODULE_0__[\"sub\"](toArray1D(array), Object(_tensorflow_tfjs_core__WEBPACK_IMPORTED_MODULE_0__[\"scalar\"])(mean(array)));\n const sumSquare = _tensorflow_tfjs_core__WEBPACK_IMPORTED_MODULE_0__[\"sum\"](_tensorflow_tfjs_core__WEBPACK_IMPORTED_MODULE_0__[\"mul\"](demeaned, demeaned)).dataSync()[0];\n return sumSquare / array.length;\n}", "function calculateSigmaSq(totalLen, spread) {\n var lengthSpread = totalLen/2;\n var sigmaSq = (lengthSpread * lengthSpread)/(-2 * Math.log(spread));\n return sigmaSq;\n }", "function normal (x, mu, ss)\n {\n var fun = jStat.normal.pdf;\n return fun(x, mu, ss);\n }", "function standardNormalDist() {\n\treturn (Math.random()*2-1)+(Math.random()*2-1)+(Math.random()*2-1);\n}", "function nextGaussian(mean, stdDev) {\n var x1 = 0;\n var x2 = 0;\n var y1 = 0;\n var z = 0;\n if (usePrevious) {\n usePrevious = false;\n return mean + y2 * stdDev;\n }\n usePrevious = true;\n do {\n x1 = 2 * Math.random() - 1;\n x2 = 2 * Math.random() - 1;\n z = (x1 * x1) + (x2 * x2);\n } while (z >= 1);\n z = Math.sqrt((-2 * Math.log(z)) / z);\n y1 = x1 * z;\n y2 = x2 * z;\n return mean + y1 * stdDev;\n }", "function normalCDF1(mean, sigma, to) {\n var z = (to - mean) / Math.sqrt(2 * sigma * sigma);\n var t = 1 / (1 + 0.3275911 * Math.abs(z));\n var a1 = 0.254829592;\n var a2 = -0.284496736;\n var a3 = 1.421413741;\n var a4 = -1.453152027;\n var a5 = 1.061405429;\n var erf = 1 - (((((a5 * t + a4) * t) + a3) * t + a2) * t + a1) * t * Math.exp(-z * z);\n var sign = 1;\n if (z < 0) {\n sign = -1;\n }\n return (1 / 2) * (1 + sign * erf);\n}", "dev2(p, l) {\r\n return Math.abs(parseFloat(p.y) - parseFloat(l.f(parseFloat(p.x))));\r\n }", "function exercise09() {\n let mean = 48 - 40;\n let stdDev = Math.sqrt(Math.pow(5, 2) + Math.pow(4, 2));\n let dist = distribution(mean, stdDev);\n let res = 1 - dist.cdf(0);\n\n return res.toFixed(4);\n}", "function ztest1(opt, X, f) {\n var nullH = opt && opt.nullh || 0,\n gaussian = gen.random.normal(0, 1),\n mu = stats.mean(X,f),\n SE = stats.stdev(X,f) / Math.sqrt(stats.count.valid(X,f));\n\n if (SE===0) {\n // Test not well defined when standard error is 0.\n return (mu - nullH) === 0 ? 1 : 0;\n }\n // Two-sided, so twice the one-sided cdf.\n var z = (mu - nullH) / SE;\n return 2 * gaussian.cdf(-Math.abs(z));\n}", "function mse(a, b) {\n\tlet error = 0\n\tfor (let i = 0; i < a.length; i++) {\n\t\terror += Math.pow((b[i] - a[i]), 2)\n\t}\n\treturn error / a.length\n}" ]
[ "0.8439233", "0.8313593", "0.82858473", "0.8225719", "0.8203802", "0.82026976", "0.81137675", "0.8105827", "0.7996622", "0.7882047", "0.7879467", "0.7828585", "0.78006965", "0.78006965", "0.78006965", "0.7787849", "0.7699232", "0.76282877", "0.7528473", "0.7528473", "0.7528473", "0.7514806", "0.7452077", "0.74011374", "0.7368227", "0.73557085", "0.7338756", "0.7297125", "0.719173", "0.713029", "0.7083883", "0.70683694", "0.7006202", "0.68644804", "0.6763462", "0.6762232", "0.6631124", "0.642911", "0.62954855", "0.6265193", "0.61801773", "0.61667895", "0.6109584", "0.6068095", "0.6068095", "0.6068095", "0.60151696", "0.60151696", "0.60151696", "0.59747297", "0.5939339", "0.5939339", "0.59237134", "0.58775824", "0.5829896", "0.582637", "0.5791399", "0.5723048", "0.5719184", "0.5701629", "0.5701629", "0.5701629", "0.569662", "0.5695313", "0.5683929", "0.5566507", "0.55602723", "0.55562705", "0.5517447", "0.54947954", "0.5443973", "0.5443973", "0.5436902", "0.5420442", "0.5396718", "0.5347339", "0.5299152", "0.52947235", "0.5293865", "0.5284269", "0.5274656", "0.5271914", "0.5247753", "0.5241378", "0.52402997", "0.52281773", "0.5198124", "0.51757115", "0.516028", "0.51398623", "0.51375586", "0.51353526", "0.5115404", "0.5107732", "0.5098676", "0.50908214", "0.5059136", "0.5044013", "0.50438774", "0.5035727" ]
0.7614484
18
helper function to determine if a number is between two values
function between(num, bound1, bound2){ return (((bound1 >= num) && (bound2 <= num)) || ((bound1 <= num) && (bound2 >= num))) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isBetween(num, low, high){\n return (num >= low) && (num <= high);\n}", "function isBetween(num) {\n return num >= 50 && num <= 100; // returning a boolean\n}", "function between(min, max, num) {\n return (num >= min && num <= max);\n}", "between(num, lower, upper) {\n return num > lower && num <= upper;\n }", "function isBetween(lowerBound, upperBound, value)\n{\n\treturn (lowerBound < value && value < upperBound);\n}", "inRange (number, start, end){\r\n // if end is undefined, start = 0 and end = start, then check if in range\r\n if (typeof end === 'undefined'){\r\n end = start;\r\n start = 0;\r\n } else if ( start > end ){\r\n // swap the two values around\r\n let temp = start;\r\n start = end;\r\n end = temp;\r\n }\r\n if ((number > start) && (number < end)){\r\n return true;\r\n }\r\n else\r\n return false;\r\n }", "function in_range(num1, num2) {\n if ((50 <= num1 && num1 <= 99) && (50 <= num2 && num2 <= 99)) return true;\n return false;\n\n}", "function isBetween (x, from, to){\n if(x<to || x>from){\n return true;\n } else {\n return false;\n }\n}", "function isBetween(start, end, val) {\n return (start < val && val < end) || (start > val && val > end);\n }", "function between(x, min, max) {\n return (x >= min && x <= max)\n}", "function valueInRange (start, value, finish) {\n return (start <= value) && (value <= finish);\n}", "function valueInRange (start, value, finish) {\n return (start <= value) && (value <= finish);\n}", "inRange1(num, start, end) {\n if (end === undefined) {\n end = start;\n start = 0;\n }\n\n if (start > end) {\n const tmpEnd = end;\n end = start;\n start = tmpEnd;\n }\n\n return num >= start && num < end;\n }", "inRange (number, start, end) {\n if(end == null) {\n end = start;\n start = 0;\n }\n if(start > end) {\n const temp = start;\n start = end;\n end = temp;\n }\n const isInRange = (start <= number && number < end);\n return isInRange;\n }", "inRange2(num, start, end) {\n if (end === undefined) {\n end = start;\n start = 0;\n }\n\n if (start > end) {\n const tmpEnd = end;\n end = start;\n start = tmpEnd;\n }\n\n const isInRange = num >= start && num < end;\n return isInRange;\n }", "between( between, dependentVal){\n if( dependentVal > between[0] && dependentVal < between[1]){\n return true;\n }else{\n return false;\n }\n\n}", "function isWithinRange(value1, value2, range) {\n if (Math.abs(value1 - value2) <= range) return true;\n return false;\n}", "function between(first, last, value)\n{\n\treturn (first < last ? value >= first && value <= last : value >= last && value <= first);\n}", "function checkRangeNumber(min, max, number) {\r\n var resultRange = false;\r\n if(number >= min && number <= max) {\r\n resultRange = true;\r\n }\r\n return resultRange;\r\n}", "function between(a){\n return (typeof(a)===\"number\" && a>=100 && a<=200)\n}", "function checkNumRange(n1, n2) {\n if (\n (n1 >= 40 && n1 <= 60 && n2 >= 40 && n2 <= 60) ||\n (n1 >= 70 && n1 <= 100 && n2 >= 70 && n2 <= 100)\n ) {\n return true;\n } else {\n return false;\n }\n}", "function numbers_ranges(x, y) {\n if ((x >= 0 && x <= 15 && y >= 0 && y <= 15))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "function inRange(v1, v2, val) {\n if (val >= Math.min(v1, v2) && val <= Math.max(v1, v2)) {\n return true;\n } else {\n return false;\n }\n}", "function between (a) {\n \tif (100<a && 200>a) {\n \t\treturn true;\n \t}\n \telse \n \t\treturn false;\n }", "function numbers_ranges(x, y) {\n if ((x >= 40 && x <= 60 && y >= 40 && y <= 60) \n || \n (x >= 70 && x <= 100 && y >= 70 && y <= 100))\n {\n return true;\n } \n else \n {\n return false;\n }\n }", "function inRange(min, number, max){\n\t\t\t\t\treturn number >= min && number <= max;\n\t\t\t\t}", "inRange(num, endNum, startNum = 0) {\n [endNum, startNum] = [startNum, endNum];\n if (startNum > endNum) {\n [startNum, endNum] = [endNum, startNum];\n }\n return num >= startNum && num < endNum;\n }", "function between(x, min, max) {\n\treturn x >= min && x <= max;\n }", "function checkRange(int1,int2,range){\n let diff = Math.abs(int1-int2)\n if (diff <= range) {\n return true\n } else {\n return false\n }\n}", "function isInRange(num) {\n if (num>20 && num<50) {return true;}\n else {return false;}\n}", "function checkNumberBetween(num, from, to, vali){\n\n\tif(num <= to && num >= from){\t//Check between \"from\"-\"to\"\n\t\treturn true;\n\t}else if(num == \"\"){\t\t\t\t// Allow null!\n\t\treturn true;\n\t}\n\telse{\n//\t\talert(vali + \" - Must specify a number between \" + from + \"-\" + to);\n\t\t//elem.focus();\n\t\treturn false;\n\t}\n}", "function in1020(a, b) {\n return (a >= 10 && a <= 20) || (b >= 10 && b <= 20);\n}", "function checkRange (min, max, number) {\r\n var result = false;\r\n if (number >= min && number <= max) {\r\n result = true;\r\n }\r\n return result;\r\n}", "function inRange(x, min = 0, max) {\n return (x - min) * (x - max) <= 0;\n}", "function range(a, b) {\n if ((a >= 40 && a <= 60) && (b >= 40 && b <= 60)) {\n console.log('given numbers are in range of 40 and 60')\n } else if ((a >= 70 && a <= 100) && (b >= 70 && b <= 100)) {\n console.log('given numbers are in range of 70 and 100')\n } else {\n console.log('one or both the numbers are not in range')\n }\n}", "function inRange(x, min, max) {\n return (x - min) * (x - max) <= 0;\n}", "function inRange(x, min, max) {\n return x >= min && x <= max;\n}", "function inRange(num1,num2){\n // If these two numbers aren't greater than 50 - 99\n // dont proceed\n if(num1 >= 50 && num1 <= 99 ){\n // output something saying it is \n console.log(num1 + \" is in Range\")\n if(num2 >= 50 && num2 <= 99){\n // output something saying it is\n console.log(num2 + \" is in Range\")\n }\n }\n}", "function between50and500(num){\n // console.log(num > 50 && num < 500)\n return (num > 50 && num < 500)\n}", "function isInRanges(value) {\n if (typeof value !== 'number') {\n return false;\n }\n return value >= this.lower && value <= this.upper;\n}", "function within(min1, max1, min2, max2) {\n return (min1 <= max2 && max1 >= min2);\n}", "function inBetween(a, b) {\n return function (x) {\n return x >= a && x <= b;\n };\n}", "function inBetween(a, b) {\n return function(x) {\n return x >= a && x <= b;\n };\n}", "function inRange(num, min, max, inclusive = false) {\n\tif (inclusive) {\n\t} else {\n\t\treturn num > min && num < max;\n\t}\n}", "function inRange(start, end, value) {\n\t\t\treturn (value>= start && value <= end);\n\t\t}", "function betweenRange(value, range) {\n if (Array.isArray(range)) {\n if (value <= range[1] && value >= range[0]) {\n return true;\n }\n } else {\n if (value === range) {\n return true;\n }\n }\n return false;\n}", "function inRange(min, max, num) {\n if(num >= min && num <= max && !isNaN(num)) {\n return true;\n }\n return false;\n}", "function between (data, x, y) {\n if (x < y) {\n return greater(data, x) && data < y;\n }\n\n return less(data, x) && data > y;\n }", "function boundsCheck(value) {\n\t\tif (base == 10)\tvalue = parseFloat(value);\t\t\t\t\t\t// value is a string, if in base 10, parseFloat() it\n\t\telse value = parseInt(value, 16);\t\t\t\t\t\t\t\t// value is a string, if in base 16, parseInt() it with 16 as parameter (converts to base 10)\n\t\t\n\t\tif (minValue === null && maxValue === null) return true;\t\t// if both min and max is null, there is no limit, simple return true\n\t\telse if (minValue !== null && maxValue !== null) {\t\t\t\t// if both of the values aren't null, check both bounds\n\t\t\tif (value <= maxValue && value >= minValue) return true;\n\t\t}\n\t\telse if (minValue === null && maxValue !== null) {\t\t\t\t// if only the min is null, then there is no lower bound; check the upper bound\n\t\t\tif (value <= maxValue) return true;\n\t\t}\n\t\telse if (minValue !== null && maxValue === null) {\t\t\t\t// if only the max is null, then there is no upper bound; check the lower bound\n\t\t\tif (value >= minValue) return true;\n\t\t}\n\t\t\n\t\treturn false;\t// if we made it here, the number isn't valid; return false\n\t}", "function numbersFrom50To99(x, y) \n {\n if ((x >= 50 && x <= 99) || (y >= 50 && y <= 99))\n {\n return true;\n } \n else \n {\n return false;\n }\n}", "function targetInBetween(min, max, target){\n if (target>min && target<max){\n return true;\n }\n\n else {\n return false;\n }\n}", "function inrange(value, range, left, right) {\n var r0 = range[0], r1 = range[range.length-1], t;\n if (r0 > r1) {\n t = r0;\n r0 = r1;\n r1 = t;\n }\n left = left === undefined || left;\n right = right === undefined || right;\n\n return (left ? r0 <= value : r0 < value) &&\n (right ? value <= r1 : value < r1);\n }", "function isInInterval(toCheck, lower, upper) {\n return (toCheck >= lower) && (toCheck <= upper);\n}", "function isWithinRange(num, rangeObject) {\n if (num >= rangeObject.min && num <= rangeObject.max) {\n return true;\n } else {\n return false;\n }\n}", "function fir(num, start, end) {\n let isInRange = false;\n\n if (end === undefined) {\n end = start;\n start = 0;\n }\n\n if (start > end) {\n let t = start;\n start = end;\n end = t;\n }\n\n if (num >= start && num < end) {\n isInRange = true;\n }\n\n return isInRange;\n}", "function checkRange(number, obj) {\n return (number >= obj.min && number <= obj.max);\n}", "function isWithin(value, minInclusive, maxInclusive) {\n return value >= minInclusive && value <= maxInclusive;\n }", "function isInRange(min, max, num) {\n // console.log('num < min', num < min);\n // console.log('num > max', num > max);\n // console.log('isNaN(num)', isNaN(num));\n // console.log(num < min && num > max && isNaN(num));\n // if(num < min && num > max && isNaN(num)) {\n // return false;\n // }\n if(num >= min && num <= max && !isNaN(num)) {\n return true;\n }\n return false;\n}", "function numberIsInRange(elem, min, max)\n {\n var str = elem.value;\n\n // checks if it's a number\n if(!isNumber(elem))\n {\n return false;\n }\n\n if(str >= min && str <= max)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "function inRange (data, x, y) {\n if (x < y) {\n return greaterOrEqual(data, x) && data <= y;\n }\n\n return lessOrEqual(data, x) && data >= y;\n }", "function isWithinRange(target, startRange, endRange, lessThanAndEquals=false) {\n if (typeof target === \"number\" && typeof startRange === \"number\" && \n typeof endRange === \"number\") {\n // if lessThanAndEquals is true, first default operator checks if startRange <= target\n if (lessThanAndEquals) {\n console.log(\"check within range: \" + startRange + \" <= \" + target + \" < \" + endRange);\n if ((startRange <= target) && (target < endRange)) {\n return true;\n } else {\n return false;\n }\n }\n console.log(\"check within range: \" + startRange + \" < \" + target + \" < \" + endRange);\n // Otherwise, first default operator checks if startRange < target\n if ((startRange < target) && (target < endRange)) {\n return true;\n } else {\n return false;\n }\n }\n return false;\n}", "function guard(low, high, value) {\n return Math.min(Math.max(low, value), high);\n}", "function in3050(a, b) {\n if (a >= 30 && a <= 40 && b >= 30 && b <= 40) {\n return true;\n } else if (a >= 40 && a <= 50 && b >= 40 && b <= 50) {\n return true;\n } else {\n return false;\n }\n}", "function inRange(value, minVal, maxVal) {\n\t\tif ((value > minVal) && (value < maxVal)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function rangeCheck(input, min, max) {\r\n return ((input > min) && (input < max));\r\n}", "function between50And99(a, b) {\n return (a >= 50 && a <= 99) || (b >= 50 && b <= 99);\n}", "function between(val, min, max) {\n\t\treturn Math.min(Math.max(min, val), max);\n\t}", "function numberWithinRange(guess) {\n if (min <= guess && guess<= max){\n return true;\n } else {\n return false;\n }\n }", "function isInRange(value, start, end, rangeEnabled) {\n return rangeEnabled && start !== null && end !== null && start !== end && value >= start && value <= end;\n}", "function between_values(x, min, max) {\r\n return {'passed': x.value >= min && x.value <= max,\r\n 'value': x.value};\r\n }", "function check(num1,num2,num3){\n return (num1 >= 20 && (num1 < num2 || num1 < num3)) ||\n (num2 >= 20 && (num2 < num1 || num2 < num3)) ||\n (num3 >= 20 && (num3 < num2 || num3 < num1)) ? true : false;\n}", "function isBetween(length, min, max) {\n return length < min || length > max ? false : true;\n}", "function between(value, min, max) {\n return Math.max(min, Math.min(value, max));\n }", "function testRange(v:number, range:Range):boolean {\n const { min, max, intervals:_intervals} = range;\n const intervals = _intervals?_intervals:'[]';\n switch (intervals) {\n case '[]':\n //javascript's ?: treat 0 as false,so must check min!=null\n return ((min!=null)? v>=min :true) && ((max!=null)? v<=max :true);\n // seems the express above could not be resolved by flow.\n // return (min || v>=min) && (max || v<= max);\n case '[)':\n return ((min!=null)? v>=min :true) && ((max!=null)? v<max :true);\n case '(]':\n return ((min!=null)? v>min :true) && ((max!=null)? v<=max :true);\n case '()':\n return ((min!=null)? v>min :true) && ((max!=null)? v<max :true);\n default:\n throw new RunTimeCheckE('The range.intervals must be ' +\n ' [] | [) | (] | () .Please check the passed in' +\n `range: ${ePrint(range)}`);\n }\n}", "function intWithinBounds(n, lower, upper) {\n if (n >= lower && n < upper && Number.isInteger(n) === true) {\n return true;\n } else {\n return false;\n }\n}", "function __WEBPACK_DEFAULT_EXPORT__(value, range, left, right) {\n var r0 = range[0], r1 = range[range.length-1], t;\n if (r0 > r1) {\n t = r0;\n r0 = r1;\n r1 = t;\n }\n left = left === undefined || left;\n right = right === undefined || right;\n\n return (left ? r0 <= value : r0 < value) &&\n (right ? value <= r1 : value < r1);\n}", "function isValidRange(minNum, maxNum){\n return (minNum < maxNum);\n}", "function makeBetweenFunc(min, max) {\n return function (num) {\n return num >= min && num <= max;\n };\n}", "function isInRange(value, start, end, rangeEnabled) {\n return rangeEnabled && start !== null && end !== null && start !== end &&\n value >= start && value <= end;\n}", "function isInRange(value, start, end, rangeEnabled) {\n return rangeEnabled && start !== null && end !== null && start !== end &&\n value >= start && value <= end;\n}", "function numberIn20(x) {\n return ((Math.abs(100 - x) <= 20) ||\n (Math.abs(400 - x) <= 20));\n}", "function contain(value, min, max) {\n if (value < min) {\n return min;\n } else if (value > max) {\n return max;\n } else {\n return value;\n }\n }", "function range(val, lo, hi, message) {\n var result = (val>=lo) && (val<=hi);\n message = message || (result ? \"okay\" : \"failed\");\n if (typeof val == \"string\") { val = parseFloat(val); };\n QUnit.ok( result, \n ( result \n ? message + \": \" + val \n : message + \", value \" + val + \" not in range [\"+lo+\"..\"+hi+\"]\"\n ));\n}", "function rangeChecker(op, target, range){\r\n return op < target + range && op > target - range;\r\n}", "isInBounds(value, minExclusive = false, maxExclusive = false) { \n\t\tif (!FormatUtils.isNumber(value) && !FormatUtils.canBeNumber(value)) \n\t\t\treturn false;\n\n\t\tvalue = Number(value);\n\t\tlet aboveMin = minExclusive ? value > this.#min : value >= this.#min;\n\t\tlet belowMax = maxExclusive ? value < this.#max : value <= this.#max;\n\n\t\treturn aboveMin && belowMax;\n\t}", "isBetween (a, c, b) {\n const da = this.distance(a, c) + this.distance(c, b);\n const db = this.distance(a, b);\n return (Math.abs(da - db) < 1);\n }", "function checkRange(value) {\n if (value == DOT_INDEX || value == COMMA_INDEX || (value >= NUM_LOW && value <= NUM_HI) || (value >= LET_HI_LOW && value <= LET_HI_HI) || (value >= LET_LOW_LOW && value <= LET_LOW_HI)) {\n return true;\n }\n return false;\n}", "function isInRange(value, min, max) {\n var hasMin = null !== min,\n hasMax = null !== max;\n\n return ( !hasMin && !hasMax ) ||\n ( !hasMin && value <= max ) ||\n ( min <= value && !hasMax ) ||\n ( min <= value && value <= max );\n }", "function checkInRange(numString, min, max) {\n const num = parseInt(numString);\n return min <= num && num <= max;\n}", "function testLessOrEqual(val){\n if (val <= 12){\n return \"Smaller Than or Equal to 12\";\n }\n if (val <= 24){\n return \"Smaller Than or Equal to 24\";\n }\n return \"More Than 24\";\n}", "function testGreaterOrEqual(val) {\n if (val >= 20) { // If the number to the left is greater than or equal to the number to the right it returns true. Otherwise, it returns false.\n return \"20 or Over\";\n }\n\n if (val >=10) {\n return \"10 or Over\";\n }\n\n return \"Less than 10\";\n}", "function validateIfIntNumberBetween(str, from, to, vali){\n\tif(str.match(/^[0-9]*$/)){\t//Check if it's a number\n\t\treturn checkNumberBetween(str,from,to,vali);\n\t} else{ \n\t\treturn false;\n\t}\n}", "between(min, max) {\n return this.filter((val) => {\n let num = parse(val).num\n return num > min && num < max\n })\n }", "function areYouWithinTwentyDigitsOf(integer) {\n if ((100 - integer) <= 20 || (120 - integer) <= 20) {\n console.log(true)\n } else if ((400 - integer) <= 20 || (420 - integer) <= 20) {\n console.log(true)\n } else {\n console.log(false);\n }\n\n}", "function checkRange(value, lowerBounds, upperBounds) {\n if (value >= lowerBounds && value <= upperBounds) {\n return value;\n }\n else {\n return !value;\n }\n}", "function checkRange(value, lowerBounds, upperBounds) {\n if (value >= lowerBounds && value <= upperBounds) {\n return value;\n }\n else {\n return !value;\n }\n}", "function rangeRad(a,b){\n var min = Math.min.apply(Math, [a, b]);\n var max = Math.max.apply(Math, [a, b]);\n console.log('min ' + min + ' max '+max);\n return this > min && this < max;\n }", "function checkRange(value, lowerBounds, upperBounds) {\n if (value >= lowerBounds && value <= upperBounds) {\n return value;\n } else {\n return !value;\n }\n}", "function checkRange(value, lowerBounds, upperBounds) {\n if (value >= lowerBounds && value <= upperBounds) {\n return value;\n } else {\n return !value;\n }\n}", "function inRange(l, h, v) {\n let svar = false;\n if (v > l && v < h) {\n svar = true;\n return svar;\n } else {\n return svar;\n }\n }" ]
[ "0.82739925", "0.80910385", "0.79597497", "0.7889863", "0.78193426", "0.77350265", "0.7667126", "0.76236165", "0.76078236", "0.7595073", "0.75630736", "0.75630736", "0.7562493", "0.7553439", "0.75348663", "0.752683", "0.74791425", "0.7414703", "0.74111664", "0.73932093", "0.7389404", "0.7371666", "0.7350716", "0.7329603", "0.7329168", "0.7328956", "0.727454", "0.72486734", "0.72452605", "0.72335047", "0.7211727", "0.7196249", "0.71933705", "0.71898484", "0.7185253", "0.7183073", "0.71746737", "0.7170164", "0.7157732", "0.71288836", "0.71168315", "0.71040803", "0.71025157", "0.70861185", "0.70850873", "0.7081352", "0.7077845", "0.6977899", "0.69603264", "0.69594574", "0.6953252", "0.69435585", "0.69330096", "0.69235915", "0.68970764", "0.68695986", "0.6858775", "0.6845981", "0.68229663", "0.6821226", "0.6811625", "0.6809164", "0.67965156", "0.67755103", "0.6770195", "0.67661965", "0.67644453", "0.6746424", "0.6713029", "0.6704734", "0.66918474", "0.6684325", "0.66815394", "0.66626763", "0.6657044", "0.66483235", "0.6645445", "0.6644655", "0.6632412", "0.6632412", "0.6625092", "0.6619066", "0.6610884", "0.660905", "0.65893275", "0.6580746", "0.6565014", "0.6561258", "0.6554872", "0.6539185", "0.6530271", "0.6512479", "0.6511585", "0.650153", "0.6501338", "0.6501338", "0.6494073", "0.6489807", "0.6489807", "0.6482717" ]
0.8046718
2
helper function to find the minimum distance between a single point and a surface defined by a set of points
function min_distance(point, surface){ var minimum = 1000000000; // arbitrarily large // find two closest points on surface var p1 = surface[0]; var p2 = surface[1]; var d1 = distance(p1, point); // second closest var d2 = distance(p2, point); // closest // swap values if necessary if (d1 < d2){ var p_temp = p1; var d_temp = d1; d1 = d2; p1 = p2; d2 = d_temp; p2 = p_temp; } for (var i = 2; i < surface.length; i++){ var current_distance = distance(point, surface[i]); if (current_distance < d1){ if (current_distance < d2){ p2 = surface[i]; d2 = current_distance; } else{ p1 = surface[i]; d1 = current_distance; } } } // find distance between the given point and the line defined by the closest points on the surface var m = (p1[1]-p2[1]) / (p1[0]-p2[0]); var d_line = Math.abs(m*(p1[0]-point[0]) + (p1[1]-point[1])) / Math.sqrt(m*m + 1); // find intersection point var x_intersect = (point[0] + m*point[1] + m*(m*p1[0] - p1[1])) / (m*m + 1); // find if the intersection point is between the two boundary points if (between(x_intersect, p1[0], p2[0])){ return d_line; // the distance between the point and the line } else{ return d2; // the distance to the closest point } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "closest(points) {\n if (points.length === 1) {\n return Point.create(points[0]);\n }\n let ret = null;\n let min = Infinity;\n points.forEach((p) => {\n const dist = this.squaredDistance(p);\n if (dist < min) {\n ret = p;\n min = dist;\n }\n });\n return ret ? Point.create(ret) : null;\n }", "function minDistance(plane = []) {\n\tconst getDistance = (x, y) => Math.sqrt(Math.pow((y[0] - x[0]), 2) + Math.pow(y[1] - x[1], 2));\n\n\treturn plane.reduce((acc, el, i, arr) => {\n\t\tif (i === 0) {\n\t\t\treturn {distance: getDistance(arr[0], arr[1]), points: [arr[0], arr[1]]};\n\t\t}\n\n\t\tarr.forEach((point, j) => {\n\t\t\tif (i === j) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst distance = getDistance(el, point);\n\t\t\tif (distance < acc.distance) {\n\t\t\t\tacc.distance = distance;\n\t\t\t\tacc.points = [el, point];\n\t\t\t}\n\t\t});\n\n\t\treturn acc;\n\t}, null).points;\n}", "function nearestPoint(candidatePoints, points) {\n\n}", "function getIndexOfMinDistance(waypoints){\n\tindex = 0;\n\tminDistance = 0;\n\tfor(var i = 0; i < waypoints.length; i++){\n\t\tif(i == 0 || waypoints[i].distance < minDistance){\n\t\t\tminDistance = waypoints[i].distance;\n\t\t\tindex = i;\n\t\t}\n\t}\n\treturn index;\n}", "function GreedyCloudMatch(points, P)\r\n{\r\n\tvar e = 0.50;\r\n\tvar step = Math.floor(Math.pow(points.length, 1 - e));\r\n\tvar min = +Infinity;\r\n\tfor (var i = 0; i < points.length; i += step) {\r\n\t\tvar d1 = CloudDistance(points, P.Points, i);\r\n\t\tvar d2 = CloudDistance(P.Points, points, i);\r\n\t\tmin = Math.min(min, Math.min(d1, d2)); // min3\r\n\t}\r\n\treturn min;\r\n}", "function point2pa(center, geometry) {\r\n let minDist;\r\n let centerpoint = turf.point(center);\r\n let type = geometry.type;\r\n let coordinates = geometry.coordinates;\r\n if (type == 'MultiPolygon') {\r\n let firstSubpoly = coordinates[0][0];\r\n let firstline = turf.lineString(firstSubpoly);\r\n minDist = turf.pointToLineDistance(centerpoint, firstline);\r\n coordinates.forEach(polygon => {\r\n polygon.forEach(subpoly => {\r\n let line = turf.lineString(subpoly);\r\n let distance = turf.pointToLineDistance(centerpoint, line);\r\n if (minDist > distance) minDist = distance;\r\n });\r\n });\r\n } else {\r\n coordinates.forEach(subpoly => {\r\n let line = turf.lineString(subpoly);\r\n let distance = turf.pointToLineDistance(centerpoint, line);\r\n if (minDist > distance) minDist = distance;\r\n });\r\n }\r\n return minDist;\r\n}", "function nearest_vertex(vertexes, point){\n var nearest = 0;\n var diffx = parseInt(vertexes[nearest]['x']) - parseInt(point['x']);\n var diffy = parseInt(vertexes[nearest]['y']) - parseInt(point['y']);\n var nearest_dist = Math.sqrt((diffx*diffx) + (diffy*diffy));\n var dist;\n for(i=1; i<vertexes.length; i++){\n diffx = parseInt(vertexes[i]['x']) - parseInt(point['x']);\n diffy = parseInt(vertexes[i]['y']) - parseInt(point['y']);\n dist = Math.sqrt((diffx*diffx) + (diffy*diffy));\n if(dist<nearest_dist){\n nearest = i;\n nearest_dist = dist;\n }\n }\n return nearest;\n}", "function _testCirclePolyCollision_minDistance(segments, radius) {\n return _.chain(segments)\n .map(seg => {\n let p = seg[0];\n let q = seg[1];\n\n let fofX = x => { // The line equation for the segment in y=mx + b form.\n return seg.m*x + seg.b;\n };\n let gofX = x => { // The line equation for the upper half of the circle.\n return Math.sqrt(radius*radius - x*x);\n };\n let hofX = x => { // Collision distance equation.\n return fofX(x) - gofX(x);\n };\n let hofXdx = x => { // first derivative.\n return seg.m + x/gofX(x);\n };\n let hofXddx = x => { // second derivative.\n return radius*radius/Math.pow(gofX(x), 3);\n };\n\n if(seg.m === undefined)\n return Math.min(seg[0][1], seg[1][1]) - gofX(seg[0][0]);\n else {\n let root1 = seg.m*radius/Math.sqrt(1 + seg.m*seg.m);\n let root2 = -root1;\n\n // Clip roots outside of the segment, on the edge of the\n // circle's movement, or whose slopes aren't valleys.\n // Then get the collision distance to the closest root.\n let minDist = _.chain([root1, root2, p[0], q[0]])\n .filter(root => {\n let isInRadius = (root >= -radius && root <= radius);\n let isInSegment = (root >= p[0] && root <= q[0]);\n let isValley = (hofXddx(root) > 0);\n\n return isInRadius && isInSegment && isValley;\n })\n .map(root => {\n let result = hofX(root);\n return hofX(root);\n })\n .min() // Infinity if no valid roots.\n .value();\n\n if(minDist > 0)\n return minDist;\n return undefined;\n }\n })\n .min() // Get the shortest distance among the segments.\n .value();\n }", "function closestSurface(ray) {\n var surface = null\n var intersection = null;\n var distance = Infinity;\n for (var currentSurface of surfaces) {\n var currentIntersection = currentSurface.intersects(ray);\n if (currentIntersection === null) continue;\n var currentDistance = (ray.origin).distanceTo(currentIntersection);\n if (0 < currentDistance && currentDistance < distance) {\n var surface = currentSurface;\n var intersection = currentIntersection;\n var distance = currentDistance;\n }\n }\n return {\n \"surface\": surface,\n \"intersection\": intersection,\n \"distance\": distance\n };\n}", "function getClosestPoint(pos){\r\n\tvar closestPointByPath = [];\r\n\tvar dists = [];\r\n\tfor(var i = 0; i<concreteObjects.length; i++){\r\n\t\tvar p = concreteObjects[i].getNearestPoint(pos); //p is null?\r\n\t\tif(concreteObjects[i]._class==\"CompoundPath\"){\r\n\t\t\tp = concreteObjects[i].children[0].getNearestPoint(pos);\r\n\t\t}\r\n\t\tif(p==null){\r\n\t\t\tconsole.log(\"p is null\");\r\n\t\t\tconsole.log(concreteObjects[i]);\r\n\t\t}\r\n\t\tclosestPointByPath.push(p);\r\n\t\tdists.push(p.subtract(pos).length);\r\n\t}\r\n\r\n\r\n\tvar idx = dists.indexOf(Math.min(...dists));\r\n\tvar ob = {\r\n\t\tpoint: closestPointByPath[idx],\r\n\t\tidx: idx\r\n\t};\r\n\treturn ob;\r\n}", "function nearest(ctx) {\n var _a = ctx.structure, _b = _a.min, minX = _b[0], minY = _b[1], minZ = _b[2], _c = _a.size, sX = _c[0], sY = _c[1], sZ = _c[2], bucketOffset = _a.bucketOffset, bucketCounts = _a.bucketCounts, bucketArray = _a.bucketArray, grid = _a.grid, positions = _a.positions;\n var r = ctx.radius, rSq = ctx.radiusSq, _d = ctx.pivot, x = _d[0], y = _d[1], z = _d[2];\n var loX = Math.max(0, (x - r - minX) >> 3 /* Exp */);\n var loY = Math.max(0, (y - r - minY) >> 3 /* Exp */);\n var loZ = Math.max(0, (z - r - minZ) >> 3 /* Exp */);\n var hiX = Math.min(sX, (x + r - minX) >> 3 /* Exp */);\n var hiY = Math.min(sY, (y + r - minY) >> 3 /* Exp */);\n var hiZ = Math.min(sZ, (z + r - minZ) >> 3 /* Exp */);\n for (var ix = loX; ix <= hiX; ix++) {\n for (var iy = loY; iy <= hiY; iy++) {\n for (var iz = loZ; iz <= hiZ; iz++) {\n var idx = (((ix * sY) + iy) * sZ) + iz;\n var bucketIdx = grid[idx];\n if (bucketIdx > 0) {\n var k = bucketIdx - 1;\n var offset = bucketOffset[k];\n var count = bucketCounts[k];\n var end = offset + count;\n for (var i = offset; i < end; i++) {\n var idx_1 = bucketArray[i];\n var dx = positions[3 * idx_1 + 0] - x;\n var dy = positions[3 * idx_1 + 1] - y;\n var dz = positions[3 * idx_1 + 2] - z;\n var distSq = dx * dx + dy * dy + dz * dz;\n if (distSq <= rSq) {\n Query3D.QueryContext.add(ctx, distSq, idx_1);\n }\n }\n }\n }\n }\n }\n }", "function dijkstraStep(point, points)\n {\n for (var k in point.E) {\n var p = points[k];\n if (p.const)\n continue;\n d = point.E[k];\n if (point.mark + d < p.mark) {\n p.mark = point.mark + d;\n p.from = point;\n }\n }\n\n // marks nearest point as const\n var min = Number.MAX_VALUE;\n for (var k in points) {\n var p = points[k];\n if (p.const)\n continue;\n if (p.mark < min) {\n var nearest = p;\n min = p.mark;\n }\n }\n return nearest;\n }", "function minDistance(origin, destinations) {\n return destinations.reduce(\n (min, dest) => Math.min(min, distance(origin, dest)),\n 20000 // slightly larger than greatest distance possible between two coordinates\n );\n}", "findClosestDistance(arr) {\n var minDist = -1;\n var object = null;\n for (var i = 0; i < arr.length; i++) {\n var distance = this.findDistance(arr[i]);\n if (object === null || distance < minDist) {\n minDist = distance;\n object = arr[i];\n }\n }\n return minDist;\n }", "function pointDistance (x,y,z) {\nreturn Math.sqrt(Math.pow(x,2)+Math.pow(y,2)+Math.pow(z,2));\n}", "function calc_min(x,y,z)\r\n{\r\n var menor = x;\r\n if(x > y)\r\n {\r\n menor = y;\r\n }\r\n if( y > z)\r\n {\r\n menor = z;\r\n }\r\n return menor;\r\n\r\n}", "function getClosestVector(d1, d2, d3, smallest, quad) {\r\n var vecReturned = vec3(0.0, 0.0, 0.0);\r\n if (d1 == smallest) {\r\n vecReturned = cameraLookAt;\r\n } else if (d2 == smallest) {\r\n vecReturned = cameraLookFrom;\r\n } else {\r\n vecReturned = cameraLookUpnew;\r\n }\r\n return vecReturned;\r\n}", "function _testRectPolyCollision_getMinDist(mPolySegs, mRectSegs) {\n return _.chain(mPolySegs)\n .map(polySeg => {\n return _.chain(mRectSegs)\n .map(rectSeg => {\n let fofX = x => {\n return polySeg.m * x + polySeg.b;\n };\n let gofX = x => {\n return rectSeg.m * x + rectSeg.b;\n };\n let hofX = x => {\n return fofX(x) - gofX(x);\n };\n let left = rectSeg[0][0];\n let right = rectSeg[1][0];\n\n let p = polySeg[0];\n let q = polySeg[1];\n\n // Skip if this polySeg is not directly above rectSeg.\n if(p[0] < left && q[0] < left)\n return undefined;\n if(p[0] > right && q[0] > right)\n return undefined;\n\n // Clip the intersections on the left and right sides of rectSeg.\n if(p[0] < left)\n p = [left, fofX(left), 1];\n if(q[0] > right)\n q = [right, fofX(right), 1];\n\n // Return the minimum distance among the clipped polySeg's endpoints.\n let dist = Math.min(hofX(p[0]), hofX(q[0]));\n if(dist > 0)\n return dist;\n return undefined;\n })\n .compact()\n .min()\n .value();\n })\n .compact()\n .min()\n .value();\n }", "function shortestDistance(a, b, c) {\n return Math.min(\n Math.sqrt(a ** 2 + (b + c) * (b + c)),\n Math.sqrt(b ** 2 + (a + c) * (a + c)),\n Math.sqrt(c ** 2 + (a + b) * (a + b))\n );\n}", "function closest_neighbor() {\n\t// Calculate neighbor for each shape\n\tshapes.forEach(function (item, index, arr) {\n\t//console.log(item);\n\t\n\t\tvar distances = []; // between on point an the rest\n\n\t\t// calculating distances\n\t\tfor (var i = 0; i < shapes.length ; i++) {\n\t\t\tlet delta_x = item.x - shapes[i].x;\n\t\t\tlet delta_y = item.y - shapes[i].y;\n\n\t\t\t//console.log(\"delta_x = item.x - shapes[i+1].x = \" + item.x + \" - \" + shapes[i+1].x + \" = \" + delta_x);\n\t\t\t//console.log(\"delta_y = item.y - shapes[i+1].y = \" + item.y + \" - \" + shapes[i+1].y + \" = \" + delta_y);\n\n\t\t\tdistances[i] = Math.sqrt( delta_x*delta_x + delta_y*delta_y);\n\n\t\t\t//var next_shape_idx = i+1;\n\t\t\t//console.log(\"distance [\"+ index +\" to \"+ next_shape_idx + \"] = \" + distances[i]);\n\t\t}\n\n\t\t// Look for smallest distance and assign it as neighbor\n\t\tshapes[index].neighbor = index_of_min(distances, 0);\n\t});\n}", "function findMinX(d) {\n let min = d[0].x;\n for (let i in d) {\n if (d[i].x < min) {\n min = d[i].x;\n }\n }\n return min;\n}", "function distance(x1, y1, z1, x2, y2, z2, d)\n{\n\tvar distance = Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + (z1 - z2) * (z1 - z2));\n\treturn (distance < d);\n}", "function getMin(distances) {\n let vertex = null;\n let min = -1;\n for (let key in distances) {\n let value = distances[key];\n if (min == -1) {\n min = value;\n vertex = key;\n }\n else if(min > value) {\n min = value;\n vertex = key;\n }\n }\n delete distances[vertex];\n return Number(vertex);\n}", "getNearestPointFromPoint(px, py) {\n var clampToSegment = true;\n\n var apx = px - this.point1.getX();\n var apy = py - this.point1.getY();\n var abx = this.point2.getX() - this.point1.getX();\n var aby = this.point2.getY() - this.point1.getY();\n\n var ab2 = abx * abx + aby * aby;\n var ap_ab = apx * abx + apy * aby;\n var t = ap_ab / ab2;\n if (clampToSegment) {\n if (t < 0) {\n t = 0;\n } else if (t > 1) {\n t = 1;\n }\n }\n return new Point2D({x: this.point1.getX() + abx * t, y: this.point1.getY() + aby * t});\n }", "GetDistanceToPoint() {}", "lowestDistance(arr){\n\t let lowest = arr[0]\n\t let prevLowest = this.totalDistance(arr,arr[0])\n\t\tfor(let i = 0; i<arr.length; i++){\n\t let nextLowest = this.totalDistance(arr,arr[i])\n\t \tif(nextLowest<prevLowest){\n\t prevLowest = nextLowest\n\t \tlowest = arr[i]\n\t }\n\t }\n\t return lowest\n\t}", "_computeInitialHull() {\n\n\t\tlet v0, v1, v2, v3;\n\n\t\tconst vertices = this._vertices;\n\t\tconst extremes = this._computeExtremes();\n\t\tconst min = extremes.min;\n\t\tconst max = extremes.max;\n\n\t\t// 1. Find the two points 'p0' and 'p1' with the greatest 1d separation\n\t\t// (max.x - min.x)\n\t\t// (max.y - min.y)\n\t\t// (max.z - min.z)\n\n\t\t// check x\n\n\t\tlet distance, maxDistance;\n\n\t\tmaxDistance = max.x.point.x - min.x.point.x;\n\n\t\tv0 = min.x;\n\t\tv1 = max.x;\n\n\t\t// check y\n\n\t\tdistance = max.y.point.y - min.y.point.y;\n\n\t\tif ( distance > maxDistance ) {\n\n\t\t\tv0 = min.y;\n\t\t\tv1 = max.y;\n\n\t\t\tmaxDistance = distance;\n\n\t\t}\n\n\t\t// check z\n\n\t\tdistance = max.z.point.z - min.z.point.z;\n\n\t\tif ( distance > maxDistance ) {\n\n\t\t\tv0 = min.z;\n\t\t\tv1 = max.z;\n\n\t\t}\n\n\t\t// 2. The next vertex 'v2' is the one farthest to the line formed by 'v0' and 'v1'\n\n\t\tmaxDistance = - Infinity;\n\t\tline.set( v0.point, v1.point );\n\n\t\tfor ( let i = 0, l = vertices.length; i < l; i ++ ) {\n\n\t\t\tconst vertex = vertices[ i ];\n\n\t\t\tif ( vertex !== v0 && vertex !== v1 ) {\n\n\t\t\t\tline.closestPointToPoint( vertex.point, true, closestPoint );\n\n\t\t\t\tdistance = closestPoint.squaredDistanceTo( vertex.point );\n\n\t\t\t\tif ( distance > maxDistance ) {\n\n\t\t\t\t\tmaxDistance = distance;\n\t\t\t\t\tv2 = vertex;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// 3. The next vertex 'v3' is the one farthest to the plane 'v0', 'v1', 'v2'\n\n\t\tmaxDistance = - Infinity;\n\t\tplane.fromCoplanarPoints( v0.point, v1.point, v2.point );\n\n\t\tfor ( let i = 0, l = vertices.length; i < l; i ++ ) {\n\n\t\t\tconst vertex = vertices[ i ];\n\n\t\t\tif ( vertex !== v0 && vertex !== v1 && vertex !== v2 ) {\n\n\t\t\t\tdistance = Math.abs( plane.distanceToPoint( vertex.point ) );\n\n\t\t\t\tif ( distance > maxDistance ) {\n\n\t\t\t\t\tmaxDistance = distance;\n\t\t\t\t\tv3 = vertex;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// handle case where all points lie in one plane\n\n\t\tif ( plane.distanceToPoint( v3.point ) === 0 ) {\n\n\t\t\tthrow 'ERROR: YUKA.ConvexHull: All extreme points lie in a single plane. Unable to compute convex hull.';\n\n\t\t}\n\n\t\t// build initial tetrahedron\n\n\t\tconst faces = this.faces;\n\n\t\tif ( plane.distanceToPoint( v3.point ) < 0 ) {\n\n\t\t\t// the face is not able to see the point so 'plane.normal' is pointing outside the tetrahedron\n\n\t\t\tfaces.push(\n\t\t\t\tnew Face( v0.point, v1.point, v2.point ),\n\t\t\t\tnew Face( v3.point, v1.point, v0.point ),\n\t\t\t\tnew Face( v3.point, v2.point, v1.point ),\n\t\t\t\tnew Face( v3.point, v0.point, v2.point )\n\t\t\t);\n\n\t\t\t// set the twin edge\n\n\t\t\t// join face[ i ] i > 0, with the first face\n\n\t\t\tfaces[ 1 ].getEdge( 2 ).linkOpponent( faces[ 0 ].getEdge( 1 ) );\n\t\t\tfaces[ 2 ].getEdge( 2 ).linkOpponent( faces[ 0 ].getEdge( 2 ) );\n\t\t\tfaces[ 3 ].getEdge( 2 ).linkOpponent( faces[ 0 ].getEdge( 0 ) );\n\n\t\t\t// join face[ i ] with face[ i + 1 ], 1 <= i <= 3\n\n\t\t\tfaces[ 1 ].getEdge( 1 ).linkOpponent( faces[ 2 ].getEdge( 0 ) );\n\t\t\tfaces[ 2 ].getEdge( 1 ).linkOpponent( faces[ 3 ].getEdge( 0 ) );\n\t\t\tfaces[ 3 ].getEdge( 1 ).linkOpponent( faces[ 1 ].getEdge( 0 ) );\n\n\t\t} else {\n\n\t\t\t// the face is able to see the point so 'plane.normal' is pointing inside the tetrahedron\n\n\t\t\tfaces.push(\n\t\t\t\tnew Face( v0.point, v2.point, v1.point ),\n\t\t\t\tnew Face( v3.point, v0.point, v1.point ),\n\t\t\t\tnew Face( v3.point, v1.point, v2.point ),\n\t\t\t\tnew Face( v3.point, v2.point, v0.point )\n\t\t\t);\n\n\t\t\t// set the twin edge\n\n\t\t\t// join face[ i ] i > 0, with the first face\n\n\t\t\tfaces[ 1 ].getEdge( 2 ).linkOpponent( faces[ 0 ].getEdge( 0 ) );\n\t\t\tfaces[ 2 ].getEdge( 2 ).linkOpponent( faces[ 0 ].getEdge( 2 ) );\n\t\t\tfaces[ 3 ].getEdge( 2 ).linkOpponent( faces[ 0 ].getEdge( 1 ) );\n\n\t\t\t// join face[ i ] with face[ i + 1 ], 1 <= i <= 3\n\n\t\t\tfaces[ 1 ].getEdge( 0 ).linkOpponent( faces[ 2 ].getEdge( 1 ) );\n\t\t\tfaces[ 2 ].getEdge( 0 ).linkOpponent( faces[ 3 ].getEdge( 1 ) );\n\t\t\tfaces[ 3 ].getEdge( 0 ).linkOpponent( faces[ 1 ].getEdge( 1 ) );\n\n\t\t}\n\n\t\t// initial assignment of vertices to the faces of the tetrahedron\n\n\t\tfor ( let i = 0, l = vertices.length; i < l; i ++ ) {\n\n\t\t\tconst vertex = vertices[ i ];\n\n\t\t\tif ( vertex !== v0 && vertex !== v1 && vertex !== v2 && vertex !== v3 ) {\n\n\t\t\t\tmaxDistance = this._tolerance;\n\t\t\t\tlet maxFace = null;\n\n\t\t\t\tfor ( let j = 0; j < 4; j ++ ) {\n\n\t\t\t\t\tdistance = faces[ j ].distanceToPoint( vertex.point );\n\n\t\t\t\t\tif ( distance > maxDistance ) {\n\n\t\t\t\t\t\tmaxDistance = distance;\n\t\t\t\t\t\tmaxFace = faces[ j ];\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( maxFace !== null ) {\n\n\t\t\t\t\tthis._addVertexToFace( vertex, maxFace );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}", "findWall() {\r\n let minDist = Infinity;\r\n let point;\r\n let ang;\r\n for (let wall of walls) {\r\n let p = this.pointOfIntersection(wall);\r\n if (p) {\r\n let angle = player.orientation.heading() - this.direction.heading();\r\n\r\n let d = this.position.dist(p); // * cos(angle);\r\n if (d < minDist) {\r\n minDist = d;\r\n point = p;\r\n ang = angle;\r\n }\r\n }\r\n }\r\n //if (point) {\r\n // stroke(255, 10);\r\n // line(this.position.x, this.position.y, point.x, point.y);\r\n //}\r\n // add the distance to the scene view\r\n view.push(minDist * cos(ang));\r\n }", "function f3(points) {\n\tvar minX = +Infinity,\n\t\tmaxX = -Infinity,\n\t\tminY = +Infinity,\n\t\tmaxY = -Infinity;\n\tfor (var i = 0; i < points.length; i++) {\n\t\tminX = Math.min(minX, points[i].X);\n\t\tminY = Math.min(minY, points[i].Y);\n\t\tmaxX = Math.max(maxX, points[i].X);\n\t\tmaxY = Math.max(maxY, points[i].Y);\n\t}\n\tp1 = new Point(minX, minY);\n\tp2 = new Point(maxX, maxY);\n\treturn Distance(p1, p2);\n}", "function closestCentroid(point, centroids, distance) {\n var min = Infinity,\n index = 0;\n for (var i = 0; i < centroids.length; i++) {\n var dist = distance(point, centroids[i]);\n if (dist < min) {\n min = dist;\n index = i;\n }\n }\n return index;\n}", "getDistancia(x, xi, xf, y, yi, yf) {\n\n let dist;\n\n if (xf === xi) {\n let yu = yf;\n let yd = yi;\n\n if (y >= yu) {\n dist = Math.abs(Math.sqrt((xi - x) * (xi - x) + (yu - y) * (yu - y)));\n dist = dist * DEGREE_TO_METER;\n return dist;\n }\n if (y <= yd) {\n dist = Math.abs(Math.sqrt((xi - x) * (xi - x) + (yd - y) * (yd - y)));\n dist = dist * DEGREE_TO_METER;\n return dist;\n }\n if ((y > yd) && (y < yu)) {\n dist = Math.abs(xi - x);\n dist = dist * DEGREE_TO_METER\n return dist;\n }\n }\n\n if (yf === yi) {\n\n let xr;\n let xl;\n if (xf > xi) {\n xr = xf;\n xl = xi;\n } else {\n xr = xi;\n xl = xf;\n }\n if (x >= xr) {\n dist = Math.abs(Math.sqrt((x - xr) * (x - xr) + (yi - y) * (yi - y)));\n dist = dist = dist * DEGREE_TO_METER;\n return dist;\n }\n if (x <= xl) {\n dist = Math.abs(Math.sqrt((x - xl) * (x - xl) + (yi - y) * (yi - y)));\n dist = dist * DEGREE_TO_METER;\n return dist;\n }\n if ((x > xl) && (x < xr)) {\n dist = Math.abs(yi - y);\n dist = dist;\n return dist = Math.abs((yi - y) * DEGREE_TO_METER);\n }\n }\n\n let xr = xf;\n let yr = yf;\n let xl = xi;\n let yl = yi;\n\n let M = (yf - yi) / (xf - xi);\n let b = yi - M * xi;\n let bp = y + (1 / M) * x;\n let xs = (bp - b) / (M + 1 / M);\n let ys = b + M * xs;\n\n if (xs > xr) {\n dist = Math.abs(Math.sqrt((xr - x) * (xr - x) + (yr - y) * (yr - y)));\n } else {\n if (xs < xl) {\n dist = Math.abs(Math.sqrt((xl - x) * (xl - x) + (yl - y) * (yl - y)));\n } else {\n dist = Math.abs(Math.sqrt((xs - x) * (xs - x) + (ys - y) * (ys - y)));\n }\n }\n return dist = Math.abs(dist * DEGREE_TO_METER);\n }", "function calcPoint(currentPoint) {\n var distances = new Array(); // make array for the distances\n for(let point of points){\n\n // call distance function\n var distance = getDistance(point[2], point[3], Number(currentPoint[2]), Number(currentPoint[3]));\n\n // put the distance from the boat to the point in an array\n var location = new Array();\n location[0] = point[0];\n location[1] = Number(distance)*1000; // *1000 to get meters instead of km's \n location[2] = point[2];\n location[3] = point[3];\n distances.push(location); // add current position and distance to boat to distances array\n }\n\n distances.sort(compareSecondColumn); // sort the array by the distances\n\n var closestPoint = distances[0]; // take the lowest distance\n\n distances.shift(); // 2.2 remove the used point from the distances\n points = distances; // and replace the points array with the remaining items of the distances array\n\n return closestPoint; // return the closest point\n}", "function minimumDistances(a) {\r\n var min=a.length;\r\n for(var i=0;i<a.length-1;i++){\r\n for(var j=i+1;j<a.length;j++){\r\n if(a[i]==a[j]){\r\n \r\n if(min>(j-i)){\r\n \r\n min=j-i;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n if(min ==a.length){\r\n return -1;\r\n }\r\n return min;\r\n }", "function calcConstrainedMinPoint(point, length, progress, constraints, elastic) {\n // Calculate a min point for this axis and apply it to the current pointer\n var min = point - length * progress;\n return constraints ? applyConstraints(min, constraints, elastic) : min;\n}", "function calcConstrainedMinPoint(point, length, progress, constraints, elastic) {\n // Calculate a min point for this axis and apply it to the current pointer\n var min = point - length * progress;\n return constraints ? applyConstraints(min, constraints, elastic) : min;\n}", "function calcConstrainedMinPoint(point, length, progress, constraints, elastic) {\n // Calculate a min point for this axis and apply it to the current pointer\n var min = point - length * progress;\n return constraints ? applyConstraints(min, constraints, elastic) : min;\n}", "function calcConstrainedMinPoint(point, length, progress, constraints, elastic) {\n // Calculate a min point for this axis and apply it to the current pointer\n var min = point - length * progress;\n return constraints ? applyConstraints(min, constraints, elastic) : min;\n}", "function minDistance(Q, dist) {\n\tvar minValue = 1000000000000000;\n\tvar index = null;\n\tfor (var i = 0; i < dist.length; i++) {\n\t\tif (dist[i] < minValue) {\n\t\t\tminValue = dist[i];\n\t\t\tindex = i;\n\t\t}\n\t}\n\treturn Q[index];\n}", "function minimator(x, y, z) {\n if (x <= y && x <= z) return x;\n if (y <= x && y <= z) return y;\n return z;\n }", "function findMostDistantToLine(points, a, b) {\n var maxDistance = -Infinity;\n var mostDistant;\n for (var i = 0; i < points.length; ++i) {\n var d = points[i].distanceToLine(a,b);\n if (d > maxDistance) {\n maxDistance = d;\n mostDistant = points[i];\n }\n }\n return mostDistant;\n}", "function getNearestCell(x, y, cells) {\r\n var min = Infinity;\r\n var result;\r\n $.each(cells, function(index, cell) { \r\n var d = distance(x, y, cell.center_x, cell.center_y);\r\n // Update minimum.\r\n if (d < min) {\r\n min = d;\r\n result = cell;\r\n }\r\n });\r\n return result;\r\n}", "static closestPointOnLine(point, start, end) {\n // Inspired by: http://stackoverflow.com/a/6853926\n var tA = point.x - start.x;\n var tB = point.y - start.y;\n var tC = end.x - start.x;\n var tD = end.y - start.y;\n\n var tDot = tA * tC + tB * tD;\n var tLenSq = tC * tC + tD * tD;\n var tParam = tDot / tLenSq;\n\n var tXx, tYy;\n\n if (tParam < 0 || (start.x === end.x && start.y === end.y)) {\n tXx = start.x;\n tYy = start.y;\n } else if (tParam > 1) {\n tXx = end.x;\n tYy = end.y;\n } else {\n tXx = start.x + tParam * tC;\n tYy = start.y + tParam * tD;\n }\n\n return new Vector2(tXx, tYy);\n }", "function closest(points, k) {\n var arr = []\n for(var i =0 ; i<points.length ; i++) {\n var obj = {}\n var x = points[i][0]\n var y = points[i][1]\n\n var distance = Math.sqrt(x*x + y*y)\n\n obj['coordinates'] = points[i]\n obj['distance'] = distance\n\n arr.push(obj)\n }\n\n var sortedArr = arr.sort((a,b) => {\n return a.distance - b.distance\n })\n\n var arrResult = []\n\n for(var i =0 ; i < k ; i ++) {\n arrResult.push(sortedArr[i]['coordinates'])\n }\n\n return arrResult\n\n}", "getNearestDiamond(x, y, diamondPos) {\n\n /** If the diamonds array is empty, do not calculate the position*/\n if(diamondPos.length<=0) {\n return null;\n }\n\n let tempTotal = 0;\n let shorttestTotal = this.xMax + this.yMax;\n let shortestPos = {};\n let dx;\n let dy;\n\n for (let z = 0; z < diamondPos.length; z++) { \n dx = Number(diamondPos[z].split(\",\")[1]);\n dy = Number(diamondPos[z].split(\",\")[0]);\n tempTotal = Math.abs(dx - x) + Math.abs(dy - y);\n\t\t\tif (tempTotal < shorttestTotal) {\n shorttestTotal = tempTotal;\n shortestPos.x = dx;\n shortestPos.y = dy; \n\t\t\t}\n }\n return shortestPos;\n }", "function minTimeToVisitAllPoints(points) {\n let numMoves = 0;\n \n for (let i = 0; i < points.length - 1; i++) {\n const point = points[i];\n const nextPoint = points[i + 1];\n \n const changeX = Math.abs(point[0] - nextPoint[0]);\n const changeY = Math.abs(point[1] - nextPoint[1]);\n \n //Do as many diagonal moves as the minimum number of changes in x and y \n //remaning number of changes is number of moves in either x or y\n \n const diagonalMove = Math.min(changeX, changeY);\n const remainingMoves = Math.max(changeX, changeY) - diagonalMove;\n \n numMoves += diagonalMove + remainingMoves;\n }\n \n return numMoves;\n}", "function ClosestLine(p0, u, q0, v) {\n // Distance between 2 lines http://geomalgorithms.com/a07-_distance.html\n // w(s, t) = P(s) - Q(t)\n // The w(s, t) that has the minimum distance we will say is w(sClosest, tClosest) = wClosest\n //\n // wClosest is the vector that is uniquely perpendicular to the 2 line directions u & v.\n // wClosest = w0 + sClosest * u - tClosest * v, where w0 is p0 - q0\n //\n // The closest point between 2 lines then satisfies this pair of equations\n // 1: u * wClosest = 0\n // 2: v * wClosest = 0\n //\n // Substituting wClosest into the equations we get\n //\n // 1: (u * u) * sClosest - (u * v) tClosest = -u * w0\n // 2: (v * u) * sClosest - (v * v) tClosest = -v * w0\n // simplify w0\n var w0 = p0.sub(q0);\n // simplify (u * u);\n var a = u.dot(u);\n // simplify (u * v);\n var b = u.dot(v);\n // simplify (v * v)\n var c = v.dot(v);\n // simplify (u * w0)\n var d = u.dot(w0);\n // simplify (v * w0)\n var e = v.dot(w0);\n // denominator ac - b^2\n var denom = a * c - b * b;\n var sDenom = denom;\n var tDenom = denom;\n // if denom is 0 they are parallel, use any point from either as the start in this case p0\n if (denom === 0 || denom <= 0.01) {\n var tClosestParallel = d / b;\n return new _Algebra__WEBPACK_IMPORTED_MODULE_0__[\"Line\"](p0, q0.add(v.scale(tClosestParallel)));\n }\n // Solve for sClosest for infinite line\n var sClosest = b * e - c * d; // / denom;\n // Solve for tClosest for infinite line\n var tClosest = a * e - b * d; // / denom;\n // Solve for segments candidate edges, if sClosest and tClosest are outside their segments\n if (sClosest < 0) {\n sClosest = 0;\n tClosest = e;\n tDenom = c;\n }\n else if (sClosest > sDenom) {\n sClosest = sDenom;\n tClosest = e + b;\n tDenom = c;\n }\n if (tClosest < 0) {\n tClosest = 0;\n if (-d < 0) {\n sClosest = 0;\n }\n else if (-d > a) {\n sClosest = sDenom;\n }\n else {\n sClosest = -d;\n sDenom = a;\n }\n }\n else if (tClosest > tDenom) {\n tClosest = tDenom;\n if (-d + b < 0) {\n sClosest = 0;\n }\n else if (-d + b > a) {\n sClosest = sDenom;\n }\n else {\n sClosest = -d + b;\n sDenom = a;\n }\n }\n sClosest = Math.abs(sClosest) < 0.001 ? 0 : sClosest / sDenom;\n tClosest = Math.abs(tClosest) < 0.001 ? 0 : tClosest / tDenom;\n return new _Algebra__WEBPACK_IMPORTED_MODULE_0__[\"Line\"](p0.add(u.scale(sClosest)), q0.add(v.scale(tClosest)));\n}", "distanceToPoint (p0) {\n const dd = (this.a * p0.x + this.b * p0.y + this.c * p0.z + this.d) /\n Math.sqrt(this.a * this.a + this.b * this.b + this.c * this.c)\n return dd\n }", "getMinL1(pos, dir, target){\n \n let adjascent = this.getAdjascent(pos, dir);\n \n // Sort from smallest L1 norm to largest. We will prioritize the\n // smallest one.\n adjascent.sort((a, b) => {\n \n return this.normL1(a, target) > this.normL1(b, target);\n \n });\n \n \n // Loop through the adjascent cells and take the first one that it can\n let move = adjascent.shift();\n while(move){\n \n if(this.map.canMoveTo(move)){\n \n return move;\n \n }\n \n move = adjascent.shift();\n \n }\n \n }", "function findMin(...args){\n return Math.min(...args);\n}", "function closestPointToLine3D(a,b,p,out){\n\tif(out == undefined) out = new Vec3();\n\tvar dx\t= b.x - a.x,\n\t\tdy\t= b.y - a.y,\n\t\tdz\t= a.z - a.z,\n\t\tt\t= ((p.x-a.x)*dx + (p.y-a.y)*dy + (p.z-a.z)*dz) / (dx*dx+dy*dy+dz*dz),\n\t\tx\t= a.x + (dx * t),\n\t\ty\t= a.y + (dy * t),\n\t\tz\t= a.z + (dz * t);\n\treturn out.set(x,y,z);\n}", "function distanceBetween3DPoints(coordinates) {\n let x1 = coordinates[0];\n let y1 = coordinates[1];\n let z1 = coordinates[2];\n let x2 = coordinates[3];\n let y2 = coordinates[4];\n let z2 = coordinates[5];\n\n let distance = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2 + (z1 - z2) ** 2);\n\n console.log(distance);\n}", "function nearestPointOnLine( x, y, x1, y1, x2, y2 ) {\n let vx = x2 - x1,\n vy = y2 - y1,\n ux = x1 - x,\n uy = y1 - y,\n vu = vx * ux + vy * uy,\n vv = vx * vx + vy * vy,\n t = -vu / vv\n return { t, x: t * x2 + ( 1 - t ) * x1, y: t * y2 + ( 1 - t ) * y1 }\n}", "function findClosestCentroid(point, centroids) {\n var minDist;\n var newDist;\n var closestCentroid;\n for (var c=0; c<centroids.length; c++) {\n newDist = calculateCentroidDistance(point, centroids[c]);\n if (minDist == undefined || minDist > newDist) {\n minDist = newDist;\n closestCentroid = c;\n }\n }\n return closestCentroid;\n }", "function findMostDistantFromPlane(basePlane, points) {\n var maxDistance = 0;\n var point;\n var index;\n for (var i = 0; i < points.length; ++i) {\n var distance = basePlane.pointDistance(points[i]);\n if (Math.abs(distance) > Math.abs(maxDistance)) {\n maxDistance = distance;\n point = points[i];\n index = i;\n }\n }\n return {\n point: point,\n distance: maxDistance,\n index: index,\n };\n}", "getLowestDistanceNode(unsettledNodes) {\n let lowest = null\n let lowestDistance = Number.MAX_SAFE_INTEGER\n for (let i = 0; i < unsettledNodes.length; i++) {\n let nodeDistance = unsettledNodes[i].distance\n if (nodeDistance < lowestDistance) {\n lowestDistance = nodeDistance\n lowest = unsettledNodes[i]\n }\n }\n\n return lowest;\n }", "function $PP_CloudDistance(pts1, pts2) // revised for $P+\r\n{\r\n\tvar matched = new Array(pts1.length); // pts1.length == pts2.length\r\n\tfor (var k = 0; k < pts1.length; k++)\r\n\t\tmatched[k] = false;\r\n\tvar sum = 0;\r\n\tfor (var i = 0; i < pts1.length; i++)\r\n\t{\r\n\t\tvar index = -1;\r\n\t\tvar min = +Infinity;\r\n\t\tfor (var j = 0; j < pts1.length; j++)\r\n\t\t{\r\n\t\t\tvar d = $PP_DistanceWithAngle(pts1[i], pts2[j]);\r\n\t\t\tif (d < min) {\r\n\t\t\t\tmin = d;\r\n\t\t\t\tindex = j;\r\n\t\t\t}\r\n\t\t}\r\n\t\tmatched[index] = true;\r\n\t\tsum += min;\r\n\t}\r\n\tfor (var j = 0; j < matched.length; j++)\r\n\t{\r\n\t\tif (!matched[j]) {\r\n\t\t\tvar min = +Infinity;\r\n\t\t\tfor (var i = 0; i < pts1.length; i++) {\r\n\t\t\t\tvar d = $PP_DistanceWithAngle(pts1[i], pts2[j]);\r\n\t\t\t\tif (d < min)\r\n\t\t\t\t\tmin = d;\r\n\t\t\t}\r\n\t\t\tsum += min;\r\n\t\t}\r\n\t}\r\n\treturn sum;\r\n}", "function GetMinDistance(targetRow, targetCol) {\n return Math.abs(exitRow - targetRow) + Math.abs((exitCol - targetCol));\n}", "static get_nearest_point_on_polygon(ref_x, ref_y, spatial_payload, dstmax=Infinity, include_segments=false) {\n const poly_pts = spatial_payload;\n\n // Initialize return value to null object\n var ret = {\n \"access\": null,\n \"distance\": null,\n \"point\": null\n };\n if (!include_segments) {\n // Look through polygon points one by one \n // no need to look at last, it's the same as first\n for (let kpi = 0; kpi < poly_pts.length; kpi++) {\n var kp = poly_pts[kpi];\n // Distance is measured with l2 norm\n let kpdst = Math.sqrt(Math.pow(kp[0] - ref_x, 2) + Math.pow(kp[1] - ref_y, 2));\n // If this a minimum distance so far, store it\n if (ret[\"distance\"] == null || kpdst < ret[\"distance\"]) {\n ret[\"access\"] = kpi;\n ret[\"distance\"] = kpdst;\n ret[\"point\"] = poly_pts[kpi];\n }\n }\n return ret;\n }\n else {\n for (let kpi = 0; kpi < poly_pts.length-1; kpi++) {\n var kp1 = poly_pts[kpi];\n var kp2 = poly_pts[kpi+1];\n var eq = ULabel.get_line_equation_through_points(kp1, kp2);\n var nr = ULabel.get_nearest_point_on_segment(ref_x, ref_y, eq, kp1, kp2);\n if ((nr != null) && (nr[\"dst\"] < dstmax) && (ret[\"distance\"] == null || nr[\"dst\"] < ret[\"distance\"])) {\n ret[\"access\"] = \"\" + (kpi + nr[\"prop\"]);\n ret[\"distance\"] = nr[\"dst\"];\n ret[\"point\"] = ULabel.interpolate_poly_segment(poly_pts, kpi, nr[\"prop\"]);\n }\n }\n return ret;\n }\n }", "function minDistance(square, goal) {\n var horizDiff = Math.abs(goal.x - square.x);\n var vertDiff = Math.abs(goal.y - square.y);\n return Math.min(horizDiff, vertDiff);\n}", "function minDiff(A) {\n let P = 1;\n let min = 1000;\n if (A.length === 2) {\n return Math.abs(A[0] - A[1]);\n }\n if (A.length === 3) {\n let diff1 = A[0] + A[1] - A[2];\n let diff2 = A[0] - A[1] - A[2];\n return Math.min(Math.abs(diff1), Math.abs(diff2));\n }\n while (P < A.length) {\n let sum1 = 0;\n let sum2 = 0;\n for (let i = 0; i < A.length; i++) {\n if (i < P) {\n sum1 += A[i];\n } else {\n sum2 += A[i];\n }\n }\n\n if (Math.abs(sum1 - sum2) < min) {\n min = Math.abs(sum1 - sum2);\n }\n P++;\n }\n return min;\n}", "function getPointAtDistance (metres) {\r\n if (metres == 0) return poly.getVertex(0);\r\n if (metres < 0) return null;\r\n var dist = 0;\r\n var olddist = 0;\r\n for (var i = 1; (i < poly.getVertexCount() && dist < metres); i++) {\r\n olddist = dist;\r\n dist += poly.getVertex(i).distanceFrom(poly.getVertex(i-1));\r\n }\r\n if (dist < metres) {\r\n return null;\r\n }\r\n var p1 = poly.getVertex(i-2);\r\n var p2 = poly.getVertex(i-1);\r\n var m = (metres-olddist)/(dist-olddist);\r\n return new GLatLng(p1.lat() + (p2.lat()-p1.lat())*m, p1.lng() + (p2.lng()-p1.lng())*m);\r\n}", "function nearest(x,y,obj,n) {\n let all_distance = [] \n if (obj.length > 1 && n<=obj.length) {\n for (let i = 0; i < obj.length; i++) {\n all_distance[i] = distance(x,y,obj[i].x,obj[i].y) \n }\n all_distance = sort(all_distance);\n for (let i = 0; i < obj.length; i++) {\n if (distance(x,y,obj[i].x,obj[i].y)==all_distance[n]) return obj[i] \n }\n }\n}", "function getNearestThing(device, minDistance, callback) {\n\tvar nearest = null;\n\tvar nearestDistance = -1;\n\n\tflaredb.Thing.find({environment:device.environment}, function (err, things) {\n\n\t\tfor (var i = 0; i < things.length; i++) {\n\t\t\tvar thing = things[i];\n\t\t\tvar distance = distanceBetween(device.position, thing.position);\n\t\t\n\t\t\tif (distance != -1 && distance < minDistance && \n\t\t\t\t(nearestDistance == -1 || distance < nearestDistance)) \n\t\t\t{\n\t\t\t\tnearestDistance = distance;\n\t\t\t\tnearest = thing;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcallback(nearest);\n\t});\n}", "function findClosestPointInHeatmap(origin, layer) {\n var distanceBetween = google.maps.geometry.spherical.computeDistanceBetween; // shortcut\n var toReturn = layer.data.getAt(0).location, // initialize; if nothing else is smaller, first will be returned\n minDistance = google.maps.geometry.spherical.computeDistanceBetween(layer.data.getAt(0).location, origin);\n layer.data.forEach(function(point) {\n currentDistance = distanceBetween(origin, point.location);\n if (currentDistance < minDistance) {\n minDistance = currentDistance;\n toReturn = point;\n }\n });\n return { point: toReturn, distance: minDistance };\n}", "static ClosestPointToPolyLine() {}", "get planeDistance() {}", "function dx(i, k){\n\tvar latlng = new google.maps.LatLng(pointarray[i].LatLng.lat(), pointarray[k].LatLng.lng());\n\tvar sign = (pointarray[k].LatLng.lng() > pointarray[i].LatLng.lng()) ? 1 : -1;\n\treturn sign * google.maps.geometry.spherical.computeDistanceBetween(pointarray[i].LatLng, latlng);\n}", "function pointInConvexPolygon(point, polygon, delta, padding) {\n var minDist = 1000000;\n for (var n = polygon.length, i = 0, j = n - 1, x = point[0], y = point[1], inside = false; i < n; j = i++) {\n var xi = polygon[i][0], yi = polygon[i][1],\n xj = polygon[j][0], yj = polygon[j][1];\n\n // See if we this is a separating line\n var dx = (xj-xi);\n var dy = (yj-yi);\n var d = (y-yi)*dx - (x-xi)*dy;\n var l = Math.sqrt(dx*dx + dy*dy);\n d /= l;\n d += padding;\n if (d <= 0) return 0;\n\n // If not save the delta from the closest line we crossed\n if (d < minDist) {\n minDist = d;\n delta[0] = dy/l;\n delta[1] = -dx/l;\n }\n }\n return minDist;\n }", "static ClosestPointToDisc() {}", "function closestStraightCity(c, x, y, q) {\n // Write your code here\n let result = [];\n\n for (let i = 0; i < c.length; i++) {\n let city = c[i];\n let x_coord = x[i];\n let y_coord = y[i];\n let x_dist = Math.max.apply(null, x);\n let nearest_x_idx = null;\n\n for (let j = 0; j < y.length; j++) {\n if (j !== i && y_coord === y[j]) {\n let tempDistX = Math.abs(x[i] - x[j]);\n if (tempDistX !== 0 && x_dist >= tempDistX) {\n if (x_dist > tempDistX) {\n x_dist = tempDistX;\n nearest_x_idx = j;\n } else if (x_dist === tempDistX) {\n if (q[j] > q[nearest_x_idx]) {\n x_dist = tempDistX;\n nearest_x_idx = j;\n } else {\n continue;\n }\n }\n }\n }\n }\n\n let x_result = c[nearest_x_idx] ? c[nearest_x_idx] : null;\n\n let y_dist = Math.max.apply(null, y);\n let nearest_y_idx = null;\n\n for (let k = 0; k < x.length; k++) {\n if (k !== i && x_coord === x[k]) {\n let tempDistY = Math.abs(y[i] - y[k]);\n if (tempDistY !== 0 && y_dist >= tempDistY) {\n if (y_dist > tempDistY) {\n y_dist = tempDistY;\n nearest_y_idx = k;\n } else if (y_dist === tempDistY) {\n if (q[k] > q[nearest_y_idx]) {\n y_dist = tempDistY;\n nearest_y_idx = k;\n } else {\n continue;\n }\n }\n }\n }\n }\n\n let y_result = c[nearest_y_idx] ? c[nearest_y_idx] : null;\n\n if (x_result) {\n result.push(x_result);\n } else if (y_result) {\n result.push(y_result);\n } else {\n result.push(\"NONE\");\n }\n }\n\n return result;\n}", "function findClosestSampledPoint() {\n var i,\n distSquared,\n smallestDist,\n xDelta, yDelta,\n indexOfSmallest;\n \n for (i = 0; i < numSamples; i++) {\n \n if (!(GSP.math.isFiniteScalar(samples[i*2]) && GSP.math.isFiniteScalar(samples[i*2+1]))) {\n continue;\n }\n \n xDelta = samples[i*2] - iPosition.x;\n yDelta = samples[i*2+1] - iPosition.y;\n\n distSquared = xDelta * xDelta + yDelta * yDelta;\n\n if ((smallestDist === undefined) || \n (distSquared < smallestDist)) {\n smallestDist = distSquared;\n indexOfSmallest = i;\n }\n }\n\n return {\n \"point\": GSP.GeometricPoint(samples[indexOfSmallest*2],\n samples[indexOfSmallest*2+1]),\n \"index\": indexOfSmallest};\n }", "function getStaticMinValueTrendline(points) {\n var min = Math.min(...points);\n var trendline = [];\n for (var i = 0; i < points.length; i++) {\n trendline.push(min);\n }\n return trendline;\n}", "function findNearestPoint(reference, start, end) {\n let shortestPoint;\n let shortest = Point.findLength(start, reference);\n let shortest1 = Point.findLength(end, reference);\n if (shortest > shortest1) {\n shortestPoint = end;\n }\n else {\n shortestPoint = start;\n }\n let angleBWStAndEnd = Point.findAngle(start, end);\n let angleBWStAndRef = Point.findAngle(shortestPoint, reference);\n let r = Point.findLength(shortestPoint, reference);\n let vaAngle = angleBWStAndRef + ((angleBWStAndEnd - angleBWStAndRef) * 2);\n return {\n x: (shortestPoint.x + r * Math.cos(vaAngle * Math.PI / 180)),\n y: (shortestPoint.y + r * Math.sin(vaAngle * Math.PI / 180))\n };\n}", "function calcDistance(points) {\n\tlet sum = 0;\n\n\tfor (let i = 0; i < points.length - 1; i++) {\n\t\tlet d = dist(points[i].x, points[i].y, points[i + 1].x, points[i + 1].y);\n\t\tsum += d;\n\t}\n\n\treturn sum;\n}", "function CloudDistance(pointsCloud1, pointsCloud2, npt) {\n let matched = new Array(npt);\n let sum = 0;\n //Initialize the Flag array to False which indicates\n // that any point from gesture1 has been matched with a point from gesture2\n for (let i = 0; i < npt; i++)\n matched[i] = false;\n // match gesture points from pointsCloud1 with points from pointsCloud2; 1-to-many matchings allowed, more flexible\n for (let i = 0; i < npt; i++) {\n let mininmumDistance = Infinity;\n let index = -1;\n for (let j = 0; j < npt; j++) {\n let distance = EuclideanDistance(pointsCloud1[i], pointsCloud2[j]);\n if (distance < mininmumDistance) {\n mininmumDistance = distance;\n index = j;\n }\n }\n matched[index] = true;\n //No weights assigned to points for the distance calculation\n sum += mininmumDistance;\n }\n // match remaining gesture points pointsCloud2 with points from pointsCloud1; 1-to-many matchings allowed\n for (let j = 0; j < matched.length; j++) {\n if (!matched[j]) {\n let minimumDistance = Infinity;\n for (let i = 0; i < npt; i++) {\n let distance = EuclideanDistance(pointsCloud1[i], pointsCloud2[j]);\n if (distance < minimumDistance)\n minimumDistance = distance;\n }\n sum += minimumDistance;\n }\n }\n return sum;\n}", "function calcNewPosNearestNeighbour(position, positions) {\n if (positions.size() === 0) {\n return 0.0;\n }\n\n let j; // int\n let lowest_dist= (positions[0].first - position.first ) * (positions[0].first - position.first ) + (positions[0].second - position.second) * (positions[0].second - position.second),\n distance = 0.0;\n\n for (j = 1; j < positions.size(); ++j) {\n distance = (positions[j].first - position.first ) * (positions[j].first - position.first ) + (positions[j].second - position.second) * (positions[j].second - position.second);\n if(lowest_dist>distance) {\n lowest_dist = distance;\n }\n }\n return lowest_dist;\n}", "function getNeighborhood(userLat, userLong, evictionPts) {\n var d = 0.5,\n temp;\n var nearest;\n\n for (var i = 0; i < evictionPts.length; i++) {\n evLat = parseFloat(evictionPts[i]['lat']);\n evLong = parseFloat(evictionPts[i]['long']);\n\n temp = calculateDist(userLat, userLong, evLat, evLong);\n\n if (temp < d) {\n d = temp;\n nearest = evictionPts[i];\n }\n\n }\n //console.log(d);\n return nearest;\n}", "function get_distance(x1, y1, x2, y2)\n{\n return Math.sqrt(Math.pow(x2-x1,2) + Math.pow(y2-y1,2));\n}", "function distance_calculate(x1, y1, z1, x2, y2, z2) {\n var f1 = x2 - x1;\n var f2 = y2 - y1;\n var f3 = z2 - z1;\n var fal = f1 * f1 + f2 * f2 + f3 * f3;\n var dis = Math.sqrt(fal);\n return dis.toPrecision(12);\n}", "function getPointsToPolygonDistance(points, poly, arcs) {\n // todo: handle multipoint geometry (this function will return an invalid distance\n // if the first point in a multipoint feature falls outside the target polygon\n var p = points[0];\n // unsigned distance to nearest polygon boundary\n return geom.getPointToShapeDistance(p[0], p[1], poly, arcs);\n }", "function getNearStop(){\r\n\tvar minDist= -1;//storing the minimum distance. \r\n\tvar minIdx = -1;//if this remains -1, something went wrong. \r\n\tconsole.log(stopData.length);\r\n\tfor(var i=0;i<stopData.length;i++){\r\n\t\tvar stopLat=stopData[i][4];\r\n\t\tvar stopLng=stopData[i][5];\r\n\t\t\r\n\t\t//Old function, doesn't take into account latlong distance inaccuracies\r\n\t\t//var dist = Math.sqrt(Math.pow((clickLat-stopLat),2)+Math.pow((clickLng-stopLng),2));\r\n\t\tvar dist = measure(clickLat,clickLng,stopLat,stopLng);\r\n\t\t\r\n\t\t//This measure fuction sourced from: https://stackoverflow.com/questions/639695/how-to-convert-latitude-or-longitude-to-meters\r\n\t\tfunction measure(lat1, lon1, lat2, lon2){ // generally used geo measurement function\r\n\t\t\tvar R = 6378.137; // Radius of earth in KM\r\n\t\t\tvar dLat = lat2 * Math.PI / 180 - lat1 * Math.PI / 180;\r\n\t\t\tvar dLon = lon2 * Math.PI / 180 - lon1 * Math.PI / 180;\r\n\t\t\tvar a = Math.sin(dLat/2) * Math.sin(dLat/2) +\r\n\t\t\tMath.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) *\r\n\t\t\tMath.sin(dLon/2) * Math.sin(dLon/2);\r\n\t\t\tvar c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\r\n\t\t\tvar d = R * c;\r\n\t\t\treturn d * 1000; // meters\r\n\t\t}\r\n\t\t\r\n\t\tif(dist < minDist || minDist<0){\r\n\t\t\tminIdx=i;\r\n\t\t\tminDist=dist;\r\n\t\t}\r\n\t\tconsole.log(minDist);\r\n\t}\r\n\tif(minIdx<0){\r\n\t\tconsole.log(\"Something ain't right here...\");\r\n\t}\r\n\telse{\r\n\t\tnearStopName=stopData[minIdx][2];\r\n\t\tnearStopDist=Math.floor(minDist);\r\n\t\tnearStopCode=stopData[minIdx][1];\r\n\t\t\r\n\t\tconsole.log(\"The nearest stop is: \"+nearStopName+\"\\nDistance: \"+nearStopDist+\" metres away\\nCode: \"+nearStopCode);\r\n\t}\r\n\tnearStopLat=stopData[minIdx][4];\r\n\tnearStopLng=stopData[minIdx][5];\r\n\t\r\n\t//The stops are all at about 34 degrees latitude. \r\n\t//1 deg Lat =~ 110922.36m \r\n\t//1 deg Lng =~ 92384.75m\r\n\t//numbers from: http://www.csgnetwork.com/degreelenllavcalc.html\r\n\t//busMarker(minIdx);\r\n\tgetNextBus(minIdx);\r\n}", "function minPos(n1, n2, n3) {\n\t\tvar min;\n\t\n\t\tif (n1 != -1)\n\t\t min = n1;\n\t\telse if (n2 != -1)\n\t\t min = n2;\n\t\telse\n\t\t min = n3;\n\t\n\t\tif (n1 < min && n1 != -1)\n\t\t min = n1;\n\t\n\t\tif (n2 < min && n2 != -1)\n\t\t min = n2;\n\t\n\t\tif (n3 < min && n3 != -1)\n\t\t min = n3;\n\t\n\t\treturn min;\n\t}", "function minV(x) {\r\n var xerg = x[0]; y = xerg;\r\n var lt=x.length;\r\n for (igo = 1; igo < lt; igo++) {\r\n if (x[igo] < xerg) {\r\n xerg = x[igo]; \r\n }\r\n }\r\n y = xerg;\r\n return y;\r\n}", "function init(points) {\n\n var extremePoints = findExtremePoints(points);\n var mostDistantExtremePointIndices = findMostDistantExpremePointIndices(extremePoints);\n\n // The remaining points with the most distant ones removed\n // Sort so that the lower index remains consistent\n mostDistantExtremePointIndices.sort();\n var remaining = extremePoints.slice(0);\n remaining.splice(mostDistantExtremePointIndices[1], 1);\n remaining.splice(mostDistantExtremePointIndices[0], 1);\n\n var a = extremePoints[mostDistantExtremePointIndices[0]];\n var b = extremePoints[mostDistantExtremePointIndices[1]];\n var c = findMostDistantToLine(remaining, a, b);\n\n // Correct normal for positive apex distance\n var basePlane = new Plane(a,c,b);\n var apex = findMostDistantFromPlane(basePlane, points);\n\n // Correct normal so that right-hand base normal points away from apex\n var base = apex.distance > 0 ? [a,b,c] : [a,c,b];\n var mesh = {\n vertices: base.concat(apex.point),\n faces: [{a:0, b:1, c:2}, {a:0, b:3, c:1}, {a:3, b:2, c:1}, {a:0, b:2, c:3}]\n };\n\n assignPointsToFaces(points, mesh);\n return mesh;\n\n}", "function getMinFace2(imgVids, faceKeypoints) {\n if (imgVids.length > 0) {\n let distArray = [];\n imgVidArray.forEach(img => {\n let currentDist = getDist(img.keypoints, faceKeypoints);\n distArray.push(currentDist);\n })\n\n\n let min1 = Math.max.apply(null, distArray); // get the max of the array\n let min1Idx = distArray.indexOf(min1);\n distArray[min1Idx] = -Infinity; // replace max in the array with -infinity\n let min2 = Math.max.apply(null, distArray); // get the new max \n let min2Idx = distArray.indexOf(min2); // get the new max \n // distArray[min1Idx] = min1;\n\n return [imgVids[min1Idx], imgVids[min2Idx]];\n\n } else {\n return null;\n }\n}", "function min(x) {\n var i;\n var mmin = x[0];\n\n for (i = 0; i < x.length; i++) {\n if (x[i] < mmin) {\n mmin =x[i];\n }\n }\n return mmin;\n}", "minMaxDotProd(vectors, normal) {\n let min = null,\n max = null\n // For circles\n vectors.forEach(v => {\n let dp = v.dot(normal)\n if (min === null || dp < min) { min = dp }\n if (max === null || dp > max) { max = dp }\n })\n return { min, max }\n }", "function calcDistance(points) {\n var sum = 0;\n var prev = 0;\n for (var i = 0; i < points.length; i++) {\n var d = distances[prev][points[i]];\n prev = points[i];\n sum += d;\n }\n //points.unshift(0);\n return sum;\n}", "find_points(x, y)\n {\n var face1 = [\n this.points[y][x],\n this.points[y].prev_val(x),\n ( this.points.prev_val(y) || {} )[x]\n ];\n\n var variante = this.mesh_style==0\n ? ( this.points.prev_val(y) || new List() ).next_val(x)\n : ( this.points.prev_val(y) || new List() ).prev_val(x);\n\n var face2 = [\n this.points[y][x],\n ( this.points.prev_val(y) || {} )[x],\n variante\n ];\n \n return [\n this.filter_excessive_distance(face1, this.excessive_distance),\n this.filter_excessive_distance(face2, this.excessive_distance)\n ];\n }", "function min (x,y) {\n\treturn Math.min(x,y)\n}", "getNear(p) {\n\n //first x (going left to right)\n const x1 = Math.floor(p.x / width * 10);\n\n //second x\n const x2 = Math.floor((p.x + p.width) / width * 10);\n\n //first y (going left to right)\n const y1 = Math.floor(p.y / height * 10);\n\n //second y\n const y2 = Math.floor((p.y + p.height) / height * 10);\n\n const min = x1 + y1;\n const max = x2 + y2;\n const s = new Set();\n for (let i = min; i <= max; i++) {\n if (this.pos[i]) this.pos[i].forEach(item => s.add(item));\n }\n\n //get array and return it from the set\n return Array.from(s);\n }", "function calculateDistanceIn3D(arr){\n let firstObject = { X: arr[0], Y: arr[1], Z: arr[2] };\n let secondObject = { X: arr[3], Y: arr[4], Z: arr[5] };\n\n return Math.pow(\n Math.pow(secondObject.X - firstObject.X, 2) +\n Math.pow(secondObject.Y - firstObject.Y, 2) +\n Math.pow(secondObject.Z - firstObject.Z, 2), 1/2);\n}", "function SimpleRecognize(points, templates)\n{\n var b = +Infinity;\n var t = 0;\n for (var i = 0; i < templates.length; i++) // for each unistroke template\n {\n // Golden Section Search (original $1)\n var d = DistanceAtBestAngle(points, templates[i], -AngleRange, +AngleRange, AnglePrecision);\n\n if (d < b)\n {\n b = d; // best (least) distance\n t = i; // unistroke template\n }\n }\n return new Result(templates[t].Name, 1.0 - b / HalfDiagonal);\n}", "function weightDistance (pt1,pt2) {\n const xCost = 1\n const yCost = 1\n const zCost = 1\n\n return parseFloat(Math.sqrt(xCost*Math.pow((pt1.x - pt2.x),2)+\n yCost*Math.pow((pt1.y - pt2.y),2)+\n zCost*Math.pow((pt1.z - pt2.z),2)))\n}", "function findMin() {\n //find the smallest amount per college's team\n var mini = 0;\n var collegeLen = cleaner_sport.length;\n for (i = 0; i < collegeLen; i++) {\n var college_slug = cleaner_sport[i];\n if (graphic_data[college_slug]['sports'][sport]['exp_per_female_team'] != null && graphic_data[college_slug]['sports'][sport]['exp_per_male_team'] != null) {\n if (Math.min(graphic_data[college_slug]['sports'][sport]['exp_per_male_team'], graphic_data[college_slug]['sports'][sport]['exp_per_female_team']) < mini) {\n mini = Math.min(graphic_data[college_slug]['sports'][sport]['exp_per_male_team'], graphic_data[college_slug]['sports'][sport]['exp_per_female_team'])\n }\n } else if (graphic_data[college_slug]['sports'][sport]['exp_per_female_team'] != null && graphic_data[college_slug]['sports'][sport]['exp_per_female_team'] < mini) {\n mini = graphic_data[college_slug]['sports'][sport]['exp_per_female_team']\n } else if (graphic_data[college_slug]['sports'][sport]['exp_per_male_team'] != null && graphic_data[college_slug]['sports'][sport]['exp_per_male_team'] < mini) {\n mini = graphic_data[college_slug]['sports'][sport]['exp_per_male_team']\n }\n }\n return mini;\n }", "closestPointTo(position, closest, exclude) {\n if (this.visible && this.objects !== undefined) {\n for (let i = 0; i < this.objects.length; i++) {\n this.objects[i].closestPointTo(position, closest, exclude);\n }\n }\n }", "static frustumSphereIntersection (frustum, sphere) {\n\t\t\tlet planes = frustum.planes;\n\t\t\tlet center = sphere.center;\n\t\t\tlet negRadius = -sphere.radius;\n\n\t\t\tlet minDistance = Number.MAX_VALUE;\n\n\t\t\tfor (let i = 0; i < 6; i++) {\n\t\t\t\tlet distance = planes[ i ].distanceToPoint(center);\n\n\t\t\t\tif (distance < negRadius) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\tminDistance = Math.min(minDistance, distance);\n\t\t\t}\n\n\t\t\treturn (minDistance >= sphere.radius) ? 2 : 1;\n\t\t}", "function _min(d0, d1, d2, bx, ay) {\n return d0 < d1 || d2 < d1\n ? d0 > d2\n ? d2 + 1\n : d0 + 1\n : bx === ay\n ? d1\n : d1 + 1;\n}", "function getIndexOfClosestPoint(kineticPoint) {\n var pt1 = kineticPoint.getPosition();\n for (var ii = 0; ii < points.length; ii++) {\n var pt2 = points[ii].getPosition();\n var dist = getSquareDistance(pt1, pt2);\n if (dist < DIST_LIMIT) {\n return ii;\n }\n }\n return -1;\n}", "function get_closest(a, x)\n{\n\tvar closest = a[0];\n var diff = Math.abs (x - closest);\n for (i = 0; i < a.length; i++) \n {\n if (Math.abs (x - a[i]) < diff) \n {\n diff = (Math.abs (x - a[i]));\n closest = a[i];\n }\n }\n return closest;\n}" ]
[ "0.7094994", "0.68886316", "0.63958967", "0.6268024", "0.61662775", "0.61351293", "0.6076479", "0.5950406", "0.5922658", "0.5922221", "0.5880693", "0.5875567", "0.58688724", "0.5853577", "0.5852059", "0.5848378", "0.58183795", "0.58052945", "0.5805142", "0.57988274", "0.57884026", "0.5737854", "0.57125497", "0.57069457", "0.56680983", "0.5665622", "0.5662763", "0.56281745", "0.56157017", "0.5614688", "0.55905867", "0.5586885", "0.55825037", "0.5582357", "0.5582357", "0.5582357", "0.5582357", "0.5578704", "0.5570556", "0.5555357", "0.555085", "0.55450803", "0.55192864", "0.54961056", "0.5485425", "0.5485409", "0.54832035", "0.54824513", "0.54768676", "0.5449839", "0.5445576", "0.5444319", "0.54409975", "0.54401124", "0.54359186", "0.54215777", "0.5418489", "0.53980154", "0.5378841", "0.53674924", "0.5365881", "0.5365634", "0.5359224", "0.5355296", "0.5352723", "0.53464544", "0.53388834", "0.5335375", "0.5334365", "0.53287154", "0.5324979", "0.53228575", "0.531751", "0.5315069", "0.5308677", "0.5304156", "0.52940047", "0.52886105", "0.528577", "0.5285692", "0.5284192", "0.5278422", "0.5277676", "0.5275508", "0.5273468", "0.5260947", "0.525859", "0.52573836", "0.5255192", "0.52549666", "0.5253542", "0.5246211", "0.5244224", "0.52410287", "0.52409226", "0.52408874", "0.52338773", "0.5227613", "0.5225241", "0.52220464" ]
0.80360353
0
finds the vertical distance between two lines at a given xvalue
function vertical_distance(x, line1_p1, line1_p2, line2_p1, line2_p2){ // detect invalid values (not between x-ranges of both segments) if (!(between(x, line1_p1[0], line1_p2[0]) && (between(x, line2_p1[0], line2_p2[0])))){ return NaN; } // find corresponding points on both lines var slope1 = (line1_p1[1]-line1_p2[1]) / (line1_p1[0]-line1_p2[0]); var slope2 = (line2_p1[1]-line2_p2[1]) / (line2_p1[0]-line2_p2[0]); var y1 = line1_p1[1] + ((x - line1_p1[0]) * slope1); var y2 = line2_p1[1] + ((x - line2_p1[0]) * slope2); return Math.abs(y1-y2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getLineLengthBetweenPoints (x, y, x0, y0){\n return Math.sqrt((x -= x0) * x + (y -= y0) * y);\n }", "function lineLength(x, y, x0, y0){\n return Math.sqrt((x -= x0) * x + (y -= y0) * y);\n}", "function getLineLength(x1, y1, x2, y2) {\n var res = Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow((y2 - y1), 2));\n return res;\n}", "function vertical_line_line(line, x) {\n const px = line.p[0], py = line.p[1];\n const ux = line.u[0], uy = line.u[1];\n return vec2.fromValues(x, py + uy * (x - px) / ux);\n}", "function lineval(s, e, x) {\n var sl = (e[1]-s[1])/(e[0]-s[0])\n return s[1] + sl * (x-s[0])\n}", "function computeLineLength( x1, y1, x2, y2 ) {\n let xdiff = subtract( x2, x1 );\n let ydiff = subtract( y2, y1 );\n let total = add( square( xdiff ), square( ydiff ) );\n return Math.sqrt( total );\n}", "function calculeDistance(x1, y1, x2, y2) {\r\n return Math.sqrt(Math.pow((y2 - y1),2) + Math.pow((x2 - x1),2));\r\n}", "function getLineDistance(start, end) {\n // return Math.sqrt(Math.abs(start.x - end.x) ** 2 + Math.abs(start.y - end.y) ** 2);\n return Math.sqrt(Math.pow(Math.abs(start.x - end.x), 2) + Math.pow(Math.abs(start.y - end.y), 2));\n}", "distance(x0, y0, x1, y1) {\n return Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2));\n }", "function lineEq(y2, y1, x2, x1, currentVal) {\n // y = mx + b\n var m = (y2 - y1) / (x2 - x1),\n b = y1 - m * x1;\n\n return m * currentVal + b;\n }", "function lineDist(toPt, pt1, pt2) {\n var num = Math.abs((pt2.y - pt1.y) * toPt.x - (pt2.x - pt1.x) * toPt.y + pt2.x * pt1.y - pt2.y * pt1.x)\n var denom = Math.sqrt(Math.pow(pt2.y - pt1.y, 2) + Math.pow(pt2.x - pt1.x, 2))\n return num / denom;\n}", "function sepDist(x1,y1,x2,y2) {\n return Math.pow(Math.pow(x1-x2,2)+Math.pow(y1-y2,2),0.5);\n}", "function getDistance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n }", "function get_distance(x1, y1, x2, y2)\n{\n return Math.sqrt(Math.pow(x2-x1,2) + Math.pow(y2-y1,2));\n}", "function lineEq(y2, y1, x2, x1, currentVal) {\n\t\t// y = mx + b\n\t\tvar m = (y2 - y1) / (x2 - x1),\n\t\t\tb = y1 - m * x1;\n\n\t\treturn m * currentVal + b;\n\t}", "function getDistance(x1,y1,x2,y2){\r\n\tlet xOff = x1 - x2;\r\n\tlet yOff = y1 - y2;\r\n\treturn Math.sqrt(xOff * xOff + yOff * yOff);\r\n}", "function distance (x1, y1, x2, y2){\r\n return Math.sqrt( (x2-=x1)*x2 + (y2-=y1)*y2 );\r\n}", "function getTwoPointsDistance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n }", "function getDistance(x1, y1, x2, y2) {\r\n var a = 0.0;\r\n var b = 0.0;\r\n a = x1 - x2;\r\n b = y1 - y2;\r\n return Math.sqrt(a * a + b * b);\r\n}", "function getDistance(x1, y1, x2, y2) {\n\treturn Math.sqrt(Math.pow((x1 - x2), 2) + Math.pow((y1 - y2), 2));\n}", "function distance(x1, y1, x2, y2){ \n\t\treturn Math.abs(Math.sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) ));\n\t}", "distance(x1, y1, x2, y2) {\n\t\treturn Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n\t}", "function distance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));\n }", "function getDistance(x1, y1, x2, y2)\r\n{\r\n\treturn (((x2-x1)**2)+((y2-y1)**2))**(1/2);\r\n}", "function getDistance(x1, x2, y1, y2) {\n var a = x1 - x2;\n var b = y1 - y2;\n var c = Math.sqrt( a*a + b*b );\n return c;\n }", "function slope(a, b) {\n return (b.y - a.y) / (b.x - a.x);\n }", "function slope(a, b) {\n return (b.y - a.y) / (b.x - a.x);\n }", "function getyDistBetweenDots(){\n var yDistBetweenDots = distBetweenDots / 2;\n\n return yDistBetweenDots\n}", "function getDistance(x1,y1,x2,y2)\n{\n var xD = (x2-x1);\n var yD = (y2-y1);\n var power = Math.pow(xD,2)+Math.pow(yD,2);\n return Math.sqrt(power);\n}", "function distance(x1, x2, y1, y2) {\n\treturn Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}", "function calcDistance(x1, y1, x2, y2)\n{\n\treturn Math.sqrt(Math.pow((x2 - x1),2) + Math.pow((y2 - y1),2));\n}", "function find_distance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));\n}", "function getDistance(x1,y1,x2,y2) {\n\treturn Math.sqrt(((x2-x1)*(x2-x1))+((y2-y1)*(y2-y1)));\n}", "getYForLine(line) {\n const options = this.options;\n const spacing = options.spacing_between_lines_px;\n const headroom = options.space_above_staff_ln;\n\n const y = this.y + (line * spacing) + (headroom * spacing);\n\n return y;\n }", "function getDistance(x1, y1, x2, y2) {\n return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }", "function getxDistBetweenDots(){\n var xDistBetweenDots = Math.round(lengthOfSide(distBetweenDots, yDistBetweenDots)); \n\n return xDistBetweenDots\n}", "function xIntersect(line1,line2){\n if(line1.b === null){\n return line1.anX;\n }\n else if(line2.b === null){\n return line2.anX;\n }else{\n return ((line2.b - line1.b) / (line1.m - line2.m));\n }\n }", "function getDistance(x1, y1, x2, y2)\n{\n var l1 = x2 - x1;\n var l2 = y2 - y1;\n \n return Math.sqrt(l1 * l1 + l2 * l2);\n}", "function getDistance(x1, y1, x2, y2) {\n\tlet xDistance = x2 - x1;\n\tlet yDistance = y2 - y1;\n\n\treturn Math.sqrt(Math.pow(xDistance, 2) + Math.pow(yDistance, 2));\n}", "getDistancia(x, xi, xf, y, yi, yf) {\n\n let dist;\n\n if (xf === xi) {\n let yu = yf;\n let yd = yi;\n\n if (y >= yu) {\n dist = Math.abs(Math.sqrt((xi - x) * (xi - x) + (yu - y) * (yu - y)));\n dist = dist * DEGREE_TO_METER;\n return dist;\n }\n if (y <= yd) {\n dist = Math.abs(Math.sqrt((xi - x) * (xi - x) + (yd - y) * (yd - y)));\n dist = dist * DEGREE_TO_METER;\n return dist;\n }\n if ((y > yd) && (y < yu)) {\n dist = Math.abs(xi - x);\n dist = dist * DEGREE_TO_METER\n return dist;\n }\n }\n\n if (yf === yi) {\n\n let xr;\n let xl;\n if (xf > xi) {\n xr = xf;\n xl = xi;\n } else {\n xr = xi;\n xl = xf;\n }\n if (x >= xr) {\n dist = Math.abs(Math.sqrt((x - xr) * (x - xr) + (yi - y) * (yi - y)));\n dist = dist = dist * DEGREE_TO_METER;\n return dist;\n }\n if (x <= xl) {\n dist = Math.abs(Math.sqrt((x - xl) * (x - xl) + (yi - y) * (yi - y)));\n dist = dist * DEGREE_TO_METER;\n return dist;\n }\n if ((x > xl) && (x < xr)) {\n dist = Math.abs(yi - y);\n dist = dist;\n return dist = Math.abs((yi - y) * DEGREE_TO_METER);\n }\n }\n\n let xr = xf;\n let yr = yf;\n let xl = xi;\n let yl = yi;\n\n let M = (yf - yi) / (xf - xi);\n let b = yi - M * xi;\n let bp = y + (1 / M) * x;\n let xs = (bp - b) / (M + 1 / M);\n let ys = b + M * xs;\n\n if (xs > xr) {\n dist = Math.abs(Math.sqrt((xr - x) * (xr - x) + (yr - y) * (yr - y)));\n } else {\n if (xs < xl) {\n dist = Math.abs(Math.sqrt((xl - x) * (xl - x) + (yl - y) * (yl - y)));\n } else {\n dist = Math.abs(Math.sqrt((xs - x) * (xs - x) + (ys - y) * (ys - y)));\n }\n }\n return dist = Math.abs(dist * DEGREE_TO_METER);\n }", "getDistance(x1, y1, x2, y2){\r\n let dx = x2 - x1;\r\n let dy = y2 - y1;\r\n\r\n return Math.sqrt(Math.pow(dx,2) + Math.pow(dy,2));\r\n }", "Dis(x2, y2) {\n var x1 = 0;\n var y1 = 0;\n\n console.log(\"X1 is \" + x1);\n console.log(\"Y is \" + y1);\n\n var xs = (x2 - x1);\n var ys = (y2 - y1);\n xs *= xs;\n ys *= ys;\n\n var distance = Math.sqrt(xs + ys);\n console.log(\"Result is =>\" + distance);\n\n }", "function distance(x1, y1, x2, y2) {\r\n\t\t return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\r\n\t\t}", "function slope(a, b) {\n return (b.y - a.y) / (b.x - a.x);\n }", "function slope(a, b) {\n return (b.y - a.y) / (b.x - a.x);\n }", "vertLineAt (x) { return this._vert[this.vertIdxAt(x)] }", "function dist(x1,y1,x2,y2) {\n return Math.sqrt( (x2-=x1)*x2 + (y2-=y1)*y2 );\n}", "function getDistance(x1,y1,x2,y2){\n // this is the equation: square root of (x1-y1)*(x1-y2)+(y1-y2)*(y2-y1)\n return Math.sqrt( Math.pow((x1-x2), 2) + Math.pow((y1-y2), 2) );\n}", "function distance(x1, y1, x2, y2) {\n return Math.abs(x1 - x2) + Math.abs(y1 - y2)\n}", "function distance_to(x1, y1, x2, y2){\n return Math.sqrt((x2-x1)**2 + (y2-y1)**2);\n}", "function distance( x1, y1, x2, y2 ) {\n var a = x2 - x1;\n var b = y2 - y1;\n return Math.sqrt( a * a + b * b );\n }", "function getLinePoints(p1,p2)\n{\n\tvar slope;\n var begin;\n var end;\n var original;\n \n var horiz = Math.abs(p1[0]-p2[0]) > Math.abs(p1[1]-p2[1]); //Find pixel increment direction\n \n //Get start x,y and ending y\n if(horiz) //if pixel increment is left to right\n {\n if(p1[0]<p2[0]){begin=p1[0];end=p2[0];original=p1[1];}\n else {begin=p2[0];end=p1[0];original=p2[1];}\n slope = (p1[1]-p2[1])/(p1[0]-p2[0]);\n\n }\n else\n {\n if(p1[1]<p2[1]){begin=p1[1];end=p2[1];original=p1[0];}\n else {begin=p2[1];end=p1[1];original=p2[0];}\n slope = (p1[0]-p2[0])/(p1[1]-p2[1]);\n }\n var nps = [];\n\tvar state = begin + 1;\n //(yn-yo)/(xn-xo)=slope\n // yn = slope*(xn-xo)+yo\n while(state<end)\n\t{\n\t if(horiz)nps.push([state,Math.round((state-begin)*slope+original)])\n else nps.push([Math.round((state-begin)*slope+original),state])\n\t state+= 1;\n\t}\n\treturn nps;\n \n}", "function computeVectorDistance(x1, x2) {\n\tconst D = x1.length;\n\tlet d = 0;\n\tfor (let i = 0; i < D; i++) {\n\t\tconst x1i = x1[i];\n\t\tconst x2i = x2[i];\n\t\td += (x1i - x2i) * (x1i - x2i);\n\t}\n\treturn d;\n}", "function get_line_x2(step) {\n\treturn get_line_x1(step + 1);\n}", "function distance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}", "function distance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2-x1, 2) + Math.pow(y2-y1, 2))\n}", "function getDistance(x1, y1, x2, y2) {\n var xDistance = x2 - x1;\n var yDistance = y2 - y1;\n\n return Math.sqrt(Math.pow(xDistance, 2) + Math.pow(yDistance, 2));\n}", "function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function calculateDistance(x1,x2,y1,y2){\n return Math.sqrt(Math.pow((x2-x1),2)+Math.pow((y2-y1),2));\n}", "function get_dist(x1,y1,x2,y2){\n return Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));\n}", "function disPoint(x1,y1,x2,y2){\n var distanceX=Math.pow((x1-x2),2)\n var distanceY=Math.pow((y1-y2),2)\n return Math.sqrt(distanceX+distanceY);\n \n}", "function getDistance(x2, y2, x1, y1) {\n var distance;\n var deltaX = x2 - x1;\n var deltaY = y2 - y1;\n\n distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n\n return distance;\n}", "function getDistance(x1, y1, x2, y2) {\n return Math.max(Math.abs(x2 - x1), Math.abs(y2 - y1));\n}", "function calculateCoordinatesDirectionAxis(coordinate1, coordinate2, boardWidth){\n\n const xyCoordinate1 = getXYCoordinatesFromIndex(coordinate1, boardWidth)\n const xyCoordinate2 = getXYCoordinatesFromIndex(coordinate2, boardWidth)\n\n let trend = undefined\n if (xyCoordinate1[1] === xyCoordinate2[1]) trend = 'H' // horizontal if the y coordinates matches\n else if (xyCoordinate1[0] === xyCoordinate2[0]) trend = 'V' // vertical if the the x coordinates matches\n return trend\n}", "function calcSlope(a, b) {\n return ((b.y - a.y)/(b.x - a.x));\n}", "function distBetweenPoints(x1, y1, x2, y2) {\n\treturn Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}", "function getDisOf(b1, b2){\r\n var delta_x = Math.abs(b1.x - b2.x),\r\n delta_y = Math.abs(b1.y - b2.y);\r\n\r\n return Math.sqrt(delta_x*delta_x + delta_y*delta_y);\r\n}", "function getDist(x1, y1, x2, y2){\n\treturn Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow((y2 - y1), 2))\n}", "function distance(x1, y1, x2, y2)\n{\n return Math.sqrt(\n Math.pow(Math.abs(x2 - x1), 2) +\n Math.pow(Math.abs(y2 - y1), 2));\n}", "function calculateDistanceBetweenTwoPoints(x1, y1, x2, y2) {\r\n let distance = Math.sqrt(Math.pow((x1-x2),2) + Math.pow((y1-y2),2));\r\n console.log(distance);\r\n}", "function getSlope(a, b) {\n return (b.y - a.y) / (b.x - a.x);\n}", "function getDistance(x1, y1, x2, y2) {\n var x = x2 - x1;\n var y = y2 - y1;\n return Math.sqrt((x * x) + (y * y));\n }", "function findLineByLeastSquare(values_x, values_y) {\n\n let sum_x = 0;\n let sum_y = 0;\n let sum_xy = 0;\n let sum_xx = 0;\n let count = 0;\n\n // We'll use those variables for faster read/write access.\n let x = 0;\n let y = 0;\n let values_length = values_x.length;\n\n // calculate the sum for each of the parts necessary.\n for (let v = 0; v < values_length; v++) {\n x = values_x[v];\n y = values_y[v];\n sum_x += x;\n sum_y += y;\n sum_xx += x*x;\n sum_xy += x*y;\n count++;\n }\n\n // y = x * m + b\n let m = (count*sum_xy - sum_x*sum_y) / (count*sum_xx - sum_x*sum_x);\n let b = (sum_y/count) - (m*sum_x)/count;\n\n // We will make the x and y result line now\n let result_values_x = [];\n let result_values_y = [];\n\n for (let v = 0; v < values_length; v++) {\n x = values_x[v];\n y = x * m + b;\n result_values_x.push(x);\n result_values_y.push(y);\n }\n\n // This part I added to get the coordinates for the line\n x1 = Math.min.apply(Math, result_values_x);\n x2 = Math.max.apply(Math, result_values_x);\n y1 = Math.min.apply(Math, result_values_y);\n y2 = Math.max.apply(Math, result_values_y);\n\n return [x1, x2, y1, y2];\n}", "function compareLineSlopes(origin, endPoint1, endPoint2) {\n return ((endPoint2.x - origin.x) * (endPoint1.y - origin.y)) - ((endPoint1.x - origin.x) * (endPoint2.y - origin.y));\n}", "function distance(x1, x2, y1, y2){\n\treturn Math.sqrt(((x2-x1)*(x2-x1))+((y2-y1)*(y2-y1)));\n}", "function getDisOf(b1, b2){\n\t var delta_x = Math.abs(b1.x - b2.x),\n\t delta_y = Math.abs(b1.y - b2.y);\n\n\t return Math.sqrt(delta_x*delta_x + delta_y*delta_y);\n\t}", "function distance (x1, y1, x2, y2){\r\n\tvar a = x1 - x2;\r\n\tvar b = y1 - y2;\r\n\treturn Math.sqrt(a*a + b*b);\r\n}", "function d3_v3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function distance(x1,y1,x2,y2) {\n return sqrt(pow(x2-x1,2)+pow(y2-y1,2)) \n}", "function d4_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function calcLine(x0, y0, x1, y1) {\n\tlet coords = [];\n let ix = x0 < x1 ? 1 : -1, dx = Math.abs(x1 - x0);\n let iy = y0 < y1 ? 1 : -1, dy = Math.abs(y1 - y0);\n let m = Math.max(dx, dy), cx = m >> 1, cy = m >> 1;\n\n for (i = 0; i < m; i++) {\n coords.push([x0, y0]);\n if ((cx += dx) >= m) { cx -= m; x0 += ix; }\n if ((cy += dy) >= m) { cy -= m; y0 += iy; }\n }\n\n\treturn coords;\n}", "function distLineToPoint(a, b, p) {\n var n = vectDiff(b, a)\n n = vectScale(n, 1/Math.sqrt(n[0]*n[0]+n[1]*n[1]))\n \n var amp = vectDiff(a, p)\n var d = vectDiff(amp, vectScale(n,(dot(amp, n))))\n //return { d:d, a:amp, nn:n, n:dot(amp,n)}\n return Math.sqrt(d[0]*d[0]+d[1]*d[1])\n}", "function getDisOf(b1, b2){\n var delta_x = Math.abs(b1.x - b2.x),\n delta_y = Math.abs(b1.y - b2.y);\n\n return Math.sqrt(delta_x*delta_x + delta_y*delta_y);\n}", "function defline(p1, p2){\n var a = p1[1] - p2[1];\n var b = p1[0] - p2[0];\n return [a, -b, b * p1[1] - a * p1[0]];\n}", "function calculateSlope() {\n let x1 = 2;\n let x2 = 4;\n let firstPointY = 2 * x1 - 2;\n let secondPointY = 2 * x2 - 2;\n return (secondPointY - firstPointY) / (x2 - x1);\n}", "function distance(x1, y1, x2, y2){\n var s = Math.sqrt(Math.pow(x1-x2, 2) + Math.pow(y1-y2, 2));\n //console.log(\"s: \", s);\n return s;\n}", "DistanceFromPoint(x,y,x2,y2) {\n return Math.abs(Math.sqrt(Math.pow((x-x2),2) + Math.pow((y-y2),2)));\n }", "function collideHLine(x0, x1, y, rect, v)\r\n{\r\n var left = rect.x;\r\n var right = rect.x+rect.width;\r\n var top = rect.y;\r\n var bottom = rect.y+rect.height;\r\n var dy;\r\n if (y <= top && top < y+v.y) {\r\n dy = top - y;\r\n } else if (bottom <= y && y+v.y < bottom) {\r\n dy = bottom - y;\r\n } else {\r\n return v;\r\n }\r\n // assert(v.y != 0);\r\n var dx = v.x*dy / v.y;\r\n if ((v.x <= 0 && x1+dx <= left) ||\r\n (0 <= v.x && right <= x0+dx) ||\r\n (x1+dx < left || right < x0+dx)) {\r\n return v;\r\n }\r\n return new Vec2(dx, dy);\r\n}", "function distanceY(distance, height, lightPos)\n{\n distance = (lightPos[1] - height*lightPos[2]) / Math.sqrt(1.0 + height * height);\n return distance;\n}", "function lineLength(line){\n return Math.sqrt(Math.pow(line[1][0] - line[0][0], 2) + Math.pow(line[1][1] - line[0][1], 2));\n }", "function dist(x1, y1, x2, y2) {\r\n return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));\r\n }", "function get_line_y(c) {\n\treturn 94 + c * 75;\n}", "function dist(x1, x2, y1, y2) {\r\n var a = x1 - x2;\r\n var b = y1 - y2;\r\n\r\n var c = Math.sqrt(a * a + b * b);\r\n return c;\r\n}", "function distPointToSegmentSquared(lineX1,lineY1,lineX2,lineY2,pointX,pointY){\n\tvar vx = lineX1 - pointX;\n\tvar vy = lineY1 - pointY;\n\tvar ux = lineX2 - lineX1;\n\tvar uy = lineY2 - lineY1;\n\n\tvar len = ux*ux + uy*uy;\n\tvar det = (-vx*ux) + (-vy*uy);\n\tif( det<0 || det>len ){\n\t\tux = lineX2 - pointX;\n\t\tuy = lineY2 - pointY;\n\t\treturn Math.min( (vx*vx)+(vy*vy) , (ux*ux)+(uy*uy) );\n\t}\n\n\tdet = ux*vy - uy*vx;\n\treturn (det*det) / len;\n}", "function distanceBetween(p1, p2){\n var a = Math.abs(p1.x-p2.x)%size.width;\n var b = Math.abs(p1.y-p2.y);\n a = Math.min(a, size.width-a);\n return Math.sqrt(Math.pow(a,2)+Math.pow(b,2));\n }", "function _delaunay_distance(v1, v2) {\n\treturn Math.sqrt(Math.pow(v2.x - v1.x, 2) + Math.pow(v2.y - v1.y, 2));\n}", "function dist(x1, y1, x2, y2) {\n var a = x1 - x2;\n var b = y1 - y2;\n var c = Math.sqrt( a*a + b*b );\n return c;\n}", "function distancia(x1, y1, x2, y2) {\r\n\treturn Math.sqrt(Math.pow((x1 - x2), 2) + Math.pow((y1 - y2), 2));\r\n}" ]
[ "0.70935535", "0.6711785", "0.6684788", "0.641683", "0.6354587", "0.62838244", "0.6268492", "0.62093246", "0.6129224", "0.61134243", "0.60895437", "0.6074152", "0.6056755", "0.604596", "0.6024685", "0.6018125", "0.5999244", "0.59716916", "0.5969514", "0.5964811", "0.5954248", "0.5948839", "0.5940051", "0.5932741", "0.5925329", "0.59190047", "0.59190047", "0.5918612", "0.5910468", "0.5910133", "0.59004015", "0.5899478", "0.5894991", "0.5893074", "0.5885588", "0.5881587", "0.58808285", "0.58747363", "0.587336", "0.5868716", "0.58545405", "0.58501726", "0.58340895", "0.5833676", "0.5833676", "0.5832225", "0.58305293", "0.5828468", "0.58260226", "0.5820418", "0.5819787", "0.5817707", "0.58060974", "0.5796798", "0.5795633", "0.57938164", "0.5793223", "0.57885903", "0.57885903", "0.57885903", "0.5788319", "0.5788032", "0.57845825", "0.57734716", "0.57700855", "0.5768229", "0.57668656", "0.5766673", "0.576322", "0.57557625", "0.57535964", "0.5752405", "0.57520264", "0.5736785", "0.5736684", "0.57346874", "0.5725049", "0.5721372", "0.5718461", "0.5716163", "0.5715941", "0.57079107", "0.5700372", "0.5700183", "0.56950396", "0.5687773", "0.56843626", "0.5684223", "0.56838197", "0.5679099", "0.56786007", "0.5671928", "0.5667488", "0.56600225", "0.56537503", "0.5641594", "0.5636021", "0.56269944", "0.5618839", "0.5605639" ]
0.7826152
0
finds the width of a lesion at a given percentage of its maximum depth
function width_at_depth (points, percent_depth){ var lowest = 1000000; var highest = -1000000; for (var i = 0; i < points.length; i++){ if (points[i][1] < lowest){ lowest = points[i][1]; } if (points[i][1] > highest){ highest = points[i][1]; } } var pair1 = []; var pair2 = []; // defines the line segments that intersect with y = -max_depth/2 var target_y = highest - (Math.abs(highest-lowest)*percent_depth); console.log(target_y); for (var i = 0; i < points.length; i++){ if (i === 0){ // if on the first point, compare with the last point if (((points[points.length-1][1]-target_y) * (points[0][1]-target_y)) <= 0){ // if the differences between the y-coordinates and half of max_depth have opposite signs if (pair1.length === 0) { pair1 = [points[0], points[points.length - 1]]; } else{ pair2 = [points[0], points[points.length - 1]]; } } } else { if (((points[i-1][1]-target_y) * (points[i][1]-target_y)) <= 0){ if (pair1.length === 0) { pair1 = [points[i-1], points[i]]; } else{ pair2 = [points[i-1], points[i]]; } } } } // find x-coordinates of intersections var slope1 = (pair1[1][1]-pair1[0][1]) / (pair1[1][0]-pair1[0][0]); var slope2 = (pair2[1][1]-pair2[0][1]) / (pair2[1][0]-pair2[0][0]); var intersection1 = (target_y-pair1[0][1]) / slope1 + pair1[0][0]; var intersection2 = (target_y-pair2[0][1]) / slope2 + pair2[0][0]; return Math.abs(intersection1-intersection2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compute_width(depth, areas) {\n if (areas.length == 0) {\n return 0;\n } else {\n area = sum_array(areas);\n return area / depth;\n };\n}", "function levelWidth(root) {\n\t// array to loop over tree\n\tconst arr = [root, 's'];\n\t//counter to check for widths\n\tconst counter = [0];\n\n\t// Check if there are atleast 2 elements to avoid infinite loop\n\twhile(arr.length > 1) {\n\t\t//POP OUT THE FIRST ELEMENT\n\t\tconst node = arr.shift();\n\n\t\t//check if 's' is the last character - if YES it means we have traversed the whole breadth with BF traversal\n\t\t// So we 1. push all the children to the array 2. Initialize next counter with value 0 which signifies next width value\n\t\tif(node === 's') {\n\t\t\tcounters.push(0);\n\t\t\tarr.push('s');\n\t\t} else {\n\t\t\t// Increase counter and push all children until we get an 's'\n\t\t\tarr.push(...node.children);\n\t\t\tcounters[counters.length -1] + 1;\n\t\t}\n\t}\n\n\treturn counters;\n\n}", "function getWidth(uses) {\n\treturn 1 + Math.min(Math.round(uses/150), 6);\n}", "function getWidth(val, max) {\n\twidth = Math.ceil((val/max)*400);\n\tif (width == 0) {\n\t\treturn 1;\n\t} else {\n\t\treturn width;\n\t}\n}", "function levelWidth(root) {\n const arr = [root, 'marker'];\n const widths = [0];\n\n /* do the breadth first traversal, but add a \n marker at the end of each level\n */\n while (arr.length > 1) { // is marker the only thing thats left?\n let elem = arr.shift();\n if (elem === 'marker') {\n // starting a new level\n widths.push(0);\n arr.push('marker');\n } else {\n // on the same level, keep incrementing the counter\n arr.push(...elem.children);\n widths[widths.length - 1]++;\n }\n }\n\n return widths;\n}", "hpWidth(maxWidth) {\n if (this.fainted || !this.hp) {\n return 0;\n }\n // special case for low health...\n if (this.hp == 1 && this.maxhp > 45) {\n return 1;\n }\n if (this.maxhp === 48) {\n // Draw the health bar to the middle of the range.\n // This affects the width of the visual health bar *only*; it\n // does not affect the ranges displayed in any way.\n let range = this.getPixelRange(this.hp, this.hpcolor);\n let ratio = (range[0] + range[1]) / 2;\n return Math.round(maxWidth * ratio) || 1;\n }\n let percentage = Math.ceil(100 * this.hp / this.maxhp);\n if ((percentage === 100) && (this.hp < this.maxhp)) {\n percentage = 99;\n }\n return percentage * maxWidth / 100;\n }", "normalizeWidths() {\n // Loop through each level for tree\n for (let i = 0; i <= this.treeDepth; i++) {\n // Retrieve all nodes in level\n const nodes = document.querySelectorAll(`.level-${i}`);\n const nodeList = Array.from(nodes);\n\n // Determine the maximum width for all nodes\n const maxWidth = nodeList.reduce((max, curr) => {\n return curr.clientWidth > max ? curr.clientWidth : max;\n }, 0);\n\n // Set each node to max width\n nodeList.forEach(node => {\n node.style.width = maxWidth;\n });\n }\n }", "function $width(percent) {return window.innerWidth / 100 * percent;}", "function foldTo(distance) {\n if (distance < 0) return null;\n let numFolds = 0;\n let thickness = 0.0001;\n while (thickness < distance) {\n numFolds++;\n thickness *= 2;\n }\n return numFolds;\n}", "function getWidthByPercent(percent) {\n return window.innerWidth / 100 * percent;\n}", "function avgDepth(min, max){\n\treturn (min + max) / 2;\n}", "function levelWidth(root) {\n let counterArray = [0];\n let traverseArray = [root, 's'];\n\n while (traverseArray.length > 1) {\n let element = traverseArray.shift();\n if (element === 's') {\n counterArray.push(0);\n traverseArray.push(element);\n } else {\n traverseArray.push(...element.children);\n counterArray[counterArray.length - 1]++;\n }\n }\n\n return counterArray;\n\n}", "getLeafWidth(node, generation) {\n\n\t}", "function levelWidth(root) {\n const counters = [0];\n const array = [root, 'stopper'];\n\n while (array.length > 1) {\n const node = array.shift();\n\n if (node === 'stopper') {\n array.push('stopper');\n counters.push(0);\n }\n else {\n array.push(...node.children);\n counters[counters.length-1]++;\n }\n }\n\n return counters;\n}", "function levelWidth(root) {\n\tvar answer = [0];\n\tvar tree = [root, 'eor'];\n\n\twhile (tree.length > 1) {\n\t\tvar node = tree.shift();\n\t\tif (node === 'eor') {\n\t\t\tanswer.push(0);\n\t\t\ttree.push('eor');\n\t\t} else {\n\t\t\ttree.push(...node.children);\n\t\t\tanswer[answer.length - 1]++;\n\t\t}\n\t}\n\n\treturn answer;\n}", "function calcMaxRecursionDepth() {\n return min(7, floor(log2(pixelCount)))\n}", "function calcNavWidth() {\n let cWidth = window.innerWidth;\n let percentage = 33;\n\n return (cWidth / 100) * percentage;\n}", "computeMaxDepth() {\n let d = 0;\n for (const child of this.components) {\n d = Math.max(d + 1, child.children.computeMaxDepth());\n }\n return d;\n }", "getNodeTreeWidth(stepGap) {\n const currentNodeWidth = this.nativeElement.getBoundingClientRect().width;\n if (!this.hasChildren()) {\n return this.nativeElement.getBoundingClientRect().width;\n }\n let childWidth = this._children.reduce((childTreeWidth, child) => {\n return childTreeWidth += child.getNodeTreeWidth(stepGap);\n }, 0);\n childWidth += stepGap * (this._children.length - 1);\n return Math.max(currentNodeWidth, childWidth);\n }", "function calculateWidestLevel(root) {}", "function _cumulativeWidth (_bounces) {return (Math.pow (_base,_bounces) - 1) / (_base - 1)}", "function tp_sum_width(layers, max)\n{\n\tvar total_width = 0;\n\tfor (var i = 0; i < layers.length; i++) {\n\t\tif (null != max && i == max) break;\n\t\ttotal_width += layers[i].bounds[2].value - layers[i].bounds[0].value;\n\t}\n\n\treturn total_width;\n}", "getPictureWidthWithSidelap() {\n const sidelap = (this.mission.sidelap * 0.01);\n return (this.getPictureWidth() - (this.getPictureWidth() * sidelap)).toFixed(2);\n }", "function forFold(distance) {\n if(distance < 0)\n return null;\n let currThickness = .0001;\n for(var folds = 0; currThickness < distance; folds++) {\n currThickness *= 2;\n }\n return folds;\n }", "function CalcWidth() {\n let a = gridSpacing * gridSpacing; // hypotenuse c^2\n let c = sqrt(a / 2);\n console.log(c);\n return c;\n}", "get _width() {\n // The container event's width is determined by the maximum number of\n // events in any of its rows.\n if (this.rows) {\n const columns =\n this.rows.reduce((max, row) => {\n return Math.max(max, row.leaves.length + 1) // add itself\n }, 0) + 1 // add the container\n\n return 100 / columns\n }\n\n const availableWidth = 100 - this.container._width\n\n // The row event's width is the space left by the container, divided\n // among itself and its leaves.\n if (this.leaves) {\n return availableWidth / (this.leaves.length + 1)\n }\n\n // The leaf event's width is determined by its row's width\n return this.row._width\n }", "function tp_sum_width_at_height(layers, max, height) {\n\tif (null == height) return tp_sum_width(layers, max);\n\n\tvar total_width = 0;\n\tvar s;\n\tfor (var i = 0; i < layers.length; i++) {\n\t\tif (null != max && i == max) break;\n\t\ts = height / (layers[i].bounds[3].value - layers[i].bounds[1].value);\n\t\ttotal_width += s * (layers[i].bounds[2].value - layers[i].bounds[0].value);\n\t}\n\n\treturn total_width;\n}", "get depth() {}", "function getHeight(root) {}", "function levelWidth(root) {\n let widthArr = [0];\n let nodeArr = [root, \"STOP\"];\n while(nodeArr.length > 1) {\n let curr = nodeArr.shift();\n if(curr === \"STOP\") {\n widthArr.push(0);\n nodeArr.push(\"STOP\"); \n }\n else {\n widthArr[widthArr.length-1] = widthArr[widthArr.length-1] +1 ;\n nodeArr.push(...curr.children); \n }\n }\n return widthArr;\n}", "function calcVolume (width, height, depth) {\n return width * height * depth;\n}", "static widthPercent( percent )\n\t{\n\t\treturn percent / 100 * window.width;\n\t}", "getClosestBiggerLevel(width) {\n let me = this,\n levels = Object.keys(me.responsiveLevels),\n useLevel = null,\n minDelta = 99995,\n biggestLevel = null;\n levels.forEach(level => {\n let levelSize = me.responsiveLevels[level]; // responsiveLevels can contains config objects, in which case we should use width from it\n\n if (!['number', 'string'].includes(typeof levelSize)) {\n levelSize = levelSize.levelWidth;\n }\n\n if (levelSize === '*') {\n biggestLevel = level;\n } else if (width < levelSize) {\n const delta = levelSize - width;\n\n if (delta < minDelta) {\n minDelta = delta;\n useLevel = level;\n }\n }\n });\n return useLevel || biggestLevel;\n }", "function getDepth(mag) {\n return (mag/10) \n }", "function diameterOfBinaryTree(root) {\n let longest = 0\n getHeight(root)\n return longest\n\n function getHeight(root) {\n if (root) {\n let left = getHeight(root.left)\n let right = getHeight(root.right)\n longest = Math.max(longest, left + right) \n return Math.max(left, right) + 1\n } else {return 0}\n }\n\n}", "function roofVolume(depth, sweep, width){\n return triangleArea(depth, sweep, sweep)*width;\n}", "function findWidth() {\n if (noteStack == \"stack_bar_top\") {\n return \"100%\";\n }\n if (noteStack == \"stack_bar_bottom\") {\n return \"70%\";\n } else {\n return \"290px\";\n }\n }", "getPictureWidth() {\n const mwm = (this.camera.MatrixWidth / 10000); /* Matrix Width in meters */\n const { altitude } = this.mission;\n const fm = (this.camera.Focal / 10000); /* focal in meters */\n return ((mwm * altitude) / fm).toFixed(2);\n }", "function computeDepth(x) {\n\tvar range1 = \"0123456789\";\n\tvar range2 = \"\";\n\tvar depth = 0;\n\tvar currentX;\n\n\twhile (range2.length < range1.length) {\n\t\tdepth++;\n\t\tcurrentX = (x * depth).toString().split(\"\");\n\n\t\tfor (i = 0; i < currentX.length; i++) {\n\t\t\tif (range2.indexOf(currentX[i]) == -1) {\n\t\t\t\trange2 += currentX[i];\n\t\t\t}\n\t\t}\n\t}\n\treturn depth;\n}", "function calculateArea(width, heigth, depth) {\n\tvar area = width * heigth;\n\tvar volume = width * heigth * depth;\n\tvar sizes = [area, volume];\n\treturn sizes;\n}", "function heightoftree(tree) {\n if (tree.left && tree.right)\n return Math.max(heightoftree(tree.left), heightoftree(tree.right)) + 1;\n if (tree.left) return heightoftree(tree.left) + 1;\n if (tree.right) return heightoftree(tree.right) + 1;\n return 1;\n}", "function find_height(root) \n{\n let result = dfs(root);\n return result;\n}", "function getControlRatio( depth ) {\n\t\t\t\n\t\t\tif ( depth > 5 ) {\n\t\t\t\t\n\t\t\t\treturn 1;\n\t\t\t\t\n\t\t\t} else if ( depth >= 3 && depth < 5 ) {\n\t\t\t\t\n\t\t\t\treturn 1.5;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\treturn 2;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "getClosestBiggerLevel(width) {\n let me = this,\n levels = Object.keys(me.responsiveLevels),\n useLevel = null,\n minDelta = 99995,\n biggestLevel = null;\n\n levels.forEach((level) => {\n let levelSize = me.responsiveLevels[level];\n\n // responsiveLevels can contains config objects, in which case we should use width from it\n if (!['number', 'string'].includes(typeof levelSize)) {\n levelSize = levelSize.levelWidth;\n }\n\n if (levelSize === '*') {\n biggestLevel = level;\n } else if (width < levelSize) {\n const delta = levelSize - width;\n if (delta < minDelta) {\n minDelta = delta;\n useLevel = level;\n }\n }\n });\n\n return useLevel || biggestLevel;\n }", "function getDegreeWidthOfWidthAtLat(latWidth, lat){\n return latWidth/getMeterWidthAtLat(1, lat);\n}", "function heightOf(tree, count=0){\n if (!tree){\n return count;\n } else {\n count++;\n }\n return Math.max(\n heightOf(tree.left, count),\n heightOf(tree.right, count)\n );\n}", "getLevelWidth() {\n return this.level.tilesWide;\n }", "function calculateThresholdInPx () {\n if (thresholdUnit === '%') {\n var nodeDimension;\n if (axis === 'x') {\n nodeDimension = parseInt(getComputedStyle(node).width, 10);\n } else {\n nodeDimension = parseInt(getComputedStyle(node).height, 10);\n }\n threshold = nodeDimension * (thresholdInPercent/100);\n }\n }", "function getWidth() {\n return Math.round(obj.width * scale);\n }", "get width()\n\t{\n\t\tlet width = Math.max(this._width, this.minWidth);\n\n\t\tif (this.tree.theme.hasGridBehavior)\n\t\t{\n\t\t\tlet step = this.tree.theme.gridSize;\n\t\t\twidth = Math.ceil(width / step) * step;\n\t\t}\n\n\t\treturn width;\n\t}", "function getGraphWidth() {\n\t\treturn width - xOffset * 2;\n\t}", "maxDepth () {\n\t\tif (this.root === null) return 0;\n\n\t\tconst longest = (node) => {\n\t\t\tif (node.left === null && node.right === null) return 1;\n\t\t\tif (node.left === null) return longest(node.right) + 1;\n\t\t\tif (node.right === null) return longest(node.left) + 1;\n\t\t\treturn Math.max(longest(node.left), longest(node.right)) + 1;\n\t\t};\n\n\t\treturn longest(this.root);\n\t}", "function tp_min_width(layers)\n{\n\tvar min_width = Number.MAX_VALUE;\n\tfor (var i = 0; i < layers.length; i++)\n\t\tmin_width = Math.min(min_width, layers[i].bounds[2].value - layers[i].bounds[0].value);\n\n\treturn min_width;\n}", "get Depth() {}", "function tp_sum_height_at_width(layers, max, width) {\n\tif (null == width) return tp_sum_height(layers, max);\n\n\tvar total_height = 0;\n\tvar s;\n\tfor (var i = 0; i < layers.length; i++) {\n\t\tif (null != max && i == max) break;\n\t\ts = width / (layers[i].bounds[2].value - layers[i].bounds[0].value);\n\t\ttotal_height += s * (layers[i].bounds[3].value - layers[i].bounds[1].value);\n\t}\n\n\treturn total_height;\n}", "getWidth (data, maxTally) {\n const deviceWidth = Dimensions.get('window').width;\n const maxWidth = deviceWidth / 4;\n const multFactor = maxWidth / maxTally;\n\n let width = {};\n\n if (data === 0) {\n width = 0.1;\n } else {\n width = data * multFactor;\n }\n\n return width;\n }", "function levelFor(n) {\n return Math.floor((-4 + Math.sqrt(16 + 16*n)) / 8);\n}", "calculateMinWidth() {\n const me = this,\n width = me.measureSize(me.width),\n minWidth = me.measureSize(me.minWidth);\n let minChildWidth = 0;\n\n if (me.children) {\n minChildWidth = me.children.reduce((result, column) => {\n return result + column.calculateMinWidth();\n }, 0);\n }\n\n return Math.max(width, minWidth, minChildWidth);\n }", "calculateMinWidth() {\n const me = this,\n width = me.measureSize(me.width),\n minWidth = me.measureSize(me.minWidth);\n\n let minChildWidth = 0;\n\n if (me.children) {\n minChildWidth = me.children.reduce((result, column) => {\n return result + column.calculateMinWidth();\n }, 0);\n }\n\n return Math.max(width, minWidth, minChildWidth);\n }", "function _calc() {\n var winW = $w.width() < $t.width() ? $t.width() : $w.width();\n var realW = winW - 2 * cfg.navWidth - cfg.perNumber;\n var itemW = Math.floor(realW / cfg.perNumber);\n return itemW;\n }", "function worst(row,rowFixedLength,ratio){var areaMax=0;var areaMin=Infinity;for(var i=0,area,len=row.length;i < len;i++) {area = row[i].getLayout().area;if(area){area < areaMin && (areaMin = area);area > areaMax && (areaMax = area);}}var squareArea=row.area * row.area;var f=rowFixedLength * rowFixedLength * ratio;return squareArea?mathMax(f * areaMax / squareArea,squareArea / (f * areaMin)):Infinity;}", "function solution(A, X) {\n // write your code in JavaScript (Node.js 8.9.4)\n let counts = {};\n let lengths = [];\n let output = 0;\n A.forEach(num => {\n counts[num] = counts[num] ? ++counts[num] : 1;\n });\n\n Object.keys(counts).forEach(num => {\n if (counts[num] <= 1) delete counts[num];\n else lengths.push(num);\n });\n\n lengths.sort((a, b) => b - a);\n\n lengths.forEach((len, idx) => {\n if (len < X ** 0.5) return;\n if (counts[len] >= 4) output++;\n let lastWidthIdx = findLastWidth(lengths, idx, X / lengths[idx]);\n for (let i = idx + 1; i < lengths.length; i++) {\n if (len * lengths[i] >= X) output++;\n else break;\n }\n });\n\n return output;\n}", "function heightOfTree(root) {\n let depth = 0;\n\n const dfs = (node, levels) => {\n if (!node) return 0;\n if (levels > depth) depth = levels;\n for (let child of node.children) {\n dfs(child, levels + 1)\n }\n\n return levels;\n }\n\n dfs(root, 0)\n return depth;\n}", "get width() {\n const noOverlap = this._width\n const overlap = Math.min(100, this._width * 1.7)\n\n // Containers can always grow.\n if (this.rows) {\n return overlap\n }\n\n // Rows can grow if they have leaves.\n if (this.leaves) {\n return this.leaves.length > 0 ? overlap : noOverlap\n }\n\n // Leaves can grow unless they're the last item in a row.\n const { leaves } = this.row\n const index = leaves.indexOf(this)\n return index === leaves.length - 1 ? noOverlap : overlap\n }", "function computeLaneSize(lane) {\n // assert(lane instanceof go.Group && lane.category !== \"Pool\");\n const sz = computeMinLaneSize(lane);\n if (lane.isSubGraphExpanded) {\n const holder = lane.placeholder;\n if (holder !== null) {\n const hsz = holder.actualBounds;\n sz.width = Math.max(sz.width, hsz.width);\n }\n }\n // minimum breadth needs to be big enough to hold the header\n const hdr = lane.findObject('HEADER');\n if (hdr !== null) sz.width = Math.max(sz.width, hdr.actualBounds.width);\n return sz;\n}", "function xValFromPct(percent) {\n return percent * canvas.width / 100;\n}", "reportTreeDensity() {\n const density = (this.numTrees / this.area).toFixed(2);\n console.log(`${this.name} has a tree density of ${density} trees per square kilometer.`);\n }", "function scaleLength(d) {\n var max = 20.\n var min = 0.\n var delta = (max - min)\n var x = ((d - min)/delta)*100\n\n return x ;\n}", "function screenwidth(perc, preferredwidth)\r\n\r\n{\r\n\r\n av = $(window).width();\r\n\r\n perc = \".\" + perc;\r\n\r\n pix = av * perc;\r\n\r\n if (preferredwidth)\r\n\r\n {\r\n\r\n if ((av - 50) > preferredwidth)\r\n\r\n {\r\n\r\n return preferredwidth;\r\n\r\n }\r\n\r\n }\r\n\r\n if (pix < 350)\r\n\r\n return 350;\r\n\r\n else\r\n\r\n return (pix); //returns of number of pixels\r\n\r\n}", "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n let maxH = 0;\n let minH = 0;\n let maxDepth = 0; \n \n for (let i=0; i<A.length; i++) {\n let diff = 0; \n \n if (A[i] > maxH) {\n diff = maxH - minH;\n maxH = A[i];\n minH = A[i];\n } else if (A[i] < minH) {\n minH = A[i];\n } else {\n diff = A[i] - minH; \n }\n \n maxDepth = Math.max(diff, maxDepth);\n // console.log(`i:${i} A[i]:${A[i]} maxDepth:${maxDepth} diff:${diff} minH:${minH} maxH:${maxH}`);\n }\n \n return maxDepth;\n}", "function calculateTotalNodes(breath, depth) {\n return ((Math.pow(breath, depth+1)-1) / (breath-1));\n}", "apportion(node, level) {\n let firstChild = node.firstChild();\n let firstChildLeftNeighbor = firstChild.leftNeighbor();\n let compareDepth = 1;\n const depthToStop = this.cfg.maxDepth - level;\n\n while (firstChild && firstChildLeftNeighbor && compareDepth <= depthToStop) {\n // calculate the position of the firstChild, according to the position of firstChildLeftNeighbor\n\n let modifierSumRight = 0;\n let modifierSumLeft = 0;\n let leftAncestor = firstChildLeftNeighbor;\n let rightAncestor = firstChild;\n\n for (let i = 0; i < compareDepth; i += 1) {\n leftAncestor = leftAncestor.parent();\n rightAncestor = rightAncestor.parent();\n modifierSumLeft += leftAncestor.modifier;\n modifierSumRight += rightAncestor.modifier;\n\n // all the stacked children are oriented towards right so use right variables\n if (rightAncestor.stackParent !== undefined) {\n modifierSumRight += rightAncestor.size() / 2;\n }\n }\n\n // find the gap between two trees and apply it to subTrees\n // and matching smaller gaps to smaller subtrees\n\n let totalGap =\n firstChildLeftNeighbor.prelim +\n modifierSumLeft +\n firstChildLeftNeighbor.size() +\n this.cfg.subTeeSeparation -\n (firstChild.prelim + modifierSumRight);\n\n if (totalGap > 0) {\n let subtreeAux = node;\n let numSubtrees = 0;\n\n // count all the subtrees in the LeftSibling\n while (subtreeAux && subtreeAux.id !== leftAncestor.id) {\n subtreeAux = subtreeAux.leftSibling();\n numSubtrees += 1;\n }\n\n if (subtreeAux) {\n let subtreeMoveAux = node;\n const singleGap = totalGap / numSubtrees;\n\n while (subtreeMoveAux.id !== leftAncestor.id) {\n subtreeMoveAux.prelim += totalGap;\n subtreeMoveAux.modifier += totalGap;\n\n totalGap -= singleGap;\n subtreeMoveAux = subtreeMoveAux.leftSibling();\n }\n }\n }\n\n compareDepth += 1;\n\n firstChild =\n firstChild.childrenCount() === 0\n ? node.leftMost(0, compareDepth)\n : (firstChild = firstChild.firstChild());\n\n if (firstChild) {\n firstChildLeftNeighbor = firstChild.leftNeighbor();\n }\n }\n }", "function getDimensionWeight() {\n\tvar dimensionWeight;\n\tdimensionWeight = (getWidth() * getHeight() * THICKNESS_CM) / DIMENSION_WEIGHT_CONVERT;\n\treturn dimensionWeight.toFixed(2);\n}", "minDepth() {\n if (!this.root) {\n return 0;\n }\n const solver = (node) => {\n if (node.left === null && node.right === null) {\n return 1;\n }\n if (node.left === null) {\n return solver(node.right) + 1;\n }\n if (node.right === null) {\n return solver(node.left) + 1;\n }\n return Math.min(solver(node.left), solver(node.right)) + 1;\n };\n return solver(this.root);\n }", "function determineDx(elem, size) {\n var oldWidth = elem.offsetWidth;\n var windowWidth = document.querySelector('#randomPizzas').offsetWidth;\n var oldSize = oldWidth / windowWidth;\n var newSize = sizeSwitcher(size);\n var dx = (newSize - oldSize) * windowWidth;\n return dx;\n}", "get maxWidth() {}", "function getOddWidth(yMax){\n return 1 + 2 * yMax; // central cell + 2 * (number of rows above 0)\n }", "function area(length, width) {\n console.log(length * width);\n}", "function livingVolume(height,width,depth){\n return height*width*depth; \n}", "function calculateZoomLevel(node) {\n //Find an optimal zoom level in terms of how big the node will get\n //But the zoom level cannot be bigger than the max zoom\n return Math.min(max_zoom, Math.min(width * 0.4, height * 0.4) / (2 * node.r_fixed));\n } //function calculateZoomLevel", "function calculateZoomLevel(node) {\n //Find an optimal zoom level in terms of how big the node will get\n //But the zoom level cannot be bigger than the max zoom\n return Math.min(max_zoom, Math.min(width * 0.4, height * 0.4) / (2 * node.r_fixed));\n } //function calculateZoomLevel", "function h(t){return t.width/t.resolution}", "maxDepth() {\n if (!this.root) {\n return 0;\n }\n\n const solver = (node) => {\n if (node.left === null && node.right === null) {\n return 1;\n }\n if (node.left === null) {\n return solver(node.right) + 1;\n }\n if (node.right === null) {\n return solver(node.left) + 1;\n }\n return Math.max(solver(node.left), solver(node.right)) + 1;\n };\n return solver(this.root);\n }", "function DLSCount(limit, node, parent) { // node = current node, parent = previous node\n // visualize {\n tracer.visit(node, parent);\n Tracer.delay();\n // }\n let child = 0;\n if (limit > 0) { // cut off the search\n for (let i = 0; i < G[node].length; i++) {\n if (G[node][i]) { // if current node has the i-th node as a child\n child += 1 + DLSCount(limit - 1, i, node); // recursively call DLS\n }\n }\n return child;\n }\n return child;\n}", "function calcHealthBarWidth(currTurn, playerNumber){\n if(currTurn == null){\n return HEALTH_BAR_MAX_WIDTH;\n }\n var characterArray = convertTurnToPlayerArray(currTurn);\n var currHealth = characterArray[playerNumber].Attributes.Health;\n var maxHealth = statScreen.MultiPlayer[playerNumber].InitialValue.Health;\n var width = Math.floor((currHealth*HEALTH_BAR_MAX_WIDTH)/maxHealth);\n return width;\n}", "function maxLevel(node,height=0){\n\tvar sum=0;\n\tif('children' in node) {\n\t\tfor(var i=0,tot=node.children.length;i<tot;i++){\n\t\t\tsum = sum+maxLevel(node.children[i],height)\n\t\t}\n\t\tsum=sum+height;\n\t}\n\treturn sum+height;\n}", "function PlanMaxDepth(plan_array){\n var a = 0;\n var max_dp = 1.0;\n for(j = 0 ; j < (plan_array.length/3) ; j++){\n if(plan_array[a+1]*1.0 > max_dp){\n max_dp = plan_array[a+1]*1.0;\n }\n a = a + 3;\n }\n return max_dp;\n}", "function computeNodeBreadths(root) {\n // Tree depth is fixed at 4 for SS\n ky = height / 4.2;\n root.nodes.forEach(function(node) {\n node.fixed_y = node.fixed_level ? node.fixed_level+.2 : node.fixed_level;\n\t node.fixed_y *= ky;\n\t });\n }", "function getStroke(diameter){return $mdProgressCircular.strokeWidth/100*diameter;}", "function W(){var t=l.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?t.width||l[e]:t.height||l[e]}", "calcBarWidth(max_bars)\n{\n return this.plotWidth/(max_bars*1.5);\n}", "function getEvenWidth(yMax){\n return 2 * (yMax + 1); // 2 * (number of rows including 0)\n }", "function computeDepth (x){\n let digits = [];\n let multiplier = 1;\n let ctr = 0;\n \n while(digits.length != 10){\n let value = x * multiplier;\n value.toString().split('').map(val => {\n if(!digits.includes(parseInt(val))){\n digits.push(parseInt(val));\n };\n });\n ctr++;\n multiplier++;\n };\n \n return ctr;\n}", "function getBranchChance(depth) {\r\n if (depth == 0) {\r\n return 1;\r\n }\r\n if (depth == 1) {\r\n return 1;\r\n }\r\n if (depth == 2) {\r\n return 1;\r\n }\r\n if (depth == 3) {\r\n return 0.8;\r\n }\r\n if (depth == 4) {\r\n return 0.8;\r\n }\r\n return 7/12;\r\n // if (depth == 5) {\r\n // return 0.7;\r\n // }\r\n // return 0.5;\r\n // if (depth == 6) {\r\n // return 0.2;\r\n // }\r\n // if (depth == 7) {\r\n // return 0.7;\r\n // }\r\n // if (depth == 8) {\r\n // return 0.2;\r\n // }\r\n // if (depth == 9) {\r\n // return 0.7;\r\n // }\r\n // if (depth == 10) {\r\n // return 0.7;\r\n // }\r\n // if (depth == 11) {\r\n // return 0.7;\r\n // }\r\n // return 0.50\r\n\r\n // Quadratic so we get more branches at low depth and high depth, fewer at middle depth\r\n // return 1/8 * (depth/(2 * MIN_BRANCH_DEPTH) - 1/2) ** 2 + 13/24;\r\n \r\n}", "getWidth() {\n return this._rows\n .map((row) => row.getWidth())\n .reduce((x, y) => Math.max(x, y), 0);\n }", "function computeMaxLine(level,maxHeightLine,numLine){\n return maxHeightLine/level * numLine;\n}", "function _depth() { \n\t\t\t\t\treturn Math.max( Math.min( _pointA.z, _pointB.z ), 0.0001 ); \n\t\t\t\t}", "function calcWidth(maxX) {\n // icons are 16pixels wide. 20 for graphic border.\n // Extra 22 is for window border (required).\n return (maxX+1)*16+20 +22 +8; }", "function slack(g,e){return g.node(e.w).rank-g.node(e.v).rank-g.edge(e).minlen}", "function fractionalBarWidth (fraction) {\n\n return function (pixelValues) {\n // return some default value if there are not enough datapoints to compute the width\n if (pixelValues.length <= 1) {\n return 10;\n }\n\n pixelValues.sort();\n\n // compute the distance between neighbouring items\n var neighbourDistances = d3.pairs(pixelValues).map(function (tuple) {\n return Math.abs(tuple[0] - tuple[1]);\n });\n\n var minDistance = d3.min(neighbourDistances);\n return fraction * minDistance;\n };\n }" ]
[ "0.68355453", "0.6271827", "0.62336767", "0.62298626", "0.61889863", "0.61743605", "0.6165617", "0.6149438", "0.6068723", "0.60285175", "0.5944012", "0.5940338", "0.5899395", "0.58972335", "0.58900857", "0.5862145", "0.5849093", "0.5821635", "0.5788713", "0.5764281", "0.57599914", "0.574301", "0.5728548", "0.57272017", "0.5706954", "0.5697949", "0.56836885", "0.5663874", "0.5661773", "0.56564385", "0.56507134", "0.56480247", "0.56341386", "0.56300384", "0.56235176", "0.56099486", "0.56075215", "0.5604145", "0.5593519", "0.55859995", "0.5583295", "0.5577672", "0.5570166", "0.55592567", "0.5548923", "0.5546188", "0.5531558", "0.55272514", "0.5489239", "0.54678136", "0.54530185", "0.54314333", "0.54313713", "0.54207116", "0.5412428", "0.5405299", "0.5398583", "0.53811437", "0.5367946", "0.53645384", "0.5349142", "0.53489333", "0.5339046", "0.5329449", "0.5328045", "0.53217065", "0.53102976", "0.53058404", "0.5305557", "0.53035694", "0.53032786", "0.530262", "0.52982", "0.52978814", "0.5294651", "0.52803755", "0.5276193", "0.52729136", "0.52695215", "0.52632284", "0.52632284", "0.5261766", "0.5261479", "0.5255738", "0.52547693", "0.5252422", "0.52484035", "0.5247367", "0.5245537", "0.5242037", "0.5238611", "0.5237758", "0.52340424", "0.5230583", "0.5228858", "0.52286714", "0.5226643", "0.52237743", "0.5220529", "0.5219373" ]
0.64102584
1
calculates the area enclosed by a set of points
function area(border) { // calculate area var area = 0; for (var i = 0; i < border.length; i++){ if (i < border.length-1){ area += (border[i][0]*border[i+1][1]) - (border[i+1][0]*border[i][1]); } else{ area += (border[i][0]*border[0][1]) - (border[0][0]*border[i][1]); } } area /= 2; return Math.abs(area); // counterclockwise arrangement leads to negative values }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getArea(points) {\n var area = 0;\n var lengthPoints = points.length;\n var j = lengthPoints - 1;\n var p1;var p2;\n for (var i = 0; i < lengthPoints; j = i++) {\n p1 = points[i];p2 = points[j];\n area += p1.x * p2.y;\n area -= p1.y * p2.x;\n }\n area /= 2;\n return area;\n}", "areaOfSelection(points) {\n\t\tconst paths = points.map(p => ({ X: p.x, Y: p.y }))\n\t\t// NOTE: clipper will sometimes return 0 area for self intersecting paths, this is fine because they'll fail validation regardless\n\t\treturn ClipperLib.JS.AreaOfPolygon(paths);\n\t}", "function area(x1, y1, x2, y2, x3, y3) {\n return Math.abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2.0);\n}", "function area() {\n var area = 0;\n area += (p1.x + p3.x) * (p3.y - p1.y);\n area += (p2.x + p1.x) * (p1.y - p2.y);\n area += (p3.x + p2.x) * (p2.y - p3.y);\n return area / 2;\n }", "function calculateArea(){\n // get all points\n pointObjects = [];\n for(var i=0; i<4; i++){\n pointObjects[i] = stage.getChildByName(\"corner\"+i);\n points[i] = new createjs.Point(pointObjects[i].x, pointObjects[i].y);\n }\n\n // pythagoras to get height\n heightX = Math.abs(points[0].x - points[3].x);\n heightY = Math.abs(points[0].y - points[3].y);\n height = Math.sqrt(Math.pow(heightX, 2) + Math.pow(heightY, 2));\n\n // pythagoras to get width\n widthX = Math.abs(points[2].x - points[3].x);\n widthY = Math.abs(points[2].y - points[3].y);\n width = Math.sqrt(Math.pow(widthX, 2) + Math.pow(widthY, 2));\n\n return Math.round(width * height);\n}", "function calculateArea (vertices){\n\n if (vertices.length < 3) return 0; //can't find the area of nothin'!\n\n var n = vertices.length, area = 0;;\n\n vertices.push(vertices[0]); //close the polygon\n\n for (var i = 1, j = 2, k = 0; i < n; i++, j++, k++){\n area += vertices[i].x * (vertices[j].y - vertices[k].y);\n }\n\n area += vertices[n].x * (vertices[1].y - vertices[n-1].y); //once more\n\n return Math.abs(area/2);\n\n}", "calculateArea(vectors) {\n let newVecs = [];\n for (let v of vectors) {\n newVecs.push(v);\n }\n newVecs.push(vectors[0]);\n let areaSum = 0;\n for (let i = 0; i < newVecs.length - 1; i++) {\n areaSum += (newVecs[i + 1].x + newVecs[i].x) * (newVecs[i + 1].y - newVecs[i].y);\n }\n areaSum /= 2;\n return abs(areaSum);\n }", "function Area(a, b, c) {\n return a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y);\n }", "function area(a, b, c) {\n return (b.x - a.x) * (c.y - a.y) - (c.x - a.x) * (b.y - a.y);\n}", "function area(a, b, c){ \n\tvar s = (a + b + c) / 2;\n\treturn Math.sqrt(s * (s-a) * (s-b) * (s-c));\n}", "function polyArea(points){\n var p1,p2;\n for(var area=0,len=points.length,i=0;i<len;++i){\n p1 = points[i];\n p2 = points[(i-1+len)%len]; // Previous point, with wraparound\n area += (p2.x+p1.x) * (p2.y-p1.y);\n }\n return Math.abs(area/2);\n }", "function ringArea(points)\n{\n\tconst numPoints = points.length;\n\n\tif (numPoints < 3) return 0;\n\n\tconst R = earthRadius;\n\tlet p1 = points[numPoints - 2];\n\tlet p2 = points[numPoints - 1];\n\tlet p3 = points[0];\n\tlet area = 0;\n\n\tfor (let i = p2[0] === p3[0] && p2[1] === p3[1] ? 1 : 0; i < numPoints; i += 1)\n\t{\n\t\tp3 = points[i];\n\t\tarea += (p3[0] - p1[0]) * Math.sin(p2[1] * Math.PI/180);\n\t\tp1 = p2;\n\t\tp2 = p3;\n\t}\n\treturn area * Math.PI/180 * R*R/2;\n}", "function getAreaPoints() {\n funcionPoints.map(function (point) {\n if (point.y > 0) {\n y_to = point.y > y_to ? point.y : y_to;\n } else {\n y_from = point.y < y_from ? point.y : y_from;\n }\n });\n\n areaPoints.push({ x: x_from, y: y_from });\n areaPoints.push({ x: x_to, y: y_from });\n areaPoints.push({ x: x_to, y: y_to });\n areaPoints.push({ x: x_from, y: y_to });\n areaPoints.push({ x: x_from, y: y_from });\n }", "function polygonArea(vertices){\n var a = 0;\n\n for (var i = 0, l = vertices.length; i < l; i++) {\n var v0 = vertices[i],\n v1 = vertices[i === l - 1 ? 0 : i + 1];\n\n a += v0[0] * v1[1];\n a -= v1[0] * v0[1];\n }\n\n return Math.abs(a / 2);\n }", "function intersectionArea(circles, stats) {\n\t // get all the intersection points of the circles\n\t var intersectionPoints = getIntersectionPoints(circles); // filter out points that aren't included in all the circles\n\n\t var innerPoints = intersectionPoints.filter(function (p) {\n\t return containedInCircles(p, circles);\n\t });\n\t var arcArea = 0,\n\t polygonArea = 0,\n\t arcs = [],\n\t i; // if we have intersection points that are within all the circles,\n\t // then figure out the area contained by them\n\n\t if (innerPoints.length > 1) {\n\t // sort the points by angle from the center of the polygon, which lets\n\t // us just iterate over points to get the edges\n\t var center = getCenter(innerPoints);\n\n\t for (i = 0; i < innerPoints.length; ++i) {\n\t var p = innerPoints[i];\n\t p.angle = Math.atan2(p.x - center.x, p.y - center.y);\n\t }\n\n\t innerPoints.sort(function (a, b) {\n\t return b.angle - a.angle;\n\t }); // iterate over all points, get arc between the points\n\t // and update the areas\n\n\t var p2 = innerPoints[innerPoints.length - 1];\n\n\t for (i = 0; i < innerPoints.length; ++i) {\n\t var p1 = innerPoints[i]; // polygon area updates easily ...\n\n\t polygonArea += (p2.x + p1.x) * (p1.y - p2.y); // updating the arc area is a little more involved\n\n\t var midPoint = {\n\t x: (p1.x + p2.x) / 2,\n\t y: (p1.y + p2.y) / 2\n\t },\n\t arc = null;\n\n\t for (var j = 0; j < p1.parentIndex.length; ++j) {\n\t if (p2.parentIndex.indexOf(p1.parentIndex[j]) > -1) {\n\t // figure out the angle halfway between the two points\n\t // on the current circle\n\t var circle = circles[p1.parentIndex[j]],\n\t a1 = Math.atan2(p1.x - circle.x, p1.y - circle.y),\n\t a2 = Math.atan2(p2.x - circle.x, p2.y - circle.y);\n\t var angleDiff = a2 - a1;\n\n\t if (angleDiff < 0) {\n\t angleDiff += 2 * Math.PI;\n\t } // and use that angle to figure out the width of the\n\t // arc\n\n\n\t var a = a2 - angleDiff / 2,\n\t width = distance(midPoint, {\n\t x: circle.x + circle.radius * Math.sin(a),\n\t y: circle.y + circle.radius * Math.cos(a)\n\t }); // clamp the width to the largest is can actually be\n\t // (sometimes slightly overflows because of FP errors)\n\n\t if (width > circle.radius * 2) {\n\t width = circle.radius * 2;\n\t } // pick the circle whose arc has the smallest width\n\n\n\t if (arc === null || arc.width > width) {\n\t arc = {\n\t circle: circle,\n\t width: width,\n\t p1: p1,\n\t p2: p2\n\t };\n\t }\n\t }\n\t }\n\n\t if (arc !== null) {\n\t arcs.push(arc);\n\t arcArea += circleArea(arc.circle.radius, arc.width);\n\t p2 = p1;\n\t }\n\t }\n\t } else {\n\t // no intersection points, is either disjoint - or is completely\n\t // overlapped. figure out which by examining the smallest circle\n\t var smallest = circles[0];\n\n\t for (i = 1; i < circles.length; ++i) {\n\t if (circles[i].radius < smallest.radius) {\n\t smallest = circles[i];\n\t }\n\t } // make sure the smallest circle is completely contained in all\n\t // the other circles\n\n\n\t var disjoint = false;\n\n\t for (i = 0; i < circles.length; ++i) {\n\t if (distance(circles[i], smallest) > Math.abs(smallest.radius - circles[i].radius)) {\n\t disjoint = true;\n\t break;\n\t }\n\t }\n\n\t if (disjoint) {\n\t arcArea = polygonArea = 0;\n\t } else {\n\t arcArea = smallest.radius * smallest.radius * Math.PI;\n\t arcs.push({\n\t circle: smallest,\n\t p1: {\n\t x: smallest.x,\n\t y: smallest.y + smallest.radius\n\t },\n\t p2: {\n\t x: smallest.x - SMALL,\n\t y: smallest.y + smallest.radius\n\t },\n\t width: smallest.radius * 2\n\t });\n\t }\n\t }\n\n\t polygonArea /= 2;\n\n\t if (stats) {\n\t stats.area = arcArea + polygonArea;\n\t stats.arcArea = arcArea;\n\t stats.polygonArea = polygonArea;\n\t stats.arcs = arcs;\n\t stats.innerPoints = innerPoints;\n\t stats.intersectionPoints = intersectionPoints;\n\t }\n\n\t return arcArea + polygonArea;\n\t}", "function calcSize(points) {\n var area = 0,\n dist = 0;\n\n for (var i = 0, a, b; i < points.length - 1; i++) {\n a = b || points[i];\n b = points[i + 1];\n\n area += a[0] * b[1] - b[0] * a[1];\n\n // use Manhattan distance instead of Euclidian one to avoid expensive square root computation\n dist += Math.abs(b[0] - a[0]) + Math.abs(b[1] - a[1]);\n }\n points.area = Math.abs(area / 2);\n points.dist = dist;\n}", "function calcSize(points) {\n var area = 0,\n dist = 0;\n\n for (var i = 0, a, b; i < points.length - 1; i++) {\n a = b || points[i];\n b = points[i + 1];\n\n area += a[0] * b[1] - b[0] * a[1];\n\n // use Manhattan distance instead of Euclidian one to avoid expensive square root computation\n dist += Math.abs(b[0] - a[0]) + Math.abs(b[1] - a[1]);\n }\n points.area = Math.abs(area / 2);\n points.dist = dist;\n}", "function intersectionArea(circles, stats) {\n // get all the intersection points of the circles\n var intersectionPoints = getIntersectionPoints(circles); // filter out points that aren't included in all the circles\n\n var innerPoints = intersectionPoints.filter(function (p) {\n return containedInCircles(p, circles);\n });\n var arcArea = 0,\n polygonArea = 0,\n arcs = [],\n i; // if we have intersection points that are within all the circles,\n // then figure out the area contained by them\n\n if (innerPoints.length > 1) {\n // sort the points by angle from the center of the polygon, which lets\n // us just iterate over points to get the edges\n var center = getCenter(innerPoints);\n\n for (i = 0; i < innerPoints.length; ++i) {\n var p = innerPoints[i];\n p.angle = Math.atan2(p.x - center.x, p.y - center.y);\n }\n\n innerPoints.sort(function (a, b) {\n return b.angle - a.angle;\n }); // iterate over all points, get arc between the points\n // and update the areas\n\n var p2 = innerPoints[innerPoints.length - 1];\n\n for (i = 0; i < innerPoints.length; ++i) {\n var p1 = innerPoints[i]; // polygon area updates easily ...\n\n polygonArea += (p2.x + p1.x) * (p1.y - p2.y); // updating the arc area is a little more involved\n\n var midPoint = {\n x: (p1.x + p2.x) / 2,\n y: (p1.y + p2.y) / 2\n },\n arc = null;\n\n for (var j = 0; j < p1.parentIndex.length; ++j) {\n if (p2.parentIndex.indexOf(p1.parentIndex[j]) > -1) {\n // figure out the angle halfway between the two points\n // on the current circle\n var circle = circles[p1.parentIndex[j]],\n a1 = Math.atan2(p1.x - circle.x, p1.y - circle.y),\n a2 = Math.atan2(p2.x - circle.x, p2.y - circle.y);\n var angleDiff = a2 - a1;\n\n if (angleDiff < 0) {\n angleDiff += 2 * Math.PI;\n } // and use that angle to figure out the width of the\n // arc\n\n\n var a = a2 - angleDiff / 2,\n width = distance(midPoint, {\n x: circle.x + circle.radius * Math.sin(a),\n y: circle.y + circle.radius * Math.cos(a)\n }); // clamp the width to the largest is can actually be\n // (sometimes slightly overflows because of FP errors)\n\n if (width > circle.radius * 2) {\n width = circle.radius * 2;\n } // pick the circle whose arc has the smallest width\n\n\n if (arc === null || arc.width > width) {\n arc = {\n circle: circle,\n width: width,\n p1: p1,\n p2: p2\n };\n }\n }\n }\n\n if (arc !== null) {\n arcs.push(arc);\n arcArea += circleArea(arc.circle.radius, arc.width);\n p2 = p1;\n }\n }\n } else {\n // no intersection points, is either disjoint - or is completely\n // overlapped. figure out which by examining the smallest circle\n var smallest = circles[0];\n\n for (i = 1; i < circles.length; ++i) {\n if (circles[i].radius < smallest.radius) {\n smallest = circles[i];\n }\n } // make sure the smallest circle is completely contained in all\n // the other circles\n\n\n var disjoint = false;\n\n for (i = 0; i < circles.length; ++i) {\n if (distance(circles[i], smallest) > Math.abs(smallest.radius - circles[i].radius)) {\n disjoint = true;\n break;\n }\n }\n\n if (disjoint) {\n arcArea = polygonArea = 0;\n } else {\n arcArea = smallest.radius * smallest.radius * Math.PI;\n arcs.push({\n circle: smallest,\n p1: {\n x: smallest.x,\n y: smallest.y + smallest.radius\n },\n p2: {\n x: smallest.x - SMALL,\n y: smallest.y + smallest.radius\n },\n width: smallest.radius * 2\n });\n }\n }\n\n polygonArea /= 2;\n\n if (stats) {\n stats.area = arcArea + polygonArea;\n stats.arcArea = arcArea;\n stats.polygonArea = polygonArea;\n stats.arcs = arcs;\n stats.innerPoints = innerPoints;\n stats.intersectionPoints = intersectionPoints;\n }\n\n return arcArea + polygonArea;\n }", "get area() {\n let area = 0\n const numCoords = this._coords.length\n\n if (numCoords >= 6) {\n for (let i = 0; i < numCoords; i += 2) {\n area += this._coords[i] * this._coords[(i + 3) % numCoords]\n area -= this._coords[i + 1] * this._coords[(i + 2) % numCoords]\n }\n }\n\n return area / 2.0\n }", "function intersectionArea(circles, stats) {\n // get all the intersection points of the circles\n var intersectionPoints = getIntersectionPoints(circles);\n\n // filter out points that aren't included in all the circles\n var innerPoints = intersectionPoints.filter(function (p) {\n return containedInCircles(p, circles);\n });\n\n var arcArea = 0, polygonArea = 0, arcs = [], i;\n\n // if we have intersection points that are within all the circles,\n // then figure out the area contained by them\n if (innerPoints.length > 1) {\n // sort the points by angle from the center of the polygon, which lets\n // us just iterate over points to get the edges\n var center = getCenter(innerPoints);\n for (i = 0; i < innerPoints.length; ++i ) {\n var p = innerPoints[i];\n p.angle = Math.atan2(p.x - center.x, p.y - center.y);\n }\n innerPoints.sort(function(a,b) { return b.angle - a.angle;});\n\n // iterate over all points, get arc between the points\n // and update the areas\n var p2 = innerPoints[innerPoints.length - 1];\n for (i = 0; i < innerPoints.length; ++i) {\n var p1 = innerPoints[i];\n\n // polygon area updates easily ...\n polygonArea += (p2.x + p1.x) * (p1.y - p2.y);\n\n // updating the arc area is a little more involved\n var midPoint = {x : (p1.x + p2.x) / 2,\n y : (p1.y + p2.y) / 2},\n arc = null;\n\n for (var j = 0; j < p1.parentIndex.length; ++j) {\n if (p2.parentIndex.indexOf(p1.parentIndex[j]) > -1) {\n // figure out the angle halfway between the two points\n // on the current circle\n var circle = circles[p1.parentIndex[j]],\n a1 = Math.atan2(p1.x - circle.x, p1.y - circle.y),\n a2 = Math.atan2(p2.x - circle.x, p2.y - circle.y);\n\n var angleDiff = (a2 - a1);\n if (angleDiff < 0) {\n angleDiff += 2*Math.PI;\n }\n\n // and use that angle to figure out the width of the\n // arc\n var a = a2 - angleDiff/2,\n width = distance(midPoint, {\n x : circle.x + circle.radius * Math.sin(a),\n y : circle.y + circle.radius * Math.cos(a)\n });\n\n // clamp the width to the largest is can actually be\n // (sometimes slightly overflows because of FP errors)\n if (width > circle.radius * 2) {\n width = circle.radius * 2;\n }\n\n // pick the circle whose arc has the smallest width\n if ((arc === null) || (arc.width > width)) {\n arc = { circle : circle,\n width : width,\n p1 : p1,\n p2 : p2};\n }\n }\n }\n\n if (arc !== null) {\n arcs.push(arc);\n arcArea += circleArea(arc.circle.radius, arc.width);\n p2 = p1;\n }\n }\n } else {\n // no intersection points, is either disjoint - or is completely\n // overlapped. figure out which by examining the smallest circle\n var smallest = circles[0];\n for (i = 1; i < circles.length; ++i) {\n if (circles[i].radius < smallest.radius) {\n smallest = circles[i];\n }\n }\n\n // make sure the smallest circle is completely contained in all\n // the other circles\n var disjoint = false;\n for (i = 0; i < circles.length; ++i) {\n if (distance(circles[i], smallest) > Math.abs(smallest.radius - circles[i].radius)) {\n disjoint = true;\n break;\n }\n }\n\n if (disjoint) {\n arcArea = polygonArea = 0;\n\n } else {\n arcArea = smallest.radius * smallest.radius * Math.PI;\n arcs.push({circle : smallest,\n p1: { x: smallest.x, y : smallest.y + smallest.radius},\n p2: { x: smallest.x - SMALL, y : smallest.y + smallest.radius},\n width : smallest.radius * 2 });\n }\n }\n\n polygonArea /= 2;\n if (stats) {\n stats.area = arcArea + polygonArea;\n stats.arcArea = arcArea;\n stats.polygonArea = polygonArea;\n stats.arcs = arcs;\n stats.innerPoints = innerPoints;\n stats.intersectionPoints = intersectionPoints;\n }\n\n return arcArea + polygonArea;\n}", "function calcSize(points) {\n\t var area = 0,\n\t dist = 0;\n\t\n\t for (var i = 0, a, b; i < points.length - 1; i++) {\n\t a = b || points[i];\n\t b = points[i + 1];\n\t\n\t area += a[0] * b[1] - b[0] * a[1];\n\t\n\t // use Manhattan distance instead of Euclidian one to avoid expensive square root computation\n\t dist += Math.abs(b[0] - a[0]) + Math.abs(b[1] - a[1]);\n\t }\n\t points.area = Math.abs(area / 2);\n\t points.dist = dist;\n\t}", "function intersectionArea(circles, stats) {\n // get all the intersection points of the circles\n var intersectionPoints = getIntersectionPoints(circles);\n\n // filter out points that aren't included in all the circles\n var innerPoints = intersectionPoints.filter(function (p) {\n return containedInCircles(p, circles);\n });\n\n var arcArea = 0, polygonArea = 0, arcs = [], i;\n\n // if we have intersection points that are within all the circles,\n // then figure out the area contained by them\n if (innerPoints.length > 1) {\n // sort the points by angle from the center of the polygon, which lets\n // us just iterate over points to get the edges\n var center = getCenter(innerPoints);\n for (i = 0; i < innerPoints.length; ++i ) {\n var p = innerPoints[i];\n p.angle = Math.atan2(p.x - center.x, p.y - center.y);\n }\n innerPoints.sort(function(a,b) { return b.angle - a.angle;});\n\n // iterate over all points, get arc between the points\n // and update the areas\n var p2 = innerPoints[innerPoints.length - 1];\n for (i = 0; i < innerPoints.length; ++i) {\n var p1 = innerPoints[i];\n\n // polygon area updates easily ...\n polygonArea += (p2.x + p1.x) * (p1.y - p2.y);\n\n // updating the arc area is a little more involved\n var midPoint = {x : (p1.x + p2.x) / 2,\n y : (p1.y + p2.y) / 2},\n arc = null;\n\n for (var j = 0; j < p1.parentIndex.length; ++j) {\n if (p2.parentIndex.indexOf(p1.parentIndex[j]) > -1) {\n // figure out the angle halfway between the two points\n // on the current circle\n var circle = circles[p1.parentIndex[j]],\n a1 = Math.atan2(p1.x - circle.x, p1.y - circle.y),\n a2 = Math.atan2(p2.x - circle.x, p2.y - circle.y);\n\n var angleDiff = (a2 - a1);\n if (angleDiff < 0) {\n angleDiff += 2*Math.PI;\n }\n\n // and use that angle to figure out the width of the\n // arc\n var a = a2 - angleDiff/2,\n width = distance(midPoint, {\n x : circle.x + circle.radius * Math.sin(a),\n y : circle.y + circle.radius * Math.cos(a)\n });\n\n // pick the circle whose arc has the smallest width\n if ((arc === null) || (arc.width > width)) {\n arc = { circle : circle,\n width : width,\n p1 : p1,\n p2 : p2};\n }\n }\n }\n\n if (arc !== null) {\n arcs.push(arc);\n arcArea += circleArea(arc.circle.radius, arc.width);\n p2 = p1;\n }\n }\n } else {\n // no intersection points, is either disjoint - or is completely\n // overlapped. figure out which by examining the smallest circle\n var smallest = circles[0];\n for (i = 1; i < circles.length; ++i) {\n if (circles[i].radius < smallest.radius) {\n smallest = circles[i];\n }\n }\n\n // make sure the smallest circle is completely contained in all\n // the other circles\n var disjoint = false;\n for (i = 0; i < circles.length; ++i) {\n if (distance(circles[i], smallest) > Math.abs(smallest.radius - circles[i].radius)) {\n disjoint = true;\n break;\n }\n }\n\n if (disjoint) {\n arcArea = polygonArea = 0;\n\n } else {\n arcArea = smallest.radius * smallest.radius * Math.PI;\n arcs.push({circle : smallest,\n p1: { x: smallest.x, y : smallest.y + smallest.radius},\n p2: { x: smallest.x - SMALL, y : smallest.y + smallest.radius},\n width : smallest.radius * 2 });\n }\n }\n\n polygonArea /= 2;\n if (stats) {\n stats.area = arcArea + polygonArea;\n stats.arcArea = arcArea;\n stats.polygonArea = polygonArea;\n stats.arcs = arcs;\n stats.innerPoints = innerPoints;\n stats.intersectionPoints = intersectionPoints;\n }\n\n return arcArea + polygonArea;\n }", "function totalArea(rectangles) {\n return rectangles.reduce(function(area, rectangle) {\n return area + rectangle[0] * rectangle[1];\n }, 0);\n}", "function calcSize(points) {\n\t var area = 0,\n\t dist = 0;\n\n\t for (var i = 0, a, b; i < points.length - 1; i++) {\n\t a = b || points[i];\n\t b = points[i + 1];\n\n\t area += a[0] * b[1] - b[0] * a[1];\n\n\t // use Manhattan distance instead of Euclidian one to avoid expensive square root computation\n\t dist += Math.abs(b[0] - a[0]) + Math.abs(b[1] - a[1]);\n\t }\n\t points.area = Math.abs(area / 2);\n\t points.dist = dist;\n\t}", "function intersectionArea(circles, stats) {\n // get all the intersection points of the circles\n var intersectionPoints = getIntersectionPoints(circles);\n\n // filter out points that aren't included in all the circles\n var innerPoints = intersectionPoints.filter(function (p) {\n return containedInCircles(p, circles);\n });\n\n var arcArea = 0,\n polygonArea = 0,\n arcs = [],\n i;\n\n // if we have intersection points that are within all the circles,\n // then figure out the area contained by them\n if (innerPoints.length > 1) {\n // sort the points by angle from the center of the polygon, which lets\n // us just iterate over points to get the edges\n var center = getCenter(innerPoints);\n for (i = 0; i < innerPoints.length; ++i) {\n var p = innerPoints[i];\n p.angle = Math.atan2(p.x - center.x, p.y - center.y);\n }\n innerPoints.sort(function (a, b) {\n return b.angle - a.angle;\n });\n\n // iterate over all points, get arc between the points\n // and update the areas\n var p2 = innerPoints[innerPoints.length - 1];\n for (i = 0; i < innerPoints.length; ++i) {\n var p1 = innerPoints[i];\n\n // polygon area updates easily ...\n polygonArea += (p2.x + p1.x) * (p1.y - p2.y);\n\n // updating the arc area is a little more involved\n var midPoint = { x: (p1.x + p2.x) / 2,\n y: (p1.y + p2.y) / 2 },\n arc = null;\n\n for (var j = 0; j < p1.parentIndex.length; ++j) {\n if (p2.parentIndex.indexOf(p1.parentIndex[j]) > -1) {\n // figure out the angle halfway between the two points\n // on the current circle\n var circle = circles[p1.parentIndex[j]],\n a1 = Math.atan2(p1.x - circle.x, p1.y - circle.y),\n a2 = Math.atan2(p2.x - circle.x, p2.y - circle.y);\n\n var angleDiff = a2 - a1;\n if (angleDiff < 0) {\n angleDiff += 2 * Math.PI;\n }\n\n // and use that angle to figure out the width of the\n // arc\n var a = a2 - angleDiff / 2,\n width = distance(midPoint, {\n x: circle.x + circle.radius * Math.sin(a),\n y: circle.y + circle.radius * Math.cos(a)\n });\n\n // clamp the width to the largest is can actually be\n // (sometimes slightly overflows because of FP errors)\n if (width > circle.radius * 2) {\n width = circle.radius * 2;\n }\n\n // pick the circle whose arc has the smallest width\n if (arc === null || arc.width > width) {\n arc = { circle: circle,\n width: width,\n p1: p1,\n p2: p2 };\n }\n }\n }\n\n if (arc !== null) {\n arcs.push(arc);\n arcArea += circleArea(arc.circle.radius, arc.width);\n p2 = p1;\n }\n }\n } else {\n // no intersection points, is either disjoint - or is completely\n // overlapped. figure out which by examining the smallest circle\n var smallest = circles[0];\n for (i = 1; i < circles.length; ++i) {\n if (circles[i].radius < smallest.radius) {\n smallest = circles[i];\n }\n }\n\n // make sure the smallest circle is completely contained in all\n // the other circles\n var disjoint = false;\n for (i = 0; i < circles.length; ++i) {\n if (distance(circles[i], smallest) > Math.abs(smallest.radius - circles[i].radius)) {\n disjoint = true;\n break;\n }\n }\n\n if (disjoint) {\n arcArea = polygonArea = 0;\n } else {\n arcArea = smallest.radius * smallest.radius * Math.PI;\n arcs.push({ circle: smallest,\n p1: { x: smallest.x, y: smallest.y + smallest.radius },\n p2: { x: smallest.x - SMALL, y: smallest.y + smallest.radius },\n width: smallest.radius * 2 });\n }\n }\n\n polygonArea /= 2;\n if (stats) {\n stats.area = arcArea + polygonArea;\n stats.arcArea = arcArea;\n stats.polygonArea = polygonArea;\n stats.arcs = arcs;\n stats.innerPoints = innerPoints;\n stats.intersectionPoints = intersectionPoints;\n }\n\n return arcArea + polygonArea;\n }", "function intersectionArea(circles, stats) {\n // get all the intersection points of the circles\n var intersectionPoints = getIntersectionPoints(circles);\n\n // filter out points that aren't included in all the circles\n var innerPoints = intersectionPoints.filter(function (p) {\n return containedInCircles(p, circles);\n });\n\n var arcArea = 0,\n polygonArea = 0,\n arcs = [],\n i;\n\n // if we have intersection points that are within all the circles,\n // then figure out the area contained by them\n if (innerPoints.length > 1) {\n // sort the points by angle from the center of the polygon, which lets\n // us just iterate over points to get the edges\n var center = getCenter(innerPoints);\n for (i = 0; i < innerPoints.length; ++i) {\n var p = innerPoints[i];\n p.angle = Math.atan2(p.x - center.x, p.y - center.y);\n }\n innerPoints.sort(function (a, b) {\n return b.angle - a.angle;\n });\n\n // iterate over all points, get arc between the points\n // and update the areas\n var p2 = innerPoints[innerPoints.length - 1];\n for (i = 0; i < innerPoints.length; ++i) {\n var p1 = innerPoints[i];\n\n // polygon area updates easily ...\n polygonArea += (p2.x + p1.x) * (p1.y - p2.y);\n\n // updating the arc area is a little more involved\n var midPoint = { x: (p1.x + p2.x) / 2,\n y: (p1.y + p2.y) / 2 },\n arc = null;\n\n for (var j = 0; j < p1.parentIndex.length; ++j) {\n if (p2.parentIndex.indexOf(p1.parentIndex[j]) > -1) {\n // figure out the angle halfway between the two points\n // on the current circle\n var circle = circles[p1.parentIndex[j]],\n a1 = Math.atan2(p1.x - circle.x, p1.y - circle.y),\n a2 = Math.atan2(p2.x - circle.x, p2.y - circle.y);\n\n var angleDiff = a2 - a1;\n if (angleDiff < 0) {\n angleDiff += 2 * Math.PI;\n }\n\n // and use that angle to figure out the width of the\n // arc\n var a = a2 - angleDiff / 2,\n width = distance(midPoint, {\n x: circle.x + circle.radius * Math.sin(a),\n y: circle.y + circle.radius * Math.cos(a)\n });\n\n // clamp the width to the largest is can actually be\n // (sometimes slightly overflows because of FP errors)\n if (width > circle.radius * 2) {\n width = circle.radius * 2;\n }\n\n // pick the circle whose arc has the smallest width\n if (arc === null || arc.width > width) {\n arc = { circle: circle,\n width: width,\n p1: p1,\n p2: p2 };\n }\n }\n }\n\n if (arc !== null) {\n arcs.push(arc);\n arcArea += circleArea(arc.circle.radius, arc.width);\n p2 = p1;\n }\n }\n } else {\n // no intersection points, is either disjoint - or is completely\n // overlapped. figure out which by examining the smallest circle\n var smallest = circles[0];\n for (i = 1; i < circles.length; ++i) {\n if (circles[i].radius < smallest.radius) {\n smallest = circles[i];\n }\n }\n\n // make sure the smallest circle is completely contained in all\n // the other circles\n var disjoint = false;\n for (i = 0; i < circles.length; ++i) {\n if (distance(circles[i], smallest) > Math.abs(smallest.radius - circles[i].radius)) {\n disjoint = true;\n break;\n }\n }\n\n if (disjoint) {\n arcArea = polygonArea = 0;\n } else {\n arcArea = smallest.radius * smallest.radius * Math.PI;\n arcs.push({ circle: smallest,\n p1: { x: smallest.x, y: smallest.y + smallest.radius },\n p2: { x: smallest.x - SMALL, y: smallest.y + smallest.radius },\n width: smallest.radius * 2 });\n }\n }\n\n polygonArea /= 2;\n if (stats) {\n stats.area = arcArea + polygonArea;\n stats.arcArea = arcArea;\n stats.polygonArea = polygonArea;\n stats.arcs = arcs;\n stats.innerPoints = innerPoints;\n stats.intersectionPoints = intersectionPoints;\n }\n\n return arcArea + polygonArea;\n }", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}", "function area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}", "function area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}", "function area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}", "function area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}", "function area(p, q, r) {\n\t return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t}", "function area(p, q, r) {\n\t return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t}", "function area(p, q, r) {\n\t return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t}", "function area(p, q, r) {\n\t return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t}", "function area(p, q, r) {\n\t return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t}", "function area(p, q, r) {\n\n\treturn (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function calcArea(a, b, c){\n let s = (a + b + c)/2;\n let area = Math.sqrt(s*(s-a)*(s-b)*(s-c));\n console.log(area);\n }", "function area( p, q, r ) {\n\n\t\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n\t}", "function area( p, q, r ) {\n\n\t\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n\t}", "function area( p, q, r ) {\n\n\t\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n\t}", "function area( p, q, r ) {\n\n\t\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n\t}", "function area(d) {\n var a = [],\n i = 0,\n p = d[0];\n a.push(\"M\", x.call(this, p, i), \",\" + y0 + \"V\", y1.call(this, p, i));\n while (p = d[++i]) a.push(\"L\", x.call(this, p, i), \",\", y1.call(this, p, i));\n a.push(\"V\" + y0 + \"Z\");\n return a.join(\"\");\n }", "area() {\n return 4 * (3.14) * (this.radius**2)\n }", "getArea()\n\t{\n\t\tconsole.log(\"Calling getArea() in Triangle\");\n\n\t\t// for simplicity use explicit co-ordinates\n\t\t//\n\t\tvar x1 = this.vertices[0], y1 = this.vertices[1],\n\t\t x2 = this.vertices[2], y2 = this.vertices[3],\n\t\t x3 = this.vertices[4], y3 = this.vertices[5];\n\n\t\treturn (((x2 - x1) * (y3 - y1)) - ((x3 - x1) * (y2 - y1))) / 2;\n\t}", "getArea() {\n\t\tconst from = {\n\t\t\tx: this.parcelMap['A'].lat,\n\t\t\ty: this.parcelMap['A'].lon,\n\t\t}\n\n\t\tconst to = {\n\t\t\tx: this.parcelMap['I'].lat + 1,\n\t\t\ty: this.parcelMap['I'].lon + 1,\n\t\t}\n\t\treturn [new Point(from.x, from.y), new Point(to.x, to.y)]\n\t}", "static area( contour ) {\n\n\t\tconst n = contour.length;\n\t\tlet a = 0.0;\n\n\t\tfor ( let p = n - 1, q = 0; q < n; p = q ++ ) {\n\n\t\t\ta += contour[ p ].x * contour[ q ].y - contour[ q ].x * contour[ p ].y;\n\n\t\t}\n\n\t\treturn a * 0.5;\n\n\t}", "function area(width, height) {\n return width * height;\n}", "function computeArea(width, height) {\n // your code here\n return width * height;\n}", "function area(a, b){\n return (a*b);\n}", "function average(points){\n var total=0\n for(var i=0; i<points.length-1; i++){\n distance = calcDistance(points[i].lat, points[i+1].lat, points[i].lng, points[i+1].lng)\n total+=distance;\n }\n return total/points.length;\n}", "function calcArea(width, height) {\n var area=width*height\n return area;\n}", "function calcArea(width, height) {\n var area = width*height;\n return area; \n}", "function area (height, width) {\n\treturn height * width;\n}", "function calculateArea(radius) {\n return Math.PI * radius * radius;\n}", "function calcArea(width,height) {\n var area = width*height;\n return area;\n}", "function calculateArea(f, startX, endX) {\n return trapeziumRule(0.1, 2000, f, startX, endX);\n}", "function calculate_area(start, end, fx) \n{\n if (arguments.length < 3) \n {\n throw ('please provide start, end, and function for integration.');\n }\n\n fx = y(fx);\n let sample_number = 10 * thousand;\n let xrange = end - start;\n let max = fx(end);\n let generator = mc.d2(start, xrange, zero, max);\n let estimator_function = check_inside(fx);\n let area_of_square = (end - start) * max;\n return mc.run(sample_number, generator, estimator_function) * area_of_square;\n}", "function calcArea(width, height){\n var area = width * height;\n return area;\n}", "function calcArea(...args) {\n if (args.length == 2) {\n return args[0] * args[2];\n }\n return Math.pow(args[0], 2);\n}", "function area(length, width){\r\n let areaCalc = length * width;\r\n return areaCalc;\r\n}", "function area(radius) {\n return pi * radius * radius;\n}", "findArea() {\n console.log(\"The area of this circle is: \" + this.pi * (this.rayon * this.rayon));\n }", "function areaOfTriangle(a, b, c) {\n return Math.abs((a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y)) / 2);\n}", "function equilateralArea(value){\n var area = (Math.sqrt(3)/4)* (value * value);\n return area;\n}", "function area(r) {\n \n return r*r\n}", "function calculatesArea(a, b){\n let area = a * b\n return area\n}", "function polyArea(poly){\n var area=0,pts=poly.points,len=pts.numberOfItems;\n for(var i=0;i<len;++i){\n var p1 = pts.getItem(i), p2=pts.getItem((i+len-1)%len);\n area += (p2.x+p1.x) * (p2.y-p1.y);\n }\n return Math.abs(area/2);\n}", "function triangle_area(a, b, c) {\n return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);\n }", "function triangleArea (threeVerticesArray) {\n let [xA, yA] = threeVerticesArray[0];\n let [xB, yB] = threeVerticesArray[1];\n let [xC, yC] = threeVerticesArray[2];\n\n const area = Math.abs((xA - xC) * (yB - yA) - (xA - xB) * (yC - yA)) / 2.0;\n return area;\n}", "function drawArea(area, color){\n var points = area[\"points\"];\n var totalWidth=getCanvasSize(0)*currentZoom/zoomLimits[0];\n if (points.length==0){\n return;\n }\n var splitPoints=[[], []];\n var lastPoint={\"point\": points[points.length-1], \"factor\": getFactor(points[points.length-1], totalWidth)};\n var xMin=getRelativePosition([0], 0);\n var xMax=getRelativePosition([totalWidth-1], 0);\n \n for (var ptIndex=0; ptIndex < points.length; ptIndex++) {\n var point={\"point\":points[ptIndex], \"groupIndex\":0};\n var factor=getFactor(point[\"point\"], totalWidth);\n point[\"factor\"]=factor;\n \n if (lastPoint[\"factor\"]!=factor){\n var middlePointY=point[\"point\"][1]+(lastPoint[\"point\"][1]-point[\"point\"][1])*(xMax-point[\"point\"][0])/(lastPoint[\"point\"][0]-point[\"point\"][0]);\n splitPoints[0][splitPoints[0].length]=[xMax, middlePointY];\n splitPoints[1][splitPoints[1].length]=[xMin, middlePointY];\n } \n splitPoints[factor][splitPoints[factor].length]=point[\"point\"]; \n \n lastPoint=point;\n }\n\n var drawingResult=[];\n \n for (var groupIndex=0; groupIndex<splitPoints.length;groupIndex++){\n if (splitPoints[groupIndex].length > 0){\n ctx.beginPath();\n ctx.lineWidth = 2;\n drawingResult[drawingResult.length]=drawShape(splitPoints[groupIndex], area[\"substract\"] == 1);\n ctx.closePath();\n if (color){\n ctx.fillStyle=color;\n ctx.fill();\n }\n ctx.stroke();\n }\n }\n \n return drawingResult;\n }", "function area(radius) {\r\n return (radius ** 2) * PI;\r\n}", "function getPlanarPathArea2(points) {\n var sum = 0,\n ax, ay, bx, by, dx, dy, p;\n for (var i=0, n=points.length; i<n; i++) {\n p = points[i];\n if (i === 0) {\n ax = 0;\n ay = 0;\n dx = -p[0];\n dy = -p[1];\n } else {\n ax = p[0] + dx;\n ay = p[1] + dy;\n sum += ax * by - bx * ay;\n }\n bx = ax;\n by = ay;\n }\n return sum / 2;\n }", "function calcArea () {\n\tvar width = 20;\n\tvar height = 30;\n\tvar area = width * height;\n console.log(area);\n}", "function area(length, width) {\n return length * width;\n}", "function area(l,w,b) {\nvar Areax = l * w * b;\nconsole.log (Areax); \n}", "function isInside(x1, y1, x2, y2, x3, y3, x, y) {\n\n /* Calculate area of triangle ABC */\n let A = area(x1, y1, x2, y2, x3, y3);\n\n /* Calculate area of triangle PBC */\n let A1 = area(x, y, x2, y2, x3, y3);\n\n /* Calculate area of triangle PAC */\n let A2 = area(x1, y1, x, y, x3, y3);\n\n /* Calculate area of triangle PAB */\n let A3 = area(x1, y1, x2, y2, x, y);\n\n /* Check if sum of A1, A2 and A3 is same as A */\n return (10 > Math.abs(A - (A1 + A2 + A3)));\n}", "function calcArea(base, height) {\n return (base * height) / 2;\n}", "function calcArea (){\n //Create variables for W,H,A\n\n var width=20;\n var height=30;\n var area=width*height;\n console.log(\"The area of the recatangle is \" + area + \"sq Feet\");\n}", "function areaTriangle(a, b, c) {\n var s = (a + b + c) / 2;\n var innerCount = s * (s - a) * (s - b) * (s - c);\n var area = parseFloat(Math.sqrt(innerCount).toFixed(2));\n\n return area;\n}", "function calcArea(base, height) {\n return (base * height) / 2;\n}" ]
[ "0.80844116", "0.77336186", "0.7714033", "0.74511176", "0.7230042", "0.71543694", "0.71198237", "0.7117731", "0.70857763", "0.6976173", "0.69431424", "0.69025546", "0.6902238", "0.67703485", "0.673697", "0.6732529", "0.6732529", "0.67313004", "0.67277634", "0.6711462", "0.6675651", "0.6639542", "0.66358703", "0.6628666", "0.66143674", "0.66143674", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6607822", "0.6597233", "0.6597233", "0.6597233", "0.6597233", "0.6597233", "0.6551075", "0.6551075", "0.6551075", "0.6551075", "0.6551075", "0.6549775", "0.65007025", "0.6496639", "0.6496639", "0.6496639", "0.6496639", "0.64590186", "0.64251614", "0.6415376", "0.63911647", "0.6382292", "0.6356863", "0.63464653", "0.6334304", "0.6295863", "0.6286203", "0.62789494", "0.6270843", "0.6260216", "0.62514883", "0.6241603", "0.62046236", "0.6191998", "0.6153406", "0.6126518", "0.6104404", "0.6101538", "0.6092068", "0.60917974", "0.6089075", "0.6079295", "0.606595", "0.6062647", "0.60526603", "0.60509527", "0.6046174", "0.6027094", "0.600635", "0.5988463", "0.59874743", "0.5985095", "0.5960992", "0.5959411", "0.59591633", "0.59492487" ]
0.0
-1
acts as a wrapper for the area function
function evaluateOsteophyte(border){ return area(border); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Area() {\n}", "area() {\n return 4 * (3.14) * (this.radius**2)\n }", "function area (height, width) {\n\treturn height * width;\n}", "get area() {\n return this.width * this.height\n }", "function area(width, height) {\n return width * height;\n}", "get area() {\n return this._width * this._height;\n }", "function area(r) {\n \n return r*r\n}", "get area() {\n return this.calcArea();\n }", "get area() {\n return this.calcArea();\n }", "get area() {\n return this.height * this.width;\n }", "_$getArea() {\n return null;\n }", "get area() {\n return __classPrivateFieldGet(this, _ancho) * this.alto;\n }", "calcArea(){\n return this._width * this._height;\n }", "function area(a, b){\n return (a*b);\n}", "function area(p1, p2) {\n const colliding = {};\n const overlapping = {};\n\n return {\n id: \"area\",\n\n area: {\n p1: p1,\n p2: p2,\n },\n\n areaWidth() {\n const { p1, p2 } = this._worldArea();\n return p2.x - p1.x;\n },\n\n areaHeight() {\n const { p1, p2 } = this._worldArea();\n return p2.y - p1.y;\n },\n\n isClicked() {\n return app.mouseClicked() && this.isHovered();\n },\n\n isHovered() {\n if (app.isTouch) {\n return app.mouseDown() && this.hasPt(mousePos(this.layer));\n } else {\n return this.hasPt(mousePos(this.layer));\n }\n },\n\n isCollided(other) {\n if (!other.area) {\n return false;\n }\n\n if (!isSameLayer(this, other)) {\n return false;\n }\n\n const a1 = this._worldArea();\n const a2 = other._worldArea();\n\n return colRectRect(a1, a2);\n },\n\n isOverlapped(other) {\n if (!other.area) {\n return false;\n }\n\n if (!isSameLayer(this, other)) {\n return false;\n }\n\n const a1 = this._worldArea();\n const a2 = other._worldArea();\n\n return overlapRectRect(a1, a2);\n },\n\n clicks(f) {\n this.action(() => {\n if (this.isClicked()) {\n f();\n }\n });\n },\n\n hovers(f) {\n this.action(() => {\n if (this.isHovered()) {\n f();\n }\n });\n },\n\n collides(tag, f) {\n this.action(() => {\n this._checkCollisions(tag, f);\n });\n },\n\n overlaps(tag, f) {\n this.action(() => {\n this._checkOverlaps(tag, f);\n });\n },\n\n hasPt(pt) {\n const a = this._worldArea();\n return colRectPt(\n {\n p1: a.p1,\n p2: a.p2,\n },\n pt\n );\n },\n\n // TODO: make overlap events still trigger\n // push an obj out of another if they're overlapped\n pushOut(obj) {\n if (obj === this) {\n return null;\n }\n\n if (!obj.area) {\n return null;\n }\n\n if (!isSameLayer(this, obj)) {\n return null;\n }\n\n const a1 = this._worldArea();\n const a2 = obj._worldArea();\n\n if (!colRectRect(a1, a2)) {\n return null;\n }\n\n const disLeft = a1.p2.x - a2.p1.x;\n const disRight = a2.p2.x - a1.p1.x;\n const disTop = a1.p2.y - a2.p1.y;\n const disBottom = a2.p2.y - a1.p1.y;\n const min = Math.min(disLeft, disRight, disTop, disBottom);\n\n // eslint-disable-next-line default-case\n switch (min) {\n case disLeft:\n this.pos.x -= disLeft;\n return {\n obj: obj,\n side: \"right\",\n dis: -disLeft,\n };\n case disRight:\n this.pos.x += disRight;\n return {\n obj: obj,\n side: \"left\",\n dis: disRight,\n };\n case disTop:\n this.pos.y -= disTop;\n return {\n obj: obj,\n side: \"bottom\",\n dis: -disTop,\n };\n case disBottom:\n this.pos.y += disBottom;\n return {\n obj: obj,\n side: \"top\",\n dis: disBottom,\n };\n }\n\n return null;\n },\n\n // push object out of other solid objects\n pushOutAll() {\n return every((other) =>\n other.solid ? this.pushOut(other) : null\n ).filter((res) => res != null);\n },\n\n _checkCollisions(tag, f) {\n every(tag, (obj) => {\n if (this === obj) {\n return;\n }\n if (colliding[obj._id]) {\n return;\n }\n if (this.isCollided(obj)) {\n f(obj);\n colliding[obj._id] = obj;\n }\n });\n\n for (const id in colliding) {\n const obj = colliding[id];\n if (!this.isCollided(obj)) {\n delete colliding[id];\n }\n }\n },\n\n // TODO: repetitive with collides\n _checkOverlaps(tag, f) {\n every(tag, (obj) => {\n if (this === obj) {\n return;\n }\n if (overlapping[obj._id]) {\n return;\n }\n if (this.isOverlapped(obj)) {\n f(obj);\n overlapping[obj._id] = obj;\n }\n });\n\n for (const id in overlapping) {\n const obj = overlapping[id];\n if (!this.isOverlapped(obj)) {\n delete overlapping[id];\n }\n }\n },\n\n // TODO: cache\n // TODO: use matrix mult for more accuracy and rotation?\n _worldArea() {\n const a = this.area;\n const pos = this.pos || vec2(0);\n const scale = this.scale || vec2(1);\n const p1 = pos.add(a.p1.scale(scale));\n const p2 = pos.add(a.p2.scale(scale));\n\n const area = {\n p1: vec2(Math.min(p1.x, p2.x), Math.min(p1.y, p2.y)),\n p2: vec2(Math.max(p1.x, p2.x), Math.max(p1.y, p2.y)),\n };\n\n return area;\n },\n };\n }", "constructor(area) {\n this.area = area\n }", "function area(length, width){\r\n let areaCalc = length * width;\r\n return areaCalc;\r\n}", "get Area() { return this.Width * this.Height; }", "get Area() { return this.Width * this.Height; }", "function areaRectangle(length, width){\n return -1;\n }", "function areaSquare(side){\n return -1;\n }", "function getArea(length, width) {\n let area;\n // Write your code here\n \n return area;\n}", "function area(length, width) {\n return length * width;\n}", "function area(l,w,b) {\nvar Areax = l * w * b;\nconsole.log (Areax); \n}", "function area (a){\n\tvar area= a*a\n\treturn \"area =\" +area\n}", "function area( p, q, r ) {\n\n\t\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n\t}", "function area( p, q, r ) {\n\n\t\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n\t}", "function area( p, q, r ) {\n\n\t\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n\t}", "function area( p, q, r ) {\n\n\t\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n\t}", "function calcArea(wid, len){\n\nvar area = wid*len;\n\n console.log(\"The area inside of function is \"+area);\n\n //Return the area variable to the main code\n return area;\n\n }", "function handleArea(area) {\n if ( area.draggable==true && area.helper.is('.ui-draggable')==false ) {\n area.helper.draggable({\n stop : function (event, ui) {\n area.y = 0+ui.position.top+parseInt(area.radius);\n area.x = 0+ui.position.left+parseInt(area.radius);\n },\n containment: \"parent\"\n });\n } else if( area.draggable==false && area.helper.is('.ui-draggable')==true ) {\n area.helper.draggable('destroy');\n }\n if ( area.resizable==true && area.helper.is('.ui-resizable')==false ) {\n area.helper.resizable({\n handles: 'all',\n aspectRatio: true,\n resize: function (event, ui) {\n area.helper.css('border-radius', Math.ceil(ui.size.width/2));\n },\n stop: function (event, ui) {\n area.radius = Math.ceil(ui.size.width/2);\n }\n });\n } else if( area.resizable==false && area.helper.is('.ui-resizable')==true ) {\n area.helper.resizable('destroy');\n }\n\t}", "function computeArea(width, height) {\n // your code here\n return width * height;\n}", "_worldArea() {\n const a = this.area;\n const pos = this.pos || vec2(0);\n const scale = this.scale || vec2(1);\n const p1 = pos.add(a.p1.scale(scale));\n const p2 = pos.add(a.p2.scale(scale));\n\n const area = {\n p1: vec2(Math.min(p1.x, p2.x), Math.min(p1.y, p2.y)),\n p2: vec2(Math.max(p1.x, p2.x), Math.max(p1.y, p2.y)),\n };\n\n return area;\n }", "function area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}", "function area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}", "function area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}", "function area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}", "function area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}", "function areaOfRectangle(a,b){\n return a*b;\n}", "function area(p, q, r) {\n\t return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t}", "function area(p, q, r) {\n\t return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t}", "function area(p, q, r) {\n\t return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t}", "function area(p, q, r) {\n\t return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t}", "function area(p, q, r) {\n\t return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t}", "function camAreaEvent(label, code)\n{\n\tvar eventName = \"eventArea\" + label;\n\tcamMarkTiles(label);\n\t__camPreHookEvent(eventName, function(droid)\n\t{\n\t\tif (camDef(droid))\n\t\t{\n\t\t\tcamTrace(\"Player\", droid.player, \"enters\", label);\n\t\t}\n\t\tcamUnmarkTiles(label);\n\t\tcode(droid);\n\t});\n}", "get area() {\n let area = 0\n const numCoords = this._coords.length\n\n if (numCoords >= 6) {\n for (let i = 0; i < numCoords; i += 2) {\n area += this._coords[i] * this._coords[(i + 3) % numCoords]\n area -= this._coords[i + 1] * this._coords[(i + 2) % numCoords]\n }\n }\n\n return area / 2.0\n }", "function area() {\n var area = 0;\n area += (p1.x + p3.x) * (p3.y - p1.y);\n area += (p2.x + p1.x) * (p1.y - p2.y);\n area += (p3.x + p2.x) * (p2.y - p3.y);\n return area / 2;\n }", "calcolaArea() {\n\n return (this.base * this.altezza) / 2; \n }", "function area(p, q, r) {\n\n\treturn (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area_rectangulo(base,altura){\n return base*altura\n}", "function getAreaPoints() {\n funcionPoints.map(function (point) {\n if (point.y > 0) {\n y_to = point.y > y_to ? point.y : y_to;\n } else {\n y_from = point.y < y_from ? point.y : y_from;\n }\n });\n\n areaPoints.push({ x: x_from, y: y_from });\n areaPoints.push({ x: x_to, y: y_from });\n areaPoints.push({ x: x_to, y: y_to });\n areaPoints.push({ x: x_from, y: y_to });\n areaPoints.push({ x: x_from, y: y_from });\n }", "function areaCalculator(length, width) {\n let area = length * width;\n return area;\n}", "function areaCuadrado(lado) {\n return lado * lado;\n}", "function area(x1, y1, x2, y2, x3, y3) {\n return Math.abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2.0);\n}", "function calcArea(w, h){ //( , ) Parameters \n\tvar area = w * h;\n\treturn area; //function is spitting the information out... and this happens where the function is envoked\n}", "function areaCuadrado(lado) {\n return lado * lado;\n}", "findArea() {\n console.log(\"The area of this circle is: \" + this.pi * (this.rayon * this.rayon));\n }", "function areaCuadrado(lado){\n return lado*lado;\n}", "function calcArea(w,h){\n //calc area\n var area = w*h;\n console.log(\"Inside the function the area is \"+area);\n //Return the area to the main code\n return area;\n }", "function areaCuadrado(lado) {\n return lado * lado;\n}", "function areaCuadrado(lado) {\n return lado * lado;\n}", "function areaCuadrado(lado) {\n return lado * lado;\n}", "static area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n }", "area() {\n return Math.pow(super.getHeight(), 2)\n }", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}", "function areaSquare(side) {\n// Returns the 2D Area of a Square\n return side ** 2;\n}", "function area(length, width) {\n console.log(length * width);\n}", "getArea() {\n\t\tconst from = {\n\t\t\tx: this.parcelMap['A'].lat,\n\t\t\ty: this.parcelMap['A'].lon,\n\t\t}\n\n\t\tconst to = {\n\t\t\tx: this.parcelMap['I'].lat + 1,\n\t\t\ty: this.parcelMap['I'].lon + 1,\n\t\t}\n\t\treturn [new Point(from.x, from.y), new Point(to.x, to.y)]\n\t}", "function area(a, b, c) {\n return (b.x - a.x) * (c.y - a.y) - (c.x - a.x) * (b.y - a.y);\n}", "function calcArea(width, height) {\n var area=width*height\n return area;\n}", "function areaOfRectangle(length,width){\n var area = length * width;\n return area ;\n}", "function getRectangleArea(length, width) {\r\n //return the area of the rectangle by using length and width\r\n //code here\r\n}", "function calcArea(width, height) {\n var area = width*height;\n return area; \n}", "function showAreaOnMap()\n{\n fillPoly(areaIDData,pointArray);\n}", "function calcArea(w,h){\n //Calculate area\n var area = w*h\nconsole.log(\"Inside the function the area is \"+area);\n //return the area to the main code.\n return area;\n}", "function calcArea (){\n //Create variables for W,H,A\n\n var width=20;\n var height=30;\n var area=width*height;\n console.log(\"The area of the recatangle is \" + area + \"sq Feet\");\n}", "function find_Area(r) {\n return (2 * r * r);\n }", "function Area(x, y, dx, dy, actionUp, actionDown) {\n this._init(x, y, dx, dy, actionUp, actionDown);\n}", "function area(width,height){\r\n var rect_area=width*height;\r\n document.write(\"Area of rectangle is: \"+rect_area+\"<br>\");\r\n}", "function Area(name, desc, E, W, S, N)\n{\n this.name = name;\n this.desc = desc;\n this.E = E;\n this.W = W;\n this.S = S;\n this.N = N;\n \n}", "drawArea(posx, posy, tilex, tiley) {\n // todo: cache area\n const area = new Area(posx, posy, this.baseSeed, this);\n area.draw(tilex, tiley);\n }" ]
[ "0.76496685", "0.727273", "0.7198203", "0.7149386", "0.7130923", "0.7123216", "0.7114047", "0.7103795", "0.70556223", "0.70363045", "0.69860524", "0.69241035", "0.69192445", "0.6878352", "0.6837695", "0.6823132", "0.6821017", "0.6804658", "0.6804658", "0.6785561", "0.67742276", "0.67510414", "0.6678763", "0.66388834", "0.6631878", "0.660915", "0.660915", "0.660915", "0.660915", "0.6606105", "0.6600817", "0.6596525", "0.659533", "0.6581055", "0.6581055", "0.6581055", "0.6581055", "0.6581055", "0.6570572", "0.65583944", "0.65583944", "0.65583944", "0.65583944", "0.65583944", "0.6542107", "0.6529238", "0.6517141", "0.6513441", "0.65129054", "0.6494874", "0.6476067", "0.6468233", "0.64673877", "0.6460461", "0.6449961", "0.6435547", "0.64342344", "0.6427167", "0.64254236", "0.64174604", "0.64174604", "0.64174604", "0.6408399", "0.6403807", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.6387805", "0.636367", "0.6358125", "0.6341308", "0.6317769", "0.63130414", "0.6309771", "0.6307581", "0.63055193", "0.63031733", "0.6296647", "0.6283179", "0.6281977", "0.6273502", "0.6272068", "0.6269774", "0.62696487" ]
0.6497839
49
analyzes cartilage width, accepts two sets of points representing the cartilage surface and osteochondral interface
function evaluateCartilage(surface, oc_interface, interval_count){ // transform coordinates so that a line between the ends of the OC interface is horizontal var oc_slope = (oc_interface[oc_interface.length-1][1]-oc_interface[0][1]) / (oc_interface[oc_interface.length-1][0]-oc_interface[0][0]); var new_surface = translate(oc_slope, oc_interface[0][0], oc_interface[0][1], surface); var new_interface = translate(oc_slope, oc_interface[0][0], oc_interface[0][1], oc_interface); // compute boundaries and intervals var interface_x = []; var surface_x = []; for (var i = 0; i < new_interface.length; i++){ interface_x.push(new_interface[i][0]); } for (var i = 0; i < new_surface.length; i++){ surface_x.push(new_surface[i][0]); } var lower = Math.max.apply(null, [Math.min.apply(null, interface_x), Math.min.apply(null, surface_x)]); var upper = Math.min.apply(null, [Math.max.apply(null, interface_x), Math.max.apply(null, surface_x)]); var results = []; var x_interval = (upper-lower) / interval_count; for (var i = 0; i < interval_count; i++){ // find points within interval and their distances from the surface var points = []; var distances = []; for (var j = 0; j < 10; j++){ var current_x = lower + (x_interval*i) + (x_interval*j/10); // find boundary points in OC interface and define a line intersecting them var line1_p1; var line1_p2; for (var k = 0; k < new_interface.length-1; k++){ if (between(current_x, new_interface[k][0], new_interface[k+1][0])){ line1_p1 = new_interface[k]; line1_p2 = new_interface[k+1]; break; } } var line2_p1; var line2_p2; for (var k = 0; k < surface.length-1; k++){ if (between(current_x, new_surface[k][0], new_surface[k+1][0])){ line2_p1 = new_surface[k]; line2_p2 = new_surface[k+1]; break; } } if (line1_p1 && line1_p2 && line2_p1 && line2_p2) { distances.push(vertical_distance(current_x, line1_p1, line1_p2, line2_p1, line2_p2)); } } if (distances.length == 0) { distances = [0]; } var mean = avg(distances); var deviation = std(distances); results.push({"avgDepth": mean, "std": deviation}); } return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeSetup()\n{ \n //set distances based on points...\n for(let i=0;i<4;i++)\n {\n len[i]=sqrt(pow(x[(i+1)%4]-x[i],2)+pow(y[(i+1)%4]-y[i],2));\n }\n \n whichType();//checks type.\n checkOpen();//checks open or crossed.\n}", "function computeCenters() {\n centers = [];\n var x = 150;\n var y = 75;\n var yd = 50;\n var xd = 100;\n switch (shape) {\n case \"9-TS\":\n centers = [\n [50,25], [150,25], [250,25], [250,75], [250,125], [150,125], [50,125], [50,75], [x,y]\n ];\n break;\n case \"quad\":\n centers = [\n [50,25], [250,25], [250,125], [50,125], [50,25], [150,75] \n ];\n break;\n case \"qent\":\n centers = [\n [x, y-yd], \n [x+(yd*zr('s',2)), y+(yd*zr('c',2))],\n [x+(yd*zr('s',4)), y-(yd*zr('c',1))],\n [x-(yd*zr('s',4)), y-(yd*zr('c',1))],\n [x-(yd*zr('s',2)), y+(yd*zr('c',2))],\n [x, y]\n ];\n break;\n case \"pent\":\n centers = [\n [x, y-yd], \n [x+(xd*zr('s',2)), y+(yd*zr('c',2))],\n [x+(xd*zr('s',4)), y-(yd*zr('c',1))],\n [x-(xd*zr('s',4)), y-(yd*zr('c',1))],\n [x-(xd*zr('s',2)), y+(yd*zr('c',2))],\n [x, y]\n ];\n break;\n }\n}", "function len (p1, p2) {\n return Math.sqrt((p2.x - p1.x) * (p2.x - p1.x) + (p2.y - p1.y) * (p2.y - p1.y))\n }", "function KochSnowflake(p1, p2, p3, p4, count) {\n\n\tdivide_face(p1, p2, p3, count);\n\n\tdivide_face(p3, p2, p4, count);\n\n\tdivide_face(p1, p4, p2, count);\n\n\tdivide_face(p1, p3, p4, count);\n\n\ttetrahedron(p1, p2, p3, p4);\n\n}", "function PlanarCoordinates() {\n var x1 = parseFloat(document.getElementById('x1').value);\n var y1 = parseFloat(document.getElementById('y1').value);\n var x2 = parseFloat(document.getElementById('x2').value);\n var y2 = parseFloat(document.getElementById('y2').value);\n var x3 = parseFloat(document.getElementById('x3').value);\n var y3 = parseFloat(document.getElementById('y3').value);\n\n var length = {\n lineLengthAtoB: countDistance(x1, y1, x2, y2),\n lineLengthBtoC: countDistance(x2, y2, x3, y3),\n lineLengthAtoC: countDistance(x1, y1, x3, y3)\n }\n\n function countDistance(varX1, varY1, varX2, varY2) {\n var result = Math.sqrt(((varX2 - varX1) * (varX2 - varX1)) +\n ((varY2 - varY1) * (varY2 - varY1)));\n\n return result;\n }\n\n var resultAtoB = Count(length.lineLengthAtoB.toString());\n var resultBtoC = Count(length.lineLengthBtoC.toString());\n var resultAtoC = Count(length.lineLengthAtoC.toString());\n\n function Count(str) {\n var i;\n var index = str.length;\n\n for (i = 0; i < str.length; i++) {\n if (str[i] === '.'.toString()) {\n index = i + 4;\n\n break;\n }\n }\n\n return str.substring(0, index);\n }\n\n var form = formTriangle(parseFloat(resultAtoB), parseFloat(resultBtoC), parseFloat(resultAtoC));\n\n function formTriangle(a, b, c) {\n var biggest = a;\n var second = b;\n var third = c;\n if (b > a && b > c) {\n biggest = b;\n second = a;\n } else if (c > a && c > b) {\n biggest = c;\n second = a;\n }\n\n var val = second + third;\n\n if (val > biggest) {\n return true;\n } else {\n return false;\n }\n }\n\n var endResult = 'Distanance:<br />A to B = <span style=\"color: red;\">' + resultAtoB + \n '</span><br />B to C = <span style=\"color: red;\">' + resultBtoC + '</span><br />A to C = <span style=\"color: red;\">' + \n resultAtoC + '</span><br />';\n endResult += 'Can the lines form a triangle? <span style=\"color: red;\">' + form + '</span>';\n\n document.getElementById('result1').innerHTML = '<h4>Result Task 1:</h4> ' + endResult;\n}", "function calculateArea(){\n // get all points\n pointObjects = [];\n for(var i=0; i<4; i++){\n pointObjects[i] = stage.getChildByName(\"corner\"+i);\n points[i] = new createjs.Point(pointObjects[i].x, pointObjects[i].y);\n }\n\n // pythagoras to get height\n heightX = Math.abs(points[0].x - points[3].x);\n heightY = Math.abs(points[0].y - points[3].y);\n height = Math.sqrt(Math.pow(heightX, 2) + Math.pow(heightY, 2));\n\n // pythagoras to get width\n widthX = Math.abs(points[2].x - points[3].x);\n widthY = Math.abs(points[2].y - points[3].y);\n width = Math.sqrt(Math.pow(widthX, 2) + Math.pow(widthY, 2));\n\n return Math.round(width * height);\n}", "function eachStrokeLen(sketch, points) {\r\n var sum = 0;\r\n for (var i = 1; i < points.length; i++) {\r\n var id1 = points[i - 1];\r\n var id2 = points[i];\r\n // console.log(id1);\r\n // console.log(sketch.pointsObj[id1]);\r\n var dis = distance(sketch.pointsObj[id1], sketch.pointsObj[id2]);\r\n sum += dis;\r\n }\r\n // console.log(\"each stroke length is \" + sum);\r\n return sum;\r\n}", "function hitDetection(claw, prizes) {\n console.log('im runnig');\n\n for(let i = 0; i <prizes.length; i++){\n if(claw_0.aveWidth() > prizes[i].x && \n claw_0.aveWidth() < prizes[i].x + prizes[i].width && \n claw_0.z === prizes[i].z &&\n claw_0.y - claw_0.height < prizes[i].height){\n claw_0.caught = true;\n return i;\n }\n }\n}", "function calcSize(points) {\n\t var area = 0,\n\t dist = 0;\n\n\t for (var i = 0, a, b; i < points.length - 1; i++) {\n\t a = b || points[i];\n\t b = points[i + 1];\n\n\t area += a[0] * b[1] - b[0] * a[1];\n\n\t // use Manhattan distance instead of Euclidian one to avoid expensive square root computation\n\t dist += Math.abs(b[0] - a[0]) + Math.abs(b[1] - a[1]);\n\t }\n\t points.area = Math.abs(area / 2);\n\t points.dist = dist;\n\t}", "function calcSize(points) {\n\t var area = 0,\n\t dist = 0;\n\t\n\t for (var i = 0, a, b; i < points.length - 1; i++) {\n\t a = b || points[i];\n\t b = points[i + 1];\n\t\n\t area += a[0] * b[1] - b[0] * a[1];\n\t\n\t // use Manhattan distance instead of Euclidian one to avoid expensive square root computation\n\t dist += Math.abs(b[0] - a[0]) + Math.abs(b[1] - a[1]);\n\t }\n\t points.area = Math.abs(area / 2);\n\t points.dist = dist;\n\t}", "function getPerimeter(length, width) {\n // Write your code here\n return 2 * (length + width);\n}", "function calcSize(points) {\n var area = 0,\n dist = 0;\n\n for (var i = 0, a, b; i < points.length - 1; i++) {\n a = b || points[i];\n b = points[i + 1];\n\n area += a[0] * b[1] - b[0] * a[1];\n\n // use Manhattan distance instead of Euclidian one to avoid expensive square root computation\n dist += Math.abs(b[0] - a[0]) + Math.abs(b[1] - a[1]);\n }\n points.area = Math.abs(area / 2);\n points.dist = dist;\n}", "function calcSize(points) {\n var area = 0,\n dist = 0;\n\n for (var i = 0, a, b; i < points.length - 1; i++) {\n a = b || points[i];\n b = points[i + 1];\n\n area += a[0] * b[1] - b[0] * a[1];\n\n // use Manhattan distance instead of Euclidian one to avoid expensive square root computation\n dist += Math.abs(b[0] - a[0]) + Math.abs(b[1] - a[1]);\n }\n points.area = Math.abs(area / 2);\n points.dist = dist;\n}", "function CalcWidth() {\n let a = gridSpacing * gridSpacing; // hypotenuse c^2\n let c = sqrt(a / 2);\n console.log(c);\n return c;\n}", "renderPoints(wL,wH,hL,hH,kPoints){\n\t\tconst w=this.canvas.width;\n\t\tlet rgba=[...this.rgba]; // spread is the fastest\n\t\tconst hd=this.hardness;\n\t\tconst fixedSoftEdge=this.antiAlias?2:0;\n\t\n\t\t// first sqrt\n\t\tfor(let k=0;k<kPoints.length;k++){ // each circle in sequence\n\t\t\tconst p=kPoints[k];\n\t\t\tconst r2=p[2]*p[2];\n\t\t\tconst rIn=p[2]*hd-fixedSoftEdge; // solid radius range, may be Negative!\n\t\t\tconst softRange=this.softness+fixedSoftEdge/p[2];\n\t\t\tconst rI2=rIn>0?rIn*rIn:0; // if rIn is negative: all soft\n\t\n\t\t\tconst jL=Math.max(Math.ceil(p[1]-p[2]),hL); // y lower bound\n\t\t\tconst jH=Math.min(Math.floor(p[1]+p[2]),hH); // y upper bound\n\t\t\t// The 2-hd is to compensate the soft edge opacity\n\t\t\tconst opa=p[3]*0xFFFF; // plate opacity 0~65535\n\n\t\t\tconst x=p[0];\n\t\t\tfor(let j=jL;j<=jH;j++){ // y-axis\n\t\t\t\tconst dy=j-p[1];\n\t\t\t\tconst dy2=dy*dy;\n\t\t\t\tconst sx=Math.sqrt(r2-dy2);\n\t\t\t\tconst solidDx=rI2>dy2?Math.sqrt(rI2-dy2):0; // dx range of not soft edge\n\t\t\t\tconst iL=Math.max(Math.ceil(x-sx),wL); // x lower bound\n\t\t\t\tconst iH=Math.min(Math.floor(x+sx),wH); // x upper bound\n\t\t\t\tlet idBuf=(j*w+iL)<<2;\n\t\t\t\tfor(let i=iL;i<=iH;i++){ // x-axis, this part is the most time consuming\n\t\t\t\t\tconst dx=i-x;\n\t\t\t\t\tif(dx<solidDx&&dx>-solidDx){ // must be solid\n\t\t\t\t\t\trgba[3]=Math.min(Math.round(opa),0xFFFF); // opacity of this point\n\t\t\t\t\t}\n\t\t\t\t\telse{ // this part is also time-consuming\n\t\t\t\t\t\t// distance to center(0~1)\n\t\t\t\t\t\tconst dis2Center=Math.sqrt((dx*dx+dy2)/r2);\n\t\t\t\t\t\trgba[3]=Math.min(Math.round(this.softEdge((1-dis2Center)/softRange)*opa),0xFFFF);\n\t\t\t\t\t}\n\t\t\t\t\tthis.blendFunction(this.buffer,idBuf,rgba,0);\n\t\t\t\t\tidBuf+=4; // avoid mult\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// submit a request to refresh the area within (wL~wH,hL~hH)\n\t\tthis.requestRefresh([wL,wH,hL,hH]);\n\t}", "function calculateSet(x0,y0,x,y, ratio, zoom){\n\n var a = (-2 + (x0 / x) * (1 + 2)) * zoom * ratio;\n var b = (-1 + (y0 / y) * (1 + 1)) * zoom * ratio;\n\n var ca = a;\n var cb = b;\n\n var i = 0;\n\n for (i ; i < MAX_ITER ; i++){\n var an = a * a - b * b;\n var bn = 2 * a * b;\n\n a = an + ca;\n b = bn + cb;\n\n if ( Math.pow(a,2) + Math.pow(b,2) > 4 ){\n break;\n }\n }\n\n return i;\n}", "function findSize(lyr) {\n var res = [];\n\n var exp = \"var obj = thisLayer.sourceRectAtTime();\\\n [obj.width,obj.height]\";\n var tempProp = lyr(\"ADBE Effect Parade\").addProperty(\"ADBE Point Control\");\n tempProp(1).expression = exp;\n res = tempProp(1).valueAtTime(0,false);\n tempProp.remove(); \n return res;\n }", "_updateClosetSlots(width) {\n let left_closet_face_x_value = this.faces.get(FaceOrientation.LEFT).X();\n let closetSlotFaces=this.getClosetSlotFaces();\n for(let i=0;i<closetSlotFaces.length;i++){\n if(i==0){\n closetSlotFaces[i].changeXAxis(left_closet_face_x_value+width);\n }else{\n closetSlotFaces[i].changeXAxis(closetSlotFaces[i-1].X()+width);\n }\n }\n }", "totalLength(){\n\n let clen = 0;\n let pts;\n\n for(let i = 0; i < this.nCurves; i++){\n let idx = i*2;\n pts = [ p5.Vector.add(this.cpts[idx], this.cpts[idx+1]).mult(0.5),\n this.cpts[idx+1],\n this.cpts[idx+2],\n p5.Vector.add(this.cpts[idx+2], this.cpts[idx+3]).mult(0.5)\n ];\n \n clen += this.segmentLength(pts);\n }\n\n return clen;\n\n }", "get mapWidth() {return ~~(Math.abs(zeach.mapLeft) + zeach.mapRight)}", "function countCoordinate (val){\n return (val * side ) + (side / 2);\n}", "function area(length, width) {\n console.log(length * width);\n}", "function SquereSurfaceArea(a, b) {\n return a * b;\n}", "function totalOptions(x, y, z, w) {\n let result = 0;\n\n const start = Date.now();\n\n let xCount, yCount, zCount;\n for(xCount = 0; xCount <= w; xCount += x) {\n // console.log(\"for 1: xCount=\" + xCount);\n for(yCount = 0; yCount <= w - xCount; yCount += y) {\n // console.log(\"----for 2: yCount=\" + yCount);\n for(zCount = 0; zCount <= w - yCount - xCount; zCount += z) {\n // console.log(\"--------for 3: zCount=\" + zCount);\n if(xCount + yCount + zCount === w) {\n // console.log(\"xCount:\",xCount, \"+\",\"yCount:\",yCount,\"+\",\"zCount\",zCount);\n result++;\n } \n }\n }\n }\n\n console.log(\"time: \" + (Date.now() - start));\n\n return result;\n}", "function getSizes(width, length, breadth) {\n let volume = width * length * breadth;\n let area = length * breadth;\n return [volume, area];\n}", "computeCatmullClarkPoints()\n { \n // Calcul des tous les face points\n for(var i = 0; i < this.polygones.length; ++i)\n {\n this.polygones[i].computeFacePoint();\n this.pushCatmullClarkVertex(this.polygones[i].facePoint);\n }\n \n // Calcul des tous les edge points\n for(var i = 0; i < this.edges.length; ++i)\n {\n this.edges[i].computeEdgePoint();\n this.pushCatmullClarkVertex(this.edges[i].edgePoint);\n }\n \n // Calcul des tous les vertice points\n for(var i = 0; i < this.vertice.length; ++i)\n {\n this.vertice[i].computeVertexPoint();\n this.pushCatmullClarkVertex(this.vertice[i].vertexPoint);\n }\n }", "function findPerimeter(length, width) {\n\tvar p = 2 * length + 2 * width\n return p\n}", "lengthSq() {\n return this.w * this.w + this.xyz.clone().lengthSq();\n }", "function calculateArea(width, heigth, depth) {\n\tvar area = width * heigth;\n\tvar volume = width * heigth * depth;\n\tvar sizes = [area, volume];\n\treturn sizes;\n}", "function roofVolume(depth, sweep, width){\n return triangleArea(depth, sweep, sweep)*width;\n}", "initializeUnitEnvelopes () {\n\n // initialize a sculpture with empty units\n let u = new Unit();\n this.sculpture = new KineticSculpture(this.axis);\n this.sculpture.unit = u;\n this.axis.sample(this.n);\n this.sculpture.layout(this.axis.samplingPoints);\n\n // get all cylinder radii with max distances of IPNS\n // IPNS: Intersecting Points of axis' every Normal planes with all curves in a Sketch\n for (let i=0;i<this.n;i++) { \n let u = this.sculpture.units.children[i];\n let top=-100,bottom=100,r=0;\n let normalPlane = this.axis.samplingNormalPlanes[i];\n for (let sketch of this.sketches) {\n for (let curve of sketch) {\n for (let line of curve.denseLines) {\n let point = new THREE.Vector3();\n // intersect curve with normal plane\n let intersection = normalPlane.intersectLine(line,point);\n if (intersection == undefined) {\n continue;\n } else {\n // convert intersecting point to UCS\n let p = u.worldToLocal(point);\n top = p.z > top ? p.z : top;\n bottom = p.z < bottom ? p.z : bottom;\n let re = Math.sqrt(p.x**2+p.y**2);\n r = re > r ? re : r;\n }\n }\n }\n }\n u.buildEnvelope(r,top,bottom);\n }\n }", "function findPerimeter(length, width) {\n return (length * 2) + (width * 2);\n}", "length() {\n return Math.sqrt(this.w * this.w + this.xyz.clone().lengthSq() );\n }", "function polypoint(w, h, sides, steps) {\n\n let centerX, centerY, lengthX, lengthY;\n let d, endpoint\n\n // find center point\n centerX = ( h/2 );\n centerY = ( w/2 );\n lengthX = (centerX-(h%steps) );\n lengthY = (centerY-(w%steps) );\n stepX = lengthX/steps\n stepY = lengthY/steps\n //_______ find end points_______\n // d = (2*pi/side) => d = ( 2*(Math.PI/side) )\n // will return the angle for\n d = angles(sides)\n // find the coords for each one. and return them as a tuple array to 2 decimals\n endpoints= new Array(sides).fill([])\n data = new Object\n\n for (let i = 0; i < sides; i++) {\n\n data[`_${i}`]={\n x:[Math.round( (lengthX*Math.cos(d*i)) +centerX)],\n y:[Math.round( (lengthY*Math.sin(d*i)) +centerY)]\n }\n\n endpoints[i] = [\n Math.round( (lengthX*Math.cos(d*i)) +centerX),\n Math.round( (lengthY*Math.sin(d*i)) +centerY)\n ];\n }\n endpoints.reverse()\n console.log(`endpoints ${endpoints}`.red);\n console.log(`data`.red, data);\n console.log(`variables lengthX ${lengthX}, lengthY ${lengthY}`.blue);\n console.log(`variables centerX ${centerX}, centerY ${centerY}`.blue);\n\n // there are steps involving changing it to a SVG coord system\n\n // create the step arrays.\n // find step length\nconsole.log(\"endpoints\".blue,endpoints);\n for (let i = 0; i < endpoints.length; i++) {\n for (let j = 1; j < sides; j++) {\n if (centerX < endpoints[i][0]) {//\n\n endpoints[i].push(centerX,endpoints[i][1]-j*stepX)\n\n }else if (centerX > endpoints[i][0]) {//\n\n endpoints[i].push(centerX,endpoints[i][1]+j*stepX)\n\n }else if (centerX == endpoints[i][0] ) {\n\n endpoints[i].push(endpoints[i][0]+j*stepX,centerX)\n\n }else if (centerY < endpoints[i][1]) {\n\n endpoints[i].push(endpoints[i][1]-j*stepY,centerY)\n\n }\n else if (centerY > endpoints[i][1]) {\n\n endpoints[i].push(endpoints[i][1]+j*stepY,centerY)\n\n }else if (centerY == endpoints[i][1] ) {\n\n endpoints[i].push(endpoints[i][1]+j*stepY,centerY)\n\n }\n }\n }\n console.log(\"endpoints\".green,endpoints);\n for (let i = 0; i < endpoints.length; i++) {\n if (i%2 == 0) {// reverse in pairs\n endpoints[i].reverse()\n }\n }\n console.log(\"endpoints\".green,endpoints);\n /*\n\n console.log(`endpoints`.red,endpoints );\n console.log(`variables lengthX ${lengthX}, lengthY ${lengthY}`.blue);\n console.log(`variables centerX ${centerX}, centerY ${centerY}`.blue);\n\n*/\n\n/*\n{\n _1:{ x:[1,2,4,5],y:[1,2,3,4] },\n _2:{ x:[1,2,4,5],y:[1,2,3,4] },\n _3:{ x:[1,2,4,5],y:[1,2,3,4] },\n _4:{ x:[1,2,4,5],y:[1,2,3,4] }\n}\n*/\n\n\n console.log(\n `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${w}px\" height=\"${h}\" viewbox=\"0 0 ${w} ${h}\">\n <g class=\"polypoint\" id=\"_${sides}_${steps}\">`.green\n +\n `<polygon points=\"${endpoints}\" />`.green\n +\n `</g>\n </svg>`.green);\n}", "length () {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }", "length () {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }", "get Width() { return this.x2 - this.x1; }", "get Width() { return this.x2 - this.x1; }", "function getPerimeter(width, length) {\n return (width * 2) + (length * 2);\n}", "function mulheres(sx, fl, sl) {\r\n\tvar cont = 0;\r\n\r\n\tfor (var i = 0; i < sx.length; i++) {\r\n\t\tif (sx[i] == \"F\" && fl[i] == 3 && sl[i] <= 500) {\r\n\t\t\tcont = cont + 1;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn cont;\r\n}", "_size_elements () {\n\n\t\tvar w = this.context.canvas.width\n\t\tvar h = this.context.canvas.height\n\t\tvar cw = this._deck_blue ['musician']._face_img.width\n\t\tvar ch = this._deck_blue ['musician']._face_img.height\n\n\t\tvar scale_x = (w * 0.9 / 8.0) / cw\n\t\tvar scale_y = (h / 4.0) / ch\n\t\tvar scale = Math.min (scale_x, scale_y)\n\n\t\tfor (var name in this._deck_blue) {\n\t\t\tthis._deck_blue [name].set_size (cw * scale)\n\t\t}\n\t\tfor (var name in this._deck_red) {\n\t\t\tthis._deck_red [name].set_size (cw * scale)\n\t\t}\n\t}", "function areaOfScaleneTriangle(a, b, c) {\n\n const s = calculateSemiPerimeter(a, b, c);\n return Math.sqrt(s * (s - a) * (s - b) * (s - c))\n\n}", "surfaceArea() {\n return 2 * (this.length * this.width + this.length * this.height + this.width * this.height);\n }", "function tp_min_width(layers)\n{\n\tvar min_width = Number.MAX_VALUE;\n\tfor (var i = 0; i < layers.length; i++)\n\t\tmin_width = Math.min(min_width, layers[i].bounds[2].value - layers[i].bounds[0].value);\n\n\treturn min_width;\n}", "function getCircleSymbolSize(departures) {\n switch (true) {\n case (departures < 6700):\n return 10\n case (departures > 6700 && departures < 12000):\n return 15\n case (departures >= 12000):\n return 20\n }\n}", "function markerSize(magnitude) {\n if (magnitude < 1) {\n return 5;\n }\n else if (magnitude < 2) {\n return 10;\n }\n else if (magnitude < 3) {\n return 20;\n }\n else if (magnitude < 4) {\n return 30;\n }\n else if (magnitude < 5) {\n return 40;\n }\n else {\n return 50;\n }\n}", "getSurfaceArea() {\n const surfaceArea = 6 * Math.pow(this.length, 2);\n return +surfaceArea.toFixed(3);\n }", "function SizeOfShirt(shirtWidth, shirtLength, shirtSleeve) {\n if (shirtWidth >= 28 && shirtLength >= 34 && shirtSleeve >= 10.13) {\n console.log(\"3XL\");\n } else if (\n shirtWidth >= 26 &&\n shirtLength >= 33 &&\n (shirtSleeve >= 9.63 && shirtSleeve < 10.13)\n ) {\n console.log(\"2XL\");\n } else if (\n shirtWidth >= 24 &&\n shirtLength >= 31 &&\n (shirtSleeve >= 8.88 && shirtSleeve < 9.63)\n ) {\n console.log(\"XL\");\n } else if (\n shirtWidth >= 22 &&\n shirtLength >= 30 &&\n (shirtSleeve >= 8.63 && shirtSleeve < 8.88)\n ) {\n console.log(\"L\");\n } else if (\n shirtWidth >= 20 &&\n shirtLength >= 29 &&\n (shirtSleeve >= 8.38 && shirtSleeve < 8.63)\n ) {\n console.log(\"M\");\n } else if (\n shirtWidth >= 18 &&\n shirtLength >= 28 &&\n (shirtSleeve >= 8.13 && shirtSleeve < 8.38)\n ) {\n console.log(\"S\");\n } else {\n console.log(\"N/A\");\n }\n}", "function calculateActualDoorDimension(width, height, type) {\n\n //If the type is Cabana, perform the following block\n if (type === 'Cabana') {\n //Return width and height, may change if the model is M400\n return {\n width: (model === 'M400') ? width + 3.625 : width + 2.125,\n height: (model === 'M400') ? height + 2.125 : height + 0.875\n };\n }\n //If the type is French, perform the following block\n else if (type === 'French') {\n //Return width and height, may change if the model is M400\n return {\n width: (model === 'M400') ? ((width/2 + 3.625) - 1.625)*2 + 2 : ((width/2 + 2.125) - 1.625)*2 + 2,\n height: (model === 'M400') ? height + 2.125 : height + 0.875\n };\n }\n //If the type is Patio, perform the following block\n else if (type == 'Patio') {\n //Return width and height, may change if the model is M400\n return {\n width: (model === 'M400') ? width + 3.625 : width + 2.125,\n height: (model === 'M400') ? height + 1.625 : height + 1.125\n };\n }\n //Else, perform the following block\n else {\n //Return width and height, no changes for no door (Open space)\n return {\n width: width,\n height: height\n };\n }\n}", "function ccw(c) {\n\t var n = c.length\n\t var area = [0]\n\t for(var j=0; j<n; ++j) {\n\t var a = positions[c[j]]\n\t var b = positions[c[(j+1)%n]]\n\t var t00 = twoProduct(-a[0], a[1])\n\t var t01 = twoProduct(-a[0], b[1])\n\t var t10 = twoProduct( b[0], a[1])\n\t var t11 = twoProduct( b[0], b[1])\n\t area = robustSum(area, robustSum(robustSum(t00, t01), robustSum(t10, t11)))\n\t }\n\t return area[area.length-1] > 0\n\t }", "function ccw(c) {\n\t var n = c.length\n\t var area = [0]\n\t for(var j=0; j<n; ++j) {\n\t var a = positions[c[j]]\n\t var b = positions[c[(j+1)%n]]\n\t var t00 = twoProduct(-a[0], a[1])\n\t var t01 = twoProduct(-a[0], b[1])\n\t var t10 = twoProduct( b[0], a[1])\n\t var t11 = twoProduct( b[0], b[1])\n\t area = robustSum(area, robustSum(robustSum(t00, t01), robustSum(t10, t11)))\n\t }\n\t return area[area.length-1] > 0\n\t }", "function cahillKeyesRaw(mg) {\n var CK = {\n lengthMG: mg // magic scaling length\n };\n\n preliminaries();\n\n function preliminaries() {\n var pointN, lengthMB, lengthMN, lengthNG, pointU;\n var m = 29, // meridian\n p = 15, // parallel\n p73a,\n lF,\n lT,\n lM,\n l,\n pointV,\n k = sqrt(3);\n\n CK.lengthMA = 940 / 10000 * CK.lengthMG;\n CK.lengthParallel0to73At0 = CK.lengthMG / 100;\n CK.lengthParallel73to90At0 =\n (CK.lengthMG - CK.lengthMA - CK.lengthParallel0to73At0 * 73) / (90 - 73);\n CK.sin60 = k / 2; // √3/2 \n CK.cos60 = 0.5;\n CK.pointM = [0, 0];\n CK.pointG = [CK.lengthMG, 0];\n pointN = [CK.lengthMG, CK.lengthMG * tan(30 * radians)];\n CK.pointA = [CK.lengthMA, 0];\n CK.pointB = lineIntersection(CK.pointM, 30, CK.pointA, 45);\n CK.lengthAG = distance(CK.pointA, CK.pointG);\n CK.lengthAB = distance(CK.pointA, CK.pointB);\n lengthMB = distance(CK.pointM, CK.pointB);\n lengthMN = distance(CK.pointM, pointN);\n lengthNG = distance(pointN, CK.pointG);\n CK.pointD = interpolate(lengthMB, lengthMN, pointN, CK.pointM);\n CK.pointF = [CK.lengthMG, lengthNG - lengthMB];\n CK.pointE = [\n pointN[0] - CK.lengthMA * sin(30 * radians),\n pointN[1] - CK.lengthMA * cos(30 * radians)\n ];\n CK.lengthGF = distance(CK.pointG, CK.pointF);\n CK.lengthBD = distance(CK.pointB, CK.pointD);\n CK.lengthBDE = CK.lengthBD + CK.lengthAB; // lengthAB = lengthDE \n CK.lengthGFE = CK.lengthGF + CK.lengthAB; // lengthAB = lengthFE \n CK.deltaMEq = CK.lengthGFE / 45;\n CK.lengthAP75 = (90 - 75) * CK.lengthParallel73to90At0;\n CK.lengthAP73 = CK.lengthMG - CK.lengthMA - CK.lengthParallel0to73At0 * 73;\n pointU = [\n CK.pointA[0] + CK.lengthAP73 * cos(30 * radians),\n CK.pointA[1] + CK.lengthAP73 * sin(30 * radians)\n ];\n CK.pointT = lineIntersection(pointU, -60, CK.pointB, 30);\n\n p73a = parallel73(m);\n lF = p73a.lengthParallel73;\n lT = lengthTorridSegment(m);\n lM = lengthMiddleSegment(m);\n l = p * (lT + lM + lF) / 73;\n pointV = [0, 0];\n CK.pointC = [0, 0];\n CK.radius = 0;\n\n l = l - lT;\n pointV = interpolate(l, lM, jointT(m), jointF(m));\n CK.pointC[1] =\n (pointV[0] * pointV[0] +\n pointV[1] * pointV[1] -\n CK.pointD[0] * CK.pointD[0] -\n CK.pointD[1] * CK.pointD[1]) /\n (2 * (k * pointV[0] + pointV[1] - k * CK.pointD[0] - CK.pointD[1]));\n CK.pointC[0] = k * CK.pointC[1];\n CK.radius = distance(CK.pointC, CK.pointD);\n\n return CK;\n }\n\n //**** helper functions ****//\n\n // distance between two 2D coordinates\n\n function distance(p1, p2) {\n var deltaX = p1[0] - p2[0],\n deltaY = p1[1] - p2[1];\n return sqrt(deltaX * deltaX + deltaY * deltaY);\n }\n\n // return 2D point at position length/totallength of the line\n // defined by two 2D points, start and end.\n\n function interpolate(length, totalLength, start, end) {\n var xy = [\n start[0] + (end[0] - start[0]) * length / totalLength,\n start[1] + (end[1] - start[1]) * length / totalLength\n ];\n return xy;\n }\n\n // return the 2D point intersection between two lines defined\n // by one 2D point and a slope each.\n\n function lineIntersection(point1, slope1, point2, slope2) {\n // s1/s2 = slope in degrees\n var m1 = tan(slope1 * radians),\n m2 = tan(slope2 * radians),\n p = [0, 0];\n p[0] =\n (m1 * point1[0] - m2 * point2[0] - point1[1] + point2[1]) / (m1 - m2);\n p[1] = m1 * (p[0] - point1[0]) + point1[1];\n return p;\n }\n\n // return the 2D point intercepting a circumference centered\n // at cc and of radius rn and a line defined by 2 points, p1 and p2:\n // First element of the returned array is a flag to state whether there is\n // an intersection, a value of zero (0) means NO INTERSECTION.\n // The following array is the 2D point of the intersection.\n // Equations from \"Intersection of a Line and a Sphere (or circle)/Line Segment\"\n // at http://paulbourke.net/geometry/circlesphere/\n function circleLineIntersection(cc, r, p1, p2) {\n var x1 = p1[0],\n y1 = p1[1],\n x2 = p2[0],\n y2 = p2[1],\n xc = cc[0],\n yc = cc[1],\n a = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1),\n b = 2 * ((x2 - x1) * (x1 - xc) + (y2 - y1) * (y1 - yc)),\n c =\n xc * xc + yc * yc + x1 * x1 + y1 * y1 - 2 * (xc * x1 + yc * y1) - r * r,\n d = b * b - 4 * a * c,\n u1 = 0,\n u2 = 0,\n x = 0,\n y = 0;\n if (a === 0) {\n return [0, [0, 0]];\n } else if (d < 0) {\n return [0, [0, 0]];\n }\n u1 = (-b + sqrt(d)) / (2 * a);\n u2 = (-b - sqrt(d)) / (2 * a);\n if (0 <= u1 && u1 <= 1) {\n x = x1 + u1 * (x2 - x1);\n y = y1 + u1 * (y2 - y1);\n return [1, [x, y]];\n } else if (0 <= u2 && u2 <= 1) {\n x = x1 + u2 * (x2 - x1);\n y = y1 + u2 * (y2 - y1);\n return [1, [x, y]];\n } else {\n return [0, [0, 0]];\n }\n }\n\n // counterclockwise rotate 2D vector, xy, by angle (in degrees)\n // [original CKOG uses clockwise rotation]\n\n function rotate(xy, angle) {\n var xynew = [0, 0];\n\n if (angle === -60) {\n xynew[0] = xy[0] * CK.cos60 + xy[1] * CK.sin60;\n xynew[1] = -xy[0] * CK.sin60 + xy[1] * CK.cos60;\n } else if (angle === -120) {\n xynew[0] = -xy[0] * CK.cos60 + xy[1] * CK.sin60;\n xynew[1] = -xy[0] * CK.sin60 - xy[1] * CK.cos60;\n } else {\n // !!!!! This should not happen for this projection!!!!\n // the general algorith: cos(angle) * xy + sin(angle) * perpendicular(xy)\n // return cos(angle * radians) * xy + sin(angle * radians) * perpendicular(xy);\n //console.log(\"rotate: angle \" + angle + \" different than -60 or -120!\");\n // counterclockwise\n xynew[0] = xy[0] * cos(angle * radians) - xy[1] * sin(angle * radians);\n xynew[1] = xy[0] * sin(angle * radians) + xy[1] * cos(angle * radians);\n }\n\n return xynew;\n }\n\n // truncate towards zero like int() in Perl\n function truncate(n) {\n return Math[n > 0 ? \"floor\" : \"ceil\"](n);\n }\n\n function equator(m) {\n var l = CK.deltaMEq * m,\n jointE = [0, 0];\n if (l <= CK.lengthGF) {\n jointE = [CK.pointG[0], l];\n } else {\n l = l - CK.lengthGF;\n jointE = interpolate(l, CK.lengthAB, CK.pointF, CK.pointE);\n }\n return jointE;\n }\n\n function jointE(m) {\n return equator(m);\n }\n\n function jointT(m) {\n return lineIntersection(CK.pointM, 2 * m / 3, jointE(m), m / 3);\n }\n\n function jointF(m) {\n if (m === 0) {\n return [CK.pointA + CK.lengthAB, 0];\n }\n var xy = lineIntersection(CK.pointA, m, CK.pointM, 2 * m / 3);\n return xy;\n }\n\n function lengthTorridSegment(m) {\n return distance(jointE(m), jointT(m));\n }\n\n function lengthMiddleSegment(m) {\n return distance(jointT(m), jointF(m));\n }\n\n function parallel73(m) {\n var p73 = [0, 0],\n jF = jointF(m),\n lF = 0,\n xy = [0, 0];\n if (m <= 30) {\n p73[0] = CK.pointA[0] + CK.lengthAP73 * cos(m * radians);\n p73[1] = CK.pointA[1] + CK.lengthAP73 * sin(m * radians);\n lF = distance(jF, p73);\n } else {\n p73 = lineIntersection(CK.pointT, -60, jF, m);\n lF = distance(jF, p73);\n if (m > 44) {\n xy = lineIntersection(CK.pointT, -60, jF, 2 / 3 * m);\n if (xy[0] > p73[0]) {\n p73 = xy;\n lF = -distance(jF, p73);\n }\n }\n }\n return {\n parallel73: p73,\n lengthParallel73: lF\n };\n }\n\n function parallel75(m) {\n return [\n CK.pointA[0] + CK.lengthAP75 * cos(m * radians),\n CK.pointA[1] + CK.lengthAP75 * sin(m * radians)\n ];\n }\n\n // special functions to transform lon/lat to x/y\n function ll2mp(lon, lat) {\n var south = [0, 6, 7, 8, 5],\n o = truncate((lon + 180) / 90 + 1),\n p, // parallel\n m = (lon + 720) % 90 - 45, // meridian\n s = sign(m);\n\n m = abs(m);\n if (o === 5) o = 1;\n if (lat < 0) o = south[o];\n p = abs(lat);\n return [m, p, s, o];\n }\n\n function zoneA(m, p) {\n return [CK.pointA[0] + (90 - p) * 104, 0];\n }\n\n function zoneB(m, p) {\n return [CK.pointG[0] - p * 100, 0];\n }\n\n function zoneC(m, p) {\n var l = 104 * (90 - p);\n return [\n CK.pointA[0] + l * cos(m * radians),\n CK.pointA[1] + l * sin(m * radians)\n ];\n }\n\n function zoneD(m /*, p */) {\n // p = p; // just keep it for symmetry in signature\n return equator(m);\n }\n\n function zoneE(m, p) {\n var l = 1560 + (75 - p) * 100;\n return [\n CK.pointA[0] + l * cos(m * radians),\n CK.pointA[1] + l * sin(m * radians)\n ];\n }\n\n function zoneF(m, p) {\n return interpolate(p, 15, CK.pointE, CK.pointD);\n }\n\n function zoneG(m, p) {\n var l = p - 15;\n return interpolate(l, 58, CK.pointD, CK.pointT);\n }\n\n function zoneH(m, p) {\n var p75 = parallel75(45),\n p73a = parallel73(m),\n p73 = p73a.parallel73,\n lF = distance(CK.pointT, CK.pointB),\n lF75 = distance(CK.pointB, p75),\n l = (75 - p) * (lF75 + lF) / 2,\n xy = [0, 0];\n if (l <= lF75) {\n xy = interpolate(l, lF75, p75, CK.pointB);\n } else {\n l = l - lF75;\n xy = interpolate(l, lF, CK.pointB, p73);\n }\n return xy;\n }\n\n function zoneI(m, p) {\n var p73a = parallel73(m),\n lT = lengthTorridSegment(m),\n lM = lengthMiddleSegment(m),\n l = p * (lT + lM + p73a.lengthParallel73) / 73,\n xy;\n if (l <= lT) {\n xy = interpolate(l, lT, jointE(m), jointT(m));\n } else if (l <= lT + lM) {\n l = l - lT;\n xy = interpolate(l, lM, jointT(m), jointF(m));\n } else {\n l = l - lT - lM;\n xy = interpolate(l, p73a.lengthParallel73, jointF(m), p73a.parallel73);\n }\n return xy;\n }\n\n function zoneJ(m, p) {\n var p75 = parallel75(m),\n lF75 = distance(jointF(m), p75),\n p73a = parallel73(m),\n p73 = p73a.parallel73,\n lF = p73a.lengthParallel73,\n l = (75 - p) * (lF75 - lF) / 2,\n xy = [0, 0];\n\n if (l <= lF75) {\n xy = interpolate(l, lF75, p75, jointF(m));\n } else {\n l = l - lF75;\n xy = interpolate(l, -lF, jointF(m), p73);\n }\n return xy;\n }\n\n function zoneK(m, p, l15) {\n var l = p * l15 / 15,\n lT = lengthTorridSegment(m),\n lM = lengthMiddleSegment(m),\n xy = [0, 0];\n if (l <= lT) {\n // point is in torrid segment\n xy = interpolate(l, lT, jointE(m), jointT(m));\n } else {\n // point is in middle segment\n l = l - lT;\n xy = interpolate(l, lM, jointT(m), jointF(m));\n }\n return xy;\n }\n\n function zoneL(m, p, l15) {\n var p73a = parallel73(m),\n p73 = p73a.parallel73,\n lT = lengthTorridSegment(m),\n lM = lengthMiddleSegment(m),\n xy,\n lF = p73a.lengthParallel73,\n l = l15 + (p - 15) * (lT + lM + lF - l15) / 58;\n if (l <= lT) {\n //on torrid segment\n xy = interpolate(l, lT, jointE(m), jointF(m));\n } else if (l <= lT + lM) {\n //on middle segment\n l = l - lT;\n xy = interpolate(l, lM, jointT(m), jointF(m));\n } else {\n //on frigid segment\n l = l - lT - lM;\n xy = interpolate(l, lF, jointF(m), p73);\n }\n return xy;\n }\n\n // convert half-octant meridian,parallel to x,y coordinates.\n // arguments are meridian, parallel\n\n function mp2xy(m, p) {\n var xy = [0, 0],\n lT,\n p15a,\n p15,\n flag15,\n l15;\n\n if (m === 0) {\n // zones (a) and (b)\n if (p >= 75) {\n xy = zoneA(m, p);\n } else {\n xy = zoneB(m, p);\n }\n } else if (p >= 75) {\n xy = zoneC(m, p);\n } else if (p === 0) {\n xy = zoneD(m, p);\n } else if (p >= 73 && m <= 30) {\n xy = zoneE(m, p);\n } else if (m === 45) {\n if (p <= 15) {\n xy = zoneF(m, p);\n } else if (p <= 73) {\n xy = zoneG(m, p);\n } else {\n xy = zoneH(m, p);\n }\n } else {\n if (m <= 29) {\n xy = zoneI(m, p);\n } else {\n // supple zones (j), (k) and (l)\n if (p >= 73) {\n xy = zoneJ(m, p);\n } else {\n //zones (k) and (l)\n p15a = circleLineIntersection(\n CK.pointC,\n CK.radius,\n jointT(m),\n jointF(m)\n );\n flag15 = p15a[0];\n p15 = p15a[1];\n lT = lengthTorridSegment(m);\n if (flag15 === 1) {\n // intersection is in middle segment\n l15 = lT + distance(jointT(m), p15);\n } else {\n // intersection is in torrid segment\n p15a = circleLineIntersection(\n CK.pointC,\n CK.radius,\n jointE(m),\n jointT(m)\n );\n flag15 = p15a[0];\n p15 = p15a[1];\n l15 = lT - distance(jointT(m), p15);\n }\n if (p <= 15) {\n xy = zoneK(m, p, l15);\n } else {\n //zone (l)\n xy = zoneL(m, p, l15);\n }\n }\n }\n }\n return xy;\n }\n\n // from half-octant to megamap (single rotated octant)\n\n function mj2g(xy, octant) {\n var xynew = [0, 0];\n\n if (octant === 0) {\n xynew = rotate(xy, -60);\n } else if (octant === 1) {\n xynew = rotate(xy, -120);\n xynew[0] -= CK.lengthMG;\n } else if (octant === 2) {\n xynew = rotate(xy, -60);\n xynew[0] -= CK.lengthMG;\n } else if (octant === 3) {\n xynew = rotate(xy, -120);\n xynew[0] += CK.lengthMG;\n } else if (octant === 4) {\n xynew = rotate(xy, -60);\n xynew[0] += CK.lengthMG;\n } else if (octant === 5) {\n xynew = rotate([2 * CK.lengthMG - xy[0], xy[1]], -60);\n xynew[0] += CK.lengthMG;\n } else if (octant === 6) {\n xynew = rotate([2 * CK.lengthMG - xy[0], xy[1]], -120);\n xynew[0] -= CK.lengthMG;\n } else if (octant === 7) {\n xynew = rotate([2 * CK.lengthMG - xy[0], xy[1]], -60);\n xynew[0] -= CK.lengthMG;\n } else if (octant === 8) {\n xynew = rotate([2 * CK.lengthMG - xy[0], xy[1]], -120);\n xynew[0] += CK.lengthMG;\n } else {\n // TODO trap this some way.\n // ERROR!\n // print \"Error converting to M-map coordinates; there is no Octant octant!\\n\";\n //console.log(\"mj2g: something weird happened!\");\n return xynew;\n }\n\n return xynew;\n }\n\n // general CK map projection\n\n function forward(lambda, phi) {\n // lambda, phi are in radians.\n var lon = lambda * degrees,\n lat = phi * degrees,\n res = ll2mp(lon, lat),\n m = res[0], // 0 ≤ m ≤ 45\n p = res[1], // 0 ≤ p ≤ 90\n s = res[2], // -1 / 1 = side of m\n o = res[3], // octant\n xy = mp2xy(m, p),\n mm = mj2g([xy[0], s * xy[1]], o);\n\n return mm;\n }\n\n return forward;\n}", "function getOffersCnt(w){var c=4;if(w<480){c=2;}else if(w<680){c=3;}return c;}", "identifyConcavePoints() {\n\n //for each point in the fixture we need to remove it then calculate the area if the area is greater without it then that point was a concave point\n this.concavePoints = [];\n this.maybeConcave = [];\n let originalArea = this.calculateArea(this.pixelVectorsLeft);\n let concavePointLabels = [];\n for (let i = 0; i < this.pixelVectorsLeft.length; i++) {\n let newVecs = [];\n for (let v of this.pixelVectorsLeft) {\n if (v !== this.pixelVectorsLeft[i]) {\n newVecs.push(v);\n }\n }\n //if removing this point creates a line cross then our algorithm for calculating area doesnt work, so we need to assume its a concave point\n this.maybeConcave.push(this.anyLinesCross(newVecs));\n //if removing this point increases the area of the shape then this point is concave\n this.concavePoints.push(originalArea < this.calculateArea(newVecs));\n }\n }", "function posCalc(){\n var width = document.innerWidth;\n var colLength = width/3;\n }", "tracePerimeter(p1, p2, includeOriginalPoints=false) {\n let points\n\n if ((p1.x === p2.x && Math.abs(p1.x) === this.sizeX) || (p1.y === p2.y && (Math.abs(p1.y) === this.sizeY))) {\n // on the same line; no connecting points needed\n points = []\n } else {\n // horizontal or vertical orientation; some gentle rounding to ensure we don't\n // end up within incorrect reading\n const lp1 = vertexRoundP(p1, 3)\n const lp2 = vertexRoundP(p2, 3)\n const o1 = Math.abs(lp1.x) === this.sizeX ? 'v' : 'h'\n const o2 = Math.abs(lp2.x) === this.sizeX ? 'v' : 'h'\n\n if (o1 !== o2) {\n // connects via a single corner\n points = (o1 === 'h') ?\n [new Victor(p2.x, p1.y)] :\n [new Victor(p1.x, p2.y)]\n } else {\n // connects via two corners; find the shortest way around\n if (o1 === 'h') {\n let d1 = -2*this.sizeX - p1.x - p2.x\n let d2 = 2*this.sizeX - p1.x - p2.x\n let xSign = Math.abs(d1) > Math.abs(d2) ? 1 : -1\n\n points = [\n new Victor(Math.sign(xSign)*this.sizeX, Math.sign(p1.y)*this.sizeY),\n new Victor(Math.sign(xSign)*this.sizeX, -Math.sign(p1.y)*this.sizeY)\n ]\n } else {\n let d1 = -2*this.sizeY - p1.y - p2.y\n let d2 = 2*this.sizeY - p1.y - p2.y\n let ySign = Math.abs(d1) > Math.abs(d2) ? 1 : -1\n\n points = [\n new Victor(Math.sign(p1.x)*this.sizeX, Math.sign(ySign)*this.sizeY),\n new Victor(-Math.sign(p1.x)*this.sizeX, Math.sign(ySign)*this.sizeY),\n ]\n }\n }\n }\n\n if (includeOriginalPoints) {\n points.unshift(p1)\n points.push(p2)\n }\n\n return points\n }", "function volumeOfBox(sizes) {\n let x = sizes.width * sizes.length * sizes.height;\n return x;\n}", "function vectorOfPoints(lat1, lon1, lat2, lon2,displayed_text,displayed_distance,manipulation=0,\n fontLocation=\"Helvetica\", fontSizeLocation=25, fontDistance=\"Helvetica\", fontSizeDistance=25, displayed_amount) {\n var start = 500;\n var length = 490;\n var length_of_text = Math.round(getWidthOfText(displayed_text,fontLocation, fontSizeLocation*fontCorrection(displayed_distance)+\"px\"))\n\tif (mapSettings[0].mode==\"distance\"){\n\t\tvar length_of_textDist = Math.round(getWidthOfText(displayed_distance+\" km\",fontDistance,fontSizeDistance*fontCorrection(displayed_distance)+\"px\"\t))\n\t }\n\tif (mapSettings[0].mode==\"amount\"){\n\t\tvar length_of_textDist = Math.round(getWidthOfText(displayed_amount +\" €\",fontDistance,fontSizeDistance*fontCorrection(displayed_distance)+\"px\"\t))\n\t }\n\n// Calculate the distance between two coordinates https://planetcalc.com/713/\n\n\t\t\tvar Calculate712_result = {};\n\n\t\t\tvar la1 = lat1 //default: 28.1272222222\n\t\t\tvar lo1 = lon1 //default: -15.4313888889\n\t\t\tvar la2 = lat2 //default: 13.0961111111\n\t\t\tvar lo2 = lon2 //default: -59.6083333333\n\t\t\tvar ellipseType = \"wgs84\"\n\t\t\tvar angleL = {\n\t\t\t\t\t\"SetValue\": function(v) {\n\t\t\t\t\t\t\tCalculate712_result[\"angleL\"] = v;\n\t\t\t\t\t}\n\t\t\t};\n\t\t\tvar distanceM = {\n\t\t\t\t\t\"SetValue\": function(v) {\n\t\t\t\t\t\t\tCalculate712_result[\"distanceM\"] = v;\n\t\t\t\t\t}\n\t\t\t};\n\t\t\tvar distanceNMI = {\n\t\t\t\t\t\"SetValue\": function(v) {\n\t\t\t\t\t\t\tCalculate712_result[\"distanceNMI\"] = v;\n\t\t\t\t\t}\n\t\t\t};\n\t\t\tfunction rad(a) {\n\t\t\t\t\treturn Math.PI * a / 180;\n\t\t\t}\n\t\t\tfunction grad(a) {\n\t\t\t\t\treturn 180 * a / Math.PI;\n\t\t\t}\n\n\t\t\tfunction meridionalD(a) {\n\t\t\t\t\treturn Math.tan(rad(45 + a / 2));\n\t\t\t}\n\n\t\t\tfunction geoidD(a, e) {\n\t\t\t\t\treturn Math.pow((1 - e * Math.sin(rad(a))) / (1 + e * Math.sin(rad(a))), e / 2);\n\t\t\t}\n\t\t\tfunction abs(a) {\n\t\t\t\t\treturn a < 0 ? -a : a;\n\t\t\t}\n\t\t\tfunction calcDestination(e, la1, lo1, la2, lo2) {\n\t\t\t\t\tvar lD = lo2 - lo1;\n\t\t\t\t\tif (abs(lD) > 180)\n\t\t\t\t\t\t\tlD = lD < 0 ? 360 + lD : -360 + lD;\n\n\t\t\t\t\tvar rRes = Math.atan2(rad(lD), (Math.log(meridionalD(la2) * geoidD(la2, e)) - Math.log(meridionalD(la1) * geoidD(la1, e))));\n\t\t\t\t\tvar arcLen = (la2 - la1) ? ((1 - e * e / 4) * rad(la2 - la1) - (3 / 8) * e * e * (Math.sin(2 * rad(la2)) - Math.sin(2 * rad(la1)))) / Math.cos(rRes) : (lo2 - lo1) ? Math.cos(rad(la1)) * Math.abs(rad(lo2 - lo1)) : 0;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\"arc\": arcLen,\n\t\t\t\t\t\t\t\"rhumb\": rRes\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar ellipsoids = {\n\t\t\t\t\t\"wgs84\": {\n\t\t\t\t\t\t\t\"min\": 6356752.314,\n\t\t\t\t\t\t\t\"max\": 6378137\n\t\t\t\t\t},\n\t\t\t\t\t\"sk42\": {\n\t\t\t\t\t\t\t\"min\": 6356863,\n\t\t\t\t\t\t\t\"max\": 6378245\n\t\t\t\t\t},\n\t\t\t\t\t\"sphere\": {\n\t\t\t\t\t\t\t\"min\": 6378137,\n\t\t\t\t\t\t\t\"max\": 6378137\n\t\t\t\t\t}\n\t\t\t};\n\t\t\tif (ellipseType === undefined)\n\t\t\t\t\tellipseType = \"wgs84\";\n\t\t\tvar geoid = ellipsoids[ellipseType];\n\t\t\tvar a2 = geoid.max * geoid.max;\n\t\t\tvar b2 = geoid.min * geoid.min;\n\t\t\tvar e = Math.sqrt((a2 - b2) / a2);\n\t\t\tvar res1 = calcDestination(e, la1, lo1, la2, lo2, geoid.max);\n\t\t\tvar res2 = calcDestination(e, la1, lo1, la2, lo2 + 360, geoid.max);\n\t\t\tvar res = (res2.arc < res1.arc) ? res2 : res1;\n\t\t\tvar aRes = grad(res.rhumb);\n\t\t\tif (aRes < 0) {\n\t\t\t\t\taRes = 360 + aRes\n\t\t\t}\n\t\t\t;angleL.SetValue(aRes);\n\t\t\tvar len = geoid.max * res.arc;\n\n\t\t\tangle = aRes-90\n\n// continue\n\n var text_angle = angle;\n if (angle > 90 & angle < 180) {text_angle = angle + 180} //transform in a way to be readible as a poster e.g. not turned around\n if (angle > 180 & angle < 270) {text_angle = angle - 180}\n\n var start_x = start + 0.95* length * Math.cos(angle * Math.PI / 180);\n var start_y = start + 0.95* length * Math.sin(angle * Math.PI / 180);\n\n var end_x = start + length * Math.cos(angle * Math.PI / 180);\n var end_y = start + length * Math.sin(angle * Math.PI / 180);\n\n var text_x = end_x - (25+10+length_of_textDist+length_of_text/2)*Math.cos(angle * Math.PI / 180)\n var text_y = end_y - (25+10+length_of_textDist+length_of_text/2)*Math.sin(angle * Math.PI / 180)\n\n var textDist_x = end_x - (25+5+length_of_textDist/2)*Math.cos(angle * Math.PI / 180)\n var textDist_y = end_y - (25+5+length_of_textDist/2)*Math.sin(angle * Math.PI / 180)\n\n if (manipulation!=0) { // calculates a new text positioning, while the line is kept correct (start_x,end_x\n\n var start_x2 = start + 0.95* length * Math.cos((angle+manipulation) * Math.PI / 180);\n var start_y2 = start + 0.95* length * Math.sin((angle+manipulation) * Math.PI / 180);\n\n var end_x2 = start + length * Math.cos((angle+manipulation) * Math.PI / 180);\n var end_y2 = start + length * Math.sin((angle+manipulation) * Math.PI / 180);\n\n var text_x = end_x2 - (25+10+length_of_textDist+length_of_text/2)*Math.cos((angle+manipulation) * Math.PI / 180)\n var text_y = end_y2 - (25+10+length_of_textDist+length_of_text/2)*Math.sin((angle+manipulation) * Math.PI / 180)\n\n var textDist_x = end_x2 - (25+5+length_of_textDist/2)*Math.cos((angle+manipulation) * Math.PI / 180)\n var textDist_y = end_y2 - (25+5+length_of_textDist/2)*Math.sin((angle+manipulation) * Math.PI / 180)\n\t//\tconsole.log(\"Start_x2 is\" + start_x2 + \"for \" + displayed_text)\n\t//\tconsole.log(\"Start_y2 is\" + start_y2 + \"for \" + displayed_text)\n text_angle = text_angle +manipulation\n\n }\n\n var pointsInPlot = {\n start_x:start_x,start_y:start_y,end_x:end_x,end_y:end_y,\n text_x:text_x,text_y:text_y,text_angle:text_angle,\n textDist_x:textDist_x,textDist_y:textDist_y,\n length_of_text:length_of_text,length_of_textDist:length_of_textDist,angle:angle,\n\t\tstart_x_corr:start_x2, start_y_corr:start_y2\n }\n return pointsInPlot\n}", "function len(feet, inches, eigths) {\n var l = (12 * (feet || 0)) + (inches || 0) + ((eigths || 0) / 8); \n return pixels(l);\n}", "calculateControlPoints(){\n \n\tthis.controlPoints = \n\t [ \n [\n [-this.base/2, 0, 0, 1],\n [-this.base/2, 0.7*this.base, 0, 1],\n [this.base/2, 0.7*this.base, 0 , 1],\n [this.base/2, 0, 0, 1]\n ],\n\n [\n [-this.top/2, 0, this.height, 1],\n [-this.top/2, 0.7*this.top, this.height, 1],\n [this.top/2, 0.7*this.top, this.height, 1],\n [this.top/2, 0, this.height, 1]\n ],\n ];\n\n \n }", "function curveDim(x0, y0, x1, y1, x2, y2, x3, y3) {\n var tvalues = [],\n bounds = [[], []],\n a, b, c, t, t1, t2, b2ac, sqrtb2ac;\n for (var i = 0; i < 2; ++i) {\n if (i == 0) {\n b = 6 * x0 - 12 * x1 + 6 * x2;\n a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;\n c = 3 * x1 - 3 * x0;\n } else {\n b = 6 * y0 - 12 * y1 + 6 * y2;\n a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;\n c = 3 * y1 - 3 * y0;\n }\n if (abs(a) < 1e-12) {\n if (abs(b) < 1e-12) {\n continue;\n }\n t = -c / b;\n if (0 < t && t < 1) {\n tvalues.push(t);\n }\n continue;\n }\n b2ac = b * b - 4 * c * a;\n sqrtb2ac = math.sqrt(b2ac);\n if (b2ac < 0) {\n continue;\n }\n t1 = (-b + sqrtb2ac) / (2 * a);\n if (0 < t1 && t1 < 1) {\n tvalues.push(t1);\n }\n t2 = (-b - sqrtb2ac) / (2 * a);\n if (0 < t2 && t2 < 1) {\n tvalues.push(t2);\n }\n }\n\n var x, y, j = tvalues.length,\n jlen = j,\n mt;\n while (j--) {\n t = tvalues[j];\n mt = 1 - t;\n bounds[0][j] = mt * mt * mt * x0 + 3 * mt * mt * t * x1 + 3 * mt * t * t * x2 + t * t * t * x3;\n bounds[1][j] = mt * mt * mt * y0 + 3 * mt * mt * t * y1 + 3 * mt * t * t * y2 + t * t * t * y3;\n }\n\n bounds[0][jlen] = x0;\n bounds[1][jlen] = y0;\n bounds[0][jlen + 1] = x3;\n bounds[1][jlen + 1] = y3;\n bounds[0].length = bounds[1].length = jlen + 2;\n\n\n return {\n min: {x: mmin.apply(0, bounds[0]), y: mmin.apply(0, bounds[1])},\n max: {x: mmax.apply(0, bounds[0]), y: mmax.apply(0, bounds[1])}\n };\n }", "function sizeCircle(magnitude) {\n return magnitude * 4;\n}", "function getPerimeter (points){\n\n return points.filter(function(point){\n\n if (point.connections.length < 4) return true; //if it's on the edge of the matrix\n \n for (var i = 0; i < point.connections.length; i++){\n //if it's an edge between water and land\n if (point.connections[i].point1.isInLake !== point.connections[i].point2.isInLake) return true;\n }\n\n return false;\n\n });\n\n}", "function getMoveLength(_x, _y, _z, _a, _b, _c) {\r\n // get starting and ending positions\r\n var moveLength = {};\r\n var startTool;\r\n var endTool;\r\n var startXYZ;\r\n var endXYZ;\r\n var startABC;\r\n if (typeof previousABC !== \"undefined\") {\r\n startABC = new Vector(previousABC.x, previousABC.y, previousABC.z);\r\n } else {\r\n startABC = getCurrentDirection();\r\n }\r\n var endABC = new Vector(_a, _b, _c);\r\n \r\n if (!getOptimizedMode()) { // calculate XYZ from tool tip\r\n startTool = getCurrentPosition();\r\n endTool = new Vector(_x, _y, _z);\r\n startXYZ = startTool;\r\n endXYZ = endTool;\r\n\r\n // adjust points for tables\r\n if (!machineConfiguration.getTableABC(startABC).isZero() || !machineConfiguration.getTableABC(endABC).isZero()) {\r\n startXYZ = machineConfiguration.getOrientation(machineConfiguration.getTableABC(startABC)).getTransposed().multiply(startXYZ);\r\n endXYZ = machineConfiguration.getOrientation(machineConfiguration.getTableABC(endABC)).getTransposed().multiply(endXYZ);\r\n }\r\n\r\n // adjust points for heads\r\n if (machineConfiguration.getAxisU().isEnabled() && machineConfiguration.getAxisU().isHead()) {\r\n if (typeof getOptimizedHeads === \"function\") { // use post processor function to adjust heads\r\n startXYZ = getOptimizedHeads(startXYZ.x, startXYZ.y, startXYZ.z, startABC.x, startABC.y, startABC.z);\r\n endXYZ = getOptimizedHeads(endXYZ.x, endXYZ.y, endXYZ.z, endABC.x, endABC.y, endABC.z);\r\n } else { // guess at head adjustments\r\n var startDisplacement = machineConfiguration.getDirection(startABC);\r\n startDisplacement.multiply(headOffset);\r\n var endDisplacement = machineConfiguration.getDirection(endABC);\r\n endDisplacement.multiply(headOffset);\r\n startXYZ = Vector.sum(startTool, startDisplacement);\r\n endXYZ = Vector.sum(endTool, endDisplacement);\r\n }\r\n }\r\n } else { // calculate tool tip from XYZ, heads are always programmed in TCP mode, so not handled here\r\n startXYZ = getCurrentPosition();\r\n endXYZ = new Vector(_x, _y, _z);\r\n startTool = machineConfiguration.getOrientation(machineConfiguration.getTableABC(startABC)).multiply(startXYZ);\r\n endTool = machineConfiguration.getOrientation(machineConfiguration.getTableABC(endABC)).multiply(endXYZ);\r\n }\r\n\r\n // calculate axes movements\r\n moveLength.xyz = Vector.diff(endXYZ, startXYZ).abs;\r\n moveLength.xyzLength = moveLength.xyz.length;\r\n moveLength.abc = Vector.diff(endABC, startABC).abs;\r\n for (var i = 0; i < 3; ++i) {\r\n if (moveLength.abc.getCoordinate(i) > Math.PI) {\r\n moveLength.abc.setCoordinate(i, 2 * Math.PI - moveLength.abc.getCoordinate(i));\r\n }\r\n }\r\n moveLength.abcLength = moveLength.abc.length;\r\n\r\n // calculate radii\r\n moveLength.radius = getRotaryRadii(startTool, endTool, startABC, endABC);\r\n \r\n // calculate the radial portion of the tool tip movement\r\n var radialLength = Math.sqrt(\r\n Math.pow(getRadialDistance(moveLength.radius.x, startABC.x, endABC.x), 2.0) +\r\n Math.pow(getRadialDistance(moveLength.radius.y, startABC.y, endABC.y), 2.0) +\r\n Math.pow(getRadialDistance(moveLength.radius.z, startABC.z, endABC.z), 2.0)\r\n );\r\n \r\n // calculate the tool tip move length\r\n // tool tip distance is the move distance based on a combination of linear and rotary axes movement\r\n moveLength.tool = moveLength.xyzLength + radialLength;\r\n\r\n // debug\r\n if (false) {\r\n writeComment(\"DEBUG - tool = \" + moveLength.tool);\r\n writeComment(\"DEBUG - xyz = \" + moveLength.xyz);\r\n var temp = Vector.product(moveLength.abc, 180 / Math.PI);\r\n writeComment(\"DEBUG - abc = \" + temp);\r\n writeComment(\"DEBUG - radius = \" + moveLength.radius);\r\n }\r\n return moveLength;\r\n}", "setOperation (type, f1Points, f2Points) {\n\t\t// translate points for each face into a clipper path\n\t\tconst f1Path = f1Points.map(p => ({ X: p.x, Y: p.y })),\n \tf2Path = f2Points.map(p => ({ X: p.x, Y: p.y }));\n\n\t\t// offset both paths prior to executing clipper operation to acount for tiny floating point inaccuracies\n\t\tconst offset = new ClipperLib.ClipperOffset(),\n\t\t\tf1PathsOffsetted = new ClipperLib.Paths(),\n\t\t\tf2PathsOffsetted = new ClipperLib.Paths();\n\n\t\toffset.AddPaths([f1Path], ClipperLib.JoinType.jtMiter, ClipperLib.EndType.etClosedPolygon);\n\t\toffset.Execute(f1PathsOffsetted, this.offset);\n\t\toffset.Clear();\n\t\toffset.AddPaths([f2Path], ClipperLib.JoinType.jtMiter, ClipperLib.EndType.etClosedPolygon);\n\t\toffset.Execute(f2PathsOffsetted, this.offset);\n\t\toffset.Clear();\n\n\t\t// scale paths up before performing operation\n\t\tClipperLib.JS.ScaleUpPaths(f1PathsOffsetted, this.clipScale);\n\t\tClipperLib.JS.ScaleUpPaths(f2PathsOffsetted, this.clipScale);\n\n\t\tconst cpr = new ClipperLib.Clipper(),\n\t\t\tresultPathsOffsetted = new ClipperLib.Paths();\n\n cpr.AddPaths(f1PathsOffsetted, ClipperLib.PolyType.ptSubject, true);\n cpr.AddPaths(f2PathsOffsetted, ClipperLib.PolyType.ptClip, true);\n\n\t\tvar operation;\n\t\tif (type === 'union') { operation = ClipperLib.ClipType.ctUnion; }\n\t\telse if (type === 'intersection') { operation = ClipperLib.ClipType.ctIntersection; }\n\t\telse if (type === 'difference') { operation = ClipperLib.ClipType.ctDifference; }\n\n cpr.Execute(operation, resultPathsOffsetted, ClipperLib.PolyFillType.pftEvenOdd, ClipperLib.PolyFillType.pftEvenOdd);\n\n\t\t// scale down path\n\t\tClipperLib.JS.ScaleDownPaths(resultPathsOffsetted, this.clipScale);\n\n\t\t// undo offset on resulting path\n\t\tconst resultPaths = new ClipperLib.Paths();\n\t\toffset.AddPaths(resultPathsOffsetted, ClipperLib.JoinType.jtMiter, ClipperLib.EndType.etClosedPolygon);\n\t\toffset.Execute(resultPaths, -this.offset);\n\n\t\t// if multiple paths were created, a face has been split and the operation should fail\n if (resultPaths.length === 1) {\n\t\t\t// translate into points\n\t\t\treturn resultPaths[0].map(p => ({ x: p.X, y: p.Y }));\n } else if (resultPaths.length === 0) {\n \treturn [];\n } else if (resultPaths.length > 1) {\n\t\t\treturn false;\n }\n\t}", "function CubicPoly() {\n\n\t \t}", "function getPerimeter(length, width) {\n let perimeter;\n // Write your code here\n \n return perimeter;\n}", "function CubicPoly() {\r\n\r\n\t\t}", "function wedgeslope( x , th )\n {\n \n const c_r = 0 ;\n\n const c_h = 0 ;\n const c_bt = 1 ;\n\n const c_rh = 2 ;\n const c_phk = 3 ;\n const c_ck = 4 ;\n\n const c_pvgk = 5 ;\n const c_apvgk = 6 ;\n const c_bpvgk = 7 ;\n\n const c_qvqr = 8 ;\n const c_aqvqr = 9 ;\n const c_bqvqr = 10 ;\n\n const c_phgk = 11 ;\n const c_aphgk = 12 ;\n const c_bphgk = 13 ;\n\n const c_qhqr = 14 ;\n const c_aqhqr = 15 ;\n const c_bqhqr = 16 ;\n\n const c_fvgk = 17 ;\n const c_afvgk = 18 ;\n\n const c_fvqr = 19 ;\n const c_afvqr = 20 ;\n\n const c_fhgk = 21 ;\n const c_afhgk = 22 ;\n\n const c_fhqr = 23 ;\n const c_afhqr = 24 ;\n\n const c_gmph = 25 ;\n const c_gmc = 26 ;\n const c_gmg = 27 ;\n const c_gmq = 28 ;\n\n const r_r = 0 ;\n\n const r_phd = 0 ;\n const r_cd = 1 ;\n\n const r_bapvgk = 2 ;\n const r_baqvqr = 3 ;\n const r_baphgk = 4 ;\n const r_baqhqr = 5 ;\n const r_bafvgk = 6 ;\n const r_bafvqr = 7 ;\n const r_bafhgk = 8 ;\n const r_bafhqr = 9 ;\n\n const r_l = 10 ;\n const r_a = 11 ;\n\n const r_gk = 12 ;\n const r_fvk = 13 ;\n const r_fhk = 14 ;\n const r_fpk = 15 ;\n const r_fqk = 16 ;\n const r_tk = 17 ;\n const r_nk = 18 ;\n const r_fek = 19 ;\n const r_frk = 20 ;\n const r_eta = 21 ;\t \n\n const r_gd = 22 ;\n const r_fvd = 23 ;\n const r_fhd = 24 ;\n const r_fpd = 25 ;\n const r_fqd = 26 ;\n const r_td = 27 ;\n const r_nd = 28 ;\n const r_fed = 29 ;\n const r_frd = 30 ;\n const r_mu = 31 ;\n\n const r_rx = 32 ;\n\n const c_g = 10.00 ;\n\n\n var r = new Array( r_rx ) ;\n\n for( var i = 0; i < r_rx; ++i ) r[i] = new Array( 1 ) ;\n\n const h = x[ c_h ][ c_r ] ;\n const btrad = radians( x[ c_bt ][ c_r ] ) ;\n\n const rh = x[ c_rh ][ c_r ] ;\n const phkrad = radians( x[ c_phk ][ c_r ] ) ;\n const ck = x[ c_ck ][ c_r ] ;\n\n const pvgk = x[ c_pvgk ][ c_r ] ;\n const apvgk = x[ c_apvgk ][ c_r ] ;\n const bpvgk = x[ c_bpvgk ][ c_r ] ;\n\n const qvqr = x[ c_qvqr ][ c_r ] ;\n const aqvqr = x[ c_aqvqr ][ c_r ] ;\n const bqvqr = x[ c_bqvqr ][ c_r ] ;\n\n const phgk = x[ c_phgk ][ c_r ] ;\n const aphgk = x[ c_aphgk ][ c_r ] ;\n const bphgk = x[ c_bphgk ][ c_r ] ;\n\n const qhqr = x[ c_qhqr ][ c_r ] ;\n const aqhqr = x[ c_aqhqr ][ c_r ] ;\n const bqhqr = x[ c_bqhqr ][ c_r ] ;\n \n const fvgk = x[ c_fvgk ][ c_r ] ;\n const afvgk = x[ c_afvgk ][ c_r ] ;\n\n const fvqr = x[ c_fvqr ][ c_r ] ;\n const afvqr = x[ c_afvqr ][ c_r ] ;\n\n const fhgk = x[ c_fhgk ][ c_r ] ;\n const afhgk = x[ c_afhgk ][ c_r ] ;\n\n const fhqr = x[ c_fhqr ][ c_r ] ;\n const afhqr = x[ c_afhqr ][ c_r ] ;\n \n const gmph = x[ c_gmph ][ c_r ] ;\n const gmc = x[ c_gmc ][ c_r ] ;\n const gmg = x[ c_gmg ][ c_r ] ;\n const gmq = x[ c_gmq ][ c_r ] ;\n\n const thrad = radians( th ) ;\n\n const ath = ( (h / Math.tan( thrad )) - (h / Math.tan( btrad )) ) ;\n\n var phdrad = Math.atan( Math.tan( phkrad ) / gmph ) ;\n var phd = degrees( phdrad ) ;\n var cd = ( ck / gmc ) ;\n\n var bapvgk = undefined ;\n var baqvqr = undefined ;\n var baphgk = undefined ;\n var baqhqr = undefined ;\n var bafvgk = undefined ;\n var bafvqr = undefined ;\n var bafhgk = undefined ;\n var bafhqr = undefined ;\n\n var l = undefined ;\n var a = undefined ;\n\n var gk = undefined ;\n var fvk = undefined ;\n var fhk = undefined ;\n var fpk = undefined ;\n var fqk = undefined ;\n var tk = undefined ;\n var nk = undefined ;\n var fek = undefined ;\n var frk = undefined ;\n\n var gd = undefined ;\n var fvd = undefined ;\n var fhd = undefined ;\n var fpd = undefined ;\n var fqd = undefined ;\n var td = undefined ;\n var nd = undefined ;\n var fed = undefined ;\n var frd = undefined ;\n\n var eta = undefined ;\n var mu = undefined ;\n\n const cab = function( c , a , b ) { var d ; if( c > (a + b) ) d = b ; else if( c > a ) d = (c - a) ; else d = 0.0 ; return( d ) ; } ;\n\n bapvgk = cab( ath , apvgk , bpvgk ) ;\n baqvqr = cab( ath , aqvqr , bqvqr ) ;\n baphgk = cab( ath , aphgk , bphgk ) ;\n baqhqr = cab( ath , aqhqr , bqhqr ) ;\n\n if( ath > afvgk ) bafvgk = 1.0 ; else bafvgk = 0.0 ;\n if( ath > afvqr ) bafvqr = 1.0 ; else bafvqr = 0.0 ;\n if( ath > afhgk ) bafhgk = 1.0 ; else bafhgk = 0.0 ;\n if( ath > afhqr ) bafhqr = 1.0 ; else bafhqr = 0.0 ;\n\n\n console.log( \"ath=\" , ath ) ;\n console.log( \"bapvgk=\" , bapvgk ) ;\n console.log( \"aqvqr=\" , aqvqr ) ;\n console.log( \"bqvqr=\" , bqvqr ) ;\n console.log( \"baqvqr=\" , baqvqr ) ;\n console.log( \"baphgk=\" , baphgk ) ;\n console.log( \"baqhqr=\" , baqhqr ) ;\n\n\n l = ( h / Math.sin( thrad ) ) ;\n\n a = ( (1 / 2) * h * h * ((1 / Math.tan( thrad )) - (1 / Math.tan( btrad ))) ) ;\n\n\n gk = ( a * rh * g ) ;\n\n fvk = ( (pvgk * bapvgk) + (qvqr * baqvqr) + (fvgk * bafvgk) + (fvqr * bafvqr) ) ;\n\n fhk = ( (phgk * baphgk) + (qhqr * baqhqr) + fhgk + fhqr ) ;\n\n fpk = ( gk + fvk ) ;\n\n fqk = ( fhk ) ;\n\n fek = tk = ( (fpk * Math.sin( thrad )) - (fqk * Math.cos( thrad )) ) ;\n\n nk = ( (fpk * Math.cos( thrad )) + (fqk * Math.sin( thrad )) ) ;\n\n frk = ( (nk * Math.tan( phkrad )) + (ck * l) );\n\n if( fek ) eta = ( frk / fek ) ; else eta = 0.0 ;\n\n\n gd = ( gmg * (1 / 2) * rh * c_g * h * h * ((1 / Math.tan( thrad )) - (1 / Math.tan( btrad ))) ) ;\n\n fvd = ( (gmg * pvgk * bapvgk) + (gmq * qvqr * baqvqr) + (gmg * fvgk * bafvgk) + (gmq * fvqr * bafvqr) ) ;\n\n fhd = ( (gmg * phgk * baphgk) + (gmq * qhqr * baqhqr) + (gmg * fhgk) + (gmq * fhqr) ) ;\n\n fpd = ( gd + fvd ) ;\n\n fqd = ( fhd ) ;\n\n fed = td = ( (fpd * Math.sin( thrad )) - (fqd * Math.cos( thrad )) );\n\n nd = ( (fpd * Math.cos( thrad )) + (fqd * Math.sin( thrad )) ) ;\n\n frd = ( (nd * Math.tan( phdrad )) + (cd * l) ) ;\n\n if( frd ) mu = ( fed / frd ) ; else mu = 0.0 ;\n\n\n r[ r_phd ][ r_r ] = phd ;\n r[ r_cd ][ r_r ] = cd ;\n\n r[ r_bapvgk ][ r_r ] = bapvgk ;\n r[ r_baqvqr ][ r_r ] = baqvqr ;\n r[ r_baphgk ][ r_r ] = baphgk ;\n r[ r_baqhqr ][ r_r ] = baqhqr ;\n r[ r_bafvgk ][ r_r ] = bafvgk ;\n r[ r_bafvqr ][ r_r ] = bafvqr ;\n r[ r_bafhgk ][ r_r ] = bafhgk ;\n r[ r_bafhqr ][ r_r ] = bafhqr ;\n\n r[ r_l ][ r_r ] = l ;\n r[ r_a ][ r_r ] = a ;\n\n r[ r_gk ][ r_r ] = gk ;\n r[ r_fvk ][ r_r ] = fvk ;\n r[ r_fhk ][ r_r ] = fhk ;\n r[ r_fpk ][ r_r ] = fpk ;\n r[ r_fqk ][ r_r ] = fqk ;\n r[ r_tk ][ r_r ] = tk ;\n r[ r_nk ][ r_r ] = nk ;\n r[ r_fek ][ r_r ] = fek ;\n r[ r_frk ][ r_r ] = frk ;\n r[ r_eta ][ r_r ] = eta ;\n\n r[ r_gd ][ r_r ] = gd ;\n r[ r_fvd ][ r_r ] = fvd ;\n r[ r_fhd ][ r_r ] = fhd ;\n r[ r_fpd ][ r_r ] = fpd ;\n r[ r_fqd ][ r_r ] = fqd ;\n r[ r_td ][ r_r ] = td ;\n r[ r_nd ][ r_r ] = nd ;\n r[ r_fed ][ r_r ] = fed ;\n r[ r_frd ][ r_r ] = frd ;\n r[ r_mu ][ r_r ] = mu ;\n\n\n return( r );\n\n \n }", "getLineLengthBetweenPoints (x, y, x0, y0){\n return Math.sqrt((x -= x0) * x + (y -= y0) * y);\n }", "function CubicPoly() {\r\n\r\n\t}", "function computePerimeter( x1, y1, x2, y2, x3, y3, x4, y4 ) {\n let line1 = computeLineLength( x1, y1, x2, y2 );\n let line2 = computeLineLength( x2, y2, x3, y3 );\n let line3 = computeLineLength( x3, y3, x4, y4 );\n let line4 = computeLineLength( x4, y4, x1, y1 );\n return computePerimeterByLength( line1, line2, line3, line4 );\n}", "function ccw(c) {\n var n = c.length\n var area = [0]\n for(var j=0; j<n; ++j) {\n var a = positions[c[j]]\n var b = positions[c[(j+1)%n]]\n var t00 = twoProduct(-a[0], a[1])\n var t01 = twoProduct(-a[0], b[1])\n var t10 = twoProduct( b[0], a[1])\n var t11 = twoProduct( b[0], b[1])\n area = robustSum(area, robustSum(robustSum(t00, t01), robustSum(t10, t11)))\n }\n return area[area.length-1] > 0\n }", "function curveDim(x0, y0, x1, y1, x2, y2, x3, y3) {\n var tvalues = [],\n bounds = [[], []],\n a, b, c, t, t1, t2, b2ac, sqrtb2ac;\n for (var i = 0; i < 2; ++i) {\n if (i == 0) {\n b = 6 * x0 - 12 * x1 + 6 * x2;\n a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;\n c = 3 * x1 - 3 * x0;\n } else {\n b = 6 * y0 - 12 * y1 + 6 * y2;\n a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;\n c = 3 * y1 - 3 * y0;\n }\n if (abs(a) < 1e-12) {\n if (abs(b) < 1e-12) {\n continue;\n }\n t = -c / b;\n if (0 < t && t < 1) {\n tvalues.push(t);\n }\n continue;\n }\n b2ac = b * b - 4 * c * a;\n sqrtb2ac = math.sqrt(b2ac);\n if (b2ac < 0) {\n continue;\n }\n t1 = (-b + sqrtb2ac) / (2 * a);\n if (0 < t1 && t1 < 1) {\n tvalues.push(t1);\n }\n t2 = (-b - sqrtb2ac) / (2 * a);\n if (0 < t2 && t2 < 1) {\n tvalues.push(t2);\n }\n }\n\n var x, y, j = tvalues.length,\n jlen = j,\n mt;\n while (j--) {\n t = tvalues[j];\n mt = 1 - t;\n bounds[0][j] = (mt * mt * mt * x0) + (3 * mt * mt * t * x1) + (3 * mt * t * t * x2) + (t * t * t * x3);\n bounds[1][j] = (mt * mt * mt * y0) + (3 * mt * mt * t * y1) + (3 * mt * t * t * y2) + (t * t * t * y3);\n }\n\n bounds[0][jlen] = x0;\n bounds[1][jlen] = y0;\n bounds[0][jlen + 1] = x3;\n bounds[1][jlen + 1] = y3;\n bounds[0].length = bounds[1].length = jlen + 2;\n\n\n return {\n min: {x: mmin.apply(0, bounds[0]), y: mmin.apply(0, bounds[1])},\n max: {x: mmax.apply(0, bounds[0]), y: mmax.apply(0, bounds[1])}\n };\n }", "function curveDim(x0, y0, x1, y1, x2, y2, x3, y3) {\n var tvalues = [],\n bounds = [[], []],\n a, b, c, t, t1, t2, b2ac, sqrtb2ac;\n for (var i = 0; i < 2; ++i) {\n if (i == 0) {\n b = 6 * x0 - 12 * x1 + 6 * x2;\n a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;\n c = 3 * x1 - 3 * x0;\n } else {\n b = 6 * y0 - 12 * y1 + 6 * y2;\n a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;\n c = 3 * y1 - 3 * y0;\n }\n if (abs(a) < 1e-12) {\n if (abs(b) < 1e-12) {\n continue;\n }\n t = -c / b;\n if (0 < t && t < 1) {\n tvalues.push(t);\n }\n continue;\n }\n b2ac = b * b - 4 * c * a;\n sqrtb2ac = math.sqrt(b2ac);\n if (b2ac < 0) {\n continue;\n }\n t1 = (-b + sqrtb2ac) / (2 * a);\n if (0 < t1 && t1 < 1) {\n tvalues.push(t1);\n }\n t2 = (-b - sqrtb2ac) / (2 * a);\n if (0 < t2 && t2 < 1) {\n tvalues.push(t2);\n }\n }\n\n var x, y, j = tvalues.length,\n jlen = j,\n mt;\n while (j--) {\n t = tvalues[j];\n mt = 1 - t;\n bounds[0][j] = (mt * mt * mt * x0) + (3 * mt * mt * t * x1) + (3 * mt * t * t * x2) + (t * t * t * x3);\n bounds[1][j] = (mt * mt * mt * y0) + (3 * mt * mt * t * y1) + (3 * mt * t * t * y2) + (t * t * t * y3);\n }\n\n bounds[0][jlen] = x0;\n bounds[1][jlen] = y0;\n bounds[0][jlen + 1] = x3;\n bounds[1][jlen + 1] = y3;\n bounds[0].length = bounds[1].length = jlen + 2;\n\n\n return {\n min: {x: mmin.apply(0, bounds[0]), y: mmin.apply(0, bounds[1])},\n max: {x: mmax.apply(0, bounds[0]), y: mmax.apply(0, bounds[1])}\n };\n }", "function markerSize(magnitude){\n return magnitude * 2\n}", "function findDimensions()\n{\n var pasca = genTwoPascal(7);\n// var pasc = genTwoPascal(12);\n// var pasc = makeSevenBruitForce();\nvar pasc = pascGen(pasca,5,7,0,pasca)\n//var pasc = testRecursion()\n var map =[]\n dimensionRecurse(pasc,map);\n// Logger.log(map);\n \n}", "function numCirclePoints(lineWidth) {\n return SECTORS_IN_CIRCLE + 1;\n}", "function calcTripLength([x1, y1, x2, y2, x3, y3]) {\n [x1, y1, x2, y2, x3, y3] = [x1, y1, x2, y2, x3, y3].map(Number);\n let distance1 = Math.sqrt(Math.pow(x1 - x2, 2) + (Math.pow(y1 - y2, 2)));\n let distance2 = Math.sqrt(Math.pow(x2 - x3, 2) + (Math.pow(y2 - y3, 2)));\n let distance3 = Math.sqrt(Math.pow(x1 - x3, 2) + (Math.pow(y1 - y3, 2)));\n let distances = [distance1, distance2, distance3].sort();\n let first = distances[0];\n let second = distances[1];\n let sum = first + second;\n if (first == distance1 && second == distance2) {\n console.log('1->2->3: ' + sum);\n } else if (first == distance1 && second == distance3) {\n console.log('2->1->3: ' + sum);\n } else if (first == distance2 && second == distance3) {\n console.log('1->3->2: ' + sum);\n }\n}", "function circleSize(magnitude) {\r\n return magnitude ** 2;\r\n}", "get dimension() {\r\n return this.cpoints.shape[1];\r\n }", "get dimension() {\r\n return this.cpoints.shape[1];\r\n }", "function getPerimeter(length, width) {\n let perimeter;\n var len = length + length;\n var wid = width + width;\n perimeter = len + wid;\n return perimeter;\n}", "function CubicPoly() {}", "function CubicPoly() {}", "function CubicPoly() {}", "function CubicPoly() {}", "function CubicPoly() {}", "function CubicPoly() {\n\n\t}", "function CubicPoly() {\n\n\t}", "function markerSize(magnitude) {\n return magnitude * 3;\n}", "function getArea(width, length) {\n return width * length;\n}", "function areaCalculator(length, width) {\n let area = length * width;\n return area;\n}", "function curveDim(x0, y0, x1, y1, x2, y2, x3, y3) {\n\t var tvalues = [],\n\t bounds = [[], []],\n\t a, b, c, t, t1, t2, b2ac, sqrtb2ac;\n\t for (var i = 0; i < 2; ++i) {\n\t if (i == 0) {\n\t b = 6 * x0 - 12 * x1 + 6 * x2;\n\t a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;\n\t c = 3 * x1 - 3 * x0;\n\t } else {\n\t b = 6 * y0 - 12 * y1 + 6 * y2;\n\t a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;\n\t c = 3 * y1 - 3 * y0;\n\t }\n\t if (abs(a) < 1e-12) {\n\t if (abs(b) < 1e-12) {\n\t continue;\n\t }\n\t t = -c / b;\n\t if (0 < t && t < 1) {\n\t tvalues.push(t);\n\t }\n\t continue;\n\t }\n\t b2ac = b * b - 4 * c * a;\n\t sqrtb2ac = math.sqrt(b2ac);\n\t if (b2ac < 0) {\n\t continue;\n\t }\n\t t1 = (-b + sqrtb2ac) / (2 * a);\n\t if (0 < t1 && t1 < 1) {\n\t tvalues.push(t1);\n\t }\n\t t2 = (-b - sqrtb2ac) / (2 * a);\n\t if (0 < t2 && t2 < 1) {\n\t tvalues.push(t2);\n\t }\n\t }\n\t\n\t var x, y, j = tvalues.length,\n\t jlen = j,\n\t mt;\n\t while (j--) {\n\t t = tvalues[j];\n\t mt = 1 - t;\n\t bounds[0][j] = (mt * mt * mt * x0) + (3 * mt * mt * t * x1) + (3 * mt * t * t * x2) + (t * t * t * x3);\n\t bounds[1][j] = (mt * mt * mt * y0) + (3 * mt * mt * t * y1) + (3 * mt * t * t * y2) + (t * t * t * y3);\n\t }\n\t\n\t bounds[0][jlen] = x0;\n\t bounds[1][jlen] = y0;\n\t bounds[0][jlen + 1] = x3;\n\t bounds[1][jlen + 1] = y3;\n\t bounds[0].length = bounds[1].length = jlen + 2;\n\t\n\t\n\t return {\n\t min: {x: mmin.apply(0, bounds[0]), y: mmin.apply(0, bounds[1])},\n\t max: {x: mmax.apply(0, bounds[0]), y: mmax.apply(0, bounds[1])}\n\t };\n\t }", "function getSize(width, height, depth){\n let area = (2*width*height)+(2*height*depth) + (2*width*depth);\n let volume = width* height* depth;\n return [area, volume];\n }", "calculateNumberHorizonSlices(stops) {\n let sum = 1;\n for(let i = 2; i <= stops; i++) {\n sum += i;\n }\n return sum;\n }", "function calcularNovaPonta(conceitoContainer, ligacaoContainer){\r\n \tvar coordenadas = new Coordenadas(new Array(),new Array());\r\n \tvar coordenadasFinais = new Coordenadas(new Object(),new Object());\r\n \tvar conceitoX = parseFloat(conceitoContainer.x);\r\n \tvar conceitoY = parseFloat(conceitoContainer.y);\r\n \tvar ligacaoX = parseFloat(ligacaoContainer.x);\r\n \tvar ligacaoY = parseFloat(ligacaoContainer.y);\r\n \t\r\n \tvar larguraConceito = gerenciadorLigacao.getLargura(conceitoContainer);\r\n \tvar alturaConceito = gerenciadorLigacao.getAltura(conceitoContainer);\r\n \tvar larguraLigacao = gerenciadorLigacao.getLargura(ligacaoContainer);\r\n \tvar alturaLigacao = gerenciadorLigacao.getAltura(ligacaoContainer);\r\n \t\r\n \t\r\n \tfor(var i=0;i<8;i++){\r\n \t\tcoordenadas.conceito[i] = new Object();\r\n \t\tcoordenadas.ligacao[i] = new Object();\r\n \t}\r\n \t\r\n \t//para o conceito\r\n \tcoordenadas.conceito[0].x = conceitoX;\r\n \tcoordenadas.conceito[0].y = conceitoY;\r\n \t\r\n \tcoordenadas.conceito[1].x = conceitoX + (larguraConceito/2);\r\n \tcoordenadas.conceito[1].y = conceitoY;\r\n \t\r\n \tcoordenadas.conceito[2].x = conceitoX + (larguraConceito);\r\n \tcoordenadas.conceito[2].y = conceitoY;\r\n \t\r\n \tcoordenadas.conceito[3].x = conceitoX + (larguraConceito);\r\n \tcoordenadas.conceito[3].y = conceitoY + (alturaConceito/2);\r\n \t\r\n \tcoordenadas.conceito[4].x = conceitoX + (larguraConceito);\r\n \tcoordenadas.conceito[4].y = conceitoY + (alturaConceito);\r\n \t\r\n \tcoordenadas.conceito[5].x = conceitoX + (larguraConceito/2);\r\n \tcoordenadas.conceito[5].y = conceitoY + (alturaConceito);\r\n \t\r\n \tcoordenadas.conceito[6].x = conceitoX;\r\n \tcoordenadas.conceito[6].y = conceitoY + (alturaConceito);\r\n \t\r\n \tcoordenadas.conceito[7].x = conceitoX;\r\n \tcoordenadas.conceito[7].y = conceitoY + (alturaConceito/2);\r\n \t\r\n \t//para a ligacao\r\n \tcoordenadas.ligacao[0].x = ligacaoX;\r\n \tcoordenadas.ligacao[0].y = ligacaoY;\r\n \t\r\n \tcoordenadas.ligacao[1].x = ligacaoX + (larguraLigacao/2);\r\n \tcoordenadas.ligacao[1].y = ligacaoY;\r\n \t\r\n \tcoordenadas.ligacao[2].x = ligacaoX + (larguraLigacao);\r\n \tcoordenadas.ligacao[2].y = ligacaoY;\r\n \t\r\n \tcoordenadas.ligacao[3].x = ligacaoX + (larguraLigacao);\r\n \tcoordenadas.ligacao[3].y = ligacaoY + (alturaLigacao/2);\r\n \t\r\n \tcoordenadas.ligacao[4].x = ligacaoX + (larguraLigacao);\r\n \tcoordenadas.ligacao[4].y = ligacaoY + (alturaLigacao);\r\n \t\r\n \tcoordenadas.ligacao[5].x = ligacaoX + (larguraLigacao/2);\r\n \tcoordenadas.ligacao[5].y = ligacaoY + (alturaLigacao);\r\n \t\r\n \tcoordenadas.ligacao[6].x = ligacaoX;\r\n \tcoordenadas.ligacao[6].y = ligacaoY + (alturaLigacao);\r\n \t\r\n \tcoordenadas.ligacao[7].x = ligacaoX;\r\n \tcoordenadas.ligacao[7].y = ligacaoY + (alturaLigacao/2);\r\n \t\r\n \t\r\n \tif(ligacaoY >= coordenadas.conceito[6].y){ //pontaLigacao[1] � pontaConceito[5]\r\n \t\t\r\n \t\tcoordenadasFinais.conceito.x = coordenadas.conceito[5].x;\r\n \t\tcoordenadasFinais.conceito.y = coordenadas.conceito[5].y;\r\n \t\tcoordenadasFinais.ligacao.x = coordenadas.ligacao[1].x;\r\n \t\tcoordenadasFinais.ligacao.y = coordenadas.ligacao[1].y;\r\n \t\treturn coordenadasFinais;\r\n \t}\r\n \tif(ligacaoY < coordenadas.conceito[6].y && coordenadas.ligacao[4].x <= conceitoX){ //pontaLigacao[3] � pontaConceito[7]\r\n \t\t\r\n \t\tcoordenadasFinais.conceito.x = coordenadas.conceito[7].x;\r\n \t\tcoordenadasFinais.conceito.y = coordenadas.conceito[7].y;\r\n \t\tcoordenadasFinais.ligacao.x = coordenadas.ligacao[3].x;\r\n \t\tcoordenadasFinais.ligacao.y = coordenadas.ligacao[3].y;\r\n \t\treturn coordenadasFinais;\r\n \t}\r\n \tif(coordenadas.ligacao[5].y <= conceitoY){ //pontaLigacao[5] � pontaConceito[1]\r\n \t\t\r\n \t\tcoordenadasFinais.conceito.x = coordenadas.conceito[1].x;\r\n \t\tcoordenadasFinais.conceito.y = coordenadas.conceito[1].y;\r\n \t\tcoordenadasFinais.ligacao.x = coordenadas.ligacao[5].x;\r\n \t\tcoordenadasFinais.ligacao.y = coordenadas.ligacao[5].y;\r\n \t\treturn coordenadasFinais;\r\n \t}\r\n \tif(coordenadas.ligacao[6].y > conceitoY && coordenadas.ligacao[4].x >= conceitoX){ //pontaLigacao[3] � pontaConceito[7]\r\n \t\t\r\n \t\tcoordenadasFinais.conceito.x = coordenadas.conceito[3].x;\r\n \t\tcoordenadasFinais.conceito.y = coordenadas.conceito[3].y;\r\n \t\tcoordenadasFinais.ligacao.x = coordenadas.ligacao[7].x;\r\n \t\tcoordenadasFinais.ligacao.y = coordenadas.ligacao[7].y;\r\n \t\treturn coordenadasFinais;\r\n \t}\t\r\n }", "function calcPolsbyPopperCompactness(area, perimeter) {\n if (perimeter <= 0) return 0;\n return Math.abs(area) * Math.PI * 4 / (perimeter * perimeter);\n }", "function fit(ventana){\n while(widthCanvas>=ventana){\n minus();\n // console.log(\"widthCanvas: \"+widthCanvas + \"\\nVentana : \"+ventana);\n }\n console.log(\"imagen con: \\n \"+widthCanvas+\" px,\"+heightCanvas+\" px\");\n }", "function planets()\n{\n with (Math) {\n\n var RAD = 180 / PI;\n\n document.planets.size6.value = \"\";\n document.planets.size7.value = \"\";\n document.planets.phase7.value = \"\";\n document.planets.phase6.value = \"\";\n document.planets.dawn.value = \"\";\n document.planets.dusk.value = \"\";\n document.planets.tr0.value = \"...\";\n document.planets.tr1.value = \"...\";\n document.planets.tr2.value = \"...\";\n document.planets.tr3.value = \"...\";\n document.planets.tr4.value = \"...\";\n document.planets.tr5.value = \"...\";\n document.planets.tr6.value = \"...\";\n\n var planet_dec = new Array(9);\n var planet_ra = new Array(9);\n var planet_dist = new Array(9);\n var planet_phase = new Array(9);\n var planet_size = new Array(9);\n var planet_alt = new Array(9);\n var planet_az = new Array(9);\n\n var ang_at_1au = [1,6.68,16.82,9.36,196.94,166.6];\n\n var planet_a = new Array(5);\n var planet_l = new Array(5);\n var planet_i = new Array(5);\n var planet_e = new Array(5);\n var planet_n = new Array(5);\n var planet_m = new Array(5);\n var planet_r = new Array(5);\n\n var jd, t, l, m, e, c, sl, r, R, Rm, u, p, q, v, z, a, b, ee, oe, t0, gt;\n var g0, x, y, i, indx, count, hl, ha, eg, et, dr, en, de, ra, la, lo, height;\n var az, al, size, il, dist, rho_sin_lat, rho_cos_lat, rise_str, set_str;\n var dawn, dusk, gt_dawn, gt_dusk, dawn_planets, dusk_planets, morn, eve;\n var sunrise_set, moonrise_set, twilight_begin_end, twilight_start, twilight_end;\n var sat_lat, phase_angle, dt_as_str, tm_as_str, ut_hrs, ut_mns, part_day, dt;\n var moon_days, Days, age, N, M_sun, Ec, lambdasun, P0, N0, rise, set, tr, h0;\n var i_m, e_m, l_m, M_m, N_m, Ev, Ae, A3, A4, lambda_moon, beta_moon, phase;\n var transit, lambda_transit, beta_transit, ra_transit;\n var ra_np, d_beta, d_lambda, lambda_moon_D, beta_moon_D, yy;\n\n la = latitude / RAD;\n lo = longitude / RAD;\n height = 10.0;\n\n tm_as_str = document.planets.ut_h_m.value;\n ut_hrs = eval(tm_as_str.substring(0,2));\n ut_mns = eval(tm_as_str.substring(3,5));\n dt_as_str = document.planets.date_txt.value;\n yy = eval(dt_as_str.substring(6,10));\n\n\n part_day = ut_hrs / 24.0 + ut_mns / 1440.0;\n\n jd = julian_date() + part_day;\n\n document.planets.phase8.value = round_1000(jd);\n\n y = floor(yy / 50 + 0.5) * 50;\n if (y == 1600) dt = 2;\n if (y == 1650) dt = 0.8;\n if (y == 1700) dt = 0.1;\n if (y == 1750) dt = 0.2;\n if (y == 1800) dt = 0.2;\n if (y == 1850) dt = 0.1;\n if (y == 1900) dt = 0;\n if (y == 1950) dt = 0.5;\n if (y == 2000) dt = 1.1;\n if (y == 2050) dt = 3;\n if (y == 2100) dt = 5;\n if (y == 2150) dt = 6;\n if (y == 2200) dt = 8;\n if (y == 2250) dt = 11;\n if (y == 2300) dt = 13;\n if (y == 2350) dt = 16;\n if (y == 2400) dt = 19;\n dt = dt / 1440;\n\n jd += dt;\n\n zone_date_time();\n\n moon_facts();\n\n t=(jd-2415020.0)/36525;\n oe=.409319747-2.271109689e-4*t-2.8623e-8*pow(t,2)+8.779e-9*pow(t,3);\n t0=(julian_date()-2415020.0)/36525;\n g0=.276919398+100.0021359*t0+1.075e-6*pow(t0,2);\n g0=(g0-floor(g0))*2*PI;\n gt=proper_ang_rad(g0+part_day*6.30038808);\n\n l=proper_ang_rad(4.88162797+628.331951*t+5.27962099e-6*pow(t,2));\n m=proper_ang_rad(6.2565835+628.3019457*t-2.617993878e-6*pow(t,2)-5.759586531e-8*pow(t,3));\n e=.01675104-4.18e-5*t-1.26e-7*pow(t,2);\n c=proper_ang_rad(3.3500896e-2-8.358382e-5*t-2.44e-7*pow(t,2))*sin(m)+(3.50706e-4-1.7e-6*t)*sin(2*m)+5.1138e-6*sin(3*m);\n sl=proper_ang_rad(l+c);\n R=1.0000002*(1-pow(e,2))/(1+e*cos(m+c));\n\n de = asin(sin(oe) * sin(sl));\n y = sin(sl) * cos(oe);\n x = cos(sl);\n ra = proper_ang_rad(atan2(y,x));\n dist = R;\n size = 31.9877 / dist;\n\n ha=proper_ang_rad(gt-lo-ra);\n al=asin(sin(la)*sin(de)+cos(la)*cos(de)*cos(ha));\n az=acos((sin(de)-sin(la)*sin(al))/(cos(la)*cos(al)));\n if (sin(ha)>=0) az=2*PI-az;\n\n planet_decl[0] = de;\n planet_r_a[0] = ra;\n planet_mag[0] = -26.7;\n\n planet_dec[8] = \"\";\n planet_ra[8] = \"\";\n planet_dist[8] = \"\";\n planet_size[8] = \"\";\n planet_alt[8] = \"\";\n planet_az[8] = \"\";\n\n y = sin(-0.8333/RAD) - sin(la) * sin(de);\n x = cos(la) * cos(de);\n if (y/x >= 1)\n {\n //rise_str = \"No rise\";\n //set_str = \"No rise\";\n h0 = 0;\n }\n if (y/x <= -1)\n {\n //rise_str = \"No set\";\n //set_str = \"No set\";\n h0 = 0;\n }\n if (abs(y/x) < 1)\n {\n h0 = acos(y/x) * RAD;\n tr = range_1((ra * RAD + lo * RAD - g0 * RAD) / 360);\n document.planets.tr0.value = am_pm(range_1(tr + zone / 24 - dt) * 24);\n document.planets.tr0_2.value = am_pm(range_1(tr + zone / 24 - dt) * 24);\n\n\n }\n y = sin(-18/RAD) - sin(la) * sin(de);\n x = cos(la) * cos(de);\n if (y/x >= 1)\n {\n twilight_start = \"No twilight\";\n twilight_end = \"No twilight\";\n h0 = 0;\n }\n if (y/x <= -1)\n {\n twilight_start = \"All night\";\n twilight_end = \"All night\";\n h0 = 0;\n }\n if (abs(y/x) < 1)\n {\n h0 = acos(y/x) * RAD;\n tr = range_1((ra * RAD + lo * RAD - g0 * RAD) / 360);\n twilight_start = am_pm(range_1(tr - h0 / 360 + zone / 24 - dt) * 24);\n twilight_end = am_pm(range_1(tr + h0 / 360 + zone / 24 - dt) * 24);\n }\n\n al = al * RAD;\n az = az * RAD;\n if (al >= 0)\n {\n al += 1.2 / (al + 2);\n }\n else\n {\n al += 1.2 / (abs(al) + 2);\n }\n\n planet_altitude[0] = al;\n planet_azimuth[0] = az;\n\n de = de * RAD;\n ra = ra * RAD / 15;\n\n x = round_10(abs(de));\n if (de < 0)\n {\n planet_dec[8] += \"-\";\n }\n else\n {\n planet_dec[8] += \"+\";\n }\n if (x < 10) planet_dec[8] += \"0\";\n planet_dec[8] += x;\n if (x == floor(x)) planet_dec[8] += \".0\";\n planet_dec[8] += \"\\u00B0\";\n\n x = floor(ra);\n y = floor((ra - x) * 60 + 0.5);\n if (y == 60)\n {\n x += 1;\n y = 0;\n }\n if (x < 10) planet_ra[8] += \"0\";\n planet_ra[8] += x + \"h \";\n if (y < 10) planet_ra[8] += \"0\";\n planet_ra[8] += y + \"m\";\n\n dist = round_100(dist);\n if (dist < 10)\n planet_dist[8] += \"0\";\n planet_dist[8] += dist;\n\n size = round_10(size);\n planet_size[8] += size;\n if (size == floor(size)) planet_size[8] += \".0\";\n planet_size[8] += \"\\'\";\n\n sunrise_set = sun_rise_set(la,lo,zone);\n rise_str = sunrise_set.substring(0,8);\n set_str = sunrise_set.substring(11,19);\n planet_alt[8] = rise_str;\n planet_az[8] = set_str;\n\n /*\n planet_alt[8] = rise_str;\n planet_az[8] = set_str;\n sunrise_set = rise_str + \" / \" + set_str;\n */\n\n moon_days = 29.53058868;\n Days = jd - 2444238.5;\n N = proper_ang(Days / 1.01456167);\n M_sun = proper_ang(N - 3.762863);\n Ec = 1.91574168 * sin(M_sun / RAD);\n lambdasun = proper_ang(N + Ec + 278.83354);\n l0 = 64.975464;\n P0 = 349.383063;\n N0 = 151.950429;\n i_m = 5.145396;\n e_m = 0.0549;\n l_m = proper_ang(13.1763966 * Days + l0);\n M_m = proper_ang(l_m - 0.111404 * Days - P0);\n N_m = proper_ang(N0 - 0.0529539 * Days);\n Ev = 1.2739 * sin((2 * (l_m - lambdasun) - M_m) / RAD);\n Ae = 0.1858 * sin(M_sun / RAD);\n A3 = 0.37 * sin(M_sun / RAD);\n M_m += Ev - Ae - A3;\n Ec = 6.2886 * sin(M_m / RAD);\n dist = hundred_miles(238855.7 * (1 - pow(e_m,2)) / (1 + e_m * cos((M_m + Ec) / RAD)));\n A4 = 0.214 * sin(2 * M_m / RAD);\n l_m += Ev + Ec - Ae + A4;\n l_m += 0.6583 * sin(2 * (l_m - lambdasun) / RAD);\n N_m -= 0.16 * sin(M_sun / RAD);\n\n y = sin((l_m - N_m) / RAD) * cos(i_m / RAD);\n x = cos((l_m - N_m) / RAD);\n lambda_moon = proper_ang_rad(atan2(y,x) + N_m / RAD);\n beta_moon = asin(sin((l_m - N_m) / RAD) * sin(i_m / RAD));\n d_beta = 8.727e-4 * cos((l_m - N_m) / RAD);\n d_lambda = 9.599e-3 + 1.047e-3 * cos(M_m / RAD);\n\n de = asin(sin(beta_moon) * cos(oe) + cos(beta_moon) * sin(oe) * sin(lambda_moon));\n y = sin(lambda_moon) * cos(oe) - tan(beta_moon) * sin(oe);\n x = cos(lambda_moon);\n ra = proper_ang_rad(atan2(y,x));\n\n ra_np = ra;\n\n size = 2160 / dist * RAD * 60;\n\n x = proper_ang(l_m - lambdasun);\n phase = 50.0 * (1.0 - cos(x / RAD));\n\n age = jd - new_moon;\n if (age > moon_days) age -= moon_days;\n if (age < 0) age += moon_days;\n\n /*\n age = (x / 360 * moon_days);\n */\n Rm = R - dist * cos(x / RAD) / 92955800;\n phase_angle = acos((pow(Rm,2) + pow((dist/92955800),2) - pow(R,2)) / (2 * Rm * dist/92955800)) * RAD / 100;\n planet_mag[6] = round_10(0.21 + 5 * log(Rm * dist / 92955800)/log(10) + 3.05 * (phase_angle) - 1.02 * pow(phase_angle,2) + 1.05 * pow(phase_angle,3));\n if (planet_mag[6] == floor(planet_mag[6])) planet_mag[6] += \".0\";\n\n /*\n thisImage = floor(age / moon_days * 28);\n */\n\n thisImage = floor(age / moon_days * 27 + 0.5);\n document.myPicture.src = myImage[thisImage];\n age = round_10(age);\n\n x = atan(0.996647 * tan(la));\n rho_sin_lat = 0.996647 * sin(x) + height * sin(la) / 6378140;\n rho_cos_lat = cos(x) + height * cos(la) / 6378140;\n r = dist / 3963.2;\n ha = proper_ang_rad(gt - lo - ra);\n x = atan(rho_cos_lat * sin(ha) / (r * cos(de) - rho_cos_lat * cos(ha)));\n ra -= x;\n y = ha;\n ha += x;\n de = atan(cos(ha) * (r * sin(de) - rho_sin_lat) / (r * cos(de) * cos(y) - rho_cos_lat));\n ha = proper_ang_rad(gt - lo - ra);\n al = asin(sin(de) * sin(la) + cos(de) * cos(la) * cos(ha));\n az = acos((sin(de) - sin(la) * sin(al)) / (cos(la) * cos(al)));\n if (sin(ha) >= 0) az = 2 * PI - az;\n\n planet_decl[6] = de;\n planet_r_a[6] = ra;\n\n planet_dec[9] = \"\";\n planet_ra[9] = \"\";\n planet_dist[9] = \"\";\n planet_dist[6] = \"\";\n planet_phase[9] = \"\";\n planet_size[9] = \"\";\n planet_alt[9] = \"\";\n planet_az[9] = \"\";\n\n lambda_moon_D = lambda_moon - d_lambda * part_day * 24;\n beta_moon_D = beta_moon - d_beta * part_day * 24;\n\n tr = range_1((ra_np * RAD + lo * RAD - g0 * RAD) / 360);\n transit = tr * 24;\n lambda_transit = lambda_moon_D + transit * d_lambda;\n beta_transit = beta_moon_D + transit * d_beta;\n\n y = sin(lambda_transit) * cos(oe) - tan(beta_transit) * sin(oe);\n x = cos(lambda_transit);\n ra_transit = proper_ang_rad(atan2(y,x));\n tr = range_1((ra_transit * RAD + lo * RAD - g0 * RAD) / 360);\n document.planets.tr6.value = am_pm(range_1(tr + zone / 24 - dt) * 24);\n document.planets.tr6_2.value = am_pm(range_1(tr + zone / 24 - dt) * 24);\n\n\n al = al * RAD;\n az = az * RAD;\n if (al >= 0)\n {\n al += 1.2 / (al + 2);\n }\n else\n {\n al += 1.2 / (abs(al) + 2);\n }\n\n planet_altitude[6] = al;\n planet_azimuth[6] = az;\n\n de = de * RAD;\n ra = ra * RAD / 15;\n\n x = round_10(abs(de));\n if (de < 0)\n {\n planet_dec[9] += \"-\";\n }\n else\n {\n planet_dec[9] += \"+\";\n }\n if (x < 10) planet_dec[9] += \"0\";\n planet_dec[9] += x;\n if (x == floor(x)) planet_dec[9] += \".0\";\n planet_dec[9] += \"\\u00B0\";\n\n x = floor(ra);\n y = floor((ra - x) * 60 + 0.5);\n if (y == 60)\n {\n x += 1;\n y = 0;\n }\n if (x < 10) planet_ra[9] += \"0\";\n planet_ra[9] += x + \"h \";\n if (y < 10) planet_ra[9] += \"0\";\n planet_ra[9] += y + \"m\";\n\n if (age < 10)\n planet_dist[6] += \"0\";\n planet_dist[6] += age;\n if (age == floor(age)) planet_dist[6] += \".0\";\n planet_dist[6] += \" days\";\n\n planet_dist[9] += dist;\n\n size = round_10(size);\n planet_size[9] += size;\n if (size == floor(size)) planet_size[9] += \".0\";\n planet_size[9] += \"\\'\";\n\n phase = floor(phase + 0.5);\n planet_phase[9] += phase + \"%\";\n\n moonrise_set = moon_rise_set(la,lo,zone);\n rise_str = moonrise_set.substring(0,8);\n set_str = moonrise_set.substring(11,19);\n planet_alt[9] = rise_str;\n planet_az[9] = set_str;\n\n\n if (twilight_start == \"All night\")\n {\n twilight_begin_end = \"twilight all night\";\n }\n else if (twilight_start == \"No twilight\")\n {\n twilight_begin_end = \"Sky dark for 24h\";\n }\n else\n {\n twilight_begin_end = twilight_start + \" / \" + twilight_end;\n }\n\n u=t/5+.1;\n p=proper_ang_rad(4.14473024+52.96910393*t);\n q=proper_ang_rad(4.64111846+21.32991139*t);\n\n v=5*q-2*p;\n z=proper_ang_rad(q-p);\n if (v >= 0)\n {\n v=proper_ang_rad(v);\n }\n else\n {\n v=proper_ang_rad(abs(v))+2*PI;\n }\n\n planet_a[1]=0.3870986;\n planet_l[1]=proper_ang_rad(3.109811569+2608.814681*t+5.2552e-6*pow(t,2));\n planet_e[1]=.20561421+2.046e-5*t-3e-8*pow(t,2);\n planet_i[1]=.12222333+3.247708672e-5*t-3.194e-7*pow(t,2);\n planet_n[1]=.822851951+.020685787*t+3.035127569e-6*pow(t,2);\n planet_m[1]=proper_ang_rad(1.785111938+2608.787533*t+1.22e-7*pow(t,2));\n planet_a[2]=0.7233316;\n planet_l[2]=proper_ang_rad(5.982413642+1021.352924*t+5.4053e-6*pow(t,2));\n planet_e[2]=.00682069-4.774e-5*t+9.1e-8*pow(t,2);\n planet_i[2]=.059230034+1.75545e-5*t-1.7e-8*pow(t,2);\n planet_n[2]=1.322604346+.0157053*t+7.15585e-6*pow(t,2);\n planet_m[2]=proper_ang_rad(3.710626189+1021.328349*t+2.2445e-5*pow(t,2));\n planet_a[3]=1.5236883;\n planet_l[3]=proper_ang_rad(5.126683614+334.0856111*t+5.422738e-6*pow(t,2));\n planet_e[3]=.0933129+9.2064e-5*t-7.7e-8*pow(t,2);\n planet_i[3]=.032294403-1.178097e-5*t+2.199e-7*pow(t,2);\n planet_n[3]=.851484043+.013456343*t-2.44e-8*pow(t,2)-9.3026e-8*pow(t,3);\n planet_m[3]=proper_ang_rad(5.576660841+334.0534837*t+3.159e-6*pow(t,2));\n planet_l[4]=proper_ang_rad(4.154743317+52.99346674*t+5.841617e-6*pow(t,2)-2.8798e-8*pow(t,3));\n a=.0058*sin(v)-1.1e-3*u*cos(v)+3.2e-4*sin(2*z)-5.8e-4*cos(z)*sin(q)-6.2e-4*sin(z)*cos(q)+2.4e-4*sin(z);\n b=-3.5e-4*cos(v)+5.9e-4*cos(z)*sin(q)+6.6e-4*sin(z)*cos(q);\n ee=3.6e-4*sin(v)-6.8e-4*sin(z)*sin(q);\n planet_e[4]=.04833475+1.6418e-4*t-4.676e-7*pow(t,2)-1.7e-9*pow(t,3);\n planet_a[4]=5.202561+7e-4*cos(2*z);\n planet_i[4]=.022841752-9.941569952e-5*t+6.806784083e-8*pow(t,2);\n planet_n[4]=1.735614994+.017637075*t+6.147398691e-6*pow(t,2)-1.485275193e-7*pow(t,3);\n planet_m[4]=proper_ang_rad(3.932721257+52.96536753*t-1.26012772e-5*pow(t,2));\n planet_m[4]=proper_ang_rad(planet_m[4]+a-b/planet_e[4]);\n planet_l[4]=proper_ang_rad(planet_l[4]+a);\n planet_e[4]=planet_e[4]+ee;\n\n planet_a[5]=9.554747;\n planet_l[5]=proper_ang_rad(4.652426047+21.35427591*t+5.663593422e-6*pow(t,2)-1.01229e-7*pow(t,3));\n a=-.014*sin(v)+2.8e-3*u*cos(v)-2.6e-3*sin(z)-7.1e-4*sin(2*z)+1.4e-3*cos(z)*sin(q);\n a=a+1.5e-3*sin(z)*cos(q)+4.4e-4*cos(z)*cos(q);\n a=a-2.7e-4*sin(3*z)-2.9e-4*sin(2*z)*sin(q)+2.6e-4*cos(2*z)*sin(q);\n a=a+2.5e-4*cos(2*z)*cos(q);\n b=1.4e-3*sin(v)+7e-4*cos(v)-1.3e-3*sin(z)*sin(q);\n b=b-4.3e-4*sin(2*z)*sin(q)-1.3e-3*cos(q)-2.6e-3*cos(z)*cos(q)+4.7e-4*cos(2*z)*cos(q);\n b=b+1.7e-4*cos(3*z)*cos(q)-2.4e-4*sin(z)*sin(2*q);\n b=b+2.3e-4*cos(2*z)*sin(2*q)-2.3e-4*sin(z)*cos(2*q)+2.1e-4*sin(2*z)*cos(2*q);\n b=b+2.6e-4*cos(z)*cos(2*q)-2.4e-4*cos(2*z)*cos(2*q);\n planet_l[5]=proper_ang_rad(planet_l[5]+a);\n planet_e[5]=.05589232-3.455e-4*t-7.28e-7*pow(t,2)+7.4e-10*pow(t,3);\n planet_i[5]=.043502663-6.839770806e-5*t-2.703515011e-7*pow(t,2)+6.98e-10*pow(t,3);\n planet_n[5]=1.968564089+.015240129*t-2.656042056e-6*pow(t,2)-9.2677e-8*pow(t,3);\n planet_m[5]=proper_ang_rad(3.062463265+21.32009513*t-8.761552845e-6*pow(t,2));\n planet_m[5]=proper_ang_rad(planet_m[5]+a-b/planet_e[5]);\n planet_a[5]=planet_a[5]+.0336*cos(z)-.00308*cos(2*z)+.00293*cos(v);\n planet_e[5]=planet_e[5]+1.4e-3*cos(v)+1.2e-3*sin(q)+2.7e-3*cos(z)*sin(q)-1.3e-3*sin(z)*cos(q);\n\n for (i=1; i<6; i++)\n\n {\n\n e = planet_m[i];\n for (count = 1; count <= 50; count++)\n {\n de = e - planet_e[i] * sin(e) - planet_m[i];\n if (abs(de) <= 5e-8) break;\n e = e - de / (1 - planet_e[i] * cos(e));\n }\n v=2*atan(sqrt((1+planet_e[i])/(1-planet_e[i]))*tan(e/2));\n planet_r[i]=planet_a[i]*(1-planet_e[i]*cos(e));\n u=proper_ang_rad(planet_l[i]+v-planet_m[i]-planet_n[i]);\n x=cos(planet_i[i])*sin(u);\n y=cos(u);\n y=acos(y/sqrt(pow(x,2)+pow(y,2)));\n if (x<0) y=2*PI-y;\n\n hl=proper_ang_rad(y+planet_n[i]);\n ha=asin(sin(u)*sin(planet_i[i]));\n x=planet_r[i]*cos(ha)*sin(proper_ang_rad(hl-sl));\n y=planet_r[i]*cos(ha)*cos(proper_ang_rad(hl-sl))+R;\n y=acos(y/sqrt(pow(x,2)+pow(y,2)));\n if (x<0) y=2*PI-y;\n\n eg=proper_ang_rad(y+sl);\n dr=sqrt(pow(R,2)+pow(planet_r[i],2)+2*planet_r[i]*R*cos(ha)*cos(proper_ang_rad(hl-sl)));\n size=ang_at_1au[i]/dr;\n il=floor((pow((planet_r[i]+dr),2)-pow(R,2))/(4*planet_r[i]*dr)*100+.5);\n phase_angle=acos((pow(planet_r[i],2)+pow(dr,2)-pow(R,2))/(2*planet_r[i]*dr))*RAD;\n et=asin(planet_r[i]/dr*sin(ha));\n en=acos(cos(et)*cos(proper_ang_rad(eg-sl)));\n de=asin(sin(et)*cos(oe)+cos(et)*sin(oe)*sin(eg));\n y=cos(eg);\n x=sin(eg)*cos(oe)-tan(et)*sin(oe);\n y=acos(y/sqrt(pow(x,2)+pow(y,2)));\n if (x<0) y=2*PI-y;\n\n ra=y;\n ha=proper_ang_rad(gt-lo-ra);\n al=asin(sin(la)*sin(de)+cos(la)*cos(de)*cos(ha));\n az=acos((sin(de)-sin(la)*sin(al))/(cos(la)*cos(al)));\n if (sin(ha)>=0) az=2*PI-az;\n\n planet_decl[i] = de;\n planet_r_a[i] = ra;\n\n planet_mag[i]=5*log(planet_r[i]*dr)/log(10);\n if (i == 1) planet_mag[i] = -0.42 + planet_mag[i] + 0.038*phase_angle - 0.000273*pow(phase_angle,2) + 0.000002*pow(phase_angle,3);\n if (i == 2) planet_mag[i] = -4.4 + planet_mag[i] + 0.0009*phase_angle + 0.000239*pow(phase_angle,2) - 0.00000065*pow(phase_angle,3);\n if (i == 3) planet_mag[i] = -1.52 + planet_mag[i] + 0.016*phase_angle;\n if (i == 4) planet_mag[i] = -9.4 + planet_mag[i] + 0.005*phase_angle;\n if (i == 5)\n {\n sat_lat = asin(0.47063*cos(et)*sin(eg-2.9585)-0.88233*sin(et));\n planet_mag[i] = -8.88 + planet_mag[i] + 0.044*phase_angle - 2.6*sin(abs(sat_lat)) + 1.25*pow(sin(sat_lat),2);\n }\n planet_mag[i] = round_10(planet_mag[i]);\n if (planet_mag[i] == floor(planet_mag[i])) planet_mag[i] += \".0\";\n if (planet_mag[i] >= 0) planet_mag[i] = \"+\" + planet_mag[i];\n\n planet_dec[i] = \"\";\n planet_ra[i] = \"\";\n planet_dist[i] = \"\";\n planet_size[i] = \"\";\n planet_phase[i] = \"\";\n planet_alt[i] = \"\";\n planet_az[i] = \"\";\n\n y = sin(-0.5667/RAD) - sin(la) * sin(de);\n x = cos(la) * cos(de);\n if (y/x >= 1)\n {\n rise_str = \"No rise\";\n set_str = \"No rise\";\n h0 = 0;\n }\n if (y/x <= -1)\n {\n rise_str = \"No set\";\n set_str = \"No set\";\n h0 = 0;\n }\n if (abs(y/x) < 1)\n {\n h0 = acos(y/x) * RAD;\n tr = range_1((ra * RAD + lo * RAD - g0 * RAD) / 360);\n rise_str = am_pm(range_1(tr - h0 / 360 + zone / 24 - dt) * 24);\n set_str = am_pm(range_1(tr + h0 / 360 + zone / 24 - dt) * 24);\n tr = am_pm(range_1(tr + zone / 24 - dt) * 24);\n if (i == 1) document.planets.tr1.value = tr;\n if (i == 2) document.planets.tr2.value = tr;\n if (i == 3) document.planets.tr3.value = tr;\n if (i == 4) document.planets.tr4.value = tr;\n if (i == 5) document.planets.tr5.value = tr;\n\n if (i == 1) document.planets.tr1_2.value = tr;\n if (i == 2) document.planets.tr2_2.value = tr;\n if (i == 3) document.planets.tr3_2.value = tr;\n if (i == 4) document.planets.tr4_2.value = tr;\n if (i == 5) document.planets.tr5_2.value = tr;\n }\n\n al = al * RAD;\n az = az * RAD;\n planet_altitude[i] = al;\n planet_azimuth[i] = az;\n\n de = de * RAD;\n ra = ra * RAD / 15;\n\n x = round_10(abs(de));\n if (de < 0)\n {\n planet_dec[i] += \"-\";\n }\n else\n {\n planet_dec[i] += \"+\";\n }\n if (x < 10) planet_dec[i] += \"0\";\n planet_dec[i] += x;\n if (x == floor(x)) planet_dec[i] += \".0\";\n planet_dec[i] += \"\\u00B0\";\n\n x = floor(ra);\n y = floor((ra - x) * 60 + 0.5);\n if (y == 60)\n {\n x += 1;\n y = 0;\n }\n if (x < 10) planet_ra[i] += \"0\";\n planet_ra[i] += x + \"h \";\n if (y < 10) planet_ra[i] += \"0\";\n planet_ra[i] += y + \"m\";\n\n dr = round_100(dr);\n if (dr < 10)\n planet_dist[i] += \"0\";\n planet_dist[i] += dr;\n\n size = round_10(size);\n if (size < 10)\n planet_size[i] += \"0\";\n planet_size[i] += size;\n if (size == floor(size)) planet_size[i] += \".0\";\n planet_size[i] += \"\\\"\";\n\n planet_phase[i] += il + \"%\";\n\n planet_alt[i] = rise_str;\n planet_az[i] = set_str;\n\n }\n\n dawn_planets = \"\";\n dusk_planets = \"\";\n phenomena = \"\";\n\n y = sin(-9/RAD) - sin(la) * sin(planet_decl[0]);\n x = cos(la) * cos(planet_decl[0]);\n if (y/x >= 1)\n {\n\n dawn_planets = \"-----\";\n dusk_planets = \"-----\";\n }\n if (y/x <= -1)\n {\n\n dawn_planets = \"-----\";\n dusk_planets = \"-----\";\n }\n if (abs(y/x) < 1)\n {\n h0 = acos(y/x) * RAD;\n tr = range_1((planet_r_a[0] * RAD + lo * RAD - g0 * RAD) / 360);\n dawn = range_1(tr - h0 / 360 - dt);\n dusk = range_1(tr + h0 / 360 - dt);\n }\n gt_dawn = proper_ang_rad(g0 + dawn * 6.30038808);\n gt_dusk = proper_ang_rad(g0 + dusk * 6.30038808);\n\n indx = 0;\n morn = 0;\n eve = 0;\n for (i=0; i<17; i++)\n {\n\n if (i < 6)\n {\n ha = proper_ang_rad(gt_dawn - lo - planet_r_a[i]);\n al = asin(sin(la) * sin(planet_decl[i]) + cos(la) * cos(planet_decl[i]) * cos(ha));\n\n if (al >= 0)\n {\n if (morn > 0) dawn_planets += \", \";\n dawn_planets += planet_name[i];\n morn ++;\n }\n\n ha = proper_ang_rad(gt_dusk - lo - planet_r_a[i]);\n al = asin(sin(la) * sin(planet_decl[i]) + cos(la) * cos(planet_decl[i]) * cos(ha));\n\n if (al >= 0)\n {\n if (eve > 0) dusk_planets += \", \";\n dusk_planets += planet_name[i];\n eve ++;\n }\n }\n\n x = round_10(acos(sin(planet_decl[6]) * sin(planet_decl[i]) + cos(planet_decl[6]) * cos(planet_decl[i]) * cos(planet_r_a[6] - planet_r_a[i])) * RAD);\n\n if (x <= 10 && i != 6)\n {\n if (indx > 0) phenomena += \" and \";\n if (x < 1)\n {\n phenomena += \"less than 1\";\n }\n else\n {\n phenomena += floor(x + 0.5);\n }\n phenomena += \"\\u00B0\" + \" from \" + planet_name[i];\n if (x < 0.5)\n {\n if (i == 0)\n {\n phenomena += \" (eclipse possible)\";\n }\n else\n {\n phenomena += \" (occultation possible)\";\n }\n }\n indx ++\n }\n }\n\n if (dawn_planets == \"\") dawn_planets = \"-----\";\n if (dusk_planets == \"\") dusk_planets = \"-----\";\n\n if (indx > 0)\n {\n phenomena = \"The Moon is \" + phenomena + \". \";\n }\n indx = 0;\n for (i=1; i<16; i++)\n {\n for (count=i+1; count<17; count++)\n {\n if (i != 6 && count != 6)\n {\n x = round_10(acos(sin(planet_decl[count]) * sin(planet_decl[i]) + cos(planet_decl[count]) * cos(planet_decl[i]) * cos(planet_r_a[count] - planet_r_a[i])) * RAD);\n if (x <= 5)\n {\n if (indx > 0) phenomena += \" and \";\n phenomena += planet_name[count] + \" is \";\n if (x < 1)\n {\n phenomena += \"less than 1\";\n }\n else\n {\n phenomena += floor(x + 0.5);\n }\n phenomena += \"\\u00B0\" + \" from \" + planet_name[i];\n indx ++\n }\n x = 0;\n }\n }\n }\n if (indx > 0) phenomena += \".\";\n\n if (jd > 2454048.3007 && jd < 2454048.5078)\n {\n phenomena += \"\\nMercury is transiting the face of the Sun. \";\n x = round_10((2454048.50704 - jd) * 24);\n if (x >= 0.1)\n {\n phenomena += \"The spectacle continues for a further \" + x + \" hours.\"\n }\n }\n\n if (phenomena != \"\") { phenomena += \"\\n\"; }\n if (planet_altitude[0] < -18) phenomena += \"The sky is dark. \";\n if (planet_altitude[0] >= -18 && planet_altitude[0] < -12) phenomena += \"The Sun is below the horizon (altitude \" + floor(planet_altitude[0] + 0.5) + \"\\u00B0) and the sky is in deep twilight. \";\n if (planet_altitude[0] >= -12 && planet_altitude[0] < -6) phenomena += \"The Sun is below the horizon (altitude \" + floor(planet_altitude[0] + 0.5) + \"\\u00B0) and the sky is in twilight. \";\n if (planet_altitude[0] >= -6 && planet_altitude[0] < -0.3) phenomena += \"The Sun is below the horizon (altitude \" + floor(planet_altitude[0] + 0.5) + \"\\u00B0) and the sky is in bright twilight. \";\n if (planet_altitude[0] >= -0.3) phenomena += \"The Sun is above the horizon (altitude \" + floor(planet_altitude[0] + 0.5) + \"\\u00B0). \";\n if (planet_altitude[6] >= -0.3) phenomena += \"The Moon is above the horizon (altitude \" + floor(planet_altitude[6] + 0.5) + \"\\u00B0). \";\n if (planet_altitude[6] < -0.3) phenomena += \"The Moon is below the horizon. \";\n phenomena += \"\\n\";\n phenomena += moon_data;\n\n /* Commented out 2009-specific events 2010/01/27 - DAF\n phenomena += \"-----\\n2009 Phenomena\\n\";\n phenomena += \"yyyy mm dd hh UT All dates and times are UT\\n\"\n + \"2009 01 02 04 UT Mercury at greatest illuminated extent (evening)\\n\"\n + \"2009 01 03 13 UT Meteor shower peak -- Quadrantids\\n\"\n + \"2009 01 04 14 UT Mercury at greatest elongation, 19.3\\u00B0 east of Sun (evening)\\n\"\n + \"2009 01 04 16 UT Earth at perihelion 91,400,939 miles (147,095,552 km)\\n\"\n + \"2009 01 10 11 UT Moon at perigee, 222,137 miles (357,495 km)\\n\"\n + \"2009 01 14 21 UT Venus at greatest elongation, 47.1\\u00B0 east of Sun (evening)\\n\"\n + \"2009 01 23 00 UT Moon at apogee, 252,350 miles (406,118 km)\\n\"\n + \"2009 01 26 Annular eclipse of the Sun (South Atlantic, Indonesia)\\n\"\n + \"2009 02 07 20 UT Moon at perigee, 224,619 miles (361,489 km)\\n\"\n + \"2009 02 09 14:38 UT Penumbral lunar eclipse (midtime)\\n\"\n + \"2009 02 11 01 UT Mercury at greatest illuminated extent (morning)\\n\"\n + \"2009 02 13 21 UT Mercury at greatest elongation, 26.1\\u00B0 west of Sun (morning)\\n\"\n + \"2009 02 19 16 UT Venus at greatest illuminated extent (evening)\\n\"\n + \"2009 02 19 17 UT Moon at apogee, 251,736 miles (405,129 km)\\n\"\n + \"2009 03 07 15 UT Moon at perigee, 228,053 miles (367,016 km)\\n\"\n + \"2009 03 08 20 UT Saturn at opposition\\n\"\n + \"2009 03 19 13 UT Moon at apogee, 251,220 miles (404,299 km)\\n\"\n + \"2009 03 20 11:44 UT Spring (Northern Hemisphere) begins at the equinox\\n\"\n + \"2009 03 27 19 UT Venus at inferior conjunction with Sun\\n\"\n + \"2009 04 02 02 UT Moon at perigee, 229,916 miles (370,013 km)\\n\"\n + \"2009 04 13 05 UT Mercury at greatest illuminated extent (evening)\\n\"\n + \"2009 04 16 09 UT Moon at apogee, 251,178 miles (404,232 km)\\n\"\n + \"2009 04 22 11 UT Meteor shower peak -- Lyrids\\n\"\n + \"2009 04 26 08 UT Mercury at greatest elongation, 20.4\\u00B0 east of Sun (evening)\\n\"\n + \"2009 04 28 06 UT Moon at perigee, 227,446 miles (366,039 km)\\n\"\n + \"2009 05 02 14 UT Venus at greatest illuminated extent (morning)\\n\"\n + \"2009 05 06 00 UT Meteor shower peak -- Eta Aquarids\\n\"\n + \"2009 05 14 03 UT Moon at apogee, 251,603 miles (404,915 km)\\n\"\n + \"2009 05 26 04 UT Moon at perigee, 224,410 miles (361,153 km)\\n\"\n + \"2009 06 05 21 UT Venus at greatest elongation, 45.8\\u00B0 west of Sun (morning)\\n\"\n + \"2009 06 10 16 UT Moon at apogee, 252,144 miles (405,787 km)\\n\"\n + \"2009 06 13 12 UT Mercury at greatest elongation, 23.5\\u00B0 west of Sun (morning)\\n\"\n + \"2009 06 21 05:46 UT Summer (Northern Hemisphere) begins at the solstice\\n\"\n + \"2009 06 23 11 UT Moon at perigee, 222,459 miles (358,013 km)\\n\"\n + \"2009 07 03 21 UT Mercury at greatest illuminated extent (morning)\\n\"\n + \"2009 07 04 02 UT Earth at aphelion 94,505,048 miles (152,091,132 km)\\n\"\n + \"2009 07 07 09:39 UT Penumbral lunar eclipse (too slight to see)\\n\"\n + \"2009 07 07 22 UT Moon at apogee, 252,421 miles (406,232 km)\\n\"\n + \"2009 07 21 20 UT Moon at perigee, 222,118 miles (357,464 km)\\n\"\n + \"2009 07 22 Total solar eclipse (India, China, and a few Pacific islands)\\n\"\n + \"2009 07 28 02 UT Meteor shower peak -- Delta Aquarids\\n\"\n + \"2009 08 04 01 UT Moon at apogee, 252,294 miles (406,028 km)\\n\"\n + \"2009 08 06 00:39 UT Weak penumbral lunar eclipse (midtime)\\n\"\n + \"2009 08 12 17 UT Meteor shower peak -- Perseids\\n\"\n + \"2009 08 14 18 UT Jupiter at opposition\\n\"\n + \"2009 08 17 21 UT Neptune at opposition\\n\"\n + \"2009 08 19 05 UT Moon at perigee, 223,469 miles (359,638 km)\\n\"\n + \"2009 08 24 16 UT Mercury at greatest elongation, 27.4\\u00B0 east of Sun (evening)\\n\"\n + \"2009 08 26 09 UT Mercury at greatest illuminated extent (evening)\\n\"\n + \"2009 08 31 11 UT Moon at apogee, 251,823 miles (405,269 km)\\n\"\n + \"2009 09 16 08 UT Moon at perigee, 226,211 miles (364,052 km)\\n\"\n + \"2009 09 17 09 UT Uranus at opposition\\n\"\n + \"2009 09 22 21:19 UT Fall (Northern Hemisphere) begins at the equinox\\n\"\n + \"2009 09 28 04 UT Moon at apogee, 251,302 miles (404,432 km)\\n\"\n + \"2009 10 06 02 UT Mercury at greatest elongation, 17.9\\u00B0 west of Sun (morning)\\n\"\n + \"2009 10 11 07 UT Mercury at greatest illuminated extent (morning)\\n\"\n + \"2009 10 13 12 UT Moon at perigee, 229,327 miles (369,066 km)\\n\"\n + \"2009 10 21 10 UT Meteor shower peak -- Orionids\\n\"\n + \"2009 10 25 23 UT Moon at apogee, 251,137 miles (404,166 km)\\n\"\n + \"2009 11 05 10 UT Meteor shower peak -- Southern Taurids\\n\"\n + \"2009 11 07 07 UT Moon at perigee, 229,225 miles (368,902 km)\\n\"\n + \"2009 11 12 10 UT Meteor shower peak -- Northern Taurids\\n\"\n + \"2009 11 17 15 UT Meteor shower peak -- Leonids\\n\"\n + \"2009 11 22 20 UT Moon at apogee, 251,489 miles (404,733 km)\\n\"\n + \"2009 12 04 14 UT Moon at perigee, 225,856 miles (363,481 km)\\n\"\n + \"2009 12 14 05 UT Meteor shower peak -- Geminids\\n\"\n + \"2009 12 17 13 UT Mercury at greatest illuminated extent (evening)\\n\"\n + \"2009 12 18 17 UT Mercury at greatest elongation, 20.3\\u00B0 east of Sun (evening)\\n\"\n + \"2009 12 20 15 UT Moon at apogee, 252,109 miles (405,731 km)\\n\"\n + \"2009 12 21 17:47 UT Winter (Northern Hemisphere) begins at the solstice\\n\"\n + \"2009 12 31 Partial lunar eclipse, 18:52 UT to 19:54 UT\\n-----\\n\";\n END Comment DAF */\n\n document.planets.ra1.value = planet_ra[1];\n document.planets.dec1.value = planet_dec[1];\n document.planets.dist1.value = planet_mag[1];\n document.planets.size1.value = planet_size[1];\n document.planets.phase1.value = planet_phase[1];\n document.planets.alt1.value = planet_alt[1];\n document.planets.az1.value = planet_az[1];\n\n document.planets.ra1_2.value = planet_ra[1];\n document.planets.dec1_2.value = planet_dec[1];\n document.planets.dist1_2.value = planet_mag[1];\n document.planets.size1_2.value = planet_size[1];\n document.planets.phase1_2.value = planet_phase[1];\n document.planets.alt1_2.value = planet_alt[1];\n document.planets.az1_2.value = planet_az[1];\n\n document.planets.ra2.value = planet_ra[2];\n document.planets.dec2.value = planet_dec[2];\n document.planets.dist2.value = planet_mag[2];\n document.planets.size2.value = planet_size[2];\n document.planets.phase2.value = planet_phase[2];\n document.planets.alt2.value = planet_alt[2];\n document.planets.az2.value = planet_az[2];\n\n document.planets.ra2_2.value = planet_ra[2];\n document.planets.dec2_2.value = planet_dec[2];\n document.planets.dist2_2.value = planet_mag[2];\n document.planets.size2_2.value = planet_size[2];\n document.planets.phase2_2.value = planet_phase[2];\n document.planets.alt2_2.value = planet_alt[2];\n document.planets.az2_2.value = planet_az[2];\n\n document.planets.ra3.value = planet_ra[3];\n document.planets.dec3.value = planet_dec[3];\n document.planets.dist3.value = planet_mag[3];\n document.planets.size3.value = planet_size[3];\n document.planets.phase3.value = planet_phase[3];\n document.planets.alt3.value = planet_alt[3];\n document.planets.az3.value = planet_az[3];\n\n document.planets.ra3_2.value = planet_ra[3];\n document.planets.dec3_2.value = planet_dec[3];\n document.planets.dist3_2.value = planet_mag[3];\n document.planets.size3_2.value = planet_size[3];\n document.planets.phase3_2.value = planet_phase[3];\n document.planets.alt3_2.value = planet_alt[3];\n document.planets.az3_2.value = planet_az[3];\n\n document.planets.ra4.value = planet_ra[4];\n document.planets.dec4.value = planet_dec[4];\n document.planets.dist4.value = planet_mag[4];\n document.planets.size4.value = planet_size[4];\n // document.planets.phase4.value = planet_phase[4];\n document.planets.alt4.value = planet_alt[4];\n document.planets.az4.value = planet_az[4];\n\n document.planets.ra4_2.value = planet_ra[4];\n document.planets.dec4_2.value = planet_dec[4];\n document.planets.dist4_2.value = planet_mag[4];\n document.planets.size4_2.value = planet_size[4];\n // document.planets.phase4_2.value = planet_phase[4];\n document.planets.alt4_2.value = planet_alt[4];\n document.planets.az4_2.value = planet_az[4];\n\n document.planets.ra5.value = planet_ra[5];\n document.planets.dec5.value = planet_dec[5];\n document.planets.dist5.value = planet_mag[5];\n document.planets.size5.value = planet_size[5];\n // document.planets.phase5.value = planet_phase[5];\n document.planets.alt5.value = planet_alt[5];\n document.planets.az5.value = planet_az[5];\n\n document.planets.ra5_2.value = planet_ra[5];\n document.planets.dec5_2.value = planet_dec[5];\n document.planets.dist5_2.value = planet_mag[5];\n document.planets.size5_2.value = planet_size[5];\n // document.planets.phase5_2.value = planet_phase[5];\n document.planets.alt5_2.value = planet_alt[5];\n document.planets.az5_2.value = planet_az[5];\n\n document.planets.dist6.value = planet_dist[6];\n document.planets.size6.value = sunrise_set;\n document.planets.phase6.value = phenomena;\n document.planets.dawn.value = dawn_planets;\n document.planets.dusk.value = dusk_planets;\n document.planets.size7.value = moonrise_set;\n document.planets.phase7.value = twilight_begin_end;\n\n document.planets.ra8.value = planet_ra[8];\n document.planets.dec8.value = planet_dec[8];\n document.planets.dist8.value = planet_mag[0];\n document.planets.size8.value = planet_size[8];\n document.planets.alt8.value = planet_alt[8];\n document.planets.az8.value = planet_az[8];\n\n document.planets.ra8_2.value = planet_ra[8];\n document.planets.dec8_2.value = planet_dec[8];\n document.planets.dist8_2.value = planet_mag[0];\n document.planets.size8_2.value = planet_size[8];\n document.planets.alt8_2.value = planet_alt[8];\n document.planets.az8_2.value = planet_az[8];\n\n document.planets.ra9.value = planet_ra[9];\n document.planets.dec9.value = planet_dec[9];\n document.planets.dist9.value = planet_mag[6];\n document.planets.size9.value = planet_size[9];\n document.planets.phase9.value = planet_phase[9];\n document.planets.alt9.value = planet_alt[9];\n document.planets.az9.value = planet_az[9];\n\n document.planets.ra9_2.value = planet_ra[9];\n document.planets.dec9_2.value = planet_dec[9];\n document.planets.dist9_2.value = planet_mag[6];\n document.planets.size9_2.value = planet_size[9];\n document.planets.phase9_2.value = planet_phase[9];\n document.planets.alt9_2.value = planet_alt[9];\n document.planets.az9_2.value = planet_az[9];\n\n }\n}" ]
[ "0.62492615", "0.5696323", "0.55888826", "0.55412257", "0.5498206", "0.5485822", "0.54462564", "0.54199636", "0.5411243", "0.54064685", "0.5388579", "0.53209186", "0.53209186", "0.53154576", "0.5313278", "0.53125244", "0.5286746", "0.528181", "0.5277904", "0.5256129", "0.52467006", "0.5228788", "0.5223071", "0.5219743", "0.5208333", "0.52035916", "0.5196189", "0.51790875", "0.5178008", "0.516659", "0.514398", "0.5139799", "0.51354593", "0.50986445", "0.5071767", "0.5071767", "0.5063865", "0.5063865", "0.5054157", "0.50479716", "0.5043188", "0.50402826", "0.50357723", "0.5032238", "0.5029587", "0.50239325", "0.50209224", "0.5013872", "0.50075066", "0.50051546", "0.50051546", "0.5003517", "0.50033754", "0.4998731", "0.4996663", "0.49940097", "0.49925312", "0.49906114", "0.49901024", "0.49878407", "0.49848676", "0.4981866", "0.4981328", "0.49794313", "0.49767694", "0.49749002", "0.4972513", "0.49690562", "0.4966476", "0.49649274", "0.4961339", "0.495359", "0.4951241", "0.49446267", "0.49446267", "0.49424514", "0.49369586", "0.49328926", "0.49309474", "0.4930292", "0.49296358", "0.49296358", "0.4925016", "0.49230438", "0.49230438", "0.49230438", "0.49230438", "0.49230438", "0.49214512", "0.49214512", "0.4917587", "0.491382", "0.49131012", "0.49121854", "0.4911569", "0.49028775", "0.4902707", "0.48972574", "0.48928338", "0.48826364" ]
0.5735372
1
check if there is user with the same username
function validateSignupInput(data, otherValidation){ let { errors } = otherValidation(data); const { username } = data; return User.findOne({username: username}).then(user => { if(user){ if (user.username === username){ errors.username = "There is user with this username!"; } } return { errors, isValid: isEmpty(errors) } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async usernameCheck(username) {\n const duplicateCheck = await db.query(\n `SELECT username \n FROM users \n WHERE UPPER(username) = UPPER($1)`,\n [username]\n );\n // returns true if username is already in use\n return duplicateCheck.rows.length > 0;\n }", "function usernameAlreadyExists(username){\n return false;\n }", "async checkUsernameUnique () {\n\t\tif (this.dontCheckUsername) {\n\t\t\treturn;\n\t\t}\n\t\tconst username = this.data.username || this.user.get('username');\n\t\tif (!username) {\n\t\t\treturn;\n\t\t}\n\t\t// we check against each team the user is on, it must be unique in all teams\n\t\tconst teamIds = this.user.get('teamIds') || [];\n\t\tconst usernameChecker = new UsernameChecker({\n\t\t\tdata: this.request.data,\n\t\t\tusername: username,\n\t\t\tuserId: this.user.id,\n\t\t\tteamIds: teamIds\n\t\t});\n\t\tconst isUnique = await usernameChecker.checkUsernameUnique();\n\t\tif (!isUnique) {\n\t\t\tthrow this.request.errorHandler.error('usernameNotUnique', {\n\t\t\t\tinfo: {\n\t\t\t\t\tusername: username,\n\t\t\t\t\tteamIds: usernameChecker.notUniqueTeamIds\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "function IsUseralreadyExist(user1)\n {\n for(var i=0;i<allUsers.length;i++)\n {\n if(allUsers[i].username==user1.username&&allUsers[i].userpassword==user1.userpassword)\n {\n alert(\"User already exit try Different Username\");\n return 0;\n }\n }\n return 1;\n\n }", "function findCurUser(username) {\n return username.username == curAcc.username;\n}", "function doesExist(newUser){\n\tuserObjects.forEach(user => {\n\t\tif(user.username === newUser.username){\n\t\t\treturn true\n\t\t}\n\t})\n\treturn false;\n}", "function usernameMatch(username) {\n return username === admin.username;\n}", "function checkUser(potentialUserName) {\n Meteor.call('users.checkUsername', {potentialUserName}, (error, count) => {\n if (error) {\n Bert.alert(error.reason, 'danger');\n } else {\n console.log(count)\n if (count > 0) {\n setUsernameFalse(potentialUserName)\n return false\n } else {\n setUsernameTrue(potentialUserName)\n return true\n }\n }\n });\n }", "userExists(user) {\n // Temp variable for storing the user if found\n let temp = '';\n for (let i of this.users) {\n if (i === user) {\n console.log('user: ' + user + ' exists');\n temp = user;\n }\n }\n let exists = (temp !== '' && temp === user);\n if(temp === '') console.log('user: ' + user + ' does not exist');\n return exists;\n }", "function userExists(username){\n\treturn username.toLowerCase() == 'admin';\n}", "function existsUsername(user_input){\n for(let i in users){\n let user = users[i];\n if(user_input === user.username){\n return true;\n }\n }\n return false;\n}", "function isUsernameTaken(){\n return new Promise(function(resolve, reject){\n mysql.pool.getConnection(function(err, connection){\n if(err){return reject(err)};\n \n connection.query({\n sql: 'SELECT username FROM deepmes_auth_login WHERE username=?',\n values: [fields.username]\n }, function(err, results){\n if(err){return reject(err)};\n \n if(typeof results[0] !== 'undefined' && results[0] !== null && results.length > 0){\n let usernameTaken = 'Username is already taken.';\n reject(usernameTaken);\n } else {\n resolve();\n }\n\n });\n\n connection.release();\n\n });\n });\n }", "userExists(user) {\n return this.users.indexOf(user)!==-1;\n }", "function usernameExist(users, username) {\n let flag=0;\n for(let i in users) {\n if(users[i].name == username) {\n document.getElementById('wrong').style.color='red';\n document.getElementById('wrong').innerHTML='This username already exists';\n flag++;\n return false;\n }\n }\n if(flag==0)\n return true;\n}", "checkUsername(req, res) {\n const { username } = req.params;\n // Quick client-side username validation\n if (validateUser({ username }).length) {\n res.json({ data: { available: false, exists: false } });\n // Check for conflicts with other users\n } else {\n getAuth0User.byUsername(username)\n .then(user => res.json({ data: {\n available: !user,\n exists: !!user,\n } }));\n }\n }", "static async isRegisteredUsername(username) {\n let res = await db.query('SELECT * FROM users WHERE username = $1', [username]);\n return res.rowCount > 0;\n }", "function sameUser(x) {\n return x.usuario === \"user\";\n}", "function userExists(userName, usersTable){\n\tif (usersTable[\"userName\"]) return true;\n\t\n\tlet userArray = Object.keys(usersTable);\n\tfor (let i = 0; i < userArray.length; i++) {\n\t\tif (sameUser(userName, userArray[i], usersTable))\n\t\t\treturn true;\n\t}\n\t\n\treturn false;\n}", "isUserUnique (params) {\n\t\tvar roomUsers = this.getUserList(params.room) || [];\n\t\tif (roomUsers.length > 0) {\n\t\t\treturn roomUsers.filter((username) => username.toLowerCase() === params.name.toLowerCase()).length === 0;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "userPresent(username){\n console.log(\"userPreesent called\");\n \n if (this.users.length > 0) {\n for (var i =0; i < this.users.length; i++){\n if (this.users[i] === username){\n return true;\n }\n }\n }\n return false;\n }", "function sameUser(x) {\n return x.usuario === \"ciudadano\";\n}", "isUserExistenceAndUnique(username) {\n var connectionDB = this.connectDB()\n var checkExistenceAndUniqueProcess = connectionDB.then((connection) => {\n return new Promise((resolve, reject) => {\n connection.query('SELECT id FROM ' + dbTesterInfo +\n ' WHERE testerID = ?', username, (err, results, fields) => {\n\n if (!err) {\n if(results.length === 1) {\n connection.release()\n resolve()\n } else if (results.length === 0){\n connection.release()\n reject({err: {msg: 'This username does not exist!'}})\n } else {\n connection.release()\n reject({err: {msg: 'This username is duplicated!Please remove!'}})\n }\n } else {\n connection.release()\n reject({err: {msg: 'Lost database connection!'}})\n }\n })\n })\n }).catch((err) => {\n return Promise.reject(err)\n })\n return checkExistenceAndUniqueProcess\n }", "async checkUsername({request, response}) {\n let exist = await User.findBy('username', request.input('username'));\n return response.send(!!exist);\n }", "doesUserExist(uname){\n\t\treturn db.one(`SELECT * FROM user_id WHERE uname=$1`, uname);\n\t}", "function checkIfUsernameExist(req, res, next) {\n models.user.findOne({\n where: {\n 'username':req.body.username\n }\n }).then( ( user) => {\n if (user) {\n res.status(400).send({error: \"The username is in use.\"});\n }\n });\n next();\n }", "function doesUserExist(userName){\n\tvar logonFile = fs.readFileSync(USER_PATH + USER_INFO_FILE_NAME);\n\tvar users = JSON.parse(logonFile);\n\tvar exist = false;\n\n\tusers.forEach(function(user){\n\t\tif (user.userName.localeCompare(userName) === 0){\n\t\t\texist = true;\n\t\t}\n\t});\n\treturn exist;\n}", "function sameUser(name1, name2, usersTable){\n\tname1 = name1.toUpperCase();\n\tname2 = name2.toUpperCase();\n\t\n\tif (name1.toUpperCase() === name2.toUpperCase()) \n\t\treturn true;\n\tif (usersTable[name1] !== undefined){\n\t\tlet user = usersTable[name1];\n\t\tif (user[\"aliases\"] !== undefined && user[\"aliases\"].indexOf(name2) != -1)\n\t\t\treturn true;\n\t}\n\tif (usersTable[name2] !== undefined){\n\t\tlet user = usersTable[name2];\n\t\tif (user[\"aliases\"] !== undefined && user[\"aliases\"].indexOf(name1) != -1)\n\t\t\treturn true;\n\t}\n\t\n\treturn false;\n}", "function isDuplicate(user, data) {\n const v = user.find(itm => JSON.stringify(itm) === JSON.stringify(data))\n\n const exist = v? true : false;\n\n return exist;\n}", "checkUsername(req, res, next){\n\n db.query(queries.selectUserWithUsername, [req.body.username], (err, results, fields) => {\n\n if (err) throw err;\n \n if (results.length === 0){\n req.usernameExists = false;\n } else {\n req.usernameExists = true;\n }\n next();\n });\n }", "function userExists (username, db = connection) {\n return db('users')\n .count('id as n')\n .where('username', username)\n .then((count) => {\n return count[0].n > 0\n })\n}", "function isUserExisting(username) {\n return new Promise(async (resolve, reject) => {\n try {\n if(!username) {\n throw new IncompleteDataError('The username is required to check if the user exists.');\n }\n\n const queryString = `SELECT COUNT(username) \n FROM vze_user \n WHERE username='${username}'`;\n\n const data = await helper.executeQuery(queryString);\n let isUserExisting = (data['count'] > 0);\n\n console.log('User \\'%s\\' exists: ', username, isUserExisting); \n resolve(isUserExisting);\n } catch(error) {\n reject(error);\n };\n });\n}", "ownMessage(usernameMessage){\n\t\tvar user = Meteor.userId(),\n\t\t\tuserMessage = usernameMessage.hash.username;\n\n\t\tif(userMessage == user){\n\t\t\treturn true;\n\t\t}\n\t}", "function userExists (userName, db = connection) {\n return db('users')\n .count('id as n')\n .where('user_name', userName)\n .then(count => {\n return count[0].n > 0\n })\n}", "function usernamevalid(){\n if(username.value ==localUserName ){\n return true;\n }else{\n return false;\n }\n }", "async checkUsernameUnique () {\n\t\tif (this.notSaving && !this.teamIds) {\n\t\t\t// doesn't matter if we won't be saving anyway, meaning we're really ignoring the username\n\t\t\treturn;\n\t\t}\n\t\tlet teamIds = this.teamIds || [];\n\t\tif (this.existingModel) {\n\t\t\tconst existingUserTeams = this.existingModel.get('teamIds') || [];\n\t\t\tif (ArrayUtilities.difference(existingUserTeams, teamIds).length === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tteamIds = [...teamIds, ...this.existingModel.get('teamIds') || []];\n\t\t}\n\t\tconst username = this.attributes.username || (this.existingModel ? this.existingModel.get('username') : null);\n\t\tif (!username) {\n\t\t\t// username not provided === no worries\n\t\t\treturn;\n\t\t}\n\t\t// check against all teams ... the username must be unique for each\n\t\tconst userId = this.existingModel ? this.existingModel.id : null;\n\t\tconst usernameChecker = new UsernameChecker({\n\t\t\tdata: this.data,\n\t\t\tusername,\n\t\t\tuserId,\n\t\t\tteamIds,\n\t\t\tresolveTillUnique: this.usernameCameFromEmail \t// don't do an error on conflict, instead append a number to the username till it's unique\n\t\t});\n\t\tconst isUnique = await usernameChecker.checkUsernameUnique();\n\t\tif (isUnique) {\n\t\t\tthis.attributes.username = usernameChecker.username;\t// in case we forced it to resolve to a non-conflicting username\n\t\t\treturn;\n\t\t}\n\t\tif (this.ignoreUsernameOnConflict) {\n\t\t\tif (!this.existingModel || !this.existingModel.get('isRegistered')) {\n\t\t\t\t// in some circumstances, we tolerate a conflict for unregistered users by just throwing away\n\t\t\t\t// the supplied username and going with the first part of the email, but we still need to resolve it\n\t\t\t\tthis.attributes.username = UsernameValidator.normalize(\n\t\t\t\t\tEmailUtilities.parseEmail(this.attributes.email).name\n\t\t\t\t);\n\t\t\t\tthis.usernameCameFromEmail = true;\t// this will force a resolution of uniqueness conflict, rather than an error\n\t\t\t\treturn await this.checkUsernameUnique();\n\t\t\t}\n\t\t}\n\n\t\t// on registration, we throw the error, but if user is being invited to the team, we tolerate it\n\t\tif (!this.userBeingAddedToTeamId) {\n\t\t\tthrow this.errorHandler.error('usernameNotUnique', {\n\t\t\t\tinfo: {\n\t\t\t\t\tusername: username,\n\t\t\t\t\tteamIds: usernameChecker.notUniqueTeamIds\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "function usernameExists(username) {\r\n\tUser.findOne({\r\n\t\twhere : {\r\n\t\t\tusername : username\r\n\t\t}\r\n\t}).then((user)=>{\r\n\t\treturn user;\r\n\t});\r\n}", "function validateName(name){\n for (const id of Object.keys(users)) {\n const user = get(id);\n if (user && user.name === name)\n return false;\n }\n return true;\n}", "function findUser(name) {\n var existingUser = false;\n for (var i = 0; i < mainUsersArr.length; i++) {\n if (name.toLowerCase() === mainUsersArr[i].userName.toLowerCase()) {\n existingUser = true;\n localStorage.setItem('CurrentUser', JSON.stringify(i));\n break;\n }\n } \n if (existingUser === false) {\n new UserData(name);\n localStorage.setItem('CurrentUser', JSON.stringify(mainUsersArr.length -1)); \n }\n}", "userEnUso(nick)\n {\n const user = this.usuarios.find(usuario => usuario.nickName == nick)\n return user != undefined;\n }", "function checkUsername(username){\r\n\t\t\t\r\n\t\t\tvar user_check = 0;\r\n\t\t\tif (self.user.user_id != null) {\r\n\t\t\t\t\r\n\t\t\t\tif(username == self.usernameupdateCheck) {\r\n\t\t\t\t\tuser_check = 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.errorUsername = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( user_check == 0 ) {\r\n\t\t\t\t\r\n\t\t\t\tUserService.checkUsername(username)\r\n\t\t\t\t.then(\r\n\t\t\t\t\t\tfunction(response) {\r\n\t\t\t\t\t\t\tif( response.status == 200 ) {\r\n\t\t\t\t\t\t\t\tself.errorUsername = true;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tself.errorUsername = false;\r\n\t\t\t\t\t\t\t\tconsole.log(response.status);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}, function (errResponse) {\r\n\t\t\t\t\t\t\tconsole.log(errResponse);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "function checkIfUserExists(userName){\n return user_Names[userName];\n}", "function userExists(user) {\n for (var i = 0, len = registeredUsers.length; i < len; i++) {\n if (user.id === registeredUsers[i].id) {\n logger.log(\"User \"+user.id.yellow.bold+\" already registered, updating his socket \"+user.socket.green.bold);\n registeredUsers[i].socket = user.socket;\n return true;\n }\n }\n return false;\n }", "function checkUsername(){\n var u = JSON.parse(localStorage.utenti);\n var l = u.length;\n var user = document.submitRecForm.name.value;\n for (i=0;i<l;i++){\n if(u[i].nickname == user && u[i].nickname == localStorage.utentecorrente) {\n return true;\n }\n }\n alert(\"Username non corrispondente all'utente corrente\");\n return false;\n}", "function isUsernameAvailable(username) {\n userService.isUsernameAvailable(username).then(\n function (data) {\n validator('existLogin', data.data);\n })\n }", "function isExist(usersSession, tar) {\n for (one in usersSession) {\n if (usersSession[one].name == tar) return true\n }\n return false;\n }", "function existingUser() {\n for (let i = 0; i < newUserData.length; i++) {\n if (newUserData[i].value === username.value) {\n alert(\"The user already exists!\");\n }\n }\n}", "function otherUser() {\n\tvar listUsers = localStorage.getItem(\"tbUsers\");\n\tlistUsers = JSON.parse(listUsers);\n\tvar user = document.getElementById('username').value;\n\tvar pass = document.getElementById('password').value;\n\n\tfor (var u in listUsers) {\n\t\tvar usr=listUsers[u];\n\t\tif (usr.User == user && usr.Password == pass) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "function checkIfUserExists(name){\n return Model.userExist(name);\n}", "function check(email, username){\n var usrobj = userobj;\n var usrs = usrobj.users;\n //Checks login info with all objects of signup json object\n for (let index = 0; index < usrs.length; index++) {\n const obj = usrs[index];\n if(obj.email_address == email || obj.username == username) {\n return true;\n }\n }\n return false;\n}", "function checkForDuplicates(newEmail) {\n var matched = false;\n $(\"#auth-users tr\").each(function() {\n\tvar userInfo = $(this)[0].cells[0].innerHTML;\n\temailFromTable = extractEmail(userInfo);\n\tif (emailFromTable == newEmail) {\n\t matched = true;\n\t}\n });\n return matched;\n}", "function isNewUser(id) {\n return users[id] == undefined;\n}", "isUsernameAvailable(username) {\n return __awaiter(this, void 0, void 0, function* () {\n if (username == null) {\n throw new nullargumenterror_1.NullArgumentError('username');\n }\n return this.users.find(u => u.username == username) != null;\n });\n }", "function checkUsername(input, value) {\n var result = false;\n \n // Regular expression (letters and numbers)\n let regex = /^(\\w+)$/;\n \n // Checks if input value length is between 4 and 10 \n if (value.length < 4 || value.length > 10) {\n addInputError(input, \"Username must have between 4 and 10 characters!\");\n \n // Checks if input value match regular expression\n } else if (!value.match(regex)) {\n addInputError(input, \"Username accepts letters and numbers only!\");\n\n // Else loops through all users and check if user already exist\n } else {\n result = true;\n // Makes request to get all users in users.json file\n request(\"http://introtoapps.com/datastore.php?action=load&appid=215242834&objectid=users.json\", \"GET\", \"json\", \"#register_error\", function(data) { \n for (var u in data) {\n if (data[u].username === value) {\n addInputError(input, \"Username has already been taken!\");\n result = false;\n break;\n }\n }\n });\n }\n return result;\n}", "function isUserEqual(x, y) {\n return true;\n }", "function isUserEqual(x, y) {\n return true;\n }", "async function checkUserName(req, res, next) {\n const { username } = req.body;\n const user = await User.getByUsername(username);\n if (user) {\n res.status(400).json({ message: 'Username already taken' });\n } else {\n next();\n }\n}", "function checkIfUniqueNickname(proposed_nickname, user_list){\n for(let user in user_list){\n if(user_list[user].userNickname === proposed_nickname && user_list[user].status === true){\n return false;\n }else{\n continue;\n }\n }\n return true;\n}", "function isUser(userList, username){\n let return_ = false;\n // userList.forEach(element => {\n // if(element.name = username){\n // return_= true;\n // } \n // });\n for(let i=0;i<userList.length;i++){\n if(userList[i].name == username){\n return_= true;\n //return return_\n }\n }\n return return_\n}", "checkIfUnique(name, value, signal) {\n if (name === 'password' || name === 'confirmPassword') return;\n return this.getAll(signal)\n .then(users => {\n return users.find(user => user[name] === value)\n })\n .then(user => {\n let message = '';\n if (user !== undefined){\n message = `This ${name} has already been used.`; \n } \n return this.setError(name, message); \n });\n }", "function userExist(username) {\n return knex(TABLE_NAME)\n .count('id as n')\n .where({ username: username })\n .then((count) => {\n console.log('count in userQueries', count)\n return count[0].n > 0\n });\n}", "function checkUsername(message) {\n // If the username has been taken, and a new one (with a number on the end) has been assigned\n // try to Ghost the other user\n if (client.nick.match(new RegExp(settings.client.user + '[0-9]+'))) {\n client.say('nickserv', 'ghost ' + settings.client.user + ' ' + settings.client.pass);\n }\n}", "function doesUserExist(username, cb) {\n const query = `SELECT * FROM users WHERE username = '${username}'`;\n let sqlCallback = data => {\n //calculate if user exists or assign null if results is null\n const doesUserExist =\n data.results !== null ? (data.results.length > 0 ? true : false) : null;\n //check if there are any users with this username and return the appropriate value\n cb(data.error, doesUserExist);\n };\n connection.query(query, sqlCallback);\n}", "function checkusername(req, res, next){\n var uname = req.body.uname;\n var checkNameExist = userModel.findOne({username: uname});\n checkNameExist.exec((err, data)=>{\n if(err) throw err;\n if(data){\n return res.render('signup', { title: 'Password Management System', msg: 'Username Already Exist' });\n }\n next();\n })\n }", "isUser(userName, pass) {\n return this.users.find((u) => {\n return u.name == userName && u.pass == pass;\n });\n }", "function doesUserExist(username) {\n\n return User.find({'username': username}, 'username password',{})\n // function (err, users) {\n // let doesUserExist = users !== null ? users.length > 0 : null;\n // if (err)\n // console.log(err+\" error\");\n // return reject(err);\n // console.log(doesUserExist+\" exists\");\n // resolve (doesUserExist)\n // });\n}", "function checkIfUserExists (callback) { \n connection.query(`SELECT * FROM user WHERE userid=${connection.escape(id)}`, (err, res)=>{\n if (err) {message.channel.send(embeds.errorOccured(message, err));}\n callback(res[0] !== undefined); \n });\n }", "function isUser(userList, username){\n return username in userList;\n }", "function isCorrect(){\n for (var index = 0; index < signUpContainer.length; index++) {\n if ( signUpContainer[index].userEmail == logInEmail.value && signUpContainer[index].userPass == logInPass.value ) {\n\n currentName = signUpContainer[index].userName ; //store name of user \n localStorage.setItem(\"name\" , JSON.stringify(currentName)) ; //store name of user in local storage\n \n return true;\n }\n }\n}", "function userExists(username) {\n console.log(\"Search if user exists\", username)\n return findUserByName(username)\n .then(() => Promise.resolve(true))\n .catch(err => {\n if (err === exports.ERR_NOT_FOUND) {\n return Promise.resolve(false)\n }\n return Promise.reject(err)\n })\n}", "function validate_username(username){\n update_all_user_list();\n let invalid_username = 1;\n let good_index = 0; // this will store which index in array contains the user that matches the username\n // check through database which is currently an array (phase1)\n for (let i = 0; i < all_accounts.length; i++){\n if (all_accounts[i].username === username){\n invalid_username = 0;\n good_index = i;\n }\n }\n\n if (invalid_username === 1){\n alert(\"The username enetered does not exist please try again.\");\n return -1; // -1 = fail\n }\n return good_index; // pass\n}", "saveDataAsUser() {\n let checkUp = this.props.usersList.filter(user => {\n if (this.state.username === user.username) {\n return true;\n }\n return false;\n })\n if (checkUp && checkUp.length > 0) {\n alert('User with wanted username already exist.')\n } else if (this.state.username === '' || this.state.password === '') {\n alert('Input fields cannot be empty')\n } else {\n this.props.changeDataPutRequest(this.props.loggedUser.id, { ...this.props.loggedUser, username: this.state.username, password: this.state.password });\n this.props.changePageStateToList();\n }\n }", "async function userExist(user_id){\r\n const existing_in_users_table = await DButils.execQuery(`SELECT * FROM dbo.Users WHERE userId='${user_id}'`);\r\n if (existing_in_users_table.length==0){\r\n return false\r\n }\r\n return true\r\n}", "function sameNameOrNumber(req,res,next){\n //checking if same name\n User.find({name:req.body.name},function(err,sameName){\n if (err) console.log(err);\n else {\n if(sameName.length==0)\n {//if no user with same name exists, checking for user with same number\n User.find({number:req.body.number},function(err,sameNum){\n if (err) console.log(err);\n else {\n if(sameNum.length==0)//if user with same number also does not exist\n next();\n else\n res.send(\"User with same number exists.Create another user\");\n }\n })\n }\n else\n res.send(\"User with same name exists.Create another user\");\n }\n })\n}", "function winnerAlreadyExists(winnerEmail) {\n var i;\n for (i = 0; i < $scope.winners.length; i++) {\n if ($scope.winners[i].email === winnerEmail) {\n return true;\n }\n }\n return false;\n }", "function userExists(username, callback){\n db.get(\"SELECT * FROM users WHERE username=?\",[username],function(err,res){\n if (callback) callback(res);\n if (res === undefined){\n console.log('dis undefined');\n return false\n }\n else return true;\n })\n}", "function usernameCheck(req, res, next) {\r\n const { username } = req.params;\r\n const usernameVerified = Object.values(req.usuario)[0];\r\n if (username == usernameVerified) {\r\n console.log('usernameCheck OK');\r\n return next();\r\n } else {\r\n res.status(501).send(`You are not allowed to do this operation`);\r\n }\r\n}", "async function userIsExist(userName) {\r\n try {\r\n const user = await User.findOne({\r\n where: {\r\n userName,\r\n },\r\n });\r\n if (user) {\r\n return user.toJSON();\r\n }\r\n return false;\r\n } catch (error) {\r\n console.error(error.message);\r\n return false;\r\n }\r\n}", "function checkRegistrationUser(username) {\n var blank = isBlank(username);\n var element = document.getElementById('username');\n var existence;\n if(blank) {\n\texistence = false;\n\tinputFeedback(element, existence, blank);\n } else {\n\texistence = checkUserExistence(username);\n\tinputFeedback(element, existence, blank);\n }\n}", "function checkUser (name, pass){\n for(var i=0;i<student.users.length;i++)\n {\n if (student.users[i].name==name && student.users[i].pwd==pass)\n { \n console.log(student.users[i].name+\" Exists\");\n return true;\n }\n }\n console.log(\"Check Username and Password\")\n return false;\n}", "function check_username(socket, type, username){\n\n var rID = roomID(type);\n var dfd = new $.Deferred();\n\n //Get the list of users in the room\n //and check if any of them conflict\n //with username\n socket.emit('get_users', {room: rID});\n socket.once('send_users', function(data){\n var users = data.usernames;\n for(var user in users){\n if(users[user] == username){\n dfd.resolve( true );\n }\n }\n dfd.resolve( false );\n });\n return dfd.promise();\n}", "function userExists(username, callback) {\n pool.getConnection(function(err, connection) {\n if(err) {\n connection.release();\n return callback(err);\n }\n\n connection.query('SELECT * FROM `User` WHERE `username` = ? LIMIT 1', [username], function(err, rows) {\n if(err) {\n connection.release();\n return callback(err);\n }\n\n // Release the connection\n connection.release();\n\n // Run callback\n callback(null, rows.length>0);\n });\n });\n}", "function checkDuplicateUserName(arr,name){\n for (var i = 0;i<arr.length;i++){\n if(arr.length == 0){\n alert(\"no data\");\n return ;\n }\n if(arr[i].userName===name){\n alert(name + \"Duplicate user, user exist found\");\n return false;\n }\n }\n}", "function validateUser(uname) {\r\n return uname !== \"\"\r\n}", "function checkDup(db,userId,callback){\n\t db.collection(\"userAccount\").findOne({\"userId\" : userId}, function(err,doc){\n\t\t assert.equal(err,null);\n\t\tif(!doc){\n\t\t\tcallback(true);\n\t\t}\n\t\telse{\n\t\t\tcallback(false);\n\t\t}\n\t});\n}", "findUser (username) {\n for (let i = 0; i < this.users.length; i++) {\n if (username === this.users[i].name) {\n return this.users[i];\n }\n }\n return null;\n }", "function isAuthenticated({username, password}){\r\n console.log(userdb.users);\r\n return userdb.users.findIndex(user => user.username === username && user.password === password) !== -1\r\n \r\n }", "function isUser(userList, username){\r\n return username in userList\r\n}", "function retrieveUser(username) {\n for (let key = 0; key < userObj.length; key++) {\n let nameInObj = userObj[key].name;\n if (nameInObj === username) {\n return userObj[key];\n } \n }\n return \"no such user\";\n}", "function checkName(data) {\n let result = userData.find((element) => {\n return (element.email === data.email && element.pass === data.pass)\n });\n if(result){\n localStorage.setItem(\"loggedInUserId\",result.id)\n props.loggedInUser(result)\n history.push('/homes');\n }else{\n alert(\"Incorrect Email or Password\")\n }\n }", "isUsernameAvailable(callback) {\n var self = this;\n \n var sql = \"SELECT 1 FROM user WHERE username = ?\";\n pool.getConnection(function(con_err, con) {\n if(con_err) {\n console.log(\"Error - \" + Date() + \"\\nUnable to connect to database.\");\n callback(con_err);\n return;\n }\n \n con.query(sql, [self.username], function (err, result) {\n if (err) {\n console.log('Error encountered on ' + Date());\n console.log(err);\n callback(null, false);\n con.release();\n return;\n } \n \n if(result.length == 0) \n callback(null, true);\n else\n callback(null, false);\n \n \n con.release();\n });\n });\n }", "function checkUser(username,pass,email,role){\n\tdatabase.ref('/users/'+username).once('value').then(function(ss){\n\t\tif(ss.val())\n\t\t{\n\t\t\tswal('Username already exist' ,'' ,'error');\n\t\t}\n\t\telse \n\t\t{\n\t\t\tregisterUser(username,pass,email,role);\n\t\t\tswal('Register success' ,'' ,'success').then((result) => {\n\t\t\t\twindow.location.reload();\n\t\t\t});\n\t\t}\n\t});\n}", "hasUser(msg) {\n let indexOfUser = this.list.findIndex(user => user.id === msg.author.id);\n return indexOfUser !== -1;\n }", "checkUser() {\n let doesExit = false\n this.state.admin.forEach(x => {\n if(x.email === this.state.email) {\n doesExit = true;\n }\n });\n return doesExit;\n }", "function checkUserExists(username) {\n return new Promise((resolve, reject) => {\n User.findOne({\n where: {\n username: username\n }\n }).then(user => {\n if (user === null) {\n reject(new Error('no user exists by this name'));\n } else {\n resolve(user);\n }\n }).catch(err => {\n console.log(\"checkUserExists\", err);\n })\n });\n}", "addUser(user) {\n let foundUser = false;\n for (let i = 0; i < this.chatUsersDB.length; i++) {\n if (this.chatUsersDB[i].username === user.username) {\n foundUser = true;\n break;\n }\n }\n\n if (!foundUser) {\n user.hoursInChatroom = 0;\n this.chatUsersDB.push(user);\n return true;\n }\n else {\n return false;\n }\n }", "async function checkUserId(newId){\n const [ users ] = await mysqlPool.query(\n 'SELECT * FROM users ORDER BY id'\n );\n\n if(users){\n for(var i = 0; i < users.length; i++){\n if(users[i].userId === newId){\n return false;\n }\n }\n }\n return true;\n}", "function checkUserExistence(username) {\n var res;\n $.ajax({\n\turl: 'resources/check-user.php',\n\ttype: 'POST',\n\tasync: false,\n\tdata: { name: username },\n\tsuccess: function(result) {\n\t res=result.existence;\n\t}\n });\n return res;\n}", "function checkUsernames() {\n var inputtedUser = inputUser.val().trim();\n var inputtedZip = inputZip.val().trim();\n console.log(\"Username input: \" + inputtedUser);\n var userString = \"/\" + inputtedUser;\n\n $.get(\"/check-user\" + userString, function(data) {\n console.log(data);\n if (data === null) {\n updateUsername(inputtedUser, inputtedZip)\n }\n\n else {\n nameHelpText.text(\"Sorry. That user exists. Please try again\")\n console.log(\"User exists. Try a different username\")\n renderModal();\n }\n })\n }", "function checkUsername(username){ \n return new Promise((resolve, reject) => {\n firebase.database().ref('/usernames/'+username).once('value')\n .then((snapshot)=> { \n if(snapshot.exists()) \n reject('username allready exists!');\n else \n resolve();\n })\n })\n}", "function inDatabase(dbResult, username) {\r\n let result = false;\r\n dbResult.map((user) => {\r\n if (user.userName == username) {\r\n result = true;\r\n }\r\n });\r\n return result;\r\n}", "function userExist(login, callback){\n /*connection.connect(function(err) {\n if (err) {\n console.error('error connecting: ' + err.stack);\n return;\n }\n\n console.log('connected as id ' + connection.threadId);\n });*/\n var sql = \"SELECT count(*) as nbUser FROM users WHERE users.`login` = ?\";\n connection.query(sql,\n [login],\n function (error, results, fields) {\n if (error) {\n console.log(error);\n throw error;\n }\n //mainWindow.webContents.send('user-exist', results)\n //console.log(results[0].nbUser);\n //console.log(error);\n user_exist = false;\n //console.log(\"user.exist : function => \" + results[0].nbUser);\n if(results[0].nbUser >= 1){\n user_exist = true;\n }\n //user.exist = user_exist;\n return callback(user_exist);\n });\n //connection.end();\n}" ]
[ "0.77652323", "0.75814027", "0.75232685", "0.7463849", "0.74266696", "0.7262292", "0.7247066", "0.71808875", "0.71351284", "0.71322525", "0.7078025", "0.70370597", "0.7031352", "0.6990339", "0.6970152", "0.69452024", "0.69360954", "0.691047", "0.690314", "0.6854412", "0.6850675", "0.6844544", "0.68371195", "0.68344796", "0.68317014", "0.6823315", "0.6812587", "0.67911345", "0.6748886", "0.66904265", "0.6668142", "0.6660136", "0.6628768", "0.65888166", "0.65793943", "0.65769285", "0.65134007", "0.65026486", "0.64911425", "0.6467861", "0.64654815", "0.6452673", "0.64430356", "0.64329064", "0.6426302", "0.6423374", "0.64193696", "0.6419079", "0.63925016", "0.63815194", "0.6367347", "0.6364639", "0.6364199", "0.6357409", "0.6357409", "0.6341651", "0.63388914", "0.63336504", "0.6322872", "0.6315821", "0.6307676", "0.63033056", "0.629539", "0.62901306", "0.62802637", "0.627237", "0.6256478", "0.6255255", "0.6243138", "0.6239293", "0.62204176", "0.62200093", "0.621966", "0.6216935", "0.61881554", "0.618393", "0.6182409", "0.61756194", "0.6174154", "0.6173526", "0.61673236", "0.61662424", "0.61628735", "0.6160661", "0.6158476", "0.61321807", "0.61273843", "0.6125576", "0.6125241", "0.61143017", "0.61134505", "0.61047804", "0.6100765", "0.61003304", "0.60920984", "0.6091676", "0.606293", "0.6059029", "0.6057143", "0.60571426", "0.6055616" ]
0.0
-1
Handle the different ways the application can shutdown
function handleAppExit(options, err) { if (err) { console.error(err); } if (options.cleanup) { console.log("cleaning up"); } if (options.exit) { process.exit(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async onShutdown() {\n // put things to do upon application shutdown here\n }", "async shutdown(){}", "function doShutdown() {\n log.force(__filename, 'doShutDown()', 'Service shutdown commenced.');\n if (dbMan) {\n log.force(__filename, 'doShutDown()', 'Closing DB connections...');\n dbMan.disconnect();\n }\n if (httpServer) {\n log.force(__filename, 'doShutDown()', 'Shutting down HTTPServer...');\n httpServer.close();\n }\n log.force(__filename, 'doShutDown()', 'Exiting process...');\n process.exit(0);\n}", "function shutdown(data, reason) {\n // Clean up with unloaders when we're deactivating\n if (reason != APP_SHUTDOWN) {\n unload();\n Cu.unload(\"chrome://oldidentityblockstyle/content/hook.jsm\");\n Cu.unload(\"chrome://oldidentityblockstyle/content/watchwindows.jsm\");\n }\n}", "function shutdown() {\n logger.trace('Shutting down');\n logger.trace('Closing web server');\n\n database.terminatePool()\n .then(function() {\n logger.trace('node-oracledb connection pool terminated');\n logger.trace('Exiting process');\n process.exit(0);\n })\n .catch(function(err) {\n logError('Error removing CQN subscriptions', err);\n logger.trace('Exiting process');\n process.exit(1);\n });\n}", "shutdown() {\n process.exit(0);\n }", "function shutdown() { \n console.log('graceful shutdown express');\n\n const exitPayload = {\n\t\"status\": \"outofservice\"\n };\n const config = {\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n };\n\n currentStatus.spotStatus = \"outofservice\";\n try {\n const res = instance.put(\n `/spots/`+robot_credentials.login.id+`/statusUpdate`,\n currentStatus,\n config\n );\n } catch(e) { }\n // /requests/trip_ID/complete\n /*if ( activeTrip ) {\n console.log('shutting down during trip. Sending complete trip request to backend');\n console.log('https://hypnotoad.csres.utexas.edu:8443/requests/'+curTripId+'/complete'); \n request.put('https://hypnotoad.csres.utexas.edu:8443/requests/'+curTripId+'/complete');\n currentStatus.spotStatus = \"available\";\n activeTrip = false;\n }*/\n console.log(\"Exiting..\");\n process.exit();\n}", "function graceful_shutdown(){\n process.exit();\n}", "async function shutdown(e) {\r\n let err = e;\r\n\r\n console.log('Shutting down application');\r\n\r\n try {\r\n console.log('Closing web server module');\r\n\r\n await webServer.close();\r\n } catch (e) {\r\n console.error(e);\r\n\r\n err = err || e;\r\n }\r\n\r\n try {\r\n console.log('Closing database module');\r\n\r\n await database.close();\r\n\t//await database_eim.close(); //new\r\n } catch (e) {\r\n console.error(e);\r\n\r\n err = err || e;\r\n }\r\n \r\n \r\n console.log('Exiting process');\r\n\t\r\n if (err) {\r\n process.exit(1); // Non-zero failure code\r\n } else {\r\n process.exit(0);\r\n }\r\n}", "function shutdown() {\n logger.log('Shutting down Jankbot...');\n friends.save();\n for (let i = 0; i < modules.length; i += 1) {\n if (typeof modules[i].onExit === 'function') {\n modules[i].onExit();\n }\n }\n process.exit();\n}", "shutdown() {}", "function shutDown() {\n console.log('Received kill signal (SIGINT || SIGTERM), shutting down gracefully');\n server.close(() => {\n console.log('Server closed');\n process.exit(0);\n });\n\n setTimeout(() => {c\n console.error('Could not close remaining connections in time, forcing server shutdown');\n process.exit(1);\n }, cleanShutdownLimit); \n}", "_onShutdown(req, res) {\n Utils_1.sendJsonResponse(req, res, 200, { \"status\": \"ok\", \"message\": \"Server is shutting down\" });\n this._config.shutdownCallback(0);\n }", "function shutdown() {\n\tlogger.info('shutdown started')\n\tsetTimeout(() => process.exit(0), 500);\n}", "function shutdown() {\n\tlog.info('shutdown signal received');\n\tclusterShutdown = true;\n\tObject.keys(workers).forEach(shutdownWorker);\n\twaitForWorkerShutdown(new Date().getTime());\n}", "async shutdown() { }", "shutdown() {\n\n }", "shutdown() {\n\n }", "shutdown() {\n\n }", "shutdown() {\n\n }", "shutdown() {\n\n }", "onShutdown () {\n unload()\n }", "shutdown() {\n // this.log.debug(\"shutdown\");\n }", "function gracefulShutdown() {\n logger.warn('Configs have changed. Closing server and handling remaining connections.');\n server.close((err) => {\n if (err) {\n logger.error(err);\n }\n logger.warn('All server connections closed. Committing suicide to reload new configs.');\n process.exit(1);\n });\n }", "function gracefulShutdown() {\n winston.log('info','Received kill signal, shutting down gracefully.');\n server.close(function() {\n winston.log('Closed out remaining connections.');\n process.exit();\n });\n\n // if after\n setTimeout(function() {\n winston.log('error','Could not close connections in time, forcefully shutting down');\n process.exit();\n }, 10*1000);\n}", "function shutdown() {\n\tlogger.info('Shutdown received...', mod_name);\n\n\t// Each shutdown function takes a callback--the function to call when it is\n\t// done shutting down. Therefore, we convert the list of shutdown functions\n\t// into a chain where each function receives a pointer to the next one in\n\t// the chain, ending in a call to process.exit()\n\tvar shutdown = this.options.shutdown.reduceRight(function(memo, v) {\n\t\tvar ctx = v.ctx || this;\n\t\treturn v.fn.bind(ctx, memo);\n\t}, process.exit, this);\n\n\tshutdown();\n}", "handleExits() {\r\n process.on('SIGINT', () => {\r\n logger.info('Shutting down gracefully...');\r\n this.server.close(() => {\r\n logger.info(colors.red('Web server closed'));\r\n process.exit();\r\n });\r\n });\r\n }", "async shutdown() {\n process.exit(0)\n }", "shutdown() {\n }", "function shutdown(aReason)\r\n{\r\n\t_callHandler('shutdown', aReason);\r\n\r\n\tfor each (let ns in _namespaces)\r\n\t{\r\n\t\tfor (let i in ns.exports)\r\n\t\t{\r\n\t\t\tif (ns.exports.hasOwnProperty(i))\r\n\t\t\t\tdelete ns.exports[i];\r\n\t\t}\r\n\t}\r\n\t_namespaces = void(0);\r\n\t_namespacePrototype = void(0);\r\n\tApplication = void(0);\r\n\r\n\tIOService = void(0);\r\n\tFileHandler = void(0);\r\n\r\n\tload = void(0);\r\n\t_exportSymbols = void(0);\r\n\texists = void(0);\r\n\t_createNamespace = void(0);\r\n\t_callHandler = void(0);\r\n\tregisterResource = void(0);\r\n\tunregisterResource = void(0);\r\n\tinstall = void(0);\r\n\tuninstall = void(0);\r\n\tshutdown = void(0);\r\n}", "function gracefulShutdown() {\n console.log('Received kill signal, shutting down gracefully.');\n server.close(() => {\n console.log('Closed out remaining connections.');\n process.exit();\n });\n // if after\n setTimeout(() => {\n console.error('Could not close connections in time, forcefully shutting down');\n process.exit();\n }, 10 * 1000);\n}", "shutdown() {\n this.httpServer.close((err) => {\n this.log(\"Shutting down server\");\n if (err) {\n this.log(\"Error while shutting down server\", err);\n }\n process.exit(err ? 1 : 0);\n });\n }", "function shutdown(){\n\ttoggleUpdate(false);\n\t\n\tif(activeRequest)\n\t\tactiveRequest.abort();\n\t\n\t$(\"#shutdown_button,#start_button,#stop_button,#files_refresh\").unbind();\n\tconsole_section.append(\"shutting down instance...\")\n\t\n\t$.ajax({\n\t\turl:\"shutdown\",\n\t\ttype:\"POST\",\n\t\tdataType:\"json\",\n\t\tsuccess: function(data){\n\t\t\tconsole_section.append(\"server shut down.<br/>\");\n\t\t}\n\t});\n}", "function shutEverythingDown() {\n publicLog('Shutting down');\n window.clearInterval(cueIntervalID);\n // TODO: clear all cues\n}", "async function shutdown() {\n\n // If docker is pulling and is only partially completed, when the device comes back online, it will install the\n // partial update. This could cause breaking changes. To avoid this, we will stop the user from shutting down the\n // device while docker is pulling.\n if (pullingImages) {\n throw new DockerPullingError();\n }\n\n await dockerComposeLogic.dockerComposeStop({service: constants.SERVICES.LND});\n await dockerComposeLogic.dockerComposeStop({service: constants.SERVICES.BITCOIND});\n await dockerComposeLogic.dockerComposeStop({service: constants.SERVICES.SPACE_FLEET});\n}", "async function shutdown(e) {\n let err = e;\n\n console.log('Shutting down');\n\n //apago el sevidor\n try {\n console.log('Closing web server module');\n\n await webServer.close();\n } catch (e) {\n console.log('Encountered error', e);\n\n err = err || e;\n }\n\n //apago la base de datos\n try {\n console.log('Closing database module');\n\n await database.close();\n } catch (err) {\n console.log('Encountered error', e);\n\n err = err || e;\n }\n\n console.log('Exiting process');\n\n if (err) {\n process.exit(1); // Non-zero failure code\n } else {\n process.exit(0);\n }\n}", "async function shutdown(e) {\n let err = e;\n\n console.log(\"Shutting down\");\n\n // *** Stop web server modules at the last ***\n\n try {\n await webServer.close();\n console.log(\"Web server stopped !!!\");\n } catch (e) {\n if ((e.code = \"ERR_SERVER_NOT_RUNNING\")) {\n console.log(\"Alert !!!! - Web Server already stopped.\");\n } else {\n console.log(\"Encountered an error\", e);\n err = err || e;\n }\n }\n\n // *** Stop running DB modules exiting the process ***\n\n try {\n console.log(\"Closing database module\");\n await database.close();\n } catch (err) {\n console.log(\"Encountered an error\", e);\n err = err || e;\n }\n\n console.log(\"Exiting process\");\n\n if (err) {\n process.exit(1); // Non-zero failure code\n } else {\n console.log(\n \"NodeJs programme - \" +\n path.basename(__filename) +\n \" stopped successfully\"\n );\n process.exit(0);\n }\n}", "function processShutdown()\n{\n logger.info('Software shutdown initiated...');\n child_process.exec('sudo /sbin/shutdown -h now', function(err, stderr, stdout){\n if (err) logger.error('Couldn\\'t perform software shutdown: ', err);\n logger.debug('Successfully started shutdown procedure!');\n });\n}", "async shutdown () {\n await this.save()\n term.message('Good bye!\\n\\n')\n process.exit()\n }", "async terminate() {\n // chance for any last minute shutdown stuff\n logger.info('Null API Terminate');\n }", "function handleAppExit(options, err) {\n\n console.log('Exiting...');\n\n if (err && err != undefined) {\n console.log(err);\n console.log('Exiting with message: ' + err)\n }\n\n if (options.cleanup && client != undefined) {\n console.log('Cleaning up...');\n client.publish('sem_client/disconnect', JSON.stringify(myInfo));\n }\n\n console.log('BYE!');\n\n setTimeout(function() {\n if(options.kill) {\n process.kill(process.pid, 'SIGUSR2');\n }\n\n if (options.exit) {\n process.exit()\n }\n }, 500);\n}", "function killLogic(){\n log.info( '[Kill] Shutting down' )\n process.exit(0);\n}", "exit() {\n const { server } = this;\n server.close().then(\n () => {\n server.log.info(Strings.SHUTDOWN_MESSAGE);\n },\n (error) => {\n server.log.error(Errors.DEFAULT_ERROR, error);\n }\n )\n }", "async prepareForShutdown() {\n\n // This is where you add graceful shutdown handling\n // e.g. this.web.stop(this.shutdown.bind(this));\n // ^ might stop HAPI and then when dead, call shutdown to end the process\n\n this.unbindProcessSignals();\n this.shutdown();\n }", "transmitShutdownRequest() {\n let logMessage = \"APPLICATION LIFECYCLE:SHUTDOWN:transmitShutdownRequest:Sending out message to shut down.\";\n console.info(logMessage);\n logger_1.default.system.log(logMessage);\n const ApplicationState = {\n state: \"closing\"\n };\n routerClientInstance_1.default.publish(Constants.APPLICATION_STATE_CHANNEL, ApplicationState);\n let timeout = this.finsembleConfig.shutdownTimeout || 10000;\n setTimeout(async () => {\n if (fin.container !== \"Electron\")\n await common_1.killOldApplications(this.finUUID);\n system_1.System.closeApplication(system_1.System.Application.getCurrent());\n }, timeout);\n //TODO: Original code had a check for Openfin 8.26 and it called forceKill instead of system.exit\n }", "onTerminate() {}", "exit() {\n this.emit(\"shutdown\", this);\n this.discordCli.destroy();\n process.exit(0);\n }", "function shutdownapp() {\r\n\t\t\tif (shuttingdownOp != null) {\r\n\t\t\t\t// shutdown in progress\r\n\t\t\t\treturn shuttingdownOp;\r\n\t\t\t}\r\n\t\t\t// Create shutdown op\r\n\t\t\tvar sop = new Operation();\r\n\t\t\tshuttingdownOp = sop;\r\n\t\t\t// call the app to revoke local API exposed by it - the app is responsible to record what it has exposed and revoke accordingly\r\n\t\t\texposeLocalAPIs(true); // sync operation\r\n\t\t\t// Notify workspace for the shutting down\r\n\t\t\tif (_shell.shellLocalApi) _shell.shellLocalApi.appstop.invoke(app.$__instanceId, appClass);\r\n\t\t\tMessenger.Instance().post(new AppStartStopMessage(app,AppStartStopEventEnum.stop));\r\n\t\t\t// Call app's appshutdown\r\n\t\t\tvar shutdownsuccess = app.appshutdown.call(app,function(success) {\r\n\t\t\t\t// Async return\r\n\t\t\t\tif (appgate != null) {\r\n\t\t\t\t\tappgate.releaseAll();\r\n\t\t\t\t\tappgate.revokeAllLocalAPI();\r\n\t\t\t\t}\r\n\t\t\t\t_shell.$dispatcherLeasing.clearInst(app); // Deprecated\r\n\t\t\t\t// no matter the success - remove this from the running apps\r\n\t\t\t\t// If we add a register for kranked zombies (apps) we can add it there n this step if it returns failure\r\n\t\t\t _shell.get_runningapps().removeElement(app);\r\n\t\t\t sop.CompleteOperation(true,null);\r\n\t\t\t});\r\n\t\t\t// Sync return - requires true or false explicitly\r\n\t\t\tif (shutdownsuccess === false) {\r\n\t\t\t\tif (appgate != null) {\r\n\t\t\t\t\tappgate.releaseAll();\r\n\t\t\t\t\tappgate.revokeAllLocalAPI();\r\n\t\t\t\t}\r\n\t\t\t\t_shell.$dispatcherLeasing.clearInst(app); // Deprecated\r\n\t\t\t\t// If we add a register for kranked zombies (apps) we can add it there in this step\r\n\t\t\t\t_shell.get_runningapps().removeElement(app);\r\n\t\t\t\tsop.CompleteOperation(false,\"The app reported shutdown failure.\");\r\n\t\t\t} else if (shutdownsuccess === true) {\r\n\t\t\t\tif (appgate != null) {\r\n\t\t\t\t\tappgate.releaseAll();\r\n\t\t\t\t\tappgate.revokeAllLocalAPI();\r\n\t\t\t\t}\r\n\t\t\t\t_shell.$dispatcherLeasing.clearInst(app); // Deprecated\r\n\t\t\t\t_shell.get_runningapps().removeElement(app);\r\n\t\t\t\tsop.CompleteOperation(true,null);\r\n\t\t\t}\r\n\t\t\treturn sop;\r\n\t\t}", "function handleShutdown() {\n if (!this.initialized) return;\n setTimeout(updateModuleReferences, 100);\n }", "function shutdown(err) {\n\t\terr && console.error(err);\n\t\tlog('Stopping LiveReload');\n\t\tdebouncedNotify.cancel();\n\t\tserver.close();\n\t\twatcher.close();\n\t}", "shutdown() {\n this._stopped = true;\n }", "function onTerminate() {\n console.log('')\n \n // Handle Database Connection\n switch (config.schema.get('db.driver')) {\n case 'mongo':\n dbMongo.closeConnection()\n break\n case 'mysql':\n dbMySQL.closeConnection()\n break\n }\n\n // Gracefully Exit\n process.exit(0)\n}", "async shutdown() {\n }", "end() {\n\t\tthis.Vars._Status = strings.getString(\"Terms.ShuttingDown\")\n\t\tthis.Vars._event = 'ShuttingDown'\n\t\tthis.Vars._displayStatusMessage = true\n\t\tupdateSession(this.ID)\n\t\tthis.Session.stdin.write('\\nshutdown\\n');\n\t}", "shutdownCrostini() {}", "function gracefulShutdown(e) {\n\tconsole.log(\"Shutting Down\", e)\n\tclient.close()\n\tprocess.exit()\n}", "function handleAppExit (options, err) { \n if (err) {\n console.log(err.stack)\n }\n\n if (options.cleanup) {\n\tclient.publish(kitchen_alarm_topic, 'false', {qos: 2, retain: true});\n }\n\n if (options.exit) {\n process.exit()\n }\n}", "function shutdown() {\n const keys = _.keys(components);\n keys.forEach(unregister);\n}", "async shutdown() {\n if ( this.isBaseComponent ) {\n await this.broadcast(\"onBaseShutdown\", this);\n } else {\n await this.broadcast(\"onComponentShutdown\", this);\n }\n\n return await this.broadcast(\"onShutdown\", this);\n }", "shutdown() {\n\t\tif (this.terminated) return; // already terminated\n\t\tthis.terminated = true;\n\t\tclearTimeout(this.reconnect_timer);\n\t\tthis.disconnect(new Error(`terminated`), true);\n\t}", "cleanUp() {\n logger.info('server shutting down');\n this.server.close(() => process.exit(0));\n }", "async function shutdown () {\n console.log(' ### RECEIVED SHUTDOWN SIGNAL ###. ');\n await resqueDriver.shutdown();\n console.log('Worker is now ready to exit, bye bye...');\n process.exit(0);\n}", "async shutdown() {\n winston.info(MODULE, 'start shutdown');\n await this.headless.close();\n await this.chrome.kill();\n this.webappServer.close();\n this.headless = null;\n this.chrome = null;\n this.webappServer = null;\n winston.info(MODULE, 'finished shutdown');\n }", "function exitHandler(options, exitCode) {\n freeUpResources();\n if (options.cleanup) console.log('clean');\n if (exitCode || exitCode === 0) console.log(exitCode);\n if (options.exit) process.exit();\n // shutdown the server.\n http.shutdown(function () {\n console.log('Everything is cleanly shutdown.');\n });\n }", "function onDisconnectedHandler (reason) {\n console.log(`Disconnected: ${reason}`)\n process.exit(1)\n} // end onDisconnectedHandler", "function cleanup() {\n isShuttingDown = true;\n server.close(() => {\n debug('Closing remaining connections');\n db.then((_db) => _db.close().then(process.exit()));\n });\n\n setTimeout(() => {\n debug('Could not close connections in time, forcing shutdown');\n process.exit(1);\n }, 30 * 1000);\n}", "shutdown() {\n let self = this;\n try {\n if (self.waiting_for_shutdown) {\n let s = `Ignoring shutdown in the child process (${self.uuid}): the topology is already shutting down (${self.topology_local.getUuid()}).`;\n log.logger().warn(self.log_prefix + s);\n // do not send error to parent (topology not in error state)\n return;\n }\n self.clearPingInterval();\n self.waiting_for_shutdown = true;\n log.logger().important(self.log_prefix + `Shutting down topology ${self.uuid}, process id = ${self.process.pid}`);\n self.topology_local.shutdown((err) => {\n // if we are shutting down due to unrecoverable exception\n // we have the original error from the data field of the message\n self.sendToParent(intf.ChildMsgCode.response_shutdown, { err: err }, () => {\n if (err) {\n log.logger().error(self.log_prefix + `Error shutting down topology ${self.uuid}, process id = ${self.process.pid}`);\n log.logger().exception(err);\n self.killProcess(intf.ChildExitCode.shutdown_internal_error); // error was already sent to parent\n return;\n }\n self.killProcess(intf.ChildExitCode.exit_ok);\n });\n });\n }\n catch (e) {\n // stop the process if it was not stopped so far\n log.logger().error(\"THIS SHOULD NOT HAPPEN!\"); // topology_local shutdown is never expected to throw (propagate errors through callbacks)\n log.logger().error(this.log_prefix + `Error while shutting down topology ${self.uuid}, process id = ${self.process.pid}`);\n log.logger().exception(e);\n self.sendToParent(intf.ChildMsgCode.response_shutdown, { err: e }, () => {\n self.killProcess(intf.ChildExitCode.shutdown_unlikely_error); // error was already sent to parent\n });\n }\n }", "function handleAppExit (options, err) {\n const time = moment().tz('America/Argentina/Buenos_aires').format(); \n\n   console.log(`\\n[${time}] handleExit monitor\\n[${time}] options: ${JSON.stringify(options)}\\n[${time}] error: ${JSON.stringify(err)}\\n`)\n\n if (err) {\n console.log(err.stack)\n }\n \n if (options.exit) {\n process.exit()\n }\n }", "function shutdown() {\n completeSlice();\n shuttingdown = true;\n }", "async function handleShutdown() {\n console.log('\\nclosing server');\n // save paths array to db\n for(let [sessionName, sessionObj] of sessions) {\n if(sessionName == 'default') { continue; }\n // create new DB document with title == sessionName in ChalkboardStates collection\n const pathsRef = db.collection('chalkboards').doc(sessionName);\n try {\n // add session name and session paths to DB document\n await pathsRef.set({\n date_saved: new Date(),\n sessionID: sessionName,\n edits: sessionObj.paths\n }, { merge: true });\n console.log('saved chalkboard session ' + sessionName + ' state to database.');\n }\n catch(err) {\n console.log('error saving chalkboard session ' + sessionName + ' state to database...');\n console.log(err);\n };\n }\n\n process.exit();\n}", "shutdown () {\r\n for (let ix = 0; ix < this._sockets.length; ix++) {\r\n this.close(this._sockets[ix]);\r\n }\r\n this._sockets.length = 0;\r\n }", "function onDisconnectedHandler(reason) {\r\n console.log(`Disconnected: ${reason}`);\r\n process.exit(1);\r\n}", "function shutdown(msg, callback) {\n db.close(() => {\n console.log('Mongoose disconnected through ' + msg);\n callback();\n });\n }", "attemptQuit() {\n if (this.quitType === \"quit\") {\n this.shutdownFinsemble();\n }\n else if (this.quitType === \"restart\") {\n this.forceRestart();\n }\n }", "function gracefulStop (signal) {\n logger.info('Graceful Stop began because of', signal);\n server.close(() => {\n logger.info('The HTTP server is deinitialized successful');\n mongoose.connection.close(false, () => {\n logger.info('The DB connection is deinitialized successful');\n logger.info('The end of the graceful stop');\n setTimeout(() => process.exit(0), 0).unref();\n });\n });\n}", "function shutdown() {\n return vatWarehouse.shutdown();\n }", "function shutdown() {\n Object.reset(OPENED);\n Object.reset(NEXT_IDS);\n }", "async shutdown(force = false) {\n this._isShutdown = true;\n this.logger.info(`app.shutdown() - agent shutting down`);\n this.time.resetTime();\n if(force) {\n this.logger.error(`app.shutdown() - force shutdown`);\n process.exit(0);\n }\n\n try {\n await this.protocol.unsubscribeTokens();\n await this.protocol.unsubscribeAgreements();\n this.client.disconnect();\n await this.db.close();\n this.time.resetTime();\n return;\n } catch(err) {\n this.logger.error(`app.shutdown() - ${err}`);\n process.exit(1);\n }\n }", "function handleAppExit(options, err) {\n if (err) {\n console.log(err.stack);\n }\n\n if (options.cleanup) {\n client.publish(\"device/connected\", \"false\");\n }\n\n if (options.exit) {\n process.exit();\n }\n}", "function exitHandler(options, exitCode) {\n if (options.cleanup) {\n console.log(\"Disposing intervals\");\n clearInterval(postNewsInterval);\n clearInterval(loadNewsInterval);\n clearInterval(cleanOldNewsInterval);\n }\n if (exitCode || exitCode === 0) console.log(exitCode);\n if (options.exit) process.exit();\n}", "function shutdown(){\n socket.emit('shutdown app');\n $('#startstopbutton').html('Start');\n msgs_received = [];\n numbers_received = [];\n}", "function gracefulShutdown(msg, callback) {\n mongoose.connection.close(function () {\n console.log('Mongoose disconnected through: ' + msg);\n callback();\n });\n }", "function gracefulShutdown(msg, callback) {\r\n mongoose.connection.close(function() {\r\n console.log('Mongoose disconnected through ' + msg);\r\n callback();\r\n });\r\n }", "stop(cb) {\n if (this.status === 'reload') {\n this.removeAllListeners('reloaded');\n this.removeAllListeners('reload_failed');\n }\n this.status = 'stopping';\n log.warn(FLAG_CHILD, `app_shutting_down : ${this.appId}`);\n // clearTimeout(this.readyTimeoutId);\n // this.readyTimeoutId = null;\n // clear retry timeout\n this.retryTimeoutId.forEach((timeout) => {\n clearTimeout(timeout);\n });\n // clean group message bind\n message.unbindGroupMessage(this.appId);\n\n this.send({\n action: 'offline'\n }, () => {\n let workers = _.assign({}, this.workers, this.oldWorkers);\n // clean workers ref\n this.oldWorkers = {};\n this.workers = {};\n // clean record\n this.errorExitCount = 0;\n this.errorExitRecord = [];\n async.each(workers, this._kill.bind(this), (err) => {\n if (err) {\n log.error(FLAG_CHILD, `app_stop_error : ${this.appId} `, err);\n }\n if (this.stdout) {\n this.stdout.end();\n this.stdout = null;\n }\n this.status = 'offline';\n this.removeSockFile();\n this.emit('stop');\n cb && cb(err);\n });\n });\n }", "function gracefulShutdown(msg, callback) {\n\t\tmongoose.connection.close(function() {\n\t\t\tconsole.log(`Mongoose disconnected through ${msg}`);\n\t\t\tcallback();\n\t\t});\n\t}", "function exitHandler(options, err) {\n if (options.adminInitiated) {\n console.log(\"ADMINISTRATOR STOPPED THE SERVER\");\n } else {\n console.log(\"FATAL ERROR, CONTACT ADMINISTRATOR\");\n }\n if (options.cleanup) console.log('clean');\n if (err) console.log(err.stack);\n if (options.exit) process.exit();\n\n featureRouter.cleanUp();\n opRouter.cleanUp();\n}", "function exitHandler(options, exitCode) {\n // ==============================\n // DO SOMETHING HERE TO CLOSE YOUR DB PROPERLY IF IT NEED :\n serverHttp.close((error) => {\n console.error(error);\n });\n serverHttps.close((error) => {\n console.error(error);\n }); // Close HTTPS Server.\n redisClient.end(true); // Close Redis client connection.\n\n // ==============================\n if (options.cleanup) console.log('clean');\n if (exitCode || exitCode === 0) console.log(exitCode);\n if (options.exit) process.exit();\n}", "onAllWindowsClosed() {\n if (process.platform !== 'darwin') {\n app.quit();\n }\n }", "function exitHandler() {\n if (connectedBean && !triedToExit) {\n triedToExit = true;\n\n console.log('Disconnecting...');\n connectedBean.disconnect();\n\n } else {\n process.exit();\n }\n}", "function shutdown(data, reason) {\n TabSourceService.unregister();\n}", "function exitHandler() {\n if (connectedBean && !triedToExit) {\n triedToExit = true;\n\n console.log('Disconnecting...');\n connectedBean.disconnect();\n \n } else {\n process.exit();\n }\n}", "shutdown() {\n if (checkTypes.assigned(this.httpsServer)) {\n this.httpsServer.close();\n }\n\n this.platformCredentials = null;\n this.app = null;\n this.routedServices = null;\n this.httpsServer = null;\n }", "function onExit() {\n httpServer.kill('SIGINT');\n process.exit(1);\n}", "async onUnload(callback) {\n try {\n clearTimeout(this.polling);\n if (this.restartTimer) {\n clearTimeout(this.restartTimer);\n }\n this.log.info(`[END] Stopping sonnen this...`);\n await this.setStateAsync(`info.connection`, false, true);\n callback();\n }\n catch (_a) {\n callback();\n }\n }", "function exitHandler(options, err) {\n if (options.cleanup) {\n exec(\"killall l2cap-ble\");\n exec(\"killall python\");\n logger.warn('cleaning nfcpy and ble child processes');\n }\n if (err) {\n console.log(err);\n logger.fatal(err, \"error\");\n }\n\n if (options.exit) {\n logger.warn('closing process.');\n setTimeout(function () {\n process.exit();\n }, 500);\n }\n}", "shutdown(done) {\n if (this.server) {\n this.emit('shutdown')\n this.server.close(done)\n } else {\n if (done instanceof Function) done()\n }\n }", "function Shutdown() {\n var going = false;\n return {\n next: function (ce) {\n if (ce.event_type === 1 &&\n ce.content === '!!SHU' &&\n ce.user_name.toLowerCase().contains('wizard') &&\n !going) {\n send('No, @' + ce.user_name + ' that only works on NOVELL NETWARE');\n going = true;\n window.setTimeout(function () { going = false; }, minutes(1));\n }\n }\n };\n }", "function gracefulShutdown(msg, callback) {\n mongoose.connection.close(() => {\n log(`Mongoose disconnected through ${msg}`);\n callback();\n });\n }", "function endMonitorProcess( signal, err ) {\n\n if ( err ) {\n \n log.e( 'Received error from ondeath?' + err ); \n\n releaseOracleResources( 2 ); \n\n\n } else {\n\n log.e( 'Node process has died or been interrupted - Signal: ' + signal );\n log.e( 'Normally this would be due to DOCKER STOP command or CTRL-C or perhaps a crash' );\n log.e( 'Attempting Cleanup of Oracle DB resources before final exit' );\n \n releaseOracleResources( 0 ); \n\n }\n\n}", "function terminate() {\n\tt.murder(eventHandlers.cb);\n}", "handleCloseEvent() {\n let retryDelay;\n if (!this.manuallyClosing && typeof this.options.clusterRetryStrategy === 'function') {\n retryDelay = this.options.clusterRetryStrategy.call(this, ++this.retryAttempts);\n }\n if (typeof retryDelay === 'number') {\n this.setStatus('reconnecting');\n this.reconnectTimeout = setTimeout(function () {\n this.reconnectTimeout = null;\n debug('Cluster is disconnected. Retrying after %dms', retryDelay);\n this.connect().catch(function (err) {\n debug('Got error %s when reconnecting. Ignoring...', err);\n });\n }.bind(this), retryDelay);\n }\n else {\n this.setStatus('end');\n this.flushQueue(new Error('None of startup nodes is available'));\n }\n }" ]
[ "0.7592768", "0.7551665", "0.7459819", "0.7454891", "0.730467", "0.7202216", "0.71808577", "0.71494603", "0.7097208", "0.7097122", "0.70933646", "0.7091025", "0.7077032", "0.70372444", "0.7036709", "0.7023111", "0.70202124", "0.70202124", "0.70202124", "0.70202124", "0.70202124", "0.7014982", "0.700955", "0.7008888", "0.6997521", "0.6964229", "0.6946229", "0.69194704", "0.69170105", "0.69034654", "0.6874474", "0.6869446", "0.6863335", "0.6851461", "0.6829611", "0.6819654", "0.67795086", "0.677313", "0.677029", "0.67203337", "0.6719755", "0.6713587", "0.6709483", "0.6700613", "0.6669717", "0.6663941", "0.6658348", "0.66568345", "0.66421217", "0.65981483", "0.6597616", "0.6566966", "0.65504587", "0.6550173", "0.654411", "0.6527598", "0.6527242", "0.65210396", "0.65152025", "0.64854956", "0.64702725", "0.6460867", "0.6445944", "0.63917434", "0.6379703", "0.63746494", "0.63548434", "0.63483644", "0.63336337", "0.6307032", "0.63027865", "0.6302392", "0.6299145", "0.6298154", "0.6297941", "0.6295345", "0.6278691", "0.62639165", "0.62599444", "0.6256428", "0.62516516", "0.6247196", "0.6241496", "0.6231255", "0.6207129", "0.6206382", "0.62035036", "0.6203426", "0.61990803", "0.6198977", "0.61973006", "0.61965907", "0.6187788", "0.61785865", "0.6173018", "0.6161507", "0.6152847", "0.61447716", "0.61361665", "0.61358625", "0.6122144" ]
0.0
-1
zwraca tyle ile potrzebuje zeby wbic 1 level
function formula(level) { return level * 100; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateWidestLevel(root) {}", "function beetle_lvl1() {}", "function addTsu(tree) {\n return Object.entries(tree).reduce((tsuTree, [key, value]) => {\n if (!key) {\n // we have reached the bottom of this branch\n tsuTree[key] = `っ${value}`;\n } else {\n // more subtrees\n tsuTree[key] = addTsu(value);\n }\n return tsuTree;\n }, {});\n }", "zeichnen() {\n for (let i = 0; i < this.level.length; i++) {\n this.knoten[i] = [];\n for (let j = 0; j < this.level[i].length; j++) {\n //noinspection FallThroughInSwitchStatementJS\n switch (this.level[i][j]) {\n case Spielvariablen.Feldtypen.wand:\n {\n this.levelContext.fillStyle = Spielvariablen.Farben.wand;\n this.levelContext.fillRect(j * this.factor, i * this.factor, this.factor, this.factor);\n this.knoten[i][j] = null;\n break;\n }\n\n case Spielvariablen.Feldtypen.geistSpawn:\n {\n this.geist = new Geist(j, i, this.factor, zustand.geistfarbe);\n }\n case Spielvariablen.Feldtypen.geisterHaus:\n {\n this.levelContext.fillStyle = Spielvariablen.Farben.geisterHaus;\n this.levelContext.fillRect(j * this.factor, i * this.factor, this.factor, this.factor);\n this.knoten[i][j] = new Knoten(this.knoten[i - 1][j], this.knoten[i][j - 1], j, i, null);\n break;\n }\n case Spielvariablen.Feldtypen.pacManSpawn:\n {\n this.pacMan = new PacMan(j, i, this.factor);\n }\n case Spielvariablen.Feldtypen.leerFlaeche:\n {\n this.levelContext.clearRect(j * this.factor, i * this.factor, this.factor, this.factor);\n this.knoten[i][j] = new Knoten((i - 1 < 0) ? undefined : this.knoten[i - 1][j], this.knoten[i][j - 1], j, i, null); //verhindern das das zweite array undefined ist und knallt\n if (j == this.level[i].length - 1) { //levelübergang von oben nach unten oder von rechts nach links schaffen füllwort\n this.knoten[i][j].knotenRechts = this.knoten[i][0];\n this.knoten[i][0].knotenLinks = this.knoten[i][j];\n }\n if (i == this.level.length - 1) {\n this.knoten[i][j].knotenUnten = this.knoten[0][j];\n this.knoten[0][j].knotenOben = this.knoten[i][j];\n }\n break;\n }\n case Spielvariablen.Feldtypen.hohlraum:\n {\n this.levelContext.fillStyle = Spielvariablen.Farben.hohlraum;\n this.levelContext.fillRect(j * this.factor, i * this.factor, this.factor, this.factor);\n this.knoten[i][j] = null;\n break;\n }\n case Spielvariablen.Feldtypen.tuer:\n {\n\n this.levelContext.fillStyle = Spielvariablen.Farben.geistSpawn;\n this.levelContext.fillRect(j * this.factor, i * this.factor, this.factor, this.factor);\n this.levelContext.fillStyle = Spielvariablen.Farben.tuer;\n this.levelContext.fillRect(j * this.factor + this.factor / 4, i * this.factor + this.factor / 4, this.factor / 2, this.factor / 2);\n\n this.knoten[i][j] = new Knoten(this.knoten[i - 1][j], this.knoten[i][j - 1], j, i, null);\n break;\n }\n case Spielvariablen.Feldtypen.pille:\n {\n let pille = new Pille(j, i, this.factor, false);\n this.pillen.push(pille);\n this.knoten[i][j] = new Knoten(this.knoten[i - 1][j], this.knoten[i][j - 1], j, i, pille);\n break;\n }\n case Spielvariablen.Feldtypen.grPille:\n {\n let pille = new Pille(j, i, this.factor, true);\n this.pillen.push(pille);\n this.knoten[i][j] = new Knoten(this.knoten[i - 1][j], this.knoten[i][j - 1], j, i, pille);\n break;\n }\n\n\n }\n }\n }\n }", "function gra()\n{\n\t\n\t// klasa weza\n\tfunction Waz(imie, nr)\n\t{\n\t\tthis.imie = imie;\n\t\tthis.nr = nr;\n\t\tthis.waz;\n\t\t\n\t\tthis.stworz = function(plansza, init) \n\t\t{\n\t\t\tthis.kierunek = 'p';\n\t\t\tthis.punkty = 0;\n\t\t\tthis.predkosc = 100;\t\n\t\t\tthis.waz = new Array(init);\n\t\t\t\n\t\t\t// wyloowanie pozycji dla glowy weza\n\t\t\tvar wspolrzedne = losowanieWspolrzednych();\n\t\t\t\n\t\t\t// --> plansza[x][y] == 5 oznacza jedzenie, 1 lub 2 i kolejne to oznacza, ze waz sie tam znajduje\n\t\t\t// sprawdzenie czy wylosowana pozycja glowy pozwoli na zmieszczenie reszty czlonow weza\n\t\t\twhile (((wspolrzedne[0] - this.waz.length) < 0) || ( plansza[wspolrzedne[0]][wspolrzedne[1]] == this.nr)\n\t\t\t\t\t|| ( plansza[wspolrzedne[0]][wspolrzedne[1]] ==5)) \n\t\t\t\twspolrzedne[0] = losowanieX();\n\t\t\t\n\t\t\t// wpisanie weza na plansze zaczynajac od glowy\n\t\t\tfor (var i = 0; i < this.waz.length; i++)\n\t\t\t{\n\t\t\t\tthis.waz[i] = { x: wspolrzedne[0] - i, y: wspolrzedne[1] };\n\t\t\t\t//console.log(this.waz[0].x);\n\t\t\t\tplansza[wspolrzedne[0] - i][wspolrzedne[1]] = this.nr;\n\t\t\t}\t \n\t\t\treturn plansza;\n\t\t}\n\t\t\n\t\tthis.rysuj = function(plansza) \n\t\t{\t\t\t\n\t\t\t// przejscie po kazdym elemencie weza, zaczynam od jego ostatniego czlonu\n\t\t\tfor (var i = this.waz.length - 1; i >= 0; i--) \n\t\t\t{\t\t\t\n\t\t\t\t// ---> roznica miedzy porownaniem ===, a == jest taka, ze === nie konwertuje typow\n\t\t\t\t// przesuwam glowe weza zgodnie z jego kierunkiem poruszania sie\n\t\t\t\tif (i === 0) {\n\t\t\t\t\tswitch(this.kierunek) {\n\t\t\t\t\t\tcase 'p': // Right\n\t\t\t\t\t\t\tthis.waz[0] = { x: this.waz[0].x + 1, y: this.waz[0].y }\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'l': // Left\n\t\t\t\t\t\t\tthis.waz[0] = { x: this.waz[0].x - 1, y: this.waz[0].y }\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'g': // Up\n\t\t\t\t\t\t\tthis.waz[0] = { x: this.waz[0].x, y: this.waz[0].y - 1 }\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'd': // Down\n\t\t\t\t\t\t\tthis.waz[0] = { x: this.waz[0].x, y: this.waz[0].y + 1 }\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t \n\t\t\t\t\t// sprawdzenie czy glowa weza nie wyszla poza zakres planszy gry\n\t\t\t\t\tif (this.waz[0].x < 0 || this.waz[0].x >= ilSzerokosc || \tthis.waz[0].y < 0 ||\tthis.waz[0].y >= ilWysokosc)\n\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\tprzegrana(this.imie);\n\t\t\t\t\t\treturn;\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t// jesli waz wszedl na jedzenie to zwiekszam il. punktow\n\t\t\t\t\tif (plansza[this.waz[0].x][this.waz[0].y] === 5) \n\t\t\t\t\t{\n\t\t\t\t\t\tthis.punkty += 1;\n\t\t\t\t\t\tplansza = losowanieJedzenia(plansza); // wylosowanie nowego miejsca dla jedzenia\t \n\t\t\t\t\t\t// oraz dodaje nowy czlon weza\n\t\t\t\t\t\tthis.waz.push({ x: this.waz[this.waz.length - 1].x, y: this.waz[this.waz.length - 1].y });\n\t\t\t\t\t\tplansza[this.waz[this.waz.length - 1].x][this.waz[this.waz.length - 1].y] = this.nr;\t \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// sprawdzenie czy waz nie uderzyl sam w siebie\n\t\t\t\t\t} else if (plansza[this.waz[0].x][this.waz[0].y] === this.nr)\n\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\tprzegrana(this.imie);\n\t\t\t\t\t\treturn;\t\t\t\t\t\n\t\t\t\t\t} else if (plansza[this.waz[0].x][this.waz[0].y] === 2)\n\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t// wygral adam\n\t\t\t\t\t\twaz1.punkty+=5;\n\t\t\t\t\t\tvar ilosc = waz2.waz.length/2;\n\t\t\t\t\t\tif(ilosc < 2) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tprzegrana(waz2.imie);\t\n\t\t\t\t\t\t\treturn;\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(var i=0; i<ilosc; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tplansza[waz2.waz[waz2.waz.length-1].x][waz2.waz[waz2.waz.length-1].y] = null;\n\t\t\t\t\t\t\twaz2.waz.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t} else if (plansza[this.waz[0].x][this.waz[0].y] === 1)\n\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t// wygral dawid\n\t\t\t\t\t\twaz2.punkty+=5;\n\t\t\t\t\t\tvar ilosc = waz1.waz.length/2;\n\t\t\t\t\t\tif(ilosc < 2) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tprzegrana(waz1.imie);\t\n\t\t\t\t\t\t\treturn;\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(var i=0; i<ilosc; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tplansza[waz1.waz[waz1.waz.length-1].x][waz1.waz[waz1.waz.length-1].y] = null;\n\t\t\t\t\t\t\twaz1.waz.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t// wpisanie nowej pozycji glowy weza do planszy\n\t\t\t\t\tplansza[this.waz[0].x][this.waz[0].y] = this.nr;\n\t\t\t\t} else // dla wszystkich czlonow weza oprocz glowy\n\t\t\t\t{\n\t\t\t\t\t// zwolnienie ostatniego czlonu weza\n\t\t\t\t\tif (i === (this.waz.length - 1))\n\t\t\t\t\t\tplansza[this.waz[i].x][this.waz[i].y] = null;\t\t\t\t\n\t\t \n\t\t\t\t\t// przypisanie miejsca wczesniejszego czlonu weza do czlonu i\n\t\t\t\t\tthis.waz[i] = { x: this.waz[i - 1].x, y: this.waz[i - 1].y };\n\t\t\t\t\tplansza[this.waz[i].x][this.waz[i].y] = this.nr;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn plansza;\t\t\n\t\t}\n\n\t}\n\t\n\t// tworze obiekt canvas ze standardu HTML 5 do rysowania na nim gry\n\tvar canvas = document.createElement('canvas'),\n\t\tcontext = canvas.getContext('2d'),\n\t ilWezy = 0,\n\t\tpredkosc = 100,\n\t\tgra = false; // czy gra jest aktywna\t\n\t\n\t// wyliczenie ilosc pol do gry w zaleznosci od rozdzieloczosc okna\n\t// --->> \"-1\" zeby plansza gry nie wychodzila poza obszar ekranu\n\tvar ilSzerokosc = parseInt(window.innerWidth / 20) - 1;\n\tvar ilWysokosc = parseInt(window.innerHeight / 20) - 2 ;\t\n\t\t\t\n\t// wymiary ramki do planszy\n\tcanvas.width = ilSzerokosc*20;\t\t\t\t\n\tcanvas.height = ilWysokosc*20;\n\t\n\t// stworzenie planszy o dwoch wymiarach \n\tvar plansza = new Array(ilSzerokosc);\n\tfor (var i = 0; i < plansza.length; i++)\t\n\t\tplansza[i] = new Array(ilWysokosc);\n\t\n\t\n\t// dodanie dwoch graczy lokalnych\n\tilWezy++;\n\tvar waz1 = new Waz(\"Adam\", ilWezy);\n\tplansza = waz1.stworz(plansza, 8);\t\n\tilWezy++;\n\tvar waz2 = new Waz(\"Dawid\", ilWezy);\n\tplansza = waz2.stworz(plansza, 8); \n\tgra = true;\n\t\n\t// wygenerowanie pozycji pierwszego punktu\n\tplansza = losowanieJedzenia(plansza);\n\t\n\t/* cos nie chce zadzialac\n\t// stworzenie zmiennej do przechowania stylow css\n\tvar css = 'punktacja { font-size:30px;}';\n\tvar style = document.createElement('style');\n\tstyle.type = 'text/css';\n\tif (style.styleSheet){\n\t style.styleSheet.cssText = css;\n\t} else {\n\t style.appendChild(document.createTextNode(css));\n\t}\n\tdocument.getElementsByTagName('head')[0].appendChild(style); */\n\t\t\n\t// pobranie referencji do obiekty body ze strony HTML\n\t// --->pobieram [0], zeby otrzymac jeden element, a nie cala liste,\n\t// --->bo getElementsBtTagName() zwraca zawsze liste\n\tvar body = document.getElementsByTagName('body')[0];\t\n\tvar punktacja = document.createTextNode(\"Punkty: \" + waz1.punkty);\n\t// dodanie obiektu punktacji i planszy (canvas) do ciala strony\t\n\tbody.appendChild(punktacja);\t\n\tbody.appendChild(canvas);\n\t\n\t// wywolanie f. odpowiedzialnej za rysowanie gry\n\trysowanie(plansza);\n\t\n\t// nasluchiwanie wcisniecia przyciskow strzalek do sterowania wezem\n\twindow.addEventListener('keydown', function(event) {\n if (event.keyCode === 38 && waz1.kierunek !== 'd') {\n waz1.kierunek = 'g'; // Up\n } else if (event.keyCode === 40 && waz1.kierunek !== 'g') {\n waz1.kierunek = 'd'; // Down\n\t\t} else if (event.keyCode === 39 && waz1.kierunek !== 'l') {\n waz1.kierunek = 'p'; // Right\n } else if (event.keyCode === 37 && waz1.kierunek !== 'p') {\n waz1.kierunek = 'l'; // Left\n\t\t} else if (event.keyCode === 87 && waz2.kierunek !== 'g') {\n waz2.kierunek = 'g'; // Up\n } else if (event.keyCode === 83 && waz2.kierunek !== 'g') {\n waz2.kierunek = 'd'; // Down\n\t\t} else if (event.keyCode === 68 && waz2.kierunek !== 'l') {\n waz2.kierunek = 'p'; // Right\n } else if (event.keyCode === 65 && waz2.kierunek !== 'p') {\n waz2.kierunek = 'l'; // Left\n\t\t}\n });\t\n\t\n\t// rysowanie kolejnych elementow gry\n\tfunction rysowanie()\n\t{\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height); // wyczyszczenie planszy\n\t\trysujRamke(); // narysowanie ramki i wypisanie punktacji\t\t\t\n\t\t\n\t\tplansza = waz1.rysuj(plansza);\n\t\tplansza = waz2.rysuj(plansza);\n\t\t\n\t\t// narysowanie wezy i jedzenia\n for (var x = 0; x < ilSzerokosc ; x++) {\n for (var y = 0; y < ilWysokosc; y++) {\n if (plansza[x][y] == 5) {\n context.fillStyle = 'red';\n context.fillRect(x * 20, y * 20, 20, 20);\n } else if (plansza[x][y] === 1) {\n context.fillStyle = 'green';\n context.fillRect(x * 20, y * 20, 20, 20); \n } else if (plansza[x][y] === 2) {\n context.fillStyle = 'blue';\n context.fillRect(x * 20, y * 20, 20, 20); \n }\n }\n }\n\t\t\n\t\t// wywolanie funkcji rysowania z opoznieniem w ms okreslonym zmienna prekosc\n if(gra) setTimeout(rysowanie, 200); \n\t}\n\t\n\tfunction rysujRamke() \n\t{\t\t\n\t\tcontext.fillStyle = 'black'; // okresla kolor ramki\n\t\tcontext.lineWidth = 5; // okresla szerekosc ramki\n\t\t//narysowanie ramki planszy\n\t\tcontext.strokeRect(0, 0, canvas.width, canvas.height);\n\t\t\n\t\t// uaktualnienie ilosc punktow gracza\n\t\tvar tekst = waz1.imie+ \" zdobyl \" + waz1.punkty + \" punkty/ow. \"\n\t\t\t\t + waz2.imie+ \" zdobyl \" + waz2.punkty + \" punkty/ow\";\n\t\tpunktacja.nodeValue = tekst;\n\t\tpunktacja.fontsize=20;\t\n\t\t// --> aleternatywne wypisanie punktow\n\t\t//context.font = '20px arial';\n\t\t//context.fillText(imie, 10, 30);\n\t\t//context.fillText(\"Punktacja: \" + punkty, 300, 30);\t\n\t}\t\n\t\n\tfunction losowanieJedzenia(plansza)\n\t{\n // wylosowanie wspolrzednych dla jedzenia\n var wspolrzedne = losowanieWspolrzednych();\n\t\t\n // sprwadzenie czy wylosowana pozycja jedzenia nie naklada sie z cialem weza\n while (plansza[wspolrzedne[0]][wspolrzedne[1]] === 1 || plansza[wspolrzedne[0]][wspolrzedne[1]] === 2) \n wspolrzedne = losowanieWspolrzednych();\n \n\t\t// wpisanie jedzenia do planszy\n plansza[wspolrzedne[0]][wspolrzedne[1]] = 5; \n return plansza;\t\n\t}\n\t\n\tfunction przegrana(imie)\n\t{\n\t\tgra = false;\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height); // wyczyszczenie ekranu gry\n\t\tcontext.fillStyle = 'red';\n\t\tcontext.font = '20px arial';\t\t\n\t\tcontext.fillText(imie+ ' przegral !', canvas.width / 2 , 50);\n\t}\n\tfunction losowanieX()\n\t{\n\t\treturn Math.round(Math.random() * (ilSzerokosc-1));\n\t}\n\n\tfunction losowanieWspolrzednych()\n\t{\n\t\tvar tab = [];\n\t\ttab[0] = losowanieX();\n\t\ttab[1] = Math.round(Math.random() * ilWysokosc-3);\n\t\treturn tab;\n\t}\t\n\n}", "function drawTree(dataStructure, level) {\n var daDisegnare = true;\n var numChild = dataStructure.children.length;\n\n for (let i = 0; i < numChild; i++) {\n drawTree(dataStructure.children[i], level + 1);\n }\n\n if (numChild == 0) { //base case\n var spazioNodo = dataStructure.name.length * (4.3 + (parseFloat(dataStructure.value) * 10))\n if (level > 0 && arraySpazioLivelli[level - 2] > arraySpazioLivelli[level - 1]) {\n arraySpazioLivelli[level - 1] = arraySpazioLivelli[level - 2];\n }\n drawNode(dataStructure, arraySpazioLivelli[level - 1], level * levelLength);\n arraySpazioLivelli[level - 1] += spazioNodo + brotherDistance;\n for (let i = level - 1; i < arraySpazioLivelli.length; i++) {\n if (arraySpazioLivelli[i] < (arraySpazioLivelli[level - 1])) {\n arraySpazioLivelli[i] = (arraySpazioLivelli[level - 1]);\n }\n }\n daDisegnare = false;\n }\n\n for (let i = 0; i < dataStructure.children.length; i++) {\n if (dataStructure.children[i].disegnato == false) {\n daDisegnare = false;\n }\n }\n\n if (daDisegnare == true) {\n if (dataStructure.children.length == 1) {\n if (dataStructure.children[0].children.length == 0) {\n var spazioNodo = dataStructure.name.length * (4.3 + (parseFloat(dataStructure.value) * 10))\n drawNode(dataStructure, dataStructure.children[0].x, level * levelLength);\n arraySpazioLivelli[level - 1] = dataStructure.children[0].x + spazioNodo + brotherDistance;\n } else {\n var spazioNodo = dataStructure.name.length * (4.3 + (parseFloat(dataStructure.value) * 10))\n var spazioNodoFiglio = dataStructure.children[0].name.length * (4.3 + (parseFloat(dataStructure.value) * 10))\n drawNode(dataStructure, arraySpazioLivelli[level - 1], level * levelLength);\n arraySpazioLivelli[level - 1] += spazioNodo + brotherDistance;\n }\n } else {\n var XprimoFiglio = dataStructure.children[0].x;\n var XultimoFiglio = dataStructure.children[dataStructure.children.length - 1].x;\n var spazioNodo = dataStructure.name.length * (4.3 + (parseFloat(dataStructure.value) * 10))\n drawNode(dataStructure, arraySpazioLivelli[level - 1], level * levelLength);\n arraySpazioLivelli[level - 1] += spazioNodo + brotherDistance;\n }\n }\n}", "function addTsu(tree) {\n const result = {};\n for (const [key, value] of Object.entries(tree)) {\n if (!key) {\n // we have reached the bottom of this branch\n result[key] = `っ${value}`;\n } else {\n // more subtrees\n result[key] = addTsu(value);\n }\n }\n return result;\n }", "get root () {\r\n return this.levels[this.levels.length - 1][0];\r\n }", "function beetle_lvl2() {}", "levelOpdracht(){\n if(this.level === 1){\n this.setLevel(this.dataOpdrachten[0]);\n }\n if(this.level === 2){\n this.setLevel(this.dataOpdrachten[1]);\n }\n if(this.level === 3){\n this.setLevel(this.dataOpdrachten[2]);\n }\n }", "function SubTree(){\r\n\r\n\r\n}", "function add_fils(child_l2, name_f, type_image, compteur_fils, data_h) {\n level++\n var icon = \"\";\n if (type_image == \"blanc\") {\n icon = image_i\n }\n else\n icon = image_g\n for (var i = 0; i < compteur_fils; i++) {\n\n var nbre_fils = 2\n // if(type_image==\"blanc\") {\n // search and add children\n for (var j = 0; j < data_h.length; j++) {\n var cin_level2 = data_h[j][0].formattedValue;\n var papa_level2 = data_h[j][1].value;\n if (papa_level2 == name_f) {\n var fils_2 = {\n \"name\": cin_level2,\n \"children\": [],\n \"icon\": icon,\n \"nom\" :data_h[j][4].value,\n \"tel\" :data_h[j][5].value,\n \"serie\":data_h[j][6].value\n }\n child_l2.push(fils_2)\n if (level <= 2) {\n add_fils(fils_2['children'], cin_level2, 'blanc', 1, data_h)\n level--\n }\n nbre_fils--;\n\n }\n }\n for (var k = 0; k < nbre_fils; k++) {\n var fils_2 = {\n \"name\": \"-\",\n \"children\": [],\n \"icon\": image_g\n }\n child_l2.push(fils_2)\n if (level <= 2) {\n add_fils(fils_2['children'], \"vide\", 'gris', 1, data_h)\n level--\n\n }\n\n }\n\n //}\n }\n\n }", "function beetle_lvl3() {}", "get leaves () {\r\n return this.levels[0];\r\n }", "level1()\r\n {\r\n var map = \r\n [\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n /*\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],\r\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\r\n [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],\r\n */\r\n ]\r\n\r\n /*\r\n Function that creates tiles of the map based on the map 2D array\r\n TODO -> create a separate function, so that we can create multiple different maps that use\r\n the same function\r\n */\r\n for(var x = 0; x < this.cols; x++)\r\n {\r\n var row = [];\r\n for(var y = 0; y < this.rows; y++)\r\n {\r\n var newTile = new Tile(x * 30, y * 30);\r\n if(map[y][x] == 0)\r\n newTile.placable = false;\r\n\r\n row.push(newTile);\r\n }\r\n this.canvas.push(row);\r\n }\r\n }", "function avlTree() {\n \n}", "function buildLevelOne() {\n var x = false;\n $(\"a#label-root\").click(function () {\n if(x)\n { $(\"ul#level1\").toggle(\"fast\");}\n else{\n var href = $(this).data(\"cts2ref\");\n var id = $(this).attr(\"id\");\n getChildren(href, id);\n x = true;\n }\n });\n}", "function getParentLevel(tP, idx) { \t\t\t\t\t\t\t\t// console.log(\"getParentLevel called. idx = \", idx)\n for (var i = ++idx; i <= 7; i++) { \t\t\t// 7 indicates there is no value in kingdom(6)\n if (i === 7) { console.log(\"i=7; kingdom===null; no parent found at top of tree.\"); return false; }\n if (tP.recrd[tP.fieldAry[i]] !== null) { return i; }\n }\n }", "function beetle_lvl4() {}", "function nodestring(name, folder, id, level, path, bot_id, top, open) {\n \tvar temp = '';\n \tfor (var i = level - 1; i >= 0; i--) {\n \t\ttemp += '<span class=\"indent\"></span>';\n \t};\n \tif ((folder && top) || (folder && open)) {\n \t\ttemp += '<span class=\"icon glyphicon\"></span><span class=\"icon node-icon glyphicon glyphicon-folder-open\"></span>';\n \t} else if (folder) {\n \t\ttemp += '<span class=\"icon glyphicon\"></span><span class=\"icon node-icon glyphicon glyphicon-folder-close\"></span>';\n \t}\n \tif (top) {\n \t\treturn '<span id=\"tree' + (id + bot_id) + '\" data-path=\"' + path + '\"><li class=\"list-group-item node-tree\" style=\"color:undefined;background-color:undefined;\" onclick=upFold(\"' + path + '\")><span class=\"glyphicon glyphicon-level-up\" aria-hidden=\"true\"></span>..</li><li class=\"list-group-item node-tree\" style=\"color:undefined;background-color:undefined;\" onclick=openFold(\"tree' + (id + bot_id) + '\",\"' + name + '\",\"' + folder + '\",\"' + path + '\",\"' + level + '\")>' + temp + name + '</li></span>';\n \t} else if (!open && folder) {\n \t\treturn '<span id=\"tree' + (id + bot_id) + '\" data-path=\"' + path + '\"><li class=\"list-group-item node-tree\" style=\"color:undefined;background-color:undefined;\" onclick=openFold(\"tree' + (id + bot_id) + '\",\"' + name + '\",\"' + folder + '\",\"' + path + '\",\"' + level + '\")>' + temp + name + '</li></span>';\n \t} else if (open && folder) {\n \t\treturn '<span id=\"tree' + (id + bot_id) + '\" data-path=\"' + path + '\"><li class=\"list-group-item node-tree\" style=\"color:undefined;background-color:undefined;\" onclick=closeFold(\"tree' + id + '\",\"tree' + bot_id + '\",\"' + name + '\",\"' + path + '\",\"' + level + '\")>' + temp + name + '</li></span>';\n \t} else {\n \t\treturn '<span id=\"tree' + (id + bot_id) + '\" data-path=\"' + path + '\"><li class=\"list-group-item node-tree\" style=\"color:undefined;background-color:undefined;\" onclick=openFile(\"tree' + (id + bot_id) + '\",\"' + name + '\",\"' + folder + '\",\"' + path + '\",\"' + level + '\")>' + temp + name + '</li></span>';\n \t}\n }", "function initializeLevels()\r\n{\r\n\tlevels=[[[0, 0, 0, 0, 0], [0, 1, 0, 1, 0], [0, 1, 3, 1, 0], [0, 1, 0, 1, 0], [0, 1, 0, 0, 2]], \r\n\t\t\t[[0, 1, 0, 0, 0, 0, 0], [0, 1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 3], [0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 2, 0, 0]],\r\n\t\t\t[[0, 0, 0, 3, 0, 1, 0], [1, 1, 1, 1, 0, 1, 0], [0, 0, 0, 0, 0, 1, 0], [0, 1, 1, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0], [0, 1, 2, 0, 0, 0, 3]],\r\n\t\t\t[[0, 1, 3, 1, 0, 0, 3, 0, 0], [0, 1, 0, 1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 0, 1, 0], [0, 0, 0, 0, 0, 1, 2, 1, 0], [1, 1, 1, 1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 1, 0, 1, 0]],\r\n\t\t\t[[0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0], \r\n\t\t\t\t[0, 0, 3, 1, 0, 0, 0, 0, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 3], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0],\r\n\t\t\t\t[0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0]],\r\n\t\t\t[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1], [0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0], [1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], \r\n\t\t\t\t[0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 2], [0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0], [3, 0, 0, 1, 0, 0, 2, 0, 0, 0, 3, 1, 0], [1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0], \r\n\t\t\t\t[0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 3, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0]],\r\n\t\t\t[[0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1], [3, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0], [1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], \r\n\t\t\t\t[0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 3, 0, 0], [1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 0], [1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0], \r\n\t\t\t\t[0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0], [0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1], [0, 0, 0, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0]], \r\n\t\t\t[[0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0], [0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0], [0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0],\r\n\t\t\t\t[0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0], [0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 0, 1, 0, 1, 1], [0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 3], [0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0], \r\n\t\t\t\t[0, 0, 3, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 1, 0], [0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0], \r\n\t\t\t\t[0, 1, 0, 1, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 0], [0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]],\r\n\t\t\t[[0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 1, 3, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0],\r\n\t\t\t\t[0, 0, 0, 0, 3, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0], \r\n\t\t\t\t[0, 0, 2, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], \r\n\t\t\t\t[0, 0, 0, 1, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 0], [0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]],\r\n\t\t\t[[0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0], [0, 0, 2, 0, 0, 0, 0, 1, 3, 1, 0, 1, 0, 0, 0, 1, 3], [0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1],\r\n\t\t\t\t[0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1], [0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 3, 1, 1, 1, 1],\r\n\t\t\t\t[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 3, 1, 0], \r\n\t\t\t\t[0, 0, 0, 1, 0, 0, 2, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0], [0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1], [0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0]]];\r\n}", "function calcPrestigeLevel() {\n\n}", "function dibujar_tier(){\n\n var aux=0;\n var padre=$(\"#ordenamientos\"); // CONTENEDOR DE TODOS LOS TIER Y TABLAS\n for(var i=0;i<tier_obj.length;i++){ // tier_obj = OBJETO CONTENEDOR DE TODOS LOS TIER DE LA NAVE\n if(i==0) { // PRIMER CASO\n aux=tier_obj[0].id_bodega;\n aux=tier_obj[i].id_bodega;\n var titulo1= $(\"<h4 id='bodega' > BODEGA \"+tier_obj[i].num_bodega+\"</h4>\");\n padre.append(titulo1);\n }\n if(aux!=tier_obj[i].id_bodega){\n aux=tier_obj[i].id_bodega;\n var titulo1= $(\"<h4 id='bodega' > BODEGA \"+tier_obj[i].num_bodega+\"</h4>\");\n padre.append(titulo1);\n }\n\n // DIV CONTENEDOR DEL TITULO, TABLA DE DATOS Y TIER\n var tier_div= $(\"<div class='orden_tier_div'></div>\");\n padre.append( tier_div );\n\n // DIV CON EL TITULO Y LA TABLA VACIA\n var titulo2= $(\"<div id='div\"+tier_obj[i].id_tier+\"'><h4 id='tier'> M/N. \"+tier_obj[i].nombre+\" ARROW . . . . .HOLD Nº \"+tier_obj[i].num_bodega+\" </h4><table class='table table-bordered dat'></table></div>\");\n tier_div.append( titulo2 );\n\n // DIV CON EL TIER Y SUS DIMENSIONES\n var dibujo_tier=$(\"<div class='dibujo1_tier'></div>\");\n\n //DIV DEL RECTANGULO QUE SIMuLA UN TIER\n\n // LARGO AL LADO DERECHO DEL TIER\n var largo_tier=$(\"<div class='largo_tier'><p>\"+tier_obj[i].largo+\" mts</p></div>\");\n dibujo_tier.append( largo_tier );\n\n // EL ID DEL DIV, SERA EL ID DEL TIER EN LA BASE DE DATOS\n var cuadrado_tier=$(\"<div class='dibujo_tier' id=\"+tier_obj[i].id_tier+\"></div>\");\n dibujo_tier.append( cuadrado_tier );\n\n // ANCHO DEBAJO DEL TIER\n var ancho_tier=$(\"<div class='ancho_tier'><p>\"+tier_obj[i].ancho+\" mts</p></div>\");\n dibujo_tier.append( ancho_tier );\n\n tier_div.append( dibujo_tier );\n }\n\n datos_tier(); // ASIGNAR DATOS A LA TABLE DE CADA TIER\n}", "get level () { return this._level; }", "function getLevel(){\n return level\n}", "function ognutyun(level) {\n var v = document.getElementsByTagName(\"td\")\n var ga = document.getElementsByClassName(\"gamediv\")[0]\n var ogndiv = document.createElement(\"div\")\n var b\n for (let f = 0; f < v.length; f++) {\n if (v[f].id==20-10&&v[f].parentElement.id==11-3) {\n b=v[f] \n \n break\n }\n \n }\n if (level==0) {\n \n v[152].append(ogndiv)\n }\n else if (level== 1) {\n\n b.append(ogndiv)\n\n }\n else if (level== 2) {\n v[156].append(ogndiv)\n }\n else if (level== 3) {\n v[190].append(ogndiv)\n }\n \n \n \n ogndiv.setAttribute(\"class\",\"klors\")\n// ogndiv.style.width = ga.offsetWidth/1.5-2 + \"px\"\n// ogndiv.style.height = ga.offsetWidth/1.5-2 + \"px\"\n var tbl = document.createElement('table')\n ogndiv.appendChild(tbl)\n tbl.setAttribute(\"class\", \"table2\")\n \n var tbd = document.createElement('tbody')\n \n tbl.appendChild(tbd)\n var m = 20\n var n = 20\n \n var chap1 = ga.offsetHeight\n \n var verj = ga.offsetWidth/32\n \n for (let i = 0; i < m; i++) {\n var tr = document.createElement('tr')\n tbd.appendChild(tr)\n tr.setAttribute(\"id\", i)\n \n // tr.style.height = verj-2 + 'px'\n tr.style.height = verj + 'px'\n for (let j = 0; j < n; j++) {\n var td = document.createElement('td')\n tr.appendChild(td)\n td.setAttribute(\"class\", \"td\")\n td.setAttribute(\"id\", j)\n td.style.backgroundColor = \"transparent\"\ntd.style.width = verj + \"px\"\n // td.style.width = 30 + 'px'\n // td.style.height = 42 + 'px'\n\n td.onclick = function (params) {\n if (level==0) {\n if (this.id == 7 && this.parentElement.id == 0 || this.id == 8 && this.parentElement.id == 0 || this.id == 6 && this.parentElement.id == 1 || this.id == 7 && this.parentElement.id == 1 || this.id == 8 && this.parentElement.id == 1 || this.id == 9 && this.parentElement.id == 1 || this.id == 6 && this.parentElement.id == 2 || this.id == 7 && this.parentElement.id == 2 || this.id == 8 && this.parentElement.id == 2 || this.id == 9 && this.parentElement.id == 2 || this.id == 10 && this.parentElement.id == 2 || this.id == 12 && this.parentElement.id == 2 || this.id == 13 && this.parentElement.id == 2 || this.id == 5 && this.parentElement.id == 3 || this.id == 6 && this.parentElement.id == 3 || this.id == 7 && this.parentElement.id == 3|| this.id == 8 && this.parentElement.id == 3|| this.id ==9 && this.parentElement.id == 3|| this.id == 10 && this.parentElement.id == 3|| this.id == 12 && this.parentElement.id == 3|| this.id == 13 && this.parentElement.id == 3|| this.id == 5 && this.parentElement.id == 4|| this.id == 6 && this.parentElement.id == 4|| this.id ==7 && this.parentElement.id == 4|| this.id == 8 && this.parentElement.id == 4|| this.id == 9 && this.parentElement.id == 4|| this.id == 10 && this.parentElement.id == 4|| this.id == 11 && this.parentElement.id == 4|| this.id == 12 && this.parentElement.id == 4|| this.id == 13 && this.parentElement.id == 4|| this.id == 5 && this.parentElement.id == 5|| this.id == 6 && this.parentElement.id == 5|| this.id == 7 && this.parentElement.id == 5|| this.id == 8 && this.parentElement.id == 5|| this.id == 9 && this.parentElement.id == 5|| this.id == 10 && this.parentElement.id == 5|| this.id == 11 && this.parentElement.id == 5|| this.id == 12 && this.parentElement.id == 5|| this.id == 5 && this.parentElement.id == 6|| this.id == 6 && this.parentElement.id == 6|| this.id == 7 && this.parentElement.id == 6|| this.id == 8 && this.parentElement.id == 6|| this.id == 9 && this.parentElement.id == 6|| this.id == 10 && this.parentElement.id == 6|| this.id == 11 && this.parentElement.id == 6|| this.id==12 && this.parentElement.id == 6|| this.id == 13 && this.parentElement.id == 6|| this.id == 14 && this.parentElement.id == 6|| this.id == 4 && this.parentElement.id == 7|| this.id == 5 && this.parentElement.id == 7|| this.id == 6 && this.parentElement.id == 7|| this.id == 7 && this.parentElement.id == 7|| this.id == 8 && this.parentElement.id == 7|| this.id == 9 && this.parentElement.id == 7|| this.id == 10 && this.parentElement.id == 7|| this.id == 11 && this.parentElement.id == 7|| this.id == 12 && this.parentElement.id == 7|| this.id == 13 && this.parentElement.id == 7|| this.id == 14 && this.parentElement.id == 7|| this.id == 4 && this.parentElement.id == 8|| this.id == 5 && this.parentElement.id == 8|| this.id == 6 && this.parentElement.id == 8|| this.id == 7 && this.parentElement.id == 8|| this.id == 9 && this.parentElement.id == 8|| this.id == 10 && this.parentElement.id == 8|| this.id == 11 && this.parentElement.id == 8|| this.id == 12 && this.parentElement.id == 8|| this.id == 13 && this.parentElement.id == 8|| this.id == 14 && this.parentElement.id == 8|| this.id == 4 && this.parentElement.id == 9|| this.id == 5 && this.parentElement.id == 9|| this.id == 6 && this.parentElement.id == 9|| this.id == 7 && this.parentElement.id == 9|| this.id == 8 && this.parentElement.id == 9|| this.id == 10 && this.parentElement.id == 9|| this.id == 11 && this.parentElement.id == 9|| this.id == 12 && this.parentElement.id == 9|| this.id == 13 && this.parentElement.id == 9|| this.id == 14 && this.parentElement.id == 9|| this.id == 15 && this.parentElement.id == 9|| this.id == 3 && this.parentElement.id == 10|| this.id == 4 && this.parentElement.id == 10|| this.id == 5 && this.parentElement.id == 10|| this.id == 6 && this.parentElement.id == 10|| this.id == 7 && this.parentElement.id == 10|| this.id == 8 && this.parentElement.id == 10|| this.id == 9 && this.parentElement.id == 10|| this.id == 10 && this.parentElement.id == 10|| this.id == 11 && this.parentElement.id == 10|| this.id == 12 && this.parentElement.id == 10|| this.id == 13 && this.parentElement.id == 10|| this.id == 14 && this.parentElement.id == 10|| this.id == 15 && this.parentElement.id == 10|| this.id == 3 && this.parentElement.id == 11|| this.id == 4 && this.parentElement.id == 11|| this.id == 5 && this.parentElement.id == 11|| this.id == 6 && this.parentElement.id == 11|| this.id == 7 && this.parentElement.id == 11|| this.id == 8|| this.id == 11 && this.parentElement.id == 9|| this.id == 11 && this.parentElement.id == 10|| this.id == 11&& this.parentElement.id == 11|| this.id == 12 && this.parentElement.id == 11|| this.id == 13 && this.parentElement.id == 11|| this.id == 14 && this.parentElement.id == 11|| this.id == 3 && this.parentElement.id == 12|| this.id == 4 && this.parentElement.id == 12|| this.id == 5 && this.parentElement.id == 12|| this.id == 6 && this.parentElement.id == 12|| this.id == 7 && this.parentElement.id == 12|| this.id == 8 && this.parentElement.id == 12|| this.id == 9 && this.parentElement.id == 12|| this.id == 10 && this.parentElement.id == 12|| this.id == 11 && this.parentElement.id == 12|| this.id == 12 && this.parentElement.id == 12|| this.id == 13 && this.parentElement.id == 12|| this.id ==3 && this.parentElement.id == 13|| this.id == 4 && this.parentElement.id == 13|| this.id == 5 && this.parentElement.id == 13|| this.id == 6 && this.parentElement.id == 13|| this.id == 7 && this.parentElement.id == 13|| this.id == 8 && this.parentElement.id == 13|| this.id == 10 && this.parentElement.id == 13|| this.id == 11 && this.parentElement.id == 13|| this.id == 12 && this.parentElement.id == 13|| this.id == 13 && this.parentElement.id == 13|| this.id == 4 && this.parentElement.id == 14|| this.id == 11 && this.parentElement.id == 13|| this.id == 12 && this.parentElement.id == 13|| this.id == 11 && this.parentElement.id == 13|| this.id == 12 && this.parentElement.id == 13|| this.id == 11 && this.parentElement.id == 13|| this.id == 12 && this.parentElement.id == 13|| this.id == 11 && this.parentElement.id == 13|| this.id == 12 && this.parentElement.id == 13|| this.id == 11 && this.parentElement.id == 13|| this.id == 12 && this.parentElement.id == 13|| this.id == 11 && this.parentElement.id == 13|| this.id == 12 && this.parentElement.id == 13|| this.id == 13 && this.parentElement.id == 13|| this.id == 4 && this.parentElement.id == 14|| this.id == 5 && this.parentElement.id == 14|| this.id == 6 && this.parentElement.id == 14|| this.id == 7 && this.parentElement.id == 14|| this.id == 8 && this.parentElement.id == 14|| this.id == 9 && this.parentElement.id == 14|| this.id == 10 && this.parentElement.id == 14|| this.id == 11 && this.parentElement.id == 14|| this.id == 12 && this.parentElement.id == 14|| this.id == 4 && this.parentElement.id == 15|| this.id == 5 && this.parentElement.id == 15|| this.id == 6 && this.parentElement.id == 15|| this.id == 7 && this.parentElement.id == 15|| this.id == 8 && this.parentElement.id == 15|| this.id == 9 && this.parentElement.id == 15|| this.id == 10 && this.parentElement.id == 15|| this.id == 11 && this.parentElement.id == 15|| this.id == 4 && this.parentElement.id == 16||this.id == 5 && this.parentElement.id == 16|| this.id == 6 && this.parentElement.id == 16|| this.id == 7 && this.parentElement.id == 16|| this.id == 8&& this.parentElement.id == 16|| this.id == 9 && this.parentElement.id == 16|| this.id == 10 && this.parentElement.id == 16|| this.id == 11 && this.parentElement.id == 16|| this.id == 6 && this.parentElement.id == 17|| this.id == 7 && this.parentElement.id == 17|| this.id == 8 && this.parentElement.id == 17|| this.id == 9 && this.parentElement.id == 17|| this.id == 10 && this.parentElement.id == 17|| this.id == 11 && this.parentElement.id == 17|| this.id == 6 && this.parentElement.id == 18|| this.id == 7 && this.parentElement.id == 18|| this.id == 8 && this.parentElement.id == 18|| this.id == 9 && this.parentElement.id == 18|| this.id == 11 && this.parentElement.id == 18) {\n var ts = document.getElementsByClassName(\"table\")[0]\n \n \n ts.classList.add(\"comp\")\n \n \n ts.style.backgroundImage = \"url(img/compl/1.png)\"\n paraadam()\n gamelev = 1\n lev = 1\n localStorage.setItem(\"lev\", gamelev)\n\n\n setTimeout(() => {\n \n l1()\n }, chap); \n \n }\n else{\n paraadamdel()\n\n tanel(this)\n }\n\n }\n else if (level==1) {\n if (this.id == 12 && this.parentElement.id == 7 || this.id == 13 && this.parentElement.id == 7 || this.id == 14 && this.parentElement.id == 7 || this.id == 12 && this.parentElement.id == 8 || this.id == 13 && this.parentElement.id == 8 || this.id == 14 && this.parentElement.id == 8|| this.id == 15 && this.parentElement.id == 8|| this.id == 16 && this.parentElement.id == 8|| this.id == 17 && this.parentElement.id == 8|| this.id == 18 && this.parentElement.id == 8|| this.id == 13 && this.parentElement.id == 9|| this.id == 14 && this.parentElement.id == 9 || this.id == 15 && this.parentElement.id == 9|| this.id == 16 && this.parentElement.id == 9|| this.id == 17 && this.parentElement.id == 9|| this.id == 18 && this.parentElement.id == 19|| this.id == 13 && this.parentElement.id == 10|| this.id == 14 && this.parentElement.id == 10|| this.id == 15 && this.parentElement.id == 10|| this.id == 16 && this.parentElement.id == 10|| this.id == 17 && this.parentElement.id == 10|| this.id == 18 && this.parentElement.id == 10|| this.id == 19 && this.parentElement.id == 10) {\n var ts = document.getElementsByClassName(\"table\")[0]\n \n \n ts.classList.add(\"comp\")\n paraadam()\n \n ts.style.backgroundImage = \"url(img/compl/7.png)\"\n gamelev = 2\n lev = 2\n localStorage.setItem(\"lev\", gamelev)\n\n\n setTimeout(() => {\n l3()\n }, 2000);\n\n }\n else {\n paraadamdel()\n tanel(this)\n }\n }\n else if (level==2) {\n if (this.id == 6 && this.parentElement.id == 7 || this.id == 7 && this.parentElement.id == 7 || this.id == 5 && this.parentElement.id == 8 || this.id == 6 && this.parentElement.id == 8 || this.id == 7 && this.parentElement.id == 8 || this.id == 8 && this.parentElement.id == 8|| this.id == 5 && this.parentElement.id == 9|| this.id == 6 && this.parentElement.id == 9|| this.id == 7 && this.parentElement.id == 9|| this.id == 8 && this.parentElement.id == 9|| this.id == 5 && this.parentElement.id == 10|| this.id == 6 && this.parentElement.id == 10 || this.id == 7 && this.parentElement.id == 10|| this.id == 8 && this.parentElement.id == 10|| this.id == 6 && this.parentElement.id == 11|| this.id == 7 && this.parentElement.id == 11|| this.id == 6 && this.parentElement.id == 12|| this.id == 7 && this.parentElement.id == 12|| this.id == 8 && this.parentElement.id == 12|| this.id == 7 && this.parentElement.id == 13) {\n var ts = document.getElementsByClassName(\"table\")[0]\n \n \n ts.classList.add(\"comp\")\n paraadam()\n \n ts.style.backgroundImage = \"url(img/compl/5.png)\"\n gamelev = 3\n lev = 3\n localStorage.setItem(\"lev\", gamelev)\n\n\n setTimeout(() => {\n l4()\n }, chap);\n\n }\n else {\n paraadamdel()\n tanel(this)\n }\n }\n else if (level==3) {\n if (this.id == 6 && this.parentElement.id == 7 || this.id == 7 && this.parentElement.id == 7 || this.id == 5 && this.parentElement.id == 8 || this.id == 6 && this.parentElement.id == 8 || this.id == 7 && this.parentElement.id == 8 || this.id == 8 && this.parentElement.id == 8|| this.id == 5 && this.parentElement.id == 9|| this.id == 6 && this.parentElement.id == 9|| this.id == 7 && this.parentElement.id == 9|| this.id == 8 && this.parentElement.id == 9|| this.id == 5 && this.parentElement.id == 10|| this.id == 6 && this.parentElement.id == 10 || this.id == 7 && this.parentElement.id == 10|| this.id == 8 && this.parentElement.id == 10|| this.id == 6 && this.parentElement.id == 11|| this.id == 7 && this.parentElement.id == 11|| this.id == 6 && this.parentElement.id == 12|| this.id == 7 && this.parentElement.id == 12|| this.id == 8 && this.parentElement.id == 12|| this.id == 7 && this.parentElement.id == 13) {\n var ts = document.getElementsByClassName(\"table\")[0]\n \n \n ts.classList.add(\"comp\")\n paraadam()\n \n ts.style.backgroundImage = \"url(img/compl/4.png)\"\n gamelev = 4\n lev = 4\n localStorage.setItem(\"lev\", gamelev)\n\n\n setTimeout(() => {\n l5()\n }, chap);\n\n }\n else {\n paraadamdel()\n tanel(this)\n }\n }\n}\n\n \n }\n \n \n }\n ogndiv.style.width = 10*20 + \"px\"\n ogndiv.style.height = 10*20 + \"px\"\n\n}", "function calcLevelOfVector2(wv, index) {\n\t var t = [],\n\t ndObjA = wa,\n\t lvl = 0,\n\t next = false,\n\t i,\n\t childName,\n\t chInd;\n\n\t if (wv[lvl] !== undefined && lvl <= index) {\n\t i = 0;\n\n\t childName = wv[lvl];\n\t chInd = undefined;\n\n\t while (i < ndObjA.length && chInd === undefined) {\n\t if (ndObjA[i].key == wv[lvl] && !ndObjA[i].invalid) {\n\t chInd = i;\n\t }\n\t i++;\n\t }\n\t } else {\n\t chInd = getFirstValidItemObjOrInd(ndObjA, true);\n\t childName = ndObjA[chInd].key;\n\t }\n\n\t next = chInd !== undefined ? ndObjA[chInd].children : false;\n\n\t t[lvl] = childName;\n\n\t while (next) {\n\t ndObjA = ndObjA[chInd].children;\n\t lvl++;\n\t next = false;\n\t chInd = undefined;\n\n\t if (wv[lvl] !== undefined && lvl <= index) {\n\t i = 0;\n\n\t childName = wv[lvl];\n\t chInd = undefined;\n\n\t while (i < ndObjA.length && chInd === undefined) {\n\t if (ndObjA[i].key == wv[lvl] && !ndObjA[i].invalid) {\n\t chInd = i;\n\t }\n\t i++;\n\t }\n\t } else {\n\t chInd = getFirstValidItemObjOrInd(ndObjA, true);\n\t chInd = chInd === false ? undefined : chInd;\n\t childName = ndObjA[chInd].key;\n\t }\n\t next = chInd !== undefined && getFirstValidItemObjOrInd(ndObjA[chInd].children) ? ndObjA[chInd].children : false;\n\t t[lvl] = childName;\n\t }\n\t return {\n\t lvl: lvl + 1,\n\t nVector: t\n\t }; // return the calculated level and the wheel vector as an object\n\t }", "function TOC_writeTOC1Subtree(node, selectedItem, depth) {\n\tvar title = cropString(node.title,22);\n\n\tvar resource = node.getResource();\n var refItem = node;\n while (resource == null && refItem.getChildCount() != null) {\n\t refItem = refItem.getChildAt(0);\n\t\tresource = refItem.getResource();\n\t}\n\t\n\t\n\tvar lessonStatus = (resource == null) ? \"\" : resource.cmi_core_lesson_status;\n\tif (node == selectedItem) lessonStatus = \"current\"; \n var iconStatus = lessonStatus;\n\tvar cssClass = getCSSClass(lessonStatus);\n\tdocument.write('<p class=\"toc1'+cssClass+'\">');\n\t\n\t\n\tif (node.getChildCount() == 0) {\n\t\tif (resource != null) document.write('<a class=\"toc1'+cssClass+'\" href=\"#\" onclick=\"stub.getAPI().gotoItemWithID(\\''+refItem.identifier+'\\')\">');\n\t\twriteIcon(iconStatus);\n\t\tdocument.write(title); \n\t\tif (resource != null) document.write('</a>'); \n\t\tdocument.writeln('</p>'); \n\t} else {\n\t if (node.isNodeDescendant(selectedItem)) {\n\t\t\tdocument.write('<img src=\"images/symbols/sym_toc_disabled.gif\" width=\"12\" height=\"9\" border=\"0\">');\n\t\t\tif (resource != null) document.write('<a class=\"toc1'+cssClass+'\" href=\"#\" onclick=\"stub.getAPI().gotoItemWithID(\\''+refItem.identifier+'\\')\">');\n\t\t\tdocument.write(title); \n\t\t\tif (resource != null) document.write('</a>'); \n\t\t\tdocument.writeln('</p>'); \n\t\t\tfor (var i=0; i < node.getChildCount(); i++) {\n\t\t\t\tthis.writeTOC2Subtree(node.getChildAt(i), selectedItem, depth + 1);\n\t\t\t}\n\t } else if (node.isExpanded) {\n\t\t\tdocument.write('<a class=\"toc1'+cssClass+'\" href=\"#\" onclick=\"setExpanded(\\''+node.identifier+'\\',false)\">');\n\t\t\tdocument.write('<img src=\"images/symbols/sym_toc_expanded.gif\" width=\"12\" height=\"9\" border=\"0\">');\n\t\t\tdocument.write('</a>');\n\t\t\tif (resource != null) document.write('<a class=\"toc1'+cssClass+'\" href=\"#\" onclick=\"stub.getAPI().gotoItemWithID(\\''+refItem.identifier+'\\')\">');\n\t\t\tdocument.write(title); \n\t\t\tif (resource != null) document.write('</a>'); \n\t\t\tdocument.writeln('</p>'); \n\t\t\tfor (var i=0; i < node.getChildCount(); i++) {\n\t\t\t\tthis.writeTOC2Subtree(node.getChildAt(i), selectedItem, depth + 1);\n\t\t\t}\n\t\t} else {\n\t\t\tdocument.write('<a class=\"toc1'+cssClass+'\" href=\"#\" onclick=\"setExpanded(\\''+node.identifier+'\\',true)\">');\n\t\t\tdocument.write('<img src=\"images/symbols/sym_toc_collapsed.gif\" width=\"12\" height=\"9\" border=\"0\">');\n\t\t\tdocument.write('</a>');\n\t\t\tif (resource != null) document.write('<a class=\"toc1'+cssClass+'\" href=\"#\" onclick=\"stub.getAPI().gotoItemWithID(\\''+refItem.identifier+'\\')\">');\n\t\t\tdocument.write(title); \n\t\t\tif (resource != null) document.write('</a>'); \n\t\t\tdocument.writeln('</p>'); \n\t\t}\n\t}\n}", "function getLevelData() {\r\n if (courses.levels.length > 0 && curLevel < courses.levels.length) {\r\n selected_level = courses.levels[curLevel];\r\n getUnitData();\r\n } else {\r\n // console.log(\"\\nConfig files modified successfully!!! Removing unnecessary files from other config please wait.\\n\");\r\n // curLevel = 0;\r\n // removeUnits(courses.levels);\r\n }\r\n}", "function getTree(id, li_id, nodeif){\n $(li_id).parent().parent().parent().find(\"input\").val(0);\n var nextstr = '<ul class=\"hierarchy\">';\n for (var i = 0; i < subcat.length; i++) {\n if (subcat[i][2] == id) {\n if (subcat[i][4] == 0) {\n nextstr += '<li onclick=\"treeok(' + subcat[i][1] + ',this,1)\" title=\"' + subcat[i][0] + '\">' + subcat[i][0] + '</li>';\n }else{\n nextstr += '<li onclick=\"getTree(' + subcat[i][1] + ',this,1)\" title=\"' + subcat[i][0] + '\"><b class=\"arr\"></b>' + subcat[i][0] + '</li>';\n }\n }\n }\n nextstr += '</ul>';\n $(li_id).parent().find(\"li\").removeClass(\"current\");\n $(li_id).addClass(\"current\");\n $(li_id).parent().nextAll().remove();\n $(li_id).parent().parent().append(nextstr);\n\n var lic = $(li_id).parent().parent().find(\"li\");\n var arrCategory = [];\n for (var i = 0; i < lic.length; i++) {\n if( lic.eq(i).hasClass('current') ){\n tree0 = setContent( $(lic.eq(i)).html());\n arrCategory.push(tree0);\n }\n };\n tree0 = arrCategory.join(\">\");\n\n $(li_id).parent().parent().parent().find(\".analog-select\").html('<em></em>' + tree0);\n $(li_id).parents('.editlayout').find('.msgs').html('');\n}", "print_in_dfs() {\n let layer = 0;\n for (let i = 0; i < this.root.child_list.length; i++) {\n this._print_sub_tree(this.root.child_list[i], layer+1, i);\n }\n console.log(\"1th element at layer \" + layer + \": \" + this.root.type + \"(\" + this.root.id + \")\");\n }", "function getLabelHier(d){\r\n\t\t\t\t \tthis.arr;\r\n\t\t\t\t\t if(d.parent)\r\n\t\t\t\t \t{\r\n\t\t\t\t \t\tthis.hierArr.push(d.name);\r\n\t\t\t\t \t\tgetLabelHier(d.parent)\r\n\t\t\t\t \t}\r\n\t\t\t\t \telse\r\n\t\t\t\t \t{\r\n\t\t\t\t \t\tif(!(this.hierArr[this.hierArr.length - 1] == d.name))\r\n\t\t\t\t\t\t\tthis.hierArr.push(d.name);\r\n\t\t\t\t \t}\r\n\t\t\t\t \tif(this.hierArr.length != 0)\r\n\t\t\t\t \tthis.arr = this.hierArr;\r\n\t\t\t\t \tthis.hierArr = [];\r\n\t\t\t\t\treturn this.arr;\r\n\t\t\t\t }", "function meni_objekat( json__, okvir_duzina ) {\n\n\t// nije moglo da se inicijalizuje prije definisanja funkcije \"dodaj_tate\" ??\n\t// zato idemo na dno našega konstruktora\n\t// this.meni = this.dodaj_tate( JSON.parse( json ), {} );\n\n\t// Ucitava meni iz JSON string-a\n\tthis.ucitaj = function( json__ ) {\n\t\tthis.meni = this.dodaj_tate( JSON.parse( json__ ), null, \"\" );\n\t}\n\n\n\t// Svakom objektu dodaje polje koje sadrzi parent objekat i ime aktuelnog objekta\n\t// da bismo lakše birali aktivni objekat kad idemo lijevo (ka roditelju)\n\tthis.dodaj_tate = function( a, tata, sin_ime ) {\n\t\tfor( b in a )\n\t\t\tif( typeof( a[b] ) == \"object\" && b != \"tata__\" )\n\t\t\t\tthis.dodaj_tate( a[b], a, b );\n\t\ta.tata__ = tata;\n\t\ta.sin_ime__ = sin_ime;\n\t\treturn a;\n\t}\n\n\t// Ovo je neki čobanin - budala\n\tthis.stampaj_meni = function( a ) {\n\t\tfor( b in a )\n\t\t\tif( typeof( a[b] ) == \"object\" && b != \"tata__\" ) {\n\t\t\t\tconsole.log( \"node -> \" + b );\n\t\t\t\tthis.stampaj_meni( a[b] );\n\t\t\t}\n\t\t\telse if( b == \"tata__\" )\n\t\t\t\tconsole.log( \"node -> \" + b );\n\t\t\telse if( typeof( b ) == \"string\" )\n\t\t\t\tconsole.log( \"leaf -> \" + b + \" = \" + a[b] );\n\t\treturn 0;\n\t}\n\n\t// Vadi potrebna polja iz aktivnog objekta\n\tthis.polja = function( a ) {\n\t\tvar i = 0;\n\t\tvar c = new Array();\n\t\tfor( b in a ) {\n\t\t\t// console.log( b + \" -> \" + a[b] );\n\t\t\tif( b != \"tata__\" && b != \"sin_ime__\" )\n\t\t\t\tc[i++] = b;\n\t\t}\n\t\treturn c;\n\t}\n\n\t// Idemo jedno polje gore (ako ima gdje) u meniju\n\tthis.gore = function() {\n\t\t//var indeks = this.polja_aktivnog_objekta.indexOf( this.aktivno_polje );\n\t\tvar indeks = this.indeksOd( this.polja_aktivnog_objekta, this.aktivno_polje );\n\t\tif( indeks > 0 )\n\t\t\tthis.aktivno_polje = this.polja_aktivnog_objekta[--indeks];\n\n\t\tif( indeks < this.okvir_start_indeks )\n\t\t\tthis.okvir_start_indeks = indeks;\n\t\treturn indeks;\n\t}\n\n\t// Idemo jedno polje dolje (ako ima gdje) u meniju\n\tthis.dolje = function() {\n\t\t//var indeks = this.polja_aktivnog_objekta.indexOf( this.aktivno_polje );\n\t\tvar indeks = this.indeksOd( this.polja_aktivnog_objekta, this.aktivno_polje );\n\t\tif( indeks < this.polja_aktivnog_objekta.length - 1 )\n\t\t\tthis.aktivno_polje = this.polja_aktivnog_objekta[++indeks];\n\n\t\tif( indeks > this.okvir_start_indeks + this.okvir_duzina - 1 )\n\t\t\tthis.okvir_start_indeks = indeks - this.okvir_duzina + 1;\t\t\n\t\treturn indeks;\n\t}\n\n\t// Nazad u nad-meni\n\tthis.lijevo = function() {\n\t\tif( this.aktivni_objekat.tata__ == null )\n\t\t\treturn -1;\n\t\tthis.aktivno_polje = this.aktivni_objekat.sin_ime__;\n\t\tthis.aktivni_objekat = this.aktivni_objekat.tata__;\n\t\tthis.polja_aktivnog_objekta = this.polja( this.aktivni_objekat );\n\n\t\t//var indeks = this.polja_aktivnog_objekta.indexOf( this.aktivno_polje );\n\t\tvar indeks = this.indeksOd( this.polja_aktivnog_objekta, this.aktivno_polje );\n\t\tvar duzina = this.polja_aktivnog_objekta.length;\n\t\tthis.okvir_start_indeks = duzina <= this.okvir_duzina ? 0 : ( duzina - indeks < this.okvir_duzina ? duzina - this.okvir_duzina : indeks ); \n\t\treturn 0;\n\t}\n\n\t// Naprijed u pod-meni\n\tthis.desno = function() {\n\t\tif( typeof( this.aktivni_objekat[this.aktivno_polje] ) != \"object\" )\n\t\t\treturn -1;\n\t\tthis.aktivni_objekat = this.aktivni_objekat[this.aktivno_polje];\n\t\tthis.polja_aktivnog_objekta = this.polja( this.aktivni_objekat );\n\t\tthis.aktivno_polje = this.polja_aktivnog_objekta.length > 0 ? this.polja_aktivnog_objekta[0] : null;\n\n\t\tthis.okvir_start_indeks = 0;\n\t\treturn 0;\n\t}\n\n\t// Npr. duzina=10, duzina_okvira=6, aktivno polje ima indeks=6\n\t// Ako je indeks na pocetku ili kraju okvira onda zajedno\n\t// sa indeksom \"šetamo\" i okvir\n\t// _ _ | _ _ _ _ _ _ | _ _\n\t// 0 1 2 3 4 5 6 7 8 9\n\t// ^ ^\n\t// okvir_start_indeks indeks\n\n\n\t// Vraća indeks od zadatog elementa u nizu\n\t// Nevjerevatno da IE ne podržava tako glup metod kakav je indexOf\n\tthis.indeksOd = function( niz, element ) {\n\t\tif( typeof( niz.indexOf ) == \"function\" )\n\t\t\treturn niz.indexOf( element );\n\t\tfor( indeks in niz )\n\t\t\tif( niz[indeks] == element )\n\t\t\t\treturn indeks * 1; // for uvijek vraca indeks tipa string pa ga mnozimo sa 1 da konvertujemo u number\n\t\treturn false; // string bi kasnije komplikovao stvari a nas indeks sadrzi samo cifre pa je ovo OK\n\t}\n\n\n\t// Daje sređen izlazni niz od n elemenata za prikaz\n\t// Izlaz je niz nizova sa imenima cvorova/listova,\n\t// sadrzajem listova i markiranim (true) aktivnim poljem\n\tthis.izlaz = function() {\n\t\tvar start_indeks = this.okvir_start_indeks;\n\t\tvar izlaz__ = new Array();\n\t\tfor( var i = 0; i < this.okvir_duzina; ++i ) {\n\t\t\tvar tmp = new Array(); // svaki put novi objekat jer bi svi elementi izlaza pokazivali na isti (dodjeljuje se pointer)\n\t\t\tif( start_indeks + i < this.polja_aktivnog_objekta.length ) {\n\t\t\t\tvar polje = this.polja_aktivnog_objekta[start_indeks + i];\n\t\t\t\ttmp[0] = typeof( this.aktivni_objekat[polje] ) == \"object\" ? \"< \" + polje + \" >\" : \"< \" + polje; // polje\n\t\t\t\ttmp[1] = polje == this.aktivno_polje ? true : false; // odabran\n\t\t\t\ttmp[2] = typeof( this.aktivni_objekat[polje] ) == \"object\" ? \"\" : this.aktivni_objekat[polje]; // sadrzaj\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttmp[0] = tmp[2] = \"\";\n\t\t\t\ttmp[1] = false;\n\t\t\t}\n\t\t\tizlaz__[i] = tmp;\n\t\t}\n\t\treturn izlaz__;\n\t}\n\n\t// Inicijalizacije\n\tthis.meni = this.dodaj_tate( JSON.parse( json__ ), null, \"\" ); // meni je glavna promjeniljva koja sadrži meni\n\tthis.aktivni_objekat = this.meni; // aktivni nod - elementima ovog noda je popunjen meni\n\tthis.polja_aktivnog_objekta = this.polja( this.meni ); // elementi menija\n\tthis.aktivno_polje = this.polja_aktivnog_objekta.length > 0 ? this.polja_aktivnog_objekta[0] : null; // aktivno polje u meniju\n\tthis.okvir_start_indeks = 0; // od ovog indeksa počinje okvir (meni)\n\tthis.okvir_duzina = typeof( okvir_duzina ) == \"undefined\" ? 6 : okvir_duzina; // broj stavki u okviru (meniju)\n}", "function wb(){this.wa=this.root=null;this.Y=!1;this.C=this.T=this.ka=this.assignedSlot=this.assignedNodes=this.J=null;this.childNodes=this.nextSibling=this.previousSibling=this.lastChild=this.firstChild=this.parentNode=this.O=void 0;this.Ca=this.pa=!1}", "function pfTelusurBalik(cell, res) {\n let i = 0;\n let cellTemp = null;\n let cellParent = null;\n let len;\n //cari parent dari cell yang sedang di check\n len = cellAr.length;\n for (i = 0; i < len; i++) {\n cellTemp = cellAr[i];\n if (cell.induk == cellTemp) {\n cellParent = cellTemp;\n }\n }\n //parent gak ada, cell adalah cell awal, kembali;\n if (cellParent == null) {\n console.log(\"pencarian selesai cell target adalah cell awal\");\n return;\n }\n //hasilnya di masukkan ke let res\n //urutan dibalik\n //bila parent adalah cell awal maka penelusuran berhenti\n res.unshift(cellParent);\n if (cellParent.induk == null) {\n return;\n }\n else {\n pfTelusurBalik(cellParent, res);\n }\n}", "function LoadDDTreeUnit() {\n var data2 = GlobalData;\n var html = \"\";\n html += \"<option value='0' level='0' kode=''>Tanpa Induk</option>\";\n for (var x = 0; x < data2.length; x++) {\n html += \"<option value='\" + data2[x].ID + \"' parent='\" + data2[x].PARENTID + \"' level='\" + data2[x].LEVEL + \"' kode='\" + data2[x].KODE + \"'>\" + data2[x].KODE + \" \" + data2[x].NAMA + \"</option>\";\n }\n $(\"#edit_PARENTID\").empty();\n $(\"#edit_PARENTID\").append(html);\n }", "levelsForBuilding(bld) {\n return this.levels.filter((lvl) => lvl.parent_id === bld.id);\n }", "function genTree(data, leafIds) {\n var compare = function (a, b) {\n return a.level - b.level;\n }\n\n //1.records to tree array\n var tree = [];\n for (var i = 0; i < data.length; i++) {\n data[i].folder = false;\n data[i].level = tool.countChar(data[i].path, '/');\n data[i].image_num = 0;\n data[i].is_leaf = false;\n data[i].leaf_descendant = [];\n data[i].children = [];\n tree.push(data[i]);\n }\n tree.sort(compare);\n\n //2.scan to form the map\n var map = {};\n for (i = 0; i < tree.length; i++) {\n map[tree[i].id] = i;\n }\n\n //3.leafIds\n for (i = 0; i < leafIds.length; i++) {\n tree[map[leafIds[i].ID]].image_num = leafIds[i].NUM;\n tree[map[leafIds[i].ID]].is_leaf = true;\n }\n\n //4.insert from the tail to head in tree\n for (i = tree.length - 1; i >= 0; i--) {\n var p_idx = map[tree[i].parent_id];\n if (tree[i].parent_id == -1)\n continue;\n\n tree[p_idx]['children'].push(tree[i]);\n tree[p_idx]['image_num'] += tree[i].image_num;\n if (tree[i].is_leaf) {\n tree[p_idx]['leaf_descendant'].push(tree[i].id);\n } else {\n for (var j = 0; j < tree[i]['leaf_descendant'].length; j++) {\n tree[p_idx]['leaf_descendant'].push(tree[i]['leaf_descendant'][j]);\n }\n }\n tree[p_idx].folder = true;\n tree.pop();\n }\n return tree;\n}", "createMyList(data,_pre){\n var _this=this,cLen=0;\n data.map(function(i){\n cLen=0;\n i.child.map(function(data){\n if(data.folderName){\n cLen++;\n }\n });\n _this.state.displayList.push({child:cLen,folder:i.folderName,level:i.level, _on:i._on, editable:i.editable,rel:_pre+'/'+i.folderName,type:i.type});\n if(_this.state.exAll){\n i._on =true;\n }\n if(_this.state.colAll){\n i._on =false;\n }\n if(i._on){\n _this.createMyList(i.child,_pre+'/'+i.folderName); // recursive call to iterate over the nested data structure\n }\n });\n }", "drawTree() {\r\n fuenfteAufgabe.crc2.beginPath();\r\n fuenfteAufgabe.crc2.moveTo(this.x, this.y);\r\n fuenfteAufgabe.crc2.lineTo(this.x + 30, this.y - 60);\r\n fuenfteAufgabe.crc2.lineTo(this.x + 60, this.y);\r\n fuenfteAufgabe.crc2.strokeStyle = this.color;\r\n fuenfteAufgabe.crc2.stroke();\r\n fuenfteAufgabe.crc2.fillStyle = this.color;\r\n fuenfteAufgabe.crc2.fill();\r\n }", "function zmien_ocene(ruch_t)\n{\n let nr_bierki_p = szachownica.pola[ruch_t.wiersz_p][ruch_t.kolumna_p];\n let nr_bierki_k = szachownica.pola[ruch_t.wiersz_k][ruch_t.kolumna_k];\n\n if(nr_bierki_k !== 0)\n zmien_ocene_usun(ruch_t.wiersz_k, ruch_t.kolumna_k);\n\n szachownica.ocena.tablice += wartosc_tabela(ruch_t.wiersz_k, ruch_t.kolumna_k, nr_bierki_p) - wartosc_tabela(ruch_t.wiersz_p, ruch_t.kolumna_p, nr_bierki_p);\n szachownica.ocena.tablice_koncowka += wartosc_tabela_konc(ruch_t.wiersz_k, ruch_t.kolumna_k, nr_bierki_p) - wartosc_tabela_konc(ruch_t.wiersz_p, ruch_t.kolumna_p, nr_bierki_p);\n}", "function BN_updateLevel (BN, level) {\r\n BN.level = level;\r\n let children = BN.children;\r\n if (children != undefined) {\r\n\tlet len = children.length;\r\n\tfor (let i=0 ; i<len ; i++) {\r\n\t BN_updateLevel(children[i], level+1);\r\n\t}\r\n }\r\n}", "function beetle_lvl5() {}", "function setLevel() {\n level = 1;\n}", "function wykonaj_ruch_SI()\n{\n let ruchy = generuj_ruchy(), ruch_t;\n\n // sprawdzanie czy jest mat/pat\n if(ruchy.ruchy.length + ruchy.zbicia.length === 0)\n {\n if(czy_szach(szachownica.biale_ruch))\n {\n // mat, SI przegralo\n napisz_wynik(szachownica.biale_ruch ? 2 : 1);\n }\n else\n {\n // pat, remis\n napisz_wynik(3);\n }\n\n zablokowane = true;\n\n return;\n }\n\n // sprawdzanie pozostalych remisow\n if(szachownica.liczba_polowek_od_r > 100 || poprzednie_pozycje[szachownica.hash] >= 3 || !czy_wystarczajacy_material())\n {\n napisz_wynik(3);\n\n szachownica.biale_ruch = !szachownica.biale_ruch;\n zablokowane = true;\n\n return;\n }\n\n tablica_transp = new Map();\n\n let nr = Math.floor(Math.random() * (ruchy.ruchy.length + ruchy.zbicia.length));\n\n if(nr < ruchy.ruchy.length)\n ruch_t = ruchy.ruchy[nr];\n else\n ruch_t = ruchy.zbicia[nr - ruchy.ruchy.length];\n\n wykonaj_ruch(ruch_t);\n if(szachownica.pola[ruch_t.wiersz_k][ruch_t.kolumna_k] === 6 && ruch_t.wiersz_k === 7)\n {\n // promocja biale\n promuj_piona(ruch_t.wiersz_k, ruch_t.kolumna_k, Math.floor(Math.random() * 4) + 2);\n }\n else if(szachownica.pola[ruch_t.wiersz_k][ruch_t.kolumna_k] === 12 && ruch_t.wiersz_k === 0)\n {\n // promocja czarne\n promuj_piona(ruch_t.wiersz_k, ruch_t.kolumna_k, Math.floor(Math.random() * 4) + 8);\n }\n\n narysuj();\n}", "get depth() {}", "function Leaf() {}", "function tabellenErstellen() {\n\n kostenTabelleErstellen();\n\n cebitTabelleErstellen();\n\n conhitTabelleErstellen();\n\n webtechconTabelleErstellen();\n\n\n}", "get dir() { return this.level % 2 ? RTL : LTR; }", "function myTree(tree) {\n var height = tree.rows;\n var char = tree.leaves;\n\n for (var i = 0; i < height; i++) {\n var str = ''; var space = (height - i);\n if (i == 0) {\n }\n\n str += ' '.repeat(space + 1);\n var zero = 2 * i + 1;\n str += char.repeat(zero);\n\n console.log(str);\n }\n}", "treeAt(path) {\n return foldl((subtree, key) => subtree ? subtree.children[key]: undefined, this, path);\n }", "function levelSet(p_re, p_im, c_re, c_im)\n{\n\tvar z_re = p_re;\n\tvar z_im = p_im;\n\tvar iteration = 0;\n\tvar tmp_re, tmp_im;\n\n\tdo\n\t{\n\t\ttmp_re = z_re*z_re - z_im*z_im + c_re;\n\t\ttmp_im = 2*z_re*z_im + c_im;\n\t\tz_re = tmp_re;\n\t\tz_im = tmp_im;\n\t\titeration++;\t\t\n\t} while ((z_re*z_re+z_im*z_im) < 4 && iteration < levelNum);\n\n\treturn iteration;\n}", "function build_level_one(){\n var fudge = 0;\n for(x in mouse_path){\n\tif(fudge > 5){\n\tif(mouse_path[x].x == 0 && mouse_path[x].y == 0){\n\t}\n\telse if(((mouse_path[x-1].x < 0 && mouse_path[x].x >= 0)||(mouse_path[x-1].x > 0 && mouse_path[x].x <= 0)) && mouse_path[x].y > 0)\n\t {\n\t\tlevel_one[0] = level_one[0] + 1;\n\t}\n else if(((mouse_path[x-1].y < 0 && mouse_path[x].y >= 0)||(mouse_path[x-1].y > 0 && mouse_path[x].y <= 0)) && mouse_path[x].x > 0)\n\t {\n\t level_one[1] = level_one[1] + 1;\n\t}\n else if(((mouse_path[x-1].x < 0 && mouse_path[x].x >= 0)||(mouse_path[x-1].x > 0 && mouse_path[x].x <= 0)) && mouse_path[x].y < 0)\n\t {\n\t level_one[2] = level_one[2] + 1;\n\t}\n\telse if(((mouse_path[x-1].y < 0 && mouse_path[x].y >= 0)||(mouse_path[x-1].y > 0 && mouse_path[x].y <= 0)) && mouse_path[x].x < 0)\n\t {\n\t\tlevel_one[3] = level_one[3] + 1;\n\t}\n\t}\n\tfudge = fudge + 1;\n }\n //Call compare_level_one on the newly built level one array\n // console.log(compare_level_one(level_one));\n // console.log(level_one);\n}", "function treeClick(treeid) {\n\n var prent = document.getElementById(treeid).parentNode;\n var children = prent.getElementsByTagName('tr');\n var found = 0;\n var action = \"block\";\n var treeiddepth = 0;\n\n for (var n = 0; n < children.length; n++) {\n var element = children[n];\n if (found==1) {\n if ( treeiddepth < element.getAttribute(\"treedepth\") ) {\n element.style.display = action;\n\t var elid = element.getAttribute(\"id\");\n\t if (document.getElementById(\"i\"+elid) != null) {\n\t\t\t var subimg = document.getElementById(\"i\"+elid)\n\n\t\t\tif (action==\"none\" && subimg.src.search('minus') != -1) {\n\t\t subimg.src = subimg.src.replace('minus', 'plus');\n\t\t\t}\n\t if (action==\"block\" && subimg.src.search('plus') != -1) {\n\t\t subimg.src = subimg.src.replace('plus', 'minus');\n\t\t\t}\n\t\t\t}\n\t\t } else {\n\t\t return;\n\t\t }\n\t }\n\t if (element.getAttribute(\"id\")==treeid) {\n\t found = 1;\n\t treeiddepth = element.getAttribute(\"treedepth\")\n\t var img = document.getElementById(\"i\"+treeid);\n\t if (img.src.search('minus') != -1) {\n\t\t img.src = img.src.replace('minus', 'plus');\n\t action=\"none\";\n\t\t } else {\n\t\t img.src = img.src.replace('plus', 'minus');\n\t action=\"block\";\n\t\t }\n\t\t }\n\t }\n}", "function initTopTaxa() {\n taxaNameMap[1] = 'Animalia';\n taxaNameMap[2] = 'Chiroptera';\n taxaNameMap[3] = 'Plantae';\n taxaNameMap[4] = 'Arthropoda';\n batTaxaRefObj = {\n Animalia: {\n kingdom: \"Animalia\",\n parent: null,\n name: \"Animalia\",\n level: 1, // Kingdom (1), Phylum (2), Class (3), Order (4), Family (5), Genus (6), Species (7)\n tempId: curTempId++\n },\n Chiroptera: {\n kingdom: \"Animalia\",\n parent: 1, // 1 = animalia\n name: \"Chiroptera\",\n level: 4,\n tempId: curTempId++\n },\n };\n objTaxaRefObj = {\n Animalia: { //Repeated here because it will be collapsed in the merge process and animalia waas added as an ancestor antrhopoda very late in the writting of this code and restructuring didn't seen worth the effort and time.\n kingdom: \"Animalia\",\n parent: null,\n name: \"Animalia\",\n level: 1, // Kingdom (1), Phylum (2), Class (3), Order (4), Family (5), Genus (6), Species (7)\n tempId: 1\n },\n Plantae: {\n kingdom: \"Plantae\",\n parent: null,\n name: \"Plantae\",\n level: 1, // Kingdom (1), Phylum (2), Class (3), Order (4), Family (5), Genus (6), Species (7)\n tempId: curTempId++\n },\n Arthropoda: { // concat names of taxa, and all parent levels present, are used as keys to later link taxa.\n kingdom: \"Animalia\",\n parent: 1,\n name: \"Arthropoda\",\n level: 2,\n tempId: curTempId++\n },\n };\n }", "function makeTree(object) {\n console.clear();\n console.log(\n `your number was ${object.lines}, and the character was ${object.character}`\n );\n for (i = 0; i <= object.lines; i++) {\n let treeString = \"\";\n for (j = 0; j < object.lines - i; j++) {\n treeString += \" \";\n }\n for (k = 0; k < i * 2 - 1; k++) {\n treeString += `${object.character}`;\n }\n console.log(treeString);\n }\n}", "function wordOnPageTree(word){\n $('#instructions').html('Click the red letter to show it\\'s children in the tree structure')\n var firstArr = Object.keys(test)\n firstArr[firstArr.indexOf(word.charAt(0))] = `<span> ${word.charAt(0)}</span>`\n console.log(firstArr);\n $('#firstLetterP').html(firstArr.join(', '))\n\n var secArr = Object.keys(test[word.charAt(0)])\n secArr[secArr.indexOf(word.charAt(1))] = `<span> ${word.charAt(1)}</span>`\n $('#secLetterP').html(secArr.join(', '))\n\n var thirdArr = Object.keys(test[word.charAt(0)][word.charAt(1)])\n console.log(thirdArr);\n thirdArr[thirdArr.indexOf(word.charAt(2))] = `<span> ${word.charAt(2)}</span>`\n $('#thirdLetterP').html(thirdArr.join(', '))\n\n var fourArr = Object.keys(test[word.charAt(0)][word.charAt(1)][word.charAt(2)])\n fourArr[fourArr.indexOf(word.charAt(3))] = `<span> ${word.charAt(3)}</span>`\n $('#fourLetterP').html(fourArr.join(', '))\n\n var fifthArr = Object.keys(test[word.charAt(0)][word.charAt(1)][word.charAt(2)][word.charAt(3)])\n fifthArr[fifthArr.indexOf(word.charAt(4))] = `<span> ${word.charAt(4)}</span>`\n $('#fifthLetterP').html(fifthArr.join(', '))\n\n var sixArr = Object.keys(test[word.charAt(0)][word.charAt(1)][word.charAt(2)][word.charAt(3)][word.charAt(4)])\n sixArr[sixArr.indexOf(word.charAt(5))] = `<span> ${word.charAt(5)}</span>`\n $('#sixthLeterP').html(sixArr.join(', '))\n\n var sevenArr = Object.keys(test[word.charAt(0)][word.charAt(1)][word.charAt(2)][word.charAt(3)][word.charAt(4)][word.charAt(5)])\n sevenArr[sevenArr.indexOf(word.charAt(6))] = `<span> ${word.charAt(6)}</span>`\n $('#seventhLetterP').html(sevenArr.join(', '))\n // console.log(test[word.charAt(0)][word.charAt(1)][word.charAt(2)][word.charAt(3)][word.charAt(4)][word.charAt(5)][word.charAt(6)]);\n}", "function step2(map) {\n\tconst root = { name: '/', nodes: [] };\n\treturn (function next(map, parent, level) {\n\t\tObject.keys(map).forEach(key => {\n\t\t\tlet val = map[key];\n\t\t\tlet node = { name: key };\n\t\t\tif (typeof val === 'object') {\n\t\t\t\tnode.nodes = [];\n\t\t\t\tnode.open = level < 1;\n\t\t\t\tnext(val, node, level + 1);\n\t\t\t} else {\n\t\t\t\tnode.src = val;\n\t\t\t}\n\t\t\tparent.nodes.push(node);\n\t\t});\n\t\treturn parent;\n\t})(map, root, 0);\n}", "levels(root){\n if (root == null){\n return 0\n }else{\n return 1 + Math.max(this.levels(root.nodeL),this.levels(root.nodeL))\n }\n }", "function createLevel(){\r\n\r\n /*\r\n levelProperties holds properties for each level. syntax: [tiles],starting value of timer,music,min score, min similar for group,[bonus],[bonus2],[attention],[[probability, special tile id (7,8 aor 9)]]\r\n bonus: [[NUM,TILEID,POINTS]]\r\n bonus2: [[NUM,TILEID,POINTS]]\r\n attention: [[tileid,text]]\r\n REMEMBER: ONLY 3 GOALS IN TOTAL, ONLY 3 ATTENTIONS (OF WHICH ONLY ONE IS SHOWN ON PRELUDE SCREEN)\r\n */\r\n\r\n levelProperties = [\r\n\r\n // world 1\r\n [[0, 1, 2, 3], 200, 'lvl1', '2000', '4', [[5, 3, 100], [5, 0, 100]], [[5, 0, 50]], [[99, 'taking away blocks will cost you 10 points'],[99, 'each level has different goals'],[99, 'bonus goals are listed on the left']], [] ],\r\n [[0, 1, 2, 3], 180, 'lvl1', '3000', '4', [[6, 2, 100], [6, 3, 100]], [[5, 1, 50]], [[99, 'a combination of groups is called a combo'], [99, 'big combos can quickly increase your score'],[99, 'reach the target score to continue']], [] ],\r\n [[0, 1, 2, 3, 4], 200, 'lvl1', '1500', '4', [[7, 1, 100], [7, 2, 100]], [[5, 2, 50]], [[4, 'a new block colour is added'], [99, 'it will become harder to form groups']], [] ],\r\n [[0, 1, 2, 3, 4], 200, 'lvl1', '1500', '5', [[9, 4, 100], [9, 0, 100]], [[5, 3, 50]], [[99, 'this time, you need 5 blocks to form a group']], [] ],\r\n [[0, 1, 2, 3, 4], 150, 'lvl1', '2000', '5', [[10, 0, 200], [10, 1, 200]], [[5, 4, 50]], [[99, 'you have almost made it to world 2!'], [99, 'you will always restart in the last world']],[] ],\r\n\r\n // world 2\r\n [[0, 1, 2, 3, 4], 200, 'lvl2', '1500', '4', [[11, 4, 100], [11, 0, 100]], [[6, 1, 100]], [[99, 'some tiles can provide extra points']], [[25, 9]] ],\r\n [[0, 1, 2, 3], 100, 'lvl2', '1500', '5', [[12, 0, 100], [12, 1, 100]], [[6, 2, 100]], [[99, 'move quick!']], [[25, 9]] ],\r\n [[0, 1, 2, 3, 4], 150, 'lvl2', '2000', '4', [[13, 3, 100], [13, 4, 100]], [[6, 2, 100]], [[7, 'rainbow tiles can substitute any colour']], [[50, 9], [25, 7]] ],\r\n [[0, 1, 2, 3, 4, 5], 150, 'lvl2', '1000', '4', [[14, 5, 100], [14, 4, 100]], [[6, 4, 100]], [[5, 'a new block colour is added']], [[100, 9], [25, 7]] ],\r\n [[0, 1, 2, 3, 4, 5], 100, 'lvl2', '1000', '5', [[15, 1, 200], [15, 0, 200]], [[6, 5, 100]], [[99, 'its the end of the world! (2, that is)']], [[50, 9], [50, 7]] ],\r\n\r\n // world 3\r\n [[0, 1, 2, 3, 4, 5], 250, 'lvl3', '2000', '5', [[16, 5, 100], [16, 4, 100]], [[7, 0, 150]], [[8, 'a brick block can not be destroyed'],[8, '..or perhaps they can?']],[[35, 9], [50, 7], [10, 8]] ],\r\n [[0, 1, 2, 3, 4, 5], 200, 'lvl3', '2500', '5', [[17, 2, 100], [17, 3, 100]], [[7, 2, 150]], [[8, 'do you remember boulderdash?']],[[5, 8]] ],\r\n [[0, 1, 2, 3, 4], 150, 'lvl3', '1500', '4', [[18, 0, 100], [18, 4, 100]], [[7, 4, 150]], [[99, 'move quick!']], [[35, 9], [50, 7]] ],\r\n [[0, 1, 2, 3, 4, 5, 6], 250, 'lvl3', '1250', '4', [[19, 6, 100], [19, 5, 100]], [[7, 4, 150]], [[6, 'a new block colour is added']],[[35, 7], [25, 8]] ],\r\n [[0, 1, 2, 3, 4, 5, 6], 150, 'lvl3', '1500', '5', [[20, 2, 200], [20, 4, 200]], [[7, 6, 150]], [[6, 'much group, much colour, much brick']],[[25, 9], [25, 7], [10, 8]] ],\r\n\r\n // world 4\r\n [[0, 1, 2, 3, 4, 5, 6], 180, 'lvl4', '2000', '5', [[21, 2, 100], [21, 1, 100]], [[8, 1, 200]], [[99, 'easy money']], [[5, 9]] ],\r\n [[4, 5, 6], 250, 'lvl4', '5000', '5', [[22, 4, 100], [22, 5, 100]], [[8, 6, 200]], [[99, 'tricolore']], [[25, 8]] ],\r\n [[0, 1, 2, 3, 4, 5, 6], 180, 'lvl4', '2750', '5', [[23, 4, 100], [23, 6, 100]], [[8, 5, 200]], [[99, 'somewhere, over the rainbow']], [[5, 7]] ],\r\n [[0, 1, 2, 3, 4, 5, 6], 150, 'lvl4', '3000', '5', [[24, 0, 100], [24, 2, 100]], [[8, 6, 200]], [[99, 'you know, writing these hints is kinda hard'],[99, 'but Im doing it all for you']], [[25, 9], [50, 7], [25, 8]] ],\r\n [[0, 1, 2, 3, 4, 5], 150, 'lvl4', '4000', '5', [[25, 1, 200], [25, 3, 200]], [[8, 4, 200]], [[99, 'this will take some time']], [[25, 9], [50, 7]] ],\r\n\r\n // world 5\r\n [[0, 1, 2, 3, 4, 5, 6], 200, 'lvl5', '4000', '5', [[25, 1, 200], [25, 2, 200]], [[9, 3, 250]], [[99, 'lets build a castle']],[[5, 8]] ],\r\n [[0, 1, 2, 3, 4, 5, 6], 180, 'lvl5', '3500', '5', [[25, 3, 200], [25, 4, 200]], [[9, 2, 250]], [[99, 'this may look easy..']],[[25, 9], [50, 7], [25, 8]] ],\r\n [[0, 1, 2, 3, 4, 5, 6], 150, 'lvl5', '3500', '5', [[25, 5, 200], [25, 6, 200]], [[9, 4, 250]], [[99, 'almost there!']], [[25, 9], [25, 7], [25, 8]] ],\r\n [[0, 1, 2, 3, 4, 5], 250, 'lvl5', '2500', '6', [[25, 0, 200], [25, 1, 200]], [[9, 5, 250]], [[99, '6 is the magic number']],[[25, 9], [25, 7], [25, 8]] ],\r\n [[0, 1, 2, 3, 4, 5, 6], 200, 'lvl5', '3000', '6', [[25, 2, 200], [25, 3, 200]], [[9, 6, 250]], [[99, 'no more hints. you know what to do.']],[[15, 9], [15, 7], [15, 8]] ]\r\n\r\n ];\r\n\r\n mainContainer.removeAllChildren();\r\n\r\n // the game itself has its own container\r\n gameContainer = new createjs.Container();\r\n gameContainer.x = 20;\r\n gameContainer.y = 88;\r\n mainContainer.addChild(gameContainer);\r\n\r\n title_bg = new createjs.Shape();\r\n title_bg.graphics.beginFill('#000').drawRect(0, 0, 640, 75).endFill();\r\n mainContainer.addChild(title_bg);\r\n title1 = preload.getResult(\"titlesmall01\");\r\n title1 = new createjs.Bitmap(title1);\r\n title1.x = 185;\r\n title1.y = 7;\r\n title1.glow = 4;\r\n mainContainer.addChild(title1);\r\n title2 = preload.getResult(\"titlesmall02\");\r\n title2 = new createjs.Bitmap(title2);\r\n title2.x = 185;\r\n title2.y = 7;\r\n mainContainer.addChild(title2);\r\n\r\n bonusContainerList = []; // contains text instances that are used to show the countdown for level goals\r\n\r\n // score indicator\r\n countdowntitle = new createjs.Text(\"SCORE\", \"bold 30px Inconsolata\", \"#aaa\");\r\n countdowntitle.x = 542;\r\n countdowntitle.y = 5;\r\n mainContainer.addChild(countdowntitle);\r\n countdown = new createjs.Text(levelProperties[currentLevel - 1][1], \"bold 45px Inconsolata\", \"#fff\");\r\n countdown.x = 620;\r\n countdown.y = 33;\r\n countdown.textAlign = \"right\";\r\n mainContainer.addChild(countdown);\r\n newcountdown = countdown.text;\r\n\r\n // level indicator\r\n lvltexttitle = new createjs.Text(\"LEVEL\", \"bold 30px Inconsolata\", \"#aaa\");\r\n lvltexttitle.x = 20;\r\n lvltexttitle.y = 5;\r\n mainContainer.addChild(lvltexttitle);\r\n currentWorld = parseInt((currentLevel - 1) / 5);\r\n lvltext = new createjs.Text((currentWorld + 1)+\"-\"+(currentLevel - (currentWorld * 5)), \"bold 45px Inconsolata\", \"#fff\");\r\n lvltext.x = 20;\r\n lvltext.y = 32;\r\n mainContainer.addChild(lvltext);\r\n\r\n // goals indicator (in-game)\r\n goals_bg = new createjs.Shape();\r\n goals_bg.graphics.beginFill('#000').drawRect(0, 708, 640, 92).endFill();\r\n mainContainer.addChild(goals_bg);\r\n\r\n bonusContainer = new createjs.Container();\r\n bonusContainer.x = 0;\r\n bonusContainer.y = 708;\r\n mainContainer.addChild(bonusContainer);\r\n\r\n // bonus 1 (in-game)\r\n for(bg = 0; bg < levelProperties[currentLevel - 1][5].length; bg ++){\r\n bonuscount = new createjs.Text(levelProperties[currentLevel - 1][5][bg][0], \"12px Arial\", \"#fff\");\r\n bonuscount.x = 20;\r\n bonuscount.y = 10 + (bg * 25);\r\n bonuscount.tileid = levelProperties[currentLevel - 1][5][bg][1];\r\n bonusContainer.addChild(bonuscount);\r\n bonusContainerList.push(bonuscount);\r\n bonustext = new createjs.Text(\"GROUPS OF\", \"12px Arial\", \"#fff\");\r\n bonustext.x = 40;\r\n bonustext.y = 10 + (bg * 25);\r\n bonusContainer.addChild(bonustext);\r\n bonus_sprite = new createjs.Sprite(ss_tiles, \"tile\" + levelProperties[currentLevel - 1][5][bg][1]);\r\n bonus_sprite.x = 120;\r\n bonus_sprite.y = 7 + (bg * 25);\r\n bonus_sprite.scaleX = bonus_sprite.scaleY = 0.2;\r\n bonusContainer.addChild(bonus_sprite);\r\n bonustext = new createjs.Text(\" BLOCKS = \"+levelProperties[currentLevel - 1][5][bg][2] + \" POINTS\", \"12px Arial\", \"#fff\");\r\n bonustext.x = 140;\r\n bonustext.y = 10 + (bg * 25);\r\n bonusContainer.addChild(bonustext);\r\n }\r\n // bonus 2 (in-game)\r\n for(bg = 0; bg < levelProperties[currentLevel - 1][6].length; bg ++){\r\n bonustext = new createjs.Text(\"A GROUP OF \", \"12px Arial\", \"#fff\");\r\n bonustext.x = 20;\r\n bonustext.y = 10 + (levelProperties[currentLevel - 1][5].length * 25) + (bg * 25);\r\n bonusContainer.addChild(bonustext);\r\n bonuscount = new createjs.Text(levelProperties[currentLevel - 1][6][bg][0], \"12px Arial\", \"#fff\");\r\n bonuscount.x = 100;\r\n bonuscount.y = 10 + (levelProperties[currentLevel - 1][5].length * 25) + (bg * 25);\r\n bonusContainer.addChild(bonuscount);\r\n bonus_sprite = new createjs.Sprite(ss_tiles, \"tile\" + levelProperties[currentLevel - 1][6][bg][1]);\r\n bonus_sprite.x = 120;\r\n bonus_sprite.y = 7 + (levelProperties[currentLevel - 1][5].length * 25) + (bg * 25);\r\n bonus_sprite.scaleX = bonus_sprite.scaleY = 0.2;\r\n bonusContainer.addChild(bonus_sprite);\r\n bonustext = new createjs.Text(\"BLOCKS = \"+levelProperties[currentLevel - 1][6][bg][2] + \" POINTS\", \"12px Arial\", \"#fff\");\r\n bonustext.x = 145;\r\n bonustext.y = 10 + (levelProperties[currentLevel - 1][5].length * 25) + (bg * 25);\r\n bonusContainer.addChild(bonustext);\r\n }\r\n // attention (in-game)\r\n for(bg = 0; bg < levelProperties[currentLevel - 1][7].length; bg ++){\r\n bonus_sprite = new createjs.Sprite(ss_tiles, \"tile\" + levelProperties[currentLevel - 1][7][bg][0]);\r\n bonus_sprite.x = 295;\r\n bonus_sprite.y = 3 + (bg * 25);\r\n bonus_sprite.scaleX = bonus_sprite.scaleY = 0.25;\r\n bonusContainer.addChild(bonus_sprite);\r\n bonustext = new createjs.Text(levelProperties[currentLevel - 1][7][bg][1].toUpperCase(), \"12px Arial\", \"#fff\");\r\n bonustext.x = 320;\r\n bonustext.y = 10 + (bg * 25);\r\n bonusContainer.addChild(bonustext);\r\n }\r\n\r\n // set some vars that are used for each level\r\n clickplayed = false;\r\n gamestarted = false; // temporarily disable the game to prevent timer routine kicking in\r\n checkingAdjacents = false;\r\n checkingMovements = false;\r\n scoregfxList = [];\r\n combocounter= 0;\r\n shardList = [];\r\n smokeList = [];\r\n layoverList = [];\r\n vcList= [];\r\n shakecount = 0;\r\n gameContainer.x = 20;\r\n levelupplayed = false;\r\n blockplaying = false;\r\n cleanup = false; // indicator for checking if any cleaning up is going on\r\n busy = true;\r\n gameContainer.y = 88;\r\n\r\n // building prelude screen\r\n prelude_sinstart = 0;\r\n\r\n getready = createjs.Sound.play('getready');\r\n getready.addEventListener(\"complete\", function test(){\r\n createjs.Sound.play('preludeloop', {loop: -1});\r\n });\r\n\r\n preludeContainer = new createjs.Container();\r\n preludeContainer.x = 0;\r\n preludeContainer.y = 88;\r\n mainContainer.addChild(preludeContainer);\r\n prelude_bg = new createjs.Shape();\r\n prelude_bg.graphics.beginFill('#000').drawRect(0, 0, 640, 720).endFill();\r\n preludeContainer.addChild(prelude_bg);\r\n\r\n currentWorld = parseInt((currentLevel - 1) / 5);\r\n levelindicator = new createjs.Text(\"LEVEL \" + (currentWorld + 1)+\" - \" + (currentLevel - (currentWorld * 5)), \"24px Oswald\", \"#fff\");\r\n levelindicator.x = 320;\r\n levelindicator.y = 50;\r\n levelindicator.lineHeight = 40;\r\n levelindicator.textAlign = \"center\";\r\n preludeContainer.addChild(levelindicator);\r\n\r\n goals_title = new createjs.Text(\"GOALS\", \"24px Oswald\", \"#aaa\");\r\n goals_title.x = 320;\r\n goals_title.y = 120;\r\n goals_title.lineHeight = 40;\r\n goals_title.textAlign = \"center\";\r\n preludeContainer.addChild(goals_title);\r\n\r\n goals_temp = \"\";\r\n goals_temp += \"- You will need a score of at least \" + levelProperties[currentLevel - 1][3] + \" points to advance\\n\";\r\n goals_temp += \"- Each group needs to consist of at least \" + levelProperties[currentLevel - 1][4] + \" similar blocks\\n\";\r\n goals = new createjs.Text(goals_temp, \"24px Oswald\", \"#aaa\");\r\n goals.x = 50;\r\n goals.y = 170;\r\n goals.lineHeight = 40;\r\n goals.textAlign = \"left\";\r\n preludeContainer.addChild(goals);\r\n\r\n bonus_title = new createjs.Text(\"BONUS\", \"24px Oswald\", \"#aaa\");\r\n bonus_title.x = 320;\r\n bonus_title.y = 275;\r\n bonus_title.lineHeight = 40;\r\n bonus_title.textAlign = \"center\";\r\n preludeContainer.addChild(bonus_title);\r\n\r\n // bonus 1 (prelude)\r\n bonus_temp = \"\";\r\n for(bg = 0; bg < levelProperties[currentLevel - 1][5].length; bg ++){\r\n bonus_temp += \"- Create \" + levelProperties[currentLevel - 1][5][bg][0] + \" groups of for an extra \" + levelProperties[currentLevel - 1][5][bg][2] + \" points\\n\";\r\n prelude_sprite = new createjs.Sprite(ss_tiles, \"tile\" + levelProperties[currentLevel - 1][5][bg][1]);\r\n prelude_sprite.x = 260;\r\n prelude_sprite.y = 322 + (bg * 40);\r\n prelude_sprite.scaleX = prelude_sprite.scaleY = 0.3;\r\n preludeContainer.addChild(prelude_sprite);\r\n preludeContainerList.push(prelude_sprite);\r\n }\r\n bonus = new createjs.Text(bonus_temp, \"24px Oswald\", \"#aaa\");\r\n bonus.x = 50;\r\n bonus.y = 325;\r\n bonus.lineHeight = 40;\r\n bonus.textAlign = \"left\";\r\n preludeContainer.addChild(bonus);\r\n // bonus 2\r\n bonus_temp = \"\";\r\n for(bg = 0; bg < levelProperties[currentLevel - 1][6].length; bg ++){\r\n bonus_temp += \"- Create a group of \" + levelProperties[currentLevel - 1][6][bg][0] + \" blocks for \" + levelProperties[currentLevel - 1][6][bg][2] + \" points\\n\";\r\n prelude_sprite = new createjs.Sprite(ss_tiles, \"tile\" + levelProperties[currentLevel - 1][6][bg][1]);\r\n prelude_sprite.x = 260;\r\n prelude_sprite.y = 320 + (levelProperties[currentLevel - 1][5].length * 40) + (bg * 40);\r\n prelude_sprite.scaleX = prelude_sprite.scaleY = 0.3;\r\n preludeContainer.addChild(prelude_sprite);\r\n preludeContainerList.push(prelude_sprite);\r\n }\r\n // combocounter\r\n bonus_temp += \"- Create a combo bigger than \" + biggestCombo + \"\\n\";\r\n bonus = new createjs.Text(bonus_temp, \"24px Oswald\", \"#aaa\");\r\n bonus.x = 50;\r\n bonus.y = 322 + (levelProperties[currentLevel - 1][5].length * 40) + (levelProperties[currentLevel - 1][6].length * 40) - 40;\r\n bonus.lineHeight = 40;\r\n bonus.textAlign = \"left\";\r\n preludeContainer.addChild(bonus);\r\n\r\n // attention (on prelude screen, only first one is shown!)\r\n att_temp = \"\";\r\n for(bg = 0; bg < 1; bg ++){\r\n prelude_sprite = new createjs.Sprite(ss_tiles, \"tile\" + levelProperties[currentLevel - 1][7][bg][0]);\r\n prelude_sprite.x = 50;\r\n prelude_sprite.y = 297 + (levelProperties[currentLevel - 1][5].length * 40) + (levelProperties[currentLevel - 1][6].length * 40) + 75;\r\n prelude_sprite.scaleX = prelude_sprite.scaleY = 0.3;\r\n preludeContainer.addChild(prelude_sprite);\r\n preludeContainerList.push(prelude_sprite);\r\n attention = new createjs.Text(levelProperties[currentLevel - 1][7][bg][1], \"24px Oswald\", \"#aaa\");\r\n attention.x = 85;\r\n attention.y = 300 + (levelProperties[currentLevel - 1][5].length * 40) + (levelProperties[currentLevel - 1][6].length * 40) + 75;\r\n attention.lineHeight = 40;\r\n attention.textAlign = \"left\";\r\n preludeContainer.addChild(attention);\r\n }\r\n\r\n btn_lvlstart_bg = new createjs.Shape();\r\n btn_lvlstart_bg.graphics.beginFill('#fff').drawRect(240, 539, 140, 60).endFill();\r\n btn_lvlstart_bg.shadow = new createjs.Shadow(\"#aaa\", 0, 0, 0);\r\n preludeContainer.addChild(btn_lvlstart_bg);\r\n btn_lvlstart = new createjs.Text('START', \"24px Oswald\", \"#000\");\r\n btn_lvlstart.lineheight = 24;\r\n btn_lvlstart.x = 280;\r\n btn_lvlstart.y = 557;\r\n preludeContainer.addChild(btn_lvlstart);\r\n btn_lvlstart_bg.addEventListener(\"click\", function() {\r\n\r\n // the actual buildup of the level happens after the click on the start btn\r\n\r\n levelArray = [[],[],[],[],[],[],[],[]]; // will contain all tiles of the level\r\n gameContainer.removeAllChildren(); // clean up game container\r\n\r\n // break levelcount (ie 18) up into world-level (ie 3-2)\r\n currentWorld = parseInt((currentLevel - 1) / 5);\r\n lvltext.text = (currentWorld + 1) + \"-\" + (currentLevel - (currentWorld * 5));\r\n countdown.text = newcountdown = levelProperties[currentLevel - 1][1];\r\n\r\n // build up the level array\r\n for(r = 0; r < 8; r ++) {\r\n for(c = 0; c < 8; c ++) {\r\n createTile(r, c, true, false); // row, column, unique (not more than 2 adjacents), specialtilesallowed (ie rainbow tile)\r\n levelArray[r].push(sprite);\r\n }\r\n }\r\n\r\n redraw(); // reads levelarray and prints the tiles\r\n\r\n introstarted = false; // no longer showing intro\r\n gamestarted = true; // things are starting at this point\r\n busy = true; // so the buildup starts\r\n createjs.Sound.stop(); // prelude loop stops\r\n if(!musicoff){\r\n createjs.Sound.play(levelProperties[currentLevel - 1][2], {loop: -1}); // music for this level starts, if enabled\r\n }\r\n preludeContainer.removeAllChildren(); // prelude container is cleared\r\n mainContainer.removeChild(preludeContainer); // and removed from stage\r\n\r\n });\r\n\r\n}", "function levelWidth(root) {\n\t// array to loop over tree\n\tconst arr = [root, 's'];\n\t//counter to check for widths\n\tconst counter = [0];\n\n\t// Check if there are atleast 2 elements to avoid infinite loop\n\twhile(arr.length > 1) {\n\t\t//POP OUT THE FIRST ELEMENT\n\t\tconst node = arr.shift();\n\n\t\t//check if 's' is the last character - if YES it means we have traversed the whole breadth with BF traversal\n\t\t// So we 1. push all the children to the array 2. Initialize next counter with value 0 which signifies next width value\n\t\tif(node === 's') {\n\t\t\tcounters.push(0);\n\t\t\tarr.push('s');\n\t\t} else {\n\t\t\t// Increase counter and push all children until we get an 's'\n\t\t\tarr.push(...node.children);\n\t\t\tcounters[counters.length -1] + 1;\n\t\t}\n\t}\n\n\treturn counters;\n\n}", "function mapByteToBits(node, table, cur='') {\n\tif(!node) {\n\t\tconsole.log('BLOODY MURDER');\n\t}\n\tif(node.value !== null) {\n\t\t//leaf node, record in table\n\t\t//if cur is '', then someone made a huffman table of data\n\t\t//with one unique byte\n\t\t//just return 0 to that dummy\n\t\tif(cur !== '') {\n\t\t\ttable[node.value] = cur;\n\t\t} else {\n\t\t\ttable[node.value] = '0';\n\t\t}\n\t} else {\n\t\t//not a leaf, recurse on children\n\t\tmapByteToBits(node.left, table, cur + '0');\n\t\tmapByteToBits(node.right, table, cur + '1');\n\t}\n}", "function levelWidth(root) {\n\tvar answer = [0];\n\tvar tree = [root, 'eor'];\n\n\twhile (tree.length > 1) {\n\t\tvar node = tree.shift();\n\t\tif (node === 'eor') {\n\t\t\tanswer.push(0);\n\t\t\ttree.push('eor');\n\t\t} else {\n\t\t\ttree.push(...node.children);\n\t\t\tanswer[answer.length - 1]++;\n\t\t}\n\t}\n\n\treturn answer;\n}", "function wartosc_tabela_konc(wiersz, kolumna, nr_bierki)\n{\n let czy_biale = nr_bierki < 7;\n let nr = nr_bierki - (czy_biale ? 1 : 7);\n let poz_w_tablicy = kolumna + 8 * (!czy_biale ? wiersz: 7 - wiersz);\n\n return tabele_konc[nr][poz_w_tablicy] * (czy_biale ? 1 : -1);\n}", "sublevelPosition(){\r\n this.sublevel=0\r\n this.illuminateSequence()\r\n this.detectClick()\r\n }", "function TOC_writeTOC2Subtree(node, selectedItem, depth) {\n\tvar title = cropString(node.title,28 - depth * 3);\n\n\tvar resource = node.getResource();\n\tvar refItem = node;\n while (resource == null && refItem.getChildCount() != null) {\n\t refItem = refItem.getChildAt(0);\n\t\tresource = refItem.getResource();\n\t}\n\tvar lessonStatus = (resource == null) ? \"\" : resource.cmi_core_lesson_status;\n\tif (node == selectedItem) lessonStatus = \"current\";\n var iconStatus = lessonStatus;\n\tvar cssClass = getCSSClass(lessonStatus);\n\tdocument.write('<p class=\"toc2'+cssClass+'\">');\n\tif (depth > 0) {\n\t\tdocument.write('<img src=\"images/spacer.gif\" width=\"'+(12*depth)+'\" height=\"9\" border=\"0\">');\n\t}\n\t\n\t\n\tif (node.getChildCount() == 0) {\n \t\tif (resource != null) document.write('<a class=\"toc2'+cssClass+'\" href=\"#\" onclick=\"stub.getAPI().gotoItemWithID(\\''+refItem.identifier+'\\')\">');\n\t\twriteIcon(iconStatus);\n\t\tdocument.write(title); \n\t\tif (resource != null) document.write('</a>'); \n\t\tdocument.writeln('</p>');\n\t} else {\n\t if (node.isNodeDescendant(selectedItem)) {\n\t\t\tdocument.write('<img src=\"images/symbols/sym_toc_disabled.gif\" width=\"12\" height=\"9\" border=\"0\">');\n \t\t\tif (resource != null) document.write('<a class=\"toc2'+cssClass+'\" href=\"#\" onclick=\"stub.getAPI().gotoItemWithID(\\''+refItem.identifier+'\\')\">');\n\t\t\tdocument.write(title); \n\t\t\tif (resource != null) document.write('</a>'); \n\t\t\tdocument.writeln('</p>');\n\t\t\tfor (var i=0; i < node.getChildCount(); i++) {\n\t\t\t\tthis.writeTOC2Subtree(node.getChildAt(i), selectedItem, depth + 1);\n\t\t\t}\n\t } else if (node.isExpanded) {\n\t\t\tdocument.write('<a class=\"toc1'+cssClass+'\" href=\"#\" onclick=\"setExpanded(\\''+node.identifier+'\\',false)\">');\n\t\t\tdocument.write('<img src=\"images/symbols/sym_toc_expanded.gif\" width=\"12\" height=\"9\" border=\"0\">');\n\t\t\tdocument.write('</a>');\n \t\t\tif (resource != null) document.write('<a class=\"toc2'+cssClass+'\" href=\"#\" onclick=\"stub.getAPI().gotoItemWithID(\\''+refItem.identifier+'\\')\">');\n\t\t\tdocument.write(title); \n\t\t\tif (resource != null) document.write('</a>'); \n\t\t\tdocument.writeln('</p>');\n\t\t\tfor (var i=0; i < node.getChildCount(); i++) {\n\t\t\t\tthis.writeTOC2Subtree(node.getChildAt(i), selectedItem, depth + 1);\n\t\t\t}\n\t\t} else {\n\t\t\tdocument.write('<a class=\"toc1'+cssClass+'\" href=\"#\" onclick=\"setExpanded(\\''+node.identifier+'\\',true)\">');\n\t\t\tdocument.write('<img src=\"images/symbols/sym_toc_collapsed.gif\" width=\"12\" height=\"9\" border=\"0\">');\n\t\t\tdocument.write('</a>');\n \t\t\tif (resource != null) document.write('<a class=\"toc2'+cssClass+'\" href=\"#\" onclick=\"stub.getAPI().gotoItemWithID(\\''+refItem.identifier+'\\')\">');\n\t\t\tdocument.write(title); \n\t\t\tif (resource != null) document.write('</a>'); \n\t\t\tdocument.writeln('</p>');\n\t\t}\n\t}\n}", "function Uf(a){var b;x&&(b=workarea.je());var c=M(\"xml\");a=Fa(a,!0);for(var d=0,e;e=a[d];d++){var g=Vf(e);e=e.O();g.setAttribute(\"x\",x?b-e.x:e.x);g.setAttribute(\"y\",e.y);c.appendChild(g)}c.setAttribute(\"level\",R);return c}", "function getLevel(id) {\n\t\tvar level = 0;\n\t\twhile ($(\".select2-results__options li[parent][val='\" + id + \"']\").length > 0) {\n\t\t\tid = $(\".select2-results__options li[val='\" + id + \"']\").attr(\"parent\");\n\t\t\tlevel++;\n\t\t}\n\t\treturn level;\n\t}", "populate_subtree(mod, level) {\n mod.__level = level;\n _.each(mod, (sub_mod, name) => {\n if (name[0] !== '_') {\n this.populate_subtree(sub_mod, level);\n }\n });\n }", "function stringer(obj,num,id,idq,leaf,len,sx,sy,sz,ss,divs)\n\t\t{\t\t\n\t\t\t\n\t\t\t//if it's the first item, make a new array for it and push it onto the array of branches\n\t\t\tif(id==0){\n\t\t\t\tobj.branch = [];\n\t\t\t\tobj.branch.name = leaf;\n\t\t\t\tobj.branch.push(obj.children[0]);\n\t\t\t\tthat.branches.push(obj.branch);\n\t\t\t}\n\t\t\t\n\n\t\t\tnum--;\n\t\n\t\t\t//makes a boolean to check if we're at the end, why end isn't 0 I don't know\n\t\t\tif(num==1)\n\t\t\t\tvar end = true;\n\t\t\telse\n\t\t\t\tvar end = false;\n\t\t\t\n\t\t\tif( num > 0 ){\n\t\t\t\n\t\t\t\tid++;\n\t\t\t\t\n\t\t\t\tthis.big = that.part(0,.5,0,\tsx,sy,sz,\t0,sy,0, \"big\"+id, that.color1);\n\n\t\t\t\t//add items to the last array in the branches array\n\t\t\t\tthat.branches[that.branches.length-1].push(this.big);\n\t\t\t\t\n\t\t\t\tthis.big.idq = idq;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tobj.children[0].add(stringer(this.big,num,id,num,leaf,len,sx*ss,sy*ss,sz*ss,ss,divs));\n\t\t\t\tobj.children[0].num=num;\n\t\t\t\t\n\t\t\t\tfor ( var i = 0 ; i < term.length ; i++){\n\t\t\t\t\tif(end && leaf == leaves-term[i]){\n\t\t\t\t\t\tif (fruit)\n\t\t\t\t\t\t\tmakeFruit();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmakeSplit(1,2,2);\n\t\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\tif(end && leaf == leaves-term[2]){\n\t\t\t\t\tif (fruit)\n\t\t\t\t\t\tmakeFruit();\n\t\t\t\t\telse\n\t\t\t\t\t\tmakeSplit(1,2,2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(end && leaf == leaves-term[3]){\n\t\t\t\t\tif (fruit)\n\t\t\t\t\t\tmakeFruit();\n\t\t\t\t\telse\n\t\t\t\t\t\tmakeSplit(1,2,2);\n\t\t\t\t}\n*/\n\t\t\t\tif( num % divs == 0 && leaf < leaves){\n\t\t\t\t\n\t\t\t\t\tvar leafSS = leafss[leaf] || 1;\n\t\t\t\t\tvar angle = angles[leaf] || Math.PI/5;\n\t\t\t\t\t\n\t\t\t\t\tmakeSplit(2,1,1,leafSS,angle);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(num==1){\n\t\t\t\t//\tmakeSplit(0);\n\t\t\t\t}\n\n\t\t\t\t//console.log(leaf);\n\t\t\t\tfunction makeSplit(child,numDiv,lenDiv,newSS,angle){\n\t\t\t\t\n\t\t\t\tfor (var i = 0 ; i < rads ; i ++){\n\t\t\t\t\n\t\t\t\t\t\tvar joint = new THREE.Object3D();\n\t\t\t\t\t\tjoint.matrixAutoUpdate = true;\t\n\t\t\t\t\t\tjoint.updateMatrix();\t\t\t\t\t\t\n\t\t\t\t\t\tjoint.name = \"joint\";\n\t\t\t\t\t\tobj.children[0].add(joint);\n\t\t\t\t\t\t//console.log(obj.children[i+child]);\n\t\t\t\t\t\tobj.children[0].children[i+child].rotation.y = i*((Math.PI*2)/rads);\n\t\t\t\t\t\tobj.children[0].children[i+child].add(stringer(this.big,\tMath.floor(len/numDiv),0,\tnum,leaf+1,Math.floor(len/lenDiv), \tsx,sy,sz,newSS,\tdivs));\n\t\t\t\t\t\tobj.children[0].children[i+child].children[0].rotation.x = angle;\n\t\t\t\t\t\tobj.children[0].children[i+child].children[0].position.y = sy;\n\t\t\t\t\t\tvar szr = new THREE.Vector3(sx,sy,sz);\n\t\t\t\t\t\tobj.children[0].children[i+child].children[0].children[0].children[0].scale = szr;\n\t\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\tfunction makeFruit(child,numDiv,lenDiv){\n\t\t\t\t\n\t\t\t\tfor (var i = 0 ; i < rads ; i ++){\n\t\t\t\t\t\tvar mesh = new THREE.Mesh(geo,mat);\n\t\t\t\t\t\tmesh.position = obj.children[0].position;\n\t\t\t\t\t\tmesh.matrixAutoUpdate = true;\t\n\t\t\t\t\t\tmesh.updateMatrix();\t\n\t\t\t\t\t\tvar scalar = fruitScale;\n\t\t\t\t\t\tmesh.scale = scalar;\n\t\t\t\t\t\tobj.children[0].add(mesh);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn obj;\n\t\t\t}\n\t\t}", "function getLevel(id) {\n\t\tvar level = 0;\n\t\twhile($(\".select2-results__options li[parent][val='\" + id + \"']\").length > 0) {\n\t\t\tid = $(\".select2-results__options li[val='\" + id + \"']\").attr(\"parent\");\n\t\t\tlevel++;\n\t\t}\n\t\treturn level;\n\t}", "function SaveLevel(theLevel) {\n var levelString = \"\";\n for(var x = 0; x < theLevel.length; x++) {\n for(var y = 0; y < theLevel[0].length; y++) {\n if(theLevel[x][y] == true) {\n levelString += \"1\";\n } else { \n levelString += \"0\";\n }\n }\n }\n \n return levelString;\n}", "function wartosc_tabela(wiersz, kolumna, nr_bierki)\n{\n let czy_biale = nr_bierki < 7;\n let nr = nr_bierki - (czy_biale ? 1 : 7);\n let poz_w_tablicy = kolumna + 8 * (!czy_biale ? wiersz: 7 - wiersz);\n\n return tabele[nr][poz_w_tablicy] * (czy_biale ? 1 : -1);\n}", "function t$1(o,e){if(o.priority-e.priority)return o.priority-e.priority;const t=o.tile.key,i=e.tile.key;return t.world-i.world?t.world-i.world:t.level-i.level?t.level-i.level:t.row-i.row?t.row-i.row:t.col-i.col?t.col-i.col:o.xTile-e.xTile?o.xTile-e.xTile:o.yTile-e.yTile}", "function compare_level_one(key){\n \n var com_array = getLevelOne(key);\n\n for(var i = 0; i < 4; i++){\n\tif(level_one[i] != com_array[i]){\n\t \n\t return false;\n\t} \n }\n return true;\n}", "function subirNivel() {\n\tniv++;\n\tatrapados = 0;\n\tcant = 2 + niv;\n\tpy++;\n}", "function passaDeLevel(){\n\tif(jogoEmAndamento==true){\n\t\tjogador.setLevel(jogador.getLevel()+1);\n\t\tjogador.setPontuacao(jogador.getPontuacao()+(1000*jogador.getLevel()));\n\t\tjogador.setVelocidadeMax(jogador.getVelocidadeMax()*1.1);\n\t}\n}", "function enrich(tree,level){\r\n\tconsole.log(\"*start enrich...\");\r\n\tif (!level) level=0;\r\n\ttree.level=level;\r\n\t\r\n\tif (!tree.children) return level ;\r\n\telse level++;\r\n\tfor (var c in tree.children){\r\n\t\tenrich(tree.children[c],level);\r\n\t}\r\n\t\r\n\t// at this point we just have \"text reference\" to parent, not yet an object ....\r\n\tvar _parent = searchBy(orgTree,\"name\",tree.parent);\r\n\t\r\n\tif (_parent){\r\n\t\ttree.averageDeviation= tree.overallReports-_parent.averageSubordinates;\r\n\t\tconsole.log(\"----setting deviation: \"+tree.averageDeviation);\r\n\t}\r\n\t//return level;\r\n}", "function changeLevel () {\n this.scene.start('Transi', {choix: this.choix, or: this.or, argent: this.argent, bronze: this.bronze, niveau: this.niveau, vie: this.vie, score: this.score});\n }", "parseLevelFromData() {\n //print string for level inspection\n let str = \"\"\n\n //step counter\n let i = 0\n\n //byte position calculated from step counter\n let byteAddress = 0\n\n //init level position field\n this.field = []\n\n //counts the index in the individual field positions\n let fieldIndex = -1\n\n //string used to mark unused/empty fields\n const placeholder = \"___\"\n\n //read whole file\n while (byteAddress < this.data.length) {\n //for print, insert break every line\n if (i % 14 === 0) {\n str += \"\\n\"\n }\n\n //insert another break when the block finishes\n if (i % (14 * 22) === 0) {\n str += \"\\n\"\n\n //also increment piece counter\n fieldIndex++\n }\n\n //chars to put in the field/string print\n const add = this.data[byteAddress] || placeholder\n\n //add padded to\n str += LevelFileReader.padString(add)\n\n //if still in interesting field part\n if (fieldIndex <= 1) {\n //set in field with coordinates\n this.setField(fieldIndex, Math.floor(i / 14) % 22, i % 14, add)\n }\n\n //increment byte position\n i++\n byteAddress = i * 128 + 2\n }\n\n //read level name at end of file\n this.levelName = this.data\n .slice(128 * 14 * 22 * 2 + 2)\n //by parsing into chars from char codes\n .reduce((str, c) => str + String.fromCharCode(parseInt(c, 10)), \"\")\n\n //print fields visually\n console.log(str)\n\n //print combined field\n console.log(\n this.fileName +\n \"\\n\" +\n this.field\n .map(\n //process each line\n l =>\n l\n .map(i => i.map(f => LevelFileReader.padString(f)).join(\"\"))\n .join(\"\")\n )\n .join(\"\\n\")\n )\n\n //build level descriptor from field chars, for each line\n const levelDescriptor = this.field.map(line => {\n //map line, for each item\n line = line\n .map(item => {\n //start off position as water base\n let pos = [\"w\"]\n\n //terrain is in the first position\n const terrain = item[0]\n\n //if terrain is a type of flat land object\n const flatLandObject =\n LevelFileReader.binFormatMaps.terrainTypes[terrain]\n if (flatLandObject) {\n //use whole array if given\n if (Array.isArray(flatLandObject)) {\n pos = flatLandObject.slice(0)\n } else {\n //is land with this object\n pos = [\"l\", flatLandObject]\n }\n } else {\n //is land if byte is certain ranges\n //10 is the green small flower but all others 1-12 are land types\n if (terrain <= 12) {\n pos[0] = \"l\"\n } else if (terrain <= 24) {\n pos[0] = \"g\"\n } else if (terrain !== placeholder) {\n //unknown terrain if out of range but still specified\n pos[0] = \"u\"\n }\n }\n\n //if second item is number\n if (typeof item[1] === \"number\") {\n //map to object abbrev or unknown if not present\n //add all objects, enabled adding of multiple objects in bin format map\n pos = pos.concat(\n LevelFileReader.binFormatMaps.objectTypes[item[1]] || \"uk\"\n )\n }\n\n //return processed position\n return pos\n })\n .reduce((prev, item) => {\n //reduce to simplify\n //if this item is just one piece\n if (item.length === 1) {\n //when last is string\n if (typeof prev[prev.length - 1] === \"string\") {\n //add string to it\n prev[prev.length - 1] += item[0]\n } //if last is array or prev is empty, push only string\n else {\n prev.push(item[0])\n }\n } else {\n //push whole item\n prev.push(item)\n }\n return prev\n }, [])\n\n //if line collapses into one piece, don't use array to contain\n if (line.length === 1) {\n line = line[0]\n }\n\n //return processed line\n return line\n })\n\n //create object for level creation\n this.levelInfo = {\n name: `${this.levelName} (${this.fileName})`,\n noPadding: true,\n field: levelDescriptor,\n dim: Vector(20, 12),\n }\n\n //create level with descriptor, file name as name and standard size\n this.level = Level(this.levelInfo)\n }", "function salta(Nio_lvl1_2, grupo_lvl1_2){\n this.salta=0;\n }", "function tree (event) {\n \tfor (var i = 1; i <= height.value; i++) {\n console.log(\" \".repeat(height.value - i) + (char.value.repeat(i)) + (char.value.repeat(i - 1)) + \" \".repeat(height.value - i));\n\t}\n}", "function treeInit() {\n tree = new YAHOO.widget.TreeView(\"en_tree\");\n // Caricamento dinamico dei dati \n tree.setDynamicLoad(loadDataForNode);\n\n var root = tree.getRoot();\n var baseLabel = baseRoot.replace(/.*\\//, \"\");\n var tmpNode = new YAHOO.widget.TextNode({ label: baseLabel, fqFileName: baseRoot, type: \"dir\" }, root, false);\n oTextNodeMap[tmpNode.labelElId] = tmpNode;\n tree.render();\n}", "function zmien_ocene_dodaj(wiersz, kolumna, nr_bierki)\n{\n szachownica.ocena.material += wartosci[nr_bierki];\n szachownica.faza_gry += wartosci_faza_gry[nr_bierki];\n\n if(szachownica.faza_gry > 70)\n szachownica.faza_gry = 70;\n\n szachownica.ocena.tablice += wartosc_tabela(wiersz, kolumna, nr_bierki);\n szachownica.ocena.tabele_koncowka += wartosc_tabela_konc(wiersz, kolumna, nr_bierki);\n}", "function setLevel() {\n\n //titulo fase\n var title = makeText(levels[currentLevel].name, 100, 42, 8, '#ffffff');\n\n var instructions;\n\n //instruções\n if (currentLevel < 4) {\n instructions = makeText('Click on the glowing block.', 160, 12, 0, '#cccccc');\n } else {\n instructions = makeText('Choose the modifiers and click on the glowing block.', 160, 12, 0, '#cccccc');\n }\n\n var author = makeText('Author: Alessandro Siqueira - [email protected]', app.view.height - 20, 11, 0, '#aaaaaa');\n\n //bloco inicial\n playerBlock = new defBlock(\n levels[currentLevel].initial.size,\n levels[currentLevel].initial.color,\n 1,\n 1\n );\n\n //bloco final\n finalBlock = new defBlock(\n levels[currentLevel].final.size,\n levels[currentLevel].final.color,\n .3,\n -1,\n levels[currentLevel].final.rotation\n );\n finalBlock.loopBol = false;\n\n //bloco transformado em azul\n playerBlockMod = new defBlock(1, '#0000ff', 1, 0);\n playerBlockMod.loopBol = false;\n playerBlockMod.x = -100;\n\n scnCurrent.addChild(makePath());\n scnCurrent.addChild(title);\n scnCurrent.addChild(instructions);\n scnCurrent.addChild(author);\n\n //modificadores\n for (var n = 0; n < levels[currentLevel].modifiers.length; n++) {\n activeModifiers.push(setModifier(levels[currentLevel].modifiers.length, n));\n scnCurrent.addChild(activeModifiers[n]);\n }\n\n scnCurrent.addChild(finalBlock);\n scnCurrent.addChild(playerBlockMod);\n scnCurrent.addChild(playerBlock);\n\n app.stage.addChild(scnCurrent);\n\n app.renderer.render(stage);\n}", "getNodosArbol(t) {\n // debugger;\n if(this.t > t) return [];\n let retorno = [this];\n this.hijos.forEach(function (e) {\n retorno = retorno.concat(e.getNodosArbol(t));\n }, this);\n\n return retorno;\n }", "function graczOberwal() {\r\n\r\n\t\t\t\t//zabieranie rebulla:\r\n\t\t\t\tif (DD_predkoscPocztkowaGracza >= 250) {\r\n\t\t\t\t\tDD_predkoscPocztkowaGracza -= 125;\r\n\t\t\t\t\tgracz.twoway(DD_predkoscPocztkowaGracza); //redukuj predkosc gracza\r\n\t\t\t\t\tDD_obrazeniaPocikskowGracz -= 0.05; //zredukuj obrazenia zadawane przez pociski gracza\r\n\r\n\t\t\t\t\t//dodaj napis o redukcji rebulla:\r\n\t\t\t\t\tvar bonusTekst = Crafty.e(\"2D, Canvas, Text, Delay, Motion\")\r\n\t\t\t\t\t\t.attr({ x: gracz.x - 25, y: gracz.y, z: 98 })\r\n\t\t\t\t\t\t.text('- REBULL')\r\n\t\t\t\t\t\t.textColor('gray')\r\n\t\t\t\t\t\t.textFont({ size: '15px', weight: 'bold' })\r\n\t\t\t\t\t\t.bind('EnterFrame', function (e) {\r\n\t\t\t\t\t\t\tthis.alpha -= 0.01;\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.delay(function () {\r\n\t\t\t\t\t\t\tthis.destroy();\r\n\t\t\t\t\t\t}, 1500, 0)\r\n\t\t\t\t\t\t;\r\n\t\t\t\t\tbonusTekst.velocity().y = -50;\r\n\r\n\t\t\t\t}\r\n\t\t\t\tif (DD_buforStrzalu <= 5) {\r\n\t\t\t\t\tDD_buforStrzalu += 1; //redukuj szybkosztrzelnosc\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//czerwona maska przy oberwaniu od przeciwnika:\r\n\t\t\t\tvar boli = Crafty.e('2D, Canvas, Image, Renderable, Delay')\r\n\t\t\t\t\t.attr({ x: 0, y: 0, w: 500, h: 300 })\r\n\t\t\t\t\t.image(\"assets/obrazki/ouch2.png\", \"no-repeat\")\r\n\t\t\t\t\t.delay(function () {\r\n\t\t\t\t\t\tthis.destroy();\r\n\t\t\t\t\t}, 150, 0)\r\n\t\t\t\t\t;\r\n\t\t\t\t// intensywnosc maski zalezy od ilosci pozostalego zycia:\r\n\t\t\t\tboli.alpha = (1 / gracz.zycie) * DD_fala;\r\n\t\t\t\treturn;\r\n\t\t\t}", "function tree (a_items, a_template) {\n this.n_tid = trees.length;\n trees[this.n_tid] = this;\n \n this.a_tpl = a_template;\n this.a_config = a_items;\n this.o_root = this;\n this.a_index = [];\n this.a_selected = [];\n this.a_deleted = [];\n this.b_selected = false;\n this.n_depth = -1;\n this.select_all = select_all;\n this.select_none= select_none;\n this.upstatus = function() {};//nothing\n this.o_parent = null;\n this.a_custom_menus = [];\n this.a_custom_menu_ids = [];\n this.n_items = 0;\n this.b_cache_children = true;\n this.get_item = function(id) { return this.a_index[id]; };\n this.item_count = function() { return this.n_items; };\n this.get_first_item = get_first_item;\n this.get_next_item = get_next_item;\n this.deleteAllChildren = deleteAllChildren;\n this.action = null;\n this.border = null;\n this.a_columns= null;\n this.a_columnWidths = null;\n this.add_tree_column = add_tree_column;\n this.timeoutId = 0; \n\n var o_icone = new Image();\n var o_iconl = new Image();\n o_icone.src = a_template['icon_e'];\n o_iconl.src = a_template['icon_l'];\n a_template['im_e'] = o_icone;\n a_template['im_l'] = o_iconl;\n\n for (var i = 0; i < 64; i++)\n if (a_template['icon_' + i]) \n {\n var o_icon = new Image();\n a_template['im_' + i] = o_icon;\n o_icon.src = a_template['icon_' + i];\n }\n \n this.expand = item_expand;\n this.toggle = toggle;\n this.select = function (n_id, e, treeid) { return this.get_item(n_id).select(e, treeid); };\n this.mover = mouse_over_item;\n this.mout = mouse_left_item;\n this.oncontextmenu = function (n_id, e, treeid) { return this.get_item(n_id).oncontextmenu(e, treeid) };\n this.show_context_menu = show_context_menu;\n this.handle_command = handle_command;\n this.on_sel_changed = null;\n this.on_expanding = null;\n this.on_context_menu= null;\n this.on_command = null;\n \n this.get_custom_menu = function(menu_name) {\n var index = this.a_custom_menu_ids[menu_name];\n return (index != undefined) ? this.a_custom_menus[index] : null;\n }\n this.add_custom_menu = function(menu_name, a_menu) { \n if (!this.get_custom_menu(menu_name))\n {\n var index = this.a_custom_menus.length;\n this.a_custom_menus[index] = a_menu;\n this.a_custom_menu_ids[menu_name] = index;\n }\n return index;\n }\n \n this.a_children = [];\n for (var i = 0; i < a_items.length; i++)\n new tree_item(this, i, this.a_config[i + (this.n_depth + 1 ? 2 : 0)]);\n\n var n_children = this.a_children.length;\n if (n_children) {\n var div = document.getElementById('tree_' + this.n_tid);\n var a_html = [];\n for (var i=0; i<n_children; i++) {\n var child = this.a_children[i];\n a_html[i] = child.init();\n child.expand();\n }\n div.innerHTML = a_html.join('');\n }\n}", "function ergodicTreeTable(ergodicNode) {\n ergodicNode.key = ergodicNode.id; // 添加key, 修复树table展开串数据bug\n\n if (ergodicNode.children && ergodicNode.children.length > 0) {\n ergodicNode.children.forEach(item => {\n ergodicTreeTable(item);\n });\n } else {\n delete ergodicNode.children; // 删除没有子节点数据的 children字段,为了在没有子节点情况下 显示展开关闭图标\n }\n}", "function quadtree(img, sRow, sCol, path, lvl, numOfCols, parent) {\n\n var isSame = true;\n var startColor = img[sRow][sCol];\n var binStr = \"\";\n var rows = sRow + numOfCols;\n var cols = sCol + numOfCols;\n for (var i = sRow; i < rows; i++) {\n for (var j = sCol; j < cols; j++) {\n\n var cellColor = img[i][j];\n binStr += cellColor;\n if (startColor != cellColor) {\n isSame = false;\n }\n }\n }\n\n if (isSame) {\n addSiblings(parent);\n return {\n binStr: binStr,\n path: path,\n lvl: lvl,\n children: [],\n parent: parent,\n siblings: 0\n };\n\n } else {\n var child = {\n binStr: binStr,\n path: path,\n lvl: lvl,\n children: [],\n parent: parent,\n siblings: 0\n };\n addSiblings(parent);\n var halfCols = Math.floor(numOfCols / 2);\n lvl++;\n child.children.push(quadtree(img, sRow, sCol, path + \"0\", lvl, halfCols, child));\n child.children.push(quadtree(img, sRow, halfCols, path + \"1\", lvl, halfCols, child));\n child.children.push(quadtree(img, sRow + halfCols, sCol, path + \"2\", lvl, halfCols, child));\n child.children.push(quadtree(img, sRow + halfCols, sRow + halfCols, path + \"3\", lvl, halfCols, child));\n return child;\n }\n}", "function buildLevelTwo(){\n var y = false;\n\n $(document).on(\"click\",\"a#level1\", function(){\n var href = $(this).data(\"cts2ref\");\n var id = $(this).attr(\"id\");\n var index = $(this).data(\"index\");\n if(y)\n {\n var select = \"ul[id=\\\"level2\\\"][data-li_index=\" + index + \"]\";\n $(select).children().toggle(\"fast\");}\n else{\n\n buildTree(href, id, index);\n y = true;\n }\n });\n}", "function treeIterator(branch, worldX, worldY, worldA) {\n\t// Anche se `push` e` pop` aiuteranno * a visualizzare * l'albero, abbiamo ancora bisogno di un mezzo per interagire con esso.\n\t// Quindi, per interagire con il mouse, dobbiamo tenere traccia della posizione / rotazione dell'attuale ramo.\n\tworldA += branch.angle;\n\t\n\tlet vec = new p5.Vector(branch.length, 0);\n\tvec.rotate(radians(worldA));\n\t\n\tworldX += vec.x;\n\tworldY += vec.y;\n\t\n\tpush();\n\t\tstroke(15, 100, 150 * map(branch.level, 0, maxLevel, 1, 1.5));\n\t\tstrokeWeight(maxLevel - branch.level + 1);\n\t\t\n\t\t// Spingi il ramo se è a distanza del mouse.\n\t\tlet d = dist(mouseX, mouseY, worldX + width / 2, worldY + height - height / 4);\n\t\tlet distThresh = 250;\n\t\tif (d < distThresh) {\n\t\t\tlet force = map(d, 0, distThresh, 1, 0); // I rami più vicini saranno spinti di più.\n\t\t\t\n\t\t\t// Inverti l'angolo a seconda della posizione del mouse.\n\t\t\tif (mouseX > worldX + width / 2) {\n\t\t\t\tforce *= -1;\n\t\t\t}\n\n\t\t\t// I rami inferiori hanno una maggiore resistenza.\n\t\t\tforce *= map(branch.level, 0, maxLevel, 0.2, 1);\n\t\t\tbranch.applyForce(force);\n\t\t\t\n\t\t\t// Mentre siamo qui, possiamo visualizzare se questo ramo viene spinto.\n\t\t\tif (debug) {\n\t\t\t\tstroke(0, 255, 255);\n\t\t\t}\n\t\t}\n\t\n\t\t// il ramo si muove.\n\t\tbranch.move();\n\t\n\t\trotate(radians(branch.angle));\n\t\t\n\t\t// linee che disegnano il ramo.\n\t\tline(0, 0, branch.length, 0);\n\t\t\n\t\tif (debug) {\n\t\t\t// Disegna punti di debug.\n\t\t\tif (d < 200) {\n\t\t\t\tstroke(80, 255, 255);\n\t\t\t\tstrokeWeight(5);\n\t\t\t\tpoint(0, 0);\n\t\t\t}\n\t\t} else {\n\t\t\t// Disegna foglie e bacche.\n\t\t\tif (branch.leaves.length > 0) {\n\t\t\t\tfor (let i = 0; i < branch.leaves.length; i++) {\n\t\t\t\t\tstroke(branch.leaves[i].hue, branch.leaves[i].sat, branch.leaves[i].val, branch.leaves[i].opacity);\n\t\t\t\t\tstrokeWeight(branch.leaves[i].size);\n\t\t\t\t\tpoint(branch.length + branch.leaves[i].offsetX, branch.leaves[i].offsetY);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\ttranslate(branch.length, 0);\n\t\t\n\t\t// Continua a ripetere i rami e passa i valori del mondo.\n\t\tfor (let i = 0; i < branch.children.length; i++) {\n\t\t\ttreeIterator(branch.children[i], worldX, worldY, worldA);\n\t\t}\n\tpop();\n}", "function layout_treeShift(v) {\n\t var shift = 0,\n\t change = 0,\n\t children = v.children,\n\t i = children.length,\n\t w;\n\n\t while (--i >= 0) {\n\t w = children[i];\n\t w.z += shift;\n\t w.m += shift;\n\t shift += w.s + (change += w.c);\n\t }\n\t} // ANCESTOR", "function createTree(node, max_level){\n\n if(node==null)\n return;\n if(max_level==node.getLevel()){\n return;\n }\n\n var lev = node.getLevel();\n var new_rad = divPoint(node.radius, 2);\n\n var first = new Octree([node.center[0] - new_rad[0], node.center[1] - new_rad[1], node.center[2] - new_rad[2]], new_rad, node.getLevel()+1);\n var second = new Octree([node.center[0] + new_rad[0], node.center[1] - new_rad[1], node.center[2] - new_rad[2]], new_rad, node.getLevel()+1);\n var third = new Octree([node.center[0] + new_rad[0], node.center[1] - new_rad[1], node.center[2] + new_rad[2]], new_rad, node.getLevel()+1);\n var fourth = new Octree([node.center[0] - new_rad[0], node.center[1] - new_rad[1], node.center[2] + new_rad[2]], new_rad, node.getLevel()+1);\n var fifth = new Octree([node.center[0] - new_rad[0], node.center[1] + new_rad[1], node.center[2] - new_rad[2]], new_rad, node.getLevel()+1);\n var sixth = new Octree([node.center[0] + new_rad[0], node.center[1] + new_rad[1], node.center[2] - new_rad[2]], new_rad, node.getLevel()+1);\n var seventh= new Octree([node.center[0] + new_rad[0], node.center[1] + new_rad[1], node.center[2] + new_rad[2]], new_rad, node.getLevel()+1);\n var eight = new Octree([node.center[0] - new_rad[0], node.center[1] + new_rad[1], node.center[2] + new_rad[2]], new_rad, node.getLevel()+1);\n var children = [first, second, third, fourth, fifth, sixth, seventh, eight];\n\n for(var i=0; i<8; i++){\n node.childs[i] = children[i];\n node.childs[i].parent = node;\n }\n \n if(max_level==node.getLevel()+1){\n var len = allLeafs.length;\n for(var i=0; i<8; i++)\n allLeafs.push(node.childs[i]);\n for(var i=0; i<8; i++)\n node.childs[i].array_index = len + i;\n return;\n }\n for(var i=0; i<8; i++)\n createTree(node.childs[i], max_level);\n\n return;\n}", "function whiskey (tequila){\n// Create a 'for' loop that begins at the zero index, and loops through the first array until it reaches the last string of the first index \n for (let i = 0; i < tequila.length; i++){\n// Create a variable that accounts for all strings within the nested array \n let vodka = tequila[i]\n// Create condition that if string is in a nested array, add 'nested' on the end of the nested array \n if (Array.isArray(vodka)){\n vodka.push('nested')\n }\n }\n// Return the final parameter \n return tequila\n}", "updateTree(row) {\n // ******* TODO: PART VII *******\n \n }", "function imbricationLevels() {\n\tvar newvalues = {}; // this will hold the new values computed\n\n\tvar table = $(\"#template-code\");\n\tvar tablelines = $('tr', table[0]);\n\tfor (var i = 1; i < tablelines.length; i++) {\n\t\tvar icode = trjs.dataload.checkstring(trjs.events.lineGetCell( $(tablelines[i]), 0));\n\t\tif (newvalues[icode]) {\n\t\t\tcontinue;\n\t\t}\n\t\t// we found a code that is not described.\n\t\tnewvalues[icode] = 1;\n\t}\n\n\ttable = $(\"#template-tier\");\n\ttablelines = $('tr', table[0]);\n\tvar ntodo = tablelines.length;\n\twhile (ntodo>0) {\n\t\tvar didsomething = false;\n\t\tfor (var i = 1; i < tablelines.length; i++) {\n\t\t\tvar icode = trjs.dataload.checkstring(trjs.events.lineGetCell( $(tablelines[i]), 0));\n\t\t\tvar ipar = trjs.dataload.checkstring(trjs.events.lineGetCell( $(tablelines[i]), 2));\n\t\t\tif (newvalues[icode]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// we found a code that is not described.\n\t\t\tif (ipar === '-' || !ipar) { // if no parent\n\t\t\t\tnewvalues[icode] = 1;\n\t\t\t\tntodo--;\n\t\t\t\tdidsomething = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar p = newvalues[ipar];\n\t\t\tif (!p) // connot process because we have no information about the parent\n\t\t\t\tcontinue;\n\t\t\tnewvalues[icode] = p + 1; // imbrication is one more than the parent\n\t\t\tntodo--;\n\t\t\tdidsomething = true;\n\t\t}\n\t\tif (didsomething === false) // the complete computation cannot be performed because the data are not correct\n\t\t\tbreak;\n\t}\n\tif (!trjs.data.imbrication) {\n\t\ttrjs.data.imbrication = newvalues;\n\t\treturn true;\n\t}\n\tvar changed = false;\n\tfor (i in newvalues) {\n\t\tif (trjs.data.imbrication[i] !== newvalues[i]) {\n\t\t\tchanged = true;\n\t\t\ttrjs.data.imbrication[i] = newvalues[i];\n\t\t}\n\t}\n\t// suppress unused old values\n\tfor (i in trjs.data.imbrication) {\n\t\tif (!newvalues[i]) {\n\t\t\tdelete trjs.data.imbrication[i];\n\t\t\tchanged = true;\n\t\t}\n\t}\n\treturn changed;\n}", "set depth(value) {}", "function tree (treeDet) {\n for (var i = 0; i < treeDet.height; i++) {\n console.log(' '.repeat((treeDet.height-1)-i) + treeDet.char.repeat(2*i + 1) + '\\n');\n }\n}", "function getTree(){ \n //var stime = new Date();\n $.getJSON('/ajax/phytree',function(data){\nalert('phytree')\n phytree = new dTree('phytree'); //参数tree,表示生成的html代码中id的标记,不影响功能\n phytree.add(0,-1,'物理视图','../physical','','content','','','','menu_phy'); \n $.each(data,function(entryIndex,entry){\n phytree.add(entry['id'], entry['pid'], entry['name'],'../'+entry['url'],'','content','/media/dtree/img/base.gif','/media/dtree/img/base.gif','',entry['menu']);\n });\n $(\"#phyDiv\").html(phytree.toString());\n });\n }", "DisplayTree() {\n if (this.state.count12) {\n var T = [];\n var K = [];\n var count = 0;\n for (var j = 0; j <= this.props.union_subjects_objects.length - 1; j++) {\n var V = {\n title: String(this.props.union_subjects_objects[j]),\n value: \"0\" + \"-\" + \"0\" + \"-\" + String(count),\n key: \"0\" + \"-\" + \"0\" + \"-\" + String(count)\n };\n var W = {\n key: \"0\" + \"-\" + \"0\" + \"-\" + String(count),\n title: String(this.props.union_subjects_objects[j])\n };\n\n T.push(V);\n K.push(W);\n count++;\n }\n\n var F = {\n title: \"root\",\n value: \"0\" + \"-\" + \"0\",\n key: \"0\" + \"-\" + \"0\",\n children: T\n };\n dataList.push(K);\n data1.push(F);\n this.setState({\n gData: data1,\n count12: 0\n });\n\n return console.log(dataList);\n }\n }" ]
[ "0.6209748", "0.5924397", "0.5866458", "0.57308483", "0.5718188", "0.57063794", "0.5693618", "0.56919634", "0.56779706", "0.5660213", "0.56478447", "0.5627209", "0.5519329", "0.5455261", "0.5449913", "0.5448773", "0.54248905", "0.53752536", "0.53727984", "0.5370324", "0.5366158", "0.5337078", "0.5327106", "0.5326682", "0.532104", "0.5317804", "0.53150725", "0.5299492", "0.52889806", "0.52724826", "0.5249802", "0.5249674", "0.52444214", "0.5229458", "0.522839", "0.52186245", "0.5210907", "0.5208196", "0.5206522", "0.51974565", "0.51899946", "0.5187974", "0.5183331", "0.51833093", "0.51764107", "0.5170585", "0.5170174", "0.5157633", "0.51453805", "0.5133349", "0.5132439", "0.51298845", "0.51280296", "0.51274776", "0.5125705", "0.5120876", "0.51205647", "0.51156425", "0.5112722", "0.5109205", "0.5098652", "0.5093936", "0.50870246", "0.50842124", "0.50773036", "0.507692", "0.5070956", "0.5069037", "0.5063046", "0.50606704", "0.5060025", "0.5058241", "0.5054313", "0.50509", "0.50490427", "0.5047327", "0.5044899", "0.504258", "0.50376916", "0.50370634", "0.5031389", "0.50271934", "0.50246227", "0.50171554", "0.5016534", "0.5009674", "0.50035447", "0.50024146", "0.49973118", "0.4997198", "0.4996137", "0.4995575", "0.49937823", "0.49930134", "0.49882957", "0.49881515", "0.4987654", "0.49844393", "0.49791145", "0.49776882", "0.49760965" ]
0.0
-1
var randomColor = Math.floor(Math.random()16777215).toString(16); document.body.style.backgroundColor = "" + randomColor; displayHex(randomColor); }
function changeBackgroundColor() { var randomHue = Math.floor(Math.random()*360); document.body.style.backgroundColor = "hsl(" + randomHue + ", 70%, 80%)"; var elHexcode = document.getElementById('hex-code'); elHexcode.textContent = HSLToHex(randomHue,70,80); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomColor() {\n var x = Math.floor(Math.random() * 256);\n var y = Math.floor(Math.random() * 256);\n var z = Math.floor(Math.random() * 256);\n var rbgColor = 'rgb(' + x + ',' + y + ',' + z + ')'; \n\ndocument.body.style.background = rbgColor;\n }", "function randomColor() {\n var x = Math.floor(Math.random() * 256);\n var y = Math.floor(Math.random() * 256);\n var z = Math.floor(Math.random() * 256);\n var bgColor = \"rgb(\" + x + \",\" + y + \",\" + z + \")\";\n \n document.body.style.background = bgColor;\n }", "function rColor () {\n var c1 = Math.floor(Math.random() * 256);\n var c2 = Math.floor(Math.random() * 256);\n var c3 = Math.floor(Math.random() * 256);\n var randomColor = \"rgb(\" + c1 + \",\" + c2 + \",\" + c3 + \")\";\n \n \tdocument.body.style.backgroundColor = randomColor;\n}", "function randomBackgroundColor() {\n document.body.style.backgroundColor = randomRGB();\n} //set body background to random rgb value", "function colorGen() { \n var red = Math.floor(Math.random()*256);\n var green = Math.floor(Math.random()*256);\n var blue = Math.floor(Math.random()*256);\n var color = \"rgb\" + \"(\" + red + \",\" + green + \",\" + blue + \")\";\n document.body.style.background = color;\n }", "function randomBackGroundColor () {\n {\n var x = Math.floor(Math.random() * 256);\n var y = Math.floor(Math.random() * 256);\n var z = Math.floor(Math.random() * 256);\n var bgColor = \"rgb(\" + x + \",\" + y + \",\" + z + \")\";\n\n document.body.style.background = bgColor;\n }\n\n\n}", "function random_bg_color() {\n let red = Math.floor(Math.random() * 256) + 64;\n let green = Math.floor(Math.random() * 256) + 64;\n let blue = Math.floor(Math.random() * 256) + 64;\n let color = \"rgb(\" + red + \",\" + green + \",\" + blue +\")\";\n document.body.style.background = color;\n}", "function randomBackgroundColor(){\n var x = Math.floor(Math.random() * 256);\n var y = Math.floor(Math.random() * 256);\n var z = Math.floor(Math.random() * 256);\n var bgColor = \"rgb(\" + x + \",\" + y + \",\" + z + \")\";\n console.log(bgColor);\n document.body.style.background = bgColor;\n}", "function randomRGB() {\n red = Math.floor(Math.random() * 256);\n blue = Math.floor(Math.random() * 256);\n green = Math.floor(Math.random() * 256);\n RGB = \"rgb(\" + red + \",\" + blue + \",\" + green + \")\";\n\n document.body.style.background = RGB;\n }", "function changeBackgroundColor(){\n var red = Math.floor(Math.random() * 256 );\n var green = Math.floor(Math.random() * 256 );\n var blue = Math.floor(Math.random() * 256 );\n var rgbColor = 'rgb(' + red + ',' + green + ',' + blue + ')';\n document.body.style.background = rgbColor; \n}", "function setRandomColor() {const setBg = () => {\n const randomColor = Math.floor(Math.random()*16777215).toString(16);\n document.body.style.backgroundColor = \"#\" + randomColor;\n}\nsetBg();}", "function randomBackgroundColor () {\n let red = Math.floor(Math.random() * 256);\n let blue = Math.floor(Math.random() * 256);\n let green = Math.floor(Math.random() * 256);\n let backGroundColor= \"rgb(\" + red + \",\" + blue + \",\" + green + \")\";\n document.body.style.background = backGroundColor;\n}", "function randomColor(){\n let r = Math.floor(Math.random() * 256);\n let g = Math.floor(Math.random() * 256);\n let b = Math.floor(Math.random() * 256);\n let rgbColor = \"rgb(\"+ r + \", \" + g + \", \" + b + \")\";\n document.body.style.backgroundColor = rgbColor;\n console.log(rgbColor);\n }", "function getRandomColor() {\n let red = Math.floor(Math.random() * 256);\n let green = Math.floor(Math.random() * 256);\n let blue = Math.floor(Math.random() * 256);\n document.body.style.backgroundColor = 'rgb(' + red + ',' + green + ',' + blue + ')';\n }", "function changeColor() {\n var first = Math.floor(Math.random() * 256);\n var second = Math.floor(Math.random() * 256);\n var third = Math.floor(Math.random() * 256);\n var color = \"rgb(\" + first + \",\" + second + \",\" + third + \")\"\n document.body.style.backgroundColor = color;\n}", "function randBGColor(){\n var randomColor = \"#\"+((1<<24)*Math.random()|0).toString(16); \n document.body.style.setProperty('--main-bg-color', randomColor)\n}", "function colorGenerator() {\n var redColor = Math.floor(Math.random() * 256) + 1;\n var greenColor = Math.floor(Math.random() * 256) + 1;\n var blueColor = Math.floor(Math.random() * 256) + 1;\n var rgb = redColor + ', ' + greenColor + ', ' + blueColor;\n document.body.style.backgroundColor = 'rgb(' + [redColor, greenColor, blueColor].join(',') + ')';\n}", "function getRandomColor() {\n let a = Math.floor(Math.random() * 256);\n let b = Math.floor(Math.random() * 256);\n let c = Math.floor(Math.random() * 256);\n let backgroundColor = 'rgb(' + a + ',' + b + ',' + c + ')';\n document.body.style.background = backgroundColor;\n}", "function randomColor() {\n var red = Math.floor(Math.random() * 255);\n var green = Math.floor(Math.random() * 255);\n var blue = Math.floor(Math.random() * 255);\n var color = 'rgb(' + red + ',' + green + ',' + blue + ')'\n document.querySelector('body').style.backgroundColor = color;\n}", "function newColorBg(){\n var r=Math.floor(Math.random()*256);\n var g=Math.floor(Math.random()*256);\n var b=Math.floor(Math.random()*256);\n\n rrggbb= `rgb(` + r + `,` + g + `,` + b + `)`;\n\n document.body.style.background = rrggbb;\n\n\n}", "function randomColor() {\n var red = Math.floor( Math.random() * 256 );\n var green = Math.floor( Math.random() * 256 );\n var blue = Math.floor( Math.random() * 256 );\n var rbgColor = 'rgb(' + red + ',' + green + ',' + blue + ')';\n document.body.style.background = rbgColor;\n document.getElementById('loadQuote').style.background = rbgColor;\n}", "function changeBackgroundColor() {\n let letters = '0123456789ABCDEF';\n let color = '#';\n for (let i = 0; i < 6; i++) {\n color += letters[Math.floor(Math.random() * 16)];\n }\n document.getElementById(\"output\").innerHTML = \"HEX Color: \" + color;\n document.body.style.backgroundColor = color;\n}", "function randomBackgroundColor() {\n let randomColor = `rgb(${getRandomNumber()},${getRandomNumber()},${getRandomNumber()})`;\n document.body.style.backgroundColor = randomColor;\n}", "function randomBackgroundColor() {\n // generate 3 random numbers\n _red = Math.floor(\n Math.random() * 256\n ) + 1;\n _blue = Math.floor(\n Math.random() * 256\n ) + 1;\n _green = Math.floor(\n Math.random() * 256\n ) + 1;\n\n // combine to a single rgb\n _rgb = 'rgb(' + [_red, _blue, _green].join() + ')';\n\n // change the background color\n // (referenced https://www.w3schools.com/jsref/prop_style_backgroundcolor.asp for assistance on this one.)\n document.body.style.backgroundColor = _rgb;\n}", "function getRandomColour() {\n let red = Math.floor(Math.random() * 256);\n\n let green = Math.floor(Math.random() * 256);\n\n let blue = Math.floor(Math.random() * 256);\n\n let rgbColor = \"rgb(\" + red + \",\" + green + \",\" + blue + \")\";\n\n document.body.style.background = rgbColor;\n}", "function randomColor() {\n red = createRandomRGB();\n green = createRandomRGB();\n blue = createRandomRGB();\n color = `rgba(${red}, ${green}, ${blue}, 0.5)`;\n document.body.style.backgroundColor = `${color}`;\n}", "function generateRandomBackgroundColor() {\n var hexVal = Math.floor(Math.random() * 0xFFFFFF);\n return \"#\" + (\"000000\" + hexVal.toString(16)).substr(-6);\n}", "function changeBackgroundColor(){\n //rgb values from 0 to 255\n var r = getRandomNumber(255);\n var g = getRandomNumber(255);\n var b = getRandomNumber(255);\n var rgb = \"rgb(\" + r + \",\" + g + \",\" + b + \")\";\n document.body.style.backgroundColor = rgb;\n}", "function changeBackgroundColor() {\n function colorNum() {\n return Math.ceil(Math.random() * 255);\n }\n let color = \"rgb(\" + colorNum() + \",\" + colorNum() + \",\" + colorNum() + \")\";\n document.body.style.background = color;\n}", "function randomColor(){\n return \"#\" + Math.round(Math.random() * 0xFFFFFF).toString(16);\n}", "function randomBg(){\n\t\tsetInterval(function(){\n\t\t\tvar rand = Math.round(100 + Math.random() * (999 - 100));\n\t\t\tvar hex = rand.toString(16);\n\t\t\t$(\"body\").css(\"background-color\", \"#\" + hex);\n\t\t}, 5000);\n\t}", "function getRandomColors() {\n var x = Math.floor(Math.random() * 256);\n var y = Math.floor(Math.random() * 256);\n var z = Math.floor(Math.random() * 256);\n var bgColor = \"rgb(\" + x + \",\" + y + \",\" + z + \")\";\n\n document.body.style.background = bgColor;\n}", "function randomColor(){\n\treturn '#'+Math.random().toString(16).substr(-6);\n}", "function randColor() {\n\n\trandRed = Math.floor(Math.random() * 50);\n\trandBlue = Math.floor(Math.random() * 50);\n\trandGreen = Math.floor(Math.random() * 50);\n\trandAlpha = Math.random();\n\trandRGB = 'rgb(' + randRed + ', ' + randBlue + ', ' + randGreen + ')';\n\tdocument.body.style.backgroundColor = randRGB;\n\tdocument.getElementById('loadQuote').style.backgroundColor = randRGB;\n\n}", "function randomColorGen(){\n // return `#${Math.floor(Math.random()*16777215).toString(16)}`;\n return \"#\" + Math.random().toString(16).slice(2, 8)\n}", "function backgroundChange () {\n\tvar red = Math.floor(Math.random() * 255);\n\tvar green = Math.floor(Math.random() * 255);\n\tvar blue = Math.floor(Math.random() * 255);\n\n\tdocument.body.style.backgroundColor = 'rgb(' + red + ',' + green + ',' + blue + ')';\n}", "function randomHexColor() {\n\n var randomHexColor;\n randomHexColor = '#' + Math.floor(Math.random() * 16777215).toString(16);\n return randomHexColor;\n\n}", "function randomColor() {\n return \"#\" + Math.floor(Math.random() * 0xffffff).toString(16);\n}", "function getRandomColors() {\n let r = Math.floor(Math.random() * 256);\n let g = Math.floor(Math.random() * 256);\n let b = Math.floor(Math.random() * 256);\n\n let fullColor = \"rgb(\" + r + ', ' + g + ', ' + b + ')';\n document.body.style.backgroundColor = fullColor; //set background-color in body\n}", "function randColor()\n {\n return '#'+ Math.floor(Math.random()*16777215).toString(16);\n }", "function getHex() {\n let hexCol=\"#\";\n for (let i=0; i<6;i++){\n let random=Math.floor(Math.random()*hexNumbers.length);\n hexCol +=hexNumbers[random];\n }\n bodyBcg.style.backgroundColor= hexCol;\n hex.innerHTML=hexCol;\n}", "function randomHexColour() {\n return '#' + Math.floor( Math.random() * 16777215 ).toString( 16 );\n}", "function setRandomColor() {\n var colors = ['#16a085', '#27ae60', '#2c3e50', '#f39c12', '#e74c3c', '#9b59b6', '#FB6964', '#342224', \"#472E32\", \"#BDBB99\", \"#77B1A9\", \"#73A857\"];\n document.body.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];\n}", "function backgroundRandomColor() {\n const colorIndex = Math.floor(Math.random() * colors.length + 1); //used previous \n document.body.style.backgroundColor = colors[colorIndex];\n}", "function getRandomColor() {\n let r = backgroundColor();\n let g = backgroundColor();\n let b = backgroundColor();\n\n let rgb = 'rgb(' + r + ',' + g + ',' + b + ')';\n //adds the value to the body property\n document.body.style.background = rgb;\n\n}", "function randomBackgroundColor() {\n // Generate random color for the background\n const red = Math.floor(Math.random() * 255);\n const green = Math.floor(Math.random() * 255);\n const blue = Math.floor(Math.random() * 255);\n const rgb = `rgb(${red}, ${green}, ${blue})`;\n\n // Update Background Color\n document.body.style.backgroundColor = rgb;\n}", "function randomBkGrdColor () {\n const randomValue = () => Math.floor(Math.random()*256);\n\n // creates a random color\n function randomRGB(value) {\n const color = `rgb(${value()}, ${value()}, ${value()} )`;\n return color;\n }\n // calls the function\n randomRGB(randomValue);\n\n // sets the body's background color to the random color\n document.body.style.backgroundColor = randomRGB(randomValue)\n\n}", "function randomColor() {\n\t\treturn \"#\"+(0x1000000+(Math.random())*0xffffff).toString(16).substr(1,6);\n\t}", "function changeBackgroudColor() {\n let color = getRandomValue(256);\n document.body.style.backgroundColor = 'hsl(' + color + ', 54%, 46%)';\n}", "function randomBodyColor() {\n const r = Math.floor(Math.random() * 256);\n const g = Math.floor(Math.random() * 256);\n const b = Math.floor(Math.random() * 256);\n const bgColor = `rgb(${r},${g},${b})`;\n\n document.body.style.backgroundColor = bgColor;\n}", "function randomBG() {\n //get a random number to set \"red\" portion \n let x = Math.floor(Math.random() * 256);\n //get a random number to set \"green\" portion\n let y = Math.floor(Math.random() * 256);\n //get a random number to set \"blue\" portion\n let z = Math.floor(Math.random() * 256);\n\n //set color variable to insert as css background color\n let color = \"rgb(\" + x + \",\" + y + \",\" + z + \")\";\n\n //log background color to the console to test the function \n console.log(color);\n\n //write the random color to the css file in background\n document.body.style.background = color;\n\n }", "function generarNuevoColor(){\n\tvar simbolos, color;\n\tsimbolos = \"0123456789ABCDEF\";\n\tcolor = \"#\";\n\n\tfor(var i = 0; i < 6; i++){\n\t\tcolor = color + simbolos[Math.floor(Math.random() * 16)];\n\t}\n\n\tdocument.body.style.background = color;\n\tdocument.getElementById(\"hexadecimal\").innerHTML = color;\n\tdocument.getElementById(\"text\").innerHTML = \"Copiar Color\";\n}", "function backgroundColor() {\n return Math.floor(Math.random() * 256);\n}", "function rbc() {\n let color = () => Math.floor(Math.random() * 256);\n let bgColor = `rgb(${color()}, ${color()}, ${color()})`\n\n document.body.style.background = bgColor;\n }", "function randomColor() {\t\t\t\t\t\t\t\t// randomizes hex values\n\tlet color = \"#\";\n\tfor(i = 0; i < 6; i++) {\n\t\tcolor += Math.floor((Math.random() * 16)).toString(16);\n\t}\n\treturn color;\n}", "function randomColor() {\n return `#${Math.floor(Math.random() * 16777215)\n .toString(16)\n .padStart(6, 0)}`;\n}", "function changeBackground () {\n document.body.style.backgroundColor = `rgb( ${getRandomColour()} )`;\n}", "function randomColor () {\nreturn Math.floor (Math.random() * 256) ;\n}", "function generateBackgroundColor() {\r\n\tvar color,\r\n\t\trandNr = randomNumber(0, 4);\r\n\tcolor = colors[randNr];\r\n\treturn color;\r\n}", "function randomColor() {\n const randColor1 = String(Math.floor(Math.random() * 255)) + ', ';\n const randColor2 = String(Math.floor(Math.random() * 255)) + ', ';\n const randColor3 = String(Math.floor(Math.random() * 255)) + ', ';\n document.body.style.backgroundColor = 'rgba(' + randColor1 + randColor2 + randColor3 + '1)';\n document.getElementById('loadQuote').style.backgroundColor = 'transparent';\n}", "function randomColor() {\n function color() {\n return Math.floor(Math.random()*256).toString(16)\n }\n return \"#\"+color()+color()+color();\n}", "function backFlash(){\n\tvar color = '#'+Math.floor(Math.random()*16777215).toString(16);\n\tdocument.body.style.background = color;\n\n}", "function changeBackgroundColor() {\n document.querySelector('body').style = `background-color: rgb(${getRandomNumber(256)}, ${getRandomNumber(256)}, ${getRandomNumber(256)})`;\n}", "function getRandomColor() {\n var hex = Math.floor(Math.random() * 0xFFFFFF);\n return \"#\" + (\"000000\" + hex.toString(16)).substr(-6);\n}", "function changeColor() {\n body = document.body;\n body.style.backgroundColor = randomRgbVal();\n}", "function createColor()\n\t{\n\t\tvar expColor = '#'+(Math.random()*0xFFFFFF<<0).toString(16);\n\t\t//alert(expColor);\n\t\treturn expColor;\n\n\n\t}", "function randomColor() {\n\tvar hexChars = '0123456789ABCDEF'.split('');\n\tvar color = '#';\n\n\tfor (var i = 0; i < 6; i++) {\n\t\tcolor += hexChars[Math.floor(Math.random()*16)];\n\t}\n\n\treturn color;\n}", "function changeBackground(){\n document.getElementsByTagName('body')[0].style.background = color[Math.floor(Math.random() * color.length)];\n}", "function getRandomColor() {\n var hex = Math.floor(Math.random() * 0xFFFFFF);\n return \"#\" + (\"000000\" + hex.toString(16)).substr(-6);\n}", "function changeBackGroundColor() {\n let randomColor = () => Math.floor(Math.random() * 255);\n let newColor = `rgb(${randomColor()}, ${randomColor()}, ${randomColor()})`;\n return document.body.style.backgroundColor = newColor;\n}", "function getRandomBgColor() {\n let colors = [\"00c2d1\", \"ffae19\", \"002344\", \"008000\", \"808080\", \"e600e6\", \"33ccff\"];\n let colorNum = Math.floor(Math.random() * colors.length);\n let color = \"#\" + colors[colorNum];\n document.getElementById(\"main\").style.background = color;\n}", "function getRandomColor () {\n var hex = Math.floor(Math.random() * 0xFFFFFF);\n return \"#\" + (\"000000\" + hex.toString(16)).substr(-6);\n}", "function randColour()\n{\n\tvar c = Math.round(0xffffff * Math.random());\t\n\treturn ('#0' + c.toString(16)).replace(/^#0([0-9a-f]{6})$/i, '#$1');\n}", "function randomColors() {\r\n return '#' + Math.floor(Math.random() * 16777215).toString(16);\r\n}", "function randomColorGenerator() {\n\t\t\t\t\t\t\treturn '#'\n\t\t\t\t\t\t\t\t\t+ (Math.random().toString(16) + '0000000')\n\t\t\t\t\t\t\t\t\t\t\t.slice(2, 8);\n\t\t\t\t\t\t}", "function setBg() {\n const randomNumber = Math.floor(Math.random() * 16777215).toString(16);\n const hexValue = `#${randomNumber}`;\n\n return hexValue;\n}", "function generateRandomColor() {\n var randomColor = '#' + Math.floor(Math.random() * 16777215).toString(16);\n return randomColor;\n //random color will be freshly served\n}", "function getRandomColor() {\n // Return a random color. Note that we don't check to make sure the color does not match the background\n return '#' + (Math.random()*0xFFFFFF<<0).toString(16);\n}", "function getRandomColor() {\n // Return a random color. Note that we don't check to make sure the color does not match the background\n return '#' + (Math.random()*0xFFFFFF<<0).toString(16);\n}", "function colorRandom(){\n\n\tvar r= Math.floor(Math.random()*256);\n\tvar g= Math.floor(Math.random()*256);\n\tvar b= Math.floor(Math.random()*256);\n\tvar color = \"rgb(\"+ r + \", \" + g + \", \" + b + \")\"; //cuatro horas para descubrir que me faltaba un espacio al lado de las comas cuando asigno el color\n\n\t//Validar para que no me de el mismo color que el background de body\n\t\n\treturn color;\n}", "function randomColor(){\n\treturn \"rgba(\"+randomInt(0,255)+\",\"+randomInt(0,255)+\",\"+randomInt(0,255)+\",1)\";\n}", "function randomColor(){\n \t\tvar colors = [\"#6816A4\",\"#2A509F\",\"#E21F22\",\"#FC9A24\"]; \n \t\tvar rand = Math.floor(Math.random()*colors.length); \n \t\t$('section.tsumLibrary div').css(\"background\", colors[rand]);\n\t}", "function randomFinalColor (){\n let colorR = randomColor();\n let colorG = randomColor();\n let colorB = randomColor();\n //once red, green, and blue variables have been assigned an intensity we need to concatenate these values into the rgb combination \n let mixColor = `rgb(${colorR},${colorG},${colorB})`;\n //which is then returned directly to the background-color value in CSS\n return document.body.style.setProperty('background-color', mixColor);\n}", "function randomColor(){ \n return rgbToHex(random255(),random255(),random255())\n}", "function change_background(){\r\n\r\n for(x=0;x<6;x++){\r\n generated = hexa[color_generator()];\r\n color += generated;\r\n\r\n };\r\n body.style.backgroundColor = color;\r\n span.innerText = color;\r\n color = \"#\"; // reinitialize the value of color to '#'\r\n \r\n\r\n \r\n\r\n \r\n}", "function changeColor() {\n\tvar color = 'rgb(';\n\tcolor += Math.floor(Math.random() * 256) + ',';\n\tcolor += Math.floor(Math.random() * 256) + ',';\n\tcolor += Math.floor(Math.random() * 256) + ')';\n\tdocument.body.style.backgroundColor = color;\n\tdocument.getElementById('loadQuote').style.backgroundColor = color;\n}", "function randomColour() {\n let red = randomNumber();\n let green = randomNumber();\n let blue = randomNumber();\n\n colour.style.backgroundColor = 'rgb(' + red + ',' + green + ',' + blue + ')';\n hex.value = '#' + rgbToHex(red) + rgbToHex(green) + rgbToHex(blue);\n\n fetchColorInfo(hex.value.substring(1, 7));\n updateHistory(hex.value);\n updateStorage();\n updateHistoryArea();\n}", "function getRandomColor() {\n var letters = '0123456789ABCDEF';\n var color = '#';\n for (var i = 0; i < 6; i++) {\n color += letters[Math.floor(Math.random() * 16)];\n }\n return color;\n }", "function randColor() {\r\n var r = Math.floor(Math.random() * (256)),\r\n g = Math.floor(Math.random() * (256)),\r\n b = Math.floor(Math.random() * (256));\r\n return '#' + r.toString(16) + g.toString(16) + b.toString(16);\r\n}", "static color() {\n return '#' + Math.floor(Math.random() * 16777215).toString(16)\n }", "function colour() {\n //let c = Math.random();\n //console.log(c);\n //c = c.toString(16)\n //console.log(c)\n return '#' + Math.random().toString(16).substring(2,8); //substring (2,8) \n}", "function randomBackgroundColor(){\n var color = 'rgb(';\n color += randomValue() + ',';\n color += randomValue() + ',';\n color += randomValue() + ')';\n return color;\n}", "function randomColors() {\n return '#' + Math.floor(Math.random() * 16777215).toString(16);\n}", "function randomColor() {\n let r = Math.floor(Math.random() * 256);\n let b = Math.floor(Math.random() * 256);\n let g = Math.floor(Math.random() * 256);\n return bgColor = \"rgb(\" + r + \",\" + b + \",\" + g + \")\";\n}", "function randomColor(){\r\n return(\"rgba(\" + Math.round(Math.random()*250)+\",\"\r\n + Math.round(Math.random()*250) + \",\"\r\n + Math.round(Math.random()*250) + \",\"\r\n + Math.ceil(Math.random() *10)/10 + \")\" // Math.ceil: round number UP to the nearset Intenger\r\n );\r\n}", "function randomColor(){\n\tvar chars = '0123456789abcdef'\n\tvar value = '#';\n\tfor(var i=0; i < 6; i++){\n\t\tvalue += chars[Math.floor(Math.random() * 16)];\n\t}\n\treturn value;\n}", "function getRandomColor() {\r\n var letters = '0123456789ABCDEF';\r\n var color = '#';\r\n for (var i = 0; i < 6; i++) {\r\n color += letters[Math.floor(Math.random() * 16)];\r\n }\r\n return color;\r\n }", "function getRandomColor() {\n var letters = '0123456789ABCDEF';\n var color = '#';\n for (var i = 0; i < 6; i++) {\n color += letters[Math.floor(Math.random() * 16)];\n }\n return color;\n }", "function randomColor(){\n\nlet colorPick = [\n '#E52424',\n '#243EE5',\n '#C2A453', \n '#D591CA',\n '#21D567'\n]\nlet color_Number = Math.floor(Math.random() * colorPick.length);\nlet color_Choice = colorPick[color_Number];\ndocument.body.style.backgroundColor = color_Choice;\n\n}", "function setUserColor() {\n userColor = '#' + (Math.random() * 0xFFFFFF<<0).toString(16);\n }" ]
[ "0.8784057", "0.8684249", "0.8639134", "0.86088926", "0.8608596", "0.8575746", "0.85366344", "0.8511131", "0.84898937", "0.847793", "0.8447837", "0.8445836", "0.8430345", "0.84256274", "0.8417065", "0.841635", "0.84026456", "0.8380053", "0.8374863", "0.8366263", "0.83127946", "0.83125514", "0.83105236", "0.8307227", "0.82947123", "0.82763696", "0.8267204", "0.825615", "0.82163835", "0.8204106", "0.8199472", "0.8172771", "0.81443125", "0.810808", "0.8090381", "0.80780107", "0.8067197", "0.8046711", "0.8044834", "0.80337685", "0.80310273", "0.80256844", "0.8013402", "0.80081385", "0.79972935", "0.79668504", "0.79595846", "0.79565096", "0.79121417", "0.79094225", "0.7901731", "0.7894567", "0.7885963", "0.78462416", "0.7842947", "0.78279746", "0.7821367", "0.7813115", "0.7801657", "0.78009987", "0.77911013", "0.77815497", "0.7773012", "0.7772063", "0.77603", "0.7733531", "0.7717574", "0.771514", "0.77147317", "0.7714668", "0.77119035", "0.7710619", "0.76816654", "0.7679256", "0.7671336", "0.763609", "0.7635384", "0.76257896", "0.76257896", "0.76237196", "0.7614685", "0.75833887", "0.7575695", "0.7571097", "0.7568242", "0.7568121", "0.7566889", "0.75607634", "0.7552124", "0.75507694", "0.7550203", "0.75302476", "0.7527744", "0.75231326", "0.7519492", "0.7518974", "0.7514381", "0.75132585", "0.75084573", "0.7502571" ]
0.8422206
14
going to try to solve this 'shrinking window'
function minSubArrayLen(arr, n) { let total = 0; let start = 0; let end = 0; let minLen = Infinity; // first we start with a window of length 0. while (start < arr.length) { // then we expand the window until the sum is >= n if (total < n && end < arr.length) { total += arr[end]; end++; } // once total is good, we can shrink it. // then we shrink from the beginning until... else if (total >= n) { minLen = Math.min(minLen, end - start); total -= nums[start]; start++; } // taking care of getting to the end else break; } return minLen = Infinity ? 0 : minLen; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resizedw(){\n\t\n}", "function windowResized() {\n\n getWrapperWidth();\n resizeCanvas(wrapperWide, wrapperWide);\n\n widthVar = (width - 40) / 100;\n drawArea = (width - 40);\n\n switchBox();\n}", "function doResizeStuff() {\n checkTextWidths();\n $('#mainwindow').height($(document).height() -35);\n}", "function onWindowResize() {\n updateSizes();\n }", "function windowResized() {\n setup();\n}", "function adjustToNewViewport(){\r\n var newWindowHeight = getWindowHeight();\r\n var newWindowWidth = getWindowWidth();\r\n\r\n if(windowsHeight !== newWindowHeight || windowsWidth !== newWindowWidth){\r\n windowsHeight = newWindowHeight;\r\n windowsWidth = newWindowWidth;\r\n reBuild(true);\r\n }\r\n }", "function resize() {}", "function adjustToNewViewport(){\n var newWindowHeight = getWindowHeight();\n var newWindowWidth = getWindowWidth();\n\n if(windowsHeight !== newWindowHeight || windowsWidth !== newWindowWidth){\n windowsHeight = newWindowHeight;\n windowsWidth = newWindowWidth;\n reBuild(true);\n }\n }", "function adjustToNewViewport(){\n var newWindowHeight = getWindowHeight();\n var newWindowWidth = getWindowWidth();\n\n if(windowsHeight !== newWindowHeight || windowsWidth !== newWindowWidth){\n windowsHeight = newWindowHeight;\n windowsWidth = newWindowWidth;\n reBuild(true);\n }\n }", "function adjustToNewViewport(){\n var newWindowHeight = getWindowHeight();\n var newWindowWidth = getWindowWidth();\n\n if(windowsHeight !== newWindowHeight || windowsWidth !== newWindowWidth){\n windowsHeight = newWindowHeight;\n windowsWidth = newWindowWidth;\n reBuild(true);\n }\n }", "function windowResized() {\n // retrieve the new client width\n clientWidth = Math.max(200, window.innerWidth - 200);\n aspRatio = 1;\n clientHeight = clientWidth * aspRatio;\n \n // resize the canvas and plot, reposition the GUI \n resizeCanvas(clientWidth, clientHeight);\n examplePlot.GPLOT.setOuterDim(clientWidth, clientHeight);\n examplePlot.GPLOT.setPos(0, 0);\n gui.prototype.setPosition(clientWidth, examplePlot.GPLOT.mar[2]);\n}", "function resize() {\n\t\tpositionExpandedLevels();\n\t}", "function windowResized () {\n resizeCanvas(windowWidth, windowHeight);\n resize=1;\n}", "function windowResized(){\n canvas.resize(windowWidth, windowHeight - canvasadjust);\n}", "function adjustToNewViewport() {\n var newWindowHeight = getWindowHeight();\n var newWindowWidth = getWindowWidth();\n\n if (windowsHeight !== newWindowHeight || windowsWidth !== newWindowWidth) {\n windowsHeight = newWindowHeight;\n windowsWidth = newWindowWidth;\n reBuild(true);\n }\n }", "function windowResized() {\r\n canvas_resize();\r\n set_origin();\r\n set_speed();\r\n bars[it].display();\r\n}", "function windowResized() {\n resizeCanvas(windowWidth,windowHeight*9);\n \n var multiplier = map(width,200,1800,0.25,1);\n var typesize = (map(width,300,1650,50,195));\n textSize (typesize*multiplier);\n spacesize = 50*multiplier; //width of space between letters\n linesize = 280*multiplier;\n}", "function windowResized() {\n resize();\n redraw();\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n scaleMaximums();\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n addModelButton.position(windowWidth - 150, 30);\n}", "function onResize() {\n updateSpanning();\n}", "function windowResized () {\n\tresizeCanvas(windowWidth, windowHeight);\n }", "function onWindowResize(event) {\n\n layout();\n\n }", "function resize() {\n\t\tself.wz.height($(window).height()-self.delta);\n\t\tself.rte.updateHeight();\n\t}", "function windowResized() {\n b=0;\n plasticIf();\n c=(800+b);\n console.log(c, \"windowresized\");\n resizeCanvas(1200, c);\n}", "function windowResized(){\r\n createCanvas(windowWidth, windowHeight);\r\n leftBorder = 25;\r\n rightBorder = windowWidth - 25;\r\n topBorder = 25;\r\n bottomBorder = windowHeight - 25;\r\n textAlign(CENTER, CENTER);\r\n textSize(FONTSIZE);\r\n}", "function windowResized() {\r\n resizeCanvas(windowWidth, windowHeight, false);\r\n}", "function resize() {\n getNewSize();\n rmPaint();\n}", "function windowResized() {\n\tresizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n\tresizeCanvas(windowWidth, windowHeight);\n}", "function resized() {\r\n\tclearInterval(renderer);\r\n\tmain();\r\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight - 50);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}//end windowResized", "function checkWindowForRebuild() {\n if (attributes.lastWindowResizeWidth !== window.innerWidth || attributes.lastWindowResizeHeight !== window.innerHeight) {\n buildEllipsis();\n }\n\n attributes.lastWindowResizeWidth = window.innerWidth;\n attributes.lastWindowResizeHeight = window.innerHeight;\n }", "function windowResized() {\n resizeCanvas(windowWidth,windowHeight*9.87);\n background(206, 193, 154);\n textFont(font);\n textSize (typesize);\n wx = margin;\n wy = 140;\n fill(25,7,8);\n makeCreep(); \n}", "adjustSize () {\n this._resize();\n }", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n}", "function windowResized() {\r\n resizeCanvas(windowWidth, windowHeight, false);\r\n setupArray();\r\n}", "function windowResized() {\n\tresizeCanvas(innerWidth, innerHeight);\n}", "function windowResized() {\r\n resizeCanvas(windowWidth, windowHeight);\r\n}", "function windowResized() {\r\n resizeCanvas(windowWidth, windowHeight);\r\n}", "function windowResized() {\n resizeCanvas(canvasContainer.clientWidth, canvasContainer.clientHeight);\n}", "function windowResized() {\n resizeCanvas(canvasX, canvasY);\n}", "resizeToFitContent() {}", "resizeToFitContent() {}", "resizeToFitContent() {}", "resizeToFitContent() {}", "resizeToFitContent() {}", "function windowResized() {\r\n resizeCanvas(windowWidth, windowHeight)\r\n}", "function maximize()\n\t{\n\t\tif (_container != null)\n\t\t{\n\t\t\t_container.css({\"overflow\": \"\", \"height\": \"\"});\n\t\t\t_minimized = false;\n\t\t}\n\t}", "function resizeWindow() {\n $('#colUpload').css(\"width\", ($(window).width() - 80) + \"px\");\n $('#colExplorer').css(\"height\", $(window).height() - 112 + \"px\"); \n $('#colExplorer').css(\"width\", ($(window).width() - 80) + \"px\");\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(canvasWidth, canvasHeight);\n}", "function windowResized(){\n if(windowWidth > 800){\n resizeCanvas(windowWidth,windowHeight);\n }\n}", "function view_resources_resize() {\n\t\t\n\t}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight)\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight)\n}", "async resized() {\n this.turnOff();\n await this.delay(25);\n this.moveToCurrent();\n await this.delay(25);\n this.turnOn();\n }", "function win_resize() {\n var win_resized_width = getViewport()[0];\n var win_resized_height = getViewport()[1];\n\n if (win_resized_width < 810) {\n $('.nav-level-2-menu').css('width',win_resized_width);\n if ($('#nav-mask').length < 1 ){\n $('body').append('<div id=\"nav-mask\"/>')\n }\n }\n}", "function handleResize() {\n container.style.width = (container.offsetHeight / 11) * 14 + \"px\";\n updateDisplay()\n}", "function resize() {\n var ps = ws.dom.size(parent),\n hs = ws.dom.size(topBar);\n //tb = ws.dom.size(toolbar.container);\n \n ws.dom.style(frame, {\n height: ps.h - hs.h - 55 - 17 + 'px' //55 is padding from top for data column and letter\n });\n\n ws.dom.style([container, gsheetFrame, liveDataFrame], {\n height: ps.h - hs.h - 22 /*- tb.h*/ + 'px'\n });\n\n\n ws.dom.style(table, {\n width: ps.w + 'px'\n });\n\n }", "function windowResized () {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResize() {\n resiveCanvas(windowWidth, windowHeight);\n}", "resize(windowRect) {}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}" ]
[ "0.738601", "0.72426397", "0.7240199", "0.70970905", "0.709135", "0.70401025", "0.70277286", "0.7012389", "0.7012389", "0.7012389", "0.69847566", "0.6973786", "0.6948556", "0.6947652", "0.69229573", "0.6922389", "0.6913801", "0.69080794", "0.6903232", "0.68782616", "0.6875907", "0.6866344", "0.6837617", "0.6831379", "0.6808615", "0.6805921", "0.680192", "0.6796582", "0.6788723", "0.6788723", "0.6782396", "0.67519516", "0.6733159", "0.6724285", "0.67178726", "0.670258", "0.6699559", "0.6699559", "0.6699559", "0.6699559", "0.6699525", "0.6696151", "0.6685431", "0.6685431", "0.6671112", "0.665452", "0.6649425", "0.6649425", "0.6649425", "0.6649425", "0.6649425", "0.6636687", "0.6634473", "0.6627663", "0.6606053", "0.6606053", "0.6606053", "0.6606053", "0.6606053", "0.6606053", "0.6606053", "0.6606053", "0.6606053", "0.6606053", "0.6602965", "0.659946", "0.65981776", "0.6587248", "0.6587248", "0.6586446", "0.65817726", "0.6581316", "0.65810126", "0.6579475", "0.65756404", "0.6570962", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226", "0.65655226" ]
0.0
-1
As a busy politician, so I know what the big stories of the day are, I want to see all of today's headlines in one place.
function createsListArrayFromResponse() { var testDescription = "createsListArrayFromResponse" var articlesList = new ArticlesList() setTimeout(function() { assert.isTrue(articlesList.listArray.length > 0, testDescription) }, 500) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHeadlines(freshness) {\n let headlines = [];\n const urlQueries = freshness === 'top' ? 'sort=top&t=week' : '';\n axios.all([\n axios.get(`https://www.reddit.com/r/nottheonion/${freshness}.json?${urlQueries}`),\n axios.get(`https://www.reddit.com/r/theonion/${freshness}.json?${urlQueries}`)\n ])\n .then(axios.spread(function (notOnion, onion) {\n headlines.push(\n ...refinePosts(freshness, notOnion.data.data.children),\n ...refinePosts(freshness, onion.data.data.children)\n );\n\n pushToDatabase(freshness, headlines);\n }))\n .catch(err => {\n throw err;\n });\n}", "function getHeadlines() {\n\t\t$.getJSON(urlpath + '/api/headlines.json?callback=?', function(data) {\n\t\t\tvar i, l=data.length;\n\n\t\t\tif (l > 0) {\n\t\t\t\tfor (i=0;i<l;++i) {\n\t\t\t\t\theadlines.push(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'pq_id': data[i].pq_id,\n\t\t\t\t\t\t\t'hdl': data[i].hdl,\n\t\t\t\t\t\t\t'nyt_url': data[i].ny_url\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tdataloaded = true;\n\n\t\t\t\tif (headlines.length>0) {\n\t\t\t\t\tstartTicker();\n\t\t\t\t} else {\n\t\t\t\t\tshowError();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tshowError();\n\t\t\t}\n\t\t});\n\t}", "function startTicker() {\n\t\t// combine link/headline\n\t\tvar i, l=headlines.length, hl;\n\t\tvar tickercontent = \"\";\n\t\theadlines = _.shuffle(headlines);\n\t\tvar islocalIP = environment.onSite == \"true\";\n\t\tfor (i=0;i<l;++i) {\n\t\t\thl = headlines[i];\n\t\t\tvar url;\n\t\t\tif (islocalIP) {\n\t\t\t\t// proquest search url\n\t\t\t\turl = \"http://search.proquest.com/results/135C45E5A5F4B1EE9E0/1/$5bqueryType$3dbasic:OS$3b+sortType$3dDateAsc$3b+searchTerms$3d$5b$3cAND$7ccitationBodyTags:\"+hl.pq_id+\"$3e$5d$3b+searchParameters$3d$7bNAVIGATORS$3dsourcetypenav,pubtitlenav,objecttypenav,languagenav$28filter$3d200$2f0$2f*$29,decadenav$28filter$3d110$2f0$2f*,sort$3dname$2fascending$29,yearnav$28filter$3d1100$2f0$2f*,sort$3dname$2fascending$29,yearmonthnav$28filter$3d120$2f0$2f*,sort$3dname$2fascending$29,monthnav$28sort$3dname$2fascending$29,daynav$28sort$3dname$2fascending$29,+RS$3dOP,+jstorMuseCollections$3dMUSEALL,+chunkSize$3d20,+instance$3dprod.academic,+ftblock$3d194000+7+194007,+removeDuplicates$3dtrue$7d$3b+metaData$3d$7bUsageSearchMode$3dQuickSearch,+dbselections$3dallAvailable$7d$5d?accountid=35635\";\n\t\t\t} else {\n\t\t\t\t// NYTimes.com url\n\t\t\t\turl = hl.nyt_url;\n\t\t\t}\n\t\t\ttickercontent += ' <a href=\"' + url + '\" title=\"Times Headline\" target=\"_blank\">' + hl.hdl + '</a> &middot; &middot; &middot;';\n\t\t}\n\t\ttickerDOM.empty();\n\t\ttickerDOM.append(tickercontent);\n\t\tif (typeof tickerDOM !== 'undefined') {\n\t\t\ttickerDOM.marquee('pointer').mouseover(function () {\n\t $(this).trigger('stop');\n\t }).mouseout(function () {\n\t $(this).trigger('start');\n\t });\n\t }\n\n\t $('#nytimes a').click(function() {\n\t \tvar classy = toLocation($(this).prop('href')).hostname;\n\t \tanalytics.recordOutboundLink($(this).prop('href'), 'headlines', 'click', classy);\n\t });\n\t}", "function topHeadLine(country) {\n newsapi.v2.topHeadlines({\n country: country\n }).then(response => {\n for (var i in response[\"articles\"]){\n console.log(\"Author: \", response[\"articles\"][i][\"author\"]);\n console.log(\"Title: \", response[\"articles\"][i][\"title\"]);\n console.log(\"URL: \", response[\"articles\"][i][\"url\"]);\n console.log(\"ImageToURL: \", response[\"articles\"][i][\"urlToImage\"])\n console.log(\" \");\n // console.log(\"Source: \", response[\"source\"]);\n }\n /*\n {\n status: \"ok\",\n articles: [...]\n }\n */\n });\n}", "function testDailyTopHeadlinesArray() {\n document.getElementById(\"result\").innerHTML += \"Test Top Headlines Array // Top headlines via Guardian API are in array:</br>\";\n test.isEqual(noteController.noteview.notesToPrint[0] === \"<a href=\\\"#note/8\\\">Checkmate 1-2 1-2!!</a>\");\n}", "function show_today(){\n period=1;\n draw_building_chart(period,variable);\n}", "function generateHeadline() {\n d3.json(\"api/randomheadline\").then((headline_info) => {\n headline.text(headline_info[0]['title']);\n sentiment.text(headline_info[0]['sentiment']);\n news_source.text(headline_info[0]['source']);\n });\n}", "function showToday(){\n\t\t// progress bar for today\n\t\tvar todayProgress = new ProgressBar.Circle('#today_progressbar', {\n\t\t\tcolor: '#aaa',\n\t\t\ttrailColor: '#9D9E9E',\n\t\t\tstrokeWidth: 8,\n\t\t\ttrailWidth: 1,\n\t\t\teasing: 'easeInOut',\n\t\t\tduration: 1400,\n\t\t\ttext: {\n\t\t\t\tautoStyleContainer: false\n\t\t\t},\n\t\t\tfrom: {color: '#94D0FF', width: 2},\n\t\t\tto: {color: '#008FFF', width: 8},\n\t\t\tstep: function (state, circle){\n\t\t\t\tcircle.path.setAttribute('stroke', state.color);\n \t\t\tcircle.path.setAttribute('stroke-width', state.width);\n \t\t\tcircle.setText(Math.round(circle.value() * 1000) / 10 + \"%\");\n\t\t\t}\n\t\t});\n\n\t\ttodayProgress.text.style.fontFamily = 'Helvetica, sans-serif';\n\t\ttodayProgress.text.style.fontSize = '60pt';\n\t\ttodayProgress.animate(0.0);\n\n\t\tvar today = new Date();\n\t\ttoday.setMonth(today.getMonth() - 3);\n\t\tonenoteRequest('sections/' \n\t\t\t\t\t\t+ JSON.parse(originalFs.readFileSync(__dirname + '/../notebooks.json')).today_progress\n\t\t\t\t\t\t+ \"/pages\"\n\t\t\t\t\t\t+ '?filter=lastModifiedTime%20ge%20'\n\t\t\t\t\t\t+ today.getFullYear() + '-' \n\t\t\t\t\t\t+ (\"0\" + today.getMonth()).substring((\"0\" + today.getMonth()).length - 2, (\"0\" + today.getMonth()).length) + '-' \n\t\t\t\t\t\t+ (\"0\" + today.getDate()).substring((\"0\" + today.getMonth()).length - 2, (\"0\" + today.getMonth()).length)\n\t\t\t\t\t\t, updateProgress);\n\n\t\tvar timer;\n\t\t// show progress bars for today\n\t\tvar misc = showMisc();\n\n\t\t// update both progressbars in a certain time interval\n\t\ttimer = setInterval(function (){\n\t\t\t\t// update today's progress bar\n\t\t\t\tonenoteRequest('sections/' \n\t\t\t\t\t\t\t+ JSON.parse(originalFs.readFileSync(__dirname + '/../notebooks.json')).today_progress\n\t\t\t\t\t\t\t+ \"/pages\"\n\t\t\t\t\t\t\t+ '?filter=lastModifiedTime%20ge%20'\n\t\t\t\t\t\t\t+ today.getFullYear() + '-' \n\t\t\t\t\t\t\t+ (\"0\" + today.getMonth()).substring((\"0\" + today.getMonth()).length - 2, (\"0\" + today.getMonth()).length) + '-' \n\t\t\t\t\t\t\t+ (\"0\" + today.getDate()).substring((\"0\" + today.getMonth()).length - 2, (\"0\" + today.getMonth()).length)\n\t\t\t\t\t\t\t, updateProgress);\n\t\t\t\t// update misc's progress bar\n\t\t\t\tfor(var i = 0; i < JSON.parse(originalFs.readFileSync(__dirname +'/../notebooks.json')).misc_progress.length; i++){\n\t\t\t\t\tonenoteRequest('sections/' \n\t\t\t\t\t\t\t\t\t+ JSON.parse(originalFs.readFileSync(__dirname + '/../notebooks.json')).misc_progress[i] \n\t\t\t\t\t\t\t\t\t+ '/pages?filter=lastModifiedTime%20ge%20'\n\t\t\t\t\t\t\t\t\t+ today.getFullYear() + '-' \n\t\t\t\t\t\t\t\t\t+ (\"0\" + today.getMonth()).substring((\"0\" + today.getMonth()).length - 2, (\"0\" + today.getMonth()).length) + '-' \n\t\t\t\t\t\t\t\t\t+ (\"0\" + today.getDate()).substring((\"0\" + today.getMonth()).length - 2, (\"0\" + today.getMonth()).length)\n\t\t\t\t\t\t\t\t\t, misc.updateTracks);\n\t\t\t\t}\n\t\t\t}, JSON.parse(originalFs.readFileSync(__dirname + '/../notebooks.json')).refresh_time * 60 * 1000);\n\n\t\t// pre: when the program is started or time to update. sectionPages should pass a json file that contains\n\t\t//\t\tpages data in the \"today\" section, progress should be only refer to the progress bar showing today's\n\t\t//\t\tprogress by default\n\t\t// post: finds if there is any check list for today and update the percentage on the progress bar\n\t\tfunction updateProgress(sectionPages, progressBar = todayProgress){\n\t\t\tvar flag = true;\n\t\t\tfor(var i = 0; i < JSON.parse(sectionPages).value.length; i++){\n\t\t\t\tif(Date.parse(JSON.parse(sectionPages).value[i].title) \n\t\t\t\t\t&& (new Date()) - new Date(JSON.parse(sectionPages).value[i].title.trim()) < 1000 * 60 * 60 * 24\n\t\t\t\t\t&& (new Date()) - new Date(JSON.parse(sectionPages).value[i].title.trim()) > 0){\n\t\t\t\t\tflag = false;\n\t\t\t\t\tonenoteRequest('pages/' + JSON.parse(sectionPages).value[i].id + '/content', function (content) {\n\t\t\t\t\t\tvar parser = new DOMParser();\n\t\t\t\t\t\tvar dom = parser.parseFromString(content, 'text/html');\n\t\t\t\t\t\tprogressBar.animate(dom.querySelectorAll('[data-tag=\"to-do:completed\"]').length \n\t\t\t\t\t\t\t\t\t\t\t/ (dom.querySelectorAll('[data-tag=\"to-do:completed\"]').length + dom.querySelectorAll('[data-tag=\"to-do\"]').length));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(flag){\n\t\t\t\t// TO-DO\n\t\t\t\t// do something different if there is nothing today\n\t\t\t\tprogressBar.animate(0);\n\t\t\t}\n\t\t}\n\t}", "function renderHeader(){\n // in Salmon Cookies, mkae this look like image in lab-07 instructions: iterate thru the hours array\n}", "function displayPasty() {\n displayConsistency(pasty);\n }", "async function getNyTimesTopStories() {\n try {\n const response = await axios.get(\"https://api.nytimes.com/svc/topstories/v2/world.json?api-key=EFrSMOkn5IJ3i2V2bk1irq3plcwbIgae\");\n return (response);\n } catch (error) {\n console.error(error);\n }\n}", "function pageFunction_Pre2018_currentMeetings_oldCrawler(context) {\n // called on every page the crawler visits, use it to extract data from it\n var $ = context.jQuery;\n var result = [];\n var curr_year = '';\n var curr_month = '';\n\n $('table.calendario tr').each( function() {\n if ( $(this).find('th').first().text() !== '' ) {\n curr_year = $(this).find('th').first().text();\n }\n if ( $(this).find('th').last().text() !== '' ) {\n curr_month = $(this).find('th').last().text();\n }\n var days = $(this).find('td').first().text();\n var city = $(this).find('td:nth-child(3)').first().text();\n\n $(this).find('a').each( function() {\n var description = $(this).text();\n var link = $(this).attr('href');\n // Add each link to the result list:\n result.push({\n year: curr_year,\n month: curr_month,\n days: days,\n city: city,\n description : description,\n link : link\n });\n });\n });\n\n return result;\n}", "function whatHappensToday() {\n var result = \"\";\n\n if (Math.floor(Math.random() * 100) > 90) {\n result += \"Volcano \";\n } \n if (Math.floor(Math.random()* 100) > 85) {\n result += \"Tsunami \";\n }\n if (Math.floor(Math.random()* 100) > 80) {\n result += \"Earthquake \";\n }\n if (Math.floor(Math.random()* 100) > 75) {\n result += \"Blizzard \";\n }\n if (Math.floor(Math.random()* 100) > 70) {\n result += \"Meteor Strike\";\n }\n if (result == \"\") {\n result = \"Nothing happened.\"\n }\n\n return \"Today: \" + result;\n}", "function getBotTimeline () {\n bot.get('statuses/home_timeline', { count: 5 }, (err, data, response) => {\n if (err) console.log(err)\n data.forEach(d => {\n console.log(d.text)\n console.log(d.user.screen_name)\n console.log(d.id_str)\n console.log('\\n')\n });\n })\n}", "async function getHistoricalAll(){\n\ttry{\n\t\tlet response = await fetch(`https://corona.lmao.ninja/v2/historical/all`),\n\t \t\t data \t= await response.json();\n\t \t// converting an object to an array\n\t\t\tcasesDate = Object.entries(data.cases);\n\t\t\tdeathsDate = Object.entries(data.deaths);\n\t\t\trecoveredDate = Object.entries(data.recovered);\n\n\t\t// get historical data for the chart\n\t\tfor (var i = casesDate.length-14; i < casesDate.length; i++) {\n\t\t\txLabels.push(casesDate[i][0]);\n\t\t\tyCases.push(casesDate[i][1]);\n\t\t}\n\t\tfor (var i = deathsDate.length-14; i < deathsDate.length; i++) {\n\t\t\tyDeaths.push(deathsDate[i][1]);\n\t\t}\n\t\tfor (var i = recoveredDate.length-14; i < deathsDate.length; i++) {\n\t\t\tyRecovered.push(recoveredDate[i][1]);\n\t\t}\n\t}\n\tcatch(err){\n\t\tconsole.log(err);\n\t}\n}", "function concat() {\n if (dailyMail !== 'undefined') {\n allNews = theGuardian.concat(bbc, mirror, theTimes, dailyMail);\n allNews.forEach((allNews) => headLines.push(allNews.title));\n Display(allNews);\n console.log(allNews);\n // findHeadlines(headLines);\n } else concat();\n}", "function filterToday() {\n const dayStart = moment()\n .subtract(0, \"days\")\n .format(\"YYYY-MM-DD\")\n .toString();\n return (\n props.choice(\"Hôm Nay\"),\n props.timeStart(dayStart),\n props.timeEnd(dayStart),\n props.close()\n );\n }", "stageNewHeadlines(propsDate, prevProps) {\n if (this.headline === null) {\n let newHeadlines = headlines.filter(headline => {\n // prevents re-rendering infinite loop\n if (this.headline !== null) {\n return false;\n }\n\n let startDate = this.dateMap.get(headline);\n\n let endDate = new Date(\n `${headline.startYear}/${headline.startMonth}/${headline.startDay}`\n );\n\n endDate.setDate(endDate.getDate() + 5);\n\n return propsDate >= startDate && propsDate <= endDate;\n });\n if (newHeadlines.length === 1 && this.headline === null) {\n this.headline = newHeadlines[0];\n if (prevProps.play === this.props.play && !this.props.play) {\n this.props.updateProps({\n paused: true\n });\n }\n }\n }\n }", "function feed(horses) {\n var numHorses = horses.length;\n for (var i=0; i < horses.length; i++) {\n console.log(horses[i].name + ': Thanks for feeding me!');\n }\n console.log('done feeding!');\n}", "function testGetHeadlines() {\n var api = new GuardianApi();\n var headlines = api.getHeadlines();\n\n assert.eq(3, headlines.response.results.length);\n assert.eq(\"ok\", headlines.response.status);\n\n assert.eq(\"Extinction Rebellion guidance raises fresh concerns over Prevent\", headlines.response.results[0].fields.headline);\n assert.eq(\"https://media.guim.co.uk/3cf7fa7877d4fa2ac41b75b9e8e686a716fcafdb/449_174_4192_2516/500.jpg\", headlines.response.results[0].fields.thumbnail);\n assert.eq(\"https://www.theguardian.com/uk-news/2020/jan/12/extinction-rebellion-guidance-raises-fresh-concerns-over-prevent\", headlines.response.results[0].webUrl);\n\n assert.eq(\"Harry and Meghan’s conscious uncoupling from the royal family\", headlines.response.results[2].fields.headline);\n assert.eq(\"https://media.guim.co.uk/614a9bd82d924bc1c8b8e005166fe8717ef73f04/179_50_2381_1428/500.jpg\", headlines.response.results[2].fields.thumbnail);\n assert.eq(\"https://www.theguardian.com/uk-news/2020/jan/12/prince-harry-meghan-markle-conscious-uncoupling-royal-family-cut-ties-windsor\", headlines.response.results[2].webUrl);\n}", "getTitle() {\n return IsMorning(this.date) ? \"Sunrise - \" + this.date.toLocaleString() : \"Sunset - \" + this.date.toLocaleString();\n }", "function relatedEssays(data) {\n var contentES = '<div class=\"related-essays\">';\n\n $.each(data.descriptions, function(rInd, rElm) {\n var monthNames = [ \"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\n \"July\", \"August\", \"September\", \"October\", \"November\", \"December\" ];\n var createdDate = new Date(Date.parse(rElm.created_at));\n var showDate = monthNames[createdDate.getMonth()] + ' ' + createdDate.getDate() + ', ' + createdDate.getFullYear();\n contentES += '<h6>' + rElm.title + ' <small>by ' + rElm.author.fullname + ' (' + showDate + ')</small>' + '</h6>';\n contentES += rElm.content;\n });\n\n contentES += '</div>';\n\n $(\"#tab-essays\").append(contentES);\n\n}", "function News(props) {\n const { data } = useContext(NewsContext);\n console.log(data);\n\n return (\n <div>\n {/* <CategoriesBar /> */}\n <div className=\"all__news\">\n {data\n ? data.articles.map((news) =>\n news.source.name !== \"Google News\" && <Headline data={news} key={news.url} /> \n )\n : \"Loading\"}\n <hr className=\"cover-lines\"></hr>\n </div>\n </div>\n );\n}", "function show_headlines()\n{\n $('#headlines').show();\n}", "async function StoriesOnFrontPage() {\n const [frontStoryids] = await searchFor();\n const StoryIDs = [];\n const kidos = [];\n const Title = [];\n const Url = [];\n const requests = frontStoryids.map((x) =>\n fetch(`https://hacker-news.firebaseio.com/v0/item/${x}.json?print=pretty`)\n );\n const response = await Promise.all(requests);\n const filter = await Promise.all(response.map((res) => res.json()));\n for (const [k, v] of filter.entries()) {\n StoryIDs.push(v.id);\n kidos.push(v.kids);\n Url.push(v.url);\n Title.push(v.title);\n }\n return [StoryIDs, kidos, Title, Url];\n}", "title() {\n return `Number of live incidents: ${this.liveIncidents}`\n }", "function formatHeadline(text) {\n const categories = addCategory();\n const timeStamp = formatTimeAndDate(countryCode);\n const header = `<h4><a id=\"${timeStamp[1]}\" name=\"${timeStamp[1]}\"></a>${text} - ${timeStamp[0]} ${categories}</h4>`;\n return header;\n}", "function getHeadline(d) {\n\tconst match = headlineData.find(\n\t\th => h.month === d.month && h.year === d.year\n\t);\n\t// const match2 = headlinePrev.find(\n\t// \th => h.month === d.month && h.year === d.year\n\t// );\n\tif (!match) return 'N/A';\n\n\tconst { headline, common, demonym, city, web_url } = match;\n\n\tconst headlineS = Truncate({\n\t\ttext: headline,\n\t\tchars: charCount,\n\t\tclean: true,\n\t\tellipses: true\n\t});\n\tconst vals = [\n\t\t...common.split(':'),\n\t\t...demonym.split(':'),\n\t\t...city.split(':')\n\t];\n\n\tconst first = vals.find(v => v.includes(d.country[0]));\n\n\tif (!first) return 'N/A';\n\n\tconst firstWord = first\n\t\t.split('(')[1]\n\t\t.replace(')', '')\n\t\t.trim();\n\tconst lower = headline.toLowerCase();\n\tconst start = lower.indexOf(firstWord);\n\tconst end = start + firstWord.length;\n\n\tconst before = headlineS.substring(0, start);\n\tconst between = headlineS.substring(start, end);\n\tconst after = headlineS.substring(end, headlineS.length);\n\n\treturn {\n\t\theadline: `${before}<strong>${between}</strong>${after}`,\n\t\tweb_url\n\t\t// fresh: web_url !== match2.web_url\n\t};\n}", "function wikiOnLoad() {\n var mm = moment().format(\"MM\")\n var dd = moment().format(\"DD\")\n var queryURL=\"https://en.wikipedia.org/api/rest_v1/feed/onthisday/all/\" + mm + \"/\" + dd\n $(\".wiki-title\").html(\"<i class='fab fa-wikipedia-w'></i> <span class='wiki-day'>On This Day...</span>\")\n $.getJSON(queryURL, function(data) { // wikipedia api to get a summary based on button already created or new buttons added\n info = data.selected;\n console.log(data)\n console.log(info);\n var numArticles=10\n var wikiTable = $(\"<table class='table table-hover'>\")\n var wikiTbody= $(\"<tbody>\")\n wikiTbody.attr(\"id\", \"wiki-cards\")\n $(\".wiki-section\").empty();\n if (info.length < 10) {\n numArticles=info.length\n }\n for (i=0;i<numArticles;i++) {\n var year = info[i].year;\n var title = info[i].text;\n var url = info[i].pages[0].content_urls.desktop.page\n var wikiCard = $('<tr id=' + url + '><td><h6>' + year + '</h6><p>' + title + '</p></td></tr>');\n $(wikiTbody).append(wikiCard);\n }\n $(wikiTable).append(wikiTbody)\n $(\".wiki-section\").append(wikiTable)\n // $(\"#wikiInfo\").html(info); //where the summary is shown on the page\n });\n}", "function GGTRCC_RenderBowlingSummary (aPLSO, aBowlingGraphInfo)\r\n{\r\n\tvar lRet=\"\";\r\n\r\n\tlRet += \"<span class='GadgetStatsHeading'>Career Bowling Summary</span>\";\r\n\t\r\n\tif (0 == aBowlingGraphInfo.length)\r\n\t{\r\n\t\tlRet += \"<br>There is no Bowling record for this player<br><br>\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//\r\n\t\t// Do we have enough entries to warrent a graph?\r\n\t\t//\r\n\t\tif (1 < aBowlingGraphInfo.length)\r\n\t\t{\r\n\t\t\tlRet += GGTRCC_PlayerLTGraph_MakeBowlingGraphHTML (aBowlingGraphInfo) + \"<br><br>\";\r\n\t\t}\r\n\t\t\r\n\t\tlRet += GGTRCC_RenderBowlingTotals (aPLSO.mLifetimeBowlingTotals) + \"<br>\";\r\n\t}\r\n\r\n\treturn (lRet);\r\n}", "function howOften(jsonFeed){\r\n\tvar when = new Array(7);\r\n\twhen[0] = \"weekly\";\r\n\twhen[1] = 1; //code for when[0] (hardcoded to 'weekly' currently)\r\n\twhen[2] = \"thursdays\";\r\n\tvar today = new Date();\r\n\twhen[3] = today; //for setting up a regular transaction from today\r\n\twhen[4] = today.getDate();\r\n\twhen[5] = today.getMonth()+1;\r\n\twhen[6] = today.getFullYear();\r\n\t\r\n\treturn when;\r\n}", "async function blurb() {\n try {\n const nextResponse = await fetch(API_URL + `upcoming`);\n const nextResult = await nextResponse.json();\n const next = nextResult.find(function (due) {\n if (new Date(due.date_local).getTime() - new Date().getTime() > 0) {\n return due.date_local;\n };\n });\n countdown(next);\n const nextDate = new Date(next.date_local).toLocaleDateString(`en-GB`);\n nextLaunch.innerHTML = next.name;\n nextLaunchDate.innerHTML = nextDate;\n const prevResponse = await fetch(API_URL);\n const prevResult = await prevResponse.json();\n const prevResultReverse = prevResult.reverse();\n const prev = prevResultReverse.find(function (launch) {\n return !launch.upcoming;\n });\n const prevDate = new Date(prev.date_local).toLocaleDateString(`en-GB`);\n prevLaunch.innerHTML = prev.name;\n prevLaunchDate.innerHTML = prevDate;\n }\n catch (err) {\n console.log(err);\n }\n}", "function setUpNews(){\n\t$.getJSON('https://api.warframestat.us/xb1/news', function(newsData) {\n\t\t$('#News').empty();\n\t\tvar eta;\n\t\tfor(var i = newsData.length-1; i>=0;i--){\n\t\t\t$('#News').append(\"<div id =\\\"wrap\\\"> <p class = \\\"timer\\\" id = \\\"time\" + i + \"\\\"></p><p id = \\\"white\\\">\" + newsData[i].message + \"</p></div>\");\n\t\t\t//Below is used to fix the formatting if it happens\n\t\t\teta = newsData[i].eta;\n\t\t\teta = eta.split(\" \");\n\t\t\tif(eta[0] == \"in\")\n\t\t\t\teta[0] = eta[1];\n\n\t\t\t//fix the -hr or day problem when the API oddly sets the eta to a - value instead of positve ago\n\t\t\teta[0] = eta[0].split(\"-\");\n\t\t\tif(eta[0][0] == \"\"){\n\t\t\t\teta[0] = eta[0][1];\n\t\t\t}\n\t\t\tdocument.getElementById(\"time\"+i).innerHTML = eta[0];\n\t\t}\n\t});\n}", "function whatReallyHappensToday() {\n\tvar disasterList = [];\n\tvar probV = Math.random();\n\tvar probT = Math.random();\n\tvar probE = Math.random();\n\tvar probB = Math.random();\n\tvar probM = Math.random();\n\tif(probV < .1) {\n\t\tdisasterList.push(\"volcano\");\n\t}\n\tif(probT < .15) {\n\t\tdisasterList.push(\"tsunami\");\n\t}\n\tif(probE < .20) {\n\t\tdisasterList.push(\"earthquake\");\n\t}\n\tif(probB < .25) {\n\t\tdisasterList.push(\"blizzard\");\n\t}\n\tif(probM < .30) {\n\t\tdisasterList.push(\"meteor strike\");\n\t}\n\tconsole.log(disasterList);\n\tif(disasterList.length > 0) {\n\t\tconsole.log(\"Today Kenny has died in the following accidents: \" + disasterList + \" ... bummer.\");\n\t} else {\n\t\tconsole.log(\"Kenny isn't dead!?\");\n\t}\n}", "renderMeals(date){\n const { weekPlan = [] } = this.context;\n const meals = getMeals(weekPlan, date) || {};\n \n if (meals.breakfast === undefined){return}\n\n return (\n <ul>\n {meals.breakfast.length > 0 && <li>\n <h3>Breakfast</h3>\n <ul>\n {meals.breakfast.map(recipe =>\n <li key={recipe}>\n {recipe}\n </li>)}\n </ul>\n </li>}\n {meals.lunch.length > 0 && <li>\n <h3>Lunch</h3>\n <ul>\n {meals.lunch.map(recipe =>\n <li key={recipe}>\n {recipe}\n </li>)}\n </ul>\n </li>}\n {meals.dinner.length > 0 && <li>\n <h3>Dinner</h3>\n <ul>\n {meals.dinner.map(recipe =>\n <li key={recipe}>\n {recipe}\n </li>)}\n </ul>\n </li>}\n {meals.snack.length > 0 && <li>\n <h3>Snack</h3>\n <ul>\n {meals.snack.map(recipe =>\n <li key={recipe}>\n {recipe}\n </li>)}\n </ul>\n </li>}\n </ul>\n )\n }", "function renderHeader() {\n\n var today = new Date();\n //alert(\"today: \" + today);\n var day = moment(today).date();\n\n var month = getMonth(moment(today).month());\n //var year = moment(today).year();\n\n var year = moment(today).year();\n \n // create today's date to be used as a key for storing the work schedule on local storage\n todayDate = day + \"/\" + month + \"/\" + year;\n //alert(\"todayDate: \" + todayDate);\n \n var weekDay = getWeekDay(moment(today).weekday());\n\n var currentDayVal = weekDay + \", \" + month + \" \" + day;\n $(\"#currentDay\").text(currentDayVal);\n}", "function getStoriesData() {\n\t\t// GET PAGE DOMAIN\n\t\tvar domain = document.domain;\n\t\t// CALL TO CHARTBEAT TO GET TOP TRENDING STORIES ON THAT DOMAIN\n\t\t$.get('http://api.chartbeat.com/live/toppages/v3/?apikey=11a05962fa65ba821e3a53cc8c52520c&host=daytondailynews.com ')\n\t\t.then(function(result) {\n\t\t\tconsole.log(result);\n\t\t\t// LOOP THROUGH TRENDING PIECES\n\t\t\tfor (i in result.pages) {\n\t\t\t\t// IF IT'S AN ARTICLE AND NOT flatpage-for-wraps\n\t\t\t\tif (result.pages[i].stats.article>0 && result.pages[i].title!='flatpage-for-wraps') {\n\t\t\t\t\t// ADD ONE TO NUMBER OF STORIES COUNT\n\t\t\t\t\tkn_data.number_of_stories++;\n\t\t\t\t\t// CALL FUNCTION TO GET UUID WITH PHP FILE\n\t\t\t\t\tgetUUID(result.pages[i].path, result.pages[i].stats.visits);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\toutputTrending();\n\t\t});\n\t}", "function inTodayPage() {\n\n // 1. Find the Day view list\n return Q.fcall(function () {\n return uia.root().findFirst(function (el) { return (el.name.indexOf(\"Day View\") > -1); }, 0, 2);\n\n }).then(function (dayView) {\n\n // 2. Filter out the next meeting\n // We check from the very first meeting on today \n var firstMeeting = dayView.firstChild();\n console.log(\"First meeting is \" + firstMeeting.name);\n\n if ((firstMeeting == null) || (firstMeeting.name.indexOf(\"Subject\") <= -1)) {\n\n // There is no first meeting --> There is no meeting for today\n narrator.say(\"You don't have a meeting today\");\n\n } else { // We have a first meeting. \n\n var hasNext = false;\n\n // Get today's parsed date string \n var currentTimeValue = Date.now();\n\n while (firstMeeting.nextSibling() != null) { // While loop \n\n var firstMeetingName = firstMeeting.name;\n\n if (firstMeetingName != null) {\n\n var firstMeetingNameArray = firstMeetingName.split(\",\"); // By comma to get the date string\n\n // Get the start time string which contains start and end time, should be the third one\n var startFromTimeStr = firstMeetingNameArray[2];\n // Get only the start time\n var startTime = startFromTimeStr.split(\" \")[3];\n\n // Create the time string, in a format that Date module likes\n var timeString = firstMeetingNameArray[0] + \", \" + firstMeetingNameArray[1] + \", \" + startTime;\n\n var meetingParsedTimeValue = Date.parse(timeString);\n\n if (meetingParsedTimeValue >= currentTimeValue) {\n hasNext = true;\n narrator.say(\"Your next meeting today is \" + firstMeetingName);\n break;\n }\n\n } else {\n // There might be an error. \n narrator.say(\"Unable to get the name of the first meeting. Please try again. \");\n throw new Error(\"Unable to get the name of the first meeting. Something wrong happened.\");\n }\n\n firstMeeting = firstMeeting.nextSibling();\n }\n\n if (!hasNext) {\n narrator.say(\"You have no meeting left for today.\");\n }\n\n }\n\n // Promise needs to return\n return \"Fulfilled\";\n\n }, function (error) { throw new Error(\"The promise of getting the Day View list fails. \"); });\n\n}", "function view_showHistorical() {\n\tdocument.getElementById(\"historical\").style.display = \"block\";\n\tdocument.getElementById(\"location\").style.display = \"none\";\n\tdocument.getElementById(\"basic\").style.display = \"none\";\n}", "function showAllNews() {\n const url = 'news/allNews?socketId=' + getSocketId();\n return displayNewsInfo(url, 'All');\n}", "getTodaysSpecialsList() {\n const queriedDay = getQueryString('day', window.location.href);\n if(queriedDay) {\n return Object.keys(this.props.weeklySpecials).filter(key => this.props.weeklySpecials[key].specialDay === toTitleCase(queriedDay));\n } else {\n return Object.keys(this.props.weeklySpecials).filter(key => this.props.weeklySpecials[key].specialDay === getCurrentWeekday());\n } \n }", "function loadTimelineEvents() {\n var chaplainID = window.location.pathname.match( /\\d+/ )[0];\n loadchart(\"svgContent\", window.origin + \"/bojanglers/chaplain/\"+chaplainID+\"/geteventsjson/\");\n}", "function randomContent() {\n var d = new Date();\n var hour = d.getHours();\n var day = d.getDay();\n var month = d.getMonth();\n var year = d.getFullYear();\n if (hour == 7) {\n var page = pages[(hour + day + month + year) % pages.length];\n return page;\n }\n else {\n var page = pages[(7 + day + month + year) % pages.length];\n return page;\n }\n}", "function showYesterdayAnswers() {\n let lines = gameAnswersYesterday.map(\n (answer) =>\n // Mark the guessed answers with an asterisk. This of course\n // throws of perfect word alignment due to proportional font,\n // since asterisk is wider than space, but I don't care\n // enough to make it perfect. Easy fix would be to use\n // a monospace font.\n `<p class=\"flexP\">${\n answerListYesterday.includes(answer) ? '*&nbsp;' : '&nbsp;&nbsp;&nbsp;'\n }${answer}</p>`\n );\n lines = lines.join('\\n');\n // Create a mini section of HTML to display the header and\n // answers.\n let html = `<div>\n <h3 id=\"yesterdayHdr\">Yesterday's Answers</h3>\n <div id=\"displayAnswers\" style=\"height:${displayAnswerHeight}px\">\n ${lines}\n </div>\n </div>`;\n displayModal(html);\n}", "function HeadlineTitle(props) {\n if (props.query) {\n return <h1>Headlines {props.query} </h1>;\n } else {\n return <h1>Headlines</h1>;\n }\n return null;\n}", "function render_headlines(headlines)\n {\n var headline_cards = [];\n for (var i = 0; i < headlines.length; i++)\n {\n headline_cards.push(create_card(headlines[i]));\n }\n headline_container.append(headline_cards);\n }", "function listUpcomingHomework() {\n\n // GETS TODAY'S DATE\n var todayDate = new Date(),\n d = todayDate.getDate(),\n m = todayDate.getMonth() + 1,\n today;\n\n if (d < 10) {\n d = \"0\" + d;\n }\n if (m < 10) {\n m = \"0\" + m;\n }\n\n today = m + \"-\" + d;\n console.log('Today is: ' + today);\n\n\n var request = gapi.client.calendar.events.list({\n 'calendarId': 'primary',\n 'timeMin': (new Date()).toISOString(),\n 'showDeleted': false,\n 'singleEvents': true,\n 'maxResults': 20,\n 'orderBy': 'startTime'\n });\n\n request.execute(function(resp) {\n var events = resp.items;\n \n if (events.length > 0) {\n for (i = 0; i < events.length; i++) {\n\n var event = events[i];\n var when = event.start.date;\n if (!when) {\n when = event.start.date;\n }\n \n // EVENT NAME\n var str = event.summary;\n var strLength = str.length;\n \n // IF CATCHES HOMEWORK EVENT\n if (str.indexOf('HOMEWORK') > -1) {\n console.log(str.substring(11, strLength) + '\\nDue on ' + when.substring(5, 100));\n writeHomework(str.substring(11, strLength) + ' Due on ' + when.substring(5, 100));\n \n // ALERT IF HOMEWORK IS DUE TODAY\n if(when.substring(5,100) == today && isHomework != 1){\n alert(\"You Have Homework due today!\");\n }\n\n isHomework = 1;\n }\n }\n }\n\n // IF NO HOMEWORK EVENT IS FOUND\n if (isHomework != 1) {\n console.log(\"no homework found\");\n writeHomework('No upcoming homework found!');\n }\n \n });\n}", "function buildHeadlineSection() {\n // check refreshData boolean - this will tell us if we have to call the API or use data from local storage.\n // var refreshData = true; // DEBUG - REMOVE WHEN GOING LIVE (uncomment this to force use of livescore API).\n console.log(\"refreshData: \" + refreshData); //DEBUG - REMOVE WHEN GOING LIVE.\n if (refreshData) {\n // refresh true therefore we will call the livescore API and pull new data.\n callLivescoreApi();\n } else {\n // refresh false therefore we will use the saved headline data from local storage.\n // call function to render headline data to the screen.\n renderHeadlineData();\n }\n \n // store headline data into local storage.\n function storeHeadlineDataInLocalStorage(headlineText, headlineUrl, headlineImage) {\n var newHeadlineDetails = {\n text: headlineText,\n url: headlineUrl,\n image: headlineImage,\n };\n // Get existing stored details\n if (localStorage.getItem(\"headlineData\") != null) {\n storedHeadlineData = JSON.parse(localStorage.getItem(\"headlineData\"));\n }\n \n storedHeadlineData.push(newHeadlineDetails);\n localStorage.setItem(\"headlineData\", JSON.stringify(storedHeadlineData));\n }\n \n // get headline data from local storage.\n function getHeadlineDataFromLocalStorage() {\n storedHeadlineData = JSON.parse(localStorage.getItem(\"headlineData\"));\n }\n \n // function to call the livescore API.\n function callLivescoreApi() {\n // setup ajax livescore api parameters.\n const livescoreParams = {\n async: true,\n crossDomain: true,\n url:\n \"https://livescore-football.p.rapidapi.com/soccer/news-list?page=1\",\n method: \"GET\",\n headers: {\n \"x-rapidapi-key\": liveScoreApiKey,\n \"x-rapidapi-host\": \"livescore-football.p.rapidapi.com\",\n },\n };\n \n // call livescore api.\n $.ajax(livescoreParams).done(function (response) {\n console.log(\"**** livescore (headlines) API used ****\"); //DEBUG - REMOVE WHEN GOING LIVE.\n // as we are pulling new data to display update the saved date in local storage to todays date.\n localStorage.setItem(\"savedDate\", today);\n // clear out old headline data from local storage before loading new data.\n localStorage.removeItem(\"headlineData\");\n // loop thru response data 10 times to get top 10 headlines and then store in local storage.\n for (var i = 0; i < 14; i++) {\n var urlText = response.data[i].title;\n var urlLink = response.data[i].url;\n var urlImage = response.data[i].image;\n // call function to store data to local storage.\n storeHeadlineDataInLocalStorage(urlText, urlLink, urlImage);\n }\n // call function to render headline data to the screen.\n renderHeadlineData();\n });\n }\n // render headline data to the screen.\n function renderHeadlineData() {\n // call function to get headline data from local storage.\n getHeadlineDataFromLocalStorage();\n var nth = 0;\n $(\".orbit-container li\").empty();\n // loop round local storage headline data and build elements to screen.\n for (let i = 0; i < storedHeadlineData.length; i++) {\n if (i < 4) {\n var orbitURL = storedHeadlineData[i].url;\n var orbitImgSrc = storedHeadlineData[i].image;\n var orbitFigcaptionText = storedHeadlineData[i].text;\n var orbitFigureTag = $(\"<figure>\").addClass(\"orbit-figure\");\n var orbitATag = $(\"<a>\").attr({ href: orbitURL, target: \"_blank\" });\n var orbitImgTag = $(\"<img>\").addClass(\"orbit-image\").attr({ src: orbitImgSrc, alt: \"alt text\" });\n var orbitFigcaptionTag = $(\"<figcaption>\").addClass(\"orbit-caption\").text(orbitFigcaptionText);\n orbitATag.append(orbitImgTag, orbitFigcaptionTag);\n orbitFigureTag.append(orbitATag);\n nth = nth + 1;\n $(\".orbit-container li:nth-child(\" + nth + \")\").append(orbitFigureTag);\n }\n else {\n var newHeadline = $(\"<li>\").addClass(\"headline\");\n var newHeadlineLink = $(\"<a>\")\n .attr({ href: storedHeadlineData[i].url, target: \"_blank\" })\n .text(storedHeadlineData[i].text);\n newHeadline.append(newHeadlineLink);\n $(\".headline-section\").append(newHeadline);\n }\n }\n }\n }", "async function getCovidFreeHeadlines(language, country) {\n // get the headlines\n const articles = (await newsapi.v2.topHeadlines({ language, country })).articles;\n\n // reduce to a set of articles to a subset without covid\n const covidFree = articles.reduce((safe, article) => {\n // if the article is covid free, add it to the 'safe' array\n if (!articleContainsCovid(article)) {\n safe.push(article);\n }\n return safe;\n }, []);\n\n // return covidFree articles\n return covidFree;\n}", "displayAllThings (allThings) {\n\n let outputAll = '<h3> Available Things: </h3>';\n for (let i = 0; i< allThings.length; i++) {\n\n _name = allThings[i].Thing_name\n _uid = allThings[i].Thing_UID\n _status = allThings[i].Thing_status\n\n outputAll +=\n ` <ul>\n <li> <b>---- Thing ${i+1} </b> </li>\n <li> <b> Thing- Name </b>: ${_name} </li>\n <li> <b>Thing- UID </b>: ${_uid} </li> \n <li> <b>Thing- Status </b>: ${_status} </li> \n </ul> \n `\n } \n document.getElementById ('outputAll').innerHTML = outputAll;\n }", "function listUpcomingEvents() {\n var roosterID = 'thrillist.com_2d3936303334393335393533@resource.calendar.google.com';\n var sharkTankID = '[email protected]';\n var wombatID = 'thrillist.com_2d3535373539383936343135@resource.calendar.google.com';\n var elephantID = 'thrillist.com_2d3239313936373834383339@resource.calendar.google.com';\n var meerkatID = 'thrillist.com_2d31393431303037352d3332@resource.calendar.google.com';\n var gorillaID = 'thrillist.com_2d37323835323835332d353234@resource.calendar.google.com';\n var sasquatchID = 'thrillist.com_2d3631393431393134323331@resource.calendar.google.com';\n var chipmunkID = 'thrillist.com_2d34303432303330342d373136@resource.calendar.google.com';\n var ostritchID = 'thrillist.com_3135313833383834363636@resource.calendar.google.com';\n var giraffeID = 'thrillist.com_2d3630313530313135313732@resource.calendar.google.com';\n var pandaID = 'thrillist.com_2d3430383731353137353131@resource.calendar.google.com';\n var sealID = 'thrillist.com_2d3732343833303537313735@resource.calendar.google.com';\n var lionsDenID = 'thrillist.com_436f6e663630354c696f6e7344656e2d393437363336@resource.calendar.google.com';\n\n var calendarRequest = function(calendarID) {\n var timeMin = new Date();\n var timeMax = new Date().setHours(24, 0, 0);\n timeMax = new Date(timeMax);\n\n return gapi.client.calendar.events.list({\n 'calendarId': calendarID,\n 'timeMin': timeMin.toISOString(),\n 'timeMax': timeMax.toISOString(),\n 'showDeleted': false,\n 'singleEvents': true,\n 'orderBy': 'startTime'\n });\n };\n\n var roosterEvents = calendarRequest(roosterID);\n var sharkTankEvents = calendarRequest(sharkTankID);\n var wombatEvents = calendarRequest(wombatID);\n var elephantEvents = calendarRequest(elephantID);\n var meerkatEvents = calendarRequest(meerkatID);\n var gorillaEvents = calendarRequest(gorillaID);\n var sasquatchEvents = calendarRequest(sasquatchID);\n var chipmunkEvents = calendarRequest(chipmunkID);\n var ostritchEvents = calendarRequest(ostritchID);\n var giraffeEvents = calendarRequest(giraffeID);\n var pandaEvents = calendarRequest(pandaID);\n var sealEvents = calendarRequest(sealID);\n var lionsDenEvents = calendarRequest(lionsDenID);\n\n var batch = gapi.client.newBatch();\n\n batch.add(roosterEvents, {'id': 'roosterEvents'});\n batch.add(gorillaEvents, {'id': 'gorillaEvents'});\n batch.add(sharkTankEvents,{'id': 'sharkTankEvents'});\n batch.add(wombatEvents, {'id': 'wombatEvents'});\n batch.add(elephantEvents, {'id': 'elephantEvents'});\n batch.add(sasquatchEvents,{'id': 'sasquatchEvents'});\n batch.add(meerkatEvents, {'id': 'meerkatEvents'});\n batch.add(chipmunkEvents, {'id': 'chipmunkEvents'});\n batch.add(ostritchEvents, {'id': 'ostritchEvents'});\n batch.add(giraffeEvents, {'id': 'giraffeEvents'});\n batch.add(pandaEvents, {'id': 'pandaEvents'});\n batch.add(sealEvents, {'id': 'sealEvents'});\n batch.add(lionsDenEvents, {'id': 'lionsDenEvents'});\n\n batch.execute(createRooms);\n\n function createRooms(responseMap) {\n var rooms = [];\n\n var room = function(id, name, floor, events, icon) {\n console.log(events)\n return {\n 'id': id,\n 'name': name,\n 'floor': floor,\n 'events': events.result.items,\n 'icon': icon\n };\n };\n\n var rooster = room(roosterID, 'Rooster', 4, responseMap.roosterEvents, '/icons/animals/rooster.png');\n var gorilla = room(gorillaID, 'Gorilla', 4, responseMap.gorillaEvents, '/icons/animals/gorilla.png');\n var sharkTank = room(sharkTankID,'Shark Tank',4, responseMap.sharkTankEvents, '/icons/animals/shark.png');\n var wombat = room(wombatID, 'Wombat', 4, responseMap.wombatEvents, '/icons/animals/wombat.png');\n var elephant = room(elephantID, 'Elephant', 4, responseMap.elephantEvents, '/icons/animals/elephant.png');\n var sasquatch = room(sasquatchID,'Sasquatch', 4, responseMap.sasquatchEvents, '/icons/animals/sasquatch.png');\n var meerkat = room(meerkatID, 'Meerkat', 5, responseMap.meerkatEvents, '/icons/animals/meerkat.png');\n var giraffe = room(giraffeID, 'Giraffe', 5, responseMap.giraffeEvents, '/icons/animals/giraffe.png');\n var chipmunk = room(chipmunkID, 'Chipmunk', 5, responseMap.chipmunkEvents, '/icons/animals/chipmunk.png');\n var ostritch = room(ostritchID, 'Ostritch', 5, responseMap.ostritchEvents, '/icons/animals/ostrich.png');\n var panda = room(pandaID, 'Panda', 6, responseMap.pandaEvents, '/icons/animals/panda.png');\n var seal = room(sealID, 'Seal', 6, responseMap.sealEvents, '/icons/animals/seal.png');\n var lionsDen = room(lionsDenID, 'Lions Den', 6, responseMap.lionsDenEvents, '/icons/animals/lion.png');\n\n rooms.push(elephant, rooster, sharkTank, wombat, gorilla, sasquatch, chipmunk, giraffe, meerkat, ostritch, panda, seal, lionsDen);\n\n rooms.forEach(function(room) {\n findIfOccupied(room);\n findNextAvailableTime(room, 0);\n findAvailableUntilTime(room);\n addRow(room);\n });\n $('[data-toggle=\"tooltip\"]').tooltip({\n html: true\n });\n\n function findIfOccupied(room) {\n var isOccupied = false;\n\n if (room.events.length > 0) {\n var now = new Date();\n var start = new Date(room.events[0].start.dateTime);\n var end = new Date(room.events[0].end.dateTime);\n\n if (start < now && end > now) {\n isOccupied = true;\n }\n }\n else {\n room.isOccupied = false;\n }\n\n room.isOccupied = isOccupied;\n };\n\n function findNextAvailableTime(room, index) {\n var nextAvailableTime = new Date();\n\n if (room.events.length === 0) {\n var now = new Date();\n\n if (now.getMinutes() < 30) {\n nextAvailableTime.setHours(now.getHours(), 30, 0);\n }\n else {\n nextAvailableTime.setHours(now.getHours() + 1, 0, 0);\n }\n }\n else {\n if (room.events[index + 1] == undefined) {\n nextAvailableTime = new Date(room.events[index].end.dateTime);\n }\n else {\n var currentEndTime = new Date(room.events[index].end.dateTime);\n var nextStartTime = new Date(room.events[index+1].start.dateTime);\n var secsUntilNextEvent = nextStartTime - currentEndTime;\n // if there is no time in between the end of the current event and the start of the next,\n // recursively call this function and look at the next set of meetings\n if (secsUntilNextEvent === 0) {\n findNextAvailableTime(room, index + 1);\n return false;\n }\n // TO DO: secsUntilNextEvent should be the maximum time you can book the room to ensure that\n // we do not try to book a room that is booked at an odd time like on the 15's or 45's\n //\n // if there is some time in between the end of the current meeting and the start of the next,\n // the next available time for the room is the end of the current meeting\n else {\n nextAvailableTime = currentEndTime;\n }\n }\n }\n room.nextAvailableTime = nextAvailableTime;\n\n if (room.nextAvailableTime) {\n setDisplayTime();\n setNextAvailableEndTime();\n\n function setNextAvailableEndTime() {\n if (room.events[index + 1]) {\n room.nextAvailableEndTime = new Date(room.events[index + 1].start.dateTime);\n }\n }\n\n function setDisplayTime() {\n var displayHours = room.nextAvailableTime.getHours();\n var displayMins = room.nextAvailableTime.getMinutes();\n var meridian = 'am';\n\n if (displayHours > 11) {\n meridian = 'pm';\n }\n if (displayHours > 12) {\n displayHours = displayHours - 12;\n }\n if (displayMins < 10) {\n displayMins = '0' + displayMins;\n }\n room.nextAvailableTimeDisplay = displayHours + ':' + displayMins + meridian;\n }\n }\n };\n\n function findAvailableUntilTime(room) {\n // if there are no upcoming events for the room, it is available for the rest of the day\n // the next available time to book will last until the next 30m or the next hour (whatever is first)\n if (room.events.length === 0) {\n var now = new Date();\n if (now.getMinutes() < 30) {\n var availableUntil = new Date().setHours(now.getHours(), 30, 0);\n }\n else {\n var availableUntil = new Date().setHours(now.getHours() + 1, 0, 0);\n }\n room.availableUntil = new Date(availableUntil);\n room.availableUntilDisplay = 'Available for the rest of the day';\n }\n // if there are upcoming events, the room is available until the start of the next event\n else {\n room.availableUntil = new Date(room.events[0].start.dateTime);\n var displayHours = room.availableUntil.getHours();\n var displayMins = room.availableUntil.getMinutes();\n var meridian = 'am';\n\n if (displayHours > 12) {\n displayHours = displayHours - 12;\n meridian = 'pm';\n }\n if (displayMins < 10) {\n displayMins = '0' + displayMins;\n }\n room.availableUntilDisplay = 'Available until ' + displayHours + ':' + displayMins + meridian;\n }\n }\n\n function addRow(room) {\n // put a new row on the table\n var tableBody = document.getElementById('rooms-table').getElementsByTagName('tbody')[0];\n var newRow = tableBody.insertRow(tableBody.rows.length);\n // put a class on the row representing the floor number so we can filter on it later\n $(newRow).addClass('' + room.floor + '');\n\n // ROOM COLUMN\n var iconCell = newRow.insertCell(0);\n var roomCell = newRow.insertCell(0);\n var roomDiv = document.createElement('div');\n var roomIcon = new Image(16, 16);\n roomIcon.src = room.icon;\n var roomIconDiv = document.createElement('div');\n roomIconDiv.appendChild(roomIcon);\n var roomTextDiv = document.createElement('div');\n var roomText = document.createTextNode(room.name);\n roomText.id = room.name;\n roomTextDiv.appendChild(roomText);\n roomDiv.appendChild(roomTextDiv);\n roomCell.appendChild(roomIconDiv);\n roomCell.appendChild(roomDiv);\n\n\n // MEETING TITLE COLUMN\n var meetingCell = newRow.insertCell(1);\n var meetingText = document.createElement('span');\n\n // BOOK NOW BUTTON\n var bookNowButtonCell = newRow.insertCell(2);\n $(bookNowButtonCell).addClass('text-center');\n var bookNowButton = document.createElement('button');\n $(bookNowButton).attr('id', 'bookNow_' + room.name);\n // if the room is occupied show the current meeting and disable the book now button\n if (room.isOccupied) {\n $(meetingText).text(room.events[0].summary);\n\n $(bookNowButton).addClass('btn btn-xs btn-default disabled');\n $(bookNowButton).text('not available');\n }\n // if the room is open show that it is available with a book now button and text in the meeting column\n else {\n $(bookNowButton).addClass('btn btn-xs btn-primary');\n $(bookNowButton).text('book now');\n $(bookNowButton).attr('roomID', room.id);\n $(bookNowButton).attr('nextAvailableTime', room.nextAvailableTime);\n $(bookNowButton).attr('availableUntil', room.availableUntil);\n\n $(bookNowButton).one(\"click\", function() {\n book('now', $(this), room);\n //bookNow( $(this), room );\n });\n\n $(meetingText).text(room.availableUntilDisplay);\n }\n bookNowButtonCell.appendChild(bookNowButton);\n\n meetingCell.appendChild(meetingText);\n $(meetingCell).attr('id', 'meetingCell_' + room.name);\n\n if (room.events.length > 0) {\n addToolTip(room, $(meetingText));\n }\n\n // BOOK LATER BUTTON\n var bookLaterButtonCell = newRow.insertCell(3);\n $(bookLaterButtonCell).addClass('text-center');\n var bookLaterButton = document.createElement('button');\n $(bookLaterButton).attr('id', 'bookLater_' + room.name);\n\n if (!room.isOccupied && room.events.length > 0) {\n addToolTip(room, $(meetingText));\n }\n $(bookLaterButton).addClass('btn btn-xs btn-default');\n $(bookLaterButton).text(room.nextAvailableTimeDisplay);\n $(bookLaterButton).attr('nextAvailableTime', room.nextAvailableTime);\n $(bookLaterButton).attr('nextAvailableEndTime', room.nextAvailableEndTime);\n $(bookLaterButton).attr('roomID', room.id);\n bookLaterButtonCell.appendChild(bookLaterButton);\n\n $(bookLaterButton).one(\"click\", function() {\n book('later', $(this), room);\n // bookLater( $(this) );\n });\n\n nextAvailableTimeContainer = document.createElement('span');\n nextAvailableTimeInput = '<input id=\"nextTime_' + room.id + '\" type=\"hidden\" value=\"' + room.nextAvailableTime + '\">';\n $(nextAvailableTimeContainer).html(nextAvailableTimeInput);\n bookLaterButtonCell.appendChild(nextAvailableTimeContainer);\n };\n console.log(rooms);\n displayRoomInfo();\n };\n}", "function loadLink() {\n var d = new Date();\n day = d.getDay();\n loadTimeTable(day);\n let todayData = document.getElementById(\"todayData\");\n let nextData = document.getElementById(\"nextPeriodData\");\n if (day == 0 || day == 6) {\n document.getElementById(\"post\").innerHTML =\n \"<img src='assets/img/weekend.jpg' width='500'/>\";\n } else {\n h = d.getHours();\n m = d.getMinutes();\n todayData.innerHTML = getPeriod(day, h);\n nextData.innerHTML = getPeriod(day, h + 1);\n }\n}", "function concertThis() {\n console.log(`\\n - - - - -\\n\\nLOOKING FOR...${userQuery}'s next show...`);\n request(\"https://rest.bandsintown.com/artists/\" + userQuery + \"/events?app_id=\" + bandsintown, function (error, response, body) {\n if (!error && response.statusCode === 200) {\n let theBand = JSON.parse(body);\n if (theBand.length > 0) {\n for (i = 0; i < 1; i++) {\n\n console.log(`\\nHere you go...\\n\\nArtist: ${theBand[i].lineup[0]} \\nVenue: ${theBand[i].venue.name}\\nVenue Location: ${theBand[i].venue.latitude},${theBand[i].venue.longitude}\\nVenue City: ${theBand[i].venue.city}, ${theBand[i].venue.country}`)\n let concertDate = moment(theBand[i].datetime).format(\"MM/DD/YYYY hh:00 A\");\n console.log(`Date and Time: ${concertDate}\\n\\n- - - - -`);\n };\n } else {\n console.log('Nada, Zip, Zilch!');\n };\n };\n });\n}", "function getHeadlines () {\n const cheerio = require('cheerio');\n const request = require('request');\n \n const url = 'https://www.kompas.com';\n \n request(url, (error, response, body) => {\n if (!error && response.statusCode === 200) {\n let $ = cheerio.load(body);\n $('h2.headline__thumb__title').each(function(i, element){\n var a = $(this).prev();\n console.log(a.text());\n let title = $(this).text();\n let URL = $(this).parents().attr('href');\n console.log(`TITLE: ${title}`);\n console.log(`URL: ${URL}`);\n });\n \n } else {\n console.error(error.message);\n }\n });\n\n}", "function dailyDescription() {\n return `No meatballs today: ${weather.description} currently. The high will be ${weather.temp_max} °F with a low of ${weather.temp_min} °F`;\n}", "function showWeekDates(date) {\n let header;\n for (let i=0; i<=6; i++) {\n let day_name = getDayName(i);\n header = document.querySelector('#'+day_name + ' .wc_date');\n header.innerHTML = date[i];\n // check if current date is today\n if(date[i] == getShortDate(new Date())[0]) {\n document.querySelector('#'+day_name + ' .day_header').classList.add('today');\n }\n }\n}", "function getHeadlinesPerDay () {\n headlinesPerDay = parseInt($('#headlines-per-day').val());\n return headlinesPerDay;\n }", "function getTopStories() {\r\n $.ajax({\r\n url: baseUri + \"topstories.json?print=pretty\",\r\n async: false,\r\n success: function (data) {\r\n buildUnorderedList(data);\r\n }\r\n });\r\n }", "function nowPresentation() {\n ajax(\"GET\", \"/rooms/now\", fillRoomList);\n home.css(\"margin-top\", \"5%\");\n home.find(\"span\").css(\"cursor\", \"pointer\");\n homebtn.hide();\n roomList.show();\n roomListLater.hide();\n roomListEdit.hide();\n roomListDisplay.hide();\n}", "function getNPR_StoryHTML(stories) {\n var storyHTML = '<ul>'; \n var paraArray;\n var title;\n var link;\n var storyDate;\n \n var endDate = new Date();\n var startDate = new Date(endDate - (1000*3600*24*60));\n\n for (var i = 0, n = stories.length; i < n; i++) { \n \n storyDate = new Date(stories[i].storyDate.$text);\n \n if ((storyDate <= endDate) && (storyDate >= startDate)) {\n\n paraArray = stories[i].textWithHtml.paragraph; \n title = stories[i].title.$text;\n link = stories[i].link[0].$text;\n storyHTML += '<li id=\"story_' + i + '\">'\n + '<h5 class=\"title\">'\n + '<div class=\"storyTitle\">'\n + '<span class= \"pointRight\"><i class=\"fa fa-chevron-right\"></i></span>'\n + '<span class= \"pointDown hide\"><i class=\"fa fa-chevron-down\"></i></span>'\n + '<p>' + title + '</p>'\n + '</div>'\n + '</h5>'\n + '<p class=\"hide storyDate\"><a href=\"' + link + '\"><small>' + storyDate + '</small></a></p>'\n + '<div class=\"hide detail\">';\n\n for (var j = 0, m = paraArray.length; j < m; j++) { \n if (typeof paraArray[j].$text !== 'undefined') {\n storyHTML += '<p>&nbsp;&nbsp;&nbsp;&nbsp;' \n + paraArray[j].$text\n + '</p>';\n }\n }\n storyHTML += '<div class=\"endStory\" name=\"story_' + i + '\">'\n + '<span class= \"pointUp\"><i class=\"fa fa-chevron-up fa-2x\"></i></span>'\n + '</div>'\n + '</div></li>';\n }\n }\n storyHTML += '</ul>';\n \n if (storyHTML === '<ul></ul>') {\n storyHTML = '<p>There are no stories for the selected topic between ' + startDate + ' & ' + endDate + '.</p>';\n }\n return storyHTML;\n }", "function getTrailheadInfo() {\n var trailheads = [];\n var urls = JSON.parse(fs.readFileSync('trailhead-urls.json', 'utf8'));\n urls.forEach((url) => {\n rp(url).then((html) => {\n const $ = cheerio.load(html);\n const name = $('#mainContent > h1').text().trim();\n const lat = parseFloat($('#mw-content-text > ul > li:nth-child(1)').slice(0,1).text().slice(11).trim());\n const lng = parseFloat($('#mw-content-text > ul > li:nth-child(2)').text().slice(12).trim());\n const driveTime = $('#mw-content-text > ul > li').slice(4, 5).text().slice(29).trim();\n let trailhead = new Trailhead(name, url, driveTime, lat, lng);\n if (trailhead.geometry.coordinates[1] >= 45) {\n trailheads.push(trailhead);\n }\n fs.writeFileSync('trailhead-info2.json', JSON.stringify(trailheads));\n });\n })\n}", "function displayOclinics () {\n\n var d = new Date();\n\tvar month = d.getMonth();\n\tvar date = d.getDate();\n var may = Object.keys(Oclinicsmay);\n var june = Object.keys(Oclinicsjune);\n for (var i = 0; i < (may.length + june.length); i++) {\n $(\"#oevents\" + i).html('');\n }\n // see if there are any Officials Clinics in May and display them ---------\n if (may.length > 0) {\n\n for (var i = 0; i < may.length; i++) {\n $(\"#oevents\" + i).html(\"<div class='month1'>May \" + may[i] + \":</div><div class='officialsclinics'>\" + Oclinicsmay[may[i]]+ \"</div>\");\n }\n counter = (may.length - 1); // adjust ids used for May clinics\n }\n // Display Officials Clinics in June ----------------------------\n for (var i = 0; i < june.length; i++) {\n counter ++;\n $(\"#oevents\" + counter).html(\"<div class='month1'>June \" + june[i] + \":</div><div class='officialsclinics'>\" + Oclinicsjune[june[i]]+ \"</div>\");\n }\n //delete unused cells ---------------------------------------------\n\n if (counter+1 <= 5) {\n\n for (var i = counter+1; i < 9; i++) {\n $(\"#oclinics\" + i).css('display', 'none');\n }\n }\n // add strike through when date passes\n var z = findEvent(date, june);\n if ((month === 4 && date > parseInt(may[may.length-1])) || month > 4) {\n for (var i = 0; i < may.length; i++) {\n $(\"#oevents\" + i).html(\"<s><div class='month1'>May \" + may[i] + \":</div><div class='officialsclinics'>\" + Oclinicsmay[may[i]]+ \"</div></s>\");\n }\n }\n if (month === 5 ) {\n counter = (may.length - 1);\n for (var i = 0; i < z; i++) {\n counter ++;\n $(\"#oevents\" + counter).html(\"<s><div class='month1'>June \" + june[i] + \":</div><div class='officialsclinics'>\" + Oclinicsjune[june[i]]+ \"</div></s>\");\n }\n }\n if (month === 5 && date > parseInt(june[june.length-1]) || month > 5) {\n counter = (may.length - 1);\n for (var i = 0; i <= june.length; i++) {\n counter ++;\n $(\"#oevents\" + counter).html(\"<s><div class='month1'>June \" + june[i] + \":</div><div class='officialsclinics'>\" + Oclinicsjune[june[i]]+ \"</div></s>\");\n }\n }\n}", "function linkHeadings() {\n \n var headings = getHeadings();\n \n headings.forEach(function (heading) {\n heading.element.innerHTML = '<a href=\"#' + heading.id + '\">' +\n heading.element.innerHTML + \"</a>\";\n });\n }", "function weekDisplay(lat, lon) {\n fetch(\n `https://api.openweathermap.org/data/2.5/onecall?lat=${lat}&lon=${lon}&exclude=minutely,alerts&units=imperial&appid=${apiKey}`\n )\n .then(function (response) {\n return response.json();\n })\n .then(function (data) {\n document.querySelector(\"#weeklyForecast\").innerHTML = \"\";\n for (var i = 1; i < 6; i++) {\n //display 5 day forecast\n document.querySelector(\"#weeklyForecast\").innerHTML += `\n <div class=\"card text-white bg-primary mb-3\" style=\"max-width: 18rem;\">\n <div class=\"card-header\">${moment\n .unix(data.daily[i].dt)\n .format(\"MM/DD/YYYY\")} </div>\n <div class=\"card-body\">\n <h5 class=\"card-title\"><img src=\"http://openweathermap.org/img/wn/${\n data.daily[i].weather[0].icon\n }@2x.png\" /> </h5>\n <p class= \"card-text\"> Temp: ${data.daily[i].temp.day}</p>\n <p class= \"card-text\"> Humidity: ${data.daily[i].humidity}</p>\n </div>\n `;\n }\n });\n}", "function showDayNameHeaders() {\n var str = '';\n var start = HOUR_LISTING_WIDTH + 1;\n var idstr = '';\n var calcDay = null;\n\n // Spacer to align with the timeline that displays hours below\n // for the timed event canvas\n str += '<div id=\"dayListSpacer\" class=\"dayListDayDiv\"' +\n ' style=\"left:0px; width:' +\n (HOUR_LISTING_WIDTH - 1) + 'px; height:' +\n (DAY_LIST_DIV_HEIGHT-1) +\n 'px;\">&nbsp;</div>';\n\n // Do a week's worth of day cols with day name and date\n for (var i = 0; i < 7; i++) {\n calcDay = cosmo.datetime.Date.add(viewStart, cosmo.datetime.util.dateParts.DAY, i);\n // Subtract one pixel of height for 1px border per retarded CSS spec\n str += '<div class=\"dayListDayDiv\" id=\"dayListDiv' + i +\n '\" style=\"left:' + start + 'px; width:' + (self.dayUnitWidth-1) +\n 'px; height:' + (DAY_LIST_DIV_HEIGHT-1) + 'px;';\n str += '\">';\n str += cosmo.datetime.abbrWeekday[i] + '&nbsp;' + calcDay.getDate();\n str += '</div>\\n';\n start += self.dayUnitWidth;\n }\n dayNameHeadersNode.innerHTML = str;\n return true;\n }", "function getTitle() {\n return chalk.blue(\n figlet.textSync(\"Weather app\", {\n horizontalLayout: \"full\",\n font: \"banner\",\n })\n );\n}", "info() {\n if (this.numOfPages > 0) {\n return this.title + '<br>' + ' by ' + this.author + '<br>' + this.numOfPages + ' pages';\n } \n return this.title + '<br>' + ' by ' + this.author + '<br>'; \n }", "renderUpcomingEvents() {\n var text = [];\n var email = Profiles.findOne({ accountId: Meteor.user()._id }).email.toString();\n let postsToDisplay = Posts.find({ type: { $in: ['SailingEvent'] } });\n var today = new Date();\n return postsToDisplay.map((post) => {\n var dayMonthYear = post.date.split('/');\n var postDate = new Date(dayMonthYear[2], dayMonthYear[0] - 1, dayMonthYear[1], 0, 0);\n postDate.setDate(postDate.getDate() + 1);\n //Check if the event is in the past\n if (postDate.getTime() >= today.getTime()) {\n return (\n <span>\n <Post key={ post._id } post= { post } role= { Profiles.findOne({ accountId: Meteor.user()._id }).member } />\n <br />\n </span>\n //</ul >\n\n );\n }\n else {\n //don't show event if the date and time has passed\n }\n });\n }", "function now() {\n\n // Fixing datetime using timezone\n let nz_date_string = new Date().toLocaleString(\"en-US\", { timeZone: \"Europe/Rome\" });\n let d = new Date(nz_date_string);\n\n // Today there might be no classes!\n if (lessonPlan.lesson_plan[d.getDay()].length == 0)\n return [];\n\n // Today's classes\n todayAgenda = lessonPlan.lesson_plan[d.getDay()].map(i => {return {\n from: i[1],\n to: i[2],\n courseid: i[0],\n course: lessonPlan.lessons[i[0]]\n }})\n\n let currentTime = parseInt(\"\".concat(d.getHours(), (d.getMinutes() < 10 ? \"0\" : \"\"), d.getMinutes()))\n\n for (var i in todayAgenda) {\n if (todayAgenda[i].to < currentTime)\n delete todayAgenda[i];\n }\n\n return todayAgenda;\n\n}", "function yesterday_setup() \n{\n\tgenerate_yesterday_sidebar_pics();\n\tgenerate_yesterday_sidebar_scores();\n\tgenerate_yesterday_game();\n\tdate = 0;\n}", "function renderHomeStats(item) {\n let homeTeamEvents = item.home_team_events;\n homeTeamEvents = homeTeamEvents.filter(isEventGoal);\n homeTeamEvents = homeTeamEvents.map(renderPlayerGoal);\n\n return `<div class=\"centered-text\">\n <h2>${item.home_team_country}</h2>\n <h3>Goals scored by:</h3>\n ${homeTeamEvents}\n </div> `\n}", "function sportsNews () {\n document.getElementById('news-title').innerText = 'Sports News';\n document.getElementById('news-desc').innerText = 'Shoot through the latest sports headlines.';\n document.getElementById('homepage').style.display = 'none';\n document.getElementById('news').style.display = 'block';\n document.getElementById('article-container').innerHTML = '';\n fetch('https://cors-anywhere.herokuapp.com/http://newsapi.org/v2/top-headlines?country=us&category=sports&apikey=b9e7d883cff44ecea7551d1729518768', {headers:new Headers({\"X-Requested-With\":\"Leesel\"})})\n .then(a => a.json())\n .then(response =>{\n // console.log(response);\n for(let i = 0 ; i< response.articles.length; i++){\n renderArticleTemplate(response.articles[i]);\n }\n })\n}", "dateForHumans(item) {\n if (!item.date) return \"\";\n let startDate = DateTime.fromISO(item.date).toFormat(\"d LLLL yyyy\");\n if (!item.time && !item.enddate) return startDate;\n if (item.time) return `${startDate} at ${item.time}`;\n if (!item.enddate) return startDate;\n\n let endDate = DateTime.fromISO(item.enddate).toFormat(\"d LLLL yyyy\");\n return `${startDate} to ${endDate}`;\n }", "getLatestArticles() {\n let url = \"https://api.nytimes.com/svc/search/v2/articlesearch.json\";\n url +=\n \"?\" +\n $.param({\n \"api-key\": nytApiKey\n });\n\n axios\n .get(url)\n .then(res => {\n this.setState({\n articleRes: res.data.response.docs,\n searchQuery: \"\"\n });\n\n // get hearts count for current search results //\n axios.get(\"/favorites\").then(res => {\n this.setState({\n favRes: res.data\n });\n });\n })\n .catch(err => {\n if (err.response) {\n console.error(err.response.data);\n console.error(err.response.status);\n console.error(err.response.headers);\n } else {\n console.error(\"Error\", err.message);\n }\n });\n }", "function writeCals() {\n\n var testData = calories[0].meals[0].meal;\n var writeIt = `<h1>${testData}</h1>`;\n\n\n $('#target').append(daily);\n}", "function showEvents() {\n for (var i=0;i<Events.length;i++) {\n //if no date of event was given, show a message instead of date\n if(Events[i].dateOfEvent==undefined) Events[i].dateOfEvent=\" -n/a- \";\n prettyVisualization(i);\n } console.log(\"\\n\");\n}", "function goToToday(){\r\n\tvar tempDate = new Date;\r\n\tintYear = tempDate.getFullYear();\r\n\tlistReminders();\r\n\tinitialise();\n\r\n}", "function newYorkTimes() {\n const queryURL = \"https://api.nytimes.com/svc/topstories/v2/home.json?api-key=R1a31F4tBjCUaM2ho8GtIFsrSdtXt30M\";\n\n // Creating an AJAX call for the specific city button being clicked\n $.ajax({\n url: queryURL,\n method: \"GET\"\n }).then(function(response) {\n console.log(response);\n let articleAbsOne = response.results[1].abstract;\n let articleAbsTwo = response.results[6].abstract;\n let articleAbsThree = response.results[12].abstract;\n let articleAbsFour = response.results[18].abstract;\n let articleAbsFive = response.results[24].abstract;\n let articleAbsSix = response.results[30].abstract;\n \n let articleTitleOne = response.results[1].title;\n let articleTitleTwo = response.results[6].title;\n let articleTitleThree = response.results[12].title;\n let articleTitleFour = response.results[18].title;\n let articleTitleFive = response.results[24].title;\n let articleTitleSix = response.results[30].title;\n \n let articleUrlOne = response.results[1].url;\n let articleUrlTwo = response.results[6].url;\n let articleUrlThree = response.results[12].url;\n let articleUrlFour = response.results[18].url;\n let articleUrlFive = response.results[24].url;\n let articleUrlSix = response.results[30].url;\n\n let articleTitleElOne = document.getElementById('dayOne');\n let articleTitleElTwo = document.getElementById('dayTwo');\n let articleTitleElThree = document.getElementById('dayThree');\n let articleTitleElFour = document.getElementById('dayFour');\n let articleTitleElFive = document.getElementById('dayFive');\n let articleTitleElSix = document.getElementById('daySix');\n \n let articleAbsElOne = document.getElementById('dayOneAbs');\n let articleAbsElTwo = document.getElementById('dayTwoAbs');\n let articleAbsElThree = document.getElementById('dayThreeAbs');\n let articleAbsElFour = document.getElementById('dayFourAbs');\n let articleAbsElFive = document.getElementById('dayFiveAbs');\n let articleAbsElSix = document.getElementById('daySixAbs');\n\n let articleButtonElOne = document.getElementById('dayOneButton')\n let articleButtonElTwo = document.getElementById('dayTwoButton')\n let articleButtonElThree = document.getElementById('dayThreeButton')\n let articleButtonElFour = document.getElementById('dayFourButton')\n let articleButtonElFive = document.getElementById('dayFiveButton')\n let articleButtonElSix = document.getElementById('daySixButton')\n \n\n let articleTitleArray = [articleTitleOne, articleTitleTwo, articleTitleThree, articleTitleFour, articleTitleFive, articleTitleSix]\n let articleTitleElArray = [articleTitleElOne, articleTitleElTwo, articleTitleElThree, articleTitleElFour, articleTitleElFive, articleTitleElSix]\n let articleAbsArray = [articleAbsOne, articleAbsTwo, articleAbsThree, articleAbsFour, articleAbsFive, articleAbsSix];\n let articleAbsElArray = [articleAbsElOne, articleAbsElTwo, articleAbsElThree, articleAbsElFour, articleAbsElFive, articleAbsElSix]\n let articleButtonArray = [articleButtonElOne, articleButtonElTwo, articleButtonElThree, articleButtonElFour, articleButtonElFive, articleButtonElSix]\n let articleUrlArray = [articleUrlOne, articleUrlTwo, articleUrlThree, articleUrlFour, articleUrlFive, articleUrlSix]\n\n for(let i = 0; i<articleAbsArray.length; i++){\n $(articleTitleElArray[i]).append(articleTitleArray[i]);\n $(articleAbsElArray[i]).append('\"' + articleAbsArray[i] + '\"');\n $(articleButtonArray[i]).attr('href', articleUrlArray[i]);\n }\n })}", "function printHistory() {\n document.getElementById(\"winThing\").innerHTML = \"win? \" + didSomebodyWin;\n document.getElementById(\"hstry\").innerHTML = \" \";\n for (var i = 0; i < 42; i++) {\n document.getElementById(\"hstry\").innerHTML += history[i] + \" \";\n }\n}", "function getTeachingTexts(){\nfetch(\"http://anckdesign.com/kea/rossana/wp-json/wp/v2/teaching?categories=15&_embed\").then(e => e.json()).then(showSections);\n}", "function displayDataOnHead(topNews){\n // console.log(topNews);\n\n topNews.articles.forEach(content => {\n const spanNode2 = document.createElement(\"li\"); // make fresh <li>\n spanNode2.innerHTML = // news contents\n `<a href=\"${content.url}\">\n <img src=\"${content.urlToImage}\" alt=\"news image\">\n <h2>${content.title}</h2></a>`;\n \n parentNode2.appendChild(spanNode2); // pushing to the <ul>\n });\n}", "function displayByTime(){\n let URL = \"http://localhost:3004/weather/\"+this.id;\n $.get(URL, function(data){\n let tableBody = document.getElementById(\"displayTableBody\");\n tableBody.innerHTML=\"\"; // clear to start\n let weatherInfo = JSON.parse(data[0].weatherinfo);\n let date = data[0].date;\n addRowContent(tableBody, \"Fecha\", date.substring(0, date.length-14));\n addRowContent(tableBody, \"Hora\", data[0].time);\n for(const property in weatherInfo){\n addRowContent(tableBody, property, weatherInfo[property]);\n }\n let announcementString = \"<strong>Anuncio:</strong> \"+data[0].announcement;\n document.getElementById(\"displayTableAnnouncement\").innerHTML=announcementString;\n });\n}", "function getHistoricEvent() {\n //Roll a d20 for a historic event\n let d20 = roll('d20');\n //Now go through your options\n if (d20 <= 3) return \"Abandoned by creators\";\n else if (d20 <= 4) return \"Abandoned due to plague\";\n else if (d20 <= 8) return \"Conquered by invaders\";\n else if (d20 <= 10) return \"Creators destroyed by attacking raiders\";\n else if (d20 <= 11) return \"Creators destroyed by discovery made within the site\";\n else if (d20 <= 12) return \"Creators destroyed by internal conflict\";\n else if (d20 <= 13) return \"Creators destroyed by magical catastrophe\";\n else if (d20 <= 15) return \"Creators destroyed by natural disaster\";\n else if (d20 <= 16) return \"Location cursed by the gods and shunned\";\n else if (d20 <= 18) return \"Original creator still in control\";\n else if (d20 <= 19) return \"Overrun by planar creatures\";\n else return \"Site of a great miracle\";\n}", "function daily_office() {\n _daily_report_(WORK_LIST,OFFICE);\n}", "setTitle2(date) {\n let currentDate = new Date();\n currentDate.setHours(0, 0, 0, 0);\n let cpd = new Date(date);\n cpd.setHours(0, 0, 0, 0);\n let diff = (currentDate.getTime() - cpd.getTime()) / (1000 * 3600 * 24);\n let t = '';\n if (diff == 0) t = \"Today\";else if (diff == 1) t = \"Yesterday\";else if (diff == -1) t = \"Tomorrow\";else t = cpd.toLocaleString('default', {\n weekday: 'long'\n }) + ', ' + cpd.toLocaleString('default', {\n month: 'long'\n }).substr(0, 3) + ' ' + cpd.getDate();\n return t;\n }", "getGames () {\n let schedule = this.year + `${View.SPACE()}` + this.title + ` Draw ${View.NEWLINE()}`\n for (let aWeek of this.allGames) {\n schedule += 'Week:' + aWeek[0].week + `${View.NEWLINE()}`\n for (let aGame of aWeek) {\n// to get the date type, e.g. Mon, Jul 16 2018\n let newDate = new Date(aGame.dateTime).toDateString()\n// adding that date\n schedule += newDate + `${View.SPACE()}`\n// getting time like 7:35PM\n// was gonna use navigator.language instead of en-US but it comes up with korean\n// even thought default language is ENG\n let newTime = new Date(aGame.dateTime).toLocaleTimeString('en-US', {hour: 'numeric', minute: 'numeric'})\n schedule += newTime + `${View.SPACE()}`\n\n// getting name for home team from rank\n schedule += 'Team: ' + this.allTeams[aGame.homeTeamRank - 1].name + `${View.SPACE()}` + 'vs' + `${View.SPACE()}` + this.allTeams[aGame.awayTeamRank - 1].name + `${View.SPACE()}` + 'At: ' + this.allTeams[aGame.homeTeamRank - 1].venue + ', ' + this.allTeams[aGame.homeTeamRank - 1].city + `${View.NEWLINE()}`\n }\n }\n return schedule\n }", "render() {\n const { props } = this\n const { head } = props\n\n const pageDate = head.date ? new Date(head.date) : null\n\n return (\n <Page\n { ...props }\n header={\n <header>\n {\n pageDate &&\n <time key={ pageDate.toISOString() }>\n { pageDate.toDateString() }\n </time>\n }\n </header>\n }\n />\n )\n }", "function displayTodos() {\n console.log(\"My Todos: \", todos);\n}", "function Forexnews () {\n\n\n Cnews = 'https://finnhub.io/api/v1/news?category=forex&minId=10&token=c5dq01iad3ifm1hm6gcg'\n\n console.log(Cnews)\n \n $.getJSON(Cnews, function(infonews) {\n console.log(\"This is an example of a dynamic JSON file being served by a web server.\")\n console.log(infonews);\n \n news = infonews;\n console.log(news)\n\n //for Date function\n var options = {\n weekday: \"short\",\n year: \"numeric\",\n month: \"2-digit\",\n day: \"numeric\"\n};\n\n //Loop through the data using foreach and put all the results into a table\n var text =`<table class=\"cut-off\">\n <thead>\n <tr>\n \n <th>Source</th>\n <th>Summary</th>\n <th>Source</th>\n <th>Url</th>\n \n </tr>\n </thead>\n\n<tbody>`;\nnews.forEach((item) => {\n // <td>${new Date(item.datetime).toLocaleString(\"en-SG\", options)}</td>\n text = text + `<tr><<td>${item.source}</td><td word-wrap:break-word>${item.headline}</td><td style = word-break: break-all>${item.summary}</td><td>${item.url}</td><</tr>`\n \n });\n text += `</tbody></table><br>`\n //console.log(text);\n\n $(\".mypanel\").html(text);\n\n });\n\n}", "getDaily() {\n this.url = this.baseURL + \"?api_key=\" + this.key;\n return this.fetchSpaceStuff();\n }", "function renderAll() {\n\t\tchart.each(render);\n\t\ttimeline1.updateData(bornDate.top(99999));\n\t}", "function getSpecial(){\n var today = new Date();\n var day = today.getDay();\n var specialmeallist = ['Pizza', 'Wings', 'Tacos', 'Margaritas', 'Reuben', 'Pancakes', 'Ice Cream Sunday'];\n var specialmeal = specialmeallist[day];\n \n switch (day){\n case 0:\n day = 'Sunday';\n break;\n case 1:\n day = 'Monday';\n break;\n case 2:\n day = 'Tuesday';\n break;\n case 3:\n day = 'Wednesday';\n break;\n case 4:\n day = 'Thursday';\n break;\n case 5:\n day = 'Friday';\n break;\n case 6:\n day = 'Saturday';\n break;\n }\n return '<h3 id=\\'special\\'>'+day+'s Special is: '+specialmeal+'</h3>';\n}", "fetchTopStories(){\n var self = this;\n axios.get('https://hacker-news.firebaseio.com/v0/topstories.json')\n .then(function (response) {\n self.props.setLoaderText('Fetching stories'); // This is done because, once the top stories are fetched, the individual stories have to be fetched again, which requires a loader\n self.props.updateTopStories({\n topStories: response.data\n })\n })\n .catch(function (error) {\n console.log(error);\n });\n }", "function fetchTheData() {\r\n let baseURL = \"https://newsapi.org/v2/top-headlines\";\r\n deleteOld();\r\n let search = \"?q=\" + id(\"search\").value;\r\n id(\"searchTerm\").textContent = id(\"search\").value;\r\n let apiKey = \"&apiKey=c1c6c8286a5449b7a7fcc01deb46437c\";\r\n fetch(baseURL + search + apiKey)\r\n .then(checkStatus)\r\n .then(response => response.json()) // if json\r\n .then(processResponse)\r\n .catch(handleError);\r\n }", "function getTrendingNews(callback) {\n var url = 'https://newsapi.org/v2/top-headlines?' +\n 'country=us&' +\n 'apiKey=a4a03d7d0df7480e8b52461a0e39fb77';\n var req = new Request(url);\n fetch(req)\n .then(function(response) {\n return response.json();\n })\n .then(function(json) {\n data = json\n\tarticles = data.articles\n callback();\n })\n}", "function mostReadArticlesToday() { \n mostReadArticlesArray.slice(1, 20).forEach(item => {\n // console.log('mostReadArticlesArray: ', mostReadArticlesArray)\n const allMostReadToday = document.createElement('div')\n allMostReadToday.classList.add('all-most-read-today')\n // ARTICLE LINKS\n const link = document.createElement('a')\n if (item.url) {\n link.href = item.url\n } else {\n link.href = item.webUrl \n }\n link.title = 'Read Full Article' // Info when hovering on image\n link.target = '_blank' // OPEN ARTICLE IN NEW TAB\n // ARTICLE PICTURE\n const mostReadPicture = document.createElement('img')\n mostReadPicture.loading = 'lazy'\n mostReadPicture.classList.add('most-read-pictures')\n if (item.fields) {\n mostReadPicture.src = item.fields.thumbnail\n } else {\n mostReadPicture.src = item.media[0]['media-metadata'][2].url\n }\n // CONNECT THE DOM NODES\n link.append(mostReadPicture)\n allMostReadToday.append(link)\n bottomRow.append(allMostReadToday)\n newsContainer.appendChild(bottomRow)\n })\n}", "function getLandingsSummary() {\n vm.workingLandings = true;\n logbookService.summaryResource.getLandingsSummary(vm.activeLogbook.logbookId)\n .then(getLandingsSummarySucceeded, getLandingsSummaryFailed);\n }", "function getHeadline(newsSource, tweet) {\n console.log(\"---> getHeadline <---\");\n let headline = tweet.full_text;\n headline = headline.split(\"http\", 1).toString();\n headline = headline.trim();\n headline += ` [${newsSource}]`;\n\n return headline;\n}", "function determineBinCollection(){\n const today = new Date();\n\n // Every even week is rubbish\n if (today.getWeek() % 2 ==0){\n recycling.innerHTML = \"<img src='img/trash.svg' width='70px'><br>Rubbish collection week<br>& Garden Waste collection week\";\n } else {\n // every odd week is recycling\n recycling.innerHTML = \"<img src='img/trash.svg' width='70px'><br>Recycling collection week\";\n }\n}", "function update_history_section() {\n var container_array = document.querySelectorAll('div.action-details');\n var time_stamp_array = [];\n\n for (let i = 0; i < container_array.length; i++) {\n container_array[i].children[1].style = 'display: none;';\n time_stamp_array.push(container_array[i].children[1]);\n }\n\n for (let i = 0; i < time_stamp_array.length; i++) {\n var inserted_element = document.createElement('div');\n inserted_element.className = 'nates-awesome-date-element';\n time_stamp = time_stamp_array[i].title || time_stamp_array[i].children[0].title // In the Comments section, you need the second part of this 'or' statement in order for the cooler date times to show up.\n inserted_element.innerText = time_stamp;\n\n container_array[i].appendChild(inserted_element);\n }\n}", "function generateSummaryDOM(incompleteTodos){\n const summary = document.createElement(\"h2\");\n summary.classList.add(\"list-title\");\n summary.textContent = `You have ${incompleteTodos.length} todo${incompleteTodos.length === 1 ? \"\" : \"s\"} left`;\n\n return summary;\n}" ]
[ "0.64924955", "0.6282384", "0.6116581", "0.59095705", "0.5759602", "0.56638306", "0.55898464", "0.5573564", "0.55336064", "0.55234885", "0.5488466", "0.54665405", "0.5429966", "0.54112023", "0.5399972", "0.53913987", "0.5362171", "0.5356818", "0.53551644", "0.5345465", "0.5332206", "0.5327366", "0.53266066", "0.5315758", "0.5307906", "0.5304958", "0.5291619", "0.5290454", "0.5289373", "0.52842844", "0.52817446", "0.5275383", "0.5270917", "0.5253383", "0.5251214", "0.5247119", "0.52447", "0.524279", "0.5238922", "0.52298135", "0.52169716", "0.5211213", "0.52010816", "0.518766", "0.5186356", "0.5183873", "0.5176512", "0.5175512", "0.51667", "0.51644665", "0.51633507", "0.5147352", "0.51460487", "0.5142416", "0.5139998", "0.5135013", "0.513281", "0.5119564", "0.5114675", "0.5100351", "0.50965333", "0.50946474", "0.50909525", "0.508462", "0.5069751", "0.5065521", "0.50597817", "0.5059151", "0.5057288", "0.5051804", "0.5041828", "0.5041702", "0.50360537", "0.5035534", "0.50312394", "0.5024299", "0.5019017", "0.5017941", "0.5012486", "0.50093174", "0.4999279", "0.4996767", "0.4995853", "0.49947008", "0.49940726", "0.49916393", "0.4989974", "0.49893677", "0.49888697", "0.49874362", "0.4983955", "0.49836895", "0.4983359", "0.4980689", "0.49788824", "0.4969658", "0.4966656", "0.49657923", "0.49638957", "0.4959609", "0.49584532" ]
0.0
-1
match currentword to wordInput
function matchWords(){ if (wordInput.value===currentWord.innerHTML) { message.innerHTML='Correct!!!'; return true; }else{ message.innerHTML=''; return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchWords() {\n if (wordInput.value === currentWord.innerHTML)\n return true;\n else \n return false;\n}", "function matchWords() {\n if(wordInput.value === currentWord.innerHTML) {\n message.innerHTML = 'Correct!!!'\n return true;\n } else {\n message.innerHTML = '';\n return false;\n }\n }", "function matchWord() {\r\n if (wordInput.value == currentWord.innerHTML) {\r\n message.innerHTML = 'Correct';\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "function matchWords(){\r\n if(wordInput.value === currentWord.innerHTML) {\r\n message.innerHTML = 'Correct!';\r\n return true;\r\n } else {\r\n message.innerHTML = \"\";\r\n return false;\r\n }\r\n }", "function matchWords() {\n // To see if they match we have to get the value of the variable and compare it to the value of currentWord which is in the html input\n if (wordInput.value === currentWord.innerHTML) {\n message.innerHTML = \"Correct!\";\n return true;\n } else {\n message.innerHTML = \"\";\n return false;\n }\n}", "function matchwords(){\n if(wordinput.value === currentword.innerHTML){\n message.innerHTML= 'WOhOOOOO!!!';\n return true;\n }\n else{\n message.innerHTML = '';\n return false;\n }\n}", "function matchWord(){\r\n\tif (wordInput.value === currentWord.innerHTML) {\r\n\t \tmessage.innerHTML = 'correct!!!!!';\r\n\t \treturn true;\r\n\r\n\t}\r\n\telse{\r\n\t\tmessage,innerHTML = '';\r\n\t\treturn false;\r\n\t}\r\n}", "match(input){\n var t = super.match(input)\n return this.process_word_set(this.reduce(t))\n }", "function matchWords() {\n if (wordInput.value === currentWord.innerHTML) {\n message.innerHTML = 'Correct!!!';\n return true;\n } else {\n message.innerHTML = '';\n return false;\n }\n}", "function singleWord() {\n //Capture input value\n wordStr = elements.wordInput.value;\n if(regex.test(wordStr)) {\n consoleDisplay(\"single\")\n //keep status at 0\n gamestatus = 0;\n } else {\n //Set game status to 1\n gamestatus = 1;\n }\n}", "match(input, start, end) {\n start = start || 0\n end = end || input.length\n if(typeof input === 'string') input = new Source(input)\n for(var i=0; i<this.word.length; i++) {\n var x = input.substring(start,Math.min(end, start+this.word[i].length))\n if(this.word[i]==x) return this.token(input,start,start+x.length,x)\n }\n return this.error(input,start,start+1)\n }", "function matchWords(){\n if(wordInput.value === currentWord.innerHTML){\n message.innerHTML = 'Prawidłowo!';\n message.style.color = \"green\";\n return true;\n }else{\n message.innerHTML = '';\n return false;\n }\n}", "function CurrentWord(word) {\n this.word = word;\n this.guessedLetters = '-';\n}", "function matchWords() {\n if (wordInput.value === currentWord.innerHTML) {\n message.innerHTML = \"Correct!!!\";\n return true;\n } else {\n message.innerHTML = \"\";\n return false;\n }\n}", "function matchWords(){\n if(wordInput.value === currentWord.innerHTML){\n message.innerHTML='correct!!!!';\n return true;\n }else{\n message.innerHTML='';\n return false;\n }\n\n \n}", "function isKeyInWord() {\n var isinword = false;\n\n // Compare the KEYINPUT with the characters of the word\n for (var i = 0; i < word.length; i++) {\n if (keyinput == word[i]) {\n isinword = true;\n // Replace the guessed character in GUESS\n guess[i] = keyinput;\n }\n }\n\n // If KEYINPT is not a match increase a bad guess and remove a life\n if (!isinword) {\n $(\".audioDoh\").trigger('play');\n lives--;\n badguess++;\n if (lives < 1) {\n matchesLost++;\n gamedone = true;\n }\n }\n\n // Update the labels\n updateGame();\n }", "function currentWord(x) {\n if ((x.b.data.wordWindow[\"0\"] === token) &&\n (x.a === tag)) {\n return 1;\n }\n return 0;\n }", "function checkForMatch(){\n var userWord = $(\"#wordBox\").val();\n console.log(userWord);\n if (userWord == words[index][1].toLowerCase()) {\n\n showAnimation();\n if (index == words.length - 1) {\n endGame();\n // $(\"#wordBox\").fadeOut();\n return false;\n }\n index++;\n\n document.getElementById(\"wordBox\").innerHTML = \"\";\n showNewWord();\n }\n else{\n $(\"#wordbox\").text(\"\");\n // document.getElementById(\"wordBox\").innerHTML = \"\";\n $(\"#wordBox\").focus();\n $(\"#info\").text(\"wrong!\");\n\n }\n }", "function checkWord(word) {\n var wlen = word.value.length;\n // how much we have of the current word.\n var current = $(\".current-word\")[0];\n var currentSubstring = current.innerHTML.substring(0, wlen);\n // check if we have any typing errors\n if (word.value.trim() != currentSubstring) {\n current.classList.add(\"incorrect-word-bg\");\n return false;\n } else {\n current.classList.remove(\"incorrect-word-bg\");\n return true;\n }\n}", "function word() {\n let type = document.getElementById('selectAlgorithm').value;\n // Get user word and convert to lowercase\n let userWord = document.getElementById(\"word\").value;\n userWord = userWord.toLowerCase();\n\n let searchResult = search(dictionary, userWord, type);\n if (searchResult == -1) {\n document.getElementById(\"word-result\").innerHTML = \"Linear Search: \" + userWord + \" is NOT in the dictionary.\";\n } else {\n document.getElementById(\"word-result\").innerHTML = \"Linear Search: \" + userWord + \" IS in the dictionary.\";\n }\n\n}", "function currentWord (x) {\n if ((x.b.data.wordWindow['0'] === token) &&\n (x.a === tag)) {\n return 1\n }\n return 0\n }", "function input(word){\n // Call matchChar on each letter\n word.forEach(letter => matchChar(letter));\n}", "handleWord(){\n // figure out what the word is\n\n // if newWord is false\n // log 'yay this word was in my dictionary!\n // else saveWord(word)\n }", "function matchWords(){\r\n if(wordInPut.value === currentWord.innerHTML){\r\n message.innerHTML = 'Correct!!!'\r\n return true;\r\n } else {\r\n message.innerHTML = '';\r\n return false;\r\n }\r\n\r\n}", "function checkWord(word) {\n const wval = word.value.trim(); // how much we have of the current word.\n\n let current = $(\".current-word\")[0];\n let currentString = current.innerHTML; // check if we have any typing errors and\n // make sure there is a real word to check\n // https://github.com/anschwa/typing-test/issues/2\n\n const noMatch = wval !== currentString;\n const emptyWords = wval === '' || currentString === '';\n\n if (noMatch || emptyWords) {\n current.classList.add(\"incorrect-word-bg\");\n return false;\n } else {\n current.classList.remove(\"incorrect-word-bg\");\n return true;\n }\n}", "submitWord(event) {\n event.preventDefault();\n let word = document.getElementById('inputBox').value.toLowerCase();\n document.getElementById('inputBox').value = '';\n if(/^[a-zA-Z]+$/.test(word)) {\n let submittedWords = this.state.submittedWords;\n if (!submittedWords.includes(word)) {\n answer(word);\n }\n }\n }", "function correct(word) {\n \n}", "function isPartialMatch() {\r\n // if (wordInput.value === currentWord.innerHTML) {\r\n // message.innerHTML = \"CORRECT!!!!!\";\r\n // return true;\r\n // } else {\r\n // message.innerHTML = \"\";\r\n\r\n for (let i = 0; i < wordInput.value.length; i++) {\r\n if (wordInput.value.charAt(i) === currentWord.innerText.charAt(i)) {\r\n } else {\r\n message1.innerHTML = \"\";\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "function matchWords() {\n if ((wordInput.value).toLowerCase() === currentWord.innerText) {\n // Play correct answer mp3\n setTimeout(function() {\n correctAnsw.play();\n }, 1);\n // Reset timer bar\n setTimeout(function() {\n resetTimerBar();\n }, 5);\n return true;\n } else {\n return false;\n }\n}", "function getWord(input) {\n $(\"ul\").empty(); //clean results from last search\n word = $(input).val(); // grab text from input\n $(input).val(\"\"); //clear search bar\n return word;\n }", "function wordGuess(){\r\n var w = document.getElementById('Gword').value.toUpperCase();\r\n if (w == key)\r\n resultingText(true);\r\n else\r\n resultingText(false);\r\n}", "function matchWords(){\r\n if(wordInput.value===currentWord.innerHTML){\r\n message.innerHTML='Correct!!!';\r\n return true;\r\n }\r\n else{\r\n message.innerHTML='';\r\n return false;\r\n }\r\n}", "function isValidWord(word) {\n console.log(word);\n if (words.wordlist.indexOf(word) >= 0) return true;\n return false;\n}", "function buildWord(userInput) {\n\n // Initialize placeholder array with underscore array\n if (prevPlaceholderArray.length == 0) {\n placeholderArray = createWordPlaceholder(word);\n // Display letters and underscores \n } else {\n placeholderArray = prevPlaceholderArray;\n }\n\n // Replace underscore with matching letter\n for (i = 0; i < word.length; i++) {\n if (userInput == word[i]) {\n console.log(userInput + \"in word at\" + i)\n placeholderArray[i] = userInput;\n }\n }\n prevPlaceholderArray = placeholderArray;\n\n // Convert placeholder array to string to display in UI\n placeholder = placeholderArray.join(\" \");\n document.getElementById('word-placeholder').innerHTML = placeholder;\n\n if (placeholder == word.join(\" \")) {\n \twins++;\n document.getElementById('win-count').innerHTML = wins;\n // Calls function to Restart game\n restartGame(); \n }\n}", "function getCorrectWord(word, wordIndex, text) {\n if (word === \"your\") {\n if (text.substring(wordIndex, wordIndex + word.length + 2) === \"your a \") {\n // Assume they're trying to say \"you're a ___\"\n return \"you're\";\n }\n if (text.substring(wordIndex, wordIndex + word.length + 3) === \"your an \") {\n // Assume they're trying to say \"you're an ___\"\n return \"you're\";\n }\n if (text.substring(wordIndex, wordIndex + word.length + 3) === \"your my \") {\n // Assume they're trying to say \"you're my ___\"\n return \"you're\";\n }\n if (text.substring(wordIndex, wordIndex + word.length + 4) === \"your the \") {\n // Assume they're trying to say \"you're the ___\"\n return \"you're\";\n }\n }\n if (word === \"youre\") {\n // This is just a misspelling\n return \"you're\";\n }\n return null;\n}", "function checkWord() {\r\n let userWord = document.getElementById(\"user-word\").value;\r\n userWord = userWord.toLowerCase();\r\n if (userWord == \"\") {\r\n $(\"#result\").text(\"Please insert a word.\");\r\n }\r\n else if (userWord == gameWord) {\r\n score += seconds + 1;\r\n clearInterval(timer);\r\n setMessage();\r\n toggleGameElements();\r\n toggleNextStageBox();\r\n $(\"#current-score\").text(\"Score: \" + score);\r\n $(\"#user-word\").val(\"\");\r\n $(\"#result\").text(\"\");\r\n }\r\n else {\r\n $(\"#result\").text(\"Incorrect\");\r\n }\r\n }", "function wordPicker() {\n console.log(currentWord);\n console.log(currentWord[3]);\n }", "function matchWords() {\n if (wordInput.value === currentWord.innerHTML) {\n message.innerHTML = \"Correct\";\n message.style.color = \"#00ff15\";\n wordInput.style.border = \"3px solid #00ff15\";\n setTimeout(() => currentWord.style.color = \"#fff\", 200);\n currentWord.style.color = \"#00ff15\";\n return true;\n } else {\n message.innerHTML = \"\";\n return false;\n }\n}", "function examine(word) {\n let lookAt = itemLookUp[word]\n if (player.location.inv.includes(word)) {\n console.log(lookAt.desc)\n }\n}", "function checkUserInput() {\n var userInput = document\n .querySelector(\".type-area\")\n .value.replace(minusString, \"\");\n if (userInput[userInput.length - 1] === \" \") {\n handleSpace();\n return;\n }\n let startword = modifiedpara.substr(0, modifiedpara.indexOf(\" \") + 1);\n\n if (document.querySelector(\".type-area\").value == \"\") {\n document.querySelector(\".para-type\").innerText = infinityPara;\n } else if (startword.includes(userInput)) {\n text = modifiedpara;\n text = text.replace(\n userInput,\n '<span class=\"highlight\">' + userInput + \"</span>\"\n );\n document.querySelector(\".para-type\").innerHTML = text;\n } else {\n return;\n }\n}", "function wordSearchChecker(txt) {\n var userKeyWord = document.getElementById('userKeyWord').value;\n var wordSearch = '';\n var array = txt.match(new RegExp(userKeyWord, 'gi'));\n\n if (array == null) {\n \n wordSearch = \"<h4>\" + userKeyWord + \"</h4> \" + \" does not appear in this file.\";\n\n } else if (array.length == 1) {\n wordSearch = \"<h4>\" + userKeyWord + \"</h4> \" + \" appears \" + array.length + \" time.\";\n wordSearch += \"<br/>\";\n wordSearch += \"<br/>\";\n wordSearch += txt.replace(new RegExp(userKeyWord, 'gi'), \"<strong class='btn btn-warning'>\" + userKeyWord + \"</strong>\");\n } else {\n wordSearch = \"<h4>\" + userKeyWord + \"</h4> \" + \" appears \" + array.length + \" times.\";\n wordSearch += \"<br/>\";\n wordSearch += \"<br/>\";\n wordSearch += txt.replace(new RegExp(userKeyWord, 'gi'), \"<strong class='btn btn-warning'>\" + userKeyWord + \"</strong>\");\n }\n\n return wordSearch;\n }", "function wordPressed(word_number) {\n correct_word = suggested_words[word_number];\n let i;\n\n console.log(\"currently_typed.length = \" + currently_typed.length);\n for (i = currently_typed.length - 1; currently_typed.charAt(i) != \" \"; i--)\n if (i == 0){\n currently_typed = \"\";\n break;\n }\n\n if (currently_typed != \"\")\n currently_typed = currently_typed.slice(0, i+1);\n currently_typed += correct_word + \" \";\n current_word = \"\";\n autocomplete();\n}", "match(word) {\n if (this.pattern.length == 0)\n return this.ret(-100 /* NotFull */, []);\n if (word.length < this.pattern.length)\n return false;\n let { chars, folded, any, precise, byWord } = this;\n // For single-character queries, only match when they occur right\n // at the start\n if (chars.length == 1) {\n let first = state.codePointAt(word, 0), firstSize = state.codePointSize(first);\n let score = firstSize == word.length ? 0 : -100 /* NotFull */;\n if (first == chars[0]) ;\n else if (first == folded[0])\n score += -200 /* CaseFold */;\n else\n return false;\n return this.ret(score, [0, firstSize]);\n }\n let direct = word.indexOf(this.pattern);\n if (direct == 0)\n return this.ret(word.length == this.pattern.length ? 0 : -100 /* NotFull */, [0, this.pattern.length]);\n let len = chars.length, anyTo = 0;\n if (direct < 0) {\n for (let i = 0, e = Math.min(word.length, 200); i < e && anyTo < len;) {\n let next = state.codePointAt(word, i);\n if (next == chars[anyTo] || next == folded[anyTo])\n any[anyTo++] = i;\n i += state.codePointSize(next);\n }\n // No match, exit immediately\n if (anyTo < len)\n return false;\n }\n // This tracks the extent of the precise (non-folded, not\n // necessarily adjacent) match\n let preciseTo = 0;\n // Tracks whether there is a match that hits only characters that\n // appear to be starting words. `byWordFolded` is set to true when\n // a case folded character is encountered in such a match\n let byWordTo = 0, byWordFolded = false;\n // If we've found a partial adjacent match, these track its state\n let adjacentTo = 0, adjacentStart = -1, adjacentEnd = -1;\n let hasLower = /[a-z]/.test(word), wordAdjacent = true;\n // Go over the option's text, scanning for the various kinds of matches\n for (let i = 0, e = Math.min(word.length, 200), prevType = 0 /* NonWord */; i < e && byWordTo < len;) {\n let next = state.codePointAt(word, i);\n if (direct < 0) {\n if (preciseTo < len && next == chars[preciseTo])\n precise[preciseTo++] = i;\n if (adjacentTo < len) {\n if (next == chars[adjacentTo] || next == folded[adjacentTo]) {\n if (adjacentTo == 0)\n adjacentStart = i;\n adjacentEnd = i + 1;\n adjacentTo++;\n }\n else {\n adjacentTo = 0;\n }\n }\n }\n let ch, type = next < 0xff\n ? (next >= 48 && next <= 57 || next >= 97 && next <= 122 ? 2 /* Lower */ : next >= 65 && next <= 90 ? 1 /* Upper */ : 0 /* NonWord */)\n : ((ch = state.fromCodePoint(next)) != ch.toLowerCase() ? 1 /* Upper */ : ch != ch.toUpperCase() ? 2 /* Lower */ : 0 /* NonWord */);\n if (!i || type == 1 /* Upper */ && hasLower || prevType == 0 /* NonWord */ && type != 0 /* NonWord */) {\n if (chars[byWordTo] == next || (folded[byWordTo] == next && (byWordFolded = true)))\n byWord[byWordTo++] = i;\n else if (byWord.length)\n wordAdjacent = false;\n }\n prevType = type;\n i += state.codePointSize(next);\n }\n if (byWordTo == len && byWord[0] == 0 && wordAdjacent)\n return this.result(-100 /* ByWord */ + (byWordFolded ? -200 /* CaseFold */ : 0), byWord, word);\n if (adjacentTo == len && adjacentStart == 0)\n return this.ret(-200 /* CaseFold */ - word.length + (adjacentEnd == word.length ? 0 : -100 /* NotFull */), [0, adjacentEnd]);\n if (direct > -1)\n return this.ret(-700 /* NotStart */ - word.length, [direct, direct + this.pattern.length]);\n if (adjacentTo == len)\n return this.ret(-200 /* CaseFold */ + -700 /* NotStart */ - word.length, [adjacentStart, adjacentEnd]);\n if (byWordTo == len)\n return this.result(-100 /* ByWord */ + (byWordFolded ? -200 /* CaseFold */ : 0) + -700 /* NotStart */ +\n (wordAdjacent ? 0 : -1100 /* Gap */), byWord, word);\n return chars.length == 2 ? false\n : this.result((any[0] ? -700 /* NotStart */ : 0) + -200 /* CaseFold */ + -1100 /* Gap */, any, word);\n }", "function highlight(inputID, term) {\r\n\tvar tokens = $('#' + inputID).val().trim().split(/\\s/);\t// split search string into tokens by whitespace\r\n\tvar words = term.split(/\\s/);\t\t\t\t\t\t\t// words of term split by whitespace\r\n\t\r\n\t// sort tokens by length then alpha, so we match longer ones first\r\n\ttokens.sort(function(a,b) { return a.length - b.length || a.localeCompare(b); })\r\n\t\r\n\tvar wordCount = words.length;\r\n\tvar tokenCount = tokens.length;\r\n\t\r\n\tfor (var w = 0; w < wordCount; w++) {\r\n\t\tvar originalWord = words[w];\r\n\t\tfor (var t = 0; t < tokenCount; t++) {\r\n\t\t\tvar newWord = boldPrefix(originalWord, tokens[t]);\r\n\t\t\tif (newWord != originalWord) {\r\n\t\t\t\twords[w] = newWord;\r\n\t\t\t\tbreak;\t\t\t// found a token that matched, so move on to next word\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn words.join(' ');\r\n}", "function compareInput(word, input) {\n var wordChars = word.split('');\n var inputChars = input.split('');\n\n var matches = true;\n for (i = 0; i < inputChars.length; i++) {\n if (wordChars[i] !== inputChars[i]) {\n matches = false;\n break;\n }\n }\n\n return matches;\n}", "function wordProcess() {\r\n\tclearOutput();\r\n\taddWord();\r\n\twordList();\r\n\tclearInput();\r\n}", "readWord() {\n let word = this.readWordSingle();\n if (!this.state.containsEsc && this.keywords.test(word)) {\n return this.finishKeyword(word);\n }\n return this.finishToken(tt.name, {value: word, raw: this.input.slice(this.state.lex.start, this.state.pos)});\n }", "function wordMatch(word,offset) {\n if (offset==undefined) offset = -1;\n var i=0;\n for (;i<word.length && json.charAt(at+i+offset)==word.charAt(i);i++) {}\n if (i>=word.length) {\n at += offset+i;\n next();\n return true;\n }\n return false;\n }", "function checkUserInput(event) {\n log.textContent = event.target.value.toUpperCase();\n randomWord.slice(randomWordSplit)\n if (log.textContent === randomWord) {\n wordBoxReference.innerHTML = '';\n input.value = \"\";\n userScore++;\n document.getElementById('user-score').innerHTML = userScore;\n generateRandomWord();\n } else {\n highlightLetters();\n }\n}", "function getWord(){\n var $theWord = $('#inputBox').val();\n return($theWord);\n}", "match(input) {\n if(this.startsWith(input.current())) {\n var c = input.current()\n input.next()\n return this.token(input,input.pos-1,c)\n }\n else return this.error(input,input.pos)\n }", "function inputChange() {\n\n /* \n Om inputfältet är tomt break/return vad det nu heter i js.\n\n 1.kolla om vi har ett active words.\n 1.a om vi har active words kolla stavning\n 1.aa om korektstavning return/break vad det nu hetter i js\n 1.ab om fel gör rött eller något sätt som fel\n\n 2. om vi har flera i active\n 2.a kolla input och ta bort active words som inte passar\n \n\n 3.om vi inte har active word\n 2.a kolla alla som har bokstaven och lägg till i active\n\n\n words.forEach(word => {\n //\n }); */\n}", "function addWord() {\n if (currentWordLen > 0) {\n const word = str\n .slice(currentStartIdx, currentStartIdx + currentWordLen)\n .toLowerCase();\n currentWordLen = 0;\n if (counts[word] === undefined) {\n counts[word] = 1;\n } else {\n counts[word] += 1;\n }\n }\n }", "function newWord(){\r\n let myword = words[selector];\r\n return myword;\r\n}", "function matchLetters (word) {\n\treturn word.slice(0, masterWordIndex +1) ===\n\t\twordMaster.word.slice(0, masterWordIndex +1);\n}", "function pickWord(text) {\n return SEARCH_WORDS.reduce((prev, word) => {\n if (text.indexOf(word) > -1) {\n return word;\n }\n return prev;\n }, null);\n}", "function matched(e) {\n if(myInput.value.toLowerCase() === unShuffledWord) {\n success();\n myInput.value = \"\";\n getWordBtn.disabled = true; // Prevent get word being called again\n e.target.removeEventListener('click', matched) // Prevent function being called again\n } else {\n fail();\n } \n }", "match(input) {\n var pos = input.pos\n if(this.match_category(input)) return this.token(input,pos,input.substring(pos,input.pos))\n return this.error(input, pos)\n }", "function wordGen() {\n\tcurrentWord = wordList[Math.floor(Math.random() * wordList.length)].toLowerCase();\n}", "function nextWord() {\r\n\tclearInput();\r\n\tclearOutput();\r\n\tremovingUsedWord();\r\n\tif (randomWords.length <= 0) {\r\n\t\tnoMoreWords();\r\n\t} else {\r\n\t\tgetRandomWord();\r\n\t\twordChecker();\r\n\t}\r\n}", "if (IsMisspelled(_currentWord)) {\r\n // add _currentWord to _misspellings\r\n _misspellings.Append(strdup(_currentWord));\r\n }", "function replayWord() {\r\n\tclearInput();\r\n\tclearOutput();\r\n\twordChecker();\r\n}", "function AddWordToBoard() {\r\n\r\n console.log(\"In AddWordToBoard func\");\r\n var i,\r\n len,\r\n curIndex,\r\n curWord,\r\n curChar,\r\n curMatch,\r\n testWord,\r\n testChar,\r\n minMatchDiff = 9999,\r\n curMatchDiff;\r\n\r\n if (wordsActive.length < 1) {\r\n curIndex = 0;\r\n for (i = 0, len = wordBank.length; i < len; i++) {\r\n\r\n if (wordBank[i].totalMatches < wordBank[curIndex].totalMatches) {\r\n curIndex = i;\r\n }\r\n }\r\n wordBank[curIndex].successfulMatches = [{ x: 12, y: 12, dir: 0 }];\r\n console.log(\"inside if\", wordBank[curIndex].string);\r\n } else {\r\n curIndex = -1;\r\n\r\n for (i = 0, len = wordBank.length; i < len; i++) {\r\n \r\n curWord = wordBank[i];\r\n console.log(\"inside else\", curWord.string);\r\n curWord.effectiveMatches = 0;\r\n curWord.successfulMatches = [];\r\n for (var j = 0, lenJ = curWord.char.length; j < lenJ; j++) {\r\n curChar = curWord.char[j];\r\n for (var k = 0, lenK = wordsActive.length; k < lenK; k++) {\r\n testWord = wordsActive[k];\r\n for (var l = 0, lenL = testWord.char.length; l < lenL; l++) {\r\n testChar = testWord.char[l];\r\n if (curChar === testChar) {\r\n curWord.effectiveMatches++;\r\n\r\n var curCross = { x: testWord.x, y: testWord.y, dir: 0 };\r\n if (testWord.dir === 0) {\r\n curCross.dir = 1;\r\n curCross.x += l;\r\n curCross.y -= j;\r\n } else {\r\n curCross.dir = 0;\r\n curCross.y += l;\r\n curCross.x -= j;\r\n }\r\n\r\n var isMatch = true;\r\n\r\n for (var m = -1, lenM = curWord.char.length + 1; m < lenM; m++) {\r\n var crossVal = [];\r\n if (m !== j) {\r\n if (curCross.dir === 0) {\r\n var xIndex = curCross.x + m;\r\n\r\n if (xIndex < 0 || xIndex > board.length) {\r\n isMatch = false;\r\n break;\r\n }\r\n\r\n crossVal.push(board[xIndex][curCross.y]);\r\n crossVal.push(board[xIndex][curCross.y + 1]);\r\n crossVal.push(board[xIndex][curCross.y - 1]);\r\n } else {\r\n var yIndex = curCross.y + m;\r\n\r\n if (yIndex < 0 || yIndex > board[curCross.x].length) {\r\n isMatch = false;\r\n break;\r\n }\r\n\r\n crossVal.push(board[curCross.x][yIndex]);\r\n crossVal.push(board[curCross.x + 1][yIndex]);\r\n crossVal.push(board[curCross.x - 1][yIndex]);\r\n }\r\n\r\n if (m > -1 && m < lenM - 1) {\r\n if (crossVal[0] !== curWord.char[m]) {\r\n if (crossVal[0] !== null) {\r\n isMatch = false;\r\n break;\r\n } else if (crossVal[1] !== null) {\r\n isMatch = false;\r\n break;\r\n } else if (crossVal[2] !== null) {\r\n isMatch = false;\r\n break;\r\n }\r\n }\r\n } else if (crossVal[0] !== null) {\r\n isMatch = false;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (isMatch === true) {\r\n curWord.successfulMatches.push(curCross);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n curMatchDiff = curWord.totalMatches - curWord.effectiveMatches;\r\n\r\n if (curMatchDiff < minMatchDiff && curWord.successfulMatches.length > 0) {\r\n curMatchDiff = minMatchDiff;\r\n curIndex = i;\r\n } else if (curMatchDiff <= 0) {\r\n return false;\r\n }\r\n }\r\n //console.log(\"wordBank inside AddwordtoBoard\",curWord,wordBank);\r\n }\r\n\r\n if (curIndex === -1) {\r\n return false;\r\n }\r\n\r\n var spliced = wordBank.splice(curIndex, 1);\r\n console.log(\"spliced word\",spliced[0]);\r\n\r\n\r\n\r\n wordsActive.push(spliced[0]);\r\n wordsActive[wordsActive.length - 1].string;\r\n console.log(\"Check this word in wordsActive\",wordsActive[wordsActive.length - 1].string);\r\n\r\n\r\n var pushIndex = wordsActive.length - 1,\r\n rand = Math.random(),\r\n matchArr = wordsActive[pushIndex].successfulMatches,\r\n matchIndex = Math.floor(rand * matchArr.length),\r\n matchData = matchArr[matchIndex];\r\n\r\n wordsActive[pushIndex].x = matchData.x;\r\n wordsActive[pushIndex].y = matchData.y;\r\n wordsActive[pushIndex].dir = matchData.dir;\r\n\r\n\r\n for (i = 0, len = wordsActive[pushIndex].char.length; i < len; i++) {\r\n var xIndex = matchData.x,\r\n yIndex = matchData.y;\r\n\r\n if (matchData.dir === 0) {\r\n xIndex += i;\r\n board[xIndex][yIndex] = wordsActive[pushIndex].char[i];\r\n } else {\r\n yIndex += i;\r\n board[xIndex][yIndex] = wordsActive[pushIndex].char[i];\r\n }\r\n\r\n console.log(\"wordsActive\",wordsActive);\r\n Bounds.Update(xIndex, yIndex); // update the bound\r\n console.log(xIndex,yIndex); // prints index for every letter of a word\r\n //var x = board;\r\n //console.log(x);\r\n }\r\n\r\n console.log(\"ending x index\", xIndex, \"ending\", yIndex);\r\n wordsActive[wordsActive.length - 1].endxIndex = xIndex;\r\n wordsActive[wordsActive.length - 1].endyIndex = yIndex;\r\n\r\n //return [true,xIndex,yIndex];\r\n return true;\r\n }", "getUserInput() {\n const word = this.input.value;\n\n this.input.innerHTML = '';\n\n return word.toLowerCase();\n }", "function match(a,b) {\n\t//if the letter input matches the current string\n\tif(a==b){\n\t\t\n\t\tfinalDisplay(i,guess);\n\t\tmatched++;\t\n\t}\n\n\n\t\n}", "function checkWords() {\r\n\ttakeInputWords();\r\n\t\r\n\tvar rightAnswers = 0;\r\n\t\r\n\tfor (var i = 0; i < inputWords.length; i++) {\r\n\t\tif (inputWords[i] == mapList[i]) {\r\n\t\t\trightAnswers ++;\r\n\t\t}\r\n\t}\r\n\t\r\n\tlistenResult.value = rightAnswers.toString();\r\n}", "match_words() {\n // loop through all meteors to find first match\n for (var i = 0; i < this.meteors.length; i++) {\n if (this.meteors[i].word === this.input.text) {\n this.meteors[i].ticker.stop();\n\n // found the match, remove\n app.stage.removeChild(this.meteors[i]);\n this.meteors.splice(i, 1);\n\n // update score and reset the text\n this.score += this.input.text.length;\n this.update_score();\n this.input.text = \"\";\n }\n }\n return true;\n }", "function searchAvailableWord(current,k){\n\tvar availableWorld = -1;\n\twhile(current < wordList.length && current > -1){\n\t\tcurrent += k;\n\t\tif(current > wordList.length - 1 || current < 0){\n\t\t\tbreak;\n\t\t}\n\t\tif(wordStatus[current] == true){\n\t\t\tavailableWorld = current;\n\t\t\tbreak;\n\t\t}\n\t\tif(k==0){\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn availableWorld;\n}", "function findLetterInWord(word, idx, element) {\n var indices = [];\n console.log(\"you pressed: \" + element);\n console.log(\"which is the \" + idx + \"of the word \" + word);\n while (idx != -1) {\n indices.push(idx);\n idx = word.indexOf(element, idx + 1);\n }\n console.log(indices);\n while (indices.length > 0) {\n var letterPos = indices.pop();\n currentWord[letterPos] = element;\n lettersFound++;\n }\n document.getElementById(\"curWord\").textContent = currentWord.join(\"\");\n}", "function changeWord() {\n index = (index >= wordList.length-1) ? 0 : index+1;\n currentWord = wordList[index];\n }", "function updateMatchingWishes(magicWord) {\n if (magicWord) {\n if (magicWord.indexOf('\\'') === 0) {\n magicWord = magicWord.substring(1);\n }\n scope.matchingWishes = genie.getMatchingWishes(magicWord);\n if (scope.matchingWishes.length > 0) {\n scope.focusedWish = scope.matchingWishes[0];\n } else {\n scope.focusedWish = null;\n }\n } else {\n scope.matchingWishes = null;\n scope.focusedWish = null;\n }\n }", "wordsAreMatched(word){\n this.matchedWords.unshift(word)\n return this.matchedWords\n }", "function peekWord(wantedWord){\r\n\t\tvar prevType=type,prevWord=word;\r\n\t\tnext();\r\n\t\treadNext=-1;\r\n\t\tnewType=type;\r\n\t\tnewWord=word;\r\n\t\ttype=prevType;\r\n\t\tword=prevWord;\r\n\t\treturn newType===\"word\" && newWord.trimLeft().toUpperCase()===wantedWord;\r\n\t}", "function isInWord() {\n //gets the first position of the letter value in the word\n pos = word.indexOf(guess);\n //check to see if the letter is in the word\n if (word.indexOf(guess) > -1 ) { \n //if letter is in the word, enter the letter into the word array and html \n enterLetters(); \n\n //function wordSolved to see if the word is solved and if anyone won and to switch players\n wordSolved(); \n\n\n } else {\n //the letter is not in the word\n document.getElementById('audio').play();\n hangTheMan();\n };\n}", "function newWord(word) {\n mysteryWord = new Word(word);\n mysteryWord.guess(\" \");\n goalWord = word;\n goalWord = goalWord\n .split(\"\")\n .join(\" \")\n .concat(\" \");\n}", "function on_word_get(word) {\n recognition.stop();\n // ADD confirm or something\n // resolve using the currend MODE\n MODE(word);\n speak(\"listening\");\n if (CONTINUE) {\n recognition.start();\n }\n}", "function compare(userInput, str, chosenWord) {\n\tfor(var i = 0; i < chosenWord.length; i++){\n\t\tif(userInput === chosenWord[i]){\n\t\t\tstr[i] = userInput.toUpperCase();\n\t\t}\n\n\t} return str;\n\n}", "function showWord(value){\n\n let word = value.toLowerCase();\n let words = document.getElementsByName(word);\n let wordFound = false;\n let occurences = 0;\n\n for(var letter = 0; letter < currentWord.length; letter++){\n if(currentWord[letter] === word.toLowerCase()){\n wordFound = true;\n ++ occurences;\n }\n }\n\n for(var x = 0; x < words.length; x++){\n words[x].style.color = \"black\";\n }\n\n updateScoreGuesses(wordFound, occurences);\n}", "function searchGoogle(word) {\r\n var query = word.selectionText;\r\n\r\n}", "function buildWord(){\n\t\t// currentWord += event.target.innerText\n\t\tcurrentWordArray.push(event.target.innerText);\n\t\t// console.log(currentWordArray)\n\t\tcurrentWord = currentWordArray.join(\"\");\n\t\t// console.log(currentWord)\n\t\t$('.current-word').html(`<span class=\"current-heading\">Current Word: </span>${currentWord}`);\n\t}", "function traceChange(event) {\n var text = event.target.value;\n var actualText = para.split(\" \");\n var currentWord = actualText[cursor];\n\n if (cursor < actualText.length && text !== \" \" && !toRefreshPara) {\n document.getElementById(wordIndex).style.backgroundColor = \"#E2E2E2\";\n if (wordIndex > 1) {\n document.getElementById(wordIndex - 2).style.backgroundColor = \"white\";\n }\n if (!endedTyping) {\n startedTyping(true);\n }\n endTyping(false);\n if (keyCode == 32) {\n // hit whitespace\n if (cursor == actualText.length - 1) {\n startedTyping((typing) => false);\n endTyping(true);\n }\n if (text.trim() == currentWord.substring(0, text.length)) {\n document.getElementById(wordIndex).style.color = \"green\";\n } else {\n document.getElementById(wordIndex).style.color = \"red\";\n addMisspelledWords([...misspelledWords, currentWord]);\n console.log(\"WRONG : \" + currentWord);\n }\n changeWordIndex((wordIndex) => wordIndex + 2);\n clearInput();\n changeCursor(cursor + 1);\n } else {\n // checking while typing\n if (text !== currentWord.substring(0, text.length)) {\n document.getElementById(wordIndex).style.color = \"red\";\n } else {\n document.getElementById(wordIndex).style.color = \"green\";\n }\n changeTypedText(text);\n }\n }\n }", "function editDistance1(word) {\n\n}", "function repmatch(matched, before, word, after) {\r\n\tchanges++;\r\n\treturn before + '<span class=\"' + classes[curpat] + '\">' + word + '</span>' + after;\r\n }", "function censorWord(word){\n var text = document.getElementById(\"message\");\n\n var newWord = \"\";\n for (var i = 0; i < word.length; i++){\n newWord += \"*\";\n }\n\n //var res = text.value.replace(word, newWord);\n\n var res = text.value.substring(0, index - word.length) + newWord + \" \";\n\n\n text.value = res;\n}", "function verify(input){\n//create and set variable for correctness\n\tvar correct\n//run loop for length of word for correct letters\n\tfor(var i = 0; i < wordLength; i++) {\n\t\tif (input === word[i]) {\n\t\t\tcorrect = true\n\t\t}\n\t}\n//if input is correct, replace output of underscores with input\n//else push incorrect input to wrong array and take away a guess\n\tif (correct) {\n\t\t// console.log(correct)\n\t\tfor(var i = 0; i < wordLength; i++) {\n\t\t\tif (input === word[i]) {\n\t\t\t\toutput[i] = input\n\t\t\t}\n\t\t}\n\t} else {\n\t\twrong.push(input)\n\t\tguesses--\n\t}\n}", "function findOutput(input, dictionary) {\n\t\t\treturn filterDictionary(input, dictionary).filter(word => isEmbed(word, input));\n\t\t}", "function translateToFinnish() {\r\n var givenWord = document.getElementById(\"txtEnglishWord\").value;\r\n givenWord = givenWord.toLowerCase();\r\n \r\n var outputText = \"unknown word\";\r\n var wordFound = false;\r\n \r\n for (var index = 0; wordFound === false && index < englishWords.length; index++) {\r\n \r\n if (englishWords[index] === givenWord) {\r\n outputText = finnishWords[index];\r\n wordFound = true;\r\n }\r\n } \r\n \r\n document.getElementById(\"pOutput\").innerHTML = outputText;\r\n}", "getUntilWord(word) {\n var found = false;\n //edge case where no spaces betwen '<--' and '-->\n if (this.currentChar === '>') {\n found = true;\n }\n while (!found && this.index < this.length) {\n this.getUntilChar(word[0]);\n //note getUntilChar does not consume the character we pass in, so we start comparing each character of the word\n //at index 0\n for (let i = 1; i < word.length; i++) {\n this.consume();\n if (this.currentChar === word[i]) {\n found = true;\n } else {\n //exit for loop and go back to the while loop\n found = false;\n break\n }\n }\n }\n this.skipToNextChar();\n }", "function guessedWord() {\n wordStatus = answer.split('').map(letter => (guessed.indexOf(letter) >= 0 ? letter : \" _ \")).join('');\n\n document.getElementById('wordSpotlight').innerHTML = wordStatus;\n}", "function getWord(word) {\n for (let i = 0; i < notes.length; i++) {\n if (notes[i].content.indexOf(word) != - 1) {\n console.log(`You are looking for id:${notes[i].id} ${notes[i].content}`);\n };\n }\n console.log(`You do not have any task including ${word}`);\n}", "function wordCheck(key) {\n\n // Push guessedLetter to wordCheckArray\n wordCheckArray.push(key.guessedLetter);\n }", "function newWordLogic() {\n let numWords = _model.getDictionaryLength();\n let indexOfNewWord = Math.floor((Math.random() * numWords));\n _model.getNewWord(indexOfNewWord);\n }", "match(input, start, end) {\n start = start || 0\n end = end || input.length\n if(typeof input === 'string') input = new Source(input)\n if( !this.startsWith(input.get(start)) )\n return this.error(txt, start, start+1)\n var n = end\n end = start\n while(end<n && input.get(end)=='_') end++\n if( end==n ) return this.error(input,start,end)\n if(!Character.isLetter(input.get(end)))\n return this.error(input,start,end)\n while(end<n && Character.isAlphabetic(input.get(end))) end++\n return this.token(input,start,end,input.substring(start,end))\n }", "function getInputValue(){\n var str=document.getElementById('textField').value;\n var arr=str.toLowerCase().split(\" \");\n findMostFreqWord(arr);\n }", "function guessedWord() {\r\n wordStatus = answer.split('').map(letter => (guessed.indexOf(letter) >= 0 ? letter : \" _ \")).join('');\r\n\r\n document.getElementById('wordSpotlight').innerHTML = wordStatus;\r\n}", "function newWord() {\n\t\t// console.log(JSON.stringify(wordLists.curList, null, 2));\n\t\tcurWord.reset(wordLists.curList, newWord2);\n\t}", "function checkWord (word) {\n return (dict[word.toLowerCase()] ? true : false);\n}", "function inCompWord(letter){\n\t//see if the letter is in the word-\n\t//if it is add letter to the user's word to display on the screen\n\tvar inWord=false;\n\tfor (var i = 0; i < comp.word.length; i++) {\n\t\t//the guesser's letter is in the computer's word\n\t\t//add letter to the user's word to be later display on the screen\n\t\tif(comp.word[i].toLowerCase()===letter.toLowerCase()){\n\t\t\tif(i===0){\n\t\t\t\tguesser.word[i]=letter.toUpperCase();\n\t\t\t\t//console.log(\"found first letter: \" +guesser.word.join(\"\"));\n\t\t\t}\n\t\t\telse{\n\t\t\t\tguesser.word[i]=letter.toLowerCase();\n\t\t\t\t//console.log(\"found letter: \" +guesser.word.join(\"\"));\n\t\t\t}\n\t\t\tinWord=true;\n\t\t\t\n\t\t}\n\t}\n/*\tif(!inWord)\n\t{\n\t\t//console.log(\"letter not found\");\n\t}*/\n\treturn inWord;\n}", "async lookupSelectedWord() {\n if (this._process) {\n // A process is already running\n return;\n }\n\n const editor = atom.workspace.getActiveTextEditor();\n if (!editor) {\n return;\n }\n\n const word = this.getSelectedWord(editor);\n if (!word || word === this.currentWord) {\n // Nothing to look up\n return;\n }\n\n if (word.includes(\"\\n\") || word.length > 50) {\n // Too long selections are unlikely to yield any useful results,\n // and they also cause the status text to cover the entire screen!\n this.textPanel.setStatusText(\"Selection is too long\");\n return;\n }\n\n this.currentWord = word;\n\n // Run command and capture output\n this.textPanel.setStatusText(\"Looking up: \" + word);\n const command = Command.getCommandForGrammar(editor.getGrammar().name, this.commands);\n try {\n this._process = new Process(command, word);\n this.textPanel.setText(await this._process.run());\n this.textPanel.setStatusText(\"\");\n } catch (e) {\n if (e instanceof ProcessError) {\n if (e.errorCode === ProcessError.errorTypes.spawnProcessFailed) {\n this.textPanel.setText(e.message);\n } else {\n this.textPanel.setStatusText(`No result for '${word}' using '${command.getProgram()}'`);\n }\n } else {\n throw e;\n }\n } finally {\n this._process = undefined;\n }\n }", "function selectWord() {\n return wordList[Math.floor(Math.random() * wordList.length)];\n }" ]
[ "0.7345339", "0.7059616", "0.70418507", "0.68734044", "0.68594486", "0.6841881", "0.6832225", "0.68173707", "0.67627347", "0.6711301", "0.66974187", "0.6621317", "0.66189396", "0.65909106", "0.6538613", "0.6538226", "0.6505806", "0.6503142", "0.6496623", "0.6468929", "0.6458195", "0.644916", "0.6445359", "0.6419837", "0.64030063", "0.6386607", "0.6377652", "0.637729", "0.6358524", "0.635295", "0.63323915", "0.6330357", "0.6291725", "0.6287568", "0.6287484", "0.6276289", "0.6234653", "0.623444", "0.6233193", "0.62294155", "0.6181552", "0.617177", "0.615824", "0.6107111", "0.609452", "0.6073501", "0.60632765", "0.6041663", "0.601", "0.6006031", "0.59973705", "0.5988612", "0.5984564", "0.59726304", "0.59719956", "0.5951733", "0.5910699", "0.5909936", "0.59072435", "0.5901094", "0.5890296", "0.58850414", "0.58754826", "0.5856957", "0.5850039", "0.5848205", "0.5845776", "0.58456564", "0.5843489", "0.58299446", "0.58193487", "0.58146465", "0.58017915", "0.5795684", "0.5792535", "0.57858235", "0.5781671", "0.57728845", "0.57620484", "0.57598054", "0.5758378", "0.5753858", "0.5751669", "0.5750117", "0.5744994", "0.57433677", "0.57406205", "0.5725491", "0.57220566", "0.572124", "0.5713731", "0.5709791", "0.5708677", "0.5708318", "0.57068294", "0.5706356", "0.5706225", "0.57027435", "0.56981796", "0.5696933" ]
0.646286
20
pick and show random word
function showWord(words) { //generate random array index const randIndex=Math.floor(Math.random() * words.length); //output random word currentWord.innerHTML=words[randIndex]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showWord(words) {\r\n const randIndex = Math.floor(Math.random() * words.length);\r\n currentWord.innerHTML = words[randIndex];\r\n }", "function showWord(words) {\n const randIndex = Math.floor(Math.random() * words.length);\n currentWord.innerHTML = words[randIndex];\n}", "function showWord(words){\r\n const randIndex = Math.floor(Math.random()*words.length);\r\n currentWord.innerHTML = words[randIndex];\r\n}", "function showword(words){\n const randindex = Math.floor(Math.random() * words.length);\n\n //output random word\n currentword.innerHTML = words[randindex];\n}", "function SelectWord() {\n\treturn words[Math.floor(Math.random()*words.length)];\n}", "function showWord(words) {\n // Generate random array index\n const randIndex = Math.floor(Math.random() * words.length);\n // Output the random word\n currentWord.innerHTML = words[randIndex];\n}", "function selectWord() {\n return wordList[Math.floor(Math.random() * wordList.length)];\n }", "function chooseRandomWord() {\n //store random word\n currentWord = wordLibraryArray[Math.floor(Math.random() * wordLibraryArray.length)];\n currentWordArray = currentWord.split('');\n remainingLetters = currentWord.length;\n displayStatus(currentWord);\n}", "function showWord(words) {\n // Generate random array index\n const randIndex = Math.floor(Math.random() * words.length);\n // Output random word\n currentWord.innerHTML = words[randIndex];\n}", "function showWord(words){\r\n// generate random array index//\r\nconst randIndex =math.floor(math.random() * words.length);\r\n// output random words//\r\ncurrentWord.innerHTML = words[randIndex];\r\n}", "function showWord(words){\r\n //Generate random array Index\r\n const randIndex=Math.floor(Math.random()*words.length);\r\n //Output random word\r\n currentWord.innerHTML=words[randIndex];\r\n}", "function showWord(words){\n //get random index of array\n const randIndex = Math.floor(Math.random() * words.length);\n //Output random word\n currentWord.innerHTML = words[randIndex];\n}", "function showWord(words){\n\n //Generate randow array index\n const randIndex = Math.floor(Math.random() *words.length);\n //Output random word\n currentWord.innerHTML=words[randIndex];\n}", "function showWord(words){\n // generate random Array Index\n const randIndex = Math.floor(Math.random() * words.length);\n // output random word\n currentWord.innerHTML = words[randIndex].toUpperCase();\n \n}", "function rndChooseWord() {\n\n // This randomly selects a word from the list\n currentWordPos = (Math.floor(Math.random() * (wordstring.length)) + 1);\n\n}", "function pickWord() {\n \"use strict\";\n return words[Math.floor(Math.random() * words.length)];\n}", "function pickWord(words) {\n return words[Math.floor(Math.random() * words.length)]\n}", "function selectWord() { \n var words = [\"apple\", \"ice\", \"orange\", \"car\", \"computer\", \n \"game\", \"math\", \"school\", \"juice\", \"soda\", \n \"carrot\", \"purple\", \"movie\", \"superhero\"];\n return words[Math.round(Math.random() * words.length)];\n}", "function pickword(dictionary) {\n return dictionary[Math.floor(Math.random() * (dictionary.length - 1))];\n }", "function pick() {\r\n index = Math.floor(Math.random() * words.length);\r\n return words[index];\r\n}", "function selectRandomWord(words){\n let wordIndex = Math.floor(Math.random()*words.length);\n return words[wordIndex];\n }", "function chooseWord () {\n var word = words[Math.floor(Math.random() * words.length)];\n answer = word.toUpperCase();\n hiddenWord(answer);\n}", "function pickword() {\n let word = wordPool[Math.floor(Math.random() * wordPool.length)];\n return word;\n}", "function getWord(){\nrdm = Math.floor((Math.random() * words.length-1) + 1);\n console.log('Word: ' + words[rdm]);\nconsole.log('Random: ' + rdm)\ndocument.getElementById(\"printWord\").innerHTML = words[rdm];\ndocument.getElementById(\"cajatexto\").value =\"\";\nfocusTextBox();\ndspWord = words[rdm];\ndraw();\n}", "function pickWord(word) {\n var words = [\"monkey\", \"crocodile\", \"hippopotamus\", \"giraffe\", \"pterodactyl\"];\n var word = words[Math.floor(Math.random() * words.length)];\n return word; // Return a random word\n}", "function rndWord() {\n counter ++;\n if (correctCount == words.length) {\n showDone();\n return;\n }\n word = undefined;\n while (!word || word.learned) {\n word = words[Math.floor(Math.random() * words.length)];\n }\n showWord();\n}", "function pickWord(words) {\n var word = stringToArray(words[Math.floor((Math.random() * words.length) + 0)]);\n return word;\n}", "function pickWord(list) {\n return list[Math.floor(Math.random() * list.length)];\n}", "function selectWord() {\n var randomNumber0to1 = Math.random();\n var randomDecimal = randomNumber0to1 * artistsNames.length;\n var randomIndex = Math.floor(randomDecimal); \n currentWord = new Word(artistsNames[randomIndex]);\n}", "function showWord() {\r\n // Generate random index\r\n const randIndex = Math.floor(Math.random() * 274918);\r\n // Output a random word\r\n setTimeout(() => {currentWord.innerHTML = words[0][randIndex]}, 200)\r\n}", "function chooseWord(list_of_words){ \n return list_of_words[Math.floor(Math.random()*list_of_words.length)];\n}", "function random_word(){\n var n = 4 + Math.floor(Math.random() * 6);\n return random_text(n);\n }", "randomWord() {\n return this.randomOption(this.words);\n }", "function randomWord(){\n answer = fruits[Math.floor(Math.random() * fruits.length)];\n}", "function displayWord(array){\n word = array[Math.floor(Math.random() * array.length)];\n var display = document.getElementById(\"display\");\n display.innerText = word;\n}", "function showText() {\n $(\"#textDisplay\").empty();\n $(\"#instructions\").empty();\n randomWords = [];\n for (var i = 0; i < wordCount; i++) {\n var ranWord = wordList[Math.floor(Math.random() * wordList.length)];\n if (wordList[wordList.length - 1] !== ranWord || wordList[wordList.length - 1] === undefined) {\n randomWords.push(ranWord);\n }\n }\n randomWords.forEach(function(word){\n $(\"#textDisplay\").append($(\"<span>\",{\"text\": word + \" \",\"class\":\"word\"}));\n });\n textDisplay.firstChild.classList.add(\"highlightedWord\")\n }", "function randoWordSelect() {\n\n var rando = Math.floor(Math.random() * 27)\n currentWord = words.wordSelection[x];\n // below code will not allow a repeat word to be shown\n if (wordsPlayed.includes(currentWord)){\n randoWordSelect();\n } else {\n player = new Display(currentWord);\n letter = new Check(currentWord);\n }\n wordsGuessed.push(currentWord);\n}", "function Words() {\n var random = Math.floor(Math.random() * words.length);\n var randomword = words[random];\n console.log(randomword);\n}", "function getWord() {\n var number = Math.floor(Math.random() * words.length);\n return words[number].toLowerCase();\n }", "function getRandomWord() {\n var wordList = [\"DOG\",\"BIRD\",\"MOOSE\",\"CAT\",\"HORSE\",\"COW\",\"PIG\"];\n return wordList[Math.floor(Math.random() * wordList.length)];\n }", "function init() {\n //picks a random number and matches it to a letter\n currentWord = words[Math.floor(Math.random()*words.length)];\n wordHint.textContent = currentWord.split(\"\").map(letter => letter = \"__\").join(\" \");\n}", "function findRandomWord() {\n let range = halloweenArray.length;\n\n // selects a random index from array from the halloween words\n halloweenArrayIndex = Math.round(Math.random() * (range - 1));\n\n // stores that random picked word inside the currentWordArray\n currentWordArray = halloweenArray[halloweenArrayIndex].split(\"\");\n\n // removes the randomly selected word from the halloween array so it cant be used again\n halloweenArray.splice(halloweenArrayIndex, 1);\n\n // selects the hint that goes along with the randomly selected word and sends it to the HTML page\n document.getElementById(\"hint\").innerHTML = hints[halloweenArrayIndex];\n\n // Removes the hint from the array so it can't be selected again\n hints.splice(halloweenArrayIndex, 1);\n\n}", "function getRandomWord() {\n return words[Math.floor(Math.random() * words.length)];\n\n}", "function wordSelect() {\n // Select a word\n //Math.floor(Math.random() * (max - min) + min)\n let rnd = Math.floor(Math.random() * wordBank.length);\n\n let word = wordBank[rnd].toLowerCase();\n // let word = \"node js\"; // for testing\n //console.log(word);\n \n let result = new Word(word);\n // store the word\n return result;\n}", "function showWord(words) {\n //a variable to grab a number math.foor to round down, math.random to RNG, words.length for length of words array\n //Generate random array index\n const randIndex = Math.floor(Math.random() * words.length);\n // Output random word\n //We initialized currentWord at start of JS file and use innerHTML to grab value from html h2\n currentWord.innerHTML = words[randIndex];\n}", "function getRandomWord() {\n return words[Math.floor(Math.random() * words.length)];\n}", "function getRandomWord() {\n return words[Math.floor(Math.random() * words.length)];\n}", "function getWords() {\n word.innerText = list[Math.floor(Math.random() * list.length)];\n}", "function pickAWord() \n{\n\t\tcurrentWord = words[Math.floor(Math.random() * words.length)];\n\tfor(var i = 0; i < currentWord.length; i++)\n\t{\n\t\tanswer[i] = \"_\";\n\t\tdocument.getElementById(\"blanks\").innerHTML = answer;\n\n\t\t// removing the commas from in between the lines.\n\t\tvar remove = document.getElementById(\"blanks\");\n\t\tremove.innerHTML = answer.join(\" \");\n\t\t\n\t}\n}", "function chooseRandomWord() {\n\n randomWord = wordList[Math.floor(Math.random() * wordList.length)].toUpperCase();\n someWord = new word(randomWord);\n\n console.log(gameTextColor(\"Your word contains \" + randomWord.length + \" letters.\"));\n console.log(gameTextColor(\"WORD TO GUESS: \" + randomWord));\n\n someWord.splitWord();\n someWord.generateLetters();\n guessLetter();\n}", "word(){\n let index = Math.floor((Math.random() * words.length));\n return words[index];\n }", "function randomWord() {\r\n answer = guessme[Math.floor(Math.random() * guessme.length)];\r\n console.log(answer);\r\n}", "function pickSearchTerm() {\n let options = [\"stop\", \"mad\", \"angry\", \"annoyed\", \"cut it\" ];\n return options[Math.floor(Math.random() * 4)];\n}", "function randomWord() {\n result = wordslist[Math.floor(Math.random()*wordslist.length)];\n}", "generateWord() {\n var randomNumber = Math.floor(Math.random() * listOfWords.length)\n chosenWord = listOfWords[randomNumber]\n this.answer = chosenWord\n }", "function selectWord() {\n compGuess = mtnNames[Math.floor(Math.random()*mtnNames.length)];\n isPlaying = true;\n compGuessArr = compGuess.split(\"\");\n console.log('Comp guess array set here '+compGuessArr);\n }", "function setWord() {\n currentWord = words[Math.floor(Math.random() * words.length)];\n word.innerHTML = currentWord;\n currentLocation = 0;\n }", "function generateRandomWord() {\n randomWord = words[Math.floor(Math.random() * (words.length))];\n}", "function wordGenerator() {\n randomWord = wordList[Math.floor(Math.random() * wordList.length)];\n // console.log(\"Computer Picked: \" + randomWord);\n letters = randomWord.split('');\n console.log(letters);\n // display length of the random word selected as underscores\n hiddenWord = [];\n for (var i = 0; i < randomWord.length; i++) {\n hiddenWord.push(\"_\");\n console.log(\"computer picked: \" + randomWord);\n // push those underscores to an html element so it displays on the page\n document.getElementById(\"randomWord\").innerText = hiddenWord.join(' ');\n };\n}", "function selectWord() {\n var words = [\"mongoose\", \"pressure\", \"cooker\", \"reactor\", \"sequel\", \"onomatopoeia\", \"monitor\", \"printer\", \"speakers\", \"drive\"];\n randomWord = words[Math.floor(Math.random() * words.length)];\n //console.log(\"random Word: \" + randomWord); // testing\n var newRandWord = new Word(randomWord);\n return newRandWord;\n}", "function getRandomWord() {\r\n\twordString = wordRandomizer();\r\n\tlowerCaseRandomWord = wordString.toLowerCase();\r\n}", "function setGameWord() {\n\tlet random = Math.floor(Math.random() * wordArray.length);\n\tselectedWord = wordArray[random];\n}", "function wordRandomizer() {\r\n\treturn randomWords[Math.floor(Math.random()*randomWords.length)];\r\n}", "function getRandomWord() {\n const index = Math.floor(Math.random() * dictionary.length);\n return dictionary[index];\n}", "function randWord(obj) {\n\tgame.fullWord = game.answerKey[Math.floor(Math.random() * game.answerKey.length)];\n}", "function getWord() {\n var wordIndex = Math.floor(Math.random() * 10);\n var word = words[wordIndex]\n return word\n}", "function revealChoices() {\n // Pick 2 words randomly from the word list.\n wordListSample = _.sample(wordList, 3)\n // Hide reveal button after it is clicked.\n document.getElementById(\"revealButton\").style.display = \"none\";\n // Reveal and set text of the first random word.\n document.getElementById(\"choiceOne\").innerHTML = wordListSample[0];\n document.getElementById(\"choiceOne\").style.display = \"block\";\n // Reveal and set text of the second random word.\n document.getElementById(\"choiceTwo\").innerHTML = wordListSample[1];\n document.getElementById(\"choiceTwo\").style.display = \"block\";\n // Reveal and set text of the third random word.\n document.getElementById(\"choiceThree\").innerHTML = wordListSample[2];\n document.getElementById(\"choiceThree\").style.display = \"block\";\n}", "function randomWord() {\n\twordToGuess = words[Math.floor(Math.random() * words.length)];\n}", "function getRandomEasyWord() {\n theWord = wordsEasy[Math.floor(Math.random() * wordsEasy.length)];\n console.log(theWord);\n return theWord\n}", "function createWord() {\r\n let randomNumber = Math.floor(Math.random()*wordList.length);\r\n let wordObject = wordList[randomNumber];\r\n\r\n //definitionText.style.visibility=\"hidden\";\r\n document.getElementById('definition').innerHTML = wordObject.definition;\r\n\r\n\r\n return wordObject.name.toUpperCase(); // to pass to letter buttons\r\n}", "function getRandomWord(){\n return randomWords[Math.floor(Math.random() * randomWords.length)];\n}", "function getRandom(word) {\n return word[Math.floor(Math.random() * word.length)];\n }", "function getRandomWord() {\n // array taken from https://gist.github.com/borlaym/585e2e09dd6abd9b0d0a\n wordList = [\n \"Aardvark\",\n \"Albatross\",\n \"Alligator\",\n \"Alpaca\",\n \"Ant\",\n \"Anteater\",\n \"Antelope\",\n \"Ape\",\n \"Armadillo\",\n \"Donkey\",\n \"Baboon\",\n \"Badger\",\n \"Barracuda\",\n \"Bat\",\n \"Bear\",\n \"Beaver\",\n \"Bee\",\n \"Bison\",\n \"Boar\",\n \"Buffalo\",\n \"Butterfly\",\n \"Camel\",\n \"Capybara\",\n \"Caribou\",\n \"Cassowary\",\n \"Cat\",\n \"Caterpillar\",\n \"Cattle\",\n \"Chamois\",\n \"Cheetah\",\n \"Chicken\",\n \"Chimpanzee\",\n \"Chinchilla\",\n \"Chough\",\n \"Clam\",\n \"Cobra\",\n \"Cockroach\",\n \"Cod\",\n \"Cormorant\",\n \"Coyote\",\n \"Crab\",\n \"Crane\",\n \"Crocodile\",\n \"Crow\",\n \"Curlew\",\n \"Deer\",\n \"Dinosaur\",\n \"Dog\",\n \"Dogfish\",\n \"Dolphin\",\n \"Dotterel\",\n \"Dove\",\n \"Dragonfly\",\n \"Duck\",\n \"Dugong\",\n \"Dunlin\",\n \"Eagle\",\n \"Echidna\",\n \"Eel\",\n \"Eland\",\n \"Elephant\",\n \"Elk\",\n \"Emu\",\n \"Falcon\",\n \"Ferret\",\n \"Finch\",\n \"Fish\",\n \"Flamingo\",\n \"Fly\",\n \"Fox\",\n \"Frog\",\n \"Gaur\",\n \"Gazelle\",\n \"Gerbil\",\n \"Giraffe\",\n \"Gnat\",\n \"Gnu\",\n \"Goat\",\n \"Goldfinch\",\n \"Goldfish\",\n \"Goose\",\n \"Gorilla\",\n \"Goshawk\",\n \"Grasshopper\",\n \"Grouse\",\n \"Guanaco\",\n \"Gull\",\n \"Hamster\",\n \"Hare\",\n \"Hawk\",\n \"Hedgehog\",\n \"Heron\",\n \"Herring\",\n \"Hippopotamus\",\n \"Hornet\",\n \"Horse\",\n \"Human\",\n \"Hummingbird\",\n \"Hyena\",\n \"Ibex\",\n \"Ibis\",\n \"Jackal\",\n \"Jaguar\",\n \"Jay\",\n \"Jellyfish\",\n \"Kangaroo\",\n \"Kingfisher\",\n \"Koala\",\n \"Kookabura\",\n \"Kouprey\",\n \"Kudu\",\n \"Lapwing\",\n \"Lark\",\n \"Lemur\",\n \"Leopard\",\n \"Lion\",\n \"Llama\",\n \"Lobster\",\n \"Locust\",\n \"Loris\",\n \"Louse\",\n \"Lyrebird\",\n \"Magpie\",\n \"Mallard\",\n \"Manatee\",\n \"Mandrill\",\n \"Mantis\",\n \"Marten\",\n \"Meerkat\",\n \"Mink\",\n \"Mole\",\n \"Mongoose\",\n \"Monkey\",\n \"Moose\",\n \"Mosquito\",\n \"Mouse\",\n \"Mule\",\n \"Narwhal\",\n \"Newt\",\n \"Nightingale\",\n \"Octopus\",\n \"Okapi\",\n \"Opossum\",\n \"Oryx\",\n \"Ostrich\",\n \"Otter\",\n \"Owl\",\n \"Oyster\",\n \"Panther\",\n \"Parrot\",\n \"Partridge\",\n \"Peafowl\",\n \"Pelican\",\n \"Penguin\",\n \"Pheasant\",\n \"Pig\",\n \"Pigeon\",\n \"Pony\",\n \"Porcupine\",\n \"Porpoise\",\n \"Quail\",\n \"Quelea\",\n \"Quetzal\",\n \"Rabbit\",\n \"Raccoon\",\n \"Rail\",\n \"Ram\",\n \"Rat\",\n \"Raven\",\n \"Red deer\",\n \"Red panda\",\n \"Reindeer\",\n \"Rhinoceros\",\n \"Rook\",\n \"Salamander\",\n \"Salmon\",\n \"Sand Dollar\",\n \"Sandpiper\",\n \"Sardine\",\n \"Scorpion\",\n \"Seahorse\",\n \"Seal\",\n \"Shark\",\n \"Sheep\",\n \"Shrew\",\n \"Skunk\",\n \"Snail\",\n \"Snake\",\n \"Sparrow\",\n \"Spider\",\n \"Spoonbill\",\n \"Squid\",\n \"Squirrel\",\n \"Starling\",\n \"Stingray\",\n \"Stinkbug\",\n \"Stork\",\n \"Swallow\",\n \"Swan\",\n \"Tapir\",\n \"Tarsier\",\n \"Termite\",\n \"Tiger\",\n \"Toad\",\n \"Trout\",\n \"Turkey\",\n \"Turtle\",\n \"Viper\",\n \"Vulture\",\n \"Wallaby\",\n \"Walrus\",\n \"Wasp\",\n \"Weasel\",\n \"Whale\",\n \"Wildcat\",\n \"Wolf\",\n \"Wolverine\",\n \"Wombat\",\n \"Woodcock\",\n \"Woodpecker\",\n \"Worm\",\n \"Wren\",\n \"Yak\",\n \"Zebra\"\n ];\n\n var x = Math.floor((Math.random() * wordList.length));\n return wordList[x].toUpperCase();\n }", "function RandomWord() {\n var wordRandom = Math.floor(Math.random() * (wordList.length));\n return wordList[parseInt(wordRandom)];\n}", "function randWord(){\n var a = 'abtchyplwwah'; \n var b = 'aeyuioee';\n var c = 'eetleouiynmcc'\n var d = 'mnbceeytplttk';\n var w = [a,b,c,d];\n var str = '';\n for(var i=0; i++; i<4)\n {\n var n = (w[i][Math.floor(Math.random() * w[i].length)]);\n n = n || 'e';\n str += n;\n }\n\n }", "function wordSelectorFromArray(theArray, theId){\n\n var adjectivesLength = theArray.length;\n var myRandomNumber = Math.floor(Math.random()*(adjectivesLength-1));\n document.getElementById(theId).innerHTML = theArray[myRandomNumber];\n\n}", "function newWord() {\n $('#word_hint').html(words[Math.floor((Math.random() * words.length))]);\n resetTimer();\n vrtionary.ultimateClear();\n vrtionary.setTeamTime(30);\n}", "function loadWord() {\n randomWord = wordList[Math.floor(Math.random() * wordList.length)];\n randomWord = randomWord.toUpperCase().split('');\n for(var i = 0; i < arrBlank.length; i++) {\n arrBlank[i].style.visibility = 'hidden';\n arrBlank[i].textContent = randomWord[i];\n }\n}", "function getRandomWord() {\n var x = Math.random() * library.length;\n x = Math.floor(x);\n return library[x];\n }", "function getRandomWord(listOfWords) {\n indexWordSelect = Math.floor(Math.random() * wordsList.length);\n return listOfWords[indexWordSelect];\n}", "function getRandomWord(listOfWords) {\n return listOfWords[getRandomNumber()]\n}", "function wordGen() {\n\tcurrentWord = wordList[Math.floor(Math.random() * wordList.length)].toLowerCase();\n}", "function randColor() {\n\n // Set random word\n\n\n // Set random word color\n\n\n }", "function getWord(){\r\n\t// gets a random number within the list number of elements.\r\n\tvar randomNumber = Math.floor(Math.random() * wordList.length);\r\n\t// gets the word from that random position.\r\n\tvar returnWord = wordList[randomNumber];\r\n\treturn returnWord;\r\n}", "function generateRandomWord() {\n var wordsArr = ['terrapin', 'bear', 'dire wolf', 'china cat', 'bird song', 'carrion crow', \"monkey\"];\n randomWord = wordsArr[Math.floor(Math.random() * wordsArr.length)];\n return randomWord;\n}", "function getRandom() {\n return Math.floor(Math.random() * words.length);\n}", "function chooseSolution(){\n\t\tvar choice = Math.floor(Math.random() * wordList.length);\n\t\tsolution = wordList[choice].toLowerCase();\n\t\tsolution = solution.split(\"\");\n\t\tsolutionDisplay=[];\n\t\tfor (var i = 0; i < solution.length; i++) {\n\t\t\tsolutionDisplay.push(\"_\");\n\t\t}\n\t}", "function selectRandom(){\n var randomNumber = Math.floor(Math.random() * (1, arrayLength));\n var randomWord = wordArray[randomNumber];\n return randomWord;\n}", "function displayWords (words) {\n 'use strict'\n\n // add the word to the main display\n $.each(words, function (index, obj) {\n $password.val($password.val() + obj.word.capitalize())\n $passwordConfirm.val($passwordConfirm.val() + obj.word.capitalize())\n var $specialChar = specialCharacters[Math.floor(Math.random() * specialCharacters.length)];\n if (index != (words.length - 1)) {\n var $rand = ~~(Math.random() * 10)\n $password.val($password.val() + $specialChar + $rand)\n $passwordConfirm.val($passwordConfirm.val() + $specialChar + $rand)\n }\n })\n}", "function getRandomWord () {\n var rand = Math.floor(Math.random() * Object.keys(dict).length);\n return Object.keys(dict)[rand];\n}", "function getWord() {\n\t//get random word from wordList array\n\tvar randomWord = wordList[Math.floor(Math.random()*wordList.length)];\n\t//console.log(randomWord);\n\tword = randomWord;\n\tscrambleWord(word);\n\tinsertWord(scrambled)\n}", "function getword(partOfSpeech) {\n return partOfSpeech[Math.floor(Math.random() * partOfSpeech.length)];\n}", "function getRandomNormalWord() {\n theWord = wordsNormal[Math.floor(Math.random() * wordsNormal.length)];\n console.log(theWord);\n return theWord\n}", "function chooseRandomWord() {\n randomWord = wordList[Math.floor(Math.random() * wordList.length)].toUpperCase();\n //Set the random word chosen from the word list to aWord.\n aWord = new Word (randomWord);\n //Tell the user how many letters are in the word.\n console.log(\"Your word contains \" + randomWord.length + \" letters.\");\n console.log(\"Word to guess: \");\n //Use the Word constructor in Word.js to split the word and generate letters.\n aWord.splitWord();\n guessLetter();\n //aWord.lettersNeeded();\n \n }", "function wat(){\n var ranNo = Math.round(Math.random()*10)\n var funnyMessage = [\"You trying to trick me?\", \"Same case silly billy!\", \"Come on stop messing around!\",\n \"What?\", \"cAn NoT cOmPuTe\", \"Computer says no...\", \"Are you trying to be funny?\",\n \"OK I'll just convert that... Not!\", \"You're not the sharpest tool in the box, are you?\", \"How am I supose to work with this?\" ];\n $(\"#textOutput\").val(funnyMessage[ranNo]);\n}", "function play(){\n randNum = Math.floor(Math.random() * words.length);\n choosenWord = words[randNum];\n rightword = [];\n wrongword = [];\n underscore = [];\n remains = 10;\n document.getElementById(\"underscore\").textContent = generateUnderscore();\n document.getElementById(\"underscore\").textContent = underscore;\n document.getElementById(\"right\").textContent = rightword;\n document.getElementById(\"wrong\").textContent = wrongword;\n \n console.log(choosenWord)\n\n}", "function defAndWord(){\r\n\r\n document.getElementById('wordDef').innerHTML=def[randIndex];\r\n}", "function getRandomNumber() {\n return Math.floor((Math.random() * arrayOfWords.length) + 1);\n} // gets a random number to randomize which item the button click picks from the array", "function getRandomNumber() {\n return Math.floor((Math.random() * arrayOfWords.length) + 1);\n} // gets a random number to randomize which item the button click picks from the array", "function getRandomWords() {\n const $randomNumber = Math.floor(Math.random() * (chosenWordArray.length-1)); // gets random number between 0 - length of array\n console.log($randomNumber); // logs the random number in the console\n randomWord = chosenWordArray[$randomNumber]; // uses random number to choose random word from the array\n console.log(randomWord); // logs the random word chosen in the console\n jumbleWord(randomWord.toUpperCase()); // sends the random number to the jumbleWord function to jumble up the letters\n }" ]
[ "0.8288895", "0.8285007", "0.82234466", "0.8208006", "0.8109291", "0.806481", "0.80584437", "0.8049164", "0.8022298", "0.80017036", "0.79918873", "0.7983176", "0.79746974", "0.7945312", "0.7940346", "0.7859077", "0.78528863", "0.78324", "0.7770444", "0.7764458", "0.7749188", "0.77371424", "0.77222764", "0.7709643", "0.7704567", "0.76831883", "0.76816034", "0.7671014", "0.7664116", "0.7648907", "0.7625146", "0.7578129", "0.75588834", "0.7535118", "0.75215524", "0.7503256", "0.74977535", "0.74856097", "0.7471115", "0.7445161", "0.7431881", "0.7427559", "0.741781", "0.7414044", "0.7398036", "0.73912996", "0.73912996", "0.7390835", "0.7387081", "0.7379269", "0.73738855", "0.73673445", "0.7358204", "0.73565286", "0.7354409", "0.73444825", "0.73313546", "0.7331137", "0.73191714", "0.7315529", "0.73123586", "0.73032814", "0.72844994", "0.7281532", "0.7271098", "0.7263736", "0.72570235", "0.72510993", "0.72443736", "0.72443557", "0.7230483", "0.7228753", "0.7228287", "0.72269803", "0.7193536", "0.71752185", "0.71663713", "0.7165983", "0.7165511", "0.71036434", "0.7076647", "0.70639396", "0.7063323", "0.705215", "0.7050714", "0.7023681", "0.7014986", "0.701457", "0.7007947", "0.6995779", "0.6991796", "0.6982117", "0.6969745", "0.6966933", "0.69616175", "0.6959997", "0.69503856", "0.69499815", "0.69499815", "0.6947782" ]
0.803209
8
Sets the paused state of the game.
setIsPaused(flag) { validateRequiredParams(this.setIsPaused, arguments, 'flag'); this.isPaused = flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "pause() {\n this._isPaused = true;\n }", "pause() {\n this._isPaused = true;\n }", "togglepaused() {\n if (this.gamestate == GAMESTATE.PAUSED) {\n this.gamestate = GAMESTATE.RUNNING;\n }\n else {\n this.gamestate = GAMESTATE.PAUSED;\n }\n\n }", "pause() {\n this._isPaused = true;\n }", "pause() { this.setPaused(true); }", "setPaused (paused) {\n\t\tif (this.isPaused == paused) {\n\t\t\treturn;\n\t\t}\n\t\tthis.isPaused = paused;\n\t\tconst now = Date.now ();\n\t\tif (this.isPaused) {\n\t\t\tthis.lastPauseTime = now;\n\t\t}\n\t\telse {\n\t\t\tif (this.nextCommandTime > 0) {\n\t\t\t\tthis.nextCommandTime += (now - this.lastPauseTime);\n\t\t\t}\n\t\t}\n\t}", "setPausedState() {\n let active = document.querySelector(`.${this.activeClass}`)\n if (active) active.classList.add(this.pausedClass)\n }", "function togglePause() {\n isGamePaused = !isGamePaused;\n }", "function pause() {\n _isGamePaused = true;\n\n Frogger.observer.publish(\"game-paused\");\n }", "togglePause() {\n if (this.gamestate === GAMESTATE.RUNNING) {\n this.gamestate = GAMESTATE.PAUSED;\n } else if (\n this.gamestate === GAMESTATE.PAUSED ||\n this.gamestate === GAMESTATE.MENU ||\n this.gamestate === GAMESTATE.GAMEOVER\n ) {\n this.gamestate = GAMESTATE.RUNNING;\n }\n }", "function pause() {\n if (!paused) {\n paused = true;\n } else {\n paused = false;\n }\n}", "function gamePause() {\n\n if(territory.game.paused==false){\n state=1;\n prepauseturn=turn;\n turn=3;\n players_turn(territory.game);\n territory.game.paused = true;\n button_return.visible = true;\n button_retry.visible = true;\n button_exit.visible = true;\n pause_label.visible = true;\n frame.visible = true;\n\n }else{\n turn=prepauseturn;\n button_return.visible = false;\n button_retry.visible = false;\n button_exit.visible = false;\n pause_label.visible = false;\n frame.visible = false;\n\n territory.game.paused = false;\n }\n }", "function gamePause() {\n drawPauseState();\n resumeCountdown = 3;\n gameState = \"gamePaused\";\n}", "pause() {\n paused = true;\n }", "function setPlayerPaused(isPaused){\n if (isPaused) {\n dom.play.classList.add('paused');\n } \n else {\n dom.play.classList.remove('paused');\n }\n}", "pause() {\n this.paused = true;\n }", "function togglePause() {\n\n if (isPaused()) {\n resume();\n }\n else {\n pause();\n }\n\n }", "pause(){\n if(this._isRunning && !this._isPaused){\n this._isPaused = true;\n this._togglePauseBtn.classList.add(\"paused\");\n this.onPause();\n }\n }", "function pause() {\n paused = true;\n clearTimeout(timeout);\n }", "resume() {this.paused = false;}", "function pause () {\n if (globalVariables.whichGame !== \"opening scene\" && globalVariables.whichGame !== \"victory scene\") {\n globalVariables.paused = true;\n $(\"#pause_button\").html(\"&#9658;\");\n }\n }", "pause () {\n\t\t\tthis.runOnResume = this.running;\n\t\t\tthis.stop();\n\t\t}", "resume() { this.setPaused(false); }", "function togglePause() {\n if (!Engine.GetGUIObjectByName(\"pauseButton\").enabled) return;\n\n closeOpenDialogs();\n\n pauseGame(!g_Paused, true);\n}", "function togglePause() {\n // Allow the user to start the game with a spacebar rather than a button\n if (!isGameStarted) {\n startGame();\n return;\n }\n\n // Deal with the pause\n if (isPaused) {\n isPaused = false;\n isStopped = false;\n // Don't kick off another advance loop if the old one never noticed the pause.\n if (pauseDetected) {\n advance();\n }\n } else {\n isPaused = true;\n isStopped = true;\n drawPausedGame();\n }\n }", "function unpause() {\n _isGamePaused = false;\n\n Frogger.observer.publish(\"game-unpaused\");\n }", "get paused() {\n return this._paused;\n }", "pause() {\r\n clearTimeout(this.movementTimer);\r\n this.moving = false;\r\n this.game.controls.classList.add('paused');\r\n }", "togglePause () {\n this.paused = !this.paused\n }", "pause() {\n\n clearTimeout(this.movementTimer);\n this.moving = false;\n this.game.controls.classList.add('paused');\n\n }", "function pause() {\n\n var wasPaused = dom.wrapper.classList.contains('paused');\n\n cancelAutoSlide();\n dom.wrapper.classList.add('paused');\n\n if (wasPaused === false) {\n dispatchEvent('paused');\n }\n\n }", "async _pause() {\n await this.setState({\n paused: true,\n showOverlay: true,\n }, () => this.props.setPausedState && this.props.setPausedState(true))\n }", "function playPause() {\n\t\tDBR.act('pause');\n\t\tsyncState();\n\t}", "function pauseGame() {\n\tpause = true;\n\tstart = false;\n}", "get isPaused() {\n return this._isPaused;\n }", "get isPaused() {\n return this._isPaused;\n }", "togglePauseGame() {\n if (this.running) {\n console.log('pausing game');\n this.running = false;\n this.scene.pause();\n\n // be sure to render any changes from the scene before stopping refresh\n this.display.renderScene(this.scene);\n\n // then stop render/event loop\n this.stopScene();\n } else {\n console.log('un-pausing game');\n this.running = true;\n this.scene.unpause();\n this._runSceneLoop();\n this._renderSceneLoop();\n }\n }", "function pauseGame(){\n\tif(!pause){\n\t\tpause = true;\n\t\tprintSideConsole('Game is PAUSED');\n\t\tfor(var i in unitArray){\n\t\t\tclearInterval(unitArray[i].pathInterval);\n\t\t}\n\t}\n\telse{\n\t\tpause = false;\n\t\tprintSideConsole('Game is UNPAUSED');\n\t}\n}", "toggle_paused() {\n this.paused = !this.paused\n\n // update the button\n let display_text = this.paused ? \"Play\" : \"Pause\";\n $(\"#pause\").html(display_text);\n\n // Update this value so when we unpause we don't add a huge\n // chunk of time.\n this.last_update = AnimationManager.epoch_seconds();\n }", "get isPaused() {\n return this._isPaused;\n }", "function pause_resume() {\r\n if (gameState == \"run\") {\r\n gameLoop.stop();\r\n gameState = \"stop\";\r\n }\r\n else if (gameState == \"stop\") {\r\n gameLoop.start();\r\n gameState = \"run\";\r\n }\r\n}", "pause (paused)\n {\n this.lerpIntervals.pause(paused);\n }", "function togglePause() {\n var e = document.getElementById('pause');\n\n if (gba.paused) {\n gba.runStable();\n e.textContent = \"PAUSE\";\n } else {\n gba.pause();\n e.textContent = \"UNPAUSE\";\n }\n }", "play() {\n this.paused = false;\n }", "set Pause(value) {}", "function togglePause(paused) {\n //if paused\n if (paused) {\n songPlayed.pause(); //pause the songs and time\n\n TimeMe.stopTimer(\"game\");\n clearInterval(handle); //clear the intervals and set to 0\n clearInterval(spawn);\n clearInterval(addp);\n clearInterval(addb);\n handle = 0;\n spawn = 0;\n addp = 0;\n addb = 0;\n } else { //start is pressed again, game unpaused\n songPlayed.play(); //play the song, reset the intervals\n\n TimeMe.startTimer(\"game\");\n handle = setInterval(loop, 30);\n spawn = setInterval(addRects, 900);\n addp = setInterval(addPowerUps, 4500);\n addb = setInterval(addDebuffs, 9000);\n }\n\n }", "pause() {\n this._audio.pause();\n this._playingState = 'idle';\n }", "function pause() {\n if (playId) {\n clearInterval(playId)\n playId = undefined\n }\n\n /* Re-enable all settings, and hide the pause button. */\n d3.selectAll('button').attr('disabled', null)\n d3.select('#pause-button').style('display', 'none')\n d3.select('#play-button').style('display', 'inline-block')\n}", "function pauseGameStateChangeStarter() {\n store.dispatch( {\n type: PLAYPAUSE_CHANGE,\n payload: {\n isGamePaused: true,\n }\n });\n }", "resume() {\n this.paused = false;\n this.flush();\n }", "stop() {\n this.paused = true;\n }", "paused() {\n\n }", "paused() {\n\n }", "paused() {\n\n }", "paused() {\n\n }", "paused() {\n\n }", "function doPause() {\n PLAY_STATUS = PlayStatus.PAUSED\n pausePlay.innerHTML = 'Resume'\n d3.select(\"#pauseplay\").attr(\"class\", \"btn menu-button\")\n CODE_MIRROR_BOX.setOption(\"theme\", DISABLED_CODE_THEME)\n}", "function pauseGame()\r\n\t\t{\r\n\t\t\tif(pause == true)\r\n\t\t\t{\r\n\t\t\t\tcontext.font = \"26px Indie Flower\";\r\n\t\t\t\tcontext.fillStyle = \"red\";\r\n\t\t\t\tcontext.fillText(\"PAUSE\", 290, 230);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "pause() {\n this._isPaused = true;\n this.stopRecording();\n }", "async _togglePause() {\n if (this.state.done) {\n if (this.state.paused) {\n this._play()\n } else {\n this._pause()\n }\n }\n }", "function onClickPause() {\n if(speaking && !paused){ /* pause text */\n pauseText.className = 'paused';\n playText.className = '';\n pause();\n }\n }", "pause() {\n clearTimeout(this.currentTimeout);\n this.paused = true;\n this.timeleft = this.expected - new Date().getTime();\n }", "pause () {\n this.playing = false;\n }", "pause () {\n this.playing = false;\n }", "isPaused() {\n return this._isPaused;\n }", "function checkPause(event, game, canvas) {\n\tsetMousePos(event, game, canvas);\n\tif (650 >= game.mouse_x && game.mouse_x >= 600 && 30 >= game.mouse_y && game.mouse_y >= 10) {\n\t\tif (game.state == \"start\") {\n\t\t\tgame.state = \"pause\";\n\t\t\t\n\t\t} else {\n\t\t\tgame.state = \"start\";\n\n\t\t}\n\t\t\n\t}\n\n}", "get paused() {\n return __classPrivateFieldGet(this, _paused);\n }", "function resumeGame() {\n\tpause = false;\n\tstart = true;\n}", "pause() {\n const self = this;\n const { element, options } = self;\n if (!self.isPaused && options.interval) {\n addClass(element, pausedClass);\n Timer.set(element, () => {}, 1, pausedClass);\n }\n }", "paused() {\n this.add(new PausedAnimation(this.canvas));\n }", "function pause() {\n\tif (pause_status === false && talk_status === true) {\n\t\tconsole.log('The voice of the system is paused.');\n\t\tassistant.pause();\n\t\tpause_status = true;\n\t\tresume_status = false;\n\t} else {\n\t\tconsole.log('The voice of the system is already paused.');\n\t}\n}", "function pause(){\n if (paused == false){\n paused = !paused;\n }\n else{\n paused = !paused;\n requestAnimationFrame(draw);\n }\n}", "function togglePause() {\n if(pause) {\n document.getElementById(\"toggle-pause-content\").innerHTML = \"Pause\";\n drawBoard(board);\n\n drawPieceBoard(pieceBoard);\n drawHoldPieceBoard(holdBoard);\n drawPiece();\n drawNextPiece();\n drawHoldPiece();\n\n drawPiece();\n }\n else{\n document.getElementById(\"toggle-pause-content\").innerHTML = \"Resume\";\n drawBoard(pauseBoard);\n drawPieceBoard(pieceBoard);\n drawHoldPieceBoard(holdBoard);\n }\n pause=!pause;\n}", "function unpause() {\n game.paused = false;\n pauseBG.destroy();\n pauseText.destroy();\n unpauseBtn.destroy();\n pauseBtn.inputEnabled = true;\n}", "resume(){\n if(this._isPaused){\n this._isPaused = false;\n this._togglePauseBtn.classList.remove(\"paused\");\n this.onResume(); \n }\n }", "function pauseGame(pause = true, explicit = false) {\n // The NetServer only supports pausing after all clients finished loading the game.\n if (g_IsNetworked && (!explicit || !g_IsNetworkedActive)) return;\n\n if (explicit) g_Paused = pause;\n\n Engine.SetPaused(g_Paused || pause, !!explicit);\n\n if (g_IsNetworked) {\n setClientPauseState(Engine.GetPlayerGUID(), g_Paused);\n return;\n }\n\n updatePauseOverlay();\n}", "pause() {\n\t\tif (this.paused) {\n\t\t\tthis.start();\n\t\t\treturn;\n\t\t}\n\t\tclearInterval(this.interval);\n\t\tthis.paused = true;\n\t}", "pauseResume(paused) {\n if (paused) {\n this.timeout = setTimeout(() => { this.changeWord(); }, this.wordTimer);\n } else {\n clearInterval(this.timeout);\n this.timeout = null;\n }\n }", "function togglePause() {\r\n //Toggle play state\r\n //Pause\r\n if (paused === true) {\r\n //Update playing boolean\r\n paused = false;\r\n //Change play button text\r\n pauseBtn.innerText = \"Pause\";\r\n }\r\n //Play\r\n else {\r\n //Update paused boolean\r\n paused = true;\r\n //Change play button text\r\n pauseBtn.innerText = \"Resume\";\r\n }\r\n}", "function pause() {\r\n player.pause();\r\n }", "function isPaused() {\n\n return dom.wrapper.classList.contains('paused');\n\n }", "function setClientPauseState(guid, paused) {\n // Update the list of pausing clients.\n let index = g_PausingClients.indexOf(guid);\n if (paused && index == -1) g_PausingClients.push(guid);\n else if (!paused && index != -1) g_PausingClients.splice(index, 1);\n\n updatePauseOverlay();\n\n Engine.SetPaused(!!g_PausingClients.length, false);\n}", "function pause () {\n if (state.gameMode.paused){\n clearInterval(control);\n drawContinueButton();\n console.log(\"louise space bar pause function\", state.gameMode);\n } else {\n control = setInterval(animateCanvas,30);\n }\n}", "function pause() {\n paused = true; // Set paused to true\n ctx.fillStyle = \"rgba(0, 0, 0, 0.8)\"; // Set the colour to black at 80% opacity\n ctx.fillRect(0, 0, canvas.width, canvas.height); // Draw a rectanglw over the entire screen\n ctx.font=\"30px Arial\"; // Set the font\n ctx.fillStyle = \"rgb(255,255,255)\"; // Set the colour to white\n ctx.fillText(\"Paused\",200,canvas.height/2 -30); // Draw the word 'paused' to the canvas\n ctx.font=\"25px Arial\"; // Set the font (smaller)\n ctx.fillText(\"Press the 'esc' key to resume\",90,canvas.height/2 + 10); // Write the instructions for the user to use the 'esc' key to resume the game\n clearInterval(mainInterval); // Stop the main game loop from automatically dropping the block\n}", "function togglePause() {\n\tisPaused=!isPaused;\n\t\n\tif(!isPaused)\n\t\trefreshValues();\n\t\t\n\treturn isPaused;\n}", "function pauseOn()\n\t\t\t{\n\t\t\t\tpause = true;\n\t\t\t\tq.find(\".x-controls .pause\").hide();\n\t\t\t\tq.find(\".x-controls .play\").show();\n\t\t\t}", "function pauseCallBack(paused)\r\n{\r\n\tisGameRunning=!paused;\r\n}", "function checkForGamePaused() {\n if (keysPressed[KEYS.E]) {\n gameIsPaused = !gameIsPaused;\n }\n if (gameIsPaused) {\n sceneManager.changeScenes(gameScene, pauseScene);\n } else {\n sceneManager.changeScenes(pauseScene, gameScene);\n gameScene.updateSprites();\n }\n}", "function pauseGame() {\n if (store.getState().isGamePaused == true && store.getState().battleState == 'BATTLE_ON') {\n battleMapGamePauseid.classList.remove('pagehide');\n if(store.getState().towerSlotToBuild) {\n let tempTowerSlotToBuild = store.getState().towerSlotToBuild.split('_')[2];\n battleMap1TowerPlaceList[tempTowerSlotToBuild - 1].classList.add('stopAfterAnimation');\n }\n }\n }", "function onPause() {\n\n\t\tthis.draw = function() {\n\t\t\tdrawScreen(\"rgba(0, 0, 0, 0.5)\");\n\t\t\tdrawPaddle(player_1);\n\t\t\tdrawPaddle(player_2);\n\t\t\tdrawBall();\n\t\t\tdrawScreen(\"rgba(100, 0, 100, 0.6)\");\n\t\t\twriteText(\"P A U S E\", 40, 450, 100, 3);\n\t\t}\n\t}", "function playPause() {\n setIsTimerRunning((prevState) => !prevState);\n }", "function pauseGame(){\n var pauseButton = document.getElementById(\"pauseButton\");\n //Toggle button text and add/remove processTurn from core game timer as necessary\n switch(pauseButton.value){\n case \"Pause\":\n pauseButton.value = \"Resume\"\n game.time.events.removeAll();\n break;\n case \"Resume\":\n pauseButton.value = \"Pause\"\n processTurnTimerEvent = game.time.events.loop(TIME_TO_NEXT_UPDATE, processTurn, this);\n break;\n default:\n break;\n } \n}", "_pauseGame(){\n this._gameon=false;\n clearInterval(this.interval);\n }", "pause() {\n\t\tif(this.element.style.webkitAnimationPlayState !== 'paused'){\n\t\t\tthis.element.style.webkitAnimationPlayState = 'paused';\n\t\t\tthis.delay += ((new Date()).getTime() - this.startTime);\n\t\t}\n\t}", "function pause() {\n\t\t\t$progressBar.stop();\n\t\t\tisPaused = true;\n\t\t\tpauseProgress = $progressBar.innerWidth() / imageWidth;\n\t\t}", "function onPause() {\n // TODO: This application has been suspended. Save application state here.\n }", "function gamePause(){\n\t\n\t// Check if gameTimer exists and is true\n\tif(gameTimer){\n\t\t\n\t\t// Clear gameTimer\n\t\tclearTimeout(gameTimer);\n\t\t\n\t\t// Set gameTimer to 0\n\t\tgameTimer = 0;\n\t}\n\t\n\t// Show start button\n\t$('#game-btn-start').removeClass('hidden');\n\t\n\t// Hide pause button\n\t$('#game-btn-pause').removeClass('hidden').addClass('hidden');\n}", "function isPaused()\n{\n if(!dead)\n {\n if (!paused)\n {\n paused = true;\n } \n else if (paused)\n {\n paused = false;\n }\n\n if(paused)\n {\n clearInterval(interval);\n document.getElementById(\"pause\").innerHTML=\"Paused!! (Press 'p' again to continue!!)\";\n }\t\n else if(!paused)\n {\n interval=setInterval(update,speed);\t\n document.getElementById(\"pause\").innerHTML=\"\";\n }\n } \t\n}", "function togglePause() {\r\n\r\n // Stop dispatching updates.\r\n toggleGameLoop();\r\n\r\n // Toggle the enemy spawner.\r\n toggleEnemySpawner();\r\n\r\n // Toggle the timer.\r\n toggleTimer();\r\n}", "pause() {\n this.disable = true;\n }" ]
[ "0.79460466", "0.79460466", "0.79098266", "0.768776", "0.7651369", "0.7634788", "0.7528867", "0.74508554", "0.7354809", "0.73284125", "0.72900057", "0.72774863", "0.7272434", "0.7249631", "0.7186054", "0.7185108", "0.71830535", "0.7094093", "0.70756465", "0.7028444", "0.7008263", "0.6996834", "0.6971925", "0.6924911", "0.69029886", "0.68791527", "0.6876936", "0.68645686", "0.68640214", "0.68600994", "0.6851491", "0.6848366", "0.68402237", "0.6797981", "0.6755218", "0.6755218", "0.67094177", "0.6690893", "0.66817284", "0.66194373", "0.6611992", "0.66003144", "0.6585696", "0.6584206", "0.6569992", "0.65698826", "0.6560254", "0.6558521", "0.6536286", "0.6502208", "0.6500183", "0.6486565", "0.6486565", "0.6486565", "0.6486565", "0.6486565", "0.64763445", "0.64752215", "0.6474283", "0.6471235", "0.646907", "0.6461426", "0.64479214", "0.64479214", "0.64412034", "0.641082", "0.6409406", "0.64083904", "0.64010227", "0.63952255", "0.6384809", "0.6343162", "0.63339585", "0.6320745", "0.63123435", "0.6309368", "0.6303532", "0.62728006", "0.6247911", "0.62431973", "0.6241376", "0.62399375", "0.6230214", "0.6217398", "0.6204237", "0.61992735", "0.61962914", "0.6187719", "0.6169648", "0.61491346", "0.61355966", "0.6124756", "0.61189556", "0.61008906", "0.6096087", "0.6092765", "0.60914576", "0.60902923", "0.60824007", "0.6079347" ]
0.71785104
17
Set the Barbarian actions as being locked or not.
setActionsLocked(flag) { if (flag === undefined) { throw new Error("setActionsLocked: flag argument is required"); } this.actionsLocked = flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _lockFunctionality() {\n lockUserActions = true;\n viewModel.set(\"lockUserActions\", lockUserActions);\n}", "function _unlockFunctionality() {\n lockUserActions = false;\n viewModel.set(\"lockUserActions\", lockUserActions);\n}", "function lockActions() {\n $('.modal').find('.actions-container')\n .children().first() // the save/submit button\n .addClass('disabled').prop('disabled', true);\n }", "toggleLock() {\n $(\"[data-button='lock']\").find(\"i\").toggleClass(\"fa-unlock fa-lock\");\n $(\".container > .menu\").toggleClass(\"draggable\");\n\n var configLock = !config.get(\"window.locked\");\n\n config.set(\"window.locked\", configLock);\n }", "toggleBoardLock () {\n\t\tthis.model.toggleBoardState();\n\t\tthis.view.toggleBoardClassName( this.model.isBoardBlocked );\n\t}", "lock() {\n const that = this;\n\n that.locked = that.unfocusable = true;\n\n if (that.showNearButton || that.showFarButton) {\n return;\n }\n\n that._setFocusable();\n }", "function disableActions() {\r\n hit.disabled = true;\r\n holdHand.disabled = true;\r\n newgame.disabled = false;\r\n }", "function k() {\n if (!menuLocked) {\n menuLocked = true;\n }\n else if (menuLocked) {\n menuLocked = false;\n }\n}", "static set lockState(value) {}", "function toggleLocked() {\n locked.checked ? cropper.disable() : cropper.enable()\n width.disabled = locked.checked\n height.disabled = locked.checked\n change.disabled = locked.checked\n\n if (locked.checked) {\n toggleShowUpload(false)\n }\n}", "function formLock() {\r\n disableWidget('newButton');\r\n disableWidget('newButtonList');\r\n disableWidget('saveButton');\r\n disableWidget('printButton');\r\n disableWidget('printButtonPdf');\r\n disableWidget('copyButton');\r\n disableWidget('undoButton');\r\n hideWidget('undoButton');\r\n disableWidget('deleteButton');\r\n disableWidget('refreshButton');\r\n showWidget('refreshButton');\r\n disableWidget('mailButton');\r\n disableWidget('multiUpdateButton');\r\n disableWidget('indentDecreaseButton');\r\n disableWidget('changeStatusButton');\r\n disableWidget('subscribeButton');\r\n}", "function setLock(locked)\r\n{\r\n lock = locked;\r\n}", "function lockModal() {\n locked = true;\n }", "function lockModal() {\n locked = true;\n }", "unlock() {\n this.setState(prevState => ({\n checked: prevState.checked,\n preventEdit: false,\n preventEditDescription: ''\n }));\n }", "function setDoorLock(door, action){\n if(action == 'lock') {\n lockDoor(door);\n } else if(action == 'unlock') {\n unlockDoor(door);\n } else {\n sendMessage('InvalidArgument', 'setDoorLock.Action');\n }\n}", "mute() {\n for (var n in this.progress.currentNoises) {\n this.progress.currentNoises[n].active = false;\n }\n for (var n in this.progress.currentAnimalCalls) {\n this.progress.currentAnimalCalls[n].active = false;\n }\n this.progress.continue = true;\n\tthis.setChanged();\n\tthis.notifyObservers(this.progress);\n\tthis.clearChanged();\n }", "setLockVisibility(visible){\n var count;\n for(count = 0; count < this.locks.length; count++){\n this.locks[count].setVisible(visible);\n }\n }", "function lock() {\n $('button').attr(\"disabled\", \"true\");\n }", "unlock() {\n this.locked = 0\n }", "actionTabClicker() {\r\n \r\n this.setState({actionChecker: \"block\"})\r\n this.setState({casingChecker: \"none\"})\r\n\r\n }", "unlock() {\n const that = this;\n\n that.locked = that.unfocusable = false;\n that._setFocusable();\n }", "updateClosedWindowsMenu(action) {\r\n var disabled = (action == \"check\") ? this.isClosedWindowsEmpty() : action;\r\n var wnd, enumerator = Tabmix.windowEnumerator();\r\n while (enumerator.hasMoreElements()) {\r\n wnd = enumerator.getNext();\r\n wnd.Tabmix.setItem(\"tmp_closedwindows\", \"disabled\", disabled || null);\r\n }\r\n }", "Lock() {\n\t\t\t\tDEFINE(THS, { Locked: HIDDEN(true) });\n\t\t\t}", "function setScreenLocked(value){\r\n\tscreenLocked = value;\r\n\tif (screenLocked && hatsForm){\r\n\t\tdisableHhostForm(hatsForm);\r\n\t}\r\n\tupdateStatusWindow();\r\n}", "function lockdoor() {\n\t\t\t\tref.update({\n\t\t\t\tunlocked: false,\n\t\t\t})\t\t\t\n\t\t\t}", "function buttonRightLock() {\r\n var createRight = dojo.byId('createRight');\r\n var updateRight = dojo.byId('updateRight');\r\n var deleteRight = dojo.byId('deleteRight');\r\n if (createRight) {\r\n if (createRight.value != 'YES') {\r\n disableWidget('newButton');\r\n disableWidget('newButtonList');\r\n disableWidget('copyButton');\r\n }\r\n }\r\n if (updateRight) {\r\n if (updateRight.value != 'YES') {\r\n disableWidget('saveButton');\r\n disableWidget('undoButton');\r\n disableWidget('multiUpdateButton');\r\n disableWidget('indentDecreaseButton');\r\n disableWidget('indentIncreaseButton');\r\n disableWidget('changeStatusButton');\r\n disableWidget('subscribeButton');\r\n }\r\n }\r\n if (deleteRight) {\r\n if (deleteRight.value != 'YES') {\r\n disableWidget('deleteButton');\r\n }\r\n }\r\n}", "unlock() {\n const that = this;\n\n that.locked = false;\n }", "async lock() {\n\t\tif (this.lock_status_id === 3) {\n\t\t\treturn;\n\t\t}\n\t\tawait this.send_command(0);\n\t\tawait this.await_event('status:LOCKED');\n\t}", "setCurrentToUnlocked() {\n const currentSelectedCursor = this.shopView.find(\".current\");\n\n // Set other text if the selected cursor was the default cursor\n if (currentSelectedCursor.prop(\"id\") === \"default\") {\n currentSelectedCursor.html(\"Normale cursor\");\n } else {\n currentSelectedCursor.html(`<i class=\"fas fa-unlock-alt\"></i>`).addClass(\"unlocked\");\n }\n\n currentSelectedCursor.removeClass(\"current\").prop('disabled', false);\n }", "setActions(actions) {\n this.actions = actions;\n }", "function C012_AfterClass_Amanda_LockChastityBelt() {\n\tPlayerLockInventory(\"ChastityBelt\");\n\tPlayerRemoveInventory(\"ChastityBelt\", 1);\n\tCurrentTime = CurrentTime + 50000;\n}", "function activateButtons(){\n $(\"#ok\").prop('disabled', false);\n $(\".lock button\").prop('disabled', false);\n}", "function setActivity() {\n\tclient.user.setActivity('over rigby.space', { type: 'WATCHING' })\n\t .then(presence => {})\n\t .catch(console.error);\n}", "lockEditor() {\n this.lock = true;\n }", "unlock() {\n this.isLocked = false;\n this.refreshState();\n }", "lockEditor() {\n //console.log('LOCK ON');\n this.setState({\n 'lockedEditor': true\n });\n }", "set locked(val) {\n\t\tthis._locked = val;\n\t}", "function mouseReleased() {\n UseCases.forEach( function( obj ) {\n obj.locked = false;\n });\n\n Actors.forEach( function( obj ) {\n obj.locked = false;\n });\n}", "function Simulator_BlockUserInteraction(bBlocked)\n{\n\t//direct set\n\tthis.BlockUserInteractionForModal = bBlocked;\n}", "function YCellular_set_lockedOperator(newval)\n { var rest_val;\n rest_val = newval;\n return this._setAttr('lockedOperator',rest_val);\n }", "setActions(actions) {\n this.actions = actions\n }", "lock() {\n this.close();\n this.isLocked = true;\n this.refreshState();\n }", "function toggleGUI() {\n guiIsLocked = !guiIsLocked;\n}", "function C012_AfterClass_Amanda_LockCollarAmanda() {\n\tActorSetOwner(\"Player\");\n\tPlayerRemoveInventory(\"Collar\", 1);\n\tC012_AfterClass_Amanda_CalcParams();\n\tActorSetPose(\"Kneel\");\n\tCurrentTime = CurrentTime + 50000;\n}", "function unlock_lock(lock, callback) {\n let str = JSON.stringify({\n Action: \"TOGGLE\"\n })\n send_command(lock, str)\n callback(f.hacker.verb())\n}", "_initializeLock() {\n if(config.get(\"window.locked\")) {\n this.toggleLock();\n }\n }", "function ctrActivityThrobber(){\n if(gBrowser.selectedTab.hasAttribute('busy')) {\n try{\n document.getElementById('ctraddon_navigator-throbber').setAttribute('busy','true');\n }catch(e){}\n }\n else {\n try{\n if(document.getElementById('ctraddon_navigator-throbber').hasAttribute('busy'))\n document.getElementById('ctraddon_navigator-throbber').removeAttribute('busy');\n }catch(e){}\n }\n }", "async function setWalkAsActive() {\n try {\n // Store walk ID\n await AsyncStorage.setItem(\"isWalkActive\", \"true\");\n\n dispatch({\n type: \"SET_WALK_ACTIVE\",\n isWalkActive: \"true\",\n });\n } catch (error) {\n console.error(\"Error in setIsWalkActive(): \" + error);\n }\n }", "function jsDAV_iLockable() {}", "setLocked(value) {\n setLocked(this.input, value);\n }", "function setAction(obj) {\n if (actionCounter < activeModifiers.length) {\n moveToTarget(obj, activeModifiers[actionCounter]);\n actionCounter++;\n } else {\n moveToTarget(obj, finalBlock);\n }\n}", "startUnlocking()\n {\n // \"start\" CSS animation\n this.setState({transparent: true});\n // wait until CSS animation end\n Meteor.setTimeout(() => {\n this.unLock();\n }, this.props.transitionDuration);\n }", "function setBusy() {\n if(busyCounter === 0) {\n events.emit('busy');\n }\n busyCounter++;\n }", "show () {\n this._setLockout(true)\n }", "unlock() {\n Atomics.store(this.sabArr, this.lockIndex, this.UNLOCKED);\n Atomics.notify(this.sabArr, this.lockIndex);\n }", "lock() {\n _isLocked.set(this, true);\n }", "_updatePendingAction() {\n\t\tconst pendingActions = this.editor.plugins.get( _ckeditor_ckeditor5_core_src_pendingactions__WEBPACK_IMPORTED_MODULE_1__[\"default\"] );\n\n\t\tif ( this.loaders.length ) {\n\t\t\tif ( !this._pendingAction ) {\n\t\t\t\tconst t = this.editor.t;\n\t\t\t\tconst getMessage = value => `${ t( 'Upload in progress' ) } ${ parseInt( value ) }%.`;\n\n\t\t\t\tthis._pendingAction = pendingActions.add( getMessage( this.uploadedPercent ) );\n\t\t\t\tthis._pendingAction.bind( 'message' ).to( this, 'uploadedPercent', getMessage );\n\t\t\t}\n\t\t} else {\n\t\t\tpendingActions.remove( this._pendingAction );\n\t\t\tthis._pendingAction = null;\n\t\t}\n\t}", "lock() {\n this._locked = true;\n }", "function updateBlacksmithButtons(){\n\tif(currentWeapon.getName() == \"Fists\"){\n\t\t$(\"#bsmStrengthenBladeButton\").prop('disabled', true);\n\t\t$(\"#bsmStrengthenHiltButton\").prop('disabled', true);\n\t\t$(\"#bsmStrengthenPointButton\").prop('disabled', true);\n\t}\n\telse{\n\t\t$(\"#bsmStrengthenBladeButton\").prop('disabled', false);\n\t\t$(\"#bsmStrengthenHiltButton\").prop('disabled', false);\n\t\t$(\"#bsmStrengthenPointButton\").prop('disabled', false);\n\t}\n}", "noAction() {\n this.damage = 0;\n this.player.blocking = false;\n }", "function setCheckButtonToInactive() {\n\t\t_myDispatcher.dispatch(\"iteration.checkbutton\", {\"state\":\"inactive\"});\n\t}", "function C012_AfterClass_Jennifer_LockChastityBelt() {\n\tPlayerLockInventory(\"ChastityBelt\");\n\tPlayerRemoveInventory(\"ChastityBelt\", 1);\n\tCurrentTime = CurrentTime + 50000;\n}", "_DrawingToolsToggle() {\n if(!this.state.toolsOpen) { // if the drawing toolBar is closed \n styles.DrawingButtons = { // Spand the toolBar\n height: 210,\n marginTop: 0,\n display : \"flex\",\n flexDirection : \"column\",\n justifyContent : \"space-around\",\n alignItems : \"center\",\n }\n this.setState({ toolsOpen : true }); // use it to change to change the button image and detect toolBar state\n } else if(this.state.toolsOpen) {\n styles.DrawingButtons = { // Shrink the toolBar\n height: 0,\n marginTop: 30,\n display : \"flex\",\n flexDirection : \"column\",\n justifyContent : \"space-around\",\n alignItems : \"center\",\n }\n let action = { type: \"disabled\", value: \"\" } // reset the globale state to disable drawing\n this.props.dispatch(action)\n\n this.setState({ toolsOpen : false });\n } \n }", "function actionLock(p){\n\t\n\tsrc = collection[p].name;\n\te = $('#'+src);\n\t\n\ticoLock = e.find('.lock')[0];\n\n\tvar remote = $.ajax({\n\t\turl : '/admin/media/helper/action',\n\t\tdata : {'action':'lock', 'src':collection[p].url},\n\t\tdataType : 'json'\n\t}).done(function(data) {\n\t\tif(data.message == 'LOCK'){\n\t\t\te.addClass('isLocked');\n\t\t\ticoLock.src = '/admin/media/ui/img/media-locked.png';\n\t\t}else\n\t\tif(data.message == 'UNLOCK'){\n\t\t\te.removeClass('isLocked');\n\t\t\ticoLock.src = '/admin/media/ui/img/media-unlocked.png';\n\t\t}\n\t});\n}", "function toggleLockUser(username, toLock, callback) {\n let queryStr = \"UPDATE `marketplace`.`user` \" \n + \" SET `is_locked`= b? \"\n + \" WHERE (`username` = ? );\";\n let queryVar = [username];\n if (toLock) {\n queryVar.unshift('1');\n } else {\n queryVar.unshift('0');\n }\n mySQL_DbConnection.query(queryStr, queryVar, function (err, result_rows, fields) { \n if(err) {\n console.log(\"Error: \", err);\n callback(false);\n } else {\n callback(true);\n }\n });\n}", "canOpen () {\n return !this.getState('locked')\n }", "function lockHelper(){\n\tvar lockButton = document.getElementById(\"lock\");\n\t\n\tif(lockButton.innerText === \"Unlock\")\n\t{\n\t\tselected_marker.dragging.enable();\n\t\tlockButton.innerText = \"Lock\";\n\t} \t\n\telse\n\t{\n\t\tselected_marker.dragging.disable();\n\t\tlockButton.innerText = \"Unlock\";\n\t}\n\tmymap.closePopup();\n}", "lock() {\n const that = this;\n\n that.locked = true;\n }", "allow() {\n this._isAllowed = true;\n }", "disableSharing(){\n\t\tthis.props.actions.disableSharing(this.props.selectedWorkstations);\n\t}", "function setActivityFlags() {\r\n\t\r\n\tbbs.log_str('Removing user activity flags.');\r\n\tuser.security.flags1=0;\r\n\t\r\n\tbbs.log_str('Creating user activity flags.');\r\n\r\n if (bbs.logon_posts != '0') \r\n\t\tuser.security.flags1|=UFLAG_P;\r\n\t\r\n if (bbs.posts_read != '0') \r\n\t\tuser.security.flags1|=UFLAG_R;\r\n\r\n if (bbs.logon_fbacks != '0') \r\n\t\tuser.security.flags1|=UFLAG_F;\r\n \r\n if (bbs.logon_emails != '0') \r\n\t\tuser.security.flags1|=UFLAG_E; \r\n \r\n\tif (activity.doors == 'D')\r\n\t\tuser.security.flags1|=UFLAG_D;\r\n\t\r\n\tif (activity.fmk == 'K')\r\n\t\tuser.security.flags1|=UFLAG_K;\r\n\r\n\tif (activity.hungup == 'H')\r\n\t\tuser.security.flags1|=UFLAG_H;\r\n\t\r\n\tif (activity.gfiles == 'T')\r\n\t\tuser.security.flags1|=UFLAG_T;\r\n\t\r\n\tconsole.write(\"Setting up flags...\\r\\n\");\r\n\tbbs.exec('?/sbbs/xtrn/twitter/tweet.js ' + user.alias + ' has logged off the BBS. #bbslogoff');\r\n\r\n}", "blockUpdate() {\n this.updateManuallyBlocked = true;\n }", "hide () {\n this._setLockout()\n }", "function setUnlocked(esign_action) {\r\n\tvar form_name = getParameterByName('page');\r\n\t// Bring back Save buttons\r\n\t$('#__SUBMITBUTTONS__-div').css('display','block');\t\r\n\t// Remove locking informational text\r\n\t$('#__LOCKRECORD__').prop('checked', false);\r\n\t$('#lockingts').html('').css('display','none');\r\n\t$('#unlockbtn').css('display','none');\t\r\n\t$('#lock_record_msg').css('display','none');\r\n\t// Remove lock icon from menu (if visible)\r\n\t$('img#formlock-'+form_name).hide();\r\n\t// Hide e-signature checkbox if e-signed but user does not have e-sign rights\r\n\tif (lock_record < 2 && $('#esignchk').length) {\r\n\t\t$('#esignchk').hide().html('');\r\n\t}\r\n\t// Determine if user has read-only rights for this form\r\n\tvar readonly_form_rights = !($('#__SUBMITBUTTONS__-div').length && $('#__SUBMITBUTTONS__-div').css('display') != 'none');\r\n\tif (readonly_form_rights) {\r\n\t\t$('#__LOCKRECORD__').prop('disabled', false);\r\n\t} else {\r\n\t\t// Remove the onclick attribute from the lock record checkbox so that the next locking is done via form post\r\n\t\t$('#__LOCKRECORD__').removeAttr('onclick');\r\n\t\t// Unlock and reset all fields on form\r\n\t\t$(':input').each(function() {\r\n\t\t\t// Re-enable field UNLESS field is involved in randomization (i.e. has randomizationField class)\r\n\t\t\tif (!$(this).hasClass('randomizationField')) {\r\n\t\t\t\t// Enable field\r\n\t\t\t\t$(this).prop('disabled', false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t// Make radio \"reset\" link visible again\r\n\t\t$('.cclink').each(function() {\r\n\t\t\t// Re-enable link UNLESS field is involved in randomization (i.e. has randomizationField class)\r\n\t\t\tif (!$(this).hasClass('randomizationField')) {\r\n\t\t\t\t// Enable field\r\n\t\t\t\t$(this).css('display','block');\r\n\t\t\t}\r\n\t\t});\r\n\t\t// Enable \"Randomize\" button, if using randomization\r\n\t\t$('#redcapRandomizeBtn').removeAttr('aria-disabled').removeClass('ui-state-disabled').prop('disabled', false);\r\n\t\t// Add all options back to Form Status drop-down, and set value back afterward \r\n\t\tvar form_status_field = $(':input[name='+form_name+'_complete]');\r\n\t\tvar form_val = form_status_field.val();\t\r\n\t\tvar sel = ' selected ';\r\n\t\tform_status_field\r\n\t\t\t.find('option')\r\n\t\t\t.remove()\r\n\t\t\t.end()\r\n\t\t\t.append('<option value=\"0\"'+(form_val==0?sel:'')+'>Incomplete</option><option value=\"1\"'+(form_val==1?sel:'')+'>Unverified</option><option value=\"2\"'+(form_val==2?sel:'')+'>Complete</option>');\r\n\t\t// If editing a survey response, do NOT re-enable the Form Status field\r\n\t\tif (getParameterByName('editresp') == \"1\") form_status_field.prop(\"disabled\",true);\n\t\t// Enable green row highlight for data entry form table\n\t\tenableDataEntryRowHighlight();\n\t\t// Re-display the save form buttons tooltip\n\t\tdisplayFormSaveBtnTooltip();\r\n\t}\r\n\t// Check for e-sign negation\r\n\tvar esign_msg = \"\";\r\n\tif (esign_action == \"negate\") {\r\n\t\t$('#esignts').hide();\r\n\t\t$('#esign_msg').hide();\r\n\t\t$('#__ESIGNATURE__').prop('checked', false);\r\n\t\tesign_msg = \", and the existing e-signature has been negated\";\t\r\n\t}\r\n\t// Give confirmation\r\n\tsimpleDialog(\"This form has now been unlocked\"+esign_msg+\". Users can now modify the data again on this form.\",\"UNLOCK SUCCESSFUL!\");\r\n}", "function enableActions () {\n $('#actions').attr('class', 'button-container active')\n $('#adopt').attr('class', 'button-container')\n \n resetPet()\n itsAlive()\n updatePetInfoInHtml()\n}", "unlockEditor() {\n console.log('___________________')\n this.setState({\n 'lockedEditor': false\n });\n }", "function setLock(button, number){\n\tfor(i = 0; i < 8; i++){\n\t\t\tif(i==number-1) continue;\n\t\t\tdocument.getElementsByClassName(\"btn-lock\")[i].classList.remove(\"btn-success\");\n\t\t\tdocument.getElementsByClassName(\"btn-lock\")[i].classList.add(\"btn-danger\");\n\t\t\tdocument.getElementsByClassName(\"btn-lock\")[i].value = \"1\";\n\t\t\tdocument.getElementById(\"input-action\").value = 0;\n\t\t\tdocument.getElementsByClassName(\"btn-lock\")[i].innerHTML = \"Khóa 🔒\";\n\t}\n\tif(button.value == \"1\"){\n\t\t\tdocument.getElementsByClassName(\"btn-lock\")[number-1].classList.remove(\"btn-danger\");\n\t\t\tdocument.getElementsByClassName(\"btn-lock\")[number-1].classList.add(\"btn-success\");\n\t\t\tdocument.getElementsByClassName(\"btn-lock\")[number-1].value = \"0\";\n\t\t\tdocument.getElementsByClassName(\"btn-lock\")[number-1].innerHTML = \"Mở 🔓\";\n\t\t\tdocument.getElementById(\"input-action\").value = number;\n\t}\n\telse{\n\t\t\tdocument.getElementsByClassName(\"btn-lock\")[number-1].classList.remove(\"btn-success\");\n\t\t\tdocument.getElementsByClassName(\"btn-lock\")[number-1].classList.add(\"btn-danger\");\n\t\t\tdocument.getElementsByClassName(\"btn-lock\")[number-1].value = \"1\";\n\t\t\tdocument.getElementsByClassName(\"btn-lock\")[number-1].innerHTML = \"Khóa 🔒\";\n\t\t\tdocument.getElementById(\"input-action\").value = 0;\n\t}\n\tdocument.getElementById(\"btn-confirm\").disabled = false;\n}", "function updateIsLocked(isLocked,oldValue){scope.isLockedOpen=isLocked;if(isLocked===oldValue){element.toggleClass('md-locked-open',!!isLocked);}else{$animate[isLocked?'addClass':'removeClass'](element,'md-locked-open');}if(backdrop){backdrop.toggleClass('md-locked-open',!!isLocked);}}", "unLock()\n {\n this.setState({shown: false});\n }", "allowActions(role, actions) {\n let list = this.access[role] || [];\n list = list.concat(actions || []);\n let index = {};\n list.forEach(function(action){\n index[action] = true;\n });\n this.access[role] = Object.keys(index);\n this._rebuildIndex();\n }", "unlockEditor() {\n this.lock = false;\n }", "function permissionResetMoneyButton() {\n if(moneyIsModified) {\n resetMoneyButton.style.cursor = 'pointer'\n }\n else {\n resetMoneyButton.style.cursor = 'not-allowed'\n }\n}", "function setSideBarStatus() {\n if (sideBarIsOpen == 0) {\n openSideBar();\n } else {\n closeSideBar();\n }\n}", "function updateBrowseAction(status) {\n if (status == null) status = undefined;\n var icon = ICON_ENABLED;\n \n if (status == undefined || Object.entries(status).length == 0) {\n\ticon=ICON_DISABLED;\n\tbrowser.browserAction.setPopup( {tabId: currentTab.id, popup: \"\" });\n\t\n } else {\n\tbrowser.browserAction.setPopup( {tabId: currentTab.id, popup: POPUP_URL });\n }\n \n //browser.browserAction.setIcon({\n // path: icon,\n // tabId: currentTab.id\n //});\n \n /*browser.browserAction.setTitle({\n title: 'Unbookmark it!',\n tabId: currentTab.id\n })*/;\n}", "function disableActions () {\n $('#actions').attr('class', 'button-container')\n $('#adopt').attr('class', 'button-container active')\n}", "function unlockUpdate() {\n if (gameData.unlockStorage === true) {\n element[\"upgradeStorage\"].style.display = \"inline-block\";\n element[\"upgradeStorageU\"].classList.add(\"disabled\");\n }\n if (gameData.unlockClick === true) {\n element[\"eggClickers\"].style.display = \"inline-block\";\n element[\"eggClickersU\"].classList.add(\"disabled\");\n }\n if (gameData.unlockCollector === true) {\n element[\"eggCollector\"].style.display = \"inline-block\";\n element[\"eggCollectorU\"].classList.add(\"disabled\");\n }\n if (gameData.unlockRobotCollector === true) {\n element[\"eggRobotCollector\"].style.display = \"inline-block\";\n element[\"eggRobotCollectorU\"].classList.add(\"disabled\");\n }\n if (gameData.unlockEggcost === true) {\n element[\"upgradeEgg\"].style.display = \"inline-block\";\n element[\"upgradeEggU\"].classList.add(\"disabled\");\n }\n}", "block() {\n this.status = 'stuck';\n }", "async function lock()\n {\n if (bookmarks.is_locked()) { return; }\n\n await bookmarks.lock();\n notification.locked();\n }", "toggleLeftBar() {\n this.openBar = !this.openBar;\n }", "function ts_skip_or_boost_sorb_button_user_permissions()\n{\n tc_Ensure_SorB_button_is_displayed_but_disabled_for_any_user_lower_than_CL3_on_suggested_and_current_tab();\n tc_Ensure_SorB_button_is_enabled_for_any_user_higher_than_CL2_on_suggested_and_current_tab(); \n}", "_handleUnlockStateChanged({ accounts, isUnlocked, } = {}) {\n if (typeof isUnlocked !== 'boolean') {\n this._log.error('MetaMask: Received invalid isUnlocked parameter. Please report this bug.');\n return;\n }\n if (isUnlocked !== this._state.isUnlocked) {\n this._state.isUnlocked = isUnlocked;\n this._handleAccountsChanged(accounts || []);\n }\n }", "function _toggle() {\n var _editor = EditorManager.getCurrentFullEditor();\n _enabled = !_enabled;\n // Set the new state for the menu item.\n CommandManager.get(AUTOMATCH).setChecked(_enabled);\n \n // Register or remove listener depending on _enabled.\n if (_enabled) {\n _registerHandlers(_editor);\n } else {\n _deregisterHandlers(_editor);\n }\n }", "function trickplayKeyLocked() {\r\n\tunlockTrickplayKey = false;\r\n}", "toggleArchive() {\n MemberActions.updateArichiveStatus(this.props.archived, this.props.memberID);\n this.props.unselect();\n }", "toggle(params={}) {\n\t\tif (this.targetObj.action && !params.avoidCallAction) this.targetObj.action();\n\t\tif (this._$pwActive) {\n\t\t\t// Give menu a z-index to put it on top of any windows\n\t\t\tif (this.$pwMain.isBar) {\n\t\t\t\tif (this.$pwMain.order > 0) {\n\t\t\t\t\tthis.$pwMain.order = this.$pwMain.order - 1;\n\t\t\t\t\tif (this.$pwMain.order === 0) {\n\t\t\t\t\t\tthis.$pwMain.element.classList.remove('pw-order');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Give menu its normal z-index\n\t\t\tif (this.$pwMain.isBar) {\n\t\t\t\tif (this.$pwMain.order === 0) {\n\t\t\t\t\tthis.$pwMain.element.classList.add('pw-order');\n\t\t\t\t}\n\t\t\t\tthis.$pwMain.order = this.$pwMain.order + 1;\n\t\t\t}\n\t\t}\n\t\tsuper.toggle();\n\t}", "function unlockModal() {\n locked = false;\n }", "function unlockModal() {\n locked = false;\n }", "function playerBlocking(){\n if(blockKey._justDown && !leftMoveKey.isDown && !rightMoveKey.isDown){\n blocking=true;\n if(playerFacingRight==true){\n player.anims.play('blockingAnim', true);\n player.setOffset(0, 45);\n\n }\n else if(playerFacingRight==false){\n player.anims.play('blockingAnim', true);\n player.setOffset(45, 45);\n }\n }else\n blocking=false;\n\n}", "function C012_AfterClass_Amanda_IsChangingBlocked() {\n\tif (GameLogQuery(CurrentChapter, CurrentActor, \"EventBlockChanging\"))\n\t\tOverridenIntroText = GetText(\"ChangingIsBlocked\");\n}" ]
[ "0.6472561", "0.6130128", "0.61037046", "0.6103128", "0.5913216", "0.5810229", "0.5755878", "0.56787163", "0.56568575", "0.5608884", "0.5580455", "0.5566329", "0.5470361", "0.5470361", "0.5459375", "0.5442831", "0.5437788", "0.5437507", "0.54295367", "0.5421886", "0.5418577", "0.54023373", "0.53909194", "0.53837377", "0.53789526", "0.5355669", "0.5329366", "0.53256893", "0.53183687", "0.5313094", "0.52831763", "0.52817345", "0.5281056", "0.5265536", "0.52635306", "0.5262587", "0.52595514", "0.5256924", "0.5253683", "0.52514607", "0.52413565", "0.52239096", "0.5222862", "0.52005404", "0.5196569", "0.51912993", "0.519088", "0.51907855", "0.5185258", "0.51802313", "0.5173295", "0.51547956", "0.51490533", "0.5148818", "0.5148739", "0.5143679", "0.5125825", "0.51252604", "0.51191527", "0.5116765", "0.51122284", "0.51095486", "0.5092989", "0.5085703", "0.50843704", "0.5083336", "0.5082984", "0.5064253", "0.5057831", "0.50523347", "0.5046918", "0.502079", "0.50174975", "0.50118375", "0.5009873", "0.50074303", "0.5003825", "0.5000675", "0.499436", "0.49935484", "0.49877492", "0.49840263", "0.4979543", "0.4977936", "0.49736413", "0.49560556", "0.49465394", "0.4945097", "0.49419475", "0.49363324", "0.49343646", "0.4919312", "0.4915402", "0.4913235", "0.4912088", "0.4911907", "0.4910697", "0.4910697", "0.48970658", "0.48922193" ]
0.7007486
0
Sets the backdrop offset to the current screen.
setBackdrop(screenNumber) { this.getBackdrop().css('background-position', -1* SCREEN_WIDTH * screenNumber + 'px 0px'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doRepositionBackdrop() {\n // Position under the topmost overlay\n var top = overlays.top();\n\n if (top) {\n\n // The backdrop, if shown, should be positioned under the topmost overlay that does have a backdrop\n for (var i = _overlays.length - 1; i > -1; i--) {\n if (_overlays[i].backdrop) {\n backdropEl.style.zIndex = _overlays[i].zIndex - 1;\n break;\n }\n }\n\n // ARIA: Set hidden properly\n hideEverythingBut(top.instance);\n\n }\n }", "function setBackdrop() {\n if (menuOpen) {\n backdrop.classList.remove('z-0');\n backdrop.classList.remove('opacity-0');\n backdrop.classList.add('opacity-50');\n backdrop.classList.add('z-20');\n } else {\n backdrop.classList.remove('z-20');\n backdrop.classList.remove('opacity-50');\n backdrop.classList.add('opacity-0');\n backdrop.classList.add('z-0');\n }\n}", "function updateBackdrop () {\n\t\tif (stack.length === 0) {\n\t\t\t$overlayBackdrop.hide();\n\t\t\tIBM.common.util.freezeScrollbars(false);\n\t\t}\n\t\telse {\n\t\t\tvar max = 0,\n\t\t\t\ti,\n\t\t\t\tdd,\n\t\t\t\tlen = stack.length;\n\t\t\t\t\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tdd = stack[i];\n\t\t\t\tmax = Math.max(max, dd.backdrop_opacity);\n\t\t\t}\n\t\t\t\n\t\t\t$overlayBackdrop.css(\"opacity\", max);\n\t\t\t//console.log(\"backdrop_opacity: \" + stack[stack.length - 1].backdrop_opacity);\n\t\t\t\n\t\t\t$overlayBackdrop.show();\n\t\t\tIBM.common.util.freezeScrollbars(true);\n\t\t}\n\t}", "get backdropElement() {\n return this._backdropElement;\n }", "_attachBackdrop() {\n const showingClass = 'cdk-overlay-backdrop-showing';\n this._backdropElement = this._document.createElement('div');\n this._backdropElement.classList.add('cdk-overlay-backdrop');\n if (this._config.backdropClass) {\n this._toggleClasses(this._backdropElement, this._config.backdropClass, true);\n }\n // Insert the backdrop before the pane in the DOM order,\n // in order to handle stacked overlays properly.\n this._host.parentElement.insertBefore(this._backdropElement, this._host);\n // Forward backdrop clicks such that the consumer of the overlay can perform whatever\n // action desired when such a click occurs (usually closing the overlay).\n this._backdropElement.addEventListener('click', this._backdropClickHandler);\n // Add class to fade-in the backdrop after one frame.\n if (typeof requestAnimationFrame !== 'undefined') {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n if (this._backdropElement) {\n this._backdropElement.classList.add(showingClass);\n }\n });\n });\n }\n else {\n this._backdropElement.classList.add(showingClass);\n }\n }", "function hideOrRepositionBackdrop() {\n if (!backdropEl) {\n // Do nothing if we've never shown the backdrop\n return;\n }\n\n // Loop over all overlays\n var keepBackdrop = overlays.some(function(overlay) {\n // Check for backdrop usage\n if (overlay.backdrop) {\n return true;\n }\n });\n\n if (!keepBackdrop) {\n // Hide the backdrop\n doBackdropHide();\n }\n else {\n // Reposition the backdrop\n doRepositionBackdrop();\n }\n\n // Hide/create the document-level tab capture element as necessary\n // This only applies to modal overlays (those that have backdrops)\n var top = overlays.top();\n if (!top || !(top.instance.trapFocus === trapFocus.ON && top.instance._requestedBackdrop)) {\n hideDocumentTabCaptureEls();\n }\n else if (top && top.instance.trapFocus === trapFocus.ON && top.instance._requestedBackdrop) {\n createDocumentTabCaptureEls();\n }\n }", "function backDrop( backdropInfo, backDropY, backdropCleared ) {\n \tif ( defaultFalse( backdropInfo ) ) {\t\t\t// If we're showing the backdrop\n \t\tbackDropScreen.show();\t\t\t\t\t\t\t// ... show it\n \t\tif (backdropInfo.animate) \t\t\t\t\t\t// If We're flinging it in ...\n \t\t\tif (backDropY > 5) backDropY -= 20;\t\t\t\t// ... continue to move it in\n \t\t\telse backDropY = 0;\n \t\telse\n \t\t\tbackDropY = 0;\t\t\t\t\t\t\t\t\t// .. Otherwise, it's at the top of the screen\n \t\tif (backdropInfo.wobble)\t\t\t// If it's wobbling, copy image to screen with wobble offset.\n \t\t\tbackDropImages[backdropInfo.name].drawPart(backDropScreen,backDropWobbler.h(),backDropWobbler.v() + backDropY, 1, 0, 645, 405);\n \t\telse\t\t\t\t\t\t\t\t// If not, just copy image to screen\n \t\t\tbackDropImages[backdropInfo.name].drawPart(backDropScreen,0,backDropY, 1, 0, 640, 400);\n\t\t\tbackdropCleared = false;\n \t}\n \telse {\t\t\t\t\t\t\t\t\t// If we're not showing the backdrop...\n \t\tbackDropScreen.hide();\t\t\t\t\t// ... hide the screen\n \t\tif (!backdropCleared) {\t\t\t\t\t// ... clear it if we need to\n \t\t\tbackDropScreen.clear();\n \t\t\tbackdropCleared = true;\n \t\t}\n \t\tbackDropY = 405;\t\t\t\t\t\t// ... reset the y-pos\n \t}\n \tvar backDropChanges = new Object();\t\t\t\t\t// Now return back any changes made\n \tbackDropChanges.backDropY = backDropY;\n \tbackDropChanges.backdropCleared = backdropCleared;\n \treturn backDropChanges;\n }", "updateBillboardOffsets() {\n const camera = MapContainer.getInstance().getWebGLCamera();\n if (camera) {\n // Find the z-index step from the camera altitude\n const cameraDistance = camera.getDistanceToCenter();\n const zIndexStep = Math.round(cameraDistance / (this.zIndexMax_ * 100));\n const newOffset = -(this.zIndex_ * zIndexStep);\n if (this.csContext) {\n this.csContext.setEyeOffset(new Cesium.Cartesian3(0.0, 0.0, newOffset));\n }\n }\n }", "_onEnterFullscreen() {\n this.setSize(screen.width, screen.height)\n }", "function adjustment() {\n\t\tvar window_height = $(window).height();\n\t\t$(\"div#body\").css({\"margin-top\": window_height - 60 + \"px\"});\n\t}", "nextBackdrop () {\n const currentBackdropIndex = this.backdrops.indexOf(this.backdrop)\n this.backdrop = this.backdrops[(currentBackdropIndex + 1) % this.backdrops.length]\n\n this.element ? this.element.update(this) : null\n }", "function setScreen() {\n\t$('#workSpace').css(\"height\", window.innerHeight + 'px');\n}", "function showBackdrop(){\n backdrop.classList.add(\"visible\");\n}", "_onExitFullscreen() {\n this.setSize(this._initWidth, this._initHeight)\n }", "function fullScreen() {\n let window = Window.focused();\n\n if (window) {\n let screen = window.screen().flippedVisibleFrame();\n\n window.setTopLeft({\n x: screen.x,\n y: screen.y,\n });\n\n window.setSize({\n height: screen.height,\n width: screen.width,\n });\n }\n}", "function draw_backDrop() {\n \tvar backDropChanges = backDrop( backdropInfo, backDropY, backdropCleared );\n \tbackDropY = backDropChanges.backDropY;\n \tbackdropCleared = backDropChanges.backdropCleared;\n }", "function adjustmaskfade() {\n\n // Get window width\n var wid = windowwidth;\n\n // Get the current document height\n maskfadeheight = $(document).height();\n\n // Set css\n maskfade.css(\n {\n 'width':wid + 'px', \n 'height': maskfadeheight + maskfadebottommargin + 'px', \n 'display':'block'\n }\n );\n }", "restore () {\n\t\tthis.$element.removeClass('screenlayer-minimized');\n\t\tthis.show();\n\t}", "function setZIndex()\n {\n if (vm.element.fullscreen)\n {\n vm.moverStyle['z-index'] = vm.themeStyle['z-index'];\n }\n else\n {\n vm.moverStyle['z-index'] = vm.themeStyle['z-index'] + 10;\n }\n }", "enterFullScreen() {\n }", "enterFullScreen() {\n }", "enterFullScreen() {\n }", "function backdrop ( callback ) {\n var that = this\n , animate = this.$element.hasClass('fade') ? 'fade' : ''\n if ( this.isShown && this.settings.backdrop ) {\n var doAnimate = $.support.transition && animate\n\n this.$backdrop = $('<div class=\"modal-backdrop ' + animate + '\" />')\n .appendTo(document.body)\n\n if ( this.settings.backdrop != 'static' ) {\n this.$backdrop.click($.proxy(this.hide, this))\n }\n\n if ( doAnimate ) {\n this.$backdrop[0].offsetWidth // force reflow\n }\n\n this.$backdrop.addClass('in')\n\n doAnimate ?\n this.$backdrop.one(transitionEnd, callback) :\n callback()\n\n } else if ( !this.isShown && this.$backdrop ) {\n this.$backdrop.removeClass('in')\n\n function removeElement() {\n that.$backdrop.remove()\n that.$backdrop = null\n }\n\n $.support.transition && this.$element.hasClass('fade')?\n this.$backdrop.one(transitionEnd, removeElement) :\n removeElement()\n } else if ( callback ) {\n callback()\n }\n }", "function backdrop() {\n \t\tbackDropImages = new Object();\t\t\t\t// Hash Array of backdrop images\n \t\tvar getName = /resources\\/(\\w+)\\.\\w+/i;\t\t// Regex to make unique hash array name for each image\n \t\t// Array of image URLS for the backdrops\n \t\tvar imageList = [\"resources/netbest_back.jpg\",\"resources/sad_back3.jpg\",\"resources/sad_back.gif\",\"resources/feat_back.jpg\",\"resources/ptrail_bkg.gif\",\"resources/trump.png\"];\n \t\t// Go through each image and make canvas for them, and pop it into the backdrop array\n \t\tfor ( var i = 0; i < imageList.length; i++ ) {\n \t\tvar scratchPad = new canvas(650,410);\t// Image canvases are slightly larger than 640x400 to make some \"wobble\" room.\n \t\t\tvar tempImage = new image(DEMO_ROOT + \"/def/\" + imageList[i]);\t// Load image\n \t\t\tvar tempImageName = imageList[i].replace(getName, \"$1\" );\t\t// Make unique hash array name for image\n \t\t\tif ((tempImage.img.width <= 650)||(tempImage.img.width <= 410)) {\t// If image is smaller than the canvas, tile it across canvas\n \t\t\t\tvar x = y = 0;\n \t\t\t\twhile (y < 410) {\n \t\t\t\t\twhile (x < 650) {\n \t\t\t\t\t\ttempImage.draw(scratchPad,x,y);\n \t\t\t\t\t\tx += tempImage.img.width;\n \t\t\t\t\t}\n \t\t\t\t\tx = 0;\n \t\t\t\t\ty += tempImage.img.height;\n \t\t\t\t}\n \t\t\t}\n \t\t\tbackDropImages[tempImageName] = scratchPad;\t\t// Now put canvas into Hash Array of backdrop images\n \t\t}\n \t\tbackDropImages[\"presents\"] = presentsScreen;\t\t// Put \"Senior Dads present\" screen into array as well (for the end of the main screen)\n\t\t\tbackDropScreen = SeniorDads.ScreenHandler.Codef(640,400,name,zIndex++);\t\t// Create backdrop destination canvas for main screen.\n\t\t\tbackDropWobbler = new SeniorDads.Wobbler(\t\t\t\t\t\t\t\t\t// Create wobbler for backdrop\n \t\t\t\t[\n \t\t\t\t \t{value: 0, amp: 5, inc:0.30},\n \t\t\t\t \t{value: 0.5, amp: 5, inc:0.30}\n \t\t\t\t],\n \t\t\t\t[\n\t \t\t\t\t \t{value: 0.5, amp: 3, inc:0.20},\n\t \t\t\t\t \t{value: 0, amp: 2, inc:0.10}\n\t \t\t\t\t]);\n \t}", "function showBackdrop(scope,element,options){if(options.disableParentScroll){// !! DO this before creating the backdrop; since disableScrollAround()\n\t// configures the scroll offset; which is used by mdBackDrop postLink()\n\toptions.restoreScroll=$mdUtil.disableScrollAround(element,options.parent);}if(options.hasBackdrop){options.backdrop=$mdUtil.createBackdrop(scope,\"md-dialog-backdrop md-opaque\");$animate.enter(options.backdrop,options.parent);}/**\n\t * Hide modal backdrop element...\n\t */options.hideBackdrop=function hideBackdrop($destroy){if(options.backdrop){if(!!$destroy)options.backdrop.remove();else $animate.leave(options.backdrop);}if(options.disableParentScroll){options.restoreScroll();delete options.restoreScroll;}options.hideBackdrop=null;};}", "resetBirdEye() {\n // Set the camera's default position/orientation, to a birds eye view of the maze\n //Set to birds eye view for editing, and also seeing the whole maze easily\n this.camera.orient([0, 13 ,0], [0, 0,0.1], [0, 1, 0]);\n this.setMode(\"mouse\");\n // Retrieve the new view matrix\n this.camera.getViewMatrix(this.viewMatrix);\n }", "viewWillAppear () {\n const self = this\n super.viewWillAppear()\n self.layer.style.paddingTop = '41px'\n }", "function setMargin() {\n setMarginScroll();\n currentSettings.marginLeft = -(currentSettings.width+currentSettings.borderW)/2;\n currentSettings.marginTop = -(currentSettings.height+currentSettings.borderH)/2;\n if (!modal.blocker) {\n currentSettings.marginLeft+= currentSettings.marginScrollLeft;\n currentSettings.marginTop+= currentSettings.marginScrollTop;\n }\n }", "function doBackdropHide() {\n $(document.body).removeClass('u-coral-noscroll');\n\n // Start animation\n Coral.commons.nextFrame(function() {\n $backdropEl.removeClass('is-open');\n\n cancelBackdropHide();\n fadeTimeout = setTimeout(function() {\n backdropEl.style.display = 'none';\n }, Coral.mixin.overlay.FADETIME);\n });\n\n // Set flag for testing\n backdropEl._isOpen = false;\n\n // Wait for animation to complete\n showEverything();\n }", "function sidebarBackdrop() {\n $('.main').append('<div class=\"sidebar-backdrop\" />')\n }", "function camSet(offset){\n camOffset = offset;\n //trap[0] = player[0][0] - trap[3] / 2;\n //cam[0] = trap[0] - cam[2];\n}", "_resizeOverlayToFullScreen() {\n this.$overlay.css({\n width: this._documentWidth(),\n height: this._documentHeight()\n });\n }", "centerScreen() {\n self.moveCenter(0,0);\n }", "function setMargin() {\r\n\t\tsetMarginScroll();\r\n\t\tcurrentSettings.marginLeft = -(currentSettings.width+currentSettings.borderW)/2;\r\n\t\tcurrentSettings.marginTop = -(currentSettings.height+currentSettings.borderH)/2;\r\n\t\tif (!modal.blocker) {\r\n\t\t\tcurrentSettings.marginLeft+= currentSettings.marginScrollLeft;\r\n\t\t\tcurrentSettings.marginTop+= currentSettings.marginScrollTop;\r\n\t\t}\r\n\t}", "function addMarginBottom() {\n document.getElementsByTagName(\"body\")[0].style.marginBottom = screen.height + \"px\";\n}", "function resetWindowSize() {\n var currentWindow = Titanium.UI.getMainWindow();\n currentWindow.height = 400;\n currentWindow.width = 600;\n currentWindow.x = Math.round((window.screen.width / 2) - 300);\n currentWindow.y = Math.round((window.screen.height / 2) - 200);\n }", "function setPosition() {\n\n var bottom = window.innerHeight-startBottom-y;\n bottom = (bottom>0)? bottom : 0;\n bottom = ((bottom+elem[0].getBoundingClientRect().height)<window.innerHeight)?bottom:(window.innerHeight-elem[0].getBoundingClientRect().height-40);\n\n var right = window.innerWidth-startRight-x;\n right = (right>0)? right : 0;\n right = ((right+elem[0].getBoundingClientRect().width)<window.innerWidth)?right:(window.innerWidth-elem[0].getBoundingClientRect().width);\n\n elem.css({\n bottom: bottom + 'px',\n right: right + 'px'\n });\n }", "setup() {\r\n\t\tthis.midScreenX = width /2;\r\n\t\tthis.midScreenY = height /2;\r\n\t}", "function showBackdrop(scope,element,options){// If we are not within a dialog...\n\tif(options.disableParentScroll&&!$mdUtil.getClosest(options.target,'MD-DIALOG')){// !! DO this before creating the backdrop; since disableScrollAround()\n\t// configures the scroll offset; which is used by mdBackDrop postLink()\n\toptions.restoreScroll=$mdUtil.disableScrollAround(options.element,options.parent);}else{options.disableParentScroll=false;}if(options.hasBackdrop){// Override duration to immediately show invisible backdrop\n\toptions.backdrop=$mdUtil.createBackdrop(scope,\"md-select-backdrop md-click-catcher\");$animate.enter(options.backdrop,$document[0].body,null,{duration:0});}/**\n\t * Hide modal backdrop element...\n\t */return function hideBackdrop(){if(options.backdrop)options.backdrop.remove();if(options.disableParentScroll)options.restoreScroll();delete options.restoreScroll;};}", "function setUnfixed() {\n // Only unfix the target element and the spacer if we need to.\n if (!isUnfixed()) {\n lastOffsetLeft = -1;\n\n // Hide the spacer now that the target element will fill the\n // space.\n spacer.css('display', 'none');\n\n // Remove the style attributes that were added to the target.\n // This will reverse the target back to the its original style.\n target.css({\n 'z-index' : originalZIndex,\n 'width' : '',\n 'position' : originalPosition,\n 'left' : '',\n 'top' : originalOffsetTop,\n 'margin-left' : ''\n });\n\n target.removeClass('scroll-to-fixed-fixed');\n\n if (base.options.className) {\n target.removeClass(base.options.className);\n }\n\n position = null;\n }\n }", "function bottomLeftHalf() {\n let window = Window.focused();\n\n if (window) {\n let screen = window.screen().flippedVisibleFrame();\n let halfScreenHeight = screen.height / 2;\n let halfScreenWidth = screen.width / 2;\n\n window.setTopLeft({\n x: screen.x,\n y: halfScreenHeight + 22,\n });\n\n window.setSize({\n height: halfScreenHeight,\n width: halfScreenWidth,\n });\n }\n}", "function setViewPadding(layout) {\n let padding, uiPadding;\n // Top\n if (layout === \"calcite-nav-top\") {\n padding = {\n padding: {\n top: 50,\n bottom: 0\n }\n };\n uiPadding = {\n padding: {\n top: 15,\n right: 15,\n bottom: 30,\n left: 15\n }\n };\n } else {\n // Bottom\n padding = {\n padding: {\n top: 0,\n bottom: 50\n }\n };\n uiPadding = {\n padding: {\n top: 30,\n right: 15,\n bottom: 15,\n left: 15\n }\n };\n }\n app.mapView.set(padding);\n app.mapView.ui.set(uiPadding);\n app.sceneView.set(padding);\n app.sceneView.ui.set(uiPadding);\n // Reset popup\n if (app.activeView.popup.visible && app.activeView.popup.dockEnabled) {\n app.activeView.popup.visible = false;\n app.activeView.popup.visible = true;\n }\n }", "function minimizApp()\n{\n\tdocument.getElementById(\"openAppHolder\").style = \"position:fixed;top: 150%;\";\n}", "_FBPReady() {\n super._FBPReady();\n // this._FBPTraceWires()\n /**\n * Register hook on wire --backdropClicked to\n * close the menu\n */\n this._FBPAddWireHook('--backdropClicked', () => {\n this.close();\n });\n\n // register resize listener\n if (!this.permanent) {\n if (window.ResizeObserver) {\n const ro = new ResizeObserver(entries => {\n for (const entry of entries) {\n window.requestAnimationFrame(() => {\n const cr = entry.contentRect;\n this.__isFloating = cr.width <= this.floatBreakpoint;\n });\n }\n if (this.__isFloating) {\n this.close();\n }\n });\n ro.observe(this);\n } else {\n // fallback, just listen to the resize event\n const cr = this.getBoundingClientRect();\n this.__isFloating = cr.width <= this.floatBreakpoint;\n\n window.addEventListener('resize', () => {\n // eslint-disable-next-line no-shadow\n const cr = this.getBoundingClientRect();\n this.__isFloating = cr.width <= this.floatBreakpoint;\n if (this.__isFloating) {\n this.close();\n }\n });\n }\n }\n\n // initial size\n const cr = this.getBoundingClientRect();\n this.__isFloating = cr.width <= this.floatBreakpoint;\n\n const drawer = this.shadowRoot.getElementById('drawer');\n /**\n * Set the transition effect after the first render. Otherwise we get a flickering effect\n */\n setTimeout(() => {\n drawer.style.transitionDuration = '200ms';\n }, 201);\n\n const drag = this.shadowRoot.getElementById('drag');\n const backdrop = this.shadowRoot.getElementById('backdrop');\n\n const trackhandler = e => {\n // unregister\n this.removeEventListener('mousemove', this.moveHandler, true);\n this.removeEventListener('touchmove', this.moveHandler, true);\n if (e instanceof MouseEvent) {\n this.pauseEvent(e);\n }\n if (this.__isFloating) {\n const startX = this._getScreenX(e);\n const startY = this._getScreenY(e);\n const startTime = performance.now();\n const { width } = drawer.getBoundingClientRect();\n let trackingEnabled = false;\n let trackingFixed = false;\n drawer.style.transitionDuration = '0ms';\n\n // Setup a timer\n let animationframetimeout;\n // register move\n this.moveHandler = () => {\n // If there's a timer, cancel it\n if (requestAnimationFrame) {\n window.cancelAnimationFrame(animationframetimeout);\n }\n\n if (e instanceof MouseEvent) {\n this.pauseEvent(e);\n // prevent dragging of links in a drawer\n e.preventDefault();\n }\n\n let distance = this._getScreenX(e) - startX;\n const y = this._getScreenY(e) - startY;\n\n // start tracking if angle is in a 45 deg horizontal\n if (\n !trackingFixed &&\n Math.abs(distance) < this._movementDetectionRange &&\n Math.abs(y) < this._movementDetectionRange\n ) {\n trackingEnabled = Math.abs(y) < Math.abs(distance);\n return;\n }\n\n // Setup the new requestAnimationFrame()\n animationframetimeout = window.requestAnimationFrame(() => {\n if (!trackingEnabled) {\n return;\n }\n trackingFixed = true;\n // correct the 10 pixels from tracking enable\n if (!this.isReverse) {\n distance += this._movementDetectionRange;\n } else {\n distance -= this._movementDetectionRange;\n }\n\n // update drawer position\n let delta = (distance * 100) / width;\n if (this.isOpen) {\n // limit the dragging, it makes no sense to pull the drawer in to the content area\n if ((!this.isReverse && delta > 0) || (this.isReverse && delta < 0)) {\n delta = 0;\n }\n // drawer.style.transform = \"translate3d(\" + distance + \"px, 0, 0)\";\n if (this.isReverse) {\n if (distance < 0) {\n distance = 0;\n }\n drawer.style.right = `${-distance}px`;\n } else {\n if (distance > 0) {\n distance = 0;\n }\n drawer.style.left = `${distance}px`;\n }\n backdrop.style.opacity = Math.floor(100 + delta) / 100;\n } else {\n // limit the dragging\n if (delta > 100) {\n delta = 100;\n distance = width;\n }\n if (delta < -100) {\n delta = -100;\n distance = -width;\n }\n\n if (this.isReverse) {\n // drawer.style.transform = \"translate3d(\" + (100 + delta) + \"%, 0, 0)\";\n drawer.style.right = `${-(width + distance)}px`;\n } else {\n // drawer.style.transform = \"translate3d(\" + (delta - 100) + \"%, 0, 0)\";\n drawer.style.left = `${distance - width}px`;\n }\n // backdrop darkness\n backdrop.style.opacity = Math.abs(delta / 100);\n }\n });\n };\n\n // register move\n this.addEventListener('mousemove', this.moveHandler, true);\n\n // todo: check this: this.addEventListener(\"touchmove\", this.moveHandler, {passive: true});\n // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n this.addEventListener('touchmove', this.moveHandler, true);\n\n // eslint-disable-next-line no-shadow\n this.trackEnd = e => {\n drawer.style.transitionDuration = '';\n // If there's a animation timer, cancel it\n if (requestAnimationFrame) {\n window.cancelAnimationFrame(animationframetimeout);\n }\n\n const endTime = performance.now();\n const distance = this._getScreenX(e) - startX;\n const duration = endTime - startTime;\n\n // quick movement\n if (Math.abs(distance) > 30 && duration < 200) {\n if (this.isOpen) {\n if ((!this.isReverse && distance < 0) || (this.isReverse && distance > 0)) {\n this.close();\n }\n } else {\n this.open();\n }\n } else {\n if (!trackingEnabled) {\n return;\n }\n // complete the movement, slow\n const delta = (distance * 100) / width;\n if (delta > -40 && delta < 40) {\n // restore initial pos\n if (this.isOpen) {\n this.open();\n } else {\n this.close();\n }\n } else if (this.isOpen) {\n this.close();\n } else {\n this.open();\n }\n }\n\n // unregister\n this.removeEventListener('mousemove', this.moveHandler, true);\n this.removeEventListener('touchmove', this.moveHandler, true);\n };\n // unregister movement tracker\n this.addEventListener('mouseup', this.trackEnd, { once: true });\n this.addEventListener('touchend', this.trackEnd, { once: true });\n }\n };\n drawer.addEventListener('trackstart', trackhandler, { passive: true });\n drawer.addEventListener('mousedown', trackhandler);\n\n drag.addEventListener('trackstart', trackhandler, { passive: true });\n drag.addEventListener('mousedown', trackhandler);\n }", "home() {\n this.setXY(0, 0);\n this.setHeading(0);\n }", "function Backdrop(){\n\t\t$(\".backdrop\").click(function () {\n\t\t\t$(this).remove();\n\t\t\t$(\".marco\").removeClass('marco-in');\n\t\t\t$(\".img-background\").css('filter', '');\n\t\t\tfoco=false;\n\t\t});\n\t}", "function setSelfPosition() {\n var s = $self[0].style;\n\n // reset CSS so width is re-calculated for margin-left CSS\n $self.css({left: '50%', marginLeft: ($self.outerWidth() / 2) * -1, zIndex: (opts.zIndex + 3) });\n\n\n /* we have to get a little fancy when dealing with height, because lightbox_me\n is just so fancy.\n */\n\n // if the height of $self is bigger than the window and self isn't already position absolute\n if (($self.height() + 80 >= $(window).height()) && ($self.css('position') != 'absolute')) {\n\n // we are going to make it positioned where the user can see it, but they can still scroll\n // so the top offset is based on the user's scroll position.\n var topOffset = $(document).scrollTop() + 40;\n $self.css({position: 'absolute', top: topOffset + 'px', marginTop: 0})\n } else if ($self.height()+ 80 < $(window).height()) {\n //if the height is less than the window height, then we're gonna make this thing position: fixed.\n if (opts.centered) {\n $self.css({ position: 'fixed', top: '50%', marginTop: ($self.outerHeight() / 2) * -1})\n } else {\n $self.css({ position: 'fixed'}).css(opts.modalCSS);\n }\n if (opts.preventScroll) {\n $('body').css('overflow', 'hidden');\n }\n }\n }", "get hasBackdrop() {\n if (this._backdropOverride == null) {\n return !this._start || this._start.mode !== 'side' || !this._end || this._end.mode !== 'side';\n }\n return this._backdropOverride;\n }", "get hasBackdrop() {\n if (this._backdropOverride == null) {\n return !this._start || this._start.mode !== 'side' || !this._end || this._end.mode !== 'side';\n }\n return this._backdropOverride;\n }", "function fullscreen(){\n\t\tjQuery('#hero').css({\n width: jQuery(window).width(),\n height: jQuery(window).height()\n });\n\t}", "function fullscreen(){\n\t\tjQuery('header').css({\n\t\t\theight: jQuery(window).height()-58+'px'\n\t\t});\n\t}", "function bottomHalf() {\n let window = Window.focused();\n\n if (window) {\n let screen = window.screen().flippedVisibleFrame();\n let fullScreenWidth = screen.width;\n let halfScreenHeight = screen.height / 2;\n\n window.setTopLeft({\n x: screen.x,\n y: screen.y + halfScreenHeight,\n });\n\n window.setSize({\n height: halfScreenHeight,\n width: fullScreenWidth,\n });\n }\n}", "function topHalf() {\n let window = Window.focused();\n\n if (window) {\n let screen = window.screen().flippedVisibleFrame();\n let fullScreenWidth = screen.width;\n let halfScreenHeight = screen.height / 2;\n\n window.setTopLeft({\n x: screen.x,\n y: screen.y,\n });\n\n window.setSize({\n height: halfScreenHeight,\n width: fullScreenWidth,\n });\n }\n}", "function setUnfixed() {\r\n // Only unfix the target element and the spacer if we need to.\r\n if (!isUnfixed()) {\r\n lastOffsetLeft = -1;\r\n\r\n // Hide the spacer now that the target element will fill the\r\n // space.\r\n spacer.css('display', 'none');\r\n\r\n // Remove the style attributes that were added to the target.\r\n // This will reverse the target back to the its original style.\r\n target.css({\r\n 'z-index' : originalZIndex,\r\n 'width' : '',\r\n 'position' : originalPosition,\r\n 'left' : '',\r\n 'top' : originalOffsetTop,\r\n 'margin-left' : ''\r\n });\r\n\r\n target.removeClass('scroll-to-fixed-fixed');\r\n\r\n if (base.options.className) {\r\n target.removeClass(base.options.className);\r\n }\r\n\r\n position = null;\r\n }\r\n }", "function backShadowExp()\n{\n kony.print(\"\\n**********in backShadowExp*******\\n\");\n frmHome.show();\n //\"shadowDepth\" : Represents the depth of the shadow in terms of dp.\n //As the shadow depth increases, widget appears to be elevated from the screen and the casted shadow becomes soft\n frmShodowView.flxShadow.shadowDepth = 0;\n //\"shadowType\" : Specifies the shape of the widget shadow that is being casted. By default, widget shadow takes the shape of the widget background.\n frmShodowView.flxShadow.shadowType = constants.VIEW_BOUNDS_SHADOW;\n}", "function topEdge() {\n $( \"#target\" ).animate({paddingTop:\"-=310px\"});\n }", "setTargetEarth() {\n App.targeting.setScopedTarget(0, 0);\n App.UI.targetSelected('earth');\n }", "function setupOverlay() {\n objHeight = height + height / 2; // outside of the screen\n objInPosition = false;\n objMoveAway = false;\n}", "function doBackdropShow(zIndex, instance) {\n $(document.body).addClass('u-coral-noscroll');\n\n if (!backdropEl) {\n backdropEl = document.createElement('div');\n backdropEl.className = 'coral-Backdrop';\n document.body.appendChild(backdropEl);\n\n $backdropEl = $(backdropEl);\n $backdropEl.on('click', handleBackdropClick);\n }\n\n // Show just under the provided zIndex\n // Since we always increment by 10, this will never collide\n backdropEl.style.zIndex = zIndex - 1;\n\n // Set flag for testing\n backdropEl._isOpen = true;\n\n // Start animation\n cancelBackdropHide();\n backdropEl.style.display = '';\n Coral.commons.nextFrame(function() {\n // Add the class on the next animation frame so backdrop has time to exist\n // Otherwise, the animation for opacity will not work.\n $backdropEl.addClass('is-open');\n });\n\n hideEverythingBut(instance);\n }", "function topLeftHalf() {\n let window = Window.focused();\n\n if (window) {\n let screen = window.screen().flippedVisibleFrame();\n let halfScreenHeight = screen.height / 2;\n let halfScreenWidth = screen.width / 2;\n\n window.setTopLeft({\n x: screen.x,\n y: screen.y,\n });\n\n window.setSize({\n height: halfScreenHeight,\n width: halfScreenWidth,\n });\n }\n}", "#addReset() {\n document.querySelector('body').style.margin = '0';\n }", "function moveToCenter() {\n $._resetToCenter();\n}", "function displayBlockModalBackdrop(){\n modal.style.display = 'block';\n backdrop.style.display = 'block';\n}", "function reset_window_size() {\n\tcurrentWindow.height = 400;\n\tcurrentWindow.width = 600;\n\tcurrentWindow.x = Math.round((screen.width / 2) - 300);\n\tcurrentWindow.y = Math.round((screen.height / 2) - 200);\n}", "function defineOffset() {\n if(STATE.CURRENT_SLIDE > 1) {\n STATE.OFFSET = -STATE.RESIZE_OFFSET;\n } else {\n STATE.OFFSET = STATE.OFFSET;\n }\n }", "close() {\n this.opened = false;\n if (window.ShadyCSS && !window.ShadyCSS.nativeShadow) {\n this.shadowRoot\n .querySelector(\"web-dialog\")\n .shadowRoot.querySelector(\"#backdrop\").style.position = \"relative\";\n }\n }", "function setup(){\n createCanvas(600,400);\n background(255);\n // Define your backdrop colors here\n backgroundColorTop = color(0,0,0); //starting color (top)\n backgroundColorBottom = color(0)//nding color (bottom)\n noLoop();\n\n}", "function bottomLeftTwoThirdHeight() {\n let window = Window.focused();\n\n if (window) {\n let screen = window.screen().flippedVisibleFrame();\n let oneThirdScreenHeight = screen.height / 3;\n let twoThirdScreenHeight = oneThirdScreenHeight * 2;\n let halfScreenWidth = screen.width / 2;\n\n window.setTopLeft({\n x: screen.x,\n y: oneThirdScreenHeight + 24,\n });\n\n window.setSize({\n height: twoThirdScreenHeight,\n width: halfScreenWidth,\n });\n }\n}", "bringToFront() {\n this.view.bringToFront();\n }", "function menuSet(self){\n\t\tvar browserWidth = window.innerWidth;\n\t\tvar heightMenu = window.innerHeight - document.querySelector(\".main-menu\").getBoundingClientRect().bottom + \"px\";\n\t\tvar menuPosition = document.querySelector(\".main-menu\").getBoundingClientRect().bottom;\n\n\t\tif (browserWidth < 800 ) {\n\t\t\t$('.main-menu .catalog-list>ul').css({\n\t\t\t\t\"max-height\": heightMenu,\n\t\t\t\t\"position\": \"fixed\",\n\t\t\t\t\"top\": menuPosition +\"px\"\n\t\t\t});\n\n\t\t} else {\n\t\t\t$('.main-menu .catalog-list>ul').css({\n\t\t\t\t\"max-height\": \"\",\n\t\t\t\t\"top\": \"\",\n\t\t\t\t\"position\": \"\"\n\t\t\t});\n\t\t}\n\n\t}", "resetDialogPosition() {\n this.$dialog.style.top = 0;\n this.$dialog.style.left = 'auto';\n this.$dialog.style.right = '-1000px';\n }", "upper() {\n this.preview.style.zIndex = 3;\n }", "lookAtCenter() {\n if (this.viewport) {\n this.viewport.update();\n }\n if (this.controls) {\n this.controls.reset();\n }\n this.updateScene();\n }", "viewFull() {\n this.designSheet.visibleRect = this.designSheet.getFBPBoundingRect();\n this.onViewChange();\n }", "adoptPositionOnResize() {\n if (this.adoptOnResize) {\n\n /**\n * Get app event manager\n * @type {ApplicationEventManager|{subscribe, eventList}}\n */\n const appEventManager = this.view.controller.root().eventManager;\n\n appEventManager.subscribe({\n event: {name: appEventManager.eventList.resizeWindow},\n callback() {\n this.setPosition({\n $container: this.$container,\n $item: this.$,\n position: this.position\n });\n }\n }, false);\n }\n }", "function bottomLeftOneThirdHeight() {\n let window = Window.focused();\n\n if (window) {\n let screen = window.screen().flippedVisibleFrame();\n let oneThirdScreenHeight = screen.height / 3;\n let twoThirdScreenHeight = oneThirdScreenHeight * 2;\n let halfScreenWidth = screen.width / 2;\n\n window.setTopLeft({\n x: screen.x,\n y: twoThirdScreenHeight + 24,\n });\n\n window.setSize({\n height: oneThirdScreenHeight,\n width: halfScreenWidth,\n });\n }\n}", "repositionOverlay() {\n const ctrl = /** @type {OverlayController} */ (this._overlayCtrl);\n if (ctrl.placementMode === 'local' && ctrl._popper) {\n ctrl._popper.update();\n }\n }", "_setSeekBarPos()\n {\n // Insert the seek bar into the correct container.\n let top = ppixiv.mobile || !helpers.isFullscreen();\n this.seekBar.root.remove();\n let seekBarContainer = top? \".seek-bar-container-top\":\".seek-bar-container-bottom\";\n this.root.querySelector(seekBarContainer).appendChild(this.seekBar.root);\n\n this.seekBar.root.dataset.position = top? \"top\":\"bottom\";\n }", "function displayMainMenuBackDrop(selected) {\n $('#jcc-dropdown-backdrop').remove(); // Remove existing backdrops\n var backDrop = $(document.createElement('div')).attr('id', 'jcc-dropdown-backdrop').addClass('modal-backdrop'); // Bootstrap modal backdrop - dropdown-backdrop does not work\n var ddContainer = $(selected).closest('.dropdown'); // Dropdown container context\n backDrop.appendTo(ddContainer); // Set Bootstrap modal to overlay everything but the open dropdown menu\n}", "function setPos()\n {\n vm.moverStyle.left = vm.themeStyle.left;\n vm.moverStyle.top = vm.themeStyle.top;\n vm.moverStyle.display = vm.themeStyle.display;\n }", "function onFrame() {\n var vector = destination - view.center;\n setViewCenter(view.center + (vector / 15));\n}", "async _setTransparentBackgroundColor() {\n await this._client.send('Emulation.setDefaultBackgroundColorOverride', {\n color: { r: 0, g: 0, b: 0, a: 0 },\n });\n }", "function setBackgroundPosition($backgrounds) {\n const height = screen.height/2;\n Array.from($backgrounds).forEach((background, i) => {\n let backgroundPosition = (background.offsetTop - window.scrollY)/2\n if(backgroundPosition > -height && backgroundPosition < height){\n background.style.backgroundPositionY = `${backgroundPosition}px`;\n }\n })\n}", "function fullscreen(){\n $('#hero').css({\n width: $(window).width(),\n height: $(window).height()\n });\n }", "function center_window ( window ) {\n var screen = window.screen(),\n sFrame = window.screen().flippedFrame(),\n wFrame = window.frame ();\n\n window.setFrame ({\n x: sFrame.x + ( sFrame.width / 2 ) - ( wFrame.width / 2 ),\n y: ( sFrame.height / 2 ) - ( wFrame.height / 2 ),\n width: wFrame.width,\n height: wFrame.height\n });\n}", "function setCameraZoomed(){\n camera.position.set( 5.275489271607287,14.650010427656056,-13.235869197100351);\n camera.lookAt(duck.position);\n}", "function position() {\n var x = Math.random() * $(window).width();\n var y = Math.random() * $(window).height();\n $('#downstairs').offset({\n // position: 'absolute',\n top: y,\n left: x\n });\n}", "function bottomRightHalf() {\n let window = Window.focused();\n\n if (window) {\n let screen = window.screen().flippedVisibleFrame();\n let halfScreenHeight = screen.height / 2;\n let halfScreenWidth = screen.width / 2;\n\n window.setTopLeft({\n x: screen.x + halfScreenWidth,\n y: halfScreenHeight + 22,\n });\n\n window.setSize({\n height: halfScreenHeight,\n width: halfScreenWidth,\n });\n }\n}", "function adjustPosition(){\n let app_footer = document.getElementById('app-footer');\n let appf_header = document.getElementsByClassName('dl-header')[0];\n\n app_footer.style.top = window.innerHeight - appf_header.offsetHeight;\n}", "function setScreenSize() {\n // Reset client classes\n body.classList.remove('client-xl', 'client-lg', 'client-md', 'client-sm', 'client-xs');\n\n var screenSize = lend.screenSize('bootstrap');\n if (screenSize) body.classList.add('client-' + screenSize);\n }", "function setSidebarPos() {\n var detach = $('body').find(\".main-sidebar\").detach();\n if (window.matchMedia('(min-width: 992px)').matches) {\n $(detach).appendTo($('body').find(\"#sidebarStatic\"));\n $('.slideout-panel').css({'transform':'translateX(0)'});\n } else {\n $(detach).appendTo($('body').find(\"#sidebarSlidout\"));\n }\n}", "function moveToViewCenter() {\n if (visible) {\n ctx.translate((width / 2) - x(viewCenter.x), -y(viewCenter.y) + (height / 2));\n }\n }", "set TopCenter(value) {}", "function onBackdropClick() {\n close();\n }", "setInitialPosition() {\n this.movePopover(-9999, -9999);\n // leave in the init state so the eventual repositioning will happen immediately (no anim)\n this.lifecycleState = lifecycleStates.init;\n }", "function topLeftOneThirdHeight() {\n let window = Window.focused();\n\n if (window) {\n let screen = window.screen().flippedVisibleFrame();\n let oneThirdScreenHeight = screen.height / 3;\n let halfScreenWidth = screen.width / 2;\n\n window.setTopLeft({\n x: screen.x,\n y: screen.y,\n });\n\n window.setSize({\n height: oneThirdScreenHeight,\n width: halfScreenWidth,\n });\n }\n}", "function reposition() {\n var modal = $(this),\n dialog = modal.find('.modal-dialog');\n modal.css('display', 'block');\n \n // Dividing by two centers the modal exactly, but dividing by three \n // or four works better for larger screens.\n dialog.css(\"margin-top\", Math.max(0, ($(window).height() - dialog.height()) / 2));\n}", "function rightOneThird() {\n let window = Window.focused();\n\n if (window) {\n let screen = window.screen().flippedVisibleFrame();\n let oneThirdScreenWidth = screen.width / 3;\n let twoThirdScreenWidth = oneThirdScreenWidth * 2;\n\n window.setTopLeft({\n x: screen.x + twoThirdScreenWidth,\n y: screen.y,\n });\n\n window.setSize({\n height: screen.height,\n width: oneThirdScreenWidth,\n });\n }\n}", "setSelectedSceneIconFramePosition(){\n this.selectedSceneIconFrame.setPosition(\n this.selectedSceneIcon.x - 4,\n this.selectedSceneIcon.y - 4\n );\n }", "function SnapBack(el) {\n // Original absolute center position\n el.style.top = '50%';\n el.style.left = '50%';\n el.style.transform = 'translate(-50%, -50%)';\n el.style.transition = 'all 0.3s ease-in-out';\n}" ]
[ "0.628946", "0.6141828", "0.5879977", "0.54127306", "0.53979045", "0.53096074", "0.5268508", "0.5225944", "0.50899345", "0.508898", "0.5046985", "0.50173813", "0.5016853", "0.5008737", "0.49300045", "0.49275392", "0.49259233", "0.492385", "0.49155632", "0.49060243", "0.49060243", "0.49060243", "0.49046153", "0.48885727", "0.4881502", "0.4869463", "0.48687735", "0.4859521", "0.48482105", "0.4842261", "0.48347655", "0.48212543", "0.48170936", "0.48155904", "0.4809266", "0.4789329", "0.4766375", "0.474897", "0.47421175", "0.4741221", "0.47395694", "0.47395015", "0.4737047", "0.4736946", "0.47355598", "0.47283038", "0.47242624", "0.47241277", "0.47241277", "0.47183448", "0.47152254", "0.47116262", "0.47086266", "0.47076002", "0.4700654", "0.46873277", "0.46870708", "0.46807286", "0.46786833", "0.46728447", "0.46679953", "0.4664387", "0.4663454", "0.4662438", "0.46611214", "0.4650954", "0.4634538", "0.46340442", "0.46326193", "0.4631182", "0.4626253", "0.46258792", "0.4620938", "0.46101636", "0.46061137", "0.45942044", "0.45930296", "0.4592373", "0.45897797", "0.45803723", "0.45769274", "0.45743454", "0.4573683", "0.45733708", "0.45718363", "0.45713454", "0.45592493", "0.45545363", "0.45536324", "0.4548723", "0.45477343", "0.45441923", "0.45423186", "0.45396918", "0.45376432", "0.45334312", "0.45316616", "0.45305163", "0.4528881", "0.4525473" ]
0.72804755
0
Hide the monsters on a particular screen.
hideMonsters(screenNumber) { validateRequiredParams(this.hideMonsters, arguments, 'screenNumber'); let opponents = this.getMonstersOnScreen(screenNumber); for (let opponent of opponents) { opponent.getProperties().getSprite().css('display', 'none'); opponent.getProperties().getDeathSprite().css('display', 'none'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hideAllScreens() {\n this.activeScreen = Screen.NONE;\n }", "function hideSinglePlayerStatScreen(){\n console.log(\"hideSinglePlayerStatScreen\")\n //indicate we are showing all of the player's stats\n statScreen.ShowAll = true;\n //Clears the healthbar\n singleGraphics.clear();\n statScreen.SinglePlayer.HealthBar.HealthText.kill();\n //kill all the Text objects for the singlePlayer screen\n for (var k in statScreen.SinglePlayer.AttributeStrings){\n if(statScreen.SinglePlayer.AttributeStrings.hasOwnProperty(k)){\n statScreen.SinglePlayer.AttributeStrings[k].kill();\n }\n }\n //kill the Text object containing the player name\n statScreen.SinglePlayer.CharacterName.kill();\n\n}", "function hideAllChildren(){\n uki.map( screens, function(screen){\n screen.visible(false);\n });\n }", "function hideMultiPlayerStatScreen(){\n console.log(\"hideMultiPlayerStatScreen\");\n //clear all the healthbars\n multiGraphics.clear();\n //Call kill on all Phaser Text Objects of all players\n for (var player in statScreen.MultiPlayer){\n if(statScreen.MultiPlayer.hasOwnProperty(player)){\n statScreen.MultiPlayer[player][\"CharacterName\"].kill();\n for (var attrString in statScreen.MultiPlayer[player][\"AttributeStrings\"]){\n if(statScreen.MultiPlayer[player][\"AttributeStrings\"].hasOwnProperty(attrString)){\n statScreen.MultiPlayer[player][\"AttributeStrings\"][attrString].kill();\n }\n }\n }\n\n }\n}", "function hideWin() {\n winContainer.classList.remove('win-screen');\n}", "function hideLobby() {\n gamesList.classList.add('hidden');\n generateBattleField(battlefield, { x: 10, y: 10 });\n updateBtn(actionBtn, ACTION_BTN.GIVE_UP);\n }", "function hideGame() {\n display.show();\n board.end();\n }", "function hideLobbyShowBoard() {\n $(\"#lobby\").hide();\n $(\"#game-area\").show();\n\n // Show GO in detail pane\n selectSquareModel(0).showDetail();\n // Show buttons\n showButtons([]);\n}", "function hideTiles(){ \r\n var firstTile = window.gameProcess.firstTile;\r\n var secondTile = window.gameProcess.secondTile;\r\n\r\n //Change sprites' properties in order to hide them\r\n firstTile.tint = 0x000000;\r\n firstTile.alpha = 0.5;\r\n firstTile.isSelected = false;\r\n secondTile.tint = 0x000000;\r\n secondTile.alpha = 0.5;\r\n secondTile.isSelected = false;\r\n\r\n //Update the screen \r\n animate();\r\n}", "function hide() {\n\n // Call the hide() method on the instance of the Character \"class\" that will\n // represent the player's character\n _character.hide();\n }", "function toggleDisplay(screen){\n\n\t\t// Hide all the screens.\n\t\tfor (var i = 0; i < gameScreens.length; i++) {\n\t\t\t$(\"#\" + gameScreens[i]).addClass(\"hidden\");\n\t\t}\n\n\t\t// Display the screen that we need.\n\t\t$(\"#\" + screen).toggleClass(\"hidden\");\n\t}", "function removeBlackScreensFromAllImageDisplays(){\n imageDisplays.forEach((imageDisplay, index) => {\n if(index === indexOfCurrentImageDisplay) return;\n const blackScreen = imageDisplay.querySelector('.img-display__black-screen');\n gsap.to(blackScreen, {duration: 1, opacity: 0, overwrite: true});\n });\n}", "function screen() {\r\n var y = document.getElementById(\"game\");\r\n if (hunger > 0 && health > 0 && happiness > 0) {\r\n y.style.display = \"block\";\r\n } else if (hunger === 0 || health === 0 || happiness === 0) {\r\n y.style.display = \"none\";\r\n }\r\n }", "function hideScreens()\n{\n\tdocument.getElementById(\"h1\").style.display = \"none\";//block\n document.getElementById(\"h2\").style.display = \"none\";\n document.getElementById(\"hr1\").style.display = \"none\";\n document.getElementById(\"hr2\").style.display = \"none\";\n document.getElementById(\"img\").style.display = \"none\";\n document.getElementById(\"ul\").style.display = \"none\";\n}", "function hideModalScreen() {\n\t\tcurrent_x = this;\n\t\tcurrent_x.style.display = \"none\";\n\t\tcurrent_x.nextElementSibling.style.display = \"none\";\n\t}", "function masquerBloc(id) {\n document.getElementById(id).style.display = \"none\";\n // document.getElementById('screen_two').style.visibility='hidden';\n}", "function startScreen() {\n screenWin.style.display = 'none';\n board.style.display = 'none';\n}", "static hideBoards() {\n document.getElementById('boardContainer').style.display = 'none';\n }", "hide() {\n this.visible = false;\n if (this.config.pauseGame) {\n ns.game.paused = false;\n }\n }", "hide() {\n this.canvas.style.display = 'none';\n this.back.style.display = 'none';\n this.setPos({x:0, y:document.body.clientHeight, deg:0, scale:0});\n delete renderer.movingCards[this.id];\n }", "hide() {\n this.isVisible = false\n this.skeleton.visible = false\n this.clip._root.children.forEach(elt => elt.visible = false)\n this._updateVisibilityImg()\n }", "function hide()\n\t{\n\t\t$(\"#city-screen\").hide();\n\t\tconsole.log(\"hide\")\n\t}", "function unHideComponents(){\r\n tank.style.visibility = \"visible\";\r\n missile.style.visibility = \"visible\";\r\n score.style.visibility = \"visible\";\r\n}", "function secondTowin() {\n $(\"#second\").hide();\n $(\".win-screen\").show();\n}", "function hideMainScreen() {\n\t$(\"#main\").addClass(\"hidden\");\n}", "function hideUIOverlays() {\r\n endEdgeDrawing();\r\n deselectAllNodes();\r\n Context.hideAllMenus();\r\n Tooltip.hideAllTooltips();\r\n Canvas.update();\r\n}", "unhide() {\n document.getElementById(\"guiArea\").classList.remove(\"hideMe\");\n document.getElementById(\"guiAreaToggle\").classList.remove(\"hideMe\");\n }", "function hideMask(){\n\tList.showMask = false;\n\tCard.showMask = false;\n}", "function disappear() {\n\tfor (let i = 0; i < iconIdsArr.length; i++) {\n\t\tfor (let j = 0; j < slotClassArr.length; j++) {\n\t\t\t$(`${slotClassArr[j]}`).find(`${iconIdsArr[i]}`)\n\t\t\t\t\t\t\t\t .css(\"display\", \"none\");\n\t\t}\n\t}\n}", "function hideMedia() {\n if (cStatus.media.type == 'video') {\n services.tablet.then(function(tablet) {\n tablet.stopVideo();\n });\n } else {\n services.tablet.then(function(tablet) {\n tablet.hideImage();\n });\n }\n}", "function changeScreen \n (\n hideScreenId, // Id of the screen that we need to hide\n showScreenId // Id of the screen that we need to show\n )\n { \n displayOrHideFields (hideScreenId, showScreenId);\n }", "function show_hide(value1, value2){\n // HIDE ORBITAL PATHS\n if (value1 === 0){\n scene.remove(sphere_1_0);\n scene.remove(sphere_2_0);\n scene.remove(sphere_3_0);\n scene.remove(sphere_4_0);\n scene.remove(sphere_5_0);\n scene.remove(sphere_6_0);\n scene.remove(sphere_7_0);\n scene.remove(sphere_8_0);\n }\n \n // HIDE THE BACKGROUND\n if (value1 === 1){\n document.getElementById(\"body\").style.background = \"#000000\";\n }\n \n // HIDE EARTH'S MOON\n if (value1 === 2){\n scene.remove(sphere_3_1);\n }\n \n // HIDE INNER PLANETS\n if (value1 === 3){\n scene.remove(sphere_1);\n scene.remove(sphere_2);\n scene.remove(sphere_3);\n scene.remove(sphere_3_1);\n scene.remove(sphere_4);\n }\n \n // HIDE OUTER PLANETS\n if (value1 === 4){\n scene.remove(sphere_5);\n scene.remove(sphere_6);\n scene.remove(sphere_6_1);\n scene.remove(sphere_6_2);\n scene.remove(sphere_7);\n scene.remove(sphere_8);\n }\n}", "function hideWidget() {\n widgets.forEach((widget) => {\n $(widget).css(\"z-index\", \"0\");\n $(widget).hide();\n $(widget).removeClass(\"active\");\n });\n}", "hide() {\n this.backgroundDiv.remove();\n this.BasementFloorDiv.remove();\n }", "function removeHide() {\n // Remove the hide button from each planet folder if it exists and add the view button into the gui if it's not in the folder\n planets.forEach(function(planet) {\n if (planet.userData.remove_button!=undefined) {\n planet.userData.folder.remove(planet.userData.remove_button);\n planet.userData.remove_button = undefined;\n }\n if (planet.userData.add_button==undefined)\n planet.userData.add_button = addButton(planet.userData.properties, planet.userData.folder, 'view');\n });\n // Remove the hide button from each moon folder\n // if it exists and add the view button into the gui if it's not in the folder\n // and remove the path of each moon if it's in the scene\n moons.forEach(function(moon) {\n if (path!=undefined)\n moon.userData.centreMass.remove(path);\n if (moon.userData.remove_button!=undefined) {\n moon.userData.folder.remove(moon.userData.remove_button);\n moon.userData.remove_button = undefined;\n }\n if (moon.userData.add_button==undefined)\n moon.userData.add_button = addButton(moon.userData.properties, moon.userData.folder, 'view');\n if (path_on) {\n scene.remove(path);\n moon.userData.centreMass.remove(path);\n path_on = false;\n }\n });\n // Remove the hide button from each star folder if it exists and add the view button into the gui if it's not in the folder\n stars.forEach(function(star) {\n if (star.userData.remove_button!=undefined) {\n star.userData.folder.remove(star.userData.remove_button);\n star.userData.remove_button = undefined;\n }\n if (star.userData.add_button==undefined)\n star.userData.add_button = addButton(star.userData.properties, star.userData.folder, 'view');\n })\n}", "function CutHides() {\n var scissors = Orion.FindTypeEx('0x0F9F').shift();\n var hides = Orion.FindTypeEx('0x1079');\n UseItemOnTargets(scissors, hides);\n\n}", "function whiteboard_hide_canvas()\n{\n\t$('#white-board .menu .draw').removeClass('begin').text('Draw');\n\t$('#white-board .menu .pen').hide();\n\t$('#white-board .menu .type').hide();\n\t$('#white-board .menu .color').hide();\n\t$('#white-board .menu .eraser').hide();\n\t$('#white-board .menu .clear').hide();\n\t$('#white-board .menu .pen').hide();\n\t$('#white-board #canvas').hide();\n}", "function hide() {\n if (document.getElementById('rightPocket').style.display = \"block\") {\n rp_h.style.display = \"none\";\n }\n if (document.getElementById('leftPocket').style.display = \"block\") {\n lp_h.style.display = \"none\";\n }\n if (document.getElementById('bottomPocket').style.display = \"block\") {\n botp_h.style.display = \"none\";\n }\n\n if (document.getElementById('topPocket').style.display = \"block\") {\n topp_h.style.display = \"none\";\n }\n if (document.getElementById('bigPocket').style.display = \"block\") {\n bigp_h.style.display = \"none\";\n }\n }", "function hide() {\n let elem = document.getElementById('tutorialScreen');\n elem.parentNode.removeChild(elem);\n\n}", "function hide() {\n toogle = 'hide'\n\n }", "function selectView(){\r\n\t//console.log(screen);\r\n\tif(screen.width > 850){\r\n\t\t port.hide();\r\n\t\t land.show();\t\t \r\n\t }else{\r\n\t\t port.show();\r\n\t land.hide();\r\n\t }\r\n}", "function hideWork() {\n $('.img-port').hide();\n }", "function clearScreen() {\n\tlet CharCreate = document.getElementsByClassName(\"CharCreator\");\n\tfor (i = 0; i < CharCreate.length; i++) {\n\t\tCharCreate[i].style.display = 'none';\n\t}\n\tlet playScreen = document.getElementsByClassName(\"playScreen\");\n\tfor (i = 0; i < playScreen.length; i++) {\n\t\tplayScreen[i].style.display = 'none';\n\t}\n\tlet invScreen = document.getElementsByClassName('inventoryScreen');\n\tfor (i = 0; i < invScreen.length; i++) {\n\t\tinvScreen[i].style.display = 'none';\n\t}\n\tlet comScreen = document.getElementsByClassName('combatScreen');\n\tfor (i = 0; i < comScreen.length; i++) {\n\t\tcomScreen[i].style.display = 'none';\n\t}\n}", "function hideImages () {\n document.getElementById(\"win-image\").style.display = \"none\";\n document.getElementById(\"lose-image\").style.display = \"none\";\n}", "hide()\n\t{\n\t\t// hide the decorations:\n\t\tsuper.hide();\n\n\t\t// hide the stimuli:\n\t\tif (typeof this._items !== \"undefined\")\n\t\t{\n\t\t\tfor (let i = 0; i < this._items.length; ++i)\n\t\t\t{\n\t\t\t\tif (this._visual.visibles[i])\n\t\t\t\t{\n\t\t\t\t\tconst textStim = this._visual.textStims[i];\n\t\t\t\t\ttextStim.hide();\n\n\t\t\t\t\tconst responseStim = this._visual.responseStims[i];\n\t\t\t\t\tif (responseStim)\n\t\t\t\t\t{\n\t\t\t\t\t\tresponseStim.hide();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// hide the scrollbar:\n\t\t\tthis._scrollbar.hide();\n\t\t}\n\t}", "function hideScene(sceneId) {\n var scene = document.querySelector(sceneId);\n scene.setAttribute(\"visible\", false);\n scene.setAttribute(\"scale\", \"0 0 0\");\n}", "function hide() {\n\n\t\t$('.minicolors-focus').each( function() {\n\n\t\t\tvar minicolors = $(this),\n\t\t\t\tinput = minicolors.find('.minicolors-input'),\n\t\t\t\tpanel = minicolors.find('.minicolors-panel'),\n\t\t\t\tsettings = input.data('minicolors-settings');\n\n\t\t\tpanel.fadeOut(settings.hideSpeed, function() {\n\t\t\t\tif( settings.hide ) settings.hide.call(input.get(0));\n\t\t\t\tminicolors.removeClass('minicolors-focus');\n\t\t\t});\n\n\t\t});\n\t}", "function hideMainArea(){\n if(window.screen){\n var width=screen.width;\n var height=screen.height;\n \n\n if(width<=992){\n mainArea.style=\"display:none\";\n }\n }\n}", "hide() {\n\n for (let i = 0; i < this.frameCount; i++) {\n this[`frame${i}`].style.display = \"none\";\n }\n this.isVisible = false;\n\n }", "function hideElements(){\n\t\n\tvar screenWidth = window.innerWidth\n\tif(screenWidth>1120) hide = true //this is so if the screen goes from small to big the device has permission to hide elements again onces the screen gets smaller\n\t\n\tif(screenWidth<=1120){\n\t\tif(hide == true){\n\t\t$('#view-attendees').show()//button\n\t\t$('#view-event').hide()//button\n\t\t$('#list-attendees-div').hide()\n\t\t}//if\n\t}//if\n\telse{\n\t\t$('#view-attendees').hide()\n\t\t$('#view-event').hide()//button\n\t\t$('#list-attendees-div').hide()\n\t\t$('#event-info-container').show()\n\t\t$('#list-attendees-div').css('display','inline-block')\n\t\t$('#event-info-container').css('display','inline-block')\n\t}\n\tif(screenWidth<=1120) hide = false //this is so device knows it has already hidden elements\n}", "function hideNonTouchscreenContent() {\n\t$(\".hide-for-touchscreen\").hide();\n}", "hideOffscreenElements() {\n const startIndex = Math.floor(-(this.scrollContainer.y - this.y) / this.itemHeight);\n const endIndex = Math.floor(startIndex + (this.height / this.itemHeight));\n for (let i = 0; i < this.items.length; i++) {\n const item = this.items[i];\n item.visible = false;\n if (i >= startIndex && i <= endIndex + 1) {\n item.visible = true;\n }\n }\n }", "function hideMovieClips() {\n for (var i = 0; i < p._hideMCs.length; i++) {\n if (this.parent[p._hideMCs[i]]) {\n var mc = this.parent[p._hideMCs[i]];\n mc.visible = false;\n }\n }\n }", "function hideWinPanel(){\n let winPanel = document.getElementsByClassName(\"win-panel\")[0];\n winPanel.style.display = \"none\";\n}", "hide()\n {\n this._window.hide();\n }", "function hideInitialScreen() {\n for (var i = 0; i < startMsg.length; i++) {\n startMsg[i].style.display = \"none\";\n }\n // hide start question button\n\n for (var i = 0; i < startBtn.length; i++) {\n startBtn[i].style.display = \"none\";\n }\n //hide viewHighScore button\n for (var i = 0; i < viewHighScore.length; i++) {\n viewHighScore[i].style.display = \"none\";\n }\n}", "function hideField() {\n var camelArray = [camelBlue, camelGreen, camelRed, camelYellow];\n var waitingMessArray = [waitingForBlueCamelRider,waitingForGreenCamelRider,waitingForRedCamelRider,waitingForYellowCamelRider]\n\n $.each(waitingMessArray, function (index) {\n this.attr({\n visibility: 'hidden'\n });\n\n });\n\n\n\n\n $.each(camelArray, function (index) {\n this.attr({\n visibility: 'hidden'\n });\n\n });\n\n $.each(fieldArray, function (index) {\n this.attr({\n visibility: 'hidden'\n });\n });\n\n\n\n if(Session.get('PlayerId')== 0) blueidentity.attr({ visibility: 'hidden' });\n if(Session.get('PlayerId')== 1) greenidentity.attr({ visibility: 'hidden'});\n if(Session.get('PlayerId')== 2) redidentity.attr({ visibility: 'hidden' });\n if(Session.get('PlayerId')== 3) yellowidentity.attr({ visibility: 'hidden' });\n\n }", "function dimScreen() {\n document.querySelector('.loader').style.display = 'block';\n document.querySelector('.dimmer').style.display = 'block';\n document.querySelector('.image').style.display = 'none';\n document.querySelector('.hidden').style.display = \"none\";\n nextImageButton.disabled = true;\n previousImageButton.disabled = true;\n setTimeout(undimScreen, 1000);\n}", "function hideBuilding() {\n hideMarker( buildingIndex );\n}", "function hideGUIForever () {\r\n $('#buttonsPanel')\r\n .add('#player-logo')\r\n .add('#presentation-info')\r\n .add('.leftButton')\r\n .add('.rightButton')\r\n .add('#menu-container')\r\n .add('#timelinebutton').removeClass('show').addClass('hidden');\r\n\r\n // Disable all GUI handlers\r\n $('html').off(\"mouseenter\", showGUI);\r\n $('html').off(\"mouseleave\", hideGUI);\r\n $('#scene').off('mousemove');\r\n }", "function changeScreen () {\n startScreen = document.querySelector('#start-screen')\n game = document.querySelector('#game')\n startScreen.style.visibility = 'hidden'\n game.style.visibility = 'visible'\n}", "hide() {\n this.isVisible = false;\n }", "function hide() {\n $('.minicolors-focus').each(function() {\n var minicolors = $(this);\n var input = minicolors.find('.minicolors-input');\n var panel = minicolors.find('.minicolors-panel');\n var settings = input.data('minicolors-settings');\n\n panel.fadeOut(settings.hideSpeed, function() {\n if(settings.hide) settings.hide.call(input.get(0));\n minicolors.removeClass('minicolors-focus');\n });\n\n });\n }", "hide() {\n if (this.facingCamera || !this.initialized) {\n this.updateVisibility(false);\n }\n }", "function hide() {\n if (visible) {\n panel.classList.remove(SHOW_CLASS);\n setTimeout(function () {\n panel.style.display = \"none\";\n }, 300);\n\n currentPanel = NO_PANEL;\n visible = false;\n self.port.emit(\"panel-hidden\");\n setTimeout(function () {\n if (body !== undefined) {\n body.removeChild(overlay);\n body.style.overflow = \"auto\";\n while (overlay.hasChildNodes()) {\n overlay.removeChild(overlay.lastChild);\n }\n }\n }, 300);\n }\n}", "deactivateHouse() {\r\n this.lightOn = false;\r\n this.light.visible = false;\r\n }", "function hideOverlay() {\n getId('levelOverlay').style.display = \"none\";\n getId('quitOverlay').style.display = \"none\";\n getId('buttonLeft').style.display = \"none\";\n getId('buttonRight').style.display = \"none\";\n getId('playAgain').style.display = \"none\";\n}", "function hide_controls() {\r\n\r\n //Let the mouse movement lister know that the controls are now hidden.\r\n controls_hidden = true;\r\n\r\n //Hide the cursor on the body.\r\n $(document.body).css(\"cursor\", \"none\");\r\n\r\n //Fade out the control bar over 1500ms using opacity.\r\n $(\"#control_container\").animate({ opacity: 0 }, 1500);\r\n\r\n }", "function hideGamePanel() {\n gamePanel.style.display = \"none\";\n}", "function hide() {\r\n $('.minicolors-focus').each(function() {\r\n var minicolors = $(this);\r\n var input = minicolors.find('.minicolors-input');\r\n var panel = minicolors.find('.minicolors-panel');\r\n var settings = input.data('minicolors-settings');\r\n\r\n panel.fadeOut(settings.hideSpeed, function() {\r\n if(settings.hide) settings.hide.call(input.get(0));\r\n minicolors.removeClass('minicolors-focus');\r\n });\r\n\r\n });\r\n }", "function hideBoard2() {\n\t$(\".board2\").addClass(\"hide\");\n\t$(\".five\").removeClass(\"hide\");\n\t$(\".menutext\").text(coms.player2menu);\t\t\t\n}", "hideDrawingTool () {\n this.drawingManager.setDrawingMode(null)\n this.startedDrawing = false\n }", "function hide() {\n\t\t\tdiv.hide();\n\t\t\tEvent.stopObserving(div, 'mouseover', onMouseMove);\n\t\t\tEvent.stopObserving(div, 'click', onClick);\n\t\t\tEvent.stopObserving(document, 'click', hide);\n\t\t\tEvent.stopObserving(textarea, 'click', hide);\n\t\t\tEvent.stopObserving(textarea, 'keydown', onKeyDown);\n\t\t\tvisible = false;\n\t\t}", "function InstructionsHider() {\n $(\"div#instructionScreen\").hide();\n }", "function gameHide() {\n $('#game').hide();\n $('#actionBar').hide();\n}", "Hide() {\n if (this.UI_ID == undefined) \n return this;\n \n delete lx.GAME.UI[this.UI_ID];\n delete this.UI_ID;\n \n return this;\n }", "function queryMyWindow(win){\r\n\t\twin.query(info.selectionText);\r\n\t\tvar toHide = [\"logo\", \"word\", \"search\"];\r\n\t\tfor(var i = 0; i< toHide.length ; i ++){\r\n\t\t\tvar id = toHide[i];\r\n\t\t\tvar elem = win.document.getElementById(id);\r\n\t\t\telem.setAttribute(\"style\", \"display:none\");\r\n\t\t}\r\n\t}", "function hidePlayerControls() {\n\tif(controlsVisible) {\n\t\t$(\".playerArea\").hide(200, \"swing\");\n\t\tcontrolsVisible = false;\n\t}\n}", "function donnee_lyon(){\r\n var Lscreen=screen.width;\r\n if(Lscreen>1200){\r\n document.getElementById('info2').style.display = 'none';\r\n document.getElementById('info3').style.display = 'none';\r\n document.getElementById('no_respon_lyon').style.display = 'block';\r\n document.getElementById('no_respon_paris').style.display = 'none';\r\n }\r\n else{\r\n document.getElementById('info2').style.display = 'none';\r\n document.getElementById('info3').style.display = 'none';\r\n document.getElementById('info1').style.display = 'block';\r\n document.getElementById('no_respon_paris').style.display = 'none';\r\n }\r\n \r\n}", "hideWindow() {\n\t\tfinsembleWindow.hide();\n\t}", "function hide() {\n Onyx.set(ONYXKEYS.IS_CHAT_SWITCHER_ACTIVE, false);\n}", "hide() {\n if (this[$visible]) {\n this[$visible] = false;\n this[$updateVisibility]({ notify: true });\n }\n }", "function hide() {\n\t\t\n\t\t$('.minicolors-input').each( function() {\n\t\t\t\n\t\t\tvar input = $(this),\n\t\t\t\tsettings = input.data('minicolors-settings'),\n\t\t\t\tminicolors = input.parent();\n\t\t\t\n\t\t\t// Don't hide inline controls\n\t\t\tif( settings.inline ) return;\n\t\t\t\n\t\t\tminicolors.find('.minicolors-panel').fadeOut(settings.hideSpeed, function() {\n\t\t\t\tif(minicolors.hasClass('minicolors-focus')) {\n\t\t\t\t\tif( settings.hide ) settings.hide.call(input.get(0));\n\t\t\t\t}\n\t\t\t\tminicolors.removeClass('minicolors-focus');\n\t\t\t});\t\t\t\n\t\t\t\t\t\t\n\t\t});\n\t}", "getHidden() {\n return !this.shot.visible;\n }", "function hideLoadingView() {\n $loadScreen.hide()\n $gameBoard.show();\n\n}", "function hide() {\n canvas.style.display = \"none\";\n // eval(element + \".style.display='none'\");\n}", "function toggleVisible() {\n setVisible(false)\n\n }", "function hideResultScreen() {\n resultScreenEl.setAttribute(\"class\", \"hide\");\n}", "function hideMarkers() {\n \n for (var i = 0; i < markers.length; i++) {\n if (markers[i].visible === true) {\n markersArray()[i].setMap(map);\n } else {\n markersArray()[i].setMap(null);\n }\n }\n }", "function massHide(){\n $(\"#question, #timer, #picture, #question, #answers, #gameMessage, #tryAgain\").hide();\n}", "function hideCurrGame() {\n var currGameType = activeArray[enlarged].type;\n enlarged = \"\";\n $('main > .module').show(250);\n $(\"#mini\").fadeOut(250, function() {\n $(this).css(\"display\", \"none\");\n });\n $('#inGame').hide(250);\n $('#backbutton').fadeOut(250);\n $('#' + currGameType).css(\"display\", \"none\");\n $('#mini .gauge-fill').attr(\"class\", \"gauge-fill\");\n $('#mini .gauge-fill').height(0);\n $('#mini .module').data(\"pos\", 0);\n}", "function hideMenu() {\n // Cache la div avec l'id \"infos\" (Cache le menu)\n $(\"#infos\").hide();\n // Enlève la class \"blur\" sur la div avec l'id \"game-grid\" (Défloute l'arrière plan)\n $(\"#game-grid\").removeClass(\"blur\");\n}", "function hide() {\r\n\t\t\r\n\t\t$('.minicolors-input').each( function() {\r\n\t\t\t\r\n\t\t\tvar input = $(this),\r\n\t\t\t\tsettings = input.data('minicolors-settings'),\r\n\t\t\t\tminicolors = input.parent();\r\n\t\t\t\r\n\t\t\t// Don't hide inline controls\r\n\t\t\tif( settings.inline ) return;\r\n\t\t\t\r\n\t\t\tminicolors.find('.minicolors-panel').fadeOut(settings.hideSpeed, function() {\r\n\t\t\t\tif(minicolors.hasClass('minicolors-focus')) {\r\n\t\t\t\t\tif( settings.hide ) settings.hide.call(input.get(0));\r\n\t\t\t\t}\r\n\t\t\t\tminicolors.removeClass('minicolors-focus');\r\n\t\t\t});\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t});\r\n\t}", "function hide_extra() {\n var x = document.body;\n\n if (x.classList.contains(\"fullscreen\")) {\n var j = document.getElementById(\"night_mode\").innerHTML;\n if (j === \"Nattmodus\") {\n document.getElementById(\"expand_image\").src = \"expand.svg\";\n } else {\n document.getElementById(\"expand_image\").src = \"expand_white.svg\";\n }\n document.body.classList.remove(\"fullscreen\");\n } else {\n document.getElementById(\"expand_image\").src = \"close.svg\";\n document.body.classList.add(\"fullscreen\");\n }\n}", "function helpScreen(){\n document.getElementById(\"titleScreen\").style.visibility = \"hidden\";\n document.getElementById(\"helpScreen\").style.visibility = \"visible\";\n}", "hide() {\n this.backgroundDiv.remove();\n this.MiscDiv.remove();\n }", "function hideMuseumListings() {\n for (let i = 0; i < markersMuseum.length; i++) {\n markersMuseum[i].setMap(null);\n }\n}", "function start() {\n\nopenScreen.style.display = \"none\";\nopenScreenPTag.style.display = \"none\";\nbutton.style.display = \"none\";\n}", "hideActivities() {\n this.room2_activity1A.alpha = 0.0;\n\t// this.room2_activity1B.alpha = 0.0;\n\t// this.room2_activity1C.alpha = 0.0;\n\t// this.room2_activity1D.alpha = 0.0;\n this.room2_activity2A.alpha = 0.0;\n this.room2_activity2B.alpha = 0.0;\n\t// this.room2_activity2C.alpha = 0.0;\n\t// this.room2_activity2D.alpha = 0.0;\n this.room2_activity3A.alpha = 0.0;\n this.room2_activity3B.alpha = 0.0;\n this.room2_activity4A.alpha = 0.0;\n this.room2_activity4B.alpha = 0.0;\n\t// this.room2_activity4C.alpha = 0.0;\n\t// this.room2_activity4D.alpha = 0.0;\n\t// this.room2_activity4E.alpha = 0.0;\n this.room2_activity5A.alpha = 0.0;\n this.room2_activity5B.alpha = 0.0;\n\t// this.room2_activity5C.alpha = 0.0;\n\t// this.room2_activity5D.alpha = 0.0;\n\t// this.room2_activity5E.alpha = 0.0;\n\t// this.room2_activity5F.alpha = 0.0;\n this.room2_activity6A.alpha = 0.0;\n this.room2_activity6B.alpha = 0.0;\n this.room2_activity6C.alpha = 0.0;\n this.room2_activity6D.alpha = 0.0;\n this.room2_activity6E.alpha = 0.0;\n this.room2_activityLocked.alpha = 0.0;\n this.rightArrow.setVisible(false);\n this.leftArrow.setVisible(false);\n }", "static hide(obj) {\n obj.setAttribute('visibility', 'hidden');\n }" ]
[ "0.76082146", "0.7279854", "0.7156498", "0.70310706", "0.6749914", "0.6706334", "0.66804695", "0.6653532", "0.66523284", "0.65389687", "0.65145296", "0.64873534", "0.64788747", "0.643965", "0.6429737", "0.6397872", "0.6385218", "0.6333699", "0.6319699", "0.62949526", "0.6264103", "0.62189376", "0.61918724", "0.6133651", "0.6114867", "0.60958314", "0.6091505", "0.6076052", "0.6072494", "0.6062933", "0.6039134", "0.60263443", "0.60174197", "0.6016164", "0.6013479", "0.60025984", "0.5987994", "0.5978955", "0.5971783", "0.59611964", "0.59600914", "0.5953374", "0.59353673", "0.59320164", "0.59294623", "0.5924916", "0.5918156", "0.59165615", "0.5916411", "0.5906488", "0.5904977", "0.5882711", "0.58718777", "0.5863856", "0.58592707", "0.58405435", "0.58316", "0.58260417", "0.58150446", "0.58086604", "0.58067584", "0.5800538", "0.57891184", "0.5787065", "0.5778288", "0.57700187", "0.57691324", "0.5765213", "0.57540464", "0.5752579", "0.5746997", "0.57329273", "0.5730084", "0.5729875", "0.572813", "0.5711928", "0.5707935", "0.5703521", "0.5703021", "0.5702884", "0.5701456", "0.56891966", "0.56649977", "0.56637526", "0.5662837", "0.5660309", "0.5659672", "0.5646447", "0.56426567", "0.5640312", "0.5617957", "0.56092536", "0.560608", "0.560362", "0.5600638", "0.5600275", "0.55973804", "0.5596938", "0.5577263", "0.5577159" ]
0.8165666
0
Initializes the current screen to ready it for playing.
initializeScreen(screenNumber) { validateRequiredParams(this.initializeScreen, arguments, 'screenNumber'); let monsters = this.getMonstersOnScreen(screenNumber); for (let monster of monsters) { this.initializeMonster(monster, screenNumber); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n\t\t// reset will display start game screen when screen is designed\n\t\treset();\n\n\t\t// lastTime required for game loop\n\t\tlastTime = Date.now();\n\n\t\tmain();\n\t}", "initialize() {\n // vai pegar todas as funcoes da classe screen, coloca todos os herois na screen\n this.screen.updateImages(this.initialHeroes)\n\n // força a screen a usar o THIS de MemoryGame\n this.screen.configurePlayButton(this.play.bind(this))\n this.screen.configureCheckSelectionButton(this.checkSelection.bind(this))\n this.screen.configureButtonShowAll(this.showHiddenHeroes.bind(this))\n }", "function initialize() {\n //\n // Go through each of the screens and tell them to initialize\n for (let screen in screens) {\n if (screens.hasOwnProperty(screen)) {\n screens[screen].initialize();\n }\n }\n\n let menuButtons = document.getElementsByTagName('button');\n for (let i = 0; i < menuButtons.length; i++) {\n menuButtons[i].addEventListener('mouseenter', function(){soundSystem.buttonHover()});\n menuButtons[i].addEventListener('click', function(){soundSystem.buttonClick()});\n }\n\n\n\n\n\n //\n // Make the main-menu screen the active one\n showScreen('main-menu');\n }", "function init() {\n enablePlayAgain(reset);\n reset();\n lastTime = Date.now();\n main();\n }", "function init() {\n\t\tclearBoard();\n\t\tprintBoard(board);\n\t\ttopPlayerText.innerHTML = `- ${game.currentPlayer.name}'s turn -`;\n\t\tgame.currentPlayer = game.playerOne;\n\t\tgame.squaresRemaining = 9;\n\t\tgame.winner = false;\n\t\tclickSquares();\n\t}", "function init() {\n\t// Page elements that we need to change\n\tG.currTitleEl = document.getElementById('current-title');\n\tG.currImageEl = document.getElementById('current-image');\n\tG.currTextEl = document.getElementById('current-text');\n\tG.currChoicesEl = document.getElementById('current-choices-ul');\n\tG.audioEl = document.getElementById('audio-player');\n\t\n\t// Start a new game\n\tnewGame(G);\n}", "function Game_Screen() {\n this.initialize.apply(this, arguments);\n}", "function init() {\n //go through menus\n menus = true;\n //choosing play style\n choosingStyle = true;\n //Display text and buttons\n AI.DecidePlayStyle();\n //load the board and interactable cubes\n LoadBoard();\n LoadInteractables();\n}", "init() {\n\n this.assignPlayer();\n gameView.init(this);\n gameView.hide();\n scoreBoardView.init(this);\n registerView.init(this);\n this.registerSW();\n }", "function Init() {\n \n playGame = false;\n\n statusTab.hide();\n board.hide();\n gameEnd.hide();\n \n startButton.click(function(event) {\n event.preventDefault();\n StartPlaying();\n });\n\n resetButton.click(function(event) {\n event.preventDefault();\n RestartGame();\n });\n}", "function init() {\n setupModeButtons();\n setupSquares();\n resetGame();\n}", "start() {\n this.createBoard();\n this.pause();\n this.play();\n this.reset();\n }", "function init() {\n reset();\n menu = new GameMenu();\n /* Initialize the level */\n initLevel();\n\n lastTime = Date.now();\n main();\n }", "function init() {\n intro.style.display = \"grid\";\n winner.style.display = \"none\";\n newGame.style.display = \"none\";\n heading.style.display = \"none\";\n cards.style.display = \"none\";\n}", "initialize() {\n this.display = 0;\n this.initButtons();\n this.initClipBoard();\n this.pasteFromClipBoard();\n this.initDblClick();\n }", "function init() {\n\tdocument.getElementById(\"play\").blur();\n\t//call function inside the object to start the game\n\tmyGame.start();\n}", "loaded() {\n me.pool.register('player', game.Player);\n me.pool.register('enemy', game.Enemy);\n me.pool.register('laser', game.Laser);\n\n me.state.WIN = me.state.USER + 1;\n me.state.LOSE = me.state.USER + 2;\n me.state.LEVEL_1 = me.state.USER + 3;\n me.state.LEVEL_2 = me.state.USER + 4;\n me.state.LEVEL_3 = me.state.USER + 5;\n me.state.LEVEL_4 = me.state.USER + 6;\n\n // set the \"Play/Ingame\" Screen Object\n this.level1 = new game.PlayScreen();\n this.level2 = new game.PlayScreen(2, 'teal');\n this.level3 = new game.PlayScreen(3, 'orange');\n this.level4 = new game.PlayScreen(4, '#49B');\n\n this.winScreen = new game.WinScreen();\n this.loseScreen = new game.LoseScreen();\n\n me.state.set(me.state.LEVEL_1, this.level1);\n me.state.set(me.state.LEVEL_2, this.level2);\n me.state.set(me.state.LEVEL_3, this.level3);\n me.state.set(me.state.LEVEL_4, this.level4);\n\n me.state.set(me.state.WIN, this.winScreen);\n me.state.set(me.state.LOSE, this.loseScreen);\n\n // start the game\n me.state.change(me.state[`LEVEL_${store.getState().level}`]);\n }", "function startSetupScreen() {\n playAudioSelectBtn();\n startScreen.classList.remove('active');\n startSetup.classList.add('active');\n startGameBtn.addEventListener('click', loadInit);\n}", "bootUp() {\n // get all functuions of screen class\n // put all heroes in screen/visible\n this.screen.updateImages(this.earlyHeroes)\n // bind(this) -> force screen to use THIS of the GameManager\n this.screen.configurePlayButton(this.play.bind(this))\n this.screen.configureVerifySelectionButton(this.verifySelection.bind(this))\n }", "function init() {\r\n // Hide the loading bar\r\n const loading = document.getElementById('loading');\r\n loading.style.display = 'none';\r\n\r\n // Show canvas (initially hidden to show loading)\r\n canvas.style.display = 'inherit';\r\n\r\n // Add listener on window resize\r\n window.addEventListener('resize', resizeCanvas, false);\r\n // Adapt canvas size to current window\r\n resizeCanvas();\r\n\r\n // Add static models to the scene\r\n addStaticModels();\r\n\r\n // Show Play button\r\n const play = document.getElementById('playBtn');\r\n play.style.display = 'inherit';\r\n\r\n play.onclick = function () {\r\n // Create audio context after a user gesture\r\n const audioCtx = new AudioContext();\r\n\r\n // Create an AudioListener and add it to the camera\r\n listener = new THREE.AudioListener();\r\n camera.add(listener);\r\n\r\n // Hide Play button and start the game\r\n play.style.display = \"none\";\r\n start();\r\n }\r\n }", "function init() {\n setCircleVisibility(false);\n isPlayingGame = false;\n id(\"start-button\").addEventListener(\"click\", () => {\n isPlayingGame = !isPlayingGame;\n if (isPlayingGame) {\n startGame();\n } else {\n endGame();\n }\n });\n id(\"game-frame\").style.borderWidth = FRAME_BORDER_PIXELS + \"px\";\n }", "function initialize() {\n console.log('game initializing...');\n\n document\n .getElementById('game-quit-btn')\n .addEventListener('click', function() {\n network.emit(NetworkIds.DISCONNECT_GAME);\n network.unlistenGameEvents();\n menu.showScreen('main-menu');\n });\n\n //\n // Get the intial viewport settings prepared.\n graphics.viewport.set(\n 0,\n 0,\n 0.5,\n graphics.world.width,\n graphics.world.height\n ); // The buffer can't really be any larger than world.buffer, guess I could protect against that.\n\n //\n // Define the TiledImage model we'll be using for our background.\n background = components.TiledImage({\n pixel: {\n width: assets.background.width,\n height: assets.background.height,\n },\n size: { width: graphics.world.width, height: graphics.world.height },\n tileSize: assets.background.tileSize,\n assetKey: 'background',\n });\n }", "function initialize() {\n setupModeButtons();\n setupSquares();\n reset();\n}", "function init() {\r\n\t\t\t// if there is an override stream, set it to the current stream so that it plays upon startup\r\n\t\t\tif (self.options.overrideStream) {\r\n\t\t\t\tsetCurrentStream(self.options.overrideStream);\r\n\t\t\t}\r\n\t\t\tif (self.options.config && self.options.config.length > 0) {\r\n\t\t\t\tloadConfiguration();\r\n\t\t\t} else {\r\n\t\t\t\tinitializePlayer();\r\n\t\t\t}\r\n\t\t}", "function init() {\n setUpModeButtons();\n setUpSquares();\n reset();\n}", "async function init() {\n\n registerScreens(store, Provider);\n Navigation.startSingleScreenApp({\n screen: {\n screen: 'MAIN',\n title: ' ',\n navigatorStyle: {\n statusBarColor: 'black',\n statusBarTextColorScheme: 'light',\n navBarBackgroundColor: 'black',\n navBarTextColor: 'white',\n navBarButtonColor: 'white',\n tabBarButtonColor: 'red',\n tabBarSelectedButtonColor: 'red',\n tabBarBackgroundColor: 'white',\n backButtonHidden: true,\n },\n },\n animationType: 'slide-down', // optional, add transition animation to root change: 'none', 'slide-down', 'fade'\n });\n}", "function initScreen() {\n clearScreen();\n drawGrid();\n drawBlocks();\n hideElement(\"tryAgainLabel\");\n setChecked(\"notCrashButton\", true);\n setChecked(\"crashButton\", false);\n setText(\"codeButton\", \"Hide Code\");\n resetPointer();\n drawPointer();\n moveTo(1000,1000); // moves turtle off the screen\n penUp();\n}", "initiate() {\n this.#buildStartGameButton();\n this.#buildhowToPlayButton();\n this.#buildAboutButton();\n this.#startHeaderAnimation();\n }", "function init() {\n stage = new createjs.Stage(document.getElementById(\"canvas\"));\n stage.enableMouseOver(30);\n createjs.Ticker.setFPS(60);\n createjs.Ticker.addEventListener(\"tick\", gameLoop);\n this.soundtrack = createjs.Sound.play('soundtrack', createjs.Sound.INTERRUPT_NONE, 0, 0, -1, 1, 0);\n optimizeForMobile();\n\n currentState = constants.MENU_STATE;\n changeState(currentState);\n}", "function init() {\n // get a referene to the target <canvas> element.\n if (!(canvas = document.getElementById(\"game-canvas\"))) {\n throw Error(\"Unable to find the required canvas element.\");\n }\n\n // resize the canvas based on the available browser available draw size.\n // this ensures that a full screen window can contain the whole game view.\n canvas.height = (window.screen.availHeight - 100);\n canvas.width = (canvas.height * 0.8);\n\n // get a reference to the 2D drawing context.\n if (!(ctx = canvas.getContext(\"2d\"))) {\n throw Error(\"Unable to get 2D draw context from the canvas.\");\n }\n\n // specify global draw definitions.\n ctx.fillStyle = \"white\";\n ctx.textAlign = \"center\";\n\n // set the welcome scene as the initial scene.\n setScene(welcomeScene);\n }", "function init() {\n\t\tscore = 0;\n\t\tclearScreen();\n\t\tspeed = DEFAULT_SPEED;\n\t\twell = new gameWell();\n\t\tactBlock = newActBlock();\n\t\tactBlock.draw();\n\t\tnextBlock.draw();\n\t}", "initContext (mode) {\n this._screenDispatcher = new ScreenDispatcher(constant.SCR_INITIAL)\n this._screenDispatcher.register(constant.SCR_INITIAL, new InitialScreen())\n this._screenDispatcher.register(constant.SCR_SELECT_MODE, new SelectModeScreen())\n this._screenDispatcher.register(constant.SCR_PLAYING, new PlayingScreen())\n this._screenDispatcher.register(constant.SCR_GAMEOVER, new GameOverScreen())\n this._needleSelection = new NeedleSelection()\n this._threadSelection = new ThreadSelection()\n this._gameOverSelection = new GameOverSelection()\n this._pauseSelection = new PauseSelection()\n this._pressStartSelection = new PressStartSelection()\n this._initialTransparentRect = new InitialTransparentRect()\n this._levelUpSelection = new LevelUpSelection()\n this._selectModeScreenSelection = new SelectModeScreenSelection()\n this._statusSelection = new StatusSelection(mode)\n\n this._ctx = this._getInitVars(mode)\n this._statusSelection.setMode(mode)\n this._prevUpdatedTime = Date.now()\n this._selectedMode = mode\n }", "function gameInit() {\r\n // disable menu when right click with the mouse.\r\n dissRightClickMenu();\r\n resetValues();\r\n // switch emoji face to normal.\r\n switchEmoji();\r\n gBoard = createBoard(gLevel.SIZE);\r\n renderBoard(gBoard);\r\n}", "play() {\n\t\tstaticCache.defouloir.play();\n\t\tthis._width = 1280; // TODO: remove\n\t\tthis._height = 720; // TODO: remove\n\t\tthis._player = new Player(this, this._width / 2, 0, \"Amos\");\n\t\tthis._interface = new Interface(this, this._player);\n\t\tthis._line = new DeathLine(this);\n\t\tthis._platforms = [];\n\t\tthis._bonuses = [];\n\t\tthis._decorations = [];\n\t\tthis._platformGenerator = new PlatformGenerator(this, this._player);\n\t\tthis._bonusGenerator = new BonusGenerator(this);\n\t\tthis._decorationGenerator = new DecorationGenerator(this, this._player);\n\t\tthis._color = \"#1e3514\";\n\t\tthis._select = initButton(true);\n\t\tthis._start = initButton(true);\n\t}", "constructor() {\n this.canvas = Board.screenCanvas;\n this.animations = [];\n }", "function Init() { \n board.resetBoard(); \n if(board.gameMode === SINGLE_PLAYER && board.playerTurn === CPU) {\n board.aiTurn();\n board.changeTurn(); \n } \n Drawer.Draw(board);\n}", "function initialize(){\n playing=true;\n lhor=false;\n lver=false;\n victory=false;\n turns=0;\n}", "function StartScreen() {\n return _super.call(this) || this;\n }", "function initGame(){\n // Bind the keys for the title screen\n bindTitleKeys();\n\n // Initialize the audio helper\n audioHelper = new AudioHelper(audioHelper ? audioHelper.isMuted() : false);\n\n audioHelper.stopGameMusic();\n // Play the intro music\n audioHelper.startIntroMusic();\n\n // Setup the title screen\n titleScene.visible = true;\n gameScene.visible = false;\n gameOverScene.visible = false;\n renderer.backgroundColor = GAME_TITLE_BACKGROUND_COLOR;\n\n // Set the game state\n gameState = title;\n}", "init() {\n this.timerSlide();\n this.nextClick();\n this.previousClick();\n this.breakSlide();\n this.playSlide();\n this.keybord();\n }", "function init()\r\n{\r\n\tconsole.log('init');\r\n\tinitView(); \t\r\n OSnext(); \r\n \t \t\t\r\n// \tdeleteGame();\r\n// \tloadGame();\r\n// \t\r\n// \tif (game==null) {\r\n// \t\tstartNewGame();\r\n// \t} else {\r\n// \t UI_clear(); \r\n// \t UI_closeOverlay(); \r\n// \t UI_hideActions();\r\n// \t \tUI_hideCard();\r\n// \t UI_updateFront('Sinai');\r\n// \t UI_updateFront('Mesopotamia');\r\n// \t UI_updateFront('Caucasus');\r\n// \t UI_updateFront('Arab');\r\n// \t UI_updateFront('Gallipoli');\r\n// \t UI_updateFront('Salonika');\r\n// \t UI_updateNarrows();\r\n// \t UI_updateCounters();\t\t\t\r\n// \t\tconsole.log('loaded previous game');\r\n// \t}\r\n\t\t \r\n}", "function init() {\n\t\tscore = 0;\n\t\tdirection = \"right\";\n\t\tsnake_array = [];\n\t\tcreate_snake();\n\t\tmake_food();\n\t\tactiveKeyboard();\n\t\t$(\"#message\").css(\"display\",\"none\");\n\t\tgame_loop = setInterval(paint,100);\n\t}", "function init() {\n\n\t// initial global variables\n\ttime = 0;\n\ttotalPlay = 0;\n\tplayed = [];\n\tstop = false;\n\tstarted = true;\n\tnumLife = 3;\n\n\t// set contents and start the timer\n\tsetScenario();\n\ttimer.text(time);\n\tlife.text(numLife);\n\tcountTime();\n}", "function initialize() {\n var element = new Quiz();\n element.newScreen();\n}", "_init(){\n // clear the squares\n\t\tthis.squares.each(function(){\n\n\t\t\t$(this).html('');\n\n\t\t});\n \n // Reset the game states...\n\t\tthis.gameBoard = [null, null, null, null, null, null, null, null, null]; \n\t\tthis.currentPlayer = 'X';\n\t\tthis.isGameOver = false;\n\t\tthis.numberOfPlayedSquares = 0;\n \n }", "function init() {\r\n player.poster = posters[currentSource];\r\n player.src = sources[currentSource];\r\n player.width = 1920;\r\n player.height = 1080;\r\n player.load();\r\n progress.hide();\r\n progress.reset();\r\n }", "init() {\n this.isCanvasSupported() ? this.ctx = this.canvas.getContext('2d') : false;\n\n if (this.ctx) {\n this.playBtn.addEventListener('click', () => {\n this.playBtn.classList.add('active');\n this.startTheGame();\n });\n\n this.retryBtn.addEventListener('click', () => {\n this.reset();\n this.retryBtn.classList.add('inactive');\n this.startTheGame();\n });\n }\n }", "function initScreen()\n {\n cmd.get('omxiv -b ' + splashImage);\n }", "function Start() {\n\tscreenRect = Rect(0,0,Screen.width, Screen.height);\n}", "function _initialize() {\n\n // var playersPromise = $players.get();\n if($stateParams && !!$stateParams.userToken) {\n $user.setUserToken($stateParams.userToken);\n }\n\n if($user.isAuthenticated()) {\n var playersPromise = $players.get();\n if ($storage.getNextUrl()) {\n // console.log('splash: next url found', $storage.getNextUrl());\n setTimeout(function () {\n $state.go($storage.getNextUrl());\n }, 3500);\n } else {\n // console.log('splash: next url not found');\n playersPromise.then(function() {\n return $user.getPicks();\n }, function(errResponse) {\n console.log(errResponse);\n window.location = 'http://3pak.com';\n })\n .then(function(picks) {\n if(picks.picks.length === 3) {\n targetState = 'dashboard';\n } else {\n targetState = 'draft';\n }\n }, function(errResponse) {\n console.log(errResponse);\n window.location = 'http://3pak.com';\n })\n .then(_nextScreen);\n }\n } else {\n _nextScreen();\n }\n }", "function init() {\r\n\t/* Globals initialisation */\r\n\tset_globals();\r\n\t\r\n\t/* Retrieving top scores from database */\r\n\tretrieves_top_scores();\r\n\t\r\n\t/* Loading musics */\r\n\tload_musics()\r\n\t\r\n\t/* Drawing menu */\r\n\tdraw_menu_background();\r\n\t\r\n\t/* Images loading */\r\n\tset_images();\r\n\t\r\n\t/* A boom is heard when the mainSquare dies */\r\n\tset_boom_sound();\r\n\t\r\n\t/* Buttons creation */\r\n\tset_buttons();\r\n}", "function initGame(){\n resetGameStats()\n setLevel()\n gBoard = buildBoard()\n renderBoard(gBoard)\n gGame.isOn = true\n\n}", "function startGame() {\n gameScreen=1;\n}", "function initScreen() {\n\tstartScreen = \"<p class='text-center introText'>Through this trivia game you'll test your knowledge about Jon,<br> and perhaps learn a thing or three.<a class='btn btn-danger btn-lg btn-block start-button' role='button'>Start Quiz</a></p>\";\n\t$(\".mainArea\").html(startScreen);\n}", "init() {\n\t\tif (this.isStart) {\n\t\t\tthis.world = new World(this.ctx);\n\t\t\tthis.world.init();\n\n\t\t\tthis.ctx.drawImage(flappyBird, 69, 100, FLAPPY_BIRD_WIDTH, FLAPPY_BIRD_HEIGHT);\n\t\t\tthis.ctx.drawImage(birdNormal, 120, 145, BIRD_WIDTH, BIRD_HEIGHT);\n\t\t\tthis.ctx.drawImage(getReady, 72, 220, GET_READY_WIDTH, GET_READY_HEIGHT);\n\t\t\tthis.ctx.drawImage(tap, 72, 300, TAP_WIDTH, TAP_HEIGHT);\n\n\t\t\tthis.ctx.font = '500 30px Noto Sans JP';\n\t\t\tthis.ctx.fillStyle = 'white';\n\t\t\tthis.ctx.fillText('Click To Start', 60, 450);\n\n\t\t\tthis.getHighScore();\n\t\t\tthis.drawScore();\n\n\t\t\tthis.container.addEventListener('click', this.playGame);\n\t\t}\n\t}", "function init() {\n lobby.init();\n game.init();\n}", "function begin() {\n\tbackgroundBox = document.getElementById(\"BackgroundBox\");\n\n\tbuildGameView();\n\tbuildMenuView();\n\n\tinitSFX();\n\tinitMusic();\n\n\tENGINE_INT.start();\n\n\tswitchToMenu(new TitleMenu());\n\t//startNewGame();\n}", "function init() {\n\t\t\t// Mount all riot tags\n\t\t\triot.mount('loadingscreen');\n\t\t\triot.mount('applauncher');\n\n\t\t\t//window.wm.mode = 'exposeHack';\n //window.wm.mode = 'default';\n\t\t}", "function init() {\n if (game.init())\n game.start();\n}", "function initGame() {\r\n renderLevels()\r\n gGame = {\r\n isOn: true,\r\n isFirstClick: true,\r\n\r\n }\r\n gBoard = buildBoard();\r\n renderBoard(gBoard);\r\n startTimer()\r\n\r\n}", "function init() {\n stage = new createjs.Stage(document.getElementById(\"canvas\"));\n stage.enableMouseOver(30);\n createjs.Ticker.setFPS(60);\n createjs.Ticker.addEventListener(\"tick\", gameLoop);\n optimizeForMobile();\n //set the current game staate to MENU_STATE\n currentState = constants.MENU_STATE;\n changeState(currentState);\n}", "onload() {\n // Initialize the video.\n if (!me.video.init(640, 480, {wrapper : \"screen\", scale : 'auto'})) {\n alert(\"Your browser does not support HTML5 canvas.\");\n return;\n }\n\n // add \"#debug\" to the URL to enable the debug Panel\n if (me.game.HASH.debug === true) {\n window.onReady(() => {\n me.plugin.register.defer(this, me.debug.Panel, \"debug\", me.input.KEY.V);\n });\n }\n\n // Initialize the audio.\n me.audio.init(\"mp3,ogg\");\n\n // Set a callback to run when loading is complete.\n me.loader.onload = this.loaded.bind(this);\n\n // Load the resources.\n me.loader.preload(game.resources);\n\n // Initialize melonJS and display a loading screen.\n me.state.change(me.state.LOADING);\n }", "function initGame() {\n gBoard = buildBoard(gLevel);\n renderBoard();\n}", "start(){\n if(gameState===0){\n player = new Player();\n player.getCount();\n\n form = new Form()\n form.display();\n }\n }", "function __initGame() {\n\n __HUDContext = canvasModalWidget.getHUDContext();\n\n __showTitleScreen();\n __bindKeyEvents();\n\n // reset the FPS meter\n canvasModalWidget.setFPSVal(0);\n\n __resetGame();\n\n return __game;\n }", "function init() {\n stage = new createjs.Stage(document.getElementById(\"canvas\"));\n stage.enableMouseOver(30);\n createjs.Ticker.setFPS(60);\n createjs.Ticker.addEventListener(\"tick\", gameLoop);\n optimizeForMobile();\n\n currentState = constants.MENU_STATE;\n changeState(currentState);\n}", "setup() {\n\t\tthis.stage.removeAllChildren();\n\t\tthis.initBackground();\n\t\tthis.initReceptors();\n\t\tthis.initNotetrack();\n\t\tthis.initStats();\n\t\tthis.initTimeline();\n\t\tthis.initBackButton();\n\t}", "function loadGameScreen () {\n /* reset all of the player's states */\n for (var i = 1; i < players.length; i++) {\n gameDisplays[i-1].reset(players[i]);\n }\n $gameLabels[HUMAN_PLAYER].removeClass(\"loser tied current\");\n clearHand(HUMAN_PLAYER);\n\n previousLoser = -1;\n recentLoser = -1;\n gameOver = false;\n\n $gamePlayerCardArea.show();\n $gamePlayerCountdown.hide();\n $gamePlayerCountdown.removeClass('pulse');\n chosenDebug = -1;\n updateDebugState(showDebug);\n \n /* randomize start lines for characters using legacy start lines.\n * The updateAllBehaviours() call below will override this for any\n * characters using new-style start lines.\n *\n * Also go ahead and commit any marker updates from selected lines.\n */\n players.forEach(function (p) {\n if(p.chosenState) {\n p.commitBehaviourUpdate();\n }\n }.bind(this));\n\n updateAllBehaviours(null, null, GAME_START);\n updateBiggestLead();\n\n /* set up the poker library */\n setupPoker();\n preloadCardImages();\n\n /* disable player cards */\n for (var i = 0; i < $cardButtons.length; i++) {\n $cardButtons[i].attr('disabled', true);\n }\n\n /* enable and set up the main button */\n allowProgression(eGamePhase.DEAL);\n}", "start()\r\n {\r\n if(gameState===0)\r\n {\r\n player= new Player();\r\n player.getCount();\r\n\r\n form= new Form();\r\n form.display();\r\n }\r\n }", "function init() {\r\n var levelData = document.querySelector('input[name=\"level\"]:checked')\r\n gLevel.size = levelData.getAttribute('data-inside');\r\n gLevel.mines = levelData.getAttribute('data-mines');\r\n gLevel.lives = levelData.getAttribute('data-lives');\r\n var elHints = document.querySelector('.hints')\r\n elHints.innerText = 'hints: ' + HINT.repeat(3)\r\n var elButton = document.querySelector('.start-button')\r\n elButton.innerText = NORMAL\r\n document.querySelector('.timer').innerHTML = 'Time: 00:00:000'\r\n gBoard = createBoard()\r\n clearInterval(gTimerInterval);\r\n gGame = { isOn: false, shownCount: 0, markedCount: 0, isFirstClick: true, isHintOn: false }\r\n renderBoard()\r\n renderLives()\r\n}", "function startScreen() {\n mainContainer.append(startButton)\n }", "function Screen(stage) {\n this.stage = stage;\n this.screenObjects = [];\n }", "function start(){\n initializeBoard();\n playerTurn();\n }", "function initialize() {\r\n _('initialize');\r\n //check for black bar.\r\n if ($ == undefined) {\r\n reinitialize();\r\n }\r\n findtopbar();\r\n if (!status.topbarfound) {\r\n reinitialize();\r\n }\r\n createcss(); //create style elements\r\n if (streamsready()) {\r\n streamchanged(); //try starting up\r\n } else {\r\n _W('streams not ready. reinit.');\r\n reinitialize();\r\n }\r\n }", "function onDisplayReady() {\n exports.startFromIndex(sozi.location.getFrameIndex());\n\n // Hack to fix the blank screen bug in Chrome/Chromium\n // See https://github.com/senshu/Sozi/issues/109\n window.setTimeout(display.update, 1);\n }", "function initialize() {\n $('#cascade').click(function (e) {\n refreshTiles();\n e.preventDefault();\n });\n\n $('#pause').click(function (e) {\n updateLoop.stop();\n e.preventDefault();\n });\n\n $('#resume').click(function (e) {\n updateLoop.start();\n e.preventDefault();\n });\n\n updateTileSettings();\n updateTilePlacement();\n\n updateLoop.start();\n }", "function run () { \n if (m.debug > m.NODEBUG) { console.log('screens.menuScreen.run'); }\n\n // one-time initialization\n if (needsInit) {\n // draw logo\n var $canvasBox = $('#menuLogoBox');\n m.logo.drawLogo($canvasBox, false, 0, 0, 0);\n \n $('#menuScreen button')\n // navigate to the screen stored in the button's data\n .click( function (event) {\n var nextScreenId = $(event.target).data('screen');\n m.screens.showScreen(nextScreenId);\n }\n );\n \n // redraw logo when window is resized\n $(window)\n .resize(function (event) {\n $canvasBox.empty();\n m.logo.drawLogo($canvasBox, false, 0, 0, 0);\n }\n );\n }\n needsInit = false;\n \n // Turn off sounds, game loop and mouse event handling in game screen\n m.Audio.beQuiet();\n m.gameloop.setLoopFunction(null);\n m.playtouch.unhookMouseEvents();\n \n \n }", "function initializeScreen() {\n var vHP;\n hideElements('#idDefender');\n hideElements('#idEnimiesAvailable');\n $(\"#idEnemiesHeader\").hide();\n $(\"#idDefenderHeader\").hide();\n $(\"#idFightSection\").hide();\n $('#idYourCharacter').children().each( function(index){ \n vHP=$(this).children('.charValue').attr('data-hp-value') ;\n $(this).children('.charValue').text(vHP);\n $(this).show();\n });\n \n $('#idMessage').text(\"\");\n mouseClickBaseChar=true;\n mouseClickEnemyChar=false;\n mouseClickAttack=false;\n vBaseCharacter=\"\";\n vDefenderCharacter=\"\";\n vCounter=0;\n numberOfEnemies=0;\n\n }", "function init() {\n stage = new createjs.Stage(document.getElementById(\"gameCanvas\"));\n game = new createjs.Container();\n stage.enableMouseOver(20);\n createjs.Ticker.setFPS(60);\n createjs.Ticker.addEventListener(\"tick\", gameLoop);\n optimizeForMobile();\n\n // When game begins, current state will be opening menu (MENU_STATE)\n //scoreboard = new objects.scoreBoard(stage, game);\n currentState = constants.MENU_STATE;\n changeState(currentState);\n}", "start() {\r\n //if the game state is in wait state(gamestate=0) we are creating a player object and a form object\r\n if(gameState === 0) {\r\n player = new Player();\r\n player.getCount();\r\n\r\n form = new Form();\r\n form.display();\r\n \r\n }\r\n }", "function init_screen()\n {\n $(\"#owl-screenshots\").owlCarousel(\n {\n autoPlay: 3000,\n items: 3,\n itemsDesktop: [1200, 3],\n itemsDesktopSmall: [991, 3],\n itemsTablet: [768, 2],\n itemsMobile: [480, 1],\n slideSpeed: 900,\n navigation: true,\n navigationText: [\n '<i class=\"fa fa-arrow-left\"></i>',\n '<i class=\"fa fa-arrow-right\"></i>'\n ],\n\n pagination: false\n });\n }", "function preInitialize() {\n preInitialization.style.display = 'block';\n game.style.display = 'none';\n}", "function _init() {\n\t\t\t// Trigger a few events so the bar looks good on startup.\n\t\t\t_timeHandler({\n\t\t\t\tid: api.id,\n\t\t\t\tduration: api.jwGetDuration(),\n\t\t\t\tposition: 0\n\t\t\t});\n\t\t\t_bufferHandler({\n\t\t\t\tid: api.id,\n\t\t\t\tbufferProgress: 0\n\t\t\t});\n\t\t\t_muteHandler({\n\t\t\t\tid: api.id,\n\t\t\t\tmute: api.jwGetMute()\n\t\t\t});\n\t\t\t_stateHandler({\n\t\t\t\tid: api.id,\n\t\t\t\tnewstate: jwplayer.api.events.state.IDLE\n\t\t\t});\n\t\t\t_volumeHandler({\n\t\t\t\tid: api.id,\n\t\t\t\tvolume: api.jwGetVolume()\n\t\t\t});\n\t\t}", "async onInitialize() {\n G.audio.playBGM('bgm/voltexes-ii.mp3');\n // backgrounds\n this.stage.addChild(G.graphics.createImage('graphics/music-select-bg.jpg', {\n position: 'center',\n size: 'cover'\n }));\n // darken shadow\n this.stage.addChild(G.graphics.createRect({\n top: 0,\n left: 0,\n width: 9999,\n height: 9999,\n background: 0x000000,\n opacity: 0.5\n }));\n if (!G.musics) {\n // loading text\n this.stage.addChild(this.loadingTextSprite = G.graphics.createText('Loading music list...', {\n fontSize: 24\n }, (w, h, self) => ({\n x: 0.5 * (w - self.width),\n y: 0.5 * (h - self.height)\n })));\n const res = await fetch('api/musics.json');\n if (res.ok) {\n G.musics = await res.json();\n this.stage.removeChild(this.loadingTextSprite);\n } else {\n console.error(`Get music info failed, code ${res.status}.`); // eslint-disable-line no-console\n }\n }\n // mode text\n const modeText = {\n 'play': 'Choose a song to play!',\n 'edit': 'Use your imagination!'\n };\n this.stage.addChild(G.graphics.createText(`Mode: ${G.mode}\\n${modeText[G.mode]}`, {}, { x: 20, y: 20 }));\n // music list sprite\n this.stage.addChild(this.musicListSprite = G.graphics.createSprite({ x: 0, y: 0 }));\n // load last select music\n if (G.lastSelectMusic !== -1) {\n this.selected = G.lastSelectMusic;\n }\n this.buildMusicSprites();\n }", "init (ctx) {\n this.ctx = ctx;\n this.pause = false;\n this.surfaceWidth = this.ctx.canvas.width;\n this.surfaceHeight = this.ctx.canvas.height;\n this.startInput();\n\n console.log('game initialized');\n }", "function startScreen() {\n screenWin.style.display = 'none';\n board.style.display = 'none';\n}", "start(){\n if (this.scene.reset == true) {\n if (this.gameCount > 0 && this.model.playsCoords.length > 0) {\n this.undoAllPlays();\n this.state = 'SMALL_WAIT';\n }\n else {\n this.state = 'UPDATE_CONFIGS';\n }\n this.restart_values();\n this.gameCount++;\n }\n }", "function initiateGame(){\n\n\t$( document ).ready( function() {\n\t\t\n\t\t$( '#display' ).html('<button>' + 'start' + '</button>');\n\t\t$( '#display' ).attr('start', 'start');\n\t\t$( '#display' ).on( 'click', function() {\n\t\t\trenderGame();\n\t\t})\n\t\t\n\t});\n}", "function initialiseGame() {\n enableAnswerBtns();\n hideGameSummaryModal();\n showGameIntroModal();\n selectedStories = [];\n score = 0;\n round = 1;\n resetGameStats();\n}", "function Screen() {\r\n}", "function init() {\n \"use strict\";\n \n resizeCanvas();\n \n background = new CreateBackground();\n Player = new CreatePlayer();\n \n if (window.innerHeight <= 768) {\n background.setup(resources.get(imgFileBackground_small));\n } else {\n background.setup(resources.get(imgFileBackground));\n }\n\n gameArray.splice(0,gameArray.length);\n \n // HTML Components\n htmlBody.addEventListener('keydown', function() {\n uniKeyCode(event);\n });\n \n btnNewGame.addEventListener('click', function() {\n setGameControls(btnNewGame, 'new');\n }); \n \n btnPauseResume.addEventListener('click', function() {\n setGameControls(btnPauseResume, 'pauseResume');\n }); \n \n btnEndGame.addEventListener('click', function() {\n setGameControls(btnEndGame, 'askEnd');\n }); \n \n btnOptions.addEventListener('click', function() {\n setGameControls(btnOptions, 'options');\n });\n \n btnJournal.addEventListener('click', function() {\n setGameControls(btnJournal, 'journal');\n }); \n \n btnAbout.addEventListener('click', function() {\n setGameControls(btnAbout, 'about');\n });\n \n window.addEventListener('resize', resizeCanvas);\n \n setGameControls(btnNewGame, \"init\");\n \n }", "function initialiseGame() {\n // Hides start panel and GitHub icon, shows direction buttons, plays audio\n document.getElementById(\"start-panel\").classList.toggle(\"hidden\");\n document.getElementById(\"bottom-banner\").classList.toggle(\"hidden\");\n document.getElementById(\"github\").classList.toggle(\"hidden\");\n document.getElementById(\"start\").play();\n document.getElementById(\"music\").play();\n\n // Generates new Sprite object per array iteration and maintains Sprite numbers to numberOfSprites\n for (var i = 0; i < numberOfSprites; i++) {\n spritesArray[i] = new Sprite(\n centreOfX,\n centreOfY,\n Math.random() * cnvsWidth\n );\n }\n\n // Triggers main loop animations\n update();\n}", "initialize() {\n this._initializeButtons();\n this._initializeLock();\n this._initializeWindowsTransparency();\n this.settings.initialize();\n\n this.updateWindowHeight();\n }", "function initializeGame() {\n const startBtn = document.querySelector(\"#start-button\")\n startBtn.addEventListener('click', changeScreen)\n const game_buttons = document.querySelectorAll('.game-inputs')\n game_buttons.forEach(button => button.addEventListener('click', playGame))\n}", "function initMainScreen() {\n //Initialize the user list for \"Contacts\" tab\n initContactList();\n\n //Initialize the chat list for \"Chats\" tab\n initChatList();\n\n // now show the side panel icon\n $('.rightSidePaneBtnDiv').show();\n}", "function init() {\n\t// Load the video data and populate the array of all video IDs\n\t$.getJSON('vids.json', function(data) {\n\t\tfor (var i=0;i<data.vids.length;i++) {\n\t\t\tif(i%2==0) {\n\t\t\t\tvid_array[(i/2)+1] = data.vids[i];\n\t\t\t}\n\t\t}\n\t\tswitchToVideo(vid_array.length-1);\n\t\tswitchToPage(1);\n\t\tchangeNowPlaying(vid_array.length-1);\n\t\tpopulatePages();\n\t\t$('#page-1').addClass('current-page');\n\t\t$('#scriptless').remove();\t\t\n\t}); \n}", "init()\n {\n // Unblock the menu messaging and activate needed trees\n menuManager.allowEventHandling = true;\n menuManager.activateTree( ['pause_tree', 'base_game_tree'] );\n \n // Do any strategy inits mostly for fonts\n spriteStrategyManager.init();\n \n // Get the win meter\n this.winMeter = menuManager.getMenuControl( 'base_game_ui', 'win_meter' );\n this.winMeter.clear();\n \n // Create the multiplier\n this.multiIndexPos = genFunc.randomInt(0, this.multiXPosAllAry.length-1);\n this.strawberryData.pos.x = this.multiXPosAllAry[this.multiIndexPos];\n this.spriteStrategy.create( 'strawberry', STRAWBERRY );\n \n // Reset the elapsed time before entering the render loop\n highResTimer.calcElapsedTime();\n \n requestAnimationFrame( this.callback );\n }", "init(screens) {\n this.screensList_ = screens;\n this.screensSelected = [];\n this.selectedScreensCount = 0;\n }", "function init() {\n\t// set HTML element variables\n\tcard = document.getElementById(\"card\");\n\t/*cardTxt = document.getElementById(\"cardTxt\");\n\tosCard = document.getElementById(\"osCard\");*/\n//\tosCard.style.left = (window.innerWidth + 5000) + \"px\";\n\tdocument.getElementById(\"nextCardBtn\").disabled = false;\n\tdocument.getElementById(\"restartBtn\").style.WebkitBoxShadow = \"none\";\n\t\n\t// load all other settings\n\tloadSettings();\n\t\n\tsetTimeout(loadLists, 1);\n\t\n\tdocument.addEventListener(\"keydown\", keyPressed, true);\n}", "function startScreen() {\n\t// make lines slightly thicker\n\tctx.lineWidth = 2;\n\n\tctx.clearRect(0, 0, gameWidth, gameHeight + 300);\n\n\tctx.strokeStyle = 'white';\n\tctx.fillStyle = 'white';\n\tctx.font = \"56px 'Press Start 2P'\";\n\n\tctx.strokeRect(0, 0, gameWidth, gameHeight);\n\n\t// Score\n\tctx.textAlign = 'center';\n\tctx.fillText(`Jump Man II:`, gameWidth / 2, (gameHeight / 2) - 100);\n\tctx.font = \"32px 'Press Start 2P'\";\n\tctx.fillText(`Revenge of the Hurdles`, gameWidth / 2, (gameHeight / 2));\n\n\tctx.font = \"24px 'Press Start 2P'\";\n\tctx.fillText(`Press space to start`, gameWidth / 2, (gameHeight / 2) + 150);\n\n\tif (keys[32]) {\n\t\tscreenDisplay = false;\n\t}\n\n\t// Run the game!\n\trequestAnimationFrame(update);\n}", "function init() {\n drawBoard(size);\n buildBoardArray(size);\n initDiscs(size);\n copyBoardArrayToDrawBoard();\n closeMenu();\n}" ]
[ "0.73392546", "0.72611344", "0.68600833", "0.6799272", "0.66857326", "0.6666656", "0.66487676", "0.66453093", "0.66191334", "0.6599859", "0.65553117", "0.6541555", "0.64878327", "0.64472723", "0.6444534", "0.6442143", "0.64371455", "0.64132047", "0.63896555", "0.6378538", "0.63520557", "0.63442296", "0.6341872", "0.6338846", "0.6316195", "0.6298511", "0.62949646", "0.6288371", "0.62821937", "0.6278601", "0.6269639", "0.6256989", "0.6256852", "0.62484723", "0.62432677", "0.6239986", "0.6233873", "0.62235785", "0.6218768", "0.6206787", "0.6192163", "0.61873394", "0.61738193", "0.61693084", "0.61623645", "0.61607057", "0.61502177", "0.6113141", "0.61088103", "0.6102618", "0.61017567", "0.61001647", "0.60763615", "0.6060225", "0.605791", "0.60522664", "0.60495305", "0.6047412", "0.6046481", "0.60457826", "0.60421443", "0.6040657", "0.6034414", "0.60305196", "0.6030493", "0.60240406", "0.60239184", "0.60219026", "0.6020711", "0.60204905", "0.6005745", "0.6003412", "0.5996238", "0.5990234", "0.59889346", "0.59762126", "0.59670705", "0.5962123", "0.5961526", "0.5956406", "0.5947188", "0.5945998", "0.5945214", "0.5942733", "0.59352577", "0.59347874", "0.5933672", "0.59284276", "0.592627", "0.5924535", "0.5923401", "0.5913754", "0.59078133", "0.5906882", "0.59058475", "0.5900862", "0.5899501", "0.5895544", "0.5890744", "0.5888264", "0.5886381" ]
0.0
-1
Initialize a monster for a particular screen
initializeMonster(monster, screenNumber) { monster.getProperties().getSprite().css(CSS_LEFT_LABEL, monster.getProperties().getDefaultX() + 'px'); monster.getProperties().getSprite().css(CSS_BOTTOM_LABEL, monster.getProperties().getDefaultY(screenNumber) + 'px'); monster.getProperties().getSprite().css(CSS_FILTER_LABEL, "brightness(100%)"); monster.setStatus(DEAD_LABEL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initializeScreen(screenNumber) {\n validateRequiredParams(this.initializeScreen, arguments, 'screenNumber');\n let monsters = this.getMonstersOnScreen(screenNumber);\n\n for (let monster of monsters) {\n this.initializeMonster(monster, screenNumber);\n }\n }", "constructor() {\n super(\"MainScene\");\n // Monster variables\n this.monsterImage = null;\n this.hp = 5;\n this.aveHP = 5;\n this.maxHP = null;\n this.hpText = null;\n this.soulsText = null;\n this.stage = 1;\n this.stageCounter = 0;\n this.stageText = null;\n this.stageCT = null;\n this.dpsText = null;\n // Levels in upgrades\n this.levels = {\n sword: 0,\n thunder: 0,\n fire: 0\n }\n this.swordLT = null;\n this.thunderLT = null;\n this.fireLT = null;\n this.swordCT = null;\n this.thunderCT = null;\n this.fireCT = null;\n // Status of monster\n this.alive = false;\n }", "constructor() {\n super(\"MainScene\");\n // Monster variables\n this.monsterImage = null;\n this.hp = 5;\n this.hpText = null;\n this.soulsText = null;\n // Levels in upgrades\n this.levels = {\n bolt: 0\n }\n // Status of monster\n this.alive = false;\n }", "function initializeScreen() {\n var vHP;\n hideElements('#idDefender');\n hideElements('#idEnimiesAvailable');\n $(\"#idEnemiesHeader\").hide();\n $(\"#idDefenderHeader\").hide();\n $(\"#idFightSection\").hide();\n $('#idYourCharacter').children().each( function(index){ \n vHP=$(this).children('.charValue').attr('data-hp-value') ;\n $(this).children('.charValue').text(vHP);\n $(this).show();\n });\n \n $('#idMessage').text(\"\");\n mouseClickBaseChar=true;\n mouseClickEnemyChar=false;\n mouseClickAttack=false;\n vBaseCharacter=\"\";\n vDefenderCharacter=\"\";\n vCounter=0;\n numberOfEnemies=0;\n\n }", "function makeMonster() {\n s = mm(size);\n d1 = mm(descriptor);\n d2 = mm(descriptor2);\n mt = mm(monsterType);\n mw = mm(monWeapon);\n monName = `${s}, ${d1}, ${d2} ${mt}`;\n mHit = getRand(20, 30);\n document.getElementById('enemyHit').innerHTML = `${mHit}`;\n document.getElementById('mName').innerHTML = `${monName}`;\n document.getElementById('mWeapName').innerHTML = `Attack: ${mw}`;\n let n = getRand(1, 5);\n monPhoto = `./assets/monster${n}.jpg`;\n document.getElementById('vilPhoto').src = `${monPhoto}`;\n}", "spawnMonster() {\n\n switch (this.mapLevel) {\n\n //spawn monsters depending on level of dungeon\n case 1:\n this.currentMonster = new Monster(this.monsterMinHp.l1, this.monsterMaxHp.l1, this.monsterMin.l1, this.monsterMax.l1, this.monsterMinDam.l1, this.monsterMaxDam.l1)\n this.currentMonster.randomAvatar(1)\n break;\n case 2:\n this.currentMonster = new Monster(this.monsterMinHp.l2, this.monsterMaxHp.l2, this.monsterMin.l2, this.monsterMax.l2, this.monsterMinDam.l2, this.monsterMaxDam.l2)\n this.currentMonster.randomAvatar(2)\n break;\n\n case 3:\n this.currentMonster = new Monster(this.monsterMinHp.l3, this.monsterMaxHp.l3, this.monsterMin.l3, this.monsterMax.l3, this.monsterMinDam.l3, this.monsterMaxDam.l3)\n this.currentMonster.randomAvatar(3)\n\n break;\n default:\n\n\n\n }\n\n }", "function MegaMonster(stage, x, y){\n\tthis.x = x;\n\tthis.y = y;\n\tthis.stage = stage;\n\tthis.stage.setImage(x, y, this.stage.megaMonsterImageSrc);\n}", "function createNewMonster() {\n\tcurrentMonster = monsters[Math.floor(Math.random() * monsters.length)];\n\tmonsterLevel = Math.floor(Math.random() * level + 1);\n\t\n\treload();\n}", "function pickMonster() {\n currentMonsterTemplate = monster[Math.floor(Math.random() * monster.length)]\n \n currentMonster = new Monster(currentMonsterTemplate)\n}", "function monster(x,y)\r\n{\r\n\tthis.x = x;\r\n\tthis.y = y;\r\n\tthis.speed = 0.0;\r\n\tthis.angle = 0.0;\r\n\tthis.mass = 707;\r\n\tthis.radius = 15.0;\r\n\tthis.out_of_water = false;\r\n\tthis.fame = 0;\r\n\tthis.name = \"?\";\r\n}", "initialize() {\n // vai pegar todas as funcoes da classe screen, coloca todos os herois na screen\n this.screen.updateImages(this.initialHeroes)\n\n // força a screen a usar o THIS de MemoryGame\n this.screen.configurePlayButton(this.play.bind(this))\n this.screen.configureCheckSelectionButton(this.checkSelection.bind(this))\n this.screen.configureButtonShowAll(this.showHiddenHeroes.bind(this))\n }", "function Monster(stage, x, y){\n\tthis.x = x;\n\tthis.y = y;\n\tthis.stage = stage;\n\tthis.stage.setImage(x, y, this.stage.monsterImageSrc);\n}", "function initMedium(){\n init(difficultyConfigServices.medium.x,\n difficultyConfigServices.medium.y,\n difficultyConfigServices.medium.b)\n }", "function Monster(id) {\n // The user controlling this monster.\n this.user = 0;\n this.health = 10;\n this.victory_points = 0;\n this.energy = 0;\n this.in_tokyo_city = 0;\n this.in_tokyo_bay = 0;\n this.id = id;\n \n // The name of the monster.\n var monster_names = [\n \"Alienoid\",\n \"Cyber Bunny\",\n \"Giga Zaur\",\n \"Kraken\",\n \"Meka Dragon\",\n \"The King\"\n ];\n this.name = monster_names[id - 1];\n}", "function initialise()\n{\n\tfillAsteroidArray(asteroids, maxAsteroids); // Fill the asteroidArray with objects\n\tdrawMoveAsteroid(); // Draw the asteroid and use animation on the screen to move\n}", "function placedMonsterCreator(type, room) {\n var monster = new Location(-1, -1);\n monster.canMove = false;\n monster.terrainType = \"monster\";\n monster.searchable = false;\n monster.color = \"yellow\";\n monster.monsterType = \"\";\n\n if(type === \"golem\") {\n monster.description = \"A golem, much larger than any you've previously seen.\";\n monster.symbol = \"Ώ\";\n monster.monsterType = \"super golem\";\n } else if(type === \"dragon\") {\n monster.description = \"A massive scaled creature slumbers here. Its wings flap a little everytime it takes a breath. The air around the beast shimmers like the air around an intense fire.\"\n monster.symbol = \"♠\";\n monster.monsterType = \"dragon\";\n } else if(type === \"random\") {\n var randomMonster = getMonster();\n monster.description = \"A monster of indeterminate type.\";\n monster.monsterType = \"random\";\n monster.symbol = \"!\";\n }\n\n room.monsters.push(monster);\n}", "function spawnMonsters(){\n\n if (frameCount % 60 === 0 ){\n var monsters = createSprite(600,170,10,40);\n\n monsters.velocityX = -12\n\n\n var rand = Math.round(random(1,2));\n switch(rand) {\n case 1: monsters.addImage(turtleImg);\n break;\n case 2: monsters.addImage(vectorImg);\n break;\n default: break\n }\n\n monsters.lifetime = 300;\n\n monsterGroup.add(monsters)\n\n monsters.scale=1.5\n \n }\n}", "function MimicMonster(stage, x, y){\n\tthis.x = x;\n\tthis.y = y;\n\tthis.stage = stage;\n\tthis.stage.setImage(x, y, this.stage.boxImageSrc);\n}", "initialSpawn() {\n\n if (this.spawns) {\n _.each(this.spawns, (spawn, spawnCoord) => {\n\n spawnCoord = parseInt(spawnCoord, 10);\n if (!_.isFinite(spawnCoord)) throw Err(`spawnCoord not a number: ${spawnCoord}`);\n\n const npc = _.find(Resources.npcs, (n) => n.sheet === spawn.id);\n if (!npc) { throw Err(`Could not find spawn unit: ${spawn.id}`); }\n\n const localY = parseInt(spawnCoord / Env.pageWidth, 10),\n localX = spawnCoord % Env.pageWidth;\n\n const entity = new Movable(npc.id, this, {\n position: {\n global: {\n x: (this.x + localX) * Env.tileSize,\n y: (this.y + localY) * Env.tileSize\n }\n }\n });\n\n this.Log(`Spawning spawn[${spawn.id}] at: (${localX}, ${localY})`, LOG_DEBUG);\n this.area.watchEntity(entity);\n this.addEntity(entity);\n });\n }\n }", "function init() {\n MyCanvas.init();\n hero.init();\n MyScore.score = 0;\n MyHeart.heart = 3;\n MyProgressBar.init();\n\n isPause = false;\n isWin = false;\n isGameOver = false;\n\n\n while (mons_array.length > 0) {\n mons_array.pop();\n }\n\n while (mons_array.length < monster_number) {\n generate_mons.add();\n }\n\n console.log('init');\n}", "loaded() {\n me.pool.register('player', game.Player);\n me.pool.register('enemy', game.Enemy);\n me.pool.register('laser', game.Laser);\n\n me.state.WIN = me.state.USER + 1;\n me.state.LOSE = me.state.USER + 2;\n me.state.LEVEL_1 = me.state.USER + 3;\n me.state.LEVEL_2 = me.state.USER + 4;\n me.state.LEVEL_3 = me.state.USER + 5;\n me.state.LEVEL_4 = me.state.USER + 6;\n\n // set the \"Play/Ingame\" Screen Object\n this.level1 = new game.PlayScreen();\n this.level2 = new game.PlayScreen(2, 'teal');\n this.level3 = new game.PlayScreen(3, 'orange');\n this.level4 = new game.PlayScreen(4, '#49B');\n\n this.winScreen = new game.WinScreen();\n this.loseScreen = new game.LoseScreen();\n\n me.state.set(me.state.LEVEL_1, this.level1);\n me.state.set(me.state.LEVEL_2, this.level2);\n me.state.set(me.state.LEVEL_3, this.level3);\n me.state.set(me.state.LEVEL_4, this.level4);\n\n me.state.set(me.state.WIN, this.winScreen);\n me.state.set(me.state.LOSE, this.loseScreen);\n\n // start the game\n me.state.change(me.state[`LEVEL_${store.getState().level}`]);\n }", "function startGame() {\n gameScreen=1;\n}", "constructor(monsterid, image, attackType, stageid, x, dx){\n this.monsterid = monsterid;\n this.image = image;\n this.attackType = attackType;\n this.stageid = stageid;\n\n /*the starting x coordinate will be passed in as a parameter*/\n this.x = x;\n /*the starting y coordinate is half of the image's height below the canvas*/\n this.y = ph + this.image.height/2;\n this.dx = dx;\n /*the monsters have a negative velocity, so they are moving up, which makes the player look like they are falling*/\n this.dy = -350;\n\n this.alive = true;\n /*this is the value of the monster, and if the player kills the monster then they will gain this amount of score*/\n this.value = (parseInt(this.monsterid))*100;\n this.spriteFrame = 0;\n }", "init()\n {\n // Unblock the menu messaging and activate needed trees\n menuManager.allowEventHandling = true;\n menuManager.activateTree( ['pause_tree', 'base_game_tree'] );\n \n // Do any strategy inits mostly for fonts\n spriteStrategyManager.init();\n \n // Get the win meter\n this.winMeter = menuManager.getMenuControl( 'base_game_ui', 'win_meter' );\n this.winMeter.clear();\n \n // Create the multiplier\n this.multiIndexPos = genFunc.randomInt(0, this.multiXPosAllAry.length-1);\n this.strawberryData.pos.x = this.multiXPosAllAry[this.multiIndexPos];\n this.spriteStrategy.create( 'strawberry', STRAWBERRY );\n \n // Reset the elapsed time before entering the render loop\n highResTimer.calcElapsedTime();\n \n requestAnimationFrame( this.callback );\n }", "function Start() {\n\tscreenRect = Rect(0,0,Screen.width, Screen.height);\n}", "function Game_Screen() {\n this.initialize.apply(this, arguments);\n}", "function init()\n{\n\t// Load entire map data for Map 1 and display it on the screen\n\t\n\tgame.loadMap(\"map1.json\");\n\t\n\t// Place the player at the map entrance\n\t\n\tplayer.place(24, 4);\n\t\n\t// Load a troll character and place it near the player\n\t\n\tvar troll = new Character(\"troll.json\");\n\ttroll.place(24, 10);\n\t\n\t// Add a talk action to the troll\n\t\n\ttroll.action(talk_to_troll);\n\t\n\t// Once this function is finished, the player is free to run around\n\t// and trigger script actions!\n}", "spawnMunchkin(){\n this.munchkinSpawner.spawnMunchkin();\n MainGameScene.gameStats.addToCount(\"munchkins\");\n this.updateUI();\n }", "constructor(enemies) {\n //the player can have different player images\n this.sprites = [\n 'images/char-boy.png',\n 'images/char-cat-girl.png',\n 'images/char-horn-girl.png',\n 'images/char-pink-girl.png',\n 'images/char-princess-girl.png'\n ];\n this.horizontalStep = spriteWidth;\n this.verticalStep = tileHeight;\n this.enemies = enemies;\n this.reset();\n this.win = false;\n }", "function initObject(){\n\tmyplayer = new Player(img, 0, 0, 30, 50);\n\tanimals.push(new Animal(animalImgUp, 0, 800, 30, 50));\n\tanimals.push(new Animal(animalImgDown, 1000, 0, 30 ,50));\n\tanimals.push(new Animal(animalImgLeft, 600, 500, 30, 50));\n\tanimals.push(new Animal(animalImgRight, 100, 600, 30, 50));\n\tmyGame = new Game();\n}", "function startGame(){\t\n shaman = new Player();\n lightning = new Lightning();\n cStage = 0;\n Stages = [];\n Spells = [];\n Enemies = [];\n Buttons = [];\n ScreenEffects = [];\n ButtonTypesInit();\n UpgradesInit();\n StagesInit();\n LightningPower = 1;\n EarthPower = 1;\n FirePower = 1;\n AirPower = 1;\n WaterPower = 1;\n CDMode = 1;\n CDK = 1;\n wave = 0;\n TotalScore = 0;\n UpgradePoints = 3;\n SpellScreen();\n}", "function loadBattleScreen(hero,enemy) {\n// use of this function could be pared down...\n// currently all of this is reloaded after every attack.\n// revisit this in the case of performance issues\n\n\t/* load hero data */\n\tloadHeroLvl(hero);\n\tloadHeroHp(hero);\n\tloadHeroExp(hero);\n\tloadHeroAttacks(hero,enemy);\n \n\t/* load enemy data */\n\tloadEnemyImage(enemy);\n\tloadEnemyName(enemy);\n\tloadEnemyLvl(enemy);\n\tloadEnemyHp(enemy);\n\t\n\t// Idea: determine which enemy the data will be brought in from\n\t//\n\t// - this is a function or something that will return the name of the enemy\n\t// - var minion = function();\n\t// - the minion variable will be used to build the object reference for the enemy.\n}", "function init() {\r\n _lives = 5;\r\n _weapons = 10;\r\n }", "function init() {\r\n var selectMap = Math.round(Math.random()*4);\r\n if (selectMap == 0) {\r\n map = map1;\r\n } else if (selectMap == 1) {\r\n map = map2;\r\n } else if (selectMap == 2) {\r\n map = map3;\r\n } else if (selectMap == 3){\r\n map = map4;\r\n } else {\r\n map = map5;\r\n }\r\n clearInterval(thread);\r\n man = new Man(manStartX, manStartY);\r\n baddies = [];\r\n ///////////////////////////\r\n //ADD BADDIES\r\n //parameters: x position, y position\r\n ////////////////////////////\r\n new Baddie(10 * tileW, 4 * tileH);\r\n new Baddie(10 * tileW, 16 * tileH);\r\n new Baddie(17 * tileW, 10 * tileH);\r\n ///////////////////////\r\n //goal\r\n //////////////////////\r\n goal = new Goal(7 * tileW, 9.5 * tileH);\r\n //start the game\r\n thread = setInterval(draw, 30);\r\n}", "function BattleMenuManager(screen) {\n MenuManager.call(this, screen);\n this.currentlySelectedHero = -1;\n this.currentlySelectedAction = \"none\";\n this.currentlySelectedSpecialOrItem = \"none\";\n this.currentlySelectedTarget = null;\n this.assetList = [];\n this.assetList.push(new HeroSelectionMenu(this.screen));\n this.assetList.push(new ActionMenu(this.screen));\n this.assetList.push(new SpecialMenu(this.screen));\n this.assetList.push(new ItemMenu(this.screen));\n this.assetList.push(new MonsterTargetMenu(this.screen));\n this.assetList.push(new HeroTargetMenu(this.screen));\n this.assetList.push(new TurnConfirmButton(this.screen));\n}", "function createMonster(number, x, y) {\n\tvar monster = svgdoc.createElementNS(\"http://www.w3.org/2000/svg\", \"use\");\n\tmonster.setAttribute(\"x\", x);\n\tmonster.setAttribute(\"y\", y);\n\tMONSTER_INIT_POS[number] = new Point(x,y);\n\tMONSTER_ON_PLATFORM[number] = false;\n\tMONSTER_INIT_DIRECTION[number] = motionType.RIGHT;\n\t\n\tmonster.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"xlink:href\", \"#monster\");\n\tsvgdoc.getElementById(\"monsters\").appendChild(monster);\n\t\n \n\t//if monster is the last monster\n\tif(number == monster_BULLET_SHOOT) {\n\t\tvar newMonster = new Monster(monster, x, y, true);\n\t} else {\n\t\tvar newMonster = new Monster(monster, x, y, false);\n\t}\n monsters.push(newMonster);\n\t//console.log(\"New Monster was added to the list \" + JSON.stringify(monsters));\n}", "constructor(x, y, speed) {\n this.sprite = 'images/enemy-laser.png';\n this.x = x;\n this.y = y;\n this.speed = getWild(100, 300);\n }", "function Monster(name, health, minDamage, maxDamage) {\n this.name = name;\n this.alive = true;\n this.maxHealth = health;\n this.currentHealth = health;\n this.previousHealth = health;\n this.minDamage = minDamage;\n this.maxDamage = maxDamage;\n this.defense = 0;\n this.description = \"\";\n this.symbol = \"\";\n this.drops = [];\n // The vocalizations property could hold an array of strings with sounds the monster could say to the player. See example prototype method below.\n this.vocalizations = [];\n}", "function initGame() {\n gBoard = buildBoard(gLevel);\n renderBoard();\n}", "parseMonster() {\n const name = this.data.monster.name;\n const startLocation = this.parseArea(this.data.monster.startLocation);\n return new Monster_1.default(name, startLocation);\n }", "function intialize_sprites() {\n player = new Player();\n var enemy1 = new Enemy();\n allEnemies = [enemy1];\n}", "function Monster(rank) {\n this.rank = rank;\n this.health = 100;\n}", "init() { \n this.ecs.set(this, \"Game\", \"game\", \"scene\")\n }", "function newGame() {\r\n if (is5x5) {\r\n startUp()\r\n constructMaze(5, 5);\r\n Texture().initialize(150);\r\n }\r\n else if (is10x10) {\r\n startUp()\r\n constructMaze(10, 10);\r\n Texture().initialize(75);\r\n }\r\n else if (is15x15) {\r\n startUp()\r\n constructMaze(15, 15);\r\n Texture().initialize(50);\r\n }\r\n else if (is20x20) {\r\n startUp()\r\n constructMaze(20, 20);\r\n Texture().initialize(37.5);\r\n }\r\n else {\r\n console.log(\"Please select a maze size to start.\")\r\n }\r\n }", "constructor() {\n // The image for the sprite\n this.sprite = 'images/enemy-bug.png';\n this.x = xStartPosEnemy;\n this.speed = speeds[Math.floor(Math.random() * 5)];\n }", "function Screen(stage) {\n this.stage = stage;\n this.screenObjects = [];\n }", "function MyGame() {\n this.sceneFile_Level0 = \"assets/Scenes/Level0.json\";\n this.kPlatformTexture = \"assets/Ground.png\";\n this.kWallTexture = \"assets/wall.png\";\n this.kHeroSprite = \"assets/Me.png\";\n this.kCatherine = \"assets/Catherine.png\";\n this.kHuman = \"assets/Human.png\";\n this.kFlower = \"assets/flower.png\";\n this.kFontCon72 = \"assets/fonts/Consolas-72\";\n\n this.sceneParser = null;\n this.mCameras = [];\n this.mPlatformAttrs = [];\n this.mWallAttrs = [];\n this.mTextAttrs = [];\n this.mHumanAttrs = [];\n \n this.mCamera = null;\n this.mHero = null;\n this.mCatherine = null; \n this.mFlower = null;\n this.mGameStatus = 0;\n\n this.nextLevel = null;\n \n this.mAllPlatforms = new GameObjectSet();\n this.mAllHumans = new GameObjectSet();\n\n this.mTexts = new GameObjectSet();\n this.mAllWalls = new GameObjectSet();\n}", "constructor(level, posX, posY, defaultX, defaultY, toX, toY, width, height, context2D) {\n\t\tthis.level = level;\n\t\tthis.posX = posX;\n\t\tthis.posY = posY;\n\t\tthis.defaultX = defaultX;\n\t\tthis.defaultY = defaultY;\n\t\tthis.toX = toX;\n\t\tthis.toY = toY;\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tthis.visible = true;\n\t\tthis.context2D = context2D;\n\t \tthis.drawMonster(this.posX, this.posY);\n\t}", "function Screen(game){\n this.game = game;\n this.environmentManager = new EnvironmentManager(this);\n //this.load();\n this.isActive = false;\n this.isScreenOver = false;\n this.screenStartTime = null;\n this.state = \"none\";\n this.lastMouseX = 0;\n this.lastMouseY = 0;\n this.mousex = 0;\n this.mousey = 0;\n}", "function initSinglePlayerStatScreen(character){\n var HEALTH_BAR_X = GAME_WIDTH + 10;\n var HEALTH_BAR_Y = 100;\n var HEALTH_BAR_HEIGHT = 20;\n console.log(\"initSinglePlayerScreen\");\n statScreen.ShowAll = false;\n //set the Text displaying which character we are tracking\n statScreen.SinglePlayer.CharacterNameString = character.name;\n statScreen.SinglePlayer.CharacterName = game.add.text(GAME_WIDTH + 10, 10, character.name.toUpperCase(), {font: \"4em Arial\", fill: \"#ff944d\"});\n\n singleGraphics.clear();\n //redraw the healthbar and the text saying 'Health'\n singleGraphics.beginFill(HEALTH_BAR_COLOR);\n statScreen.SinglePlayer.HealthBar.Bar = singleGraphics.drawRect(HEALTH_BAR_X, HEALTH_BAR_Y, \n HEALTH_BAR_MAX_WIDTH, \n HEALTH_BAR_HEIGHT);\n singleGraphics.endFill();\n statScreen.SinglePlayer.HealthBar.HealthText = game.add.text(GAME_WIDTH + (STAT_WIDTH/2) -30, \n HEALTH_BAR_Y + HEALTH_BAR_HEIGHT + 10, \"Health\", {fill: \"#33cc33\", font: \"2em Arial\"});\n\n\n //Constant used to specify how many pixels to space out each attribute in the y-direction\n var attrStrSpacing = 35;\n //add the Attribute Strings to the StatScreen\n statScreen.SinglePlayer.AttributeStrings.MovementSpeed = game.add.text(GAME_WIDTH + 20, \n ATTRIBUTE_STRINGS_Y, \n \"Movement Speed: \" + statScreen.MultiPlayer[statScreen.SinglePlayer.PlayerIndex].InitialValue.MovementSpeed, \n {font: \"3em Arial\", fill: DEF_COLOR});\n statScreen.SinglePlayer.AttributeStrings.Damage = game.add.text(GAME_WIDTH + 20, \n ATTRIBUTE_STRINGS_Y + attrStrSpacing, \n \"Damage: \" + statScreen.MultiPlayer[statScreen.SinglePlayer.PlayerIndex].InitialValue.Damage, \n {font: \"3em Arial\", fill: DEF_COLOR});\n statScreen.SinglePlayer.AttributeStrings.SpellPower = game.add.text(GAME_WIDTH + 20, \n ATTRIBUTE_STRINGS_Y + 2*attrStrSpacing, \n \"Spell Power: \" + statScreen.MultiPlayer[statScreen.SinglePlayer.PlayerIndex].InitialValue.SpellPower, \n {font: \"3em Arial\", fill: DEF_COLOR});\n statScreen.SinglePlayer.AttributeStrings.Armor = game.add.text(GAME_WIDTH + 20, \n ATTRIBUTE_STRINGS_Y + 3*attrStrSpacing,\n \"Armor: \" + statScreen.MultiPlayer[statScreen.SinglePlayer.PlayerIndex].InitialValue.Armor, \n {font: \"3em Arial\", fill: DEF_COLOR});\n statScreen.SinglePlayer.AttributeStrings.Rooted = game.add.text(GAME_WIDTH + 20, \n ATTRIBUTE_STRINGS_Y + 4*attrStrSpacing,\n \"Rooted: \" + statScreen.MultiPlayer[statScreen.SinglePlayer.PlayerIndex].InitialValue.Rooted, \n {font: \"3em Arial\", fill: DEF_COLOR});\n statScreen.SinglePlayer.AttributeStrings.Stunned = game.add.text(GAME_WIDTH + 20, \n ATTRIBUTE_STRINGS_Y + 5*attrStrSpacing,\n \"Stunned: \" + statScreen.MultiPlayer[statScreen.SinglePlayer.PlayerIndex].InitialValue.Stunned, \n {font: \"3em Arial\", fill: DEF_COLOR});\n statScreen.SinglePlayer.AttributeStrings.Silenced = game.add.text(GAME_WIDTH + 20, \n ATTRIBUTE_STRINGS_Y + 6*attrStrSpacing,\n \"Silenced: \" + statScreen.MultiPlayer[statScreen.SinglePlayer.PlayerIndex].InitialValue.Silenced, \n {font: \"3em Arial\", fill: DEF_COLOR});\n\n}", "function Noinit_Spriteset_Battle() {this.initialize.apply(this, arguments);}", "setup() {\r\n\t\tthis.midScreenX = width /2;\r\n\t\tthis.midScreenY = height /2;\r\n\t}", "function Musi(){\n this.x = stage.view_width - 1;\n this.base = Math.floor(Math.random() * stage.view_height);\n\n var obj = $(\"<div>\");\n obj.attr(\"class\",\"test_musi\");\n $(\"#stage0\").append(obj);\n this.obj = obj;\n this.life = 0;\n }", "function init() {\n\t\tscore = 0;\n\t\tclearScreen();\n\t\tspeed = DEFAULT_SPEED;\n\t\twell = new gameWell();\n\t\tactBlock = newActBlock();\n\t\tactBlock.draw();\n\t\tnextBlock.draw();\n\t}", "function constructTank(x, y) {\n var enemyMech = new EnemyMech(x, y);\n enemyMech.draw();\n}", "constructor(){\n this.x; // This takes control of x-position of enemy\n this.y; // This takes control of y-position of enemy\n this.row; // This takes control of row of enemy\n this.col; // This takes control of column of player\n this.sprite; //This takes control of the image of enemy\n this.reset(); // Assigns value to all above parameters., Except of this.sprite , because it is set when player is selected via selection menu.\n }", "init() {\n\n preload().then(() => {\n const canvas = document.querySelector(\".board\");\n canvas.height = window.innerHeight;\n canvas.width = window.innerWidth;\n const tool = canvas.getContext(\"2d\");\n let entities = {};\n let gameObj = {\n tool, canvas, entities,animeFrame:0\n }\n let mario = new Mario(spriteSheetImage, 175, 0, 18, 18);\n \n gameObj.entities.mario = mario;\n render.init(gameObj);\n input.init();\n this.update(gameObj);\n\n })\n\n\n\n\n }", "function init() {\n\t\t// reset will display start game screen when screen is designed\n\t\treset();\n\n\t\t// lastTime required for game loop\n\t\tlastTime = Date.now();\n\n\t\tmain();\n\t}", "function spawnEnemy() {\n var enemyLocX = parseInt(Math.random() * 90);\n var enemyLocY = parseInt(Math.random() * 30);\n mapData[enemyLocX][enemyLocY] = 281; // write initial enemy position\n }", "function init() {\n // physics engine\n engine = Matter.Engine.create();\n\n // setup game world \n world = engine.world;\n world.bounds = {\n min: { x: 0, y: 0 },\n max: { x: WINDOWWIDTH, y: WINDOWHEIGHT }\n };\n world.gravity.y = GRAVITY;\n\n // setup render\n render = Matter.Render.create({\n element: document.body,\n engine: engine,\n canvas: canvas,\n options: {\n width: WINDOWWIDTH,\n height: WINDOWHEIGHT,\n wireframes: false,\n background: 'transparent'\n }\n });\n Matter.Render.run(render);\n\n // setup game runner\n let runner = Matter.Runner.create();\n Matter.Runner.run(runner, engine);\n\n // starting values\n updateScore(0);\n\n //handle device rotation\n window.addEventListener('orientationchange', function () {\n //TODO: DJC\n });\n }", "function loadStandardScreen() {\n\t// load hero data\n\tloadHeroImage(ourhero);\n\tloadHeroName(ourhero);\n\tloadHeroLvl(ourhero);\n\tloadHeroHp(ourhero);\n\tloadHeroExp(ourhero);\n\t// load other things\n\tloadOptionsMenu();\n\t// clear any residual enemy info\n\tclearEnemyInfo();\n}", "function initGame (w, h) {\n\t\tPAUSE_MODE = false;\n\t\tMAX_LEVEL_DONE = false;\n\t\tif (moveTilesId !== -1)\n\t\t\twindow.clearInterval(moveTilesId);\n\t\tfieldWidth = w; fieldHeight = h; // width and height of the field, in number of tiles\n\t\tfieldArray = new Array();\n\t\tfor (var i=0; i<fieldHeight; i++) {\n\t\t\tfieldArray[i] = new Array();\n\t\t\tfor (var j=0; j<fieldWidth; j++)\n\t\t\t\t// each tile has a color (between 0 and 3), an id (the id of the Crafty entity),\n\t\t\t\t// and a prorpiety indicating if the tile is moving or not (not moving = touching another tile)\n\t\t\t\tfieldArray[i][j] = { \"color\": -1, \"id\": -1, \"moving\": 1 };\n\t\t}\n\t\tfullColumns = new Array();\n\t\tfor (var j=0; j<fieldWidth; j++) // all the columns are empty when we start\n\t\t\tfullColumns[j] = 0;\n\t\tcurrentLevel = 1;\n\t\tcurrentScore = 0;\n\t\tintervalBetweenUpdates = SET_intervalBetweenUpdates; // the number of ms between each update of the scene\n\t\tnumberOfColors = SET_numberOfColors; // the number of authorized colors\n\t\tlinesStart = SET_linesStart; // the number of lines full of minerals at the start\n\t\t\n\t\twinnings.forEach(function (e) {\n\t\t\te.number = 0;\n\t\t\te.earnings = 0;\n\t\t});\n\t}", "constructor(){\n this.dm = new DependencyManager();\n this.em = this.dm.getEntityManager();\n this.screen = this.dm.getScreen();\n \n this.current_gamestate = new InGameState(this.dm);\n }", "function initGame() {\r\n renderLevels()\r\n gGame = {\r\n isOn: true,\r\n isFirstClick: true,\r\n\r\n }\r\n gBoard = buildBoard();\r\n renderBoard(gBoard);\r\n startTimer()\r\n\r\n}", "constructor(){\n\n this.col; // This takes control of column of enemy\n this.row; // This takes control of row of enemy\n this.speed; //This takes control of speed of enemy\n this.x; // This takes control of x-position of enemy\n this.y; // This takes control of y-position of enemy\n this.sprite = 'images/enemy-bug.png'; //This takes control of the image of enemy\n this.reset(); // Assigns value to all above parameters.\n}", "create() {\n // Load game data\n this.loadGame();\n\n // Set the starting monster\n let index = Math.floor(Math.random() * MONSTERS.length);\n this.setMonster(MONSTERS[index]);\n // Create hp text\n this.hpText = this.add.text(225, 700, \"\");\n // Create the souls text\n this.soulsText = this.add.text(50, 50, \"Souls: 0\", {\n fontSize: '24px',\n color: 'red'\n });\n\n // Create an upgrade icon for the bolt upgrade\n let bolt = this.add.image(400, 50, 'bolt');\n bolt.setScale(3);\n bolt.setInteractive();\n bolt.on('pointerdown', () => {\n // If we have enough money\n if (this.souls >= 5) {\n // pay the money\n this.souls -= 5;\n // gain a level\n this.levels.bolt++;\n }\n });\n // Create an interval to use bolt damage\n setInterval(() => {\n this.damage(this.levels.bolt);\n }, 1000);\n\n // Save button\n let door = this.add.image(50, 750, 'door');\n door.setScale(3);\n door.setInteractive();\n door.on('pointerdown', () => {\n this.saveGame();\n this.scene.start(\"TitleScene\");\n });\n\n // Save every 60s\n setInterval(() => {\n this.saveGame();\n }, 60000);\n // Save once on startup, to set the time\n this.saveGame();\n }", "function createSeaMonsters(room) {\n const numMonsters = 10;\n room.monsters = [];\n\n for(let i = 0; i < numMonsters; i++) {\n let randomMonsterType = Math.floor( Math.random() * room.monsterTypes.length );\n let newMon = createMonster(randomMonsterType, i, room.averagePlayerLevel);\n\n room.monsters.push( newMon );\n }\n}", "function start() {\n wagon = new sprite(30, 30, \"images/ferry.png\", 500, 150);\n board.start();\n}", "function getmonster() {\n\tnewmonster = Math.ceil((Math.random() * monsters) - 1);\n\tdocument.getElementById(\"monsterimg\").src = imgArray[newmonster].src;\n\tmonsterhp = monstermax + Math.ceil(Math.random() * Math.ceil(monstermax/8)) - Math.ceil(Math.random() * Math.ceil(monstermax/8));\n\tmonsterhealth = monsterhp;\n\tmonsterbar();\n\tdocument.getElementById(\"monster\").innerHTML = monsterhealth;\n\tdeadmonsterflag = false;\n}", "function initMaze(){}", "bootUp() {\n // get all functuions of screen class\n // put all heroes in screen/visible\n this.screen.updateImages(this.earlyHeroes)\n // bind(this) -> force screen to use THIS of the GameManager\n this.screen.configurePlayButton(this.play.bind(this))\n this.screen.configureVerifySelectionButton(this.verifySelection.bind(this))\n }", "function init() {\n\t\n\tCatOnARoomba = {\n\t\tcanvas: \"undefined\",\n\t\tctx: \"undefined\",\n\t\tstopMain: \"undefined\",\n\t\tmouseDown: false,\n\t\troomba: \"undefined\",\n\t\tlayout: \"undefined\"\n\t};\n\t// Initalize canvas\n\tCatOnARoomba.canvas = document.querySelector(\"#canvas\");\n\tCatOnARoomba.ctx = canvas.getContext(\"2d\");\n\t// Roomba Obj\n\tCatOnARoomba.roomba = {\n\t\tx : 0,\n\t\ty : 0,\n\t\tforward : [0,0],\n\t\trunning : false,\n\t\tpathPoints : [],\n\t\tradius : 15,\n\t\tcurrentTarget : 0\n\t};\n\t\n\tsetMouseListeners();\n\tloadLevel();\n\tmain();\n}", "function init() {\r\n var levelData = document.querySelector('input[name=\"level\"]:checked')\r\n gLevel.size = levelData.getAttribute('data-inside');\r\n gLevel.mines = levelData.getAttribute('data-mines');\r\n gLevel.lives = levelData.getAttribute('data-lives');\r\n var elHints = document.querySelector('.hints')\r\n elHints.innerText = 'hints: ' + HINT.repeat(3)\r\n var elButton = document.querySelector('.start-button')\r\n elButton.innerText = NORMAL\r\n document.querySelector('.timer').innerHTML = 'Time: 00:00:000'\r\n gBoard = createBoard()\r\n clearInterval(gTimerInterval);\r\n gGame = { isOn: false, shownCount: 0, markedCount: 0, isFirstClick: true, isHintOn: false }\r\n renderBoard()\r\n renderLives()\r\n}", "function SetScene(Chapter, Screen) {\n\n\t// Keep the chapter and screen\n\tCurrentStage = null;\n\tCurrentIntro = null;\n\tCurrentText = null;\n\tCurrentActor = \"\";\n\tCurrentChapter = Chapter;\n\tCurrentScreen = Screen;\n\tOverridenIntroText = \"\";\n\tOverridenIntroImage = \"\";\n\tLeaveIcon = \"\";\n\tLeaveScreen = \"\";\n\tLeaveChapter = Chapter;\n\tCommon_ActorIsLover = false;\n\tCommon_ActorIsOwner = false;\n\tCommon_ActorIsOwned = false;\n\n\t// Load the screen code\n\tDynamicFunction(CurrentChapter + \"_\" + CurrentScreen + \"_Load()\");\n\n}", "function initGame(){\n resetGameStats()\n setLevel()\n gBoard = buildBoard()\n renderBoard(gBoard)\n gGame.isOn = true\n\n}", "constructor(x,y){\r\n this.sprite = 'images/enemy-bug.png';\r\n this.x = x;\r\n this.y = y;\r\n this.speed = 550 + (Math.random()*450); //Random Speed for enemy movements on X Axis.\r\n\r\n}", "function spawnEnemy() {\n r = getRandomInt(1, 25);\n if (r === 1) {\n newenemyY = getRandomInt(-300, -25);\n s = 1;\n new enemy(newenemyY, s);\n } else if (r === 2) {\n newenemyY = getRandomInt(800, 1050);\n s = -1;\n new enemy(newenemyY, s);\n }\n }", "function initMultiPlayerStatScreen(){\n console.log(\"initMultiPlayerStatScreen\");\n\n var attrstyle = {font: \"2em Arial\", fill: DEF_COLOR};\n var nameStyle = {font: \"3em Arial\", fill: DEF_COLOR};\n //The height of each player's health bar\n var MULTI_HEALTHBAR_HEIGHT = 10;\n\n //defines where to start drawing text objects\n var startX = GAME_WIDTH + 20;\n\n //clear any graphics that were on the screen\n multiGraphics.clear();\n //Have it so all health bars have the same \"fill\" (color)\n multiGraphics.beginFill(HEALTH_BAR_COLOR);\n\n //Start drawing at y-coordinate of 5\n var yPos = 5;\n //Y-coordinate of where to draw the attribute strings\n var attrStrY = 0;\n //Draw the player stats\n for(var player in statScreen.MultiPlayer){\n\n //init character name\n statScreen.MultiPlayer[player].CharacterName = game.add.text(startX, yPos, \n statScreen.MultiPlayer[player].Sprite.name.toUpperCase(), nameStyle);\n\n attrStrY = statScreen.MultiPlayer[player].CharacterName.y + \n statScreen.MultiPlayer[player].CharacterName.height - 5;\n \n //Create all the Text Objects for each player\n //init attribute strings\n //handle to the Attribute Strings...saves on typing\n var strings = statScreen.MultiPlayer[player].AttributeStrings;\n strings.Damage = game.add.text(startX, \n attrStrY, \"DMG\", attrstyle);\n strings.SpellPower = game.add.text(strings.Damage.x \n + strings.Damage.width + 5,\n attrStrY, \"SP\", attrstyle);\n strings.Armor = game.add.text(strings.SpellPower.x \n + strings.SpellPower.width + 5, \n attrStrY, \"ARMOR\", attrstyle);\n strings.MovementSpeed = game.add.text(strings.Armor.x \n + strings.Armor.width + 5, \n attrStrY, \"MS\", attrstyle);\n strings.Rooted = game.add.text(strings.MovementSpeed.x \n + strings.MovementSpeed.width + 5, \n attrStrY, \"RT\", attrstyle);\n strings.Stunned = game.add.text(strings.Rooted.x \n + strings.Rooted.width + 5, \n attrStrY, \"STUN\", attrstyle);\n strings.Silenced = game.add.text(strings.Stunned.x \n + strings.Stunned.width + 5, \n attrStrY, \"SIL\", attrstyle);\n \n //draw the healthbar\n statScreen.MultiPlayer[player].HealthBar = multiGraphics.drawRect(startX, \n strings.MovementSpeed.y + strings.MovementSpeed.height, \n HEALTH_BAR_MAX_WIDTH, \n MULTI_HEALTHBAR_HEIGHT);\n\n //update yPos\n yPos += strings.MovementSpeed.height + MULTI_HEALTHBAR_HEIGHT + 50;\n \n }\n\n multiGraphics.endFill();\n\n}", "initialize() {\n // prepare characters for fighting\n this.c1.prepareForFight();\n this.c2.prepareForFight();\n\n // show characters stats\n console.log('Players are ready to fight!');\n this.c1.printStats();\n this.c2.printStats();\n\n // who starts the fight?\n if (\n // character 1 is faster?\n this.c1.speed > this.c2.speed ||\n (\n // same speed...\n this.c1.speed === this.c2.speed &&\n // ...but character 1 is luckier\n this.c1.luck > this.c2.luck\n )\n ) {\n // character 1 starts the fight\n this.attacker = this.c1;\n this.defender = this.c2;\n } else {\n // character 2 starts the fight\n this.attacker = this.c2;\n this.defender = this.c1;\n }\n }", "constructor() {\n this.sprite = 'images/enemy-bug.png';\n this.x = 0;\n this.ranNumForLocation = Math.floor(Math.random() * 3);\n this.initialLocationArray = [48, 131, 214]\n this.y = this.initialLocationArray[this.ranNumForLocation];\n this.ranNumForSpeed = Math.floor(Math.random() * 8);\n this.speedArray = [100, 150, 200, 250, 300, 350, 400, 450, 500];\n this.speed = this.speedArray[this.ranNumForSpeed];\n this.row = null;\n this.col = 1;\n }", "function Screen() {\r\n}", "function debugCreate(){\n\t\n\tvar testMissile\n\ttestMissile = new EnemySpawner(['enemyMissiles'], [new SpawnPoint(10,6)], player);\n\ttestMissile.spawn();\n\tvar rifle = new Weapon(game, room_width/2, room_height/2, 'rifleSprite', 'RIFLE', player);\n var shotgun = new Weapon(game, room_width/2 + 100, room_height/2, 'shotgunSprite', 'SHOTGUN', player);\n var smg = new Weapon(game, room_width/2 + 200, room_height/2, 'smgSprite', 'SMG', player);\n\t\n\n}", "constructor() {\n // GameBoard constants\n this.numRows = 6;\n this.numCols = 5;\n\n // Initialize game entities\n this.allEnemies = [];\n\n // Start new game\n this.setInputHandler();\n this.startGame();\n }", "function __room_start__(_this, _name, _rw, _rh, _rs, _br, _bg, _bb, _bi, _bx, _by, _bs, _vw, _vh, _vo, _vx, _vy) {\n\t_$_('tululoogame').innerHTML = \"<canvas id='\" + tu_canvas_id + \"' width='\" + _vw + \"' height='\" + _vh + \"' style='\" + tu_canvas_css + \"'></canvas>\";\n\ttu_canvas = _$_(tu_canvas_id);\n\ttu_context = tu_canvas.getContext('2d');\n\troom_current = _this;\n\t// generic:\n\troom_speed = _rs;\n\troom_width = _rw;\n\troom_height = _rh;\n\t// background color:\n\troom_background_color_red = _br;\n\troom_background_color_green = _bg;\n\troom_background_color_blue = _bb;\n\t// background image:\n\troom_background = _bi;\n\troom_background_x = 0;\n\troom_background_y = 0;\n\troom_background_tile_x = _bx;\n\troom_background_tile_y = _by;\n\troom_background_tile_stretch = _bs;\n\t// view:\n\troom_viewport_width = _vw;\n\troom_viewport_height = _vh;\n\troom_viewport_x = room_viewport_y = 0;\n\troom_viewport_object = _vo;\n\troom_viewport_hborder = _vx;\n\troom_viewport_vborder = _vy;\n\t// tiles:\n\tvar _l, _b, _t, _i, _il, _tls_, i, l, d, o, a;\n\t_tls_ = _this.tiles; tu_tiles = []; tu_tilesi = [];\n\tfor (_l = 0; _l < _tls_.length; _l++)\n\tfor (_b = 1; _b < _tls_[_l].length; _b++)\n\tfor (_t = 1; _t < _tls_[_l][_b].length; _t++)\n\ttile_add(_tls_[_l][_b][0], _tls_[_l][_b][_t][0], _tls_[_l][_b][_t][1], _tls_[_l][_b][_t][2], _tls_[_l][_b][_t][3], _tls_[_l][_b][_t][4], _tls_[_l][_b][_t][5], _tls_[_l][0]);\n\t// objects:\n\ttu_depth = []; tu_depthi = []; tu_depthu = []; tu_types = [];\n\ta = _this.objects;\n\tl = a.length;\n\tfor (i = 0; i < l; i++) {\n\t\td = a[i];\n\t\td = d[0]; // temp.fix for rc2\n\t\tif (d.o === undefined) continue;\n\t\to = instance_create_(d.x, d.y, d.o);\n\t\tif (d.s !== undefined) o.sprite_index = d.s;\n\t\tif (d.d !== undefined) o.direction = d.d;\n\t\tif (d.a !== undefined) o.image_angle = d.a;\n\t\tif (d.u !== undefined) o.image_xscale = d.u;\n\t\tif (d.v !== undefined) o.image_yscale = d.v;\n\t\tif (d.c !== undefined) d.c.apply(o);\n\t}\n\t// persistent objects:\n\t_l = tu_persist.length\n\tfor (_t = 0; _t < _l; _t++) instance_activate(tu_persist[_t]);\n\tinstance_foreach(function(o) {\n\t\tif (tu_persist.indexOf(o) != -1) return;\n\t\to.on_creation();\n\t});\n\ttu_persist = [];\n\t//\n\tinstance_foreach(function(o) {\n\t\to.on_roomstart();\n\t});\n}", "function BattleScreen(game) {\n this.game = game;\n this.battleItems = this.game.inventory.fetchBattleItems();\n this.heroManager = new HeroManager(this);\n this.monsterManager = new MonsterManager(this);\n this.menuManager = new BattleMenuManager(this);\n Screen.call(this, game);\n this.initiativeDisplay = new InitiativeDisplay(this);\n this.combat = null;\n}", "function FirstLevel(aHero) {\n //this.kTestTexture = \"assets/TestTexture.png\";\n this.kSceneObj = \"assets/SceneObjects.png\";\n this.kPlatTexture = \"assets/platform.png\";\n this.kBrokenTexture = \"assets/broken.png\";\n this.kYouDied = \"assets/YouDied.png\";\n this.kBullet = \"assets/bullet.png\";\n this.kHero = \"assets/EmptyAction.png\";\n this.kSentences = \"assets/sentences.png\";\n this.kSentences2 = \"assets/sentences2.png\";\n this.kSceneObj2 = \"assets/SceneObjects2.png\";\n this.kWall = \"assets/Wall_Level1.png\";\n \n //this.kStabTexture = \"assets/TestStab.png\";\n //this.kWood = \"assets/RigidShape/Wood.png\";\n //this.kIce = \"assets/RigidShape/Ice.png\";\n //this.kDirt = \"assets/RigidShape/Dirt.png\";\n\n // The camera to view the scene\n this.mCamera = null;\n this.LevelSelect = null;\n // backGround\n this.mWall = null;\n // Objects\n this.mHero = aHero ? aHero : null;\n this.mMirrorHero = null;\n this.mPlatSet = new GameObjectSet();\n this.mBrokeSet = new GameObjectSet();\n this.mStabSetSet = new GameObjectSet();\n //Tools\n this.mSolveCol = null;\n this.mTips = null;\n this.mTips2 = null;\n this.mShowDeath = null;\n}", "function Mushroom(me, type) {\n me.group = \"item\";\n me.width = me.height = 8;\n me.speed = .42 * unitsize;\n me.animate = emergeUp;\n me.movement = moveSimple;\n me.collide = collideFriendly;\n me.jump = mushroomJump;\n me.death = killNormal;\n me.nofire = true;\n \n var name = \"mushroom\";\n switch(type) {\n case 1: me.action = gainLife; name += \" gainlife\"; break;\n case -1: me.action = killMario; name += \" death\"; break;\n default: me.action = marioShroom; name += \" regular\"; break;\n }\n setCharacter(me, name);\n}", "constructor() {\r\n this.w = 15;\r\n this.h = 9;\r\n this.x = Math.random() * width;\r\n \r\n // Make sure enemies are not cut off.\r\n this.x = this.x - this.w / 2 <= 0 ? this.x + this.w / 2 : \r\n this.x + this.w / 2 >= width ? this.x - this.w / 2 : this.x;\r\n this.y = -this.w / 2;\r\n }", "startNewGame() {\n this.currentRound = 0;\n this.monsterHealth = 100;\n this.playerHealth = 100;\n this.playerCanAttack = true;\n this.winner = null;\n this.logMsg = [];\n }", "function fillmonst(what, awake) {\n var monster = createMonster(what);\n for (var trys = 10; trys > 0; --trys) /* max # of creation attempts */ {\n var x = rnd(MAXX - 2);\n var y = rnd(MAXY - 2);\n //debug(`fillmonst: ${x},${y} ${itemAt(x, y)}`);\n if ((itemAt(x, y).matches(OEMPTY)) && //\n (!player.level.monsters[x][y]) && //\n ((player.x != x) || (player.y != y))) {\n player.level.monsters[x][y] = monster;\n if (awake) monster.awake = awake;\n player.level.know[x][y] &= ~KNOWHERE;\n return monster;\n }\n }\n return null; /* creation failure */\n}", "function combatStarter(monster) {\n var monsterName = monster.name.split(\"\");\n monsterName[0] = monsterName[0].toUpperCase();\n monsterName = monsterName.join(\"\");\n $(\"#combat-display\").text(\"You have entered combat with a \" + monster.name + \".\");\n $(\"#monster-description\").text(monster.description);\n $(\"#monster-name\").text(monsterName);\n $(\"#room-hider\").hide();\n $(\"#chest-image\").stop().hide();\n $(\"#door-image\").stop().hide();\n $(\"#search-image\").stop().hide();\n $(\"#searcher-images\").hide();\n $(\"#monster-health\").show();\n $(\"#monster-health-number\").show();\n if(monster.name === \"dragon\") {\n $(\"#map\").empty();\n $(\"#map\").append(\"<div id=\\\"dragon-onMap-image\\\"><img src=\\\"img/dragon-onMap.jpg\\\"></div>\")\n $(\"#dragon-onMap-image\").fadeIn(1000);\n }\n $(\"#\" + monster.name + \"-image\").show();\n monster.saySomething();\n monster.healthBar();\n playerInCombat = true;\n userCommands = [\"attack\", \"flee\", \"potion\", \"equip\"];\n commandDisplayer();\n}", "function initCharacters(){\n\t//make other character objects\n\tfor(var i=0 ; i< getNumberOfCharacters() ;i++ ){\n\t\t$(\".character:first-child\").clone().appendTo(\"#characters\");\n\t}\n\t$(\"#characters\").children().each(function(index) {\n\t\tif(index != 0) // initialize Mario\n\t\t{\n\t\t\t// put new characters on the out side of play ground\n\t\t\t$(this).attr(\"srcPos\", -1);\n\t\t\t$(this).attr(\"character\", marioGame.Character[0]);\n\t\t\t$(this).css({\n\t\t\t\t\t\"left\" : getPosX($(this).attr(\"srcPos\")),\n\t\t\t\t\t\"z-index\" : 10 - index\n\t\t\t\t});\t\n\t\t\t\n\t\t\t$(this).attr(\"index\", index);\n\t\t\t$(this).removeClass( $(this).attr(\"motion\") );\n\t\t\t$(this).attr(\"motion\", $(this).attr(\"character\")+marioGame.Motion[0]);\n\t\t\t// save destination position for each character\n\t\t\t$(this).attr(\"destPos\", marioGame.Position[index]); //marioGame.Position[index]);\n\t\t\t// visually apply movement image\n\t\t\t$(this).addClass( $(this).attr(\"motion\") );\n\t\t}\n\t\telse{\n\t\t\t$(this).attr(\"destPos\", marioGame.Position[index]);\n\t\t}\n\t});\n}", "function Screen() {\n}", "function init(){\n bk = new Sprite(game.images.bk, game)\n bk.scale = 0.5\n turkey = new Sprite(game.images.turkey, game)\n turkey.scale = 0.4\n turkey.setVector(2,45)\n zombie = new Sprite(game.images.zombie, game)\n zombie.scale = 0.15\n zombie.setVector(2,-45)\n crosshair = new Sprite(game.images.crosshair, game)\n crosshair.scale = 0.3\n logo = new Sprite(game.images.logo, game)\n f = new Font (\"30pt\" , \"Quicksand\" , \"white\", \"black\")\n pew = new Sound(game.audios.pew)\n gobble = new Sound(game.audios.gobble)\n chomp = new Sound(game.audios.chomp)\n oof = new Sound(game.audios.oof)\n bk_two = new Sprite(game.images.bk_two, game)\n bk_two.scale = 1.5\n \n game.state = startScreen;\n}", "async _addMonsters() {\n this.arena.monsters = [];\n\n for (let creature in this.config.monsters) {\n let AI = await new Monster({\n id: creature,\n idType: this.config.monsters[creature].id,\n spritesheet: this.config.monsters[creature].spritesheet,\n spriteProp: this.config.monsters[creature],\n container: this.stage.container(),\n layer: this.layer,\n stage: this.stage,\n onScreenUpdate: this._onScreen.bind(this),\n }).init()\n\n this.arena.monsters.push(AI);\n\n this.layer.add(this.arena.monsters[creature].sprite.body);\n\n this._updateFrame();\n this.arena.monsters[creature].sprite.start();\n }\n }", "function $screen()\n{\n\tvar thisPtr=this;\n\tthis.inlet1 = new this.inletClass(\"inlet1\",this,\"\\\"bang\\\" outputs screen info\");\n\tthis.outlet1 = new this.outletClass(\"outlet1\",this,\"available width\");\n\tthis.outlet2 = new this.outletClass(\"outlet2\",this,\"available height\");\n\tthis.outlet3 = new this.outletClass(\"outlet3\",this,\"available left\");\n\tthis.outlet4 = new this.outletClass(\"outlet4\",this,\"available top\");\n\tthis.outlet5 = new this.outletClass(\"outlet5\",this,\"color depth\");\t\t\t\t\t\n\t\n\tvar screenObj=window.screen;\n\t\n\tthis.inlet1[\"bang\"]=function() {\n\t\tthisPtr.outlet1.doOutlet(screenObj.availWidth);\t\t\n\t\tthisPtr.outlet2.doOutlet(screenObj.availHeight);\n\t\tthisPtr.outlet3.doOutlet(screenObj.availLeft);\n\t\tthisPtr.outlet4.doOutlet(screenObj.availTop);\n\t\tthisPtr.outlet5.doOutlet(screenObj.colorDepth);\t\t\n\t}\n\n\treturn this;\n}", "function spawnMob(x) {\n for (i = 0; i < 60; i++) {\n if (i < 10) {\n mobs1.push(new Mob(30, 10, 200 + i * 35, 200, 'red', 0, 0));\n } else if (i < 20) {\n mobs1.push(new Mob(30, 10, 200 + (i - 10) * 35, 185, 'yellow', 0, 0));\n } else if (i < 30) {\n mobs1.push(new Mob(30, 10, 200 + (i - 20) * 35, 170, 'orange', 0, 0));\n } else if (i < 40) {\n mobs1.push(new Mob(30, 10, 200 + (i - 30) * 35, 155, 'magenta', 0, 0));\n } else if (i < 50) {\n mobs1.push(new Mob(30, 10, 200 + (i - 40) * 35, 140, 'indigo', 0, 0));\n } else if (i < 60) {\n mobs1.push(new Mob(30, 10, 200 + (i - 50) * 35, 125, 'brown', 0, 0));\n }\n }\n}", "componentWillMount(){\n this.rand_gen(); // start the game with one tile\n }", "function createMonster(x, y) {\r\n\r\n var monster = svgdoc.createElementNS(\"http://www.w3.org/2000/svg\", \"use\");\r\n svgdoc.getElementById(\"monsters\").appendChild(monster);\r\n monster.setAttribute(\"x\", x);\r\n monster.setAttribute(\"y\", y);\r\n var x_ = Math.floor(Math.random()*700);\r\n var y_ = Math.floor(Math.random()*500);\r\n// moveMonster(monster, x, y, x_, y_);\r\n monster.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"xlink:href\", \"#monster\");\r\n // var monsterleft = svgdoc.getElementById(\"monsterleft\");\r\n // monsterleft.setAttribute(\"transform\", \"translate(\" +MONSTER_SIZE.w + \", 0) scale(-1,1)\");\r\n\r\n}", "constructor(y) {\n this.x = -101;\n this.y = y;\n this.speed = Math.floor(Math.random() * 500) + 100;\n this.sprite = 'images/enemy-bug.png';\n }" ]
[ "0.6812995", "0.66513896", "0.6647709", "0.64412194", "0.64321977", "0.64271086", "0.6290029", "0.6266707", "0.6227675", "0.62144494", "0.621016", "0.61519355", "0.60422766", "0.5986478", "0.5948585", "0.59035206", "0.5882536", "0.5879027", "0.5867835", "0.58419025", "0.5795386", "0.5764656", "0.57566905", "0.5755999", "0.57398266", "0.57356757", "0.5730063", "0.5724949", "0.57179856", "0.5689609", "0.5675904", "0.5663377", "0.56625706", "0.56614625", "0.56607336", "0.5660639", "0.5652834", "0.5634137", "0.5627169", "0.5617401", "0.5608071", "0.5604833", "0.56018126", "0.5601248", "0.55965596", "0.55888015", "0.5588221", "0.55853164", "0.558205", "0.55772746", "0.5576407", "0.5574404", "0.5574179", "0.55588746", "0.55576646", "0.5555055", "0.5552439", "0.55507123", "0.55471563", "0.5542519", "0.55349463", "0.55276746", "0.55169296", "0.55167234", "0.55127156", "0.55058575", "0.5502913", "0.5486671", "0.548358", "0.5478417", "0.54702467", "0.5459528", "0.5459441", "0.5456611", "0.54563814", "0.5446324", "0.5438506", "0.5434604", "0.54345936", "0.54270655", "0.5426321", "0.5424467", "0.54237974", "0.5421416", "0.5417599", "0.54094297", "0.54052866", "0.5399012", "0.5396827", "0.5394865", "0.5387349", "0.53860605", "0.5378939", "0.5378225", "0.537467", "0.53726166", "0.5372021", "0.53715175", "0.537077", "0.5369198" ]
0.7641371
0
Reset sprite positions to the default.
resetSpritePositions(barbarian) { validateRequiredParams(this.resetSpritePositions, arguments, 'barbarian'); let characters = new Array(barbarian); for (let scrNum of this.getScreenNumbers()) { for (let opponent of this.getMonstersOnScreen(barbarian.getScreenNumber())) { characters.push(opponent); } } barbarian.show(); let spritesOnScreen = this.getOpponentsOnScreen(barbarian.getScreenNumber()); for (const character of characters) { let isSpriteOnScreen = $.inArray(character, spritesOnScreen) !== -1; character.getProperties().getDeathSprite().hide(); character.setAction(character.getProperties().getDefaultAction()); character.setDirection(character.getProperties().getDefaultHorizontalDirection()); character.setStatus(character.getProperties().getDefaultStatus()); character.getProperties().getSprite().css('display', isSpriteOnScreen && !character.getProperties().getIsSecondaryMonster() ? 'block' : 'none'); character.getProperties().getSprite().css('left', character.getProperties().getDefaultX() + 'px'); character.getProperties().getSprite().css('bottom', character.getProperties().getDefaultY(barbarian.getScreenNumber()) + 'px'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() { // Resetting sprite/locations locations\n player.x = 205;\n player.y = 405;\n for (const enemy of allEnemies) {\n enemy.x = 0;\n }\n clearTimeout(stop);\n }", "resetPos() {\r\n this.pos.x = width/2;\r\n this.pos.y = height/2;\r\n }", "Reset()\n {\n this._position = 0;\n }", "reset(position) {\n this.x = this.x0;\n this.y = this.y0;\n }", "reset() {\n // x and y is the position of the enemy on the board, and parametrizes the centre of the\n // corresponding sprite.\n this.x = boardWidth / 2;\n this.y = spriteHeight / 2 + 4.5 * tileHeight;\n this.sprite = this.sprites[Math.floor(sampleInRange(0, 5))];\n }", "resetPos() {\n this.x = 2 * this.rightLeft;\n this.y = 4 * this.upDown + 54;\n }", "reset () {\n this.y = this.startingY;\n this.x = this.startingX;\n }", "resetPos(){\n this.addX(this.getX());\n this.addY(this.getY());\n }", "function reset() {\n player.x = 0;\n player.y = 0;\n }", "resetPosition() {\n\t\tAnimated.spring(this.state.position, {\n\t\t\ttoValue: { x: 0, y: 0 }\n\t\t}).start();\n\t}", "resetPosition(x, y) {\n this.x = x;\n this.y = y;\n this.moving = false;\n this.currentState = {\n killing: false,\n frames: 1,\n };\n this.setDirection(Constants.RHINO_DIRECTIONS.DEFAULT)\n }", "resetPosition() {\n // 505 is width, 101 is one block, so 202 will be center\n this.x = 202;\n // 606 is height, 171 is one block, so 435 will be center, but we need to be be off a bit,\n // so it will be 435 - 45px\n this.y = 390;\n }", "function reset() {\n frc = false;\n load(DEFAULT_POSITION);\n }", "reset() {\n this.health = icon_width + 100;\n\n this.x_team_pos = 25;\n this.y_icon_pos = 25 + (icon_height*this.id) + (spacing*this.id);\n this.x_boss_pos = 1075;\n }", "reset() {\n this.x = this.originX;\n this.y = this.originY;\n }", "function reset(){\n\n\t// sprites\n\tvar numSprites = ssget() * ssget();\n\tfor(var i=0; i<numSprites; i++){\n\t\teditor.clearSprite(i); // TODO: ???\n\t\tfset(i,0);\n\t}\n\n\t// Map\n\tfor(var i=0; i<128; i++){\n\t\tfor(var j=0; j<32; j++){\n\t\t\tmset(i,j,0);\n\t\t}\n\t}\n\n\t// palette\n\tfor(var i=0; i<16; i++){\n\t\tpalset(i); // set default\n\t}\n\tpalset(16,-1);\n\n\t// SFX\n\tfor(var i=0; i<64; i++){\n\t\tfor(var j=0; j<32; j++){\n\t\t\tavset(i,j);\n\t\t\tafset(i,j);\n\t\t\tawset(i,j);\n\t\t}\n\t}\n\n\t// Tracks\n\tfor(var groupIndex=0; gsget(groupIndex) !== undefined; groupIndex++){\n\t\tgsset(groupIndex);\n\t\tfor(var position=0; position<32; position++){\n\t\t\tnvset(groupIndex, position, 0);\n\t\t}\n\t}\n\n\t// Patterns\n\tfor(var pattern=0; mfget(pattern) !== undefined; pattern++){\n\t\tmfset(pattern);\n\t\tfor(var channel=0; channel<4; channel++){\n\t\t\tmgset(pattern, channel);\n\t\t}\n\t}\n\n\t// Code\n\tcode_set(\"\");\n\n\twidth(128);\n\theight(128);\n\tcellwidth(8);\n\tcellheight(8);\n\tssset(16);\n}", "updateSprite () {\n this.setDirState(null, null)\n }", "setPos(x, y) {\n var x = x || this.sprite.x;\n var y = y || this.sprite.y;\n this.sprite.x = x;\n this.sprite.y = y;\n }", "reset(){\n //set position x and y back to 100\n this._posX = 100;\n this._posY = 100;\n //set score back to 0\n this._score = 0;\n }", "function reset_MainSquare_pos() {\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\tGame.mobile.x = Math.floor(2*Measures.lineWidthCoef * Canvas.width);\r\n\tGame.mobile.y = Measures.initialPos;\r\n\tGame.mobile.position=0;\r\n\tGame.mobile.angle=false;\r\n\tGame.mobile.isDead=0;\r\n\tGame.mobile.currentLine=0;\r\n\tGame.mobile.onJump=false;\r\n\tGame.mobile.justLanded=false;\r\n\tGame.mobile.onContact=true;\t\r\n}", "reset() {\n this.x = 202;\n this.y = 395;\n }", "function reset() {\n ctx.clearRect(pacman.x, pacman.y, sqaure, sqaure);\n ctx.fillRect(pacman.x, pacman.y, sqaure, sqaure);\n ctx.clearRect(white_sprite.x, white_sprite.y, sqaure, sqaure);\n ctx.clearRect(grey_sprite.x, grey_sprite.y, sqaure, sqaure);\n ctx.clearRect(green_sprite.x, green_sprite.y, sqaure, sqaure);\n ctx.clearRect(evil_sprite.x, evil_sprite.y, sqaure, sqaure);\n ctx.fillRect(white_sprite.x, white_sprite.y, sqaure, sqaure);\n ctx.fillRect(grey_sprite.x, grey_sprite.y, sqaure, sqaure);\n ctx.fillRect(green_sprite.x, green_sprite.y, sqaure, sqaure);\n ctx.fillRect(evil_sprite.x, evil_sprite.y, sqaure, sqaure);\n pacman.x = 25;\n pacman.y = 25;\n white.x = 16;\n white.y = 14;\n green.x = 14;\n green.y = 15;\n grey.x = 15;\n grey.y = 14;\n evil.x = 17;\n evil.y = 17;\n vel_x = 0;\n vel_y = 0;\n white_sprite.x = white.x * sqaure;\n white_sprite.y = white.y * sqaure;\n green_sprite.x = green.x * sqaure;\n green_sprite.y = green.y * sqaure;\n grey_sprite.x = grey.x * sqaure;\n grey_sprite.y = grey.y * sqaure;\n evil_sprite.x = evil.x * sqaure;\n evil_sprite.y = evil.y * sqaure;\n}", "function resetRendering() {\r\n\r\n\t//Setting player initial position\r\n\tplayer.x = 200;\r\n\tplayer.y = 430;\r\n\r\n\t//Setting Enemy initial position\r\n\tfor(var enemy = 0; enemy < allEnemies.length; enemy++){\r\n\t\tvar tempEnemy = allEnemies[enemy];\r\n\t\tif(enemy == 0){\r\n\t\t\ttempEnemy.x = 20;\r\n\t\t\ttempEnemy.y = 230;\r\n\t\t}else if(enemy == 1){\r\n\t\t\ttempEnemy.x = 25;\r\n\t\t\ttempEnemy.y = 150;\r\n\t\t}else if(enemy == 2){\r\n\t\t\ttempEnemy.x = 80;\r\n\t\t\ttempEnemy.y = 60;\r\n\t\t}\r\n\t}\r\n}", "resetPosition() {\n Animated.spring(this.state.position, {\n toValue: { x: 0, y: 0 }\n }).start();\n }", "function reset() {\n player.x = 200;\n player.y = 380;\n}", "setDefaults() {\n this.anchor = 0.5;\n this.x = 0;\n this.y = 0;\n }", "reset(){\n this.x = 200;\n this.y = 396;\n }", "reset(){\n this.x = this.wall.middle;\n this.y = this.wall.bottom;\n }", "resetPosition() {\n this.x = this.posX[Math.floor(Math.random() * this.posX.length)];\n this.y = this.posY[Math.floor(Math.random() * this.posY.length)];\n }", "reset() {\n\t\tthis.tilesForTextureUpdate = Array.from( this.tiles );\n\t\tthis.updateNextTile();\n\t}", "function resetPositions() {\r\n\tcurrentRow = startingRow;\r\n\tcurrentColl = startingColl;\r\n\tlastRow = startingRow;\r\n\tlastColl = startingColl;\r\n\tnextRow = startingRow + 1;\r\n\tnextColl = startingColl;\r\n}", "resetPlayerPos () {\n player.x = 200;\n player.y = 400;\n this.gotGift = true;\n }", "reset() {\n this._offsetX = 0;\n this._offsetY = 0;\n this._scale = 1;\n }", "function clearSprites(){\n\t\tfor (var i = sprites.length - 1; i >= 0; i--) {\n\t\t\tsceneOrtho.remove(sprites[i]);\n\t\t};\n\t\tsprites=[];\n\t}", "function reset() {\n allEnemies = [];\n player = null;\n allEnemies = [new Enemy(60), new Enemy(140), new Enemy(230)];\n player = new Player(200, 400);\n playerYValues = [];\n\n }", "function resetPosition()\n{\n\ttopPos = parseInt(topPosElem.value);\n\tleftPos = parseInt(leftPosElem.value);\n\tdisplay_status(\"pos: \" + leftPos + \",\" + topPos);\n\t//the values assigned to top and left must be strings\n\tcz.style.left = leftPos + \"px\";\n\tcz.style.top = topPos + \"px\";\n}", "function resetPosition()\n{\n\ttopPos = parseInt(topPosElem.value);\n\tleftPos = parseInt(leftPosElem.value);\n\tdisplay_status(\"pos: \" + leftPos + \",\" + topPos);\n\t//the values assigned to top and left must be strings\n\tcz.style.left = leftPos + \"px\";\n\tcz.style.top = topPos + \"px\";\n}", "reverseReset() {\n this.x = width / 2;\n this.y = height / 2;\n this.xdir = 0;\n this.ydir = 0;\n }", "setSprite(state) {\n this.sprite.animationTime = 0;\n this.sprite.animationFrame = 0;\n }", "function resetCardPositions() {\n\t\t// Randomize the position of the cards\n\t\tpositions.sort(function(a, b) {\n\t\t\treturn Math.random() - 0.5;\n\t\t});\n\n\t\t// Set new random position on cards\n\t\tfor (let i = 0; i < 16; i++) {\n\t\t\tcards[i].setupPosition(positions[i]);\n\t\t}\n\t}", "function reset() {\n for (var x = 0; x < BOARD_SIZE; x++) {\n board[x][0] = new Piece(START_POSITION.charAt(x), WHITE);\n board[x][1] = new Piece(PAWN, WHITE);\n \n board[x][6] = new Piece(PAWN, BLACK);\n board[x][7] = new Piece(START_POSITION.charAt(x), BLACK);\n }\n }", "function resetXY()\n{\n\ttrueB.setPosition(trueX, trueY);\n\tfalseB.setPosition(falseX, falseY);\n\tlayer.draw();\n}", "reset() {\n this.alpha = 0;\n this.y = 0;\n }", "function rePosition(){\r\n piece.pos.y = 0; // this and next line puts the next piece at the top centered\r\n piece.pos.x = ( (arena[0].length / 2) | 0) - ( (piece.matrix[0].length / 2) | 0);\r\n }", "resetEnemy() {\n this.x = this.setPropertyX(6, 1, globals.stepX);\n this.y = this.setPropertyY(1, 4, globals.stepY);\n this.speed = this.setPropertySpeed(100, 500);\n }", "function reset()\n{\n\tleftDrop.setFill(\"\");\n\trightDrop.setFill(\"\");\n\tevalCircle.setFill(\"\");\n\n\tresetXY();\n\tlayer.draw();\n}", "reset() {\n this.x = width / 2;\n this.y = height / 2;\n this.xdir = random(-5, 5);\n this.ydir = random(-5, 5);\n }", "reset() {\n this.x=200;\n this.y=400;\n this.steps=0;\n }", "function resetPlayer() {\n player.x = 210;\n player.y = 380;\n}", "function reset() {\n // reset the player (puts him at starting tile)\n player.reset();\n // reset the enemies - they will begin off screen to the left\n allEnemies.forEach(function(enemy) {\n enemy.reset();\n });\n // reset the game clock - I'm not really using this timer for now but good to have\n gameTimeElapsed = 0;\n // redraw the background of the scoreboard if the high score changed. We try to \n // draw this as seldom as possible to be more efficient. \n if ( currentScore > highScore ) {\n highScore = currentScore;\n scoreboardBG.setForceDraw();\n }\n // reset the current score to zero\n currentScore = 0;\n\n }", "function resetStrikers() {\n if (home) {\n playerStrikerPosX = 0.2 * c.width;\n cpuStrikerPosX = 0.8 * c.width;\n } else {\n playerStrikerPosX = 0.8 * c.width;\n cpuStrikerPosX = 0.2 * c.width; \n }\n cpuStrikerPosY = 0.5 * c.height;\n playerStrikerPosY = 0.5 * c.height;\n }", "function reset() {\n document.getElementById('game-over').style.display = 'none';\n document.getElementById('game-over-overlay').style.display = 'none';\n isGameOver = false;\n gameTime = 0;\n score = 0;\n\n //enemies = [];\n bullets = [];\n\n player.pos = [canvas.width / 2 - player.sprite.size[0] / 2, 0];\n}", "reset() {\n this.ball.pos.x = this._canvas.width / 2;\n this.ball.pos.y = this._canvas.height / 2;\n this.ball.velocity.x = 0;\n this.ball.velocity.y = 0;\n }", "reset() {\n this.yPos = this.groundYPos;\n this.jumpVelocity = 0;\n this.jumping = false;\n this.ducking = false;\n this.update(0, Trex.status.RUNNING);\n this.midair = false;\n this.speedDrop = false;\n this.jumpCount = 0;\n this.crashed = false;\n }", "function reset(){\n playerOne.disappear(playerOne.yPos, playerOne.xPos)\n enemyOne.disappear(enemyOne.yPos, enemyOne.xPos)\n enemyTwo.disappear(enemyTwo.yPos, enemyTwo.xPos)\n enemyThree.disappear(enemyThree.yPos, enemyThree.xPos)\n enemyFour.disappear(enemyFour.yPos, enemyFour.xPos)\n }", "function resetGameBoard() {\n \n game.xBuffer = imgDetail.imgWidth + imgDetail.imgWidth * 0.4;\n game.yBuffer = imgDetail.imgHeight + imgDetail.imgWidth * 0.2;\n game.xOffSet = 0;\n game.noOfRowOfEnemy = 3;\n game.direction = -1;\n game.verocity = 0;\n game.x2 = game.width - 10;\n game.y2 = game.height - 10;\n game.maxOffSet = Math.floor(game.xBuffer * 2);\n game.startX = 10;\n game.startY = 120;\n game.noOfEnemyPerRow = Math.floor((game.width - 4 * game.xBuffer) / game.xBuffer);\n game.direction = 1;\n game.verocity = Math.floor(imgDetail.width / 2);\n\n \n }", "resetPosition () {\n this._planeSystem.position.x = 0;\n this._planeSystem.position.y = 0;\n this._planeSystem.position.z = 0;\n }", "function resetPlayer(){\n player = {\n x: 0,\n y: 0\n }\n }", "resetPlayer() {\n this.x = 200;\n this.y = 400;\n }", "resetState() {\n this._movements = 0;\n }", "function reset() \n{\n for (var i = 0; i < $cell.length; i++) \n {\n \t$cell[i].className = 'cell';\n \t$cell[i].innerHTML = '';\n }\n bombs.posX = [];\n bombs.posY = [];\n}", "reset() {\n this.x0 = this.x;\n this.y0 = this.y;\n this.t = 0;\n }", "resetPosition() {\n //\"Spring\" into position\n Animated.spring(this.state.position, {\n toValue: { x: 0, y: 0 }\n }).start();\n }", "reset(X,Y){\n Matter.Body.setPosition(this.body, {x: X,y: Y});\n }", "Reset() {\n ui.Reset();\n\n pipeMan.Reset();\n state.Reset();\n scoreText.SetScore(0);\n\n player.Reset();\n player.StartScreenBob();\n\n //reset tiled bg\n bg.tilePositionX = 0;\n ground.tilePositionX = 0;\n }", "reset() {\n this.dest.x = 200;\n this.dest.y = 450;\n }", "reset() {\n this.x = (floor(random(0, 20))) * this.size;\n this.y = (floor(random(0, 10))) * this.size;\n\n }", "resetCanvasPosition(): void {\n this.translate(-this.canvasPosition.x, -this.canvasPosition.y);\n this.canvasPosition = { x: 0, y: 0 };\n }", "reset () {\n\t\t\tthis.x = Math.random() * this.maxX;\n\t\t\tthis.y = Math.random() * this.maxY;\n\t\t\tthis.size = Math.random() * (options.size.max - options.size.min) + options.size.min;\n\n\t\t\tthis.speed = {\n\t\t\t\tx: options.speed * (Math.random() - .5),\n\t\t\t\ty: options.speed * (Math.random() - .5)\n\t\t\t}\n\t\t}", "reset() {\n\t\tfor (let i = 0; i < this.tiles.length; i++) {\n\t\t\tthis.tiles[i].unsetPiece();\n\t\t}\n\t\tfor (let i = 0; i < this.whitePieces.length; i++) {\n\t\t\tthis.whitePieces[i].unsetTile();\n\t\t\tthis.whitePieces[i].animation = null;\n\t\t\tthis.blackPieces[i].unsetTile();\n\t\t\tthis.blackPieces[i].animation = null;\n\t\t}\n\t}", "positionSprites() {\n for (var i = this.layers.length - 1; i >= 0; i--) {\n for (var j = 0; j < this.layers[i].length; j++) {\n for (var k = 0; k < this.layers[i][j].length; k++) {\n if (this.layers[i][j][k] === null) {\n continue\n }\n this.layers[i][j][k].setSpritePosition(gameSession.layout.header.numChildren)\n }\n }\n }\n }", "function reset() {\n _character.reset();\n\n // Reset the local variable indicating the current row the character sits upon\n _currentRow = _startRow;\n _highestRow = _startRow;\n _isGameOver = false;\n }", "resetShipPos(ship) {\n ship.y = 0; //sets y position to 0\n var randomX = Phaser.Math.Between(0, config.width); //creates a random value between 0 and the width of the game \n //which in this case is 256\n ship.x = randomX;\n }", "set_position(x, y) {\r\n\r\n if (typeof(x) != 'undefined' && x != null)\r\n this.sprite.x_pos = x;\r\n\r\n if (typeof(y) != 'undefined' && y != null) \r\n this.sprite.y_pos = y;\r\n }", "reset() {\n // Random position\n this.x = random(0, width);\n this.y = random(0, height);\n this.visibility = 255; // reset visibility\n\n }", "function reset() {\n //Sets points to 0 \npoints = 0 \n//Console log for safety\nconsole.log(points);\n\n//All three of the targets keep their x value \ntarget_1_x = 300;\ntarget_2_x = 300;\ntarget_3_x = 300;\n\n//Moves the Hero back to the original position. \nhero.y = 800; \nhero.x = 300; \n\n//Sets clicks to 0 \nclicks = 0; \n}", "function reset() {\n player.x = 3 * 101;\n player.y = (6 * 81);\n for (var i = 0; i < allEnemies.length; i++) {\n allEnemies[i].x = enemyStart[getRandNum(0, 3)];\n allEnemies[i].speed = getRandNum(2, 4);\n }\n displayMessage(\"GO!\"); // Good encouragement never hurts\n init();\n }", "function SetDefaultPosition(pos: Vector3) {\n\tdefPos = pos;\n}", "restorePos(_x, _y)\n {\n this.x = _x;\n this.y = _y;\n }", "resetResources()\n {\n this.slaps = 0;\n this.blocks = 0;\n }", "resetHero() {\n this.x = this.startX;\n this.y = this.startY;\n }", "setSprite() {\n\n // Flip sprite if moving in a direction\n if (this.body.velocity.x > 0) {\n this.sprite.setFlipX(false);\n } else if (this.body.velocity.x < 0) {\n this.sprite.setFlipX(true);\n }\n\n // If not moving play idle animation\n if (this.body.velocity.x !== 0 || this.body.velocity.y !== 0) {\n this.sprite.play(`${this.data.values.sprite}_run`, true);\n } else {\n this.sprite.play(`${this.data.values.sprite}_idle`, true);\n }\n }", "function _setPositions() {\r\n clones.forEach(function (draggable) { draggable.setPosition(); });\r\n }", "reset() {\n\n this.isFiring = false;\n this.anims.pause();\n this.body.setVelocity(0, 0);\n this.y = 431;\n }", "function resetGame() {\n newSquares = Array(9).fill(null);\n setSquares(newSquares);\n setXTurn(true);\n }", "function reset() {\n $('.game-field').html('');\n game.moves = 1;\n $('.game-field').attr('onClick', 'icon(this.id)');\n $('.win').removeClass('win');\n setTimeout(firstMove, 200);\n }", "function resetGlobal() {\r\n speed.dx = 0;\r\n speed.dy = 0;\r\n snake[0].x = 0;\r\n snake[0].y = 0;\r\n}", "function reset() {\n state.moves = [];\n state.turnCount = 0;\n state.playbackSpeed = 700;\n chooseMove();\n }", "set_sprite_offset_center() {\r\n this.sprite.x_offset = -(Math.round(this.sprite.width / 2));\r\n this.sprite.y_offset = -(Math.round(this.sprite.height / 2));\r\n }", "reset(){\n var count;\n for(count = 0; count < this.locks.length; count++){\n var lock = this.locks[count];\n lock.reset();\n lock.setVisible(true);\n }\n this.opened = false;\n this.dist = 0;\n this.sprite.texture = this.textures[0];\n }", "function resetBox(){\n xOffset = playfield.width / 2;\n yOffset = playfield.height / 2;\n}", "function reset() {\n pointer.transform(\"t0,0\");\n submit.transform(\"t0,-25\");\n frame.transform(\"s0.85, 0.56, \" + phonebox.cx + \", \" + phonebox.y + \" t0,19\");\n screenbg.transform(\"s1, 0.75, \" + phonebox.cx + \", \" + phonebox.y );\n button.transform(\"s0,0\");\n speaker.transform(\"s0,0\");\n }", "function resetValues()\n{\n\t//empty cell counter\n\tcounter = 0;\n\n\t//All the cell entries\n\tstar[0] = 0;\n\tstar[1] = 0;\n\tstar[2] = 0;\n\tstar[3] = 0;\n\tstar[4] = 0;\n\tstar[5] = 0;\n\tstar[6] = 0;\n\tstar[7] = 0;\n\tstar[8] = 0;\n\n\t//Winner array\n\twinnerArray[0] = -1;\n\twinnerArray[1] = -1;\n\twinnerArray[2] = -1;\n\n\tgameWinner = 0;\n\n\t//Reset the cell images\n\t$('.gameCell').css('background-color', 'white');\n\t$('.gameCell').css('background-image', '');\n\n\t\n}", "resetShipPosition(ship) {\n ship.y = 0;\n const randomX = Phaser.Math.Between(0, config.width);\n ship.x = randomX;\n }", "reset() {\r\n // Set direction\r\n this.direction = Helper.Directions.RIGHT;\r\n // Set snake head position (x is calculated, y is random)\r\n var x = (this.length + 2) * this.size.WIDTH;\r\n var y = Helper.getRandomPositionY(0, Helper.FieldSize.HEIGHT - this.size.HEIGHT);\r\n this.position.X = x;\r\n this.position.Y = y;\r\n // Set all body parts positions according to head\r\n for (var i = 0; i < this.length; i++) {\r\n this.bodyArray[i].position.X = (x - (i + 1) * this.size.WIDTH);\r\n this.bodyArray[i].position.Y = y;\r\n this.positionStack[i] = this.bodyArray[i].position;\r\n }\r\n // Update position stack\r\n }", "adjustTile(sprite) {\n // set origin at the top left corner\n sprite.setOrigin(0);\n\n // set display width and height to \"tileSize\" pixels\n sprite.displayWidth = this.tileSize;\n sprite.displayHeight = this.tileSize;\n }", "function resetOffsets() {\n\tofsX = 0;\n\tofsY = baseOfsY;\n\tdocument.getElementById('verticalShift').value = 0;\n}", "reset() {\n this.x = 200;\n this.y = 380;\n this.row = 6;\n this.col = 3; \n }", "resetJump() {\n this.z = 0;\n this.verticalVelocity = null;\n }", "reset() {\n this.x = this.boardWidth / 2;\n this.y = this.boardHeight / 2;\n // experiment with these values to change ball movement\n this.vy = 0;\n // try FOR loop instead of \"while\", for fun\n while (this.vy === 0) {\n this.vy = Math.floor(Math.random() * 10 - 5);\n }\n this.vx = this.direction * (6 - Math.abs(this.vy));\n }", "function resetPhys() {\n \n // Reset key variables\n xSpeed = 0;\n ySpeed = 0;\n jumped = false;\n prevX = 0;\n prevY = 0;\n onIce = false;\n \n}" ]
[ "0.76029015", "0.72110623", "0.71432066", "0.71422046", "0.7086905", "0.70512563", "0.6945021", "0.694369", "0.6871926", "0.6806885", "0.6778953", "0.6709974", "0.6697391", "0.66891557", "0.6689043", "0.6657853", "0.66252583", "0.66165596", "0.6531836", "0.65208423", "0.65153736", "0.6506566", "0.64518356", "0.6448034", "0.6421001", "0.6388829", "0.63838303", "0.63698846", "0.6369715", "0.63685244", "0.6351399", "0.6333743", "0.6296406", "0.6260872", "0.62543535", "0.624496", "0.624496", "0.62419915", "0.62412155", "0.6224352", "0.6216756", "0.6216725", "0.6214083", "0.6210509", "0.62094486", "0.6186675", "0.6168763", "0.61674774", "0.61645573", "0.61473703", "0.61452776", "0.61404526", "0.6123929", "0.6122927", "0.6122855", "0.61169326", "0.6116177", "0.6107612", "0.61019456", "0.6098022", "0.6096208", "0.6093788", "0.609315", "0.60869896", "0.6086814", "0.60762095", "0.6057095", "0.60524", "0.60486484", "0.6046885", "0.60438347", "0.6043786", "0.6026205", "0.60183996", "0.6008421", "0.6002587", "0.59997916", "0.5989348", "0.59892553", "0.5988958", "0.5987564", "0.5982874", "0.5974644", "0.59700745", "0.59693563", "0.5967641", "0.5961527", "0.59582114", "0.59561944", "0.5955606", "0.59431255", "0.5934257", "0.59334964", "0.59332204", "0.59153575", "0.5909203", "0.5908781", "0.5904257", "0.58973736", "0.58956456", "0.58888435" ]
0.0
-1
when the component is mount, we call the api toget the previously saved infos about this job offer and update the local state to update the form
componentDidMount() { AuthentificationStore.addChangeListener(this._onChange.bind(this)); fetch("/jobOffers/offer/" + this.props.match.params.id) .then(function(response) { return response.json(); }) .then(body => { this.setState({ jobOffer: body }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "prepopulateJobBag(){\n \n const {history,match} = this.props;\n const jobId = parseInt(match.params.jobid);\n\n // Check if the job number id\n\n if(jobId!=\"NaN\" && jobId>0){\n const req = this.props.settings.setting.react_api_folder+'/manage_jobs_actions/manage_jobs_get.php?job_id='+jobId;\n\n console.log(\"Prepopulate Request: \", req);\n\n // Acquire from Prism get API\n axios.get(req).then(function(res){\n const job = res.data.job;\n\n // ----------------------------\n // Preselect the programmer\n let programmer = \"\";\n if(\"programmer\" in job){\n programmer = job.programmer.userid;\n }\n // ----------------------------\n\n // CONTINUE WITH EDITING EXISTING\n if(res.data.error==0 ){\n this.setState((prevState, props) => (\n {\n job: job ,\n programmers_selection: programmer\n }\n ), ()=>\n {\n // Check the programmer section the form\n this.getApiProgrammersSection();\n }\n );\n\n console.log(\"Prepopulate Result: \",job);\n\n\n // VALIDATION INITIALIZATION 2: FOR EDITING\n $('.ui.form')\n .form({\n on: 'blur',\n fields: {\n job_title: {\n identifier: 'job_title',\n rules: [\n {\n type : 'empty',\n prompt : 'Please enter job title'\n }\n ]\n },\n job_departments: {\n identifier: 'job_departments',\n rules: [\n {\n type : 'empty',\n prompt : 'Please choose at least one department.'\n }\n ]\n }\n }\n });\n }else{\n // NO AVAILABLE JOB WITH THE PARTICULAR JOB ID REDIRECT \n history.push('/managejobs/newedit/');\n }\n\n }.bind(this))\n\n // If length of the path name is 4, somebody is trying to edit something that doesnt exist.\n // redirect them\n }\n\n }", "function setJobDetails(){\n let jobId = JobManager.getCurrentJobId();\n let jobOffer = JobManager.getJobOffer(jobId);\n document.getElementById('jobTitle').innerText = jobOffer.jobTitle;\n document.getElementById('jobType').innerText = jobOffer.jobType;\n document.getElementById('description').innerText = jobOffer.description;\n document.getElementById('skills').innerText = jobOffer.skills;\n document.getElementById('minYears').innerText = jobOffer.minYears;\n document.getElementById('maxYears').innerText = jobOffer.maxYears;\n document.getElementById('minSalary').innerText = jobOffer.minSalary;\n document.getElementById('maxSalary').innerText = jobOffer.maxSalary;\n document.getElementById('location').innerText = jobOffer.location;\n document.getElementById('noOfVacancy').innerText = jobOffer.noOfVacancy;\n document.getElementById('qualification').innerText = jobOffer.qualification;\n}", "componentDidMount(){ this.updateForm( ) }", "onSubmit(e) {\n e.preventDefault();\n\n Axios.get(`http://localhost:3001/productOffer/getProductOfferByproductId/${this.state.selectedProduct}`)\n .then(response => {\n this.setState({ existingOffer: response.data.data });\n\n if (this.state.existingOffer.length === 1) {\n alert('Product already has ongoing offer!!');\n window.location = \"/viewProductOffers\";\n } else {\n\n let productOffer = {\n \"product\": this.state.selectedProduct,\n \"productName\": this.state.productInfo.productName,\n \"productPrice\": this.state.productInfo.productPrice,\n \"productDiscount\": this.state.productInfo.productDiscount,\n \"offerPrice\": this.state.offerAmount,\n \"offerDiscount\": this.state.offerDiscount,\n \"offerDescription\": this.state.offerDescription,\n \"offerEndDate\": this.state.offerEndDate,\n \"offerStatus\": this.state.offerStatus,\n \"productImage\": this.state.productInfo.productImage,\n \"productDescription\": this.state.productInfo.productDescription\n }\n Axios.post('http://localhost:3001/productOffer/addProductOffer', productOffer)\n .then(response => {\n alert('Product Offer Details Added Successfully');\n window.location = \"/viewProductOffers\";\n }).catch(error => {\n alert(error.message);\n })\n }\n }).catch(error => {\n alert(error.message);\n })\n }", "async componentDidMount(){\n if(this.state.service_id){\n await this.fetchInfoServices() \n this.fetchinfoCheckDays() \n }else{\n this.setState({\n form:{\n ...this.state.form,\n address: \"Madrid\",\n latitude: 40.416775,\n longitude: -3.703790\n }\n })\n }\n }", "handleUpdate(){\n this.closeForm();\n this.setState({showMoreInfo: false, classStyle: \"firstDivStyle\"});\n sessionStorage.setItem('showMoreInfo', 'false');\n sessionStorage.setItem('classStyle', 'firstDivStyle');\n if(this.state.searchingApplicants){\n let searchInputSess = sessionStorage.getItem('searchInput');\n this.searchApplicants(searchInputSess);\n } else {\n fetch('http://localhost:8080/applicant-tracking-systems-1.0-SNAPSHOT/applicants', {\n method: 'GET',\n mode: 'cors',\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json',\n 'Origin' : 'http://localhost:3000',\n }\n })\n .then((response) =>\n {\n console.log('response', response); return response.json()\n })\n .then((json) =>\n {\n console.log('json: ', json);\n this.setState({applicants: json});\n })\n .catch((e) => console.log(e)) ;\n }\n }", "submitNewEndPointForm(data){\n console.info(\"submitNewEndPointForm\",data);\n\n //get backendTypeName from ID\n let backendTypeName;\n let arr = this.props.backEndDetection.tableData.filter(function(val) { \n return val.id == data.backendTypeId;\n });\n if(arr.length !=0)\n backendTypeName = arr[0].type.href;\n \n //get fqm and desc if not custom by parsing data.fqm\n if(data.customFQMToggle != true && data.fqm != undefined)\n {\n var parsedObj = Object.assign({},JSON.parse(data.fqm));\n data.fqm = parsedObj.fqm;\n data.desc = parsedObj.desc;\n }\n //calling action for updating \n this.props.addNewBackendPoint(data,this.props.params.profileId,this.makeRunTimeChange);\n this.handleCloseNewendPoint();\n \n}", "submitStatus(){\n var formData = new FormData();\n formData.append(\"admin_email\", this.props.user.email);\n formData.append(\"title\", this.props.status_form.title);\n formData.append(\"content\", this.props.status_form.content);\n formData.append(\"status\", this.props.status_form.status);\n this.props.setStatusSaveLoading(true); //set loading to true, set it to false after response is complete\n fetch('http://helpdesk.dev/api/tickets/'+this.props.ticket_id+'/status', {\n method: 'POST',\n headers: {\n 'Accept': 'application/json'\n },\n body: formData\n }).then(response=>response.json())\n .then(responseJson=>{\n console.log(responseJson);\n this.props.setStatusSaveLoading(false);\n this.props.requestStatusError(false);\n if(responseJson.status === 'OK'){\n\n this.props.pushStatus(responseJson.body.status); //push the newly created status for displaying purposes\n\n //clear the form\n this.props.setStatusTitle('');\n this.props.setStatusContent('');\n this.props.setStatusStatus('');\n }else{\n this.props.requestStatusError();\n }\n }).catch(err=>{\n this.props.setStatusSaveLoading(false);\n console.log(err)\n this.props.requestStatusError();\n }) \n }", "handleSubmit(e){\n this.setState({showloader: ''});\n e.preventDefault();\n axios.get('devicefromuniqueid/'+this.state.unique_id)\n .then(response => {\n this.setState({\n panel_display: '',\n panel_message: response.data.msg,\n panel_show_button: response.data.isFree == 1 ? '' : 'd-none',\n panel_response_color: response.data.isFree == 1 ? 'success' : 'danger',\n device: response.data.device,\n showloader: 'd-none',\n\n });\n\n })\n\n\n }", "componentWillMount() {\n //Method utk membuat perubahan\n //Method dari Store ke Component\n museumFormStores.on(\"change\", () => { this.setState( { \n listNegara: museumFormStores.getListNegara(),\n form: museumFormStores.getAddMuseumVars().form\n })\n });\n }", "function submit() {\n axios.post('/api/jobs', {\n company_name: company,\n job_title: job_title,\n status: status,\n color: color\n })\n .then(res => {\n props.add(res.data);\n props.hide();\n })\n }", "componentWillMount() {\r\n axios.get('/api/questions/stages/')\r\n .then((response) =>{\r\n this.setState({stageField: response.data});\r\n })\r\n .catch(function(error) {\r\n console.log(error);\r\n });\r\n if (this.props.match.params.id) {\r\n axios('/api/questions/questions/' + this.props.match.params.id)\r\n .then(function(response) {\r\n return response.data;\r\n })\r\n .then((json) => {\r\n this.setState({\r\n inputName: {value: json.name},\r\n inputHint: {value: json.hint},\r\n inputStage: {value: json.stage.id},\r\n pushMethod: 'PUT',\r\n pushURL: '/api/questions/questions/' + this.props.match.params.id,\r\n submitButton: {label: 'Edit Section'},\r\n });\r\n axios.get('/api/questions/stages/' + this.state.inputStage.value + '/')\r\n .then((response) => {\r\n this.setState({inputStage: {\r\n value: response.data.id,\r\n json: response.data,\r\n } });\r\n });\r\n });\r\n }\r\n }", "onSubmit(e) {\n e.preventDefault();\n\n let updProductOffer = {\n \"offerPrice\": this.state.offerAmount,\n \"offerDiscount\": this.state.offerDiscount,\n \"offerDescription\": this.state.offerDescription,\n \"offerEndDate\": this.state.offerEndDate,\n \"offerStatus\": this.state.offerInfo.offerStatus\n }\n Axios.put(`http://localhost:3001/productOffer/updateProductOffer/${this.props.match.params.id}`, updProductOffer)\n .then(response => {\n alert('Offer details Updated Successfully!!');\n window.location = \"/viewProductOffers\";\n }).catch(error => {\n alert(error.message);\n })\n\n }", "searchJob(event) {\n event.preventDefault();\n this.setState({searching: true, message: null, jobList: []});\n const query = this.state.job.query;\n const location = this.state.job.location;\n const queryString = JobSearch.getQueryString({query, location});\n api.initJobSearch({queryString}).then(\n resp => {\n this.setState({message: `Loading... Your results will appear here`});\n return api.pollResults({pollId: resp.pollId})\n }\n ).then(\n resp => {\n const appliedJobs = JSON.parse(localStorage.getItem(storageKey));\n const res = resp.map(eachJob => {\n let index = appliedJobs.findIndex(applied => applied === eachJob.id);\n eachJob.applied = index > -1;\n return eachJob;\n });\n this.setState({searching: false, jobList: res, message: null});\n }\n ).catch(\n err => {\n console.error(err);\n this.setState({searching: false, message: err});\n }\n );\n }", "componentDidMount() {\n Axios.get(`http://localhost:3001/productOffer/getProductOfferById/${this.props.match.params.id}`)\n .then(response => {\n //console.log('RESPONSE>>', response.data.data);\n this.setState({ offerInfo: response.data.data });\n\n this.setState({ offerAmount: this.state.offerInfo.offerPrice });\n this.setState({ offerDiscount: this.state.offerInfo.offerDiscount });\n this.setState({ offerDescription: this.state.offerInfo.offerDescription });\n this.setState({ offerStatus: this.state.offerInfo.offerStatus });\n this.setState({ offerEndDate: this.state.offerInfo.offerEndDate });\n this.setState({ productId: this.state.offerInfo.product });\n\n if (this.state.offerStatus === 'Active') {\n this.setState({ buttonlabel: 'Deactivate Offer', labelcolor: 'green' })\n }\n\n }).catch(error => {\n console.log(error.message);\n })\n }", "retreiveTransformAndSaveData() {\n this.setState({submitClicked: true});\n getInfoFromApi(this.state.userName)\n .then(transformedData => this.setState({payloads: transformedData}))\n .catch((error) => this.setState({errorMessage: error})) \n }", "componentDidUpdate() {\n try {\n if (\n this.state.isFirstTime &&\n this.props.attributes &&\n !this.props.attributes[\"is_lookup_field\"]\n ) {\n /**\n * If form data does not exists, then fetch locaiton\n * else check the location data, if location exists render location\n * else fetch the location\n */\n if (!isEmpty(this.props.formData)) {\n const { value } = this.props.attributes;\n if (isEmpty(value)) {\n this.setState({\n isPickingLocation: true,\n isFirstTime: false,\n });\n this.promptForEnableLocationIfNeeded();\n } else {\n this.setState({\n isPickingLocation: false,\n isFirstTime: false,\n });\n }\n } else {\n this.setState({ isPickingLocation: true, isFirstTime: false });\n this.promptForEnableLocationIfNeeded();\n }\n }\n } catch (error) {\n console.warn(error);\n }\n }", "handleConfigFormSubmit(e){\n e.preventDefault();\n this.setState({\n saveFormIsDisabled:true\n })\n api.saveData(this.state.formFields)\n .then(res=>{\n this.setState({\n formID: res\n });\n \n }) \n .catch(error=>{\n console.log(error);\n alert(error);\n })\n\n \n }", "componentWillMount() {\n super.componentWillMount();\n //fetch no que é necessario\n // this.setState({ sendObject: this.props.sendControlModule, showProgress: false });\n this.props.fetchDefault(request.fetchPlaces);\n\n this.setState({ \n saveRequest: request.sendControlModule,\n showProgress: false\n });\n }", "save(e) {\r\n e.preventDefault();\r\n axios.put('https://pilotsapp.herokuapp.com/project/updateProject/' + this.state.project._id, {\r\n ...this.state.project\r\n }).then(response => {\r\n console.log(response.data);\r\n NotificationManager.success(`'${this.state.project.title}' has been updated successfully`, '', 3000)\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n NotificationManager.error('An error has occured', 'Error', 3000)\r\n });\r\n \r\n this.setState({\r\n edit: false,\r\n loading: true\r\n });\r\n }", "handleDataLoaded() {\r\n this.setState({submitted: true});\r\n }", "componentDidMount() {\n this.props.removeCurrentProductListing();\n\n adapter.get(\"product_listings\")\n .then(response => response.json())\n .then(data => this.props.updateProductListings(data));\n }", "completeAndUpdate(updatedPlan) {\n axios.put(`http://localhost:3000/api/MasterPlans/`+updatedPlan.masterPlanId+`/subPlans/`+updatedPlan.id, updatedPlan)\n .then(() => {\n this.onLoad(this.state.setType);\n })\n }", "handleSubmit(e){\n\n this.setState({pollValue:'',pollName:'',elements:[]});\n }", "componentDidMount() {\n this.getUser()\n API.getJob(this.props.match.params.id)\n .then(res => this.setState({ job: res.data }))\n .catch(err => console.log(err));\n\n \n }", "getApiJobDepartments(){\n\n // Check if the job is recurring cause they will be multiple programming section for a recurring job\n // And if you are creating a job dont show the job departments as you dont have a job department created yet.\n if(this.state.job.job_type=='recurring' && this.state.job.job_id!=0){\n const num_days = (this.state.recurring_days_ago_selection!=\"\")?this.state.recurring_days_ago_selection:0;\n const req = this.props.settings.setting.react_api_folder+'/misc_actions/get_jobbags_departments.php?num_days_ago=' + num_days + '&job_id=' + this.state.job.job_id + '&department_id='+ this.props.programming_dept_id + '&dep_id=' + this.state.dep_id;\n\n console.log(\"DEPARTMENT REQUEST: \", req);\n\n const prom_programmers = axios.get(req);\n prom_programmers.then((res)=>{\n const departments = res.data.payload;\n const programmers_list = res.data.list;\n\n this.setState((prevState, props) => (\n {recurring_departments_jobs: departments, programmers_list: programmers_list}\n ), ()=>{\n\n // after preloading pre-select the department\n if(this.state.dep_id!=='undefined'){\n const programmer = programmers_list[this.state.dep_id];\n const programmers_selection = (programmer!=null)? programmer.login_id: \"\";\n\n this.setState((prevState, props) => (\n {recurring_departments_job_selection: parseInt(this.state.dep_id), programmers_selection}\n ));\n }\n });\n\n }\n )\n }\n }", "_submitForm() {\n\t\tconst { inputName, inputBio, inputLocation, inputImage } = this.state;\n\t\tconst { updateAbout, userId, getAbout, routeId } = this.props;\n\t\tupdateAbout(userId, inputName, inputBio, inputLocation, inputImage, (success) => {\n\t\t\tif (success) {\n\t\t\t\tthis._closeEdit();\n\t\t\t\tgetAbout(routeId); // Might be redundant\n\t\t\t}\n\t\t});\n\t}", "componentWillReceiveProps(nextProps){\n\n if (nextProps.manage_job_add_new_edit && nextProps.manage_jobs.resp) {\n const newData = nextProps.manage_jobs.resp;\n const currentJob = this.state.job;\n\n console.log(\"Component will received from api: \",nextProps);\n const job = newData.job;\n const msg = newData.msg;\n const err = newData.error;\n\n\n // UPDATE THE STATE NOW TO THE NEWLY CREATED JOB\n this.setState((prevState, props) => (\n {\n job: job ,\n isSaving: 0,\n msg,\n err\n }\n ));\n\n }\n\n }", "componentDidMount() {\n fetch(`${baseURL}/jobs`)\n .then(response => response.json())\n .then(data => {\n this.setState({ jobsData: data })\n })\n }", "componentDidMount() {\n axios.get('https://localhost:44383/api/job/RetrieveJobs', {\n headers: {\n 'Content-Type': 'application/json'\n }\n }).then(res => {\n if (res.data.status === \"invalid\") {\n this.setState(prevstate => ({\n errors: {\n ...prevstate.errors,\n noJobs: 'No jobs found!',\n },\n }));\n }\n else {\n this.setState(prevState => ({\n Data: res.data.jobs.result, \n })) \n \n }\n });\n \n }", "onSubmit(question_id) {\n console.log(question_id)\n axios.put(`http://161.35.216.50:3001/questions/update/${question_id}`).then((res) => {\n console.log('res', res)\n this.setState({ bolean: false })\n })\n // calling the fetch function to update dinamically without refreshing the page\n this.props.fetch()\n }", "prepopulateSelect(jobsKey){\n let jobs = JSON.parse(JSON.stringify( this.state.jobsFound));\n let job = jobs[jobsKey];\n const newJob = Object.assign({},job,{\n job_id: 0,\n job_comments: this.state.job.comments,\n job_type: this.state.job.job_type,\n job_departments: this.state.job.job_departments\n });\n\n this.setState((prevState,props)=>{\n return ({\n job: newJob\n })\n }\n );\n }", "async componentDidMount() {\n try {\n let data = await JoblyApi.getCompany(this.props.handle);\n this.setState({\n companyData: data,\n loading: false\n });\n } catch (err) {\n this.setState({\n error: err\n });\n }\n }", "requestForCommissionAPI() {\n if (this.state.text.trim().length > 0) {\n this.setState({ spinnerVisible: true })\n var reqestParam = {};\n reqestParam.user_id = Utility.user.user_id + ''\n reqestParam.artist_id = this.state.artist.artist_id + ''\n reqestParam.description = this.state.text + ''\n WebClient.postRequest(Settings.URL.ADD_JOB_REQUEST, reqestParam, (response, error) => {\n this.setState({ spinnerVisible: false });\n // console.log(response)\n if (error == null) {\n Utility.showToast(Utility.MESSAGES.request_added_success)\n this.leftBtnTaaped()\n\n } else {\n Utility.showToast(error.message);\n }\n });\n } else {\n Utility.showToast(Utility.MESSAGES.please_enter_des)\n }\n }", "fetchCompany() {\n fetch('http://localhost:8000/API/forms/company/' + this.props.params, {\n method: \"GET\"\n })\n .then(res => res.json())\n .then(res => {\n\n //Store response json to this state\n this.setState({\n currentCompany: res.companyForm\n })\n console.log(res.companyForm)\n })\n\n }", "newPlanSubmit(plan) {\n console.log(this.state);\n console.log(`new plan from submit: ${JSON.stringify(plan)}`);\n //pushes the plan from the form into the array in the state\n this.state.plans.push(plan);\n //re-runs handle plan\n this.handlePlans();\n }", "handleSubmit(e) {\n e.preventDefault();\n this.setState({ loading: true });\n\n profileEducationData(this.state).then(\n (response) => {\n console.log(response)\n if (response.success) {\n this.props.profileThis.setState({ activeMenu: \"Experience\" });\n } else {\n this.setState({ loading: false });\n }\n },\n (error) => this.setState({ error, loading: false })\n );\n }", "submitData(data) {\n\n let url = this.props.formConfig.data.storageUrl;\n\n if (this.props.recordId) {\n url += '/' + this.props.recordId;\n }\n\n if (this.props.recordId) {\n this.formDataLoader.put(url, data).then((response) => {\n this.props.onSuccess(response.data);\n\n if (!this.props.keepDisabled) {\n this.setState({isLoading: false});\n }\n }).catch((e) => {\n this.handleLoaderError(e);\n });\n } else {\n this.formDataLoader.post(url, data).then((response) => {\n this.props.onSuccess(response.data);\n\n if (!this.props.keepDisabled) {\n this.setState({isLoading: false});\n }\n }).catch((e) => {\n this.handleLoaderError(e);\n });\n }\n }", "constructor(props){\n //Call the constrictor of Super class i.e The Component\n super(props);\n //maintain the state required for this component\n this.state = {\n name : \"\",\n location : \"\",\n datein : \"\",\n dateout : \"\",\n guests :\"\",\n message : \"\",\n description: '',\n selectedFile: '',\n bedrooms:'',\n bathrooms:'',\n type:'',\n amenities:'',\n price:'',\n descriptionprop:'',\n authFlag : false\n\n }\n //Bind the handlers to this class\n this.nameChangeHandler = this.nameChangeHandler.bind(this);\n this.locationChangeHandler = this.locationChangeHandler.bind(this);\n this.checkinChangeHandler = this.checkinChangeHandler.bind(this);\n this.checkoutChangeHandler = this.checkoutChangeHandler.bind(this);\n this.guestsChangeHandler = this.guestsChangeHandler.bind(this);\n this.bedroomsChangeHandler = this.bedroomsChangeHandler.bind(this);\n this.bathroomsChangeHandler = this.bathroomsChangeHandler.bind(this);\n this.typeChangeHandler = this.typeChangeHandler.bind(this);\n this.amenitiesChangeHandler = this.amenitiesChangeHandler.bind(this);\n this.priceChangeHandler = this.priceChangeHandler.bind(this);\n this.descriptionChangeHandler = this.descriptionChangeHandler.bind(this);\n this.submitProperty = this.submitProperty.bind(this);\n }", "componentDidMount(){\n\t\t// this.initDate();\n this.getAdminInfo();\n\t\t// this.formRef.current.setFieldValue({sex:this.state.sex});\n\n\t}", "changeValue(e){\n let input_name = e.target.name;\n let input_value= e.target.value;\n\n let job = Object.assign(this.state.job,{});\n job[input_name] = input_value;\n\n\n this.setState((prevState,props)=>{\n return ({job});\n }\n ); // Update the fields of the data\n }", "handleDepartmentChange(e,{value}){\n\n const prevJobDepartments = _.cloneDeep(this.state.job.job_departments);\n const curJobDepartments = {value}.value;\n const job = Object.assign({},this.state.job,{job_departments: curJobDepartments });\n\n this.setState((prevState, props) => ({\n job\n }), this.getApiProgrammersSection); // Initialize assign programmers on change\n\n }", "componentDidMount() {\n let searchInputSess = sessionStorage.getItem('searchInput');\n let showMoreInfoSess = sessionStorage.getItem('showMoreInfo') === 'true';\n let showEditFormSess = sessionStorage.getItem('showEditForm') === 'true';\n let searchingApplicantsSess = sessionStorage.getItem('searchingApplicants') === 'true';\n let classStyleSess = sessionStorage.getItem('classStyle');\n let chosenApplicantIdSess = sessionStorage.getItem('chosenApplicantId');\n let applicantIdToEditSess = sessionStorage.getItem('applicantIdToEdit');\n if(!showMoreInfoSess)\n classStyleSess = 'firstDivStyle';\n this.setState({showMoreInfo: showMoreInfoSess, showEditForm: showEditFormSess, searchingApplicants: searchingApplicantsSess,\n classStyle: classStyleSess, chosenApplicantId: chosenApplicantIdSess, applicantIdToEdit: applicantIdToEditSess});\n\n if(searchingApplicantsSess){\n this.searchApplicants(searchInputSess);\n } else {\n fetch('http://localhost:8080/applicant-tracking-systems-1.0-SNAPSHOT/applicants', {\n method: 'GET',\n mode: 'cors',\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json',\n 'Origin' : 'http://localhost:3000',\n }\n })\n .then((response) =>\n {\n console.log('response', response); return response.json()\n })\n .then((json) =>\n {\n console.log('json: ', json);\n this.setState({applicants: json});\n })\n .catch((e) => console.log(e)) ;\n }\n if(showMoreInfoSess)\n this.handleMoreInfo(chosenApplicantIdSess);\n if(showEditFormSess)\n this.handleEdit(applicantIdToEditSess);\n }", "componentWillMount() {\n const entityId = this.props.entityId;\n const product = data.items[entityId];\n this.setState({form:product});\n }", "componentDidMount() {\n this.getFields().then(() => {\n this.props.initialAvailableFields(this.state.fields);\n });\n this.props.addCriteria({\n id: 0,\n field: \"\",\n operator: \"\",\n values: \"\",\n });\n }", "updateProject() {\n let { title, description, URL } = this.state.editProjectData;\n axios\n // adding the selected project id onto the put request URL\n .put(\"/api/\" + this.state.editProjectData.id, {\n title,\n description,\n URL\n })\n .then(res => {\n this.componentDidMount();\n console.log(res.data);\n\n this.setState({\n editProjectModal: false,\n editProjectData: {\n title: \"\",\n description: \"\",\n URL: \"\"\n }\n });\n });\n }", "constructor(props) {\n super(props);\n this.state = {\n email: cookie.load(\"cookie2\"),\n itemId: 0,\n itemName: \"\",\n itemDescription: \"\",\n price: \"\",\n section: \"\",\n restaurantId: \"\",\n uploadedPhotos: [],\n uploadedPhotoLimit: 1,\n previewuploadedPhotos: [],\n inputPhotos: [],\n alert: null,\n posted: false\n };\n\n this.itemNameChangeHandler = this.itemNameChangeHandler.bind(this);\n this.itemDescriptionChangeHandler = this.itemDescriptionChangeHandler.bind(\n this\n );\n this.priceChangeHandler = this.priceChangeHandler.bind(this);\n this.sectionChangeHandler = this.sectionChangeHandler.bind(this);\n\n this.onDrop = this.onDrop.bind(this);\n this.addItem = this.addItem.bind(this);\n this.handleValidation = this.handleValidation.bind(this);\n this.submitListing = this.submitListing.bind(this);\n }", "onChangeLiabilityDetails(response){\n this.setState({\n expenseDetailsSet: true\n });\n }", "componentDidMount(){\n const data = {\n companyid : sessionStorage.getItem(\"companyid\")\n \n }\n axios.post('http://localhost:3000/company/getalljobs',data)\n .then((response) => {\n console.log(response)\n //update the state with the response data\n this.setState({\n jobdetails : this.state.jobdetails.concat(response.data) \n });\n });\n }", "componentWillMount() {\n this.updateTicket();\n }", "componentDidMount(){\n console.log(\"--componentDidMount() --> fetching data!\");\n \n try {\n const json = localStorage.getItem('options');\n const options = JSON.parse(json);\n \n if (options) {\n this.setState(() => ({ options: options }));\n }\n } catch (e) {\n \n }\n }", "onSubmit(e) {\n // Prevent default submission\n e.preventDefault();\n\n // Create center object to save\n const center = {\n centerName: this.state.centerName,\n description: this.state.description,\n hours: this.state.hours,\n cost: this.state.cost,\n numCourts: this.state.numCourts,\n addressLink: this.state.addressLink,\n mapLink: this.state.mapLink,\n image: this.state.image,\n };\n\n // Send to back-end, look at routes/books.js\n axios\n .post(`${API_URL}/update/${this.props.match.params.id}`, center)\n .then(res => console.log(res.data))\n .catch(err => console.log(err));\n\n // Clear the fields\n this.setState({\n centerName: '',\n description: '',\n hours: '',\n cost: true,\n numCourts: 1,\n addressLink: '',\n mapLink: '',\n image: '',\n });\n }", "fetch() {\n\t\tconst t = this;\n\t\tconst l = new Loader();\n\n\t\tl.show();\n\n\t\tfetch(t.formEl.action, {\n\t\t\tmethod: 'post',\n\t\t\tbody: t.getData()\n\t\t}).then(function (response) {\n\t\t\treturn response.json();\n\t\t}).then(function (data) {\n\t\t\tl.hide();\n\t\t\tMessage.show(data.text);\n\t\t});\n\t}", "handleUpdate() {\n // if profiles and candidate dd exist show the popups/apicall res\n if (this.state.profile.profiles) {\n if (this.state.profile.profiles.candidate_id) {\n\n const { candidate_id } = this.state.profile.profiles;\n //console.log(candidate_id);\n\n const token = getLocalStorage();\n let config = {\n headers: { 'Authorization': token }\n };\n axios.get(`http://vdab.i4m.be/profiles/profileZoho/${candidate_id}`, config)\n .then((response) => {\n this.customDialog.show()\n\n this.setState({\n profileZoho: response\n });\n\n })\n .catch((err) => {\n console.log(err);\n })\n } else {\n let errorMsg = \"De volgende profiel bestaat niet in Zoho, gelieve die eerst toe te voegen.\"\n alert(errorMsg)\n }\n } else {\n let errorMsg = \"Please select a profiel before trying to update its content.\"\n }\n }", "async componentDidMount() \n {\n this.mounted = true;\n document.title = \"Add business\"\n const user = getCurrentUser();\n this.setState({ formData: { business_owner_id: user[`user-id`] }, pageLoading: true });\n if(this.mounted)\n {\n try\n {\n const mainCategoryList = await getAllMainCategories();\n this.setState({ mainCategoryList: mainCategoryList.data });\n }\n catch(err)\n {\n console.log(err)\n }\n finally\n {\n this.setState({ pageLoading: false });\n }\n }\n }", "saveOrEdit(e){\n\n // e.preventDefault(); // Prevent form to be submitted naturally\n const jobData = Object.assign({},this.state.job,\n {\n selected_programming_dept: this.state.recurring_departments_job_selection,\n selected_programmer: this.state.programmers_selection,\n programming_dept_id: this.props.programming_dept_id\n });\n\n // Validate your Job creation here\n if($('.ui.form').form(\"is valid\")){\n \n this.setState((prevState, props) => ({isSaving: 1}) );\n this.props.manage_job_add_new_edit(this.props.settings,jobData);\n }\n\n }", "componentDidMount() {\n this.loadDepartmentsFromServer();\n this.loadUsersFromServer();\n if (this.props.edit){\n this.setState({\n acknowledger: this.props.editAccomplishment.acknowledger,\n department: this.props.editAccomplishment.department,\n recipient: this.props.editAccomplishment.acknowledged,\n chosenRecipientImg: this.props.editAccomplishment.acknowledgedImg,\n description: this.props.editAccomplishment.message,\n accomplishmentID: this.props.editAccomplishment._id\n });\n this.loadImageFromRecipientFromServer(this.props.editAccomplishment.acknowledged);\n }\n }", "componentDidMount() {\n API.editUser(localStorage.getItem(\"userId\"))\n .then(res => {\n this.setState({\n name: res.data.name,\n address1: res.data.address1,\n address2: res.data.address2,\n city: res.data.city,\n state: res.data.state,\n zip: res.data.zip,\n phone: res.data.phone\n })\n })\n .catch(err => console.log(err));\n }", "getSubmissionDetails() {\n // async componentDidMount() {\n console.log(\"** Called getSubmissionDetails...\")\n this.API_CLIENT.getSubmission(this.SUBMISSION_ID).then((data) => {\n\n this.setState({ ...this.state, submission_data: data });\n this.setState({ ...this.state, submissionStatus: data.submission_status });\n this.setState({ ...this.state, metadataStatus: data.metadata_status });\n this.setState({ ...this.state, summaryStatisticsStatus: data.summary_statistics_status });\n this.setState({ ...this.state, publication_obj: data.publication });\n this.setState({ ...this.state, publicationStatus: data.publication.status });\n\n if (data.created.user.name) {\n this.setState({ ...this.state, userName: data.created.user.name });\n }\n\n if (data.created.timestamp) {\n // Format timeStamp for display\n let createdTimestamp = new Date(data.created.timestamp);\n createdTimestamp = createdTimestamp.getFullYear() + \"-\" + (createdTimestamp.getMonth() + 1) + \"-\" + createdTimestamp.getDate()\n this.setState({ ...this.state, submissionCreatedDate: createdTimestamp });\n }\n\n if (data.status === 'VALID_METADATA') {\n this.setState({ ...this.state, isNotValid: false });\n }\n\n if (data.files.length > 0) {\n /** \n * Parse file metadata\n */\n const { summaryStatsFileMetadata,\n metadataFileMetadata,\n summaryStatsTemplateFileMetadata } = this.parseFileMetadata(data.files);\n\n /**\n * Set state based on type of file uploaded\n */\n if (summaryStatsFileMetadata.fileUploadId !== undefined) {\n this.setState({ ...this.state, fileUploadId: summaryStatsFileMetadata.fileUploadId })\n this.setState({ ...this.state, fileName: summaryStatsFileMetadata.fileName })\n this.setState({ ...this.state, fileValidationErrorMessage: summaryStatsFileMetadata.summary_stats_errors });\n }\n else {\n this.setState({ ...this.state, fileUploadId: metadataFileMetadata.fileUploadId })\n this.setState({ ...this.state, fileName: metadataFileMetadata.fileName })\n this.setState({ ...this.state, fileValidationErrorMessage: metadataFileMetadata.metadata_errors });\n }\n\n /**\n * Set data for Download Summary Stats template\n */\n if (summaryStatsTemplateFileMetadata.fileUploadId !== undefined) {\n this.setState({ ...this.state, summaryStatsTemplateFileUploadId: summaryStatsTemplateFileMetadata.fileUploadId });\n this.setState({ ...this.state, summaryStatsTemplateFileName: summaryStatsTemplateFileMetadata.fileName });\n }\n }\n }).catch(error => {\n console.log(\"** Error: \", error);\n });\n }", "handleQuantityUpdate() {\n const rootUrl = window.location.origin;\n const pathUrl = `/api/inventories/${this.state.item_id}`;\n const newUrl = rootUrl.concat(pathUrl);\n if (this.checkFilled()) {\n axios.put(newUrl, this.state)\n .then(res => {\n this.getInventories();\n })\n } else {\n this.setState({\n missing_info: true\n })\n }\n }", "handleSubmit(event){\n //prevent refresh\n event.preventDefault();\nif(this.state.formValue === ''){\n alert(\"please enter a value\");\nreturn;\n}\n//send data to API\n axios.post('https://kt-dev.outsystemscloud.com/PWABack/rest/BarCode/Post',\n {\n Code:this.state.formValue\n }).then(res => {\n console.log(res);\n this.setState({resValue:res.data});\n axios.get('https://kt-dev.outsystemscloud.com/PWABack/rest/BarCode/GetList')\n .then(response => {\n\n this.setState({user:response.data});\n })\n .catch(error => {\n console.log(error)\n })\n\n\n this.setState({formValue:''})\n\n }).catch(error => {\n\n navigator.serviceWorker.controller.postMessage(this.state.formValue)\n\n console.log(\"Offline sending data to SW\");\n console.log(this.state.offlineSubmitValue);\n db.table('formValues').add({Code:this.state.offlineSubmitValue,createdDate:Date.now()}).then(() =>{\n db.formValues.toArray( (array) =>{\n this.setState({offlineUser:array});\n console.log(this.state.offlineUser)\n })\n })\n\n this.setState({formValue:''})\n\n })\n\n\n}", "handleSubmit(){\n this.setState({ location: this.state.location }) \n\n // convert this.state values into a valid AirBnB URL parameter string\n var params = Object.keys(this.state).map((el)=>{\n return( this.state[el].length ? `&${el}=${this.state[el]}` : '' )\n }).join('')\n\n // call getApartments in api.js & get back a response\n api.getApartments(params)\n .then((res) =>{\n // checks if results were returned\n if(res.search_results.length){\n // console.log('BOOOOYYAAA: ', res.search_results)\n var apartment_ids = Object.keys(res.search_results).map((el)=>res.search_results[el].listing.id)\n console.log('apartments array: ', apartment_ids)\n\n // pass info to YesOrNo Component\n this.props.navigator.push({\n title: 'Here\\'s what we found!',\n component: YesOrNo,\n passProps: {\n user: this.props.user,\n apts: apartment_ids,\n homepage: this.props.homepage,\n },\n leftButtonTitle: 'Back',\n onLeftButtonPress: () => { this.props.navigator.pop() },\n rightButtonTitle: 'Logout',\n onRightButtonPress: () => {\n ref.unauth(); // Destroys User Auth\n this.props.navigator.popToTop();\n },\n })\n } else {\n alert('No Results Found! Please try again.')\n // reset text input fields\n }\n }).catch((err)=>console.log('ERROR getting listings from Search: ',err))\n\n }", "onJobSave() {\n var user = JSON.parse(sessionStorage.getItem('user'));\n var job = JSON.stringify({\n id : this.state.Job?.id,\n title : this.state.Job?.title,\n type : this.state.Job?.type,\n description : this.state.Job?.description,\n company : this.state.Job?.company,\n company_url : this.state.Job?.company_url,\n url :this.state.Job?.url,\n location : this.state.Job?.location,\n how_to_apply : this.state.Job?.how_to_apply,\n company_logo :this.state.Job?.company_logo,\n created_at :this.state.Job?.created_at,\n users_id : user[\"id\"]\n });\n\n axios.post('https://localhost:44383/api/job/SaveJob', job, {\n headers: {\n 'Content-Type': 'application/json'\n }\n }).then(res => {\n if (res.data.status === \"invalid\") {\n this.setState(prevstate => ({\n errors: {\n ...prevstate.errors,\n jobAlreadySaved: res.data.message,\n },\n }));\n }\n else {\n this.setState(prevstate => ({\n errors: {\n ...prevstate.errors,\n jobAlreadySaved: 'Job has been saved',\n },\n }));\n }\n });\n }", "applyJob(jobId) {\n this.state.appliedJobs.push(jobId);\n localStorage.setItem(storageKey, JSON.stringify(this.state.appliedJobs));\n let index = this.state.jobList.findIndex(eachJob => eachJob.id === jobId);\n this.state.jobList[index] = Object.assign(this.state.jobList[index], {applied: true});\n this.setState({\n currentJob: Object.assign({}, this.state.jobList[index])\n });\n\n }", "getData() {\n this.fetchDataFromAPI();\n this.setState({\n email: \"\",\n selectedTimes: [],\n errors: \"\",\n displayErrors: \"d-none\"\n });\n }", "componentDidMount() {\n // Get the latest Saved.\n helpers.getSaved().then(function (response) {\n if (response !== this.state.Saved) {\n this.setState({Saved: response.data});\n }\n }.bind(this));\n }", "updateJobState(event) {\n event.preventDefault();\n const field = event.target.name;\n let job=Object.assign({} , this.state.job);\n job[field] = event.target.value;\n return this.setState({job:job});\n }", "componentDidMount() {\n gettingSiteData(this.context.token, this.context.site)\n .then(response => {\n if (response[\"status\"] == \"error\" || response[\"status\"] == \"fail\") {\n this.props.setError(true,response[\"message\"])\n }\n else {\n let data = response[\"data\"]\n let selectData = this.selectProcessing(data)\n let reformatedData = this.dataProcessing(data[0][\"data\"])\n this.setState({ dataSelect: selectData, data: reformatedData, brutData: data });\n }\n })\n }", "componentDidMount(){\n this.setState({pageloading: false});\n\n // Update Totall Bill in case for setup requiring munimum purchases\n // this.brandListGet()\n // this.getAuthInfo();\n this.NeedToScanNumberUpdate()\n }", "submit() {\n //if one of the fields is missing, creates error message\n //notifies user and returns without submitting\n if (!this.state.type || !this.state.startDate || !this.state.endDate) {\n var error = 'Please fill out all Required Fields.\\n'\n if (!this.state.startDate){\n error += 'Missing Field: Start Date\\n';\n }\n if (!this.state.endDate){\n error += 'Missing Field: End Date\\n';\n }\n if (!this.state.type){\n error += 'Missing Field: Type\\n';\n }\n this.dropdown.alertWithType('error', '\\nError', error);\n return;\n }\n //if 0 hours have been requested, notifies user and returns without submitting\n if(this.state.hours === 0) {\n this.dropdown.alertWithType(\n 'error',\n '\\nError',\n 'No hours have been requested.\\n');\n return;\n }\n\n //picker returns value differently than how it is stored\n //in the jSON file so this value is parsed\n //and different information needed about it is returned\n\n //first letter of picker is returned to get information about it\n var type = this.state.type[0].toLowerCase();\n //info returned from this\n //ie. Sick Day, sickDay and sickDay: {available: 60, pending: 20, used: 50}\n var {typeName, objectName, typeObject} = this.getTypeInfo(type);\n\n //if there are enough available hours for this request\n\n if (typeObject.available >= this.state.hours) {\n\n //get the request info from the component level state\n var request = {\n status: this.state.status,\n note: this.state.note,\n requestedOn: moment().format('MM-DD-YYYY'),\n startDate: moment(this.state.startDate, 'MM-DD-YYYY').format('MM-DD-YYYY'),\n endDate: moment(this.state.endDate, 'MM-DD-YYYY').format('MM-DD-YYYY'),\n type: typeName,\n hours: this.state.hours,\n };\n\n //subtracts the requested hours from balances and adds to pending\n var newBalances = {\n available: typeObject.available - this.state.hours,\n pending: typeObject.pending + this.state.hours,\n approved:typeObject.approved,\n used: typeObject.used,\n }\n\n //calls action creator to update requests(adds request to request Array)in redux\n this.props.requestUpdate(request);\n //calls hours action creator to update balances object with new hours\n this.props.hoursUpdate({prop: objectName, value: newBalances});\n //notifies the user of a successful request\n this.dropdown.alertWithType('success', '\\nSuccess', 'Your request has been sent!\\n');\n } else{\n //notifies the user if they did not have enough hours to complete the request\n this.dropdown.alertWithType('error', '\\nError', 'You do not have enough ' + typeName + ' hours for this request!\\n');\n }\n }", "populateForm() {\n const {name, description, status} = this.props;\n this.setState({\n editName: name,\n editDescription: description,\n editStatus: status,\n editForm: true\n });\n }", "prepopulateFromPrism(event){\n\n this.setState({ isSearching: 1});\n let typeSearch = event.target.value;\n let jobsFound = this.state.jobsFound;\n\n\n // Create a delay when typing\n var timer;\n if(typeSearch.length>4){\n clearTimeout(timer);\n var ms = 200;\n timer = setTimeout(()=>{\n\n const reactApiPrePop = this.api_folder+'manage_jobs_prepopulate.php?q='+typeSearch;\n const promiseJobResult = axios.get(reactApiPrePop);\n console.log(\"Prepopulate URL: \", reactApiPrePop);\n\n promiseJobResult.then((res)=>{\n let jobs = res.data;\n\n console.log(\"Prepopulate: \",jobs);\n this.setState((prevState,props)=>{\n return {jobsFound: jobs,isSearching: 0}\n }\n );\n }\n )\n },ms);\n }else if(jobsFound.length>0){\n if(typeSearch.length<=4){\n this.setState((prevState,props)=>{\n return {jobsFound: [],isSearching: 0}\n }\n );\n }\n }\n\n }", "componentDidMount() {\n\n\t\tthis.global.showLoading();\n\t\tReq.post(URLS.GET_PHONE_PRICE, {\n\t\t\tcountry_code: this.data.country_code,\n\t\t\tcountry_no: this.data.country_no,\n\t\t\tregion_no: this.data.region_no,\n\t\t\tphoneNumber: this.data.phoneNumber,\n\t\t\tphone_type: this.data.phone_type,\n\t\t}).then(async (res) => {\n\t\t\tlet country: CountryDao = await this.countryService.getCountryWithCountry_code(this.data.country_code);\n\t\t\tthis.country_en = country.country_en;\n\t\t\tconsole.log(country);\n\t\t\tthis.global.dismissLoading();\n\t\t\tthis.dataFix(res.data);\n\t\t})\n\n\t\tthis.timerAct = setInterval(() => {\n\t\t\tthis.timer -= 1;\n\t\t\tif (this.timer <= 0) {\n\t\t\t\tthis.back();\n\t\t\t}\n\t\t}, 1000)\n\t}", "constructor(props){\n super(props)\n this.state={\n item: \"\",\n ammount: \"\",\n quantity: \"\",\n doner: \"\",\n email: \"\",\n date: \"\"\n }\n this.submitClick = this.submitClick.bind(this);\n this.handleChange= this.handleChange.bind(this);\n }", "updateFormFromStorage() {\n // check for data if none return\n let data = localStorage.getItem('formData');\n if (!data) {\n this.setTransactions([]);\n // Looks like new user without data show tips modal.\n setTimeout(() => $('#tipsModal').modal(), 10000);\n return;\n }\n this.setForm(JSON.parse(data));\n // set the interface (transactions) options on the form\n this.setFormTransactions(JSON.parse(localStorage.getItem('transactions')));\n }", "async updateData() {\n await this.sleep(1000);\n fetch('/getsystem').then(\n response => response.json()).then(data => this.setState({\n data: data\n })).catch(error => console.error(error));\n }", "onChangeShelf(e) {\n e.preventDefault();\n let self = this;\n let toShelf = e.target.value;\n BooksAPI.update(e.target.name, toShelf)\n .then((res) => {\n BooksAPI.getAll().then((books) => {\n self.setState({ mybooks: books });\n })\n }) \n }", "componentWillMount() {\n fetch('/api/form/active')\n .then(d => d.json())\n .then( forms => this.setState({ forms: forms.forms || [] }))\n .catch( e => console.log(e));\n }", "handleSave(event) {\n event.preventDefault();\n const data = new FormData(event.target);\n let ID = this.state.productId;\n\n //PUT request for Edit product.\n if (ID) {\n fetch('api/Products/Edit/' + ID, {\n method: 'PUT',\n body: data,\n }).then((response) => response.json())\n .then(data => {\n console.log(data);\n fetch('api/Products/Index')\n .then(response => response.json())\n .then(data => {\n console.log(data);\n let newList = data;\n this.setState({ productList: newList })\n });\n });\n }\n\n //POST request for Add product\n else {\n //console.log(\"Add product method is trigered\")\n fetch('api/Products/Create', {\n method: 'POST',\n body: data,\n }).then((response) => response.json())\n .then(data => {\n console.log(data);\n fetch('api/Products/Index')\n .then(response => response.json())\n .then(data => {\n console.log(data);\n let newList = data;\n this.setState({ productList: newList })\n });\n });\n }\n\n this.onCloseOverlaps();\n }", "updateBeer(e) {\n e.preventDefault(); // prevent browser-standard of reloading page on form submit\n\n // UPDATE/PUT API request, 2nd parameter = object with new details\n if(this.props.accessToken.length) {\n axios.put('/api/beers/' + this.props.match.params.id + '?access_token=' + this.props.accessToken, {\n name: this.state.name,\n brewery: this.state.brewery,\n alcoholContent: this.state.alcoholContent\n })\n .then((response) => { // successfull api call = beer updated in mongodb database\n this.props.history.push('/beers/' + this.props.match.params.id); // redirect to beer detail page after update\n })\n .catch((error) => { \n console.log(error);\n });\n }\n else {\n alert('Sorry, login first to update the beer!')\n }\n\n }", "updateBookingForm(state, payload) {\n state.bookingForm = payload\n state.bookingFormShow = true\n }", "componentDidMount() {\n if(this.props.formStructure) {\n this.props.buildForm(this.props.id, this.props.formStructure);\n } else {\n // TODO remove loading from redux action, and add it to this component\n this.props.loadForm(this.formLoader, this.props.id, this.props.url, this.props.recordId);\n }\n }", "constructor(props) {\n super(props);\n this.state = {\n datos: [],\n services: [],\n prices: [],\n loading: false,\n lisProv: []\n\n };\n this.handleChange = this.handleChange.bind(this);\n this.handleUpload = this.handleUpload.bind(this);\n this.handleChangeChk = this.handleChangeChk.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n }", "constructor(props) {\n super(props);\n this.state = {\n perPage: 10,\n markPaidVisible: false,\n statusVisible: false,\n selectedStatus: null,\n selectedOrder: null,\n showCreateCompany: false,\n showCompanyCreationForm: false,\n showTaxIdForm: false\n };\n\n this.prefillWithAppraiserInfo = props.prefillWithAppraiserInfo.bind(\n this, props.auth.getIn(['user', 'id'])\n );\n this.createAppraiserCompany = ::this.createAppraiserCompany;\n this.toggleCreateCompany = ::this.toggleCreateCompany;\n this.toggleTaxIdForm = ::this.toggleTaxIdForm;\n this.onChangeTaxId = ::this.onChangeTaxId;\n this.submitTaxId = ::this.submitTaxId;\n this.retrieveRecords = ::this.retrieveRecords;\n this.toggleMarkPaidDialog = ::this.toggleMarkPaidDialog;\n this.markOrderPaid = ::this.markOrderPaid;\n this.changeOrderStatus = ::this.changeOrderStatus;\n this.editSearch = ::this.editSearch;\n this.changePerPage = ::this.changePerPage;\n this.toggleStatusDialog = ::this.toggleStatusDialog;\n this.selectStatus = ::this.selectStatus;\n this.changeViewUnpaid = this.changeViewType.bind(this, 'unpaid');\n this.changeViewPaid = this.changeViewType.bind(this, 'paid');\n }", "componentDidMount () {\n this.setState({...this.props.state});\n this.getUserJobs();\n }", "constructor(props) {\r\n super(props);\r\n // Inputs:\r\n // props.configData\r\n // props.cwlTarget\r\n let paramModes={} // container for param mode (is_run_specific true/false)\r\n this.props.configData.params.map((p) =>\r\n paramModes[p.param_name] = p.is_run_specific\r\n )\r\n this.state = {\r\n actionStatus: \"none\",\r\n serverMessages: [],\r\n batchMode: false, \r\n run_names: [\"run1\", \"run2\", \"run3\"],\r\n param_modes: paramModes,\r\n job_name: \"new_job\",\r\n display: \"prep\", // one of prep, form_ssheet, from_html\r\n validateURIs: true,\r\n searchPaths: false,\r\n searchDir: \"Please fill\",\r\n includeSubbDirsForSearching: true,\r\n prevPath: null\r\n }\r\n\r\n // construct job_name:\r\n const date = new Date()\r\n let year = date.getFullYear().toString()\r\n let month = date.getMonth() + 1\r\n month = (month < 10) ? (\"0\" + month.toString()) : (month.toString())\r\n let day = date.getDate()\r\n day = (day < 10) ? (\"0\" + day.toString()) : (day.toString())\r\n const dateString = year + month + day\r\n let randomNumber = Math.round(Math.random()*1000)\r\n randomNumber = (randomNumber < 100) ? (\"0\" + randomNumber.toString()) : (randomNumber.toString())\r\n this.jobNameNum = dateString + \"_\" + randomNumber\r\n \r\n\r\n this.changeJobName = this.changeJobName.bind(this);\r\n this.changeParamMode = this.changeParamMode.bind(this);\r\n this.changeRunMode = this.changeRunMode.bind(this);\r\n this.changeRunNames = this.changeRunNames.bind(this);\r\n this.toggleParamForm = this.toggleParamForm.bind(this);\r\n this.changeSearchDir = this.changeSearchDir.bind(this)\r\n this.changeIncludeSubDirsForSearching = this.changeIncludeSubDirsForSearching.bind(this)\r\n this.changeEnableUriValidation = this.changeEnableUriValidation.bind(this)\r\n this.changeEnablePathSearching = this.changeEnablePathSearching.bind(this)\r\n this.changePrevPath = this.changePrevPath.bind(this)\r\n this.ajaxRequest = ajaxRequest.bind(this)\r\n }", "handleToUpdate() { //This is called by child nomination component\n this.setState({roomState: 1});\n currentIndex = 0\n axios.get('http://localhost:3000/room', {\n headers: {'Content-Type': 'application/json'},\n withCredentials: true\n }).then(res => {\n let options = res.data.options;\n for (let option of options) {\n this.state.tinder_cards.push(option.name);\n }\n for(let i=this.state.tinder_cards.length-1; i > -1; i--){\n this.state.cardResults.push({name: this.state.tinder_cards[i], result: \"False\"})\n }\n });\n this.forceUpdate();\n }", "constructor(props) {\n super(props);\n this.state = {\n userIdfound: false,\n formSubmitted: false,\n formChanged: false,\n\n formData: {\n user_id: \"\",\n timestamp: this.props.update_data\n ? this.props.update_data.EventTimestamp\n : \"\",\n name: this.props.update_data ? this.props.update_data.EventName : \"\",\n description: this.props.update_data\n ? this.props.update_data.EventDescription\n : \"\",\n status: this.props.update_data\n ? this.props.update_data.EventStatus\n : \"\",\n start_date: this.props.update_data\n ? this.props.update_data.EventSchedule.Start_time.slice(-10)\n : \"\",\n start_time: this.props.update_data\n ? this.props.update_data.EventSchedule.Start_time.slice(0, -11)\n : \"\",\n end_date: this.props.update_data\n ? this.props.update_data.EventSchedule.Stop_time.slice(-10)\n : \"\",\n end_time: this.props.update_data\n ? this.props.update_data.EventSchedule.Stop_time.slice(0, -11)\n : \"\",\n },\n };\n this.handleSubmit = this.handleSubmit.bind(this);\n this.handleChange = this.handleChange.bind(this);\n }", "async componentDidMount() {\n const { id } = this.props.match.params; //catching id in react from a link kind of get request\n const res = await axios.get(\n `https://jsonplaceholder.typicode.com/users/${id}`\n );\n\n //destructure to save editable res.data in var 'contact'\n const contact = res.data;\n\n //since all form inputs are in 'state', we reset input states, using present 'contact' values\n //present state now has new data. This why the input fields are filled on show\n this.setState({\n name: contact.name,\n email: contact.email,\n phone: contact.phone\n });\n //at this point, due the lifecycle-hook(componentDidMount) containing setState, anywhr these input names are found in our render(), they shld bear their respective values as say {name}, {email}, {phone}\n }", "constructor() {\n super()\n this.state = {\n username: \"Group25\",\n password: \"om1o6OBdD9ZwjuH\",\n api_access_point: 'https://849rs099m3.execute-api.ap-southeast-1.amazonaws.com/techtrek/pricing/current',\n api_key: 'nkIw7MUaN61afevVxT2eQjJTq86GH9O6oahdb3x7',\n account_key: '8ee1f2c6-ef52-4a6e-ae4c-1dbc5b6f0924',\n assetSymbol: '',\n price: '',\n timestamp: '',\n }\n }", "handleUpdate() {\n // Re-combining fields into one location field \n // for easy update, not currently in use\n var location = this.state.building + \".\" + this.state.floor + \".\" + this.state.room\n fetch(myPut + '/' + this.state.oneApp.id, {\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n method: 'put',\n body: JSON.stringify({\n title: this.state.title,\n meetingdate: this.state.meetingdate,\n meeting_user: this.state.meeting_user,\n note: this.state.note,\n location: this.state.location\n })\n })\n .then(() => this.fetchAppointment())\n alert('The appointment has been successfully updated')\n }", "componentDidMount () {\n this.setState({...this.props.state});\n this.getUserJobs(); \n }", "onSubmit(e) {\n e.preventDefault();\n const obj = {\n id: this.state.id,\n name: this.state.name,\n };\n\n axios.post(\"http://localhost:8080/api/bank/add\", obj);\n\n this.setState({\n id: \"\",\n name: \"\",\n });\n\n this.setState({ show: false });\n window.location.reload(false);\n }", "handleTakeInput(fullness, strength, weight) {\n this.setState({\n loading: true\n })\n /* when the promise is fulfilled and data is obtained (.then), setState.\n componentDidUpdate will trigger again, and render will trigger.\n */\n\n encodeURIComponent(JSON.stringify([this.state.fullness,\n this.state.weight, this.state.strength,\n this.state.numDrinks, this.state.gender]))\n\n\n this.setState({\n loading: false,\n fullness: '',\n strength: '',\n weight: '',\n gender: '',\n recommendation: 5,\n called: true,\n })\n }", "handleSubmit(event){\n event.preventDefault();\n var fd = new FormData();\n fd.append('title', event.target.titleField.value);\n fd.append('description', event.target.descField.value);\n fd.append('date', event.target.date.value);\n fd.append('event', event.target.event.value);\n fd.append('selectedFile', event.target.fileUpload.files[0]);\n\n const config = { headers: { 'Content-Type': 'multipart/form-data' } };\n\n var formElement = event.target;\n var componentThis = this;\n\n /*When the information is submitted, the formElement resets,\n and the states gets the value \"\" and null (setState).\n FormElement and componentThis is because\n this.blablalba refers back to axios.*/\n axios.post('http://35.176.156.147:3001/exhibitor_form_request', fd , config)\n .then(function() {\n alert('Tack för din registrering! Ert projekt granskas just nu och kommer finnas tillgängligt på sidan på utställningsdagen.');\n formElement.reset();\n componentThis.setState({\n selectedDate: null,\n titleField: '',\n descField: '',\n date: null,\n event: null,\n selectedFile: null,\n });\n })\n .catch((err) => {\n console.log(err);\n });\n }", "componentDidMount() {\n this.getReagents();\n this.getApparatus();\n if (this.props.edit) {\n //Retrieves experiment if an edit operation\n this.getExperiment(this.props.selection);\n } else {\n this.setState({ hidden: false });\n }\n }", "constructor(props) {\n super(props);\n this.submit = this.submit.bind(this);\n this.insertCallback = this.insertCallback.bind(this);\n this.formRef = null;\n this.state = {\n name: '',\n image: '',\n description:'',\n time: 0,\n servings: 0,\n tags:[''],\n ingredients: [{name: '', amount: ''}],\n directions: [''],\n };\n }", "componentWillMount() {\n // reset the local state of this view for the first time`\n this.props.dispatch(LeavesState.reset());\n\n Api.getLeavesDetails().then((resp) => {\n mCakeHrIdPaid = resp.result.cakeHR.id;\n mLeavesUsed = resp.result.cakeHR.custom_types_data['9931'].used;\n mLeavesAssigned = resp.result.cakeHR.custom_types_data['9931'].assigned;\n\n this.props.dispatch(LeavesState.updateUsedLeaves(mLeavesUsed));\n this.props.dispatch(LeavesState.updateRemainingLeaves(mLeavesAssigned));\n }).catch((e) => {\n console.log(e);\n });\n }", "teardownForm() {\n this.setState({\n formData: {\n title: '',\n location: '',\n description: '',\n contact: '',\n },\n activeOppId: null\n })\n }", "async handleSubmit(event) {\n event.preventDefault();\n event.target.reset();\n console.log(\"Form submitted!\");\n try {\n await fetch(`http://localhost:5000/form`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify(this.props.stateResourcesinfo)\n })\n .then(function(response) {\n return response.json();\n })\n .then(function(myJson) {\n console.log(JSON.stringify(myJson));\n });\n } catch (error) {\n console.log(error);\n }\n await this.setState({ showAlert: true, resetApplication: true });\n // Hide send alert and reset state after 3sec\n await setTimeout(() => {\n this.setState({ showAlert: false, resetApplication: false });\n this.props.doResetState(true);\n }, 3000);\n }" ]
[ "0.6709075", "0.6350005", "0.6288713", "0.6202829", "0.61889815", "0.6118971", "0.6112995", "0.6087327", "0.6084487", "0.6065637", "0.60639346", "0.6019141", "0.6003574", "0.60021144", "0.59993243", "0.59982663", "0.5986359", "0.5982946", "0.5961064", "0.5958583", "0.5937827", "0.5934472", "0.59232354", "0.59187466", "0.5901303", "0.5896543", "0.5889101", "0.58886707", "0.5886275", "0.58750343", "0.5871228", "0.587011", "0.58590853", "0.58555096", "0.58451694", "0.58423674", "0.58336717", "0.5833025", "0.5832951", "0.58303106", "0.58139557", "0.5809372", "0.5808902", "0.5780067", "0.57743144", "0.57741046", "0.5769241", "0.5768263", "0.5763063", "0.5759907", "0.57578266", "0.5755508", "0.5750169", "0.574673", "0.5746444", "0.5744715", "0.5739969", "0.57359433", "0.5726084", "0.5718728", "0.57101536", "0.5702155", "0.57018036", "0.5701648", "0.5695864", "0.56939024", "0.5692813", "0.5688406", "0.56867135", "0.567862", "0.5677772", "0.5677117", "0.5672854", "0.5671515", "0.56707627", "0.5667029", "0.5665005", "0.56642497", "0.5664014", "0.5658107", "0.565677", "0.5652238", "0.5642008", "0.5640626", "0.5640001", "0.5638642", "0.5635779", "0.56351906", "0.56327724", "0.5631601", "0.5627849", "0.56242967", "0.56224227", "0.562161", "0.56214714", "0.56212574", "0.5619062", "0.56155485", "0.56110173", "0.5609333" ]
0.68641704
0
reset state if the seeded prop is updated note: setting state from props can be considered antipattern in react but due to a design issue with the layout of this component and its multi effected showmore/showless icon (changes if icon is toggled but also if rows are removed on the Unassigned event page thus this is necessary until more time allows for a better solution
componentWillReceiveProps(nextProps){ if (nextProps.showmoreIcon !== this.props.showmoreIcon) { this.setState({ showmoreIcon: nextProps.showmoreIcon }) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset(prop, e) {\n var newState = {};\n newState[prop] = '';\n this.setState(newState);\n }", "componentWillReceiveProps(nextProps) {\n if (!nextProps.toggleL && nextProps.toggleR) {\n this.clearDeselectionPopup()\n }\n }", "static getDerivedStateFromProps(props, state) {\r\n if (props.reset !== state.reset) {\r\n return {isOpen: false, \r\n category: \"Category\",\r\n reset: props.reset};\r\n }\r\n return null;\r\n }", "componentDidUpdate(prevProps) {\n if (prevProps.toggle === false) {\n if (this.state.selected === true) {\n this.setState({ selected: false })\n }\n }\n }", "resetState() {\n this.setState({\n show: false,\n currCode: null,\n latest: 0,\n performance: 0,\n capital: 0,\n amount: 0,\n potential: 0,\n multiplier: 1.5,\n prediction: 1,\n err: false,\n err_msg: null\n })\n }", "static getDerivedStateFromProps(nextProps, prevState){\n var tempArray = [...nextProps.displayData];\n const tempArray2 = tempArray.splice(0,5);\n \n // Comic data is now in state, render options remain in props\n return {displayData: tempArray};\n }", "resetDialogState() {\n \tvar newstate = Object.assign(this.state);\n \t\n \tnewstate.showDelete = false;\n\t\t\n \tthis.setState(newstate);\n\t }", "static getDerivedStateFromProps(props, state){\n if (state.originalResults !== props.results){\n console.warn('props.results have changed, resetting some state -- ');\n return {\n 'results' : props.results.slice(0),\n 'openDetailPanes' : {},\n 'originalResults' : props.results\n };\n }\n return null;\n }", "componentDidUpdate(prevProps, prevState) {\n if (prevState.selected && this.props.refresh) {\n this.setState({ selected: 0 });\n }\n }", "reset() {\r\n this.state = this.initial;\r\n }", "resetClicks() {\n\t\tvar newState = _.extend(this.state, {click1: null, click2: null});\n\t\tthis.setState(newState);\n\t}", "toggleDetails() {\n this.setState((prevState, props) => (\n {showSummary: !prevState.showSummary}\n ))\n }", "resetState() {\n this.setState({\n currentSummary: {\n _id: this.props.match.params.id,\n mood: 'happy',\n content: '',\n },\n message: '',\n });\n }", "reset() {\r\n return this.state = \"normal\";\r\n }", "refresh() {\r\n\t\tthis.setState(Object.assign(this.state, {refresh:this.state.refresh===true?false:true}));\r\n\t}", "_resetState() {\n this.setState({\n ...this._defaultState\n });\n }", "resetPredicateModal(state) {\n Vue.set(state, \"show\", false);\n Vue.set(state, \"shapeID\", \"\");\n Vue.set(state, \"shapeType\", \"\");\n Vue.set(state, \"input\", \"\");\n Vue.set(state, \"object\", \"\");\n Vue.set(state, \"editing\", false);\n Vue.set(state, \"onExit\", undefined);\n Vue.set(state, \"sorting\", {\n sorted: true,\n sortBy: \"predicate\",\n ascending: true\n });\n }", "componentDidUpdate(prevProps){\n if(prevProps.top5 !== this.props.top5){\n this.setState({value: 0})\n }\n }", "componentDidUpdate(prevProps, prevState) {\n if (!this.state.goalHints.rows.length) {\n this.generateWinState();\n }\n }", "resetSize() {\n \tthis.setState({size:Number(this.props.size)});\n }", "componentDidUpdate(prevProps, prevState) {\n\n if(prevProps !== this.props) {\n let myStates = this.props.myStates();\n\n let isFilled = myStates.fillAll;\n let isUnfilled = myStates.fillUncolored;\n \n if(isFilled || (isUnfilled && this.state.cellColor === \"\")) {\n this.setState({\n cellColor: this.props.myStates().color\n })\n }\n \n }\n\n }", "imptoMetric() {\n this.setState(prevState => ({\n metric: !prevState.metric\n })\n )\n }", "resetGame() {\r\n //Copy my state\r\n let btns = this.state.btns.slice();\r\n let xIsNext = this.state.xIsNext;\r\n\r\n //Change value of my copy state\r\n btns.fill(null);\r\n xIsNext = true;\r\n\r\n //Update the actual state\r\n this.setState({ btns: btns, xIsNext: xIsNext });\r\n }", "componentWillReceiveProps(np) {\n if (np.checked !== this.props.checked) {\n this.setState({checked: np.checked, indeterminate: false});\n }\n if (np.indeterminate !== this.props.indeterminate) {\n this.setState({indeterminate: np.indeterminate});\n }\n if (np.disabled !== this.props.disabled) {\n this.setState({disabled: np.disabled});\n }\n }", "updateState({oldProps, props, context, changeFlags}) {\n const attributeManager = this.getAttributeManager();\n if (changeFlags.dataChanged && attributeManager) {\n const {dataChanged} = changeFlags;\n if (Array.isArray(dataChanged)) {\n // is partial update\n for (const dataRange of dataChanged) {\n attributeManager.invalidateAll(dataRange);\n }\n } else {\n attributeManager.invalidateAll();\n }\n }\n\n const neededPickingBuffer = oldProps.highlightedObjectIndex >= 0 || oldProps.pickable;\n const needPickingBuffer = props.highlightedObjectIndex >= 0 || props.pickable;\n if (neededPickingBuffer !== needPickingBuffer && attributeManager) {\n const {pickingColors, instancePickingColors} = attributeManager.attributes;\n const pickingColorsAttribute = pickingColors || instancePickingColors;\n if (pickingColorsAttribute) {\n if (needPickingBuffer && pickingColorsAttribute.constant) {\n pickingColorsAttribute.constant = false;\n attributeManager.invalidate(pickingColorsAttribute.id);\n }\n if (!pickingColorsAttribute.value && !needPickingBuffer) {\n pickingColorsAttribute.constant = true;\n pickingColorsAttribute.value = [0, 0, 0];\n }\n }\n }\n }", "clear(){\n this.setState({\n editing_ps:false,\n add_ps: false,\n editing: false,\n activePs:{\n 'id':null,\n 'name':'',\n 'date':'',\n 'project':'',\n 'in_progress':true,\n 'completed':false\n }\n })\n }", "onRowRefresh() {\n this.setState({refreshrows: false});\n }", "reset() {\n this.setState(this._getInitialState());\n }", "resetState() {\n this.setState({\n selectedService: null,\n loadChild: false\n })\n }", "resetlikes(){\r\n this.setState(this.baseState);\r\n}", "reset() {\r\n this.setState(this.baseState);\r\n }", "resetSortState() {\n this.props.dispatch(couponsActions.toggleSort(false, 4, 'Recommended'));\n this.props.dispatch(couponsActions.setSortResults([]));\n }", "UNSAFE_componentWillReceiveProps(parentProps) {\n if (this.state.visible !== parentProps.visible) {\n this.setState({\n visible: parentProps.visible,\n dataset: parentProps.dataset\n });\n }\n }", "shouldComponentUpdate(nextProps, nextState, nextContext) {\n if (this.props.cleardata !== nextProps.cleardata && nextProps.cleardata === true) {\n this.setState({identitydata: null});\n }\n return true;\n }", "componentDidUpdate(prevProps) {\n if (\n prevProps.currentIndex != this.props.currentIndex ||\n prevProps.list.length != this.props.list.length\n )\n this.setState({\n ...this.EditStateFunction()\n });\n }", "componentDidUpdate(prevProps, prevState) {\n if (this.props.data !== prevProps.data) {\n const { xStart, xEnd } = this.resetWindowing(this.props);\n this.setState({ xStart, xEnd });\n }\n }", "reset_techInfo_State(some){\r\n\t\t//this.setState(this.initialState);\r\n\t\t//alert(\"resetting\");\r\n\t\t//alert(\"this.baseState-> \" + this.baseState );\r\n\t\tthis.setState({ //sets new value to state //setState is an async function\r\n techInfoState: this.state.baseState\r\n }); \r\n\t}", "reset () {\n this.state.clear()\n this.redraw()\n }", "toggleMissing() {\n this.setState({\n missing_info: !this.state.missing_info\n });\n }", "prepopulateClear() {\n this.setState(function(prevState,props){\n return ({jobsFound: [] });\n });\n }", "componentWillUnmount(){\n\t\tthis.props.handleResetProperty();\n\t}", "resetInternalState(nextViewsToMeasure) {\n this.leftToMeasure = new Set();\n const nextNextMeasurements = new Map();\n\n const newViewsToMeasure =\n _differenceWith(_isEqual)(nextViewsToMeasure)(this.props.viewsToMeasure);\n for (let viewToMeasure of newViewsToMeasure) {\n this.leftToMeasure.add(viewToMeasure);\n }\n \n this.totalToMeasure = this.leftToMeasure.size;\n\n const existingMeasurements = this.nextMeasurements || this.currentMeasurements;\n const existingViewsToMeasure =\n _intersectionWith(_isEqual)(nextViewsToMeasure)(this.props.viewsToMeasure);\n for (let viewsToMeasure of existingViewsToMeasure) {\n const { id } = viewsToMeasure;\n const measurement = existingMeasurements.get(id);\n if (measurement !== undefined) {\n nextNextMeasurements.set(id, measurement);\n } else {\n this.leftToMeasure.add(viewsToMeasure);\n }\n }\n\n this.nextMeasurements = nextNextMeasurements;\n if (this.leftToMeasure.size === 0) {\n this.done(nextViewsToMeasure);\n } else {\n this.newBatch();\n }\n }", "handleReset() {\n this.setState({\n products: this.state.orig_products.slice()\n });\n }", "handleRefresh() {\n this.setState({refreshState: !this.state.refreshState});\n }", "handleRefresh() {\n this.setState({refreshState: !this.state.refreshState});\n }", "reset() {\n this.setState({count: 0})\n}", "componentWillReceiveProps(nextProps) {\n this.setState({ redraw: !isEqual(this.props.options,nextProps.options) });\n }", "resetValues(){\n this.setState({\n modal: false,\n station: this.state.stations[0].station_name,\n datatype: 'temperature',\n keyword: 'above',\n value: null,\n secondValue: null,\n email: true,\n sms: false,\n webpage: false,\n threshold: '1 hour',\n error: {}\n })\n this.toggleAddAlert();\n }", "componentWillReceiveProps(nextProps) {\n if (nextProps.harmList !== this.props.harmList) {\n this.setState({\n dataSource: this.state.dataSource.cloneWithRows(nextProps.harmList),\n isLoading: false\n });\n }\n }", "reset() {\n this.setState({\n count: 0\n });\n }", "constructor(props){\n super(props)\n this.state={\n show:false,\n vall:null,\n }\n }", "componentWillReceiveProps(nextProps){\n let selectedValue_old = this.props.selectedValue\n let selectedValue_new = nextProps.selectedValue\n let option = this.state.options.find(opt=> opt.value==selectedValue_new)\n if(selectedValue_old!==selectedValue_new){\n // si esto cambia, entonces se debe hacer un \"reset\" del estado con los nuevos valores\n this.setState({\n selectedLabel: option? option.label : '-',\n selectedValue: selectedValue_new,\n dirty: false\n })\n }\n if(selectedValue_new!==this.state.selectedValue){\n // si se reciben propiedades distintas al \"state\" actual, se reemplazan por las propiedades\n this.setState({\n selectedLabel: option? option.label : '-',\n selectedValue: selectedValue_new,\n dirty: false\n })\n }\n }", "onComponentRefresh() {\n this.setState({ refreshing: false });\n }", "onUntoggle() {\n const { onChangeToggle } = this.props;\n if (onChangeToggle) {\n onChangeToggle(null);\n }\n }", "reset() {\n this.setState({\n routineArray: []\n });\n this.setState({\n routineChoices: []\n });\n }", "componentWillReceiveProps(nextProps) {\n if(nextProps.isNew){\n if (this.input) {\n this.input.value = \"\";\n this.props.inputFieldOnChange(this.props.Code, this.props.DefaultValue);\n }\n this.setState({\n canClear: false\n })\n }\n }", "componentDidUpdate(prevProps, prevState) {\n if (prevProps.currQues !== this.props.currQues) {\n this.setState({ title: \"\", option1: \"\", option2: \"\", answer: 0 });\n }\n }", "resetState() {\n this.setState({oldAnimal: this.state.newAnimal});\n this.setState({oldImage: this.state.newImage});\n this.setState({oldText: this.state.newText});\n }", "toggleRefill() {\n this.setState({\n low_inventory: !this.state.low_inventory\n })\n }", "_reset() {\n this.setState({ currentIndex: 0, startPoint: -1, endPoint: -1, startTime: null, endTime: null, activeLines: []});\n }", "toggleUpdate(e,d){\n if (e.isDefaultPrevented != null && e.isDefaultPrevented() === false)\n e.preventDefault();\n\n this.setState(prevState => ({\n selected: (d === undefined ? null : d.original),\n editing: !prevState.editing,\n showing: false,\n adding: false\n }));\n\n this.backToTop();\n }", "componentWillUpdate(nextProps, nextState) {\n // console.log(nextProps, nextState);\n if (nextState.open == true && this.state.open == false) {\n \n }\n }", "reset() {\n this.setState(this._getInitialState());\n }", "reset (size) {\n this.state = Object.assign({}, this.state, {\n size,\n ctrl: false,\n shift: false,\n hover: -1,\n specified: -1,\n modify: -1,\n selected: []\n })\n\n return this.state\n }", "removeFilter() {\n this.setState({\n rarity: \"0\",\n type: \"0\",\n minPrice: 0,\n maxPrice: 0,\n stat1: 0,\n stat2: 0\n })\n this.props.removeFilter();\n this.props.toggleClose();\n }", "componentWillReceiveProps(nextProps) {\n if (\n this.props.expression !== nextProps.expression ||\n (!this.props.isVisible && nextProps.isVisible)\n ) {\n this.setState({ expression: nextProps.expression });\n }\n }", "componentWillReceiveProps(nextState, prevState) {\n if (nextState.SelectedMake && nextState.SelectedMake.length > 0) {\n this.setState({\n isLoading: false,\n show: false,\n showConfirme: false,\n });\n } else {\n this.setState({\n isLoading: false,\n showConfirme: false,\n });\n }\n }", "componentWillReceiveProps(nextProps) {\n if(!this.state.edittable){\n this.setState({\n position: {\n lat: nextProps.lat,\n lng: nextProps.lng\n },\n center: {\n lat: nextProps.lat,\n lng: nextProps.lng\n },\n mapEditted: false\n });\n }\n }", "function resetStateAll() {\n that.state.all = false;\n }", "reset(){\n this.setState({\n count: 0\n })\n }", "handleClick() {\n this.setState(prevState => {\n if(prevState.displayItems === \"row scroll_list\"){\n return {\n displayItems : \"row displayAllItems\",\n viewButtonText : \"View Less\" \n }}\n \n return {\n displayItems : \"row scroll_list\",\n viewButtonText : \"View All\"\n }\n\n //prevState.displayItems === \"row scroll_list\" ? this.setState({displayItems : \"row displayAllItems\"}) : this.state({displayItems : \"row scroll_list\"})\n\n })\n }", "reset(propertyChangedHandler) {\n const that = this;\n\n if (that.type === 'none' && propertyChangedHandler !== true) {\n return;\n }\n else {\n that.type = 'none';\n }\n\n let oldValue = that.rows;\n\n that.rows = 1;\n that._changeRowsColumns('rows', oldValue, 1, true);\n oldValue = that.columns;\n that.columns = 1;\n that._changeRowsColumns('columns', oldValue, 1);\n\n const remainingCell = that._cells[0][0];\n\n remainingCell.widget.$.unlisten('change');\n remainingCell.widget.$.unlisten('click');\n remainingCell.td.innerHTML = '';\n\n that._table.classList.add('jqx-hidden');\n\n that._defaultValue = undefined;\n\n const oldValueArray = that.value;\n\n that.value = null;\n that.$.fireEvent('change', { 'value': that.value, 'oldValue': oldValueArray });\n\n that.$.horizontalScrollbar.max = 0;\n that.$.horizontalScrollbar.value = 0;\n that.$.verticalScrollbar.max = 0;\n that.$.verticalScrollbar.value = 0;\n }", "reset() {\n \t// Do not change state (counter) directly like - this.state.counter = 0 - Bad practice!\n \t// Instead use setState as below\n this.setState({ counter: 0 });\n }", "constructor(props) {\r\n super(props);\r\n this.state = {\r\n ...props,\r\n fwParam:{...props.fwParam},\r\n buttonSize: props.buttonSize?props.buttonSize:'default',\r\n tableSize: props.tableSize?props.tableSize:'small',\r\n showSelectCol:props.showSelectCol?props.showSelectCol:false,\r\n queryPanelExpanded:false,\r\n expandedAllGroup:true,\r\n dialogs:{},\r\n actionInList:[],\r\n changedResource:{},\r\n expandedFunctions: {},\r\n }\r\n }", "clearIdeas() { this.props.resetIdeas() }", "function reset() {\n\t setState(null);\n\t} // in case of reload", "resetInteractionState() {\n this.touched = false;\n this.submitted = false;\n this.dirty = false;\n this.prefilled = !this._isEmpty();\n }", "componentWillReceiveProps(nextProps) {\n this.setState({\n dataSource: this.state.dataSource.cloneWithRows(this.getActivitiesForDataSource(nextProps.activities, this.state.editMode)),\n });\n }", "reset(){\n let Tiles = this.state.Tiles\n let Clicks = this.state.Clicks\n for(let i=0; i<=15; i++){\n Tiles[i].value = i\n }\n Clicks = 0\n this.setState({\n Tiles,\n Clicks\n })\n }", "reset() {\r\n this.state = this.config.initial;\r\n }", "componentWillReceiveProps(nextProps){\n //if(nextProps.selectedRecipe.modalVisible === true){\n this.setState({\n recipe: nextProps.selectedRecipe,\n ingredients: nextProps.selectedRecipe.ingredients.toString(),\n index: nextProps.selectedRecipe.index,\n modalVisible: nextProps.modalVisible\n });\n //}\n }", "clearSectionsContent() {\n this.setState(prevState => {\n const sections = prevState.assignment.sections;\n sections.compulsory.forEach(s => s.value = \"\");\n sections.custom.forEach(s => {s.value = \"\"; s.mark = 0;});\n sections.custom.forEach(custom => {\n custom.positiveComments.forEach(c => c.added = false);\n custom.negativeComments.forEach(c => c.added = false);\n });\n prevState.assignment.totalMark = 0;\n // prevState = prevState.assignment.sections.custom.map(s => s.positiveComments.map(c => Object.assign(c, {added: false})));\n // prevState = prevState.assignment.sections.custom.map(s => s.negativeComments.map(c => Object.assign(c, {added: false})));\n return prevState;\n })\n }", "componentWillReceiveProps(nextProps) {\n let ed = nextProps.ed;\n let position = nextProps.position;\n\n // ignore any props if the dialog is already visible.\n if (this.state.show) {\n return;\n }\n\n if (ed && position) {\n this.setState( { show: true } );\n this.setSelectedED(ed,position);\n }\n }", "reset() {\n this.setState({\n count: 0,\n milliseconds: 0,\n seconds: 0,\n minutes: 0,\n });\n }", "componentWillReceiveProps(){\n\t\tthis.setState({clicked: false})\n\t}", "reset() {\r\n this.state = this.config.initial;\r\n }", "componentWillReceiveProps(nextProps) {\n if (nextProps.columnCode !== this.props.columnCode) {\n this.setState({ SkeletonLoading: true, columnCode: nextProps.columnCode }, () => {\n this.onRefresh()\n })\n }\n }", "reset() {\n let tilesGenerated = this.getInitialTiles()\n this.setState({tileData: tilesGenerated})\n }", "componentDidUpdate(prevProps, prevState) {\n if (this.state.search == !prevState.search || this.props.clear == true) {\n this.getAppointments();\n }\n }", "reset() {\n const colArr = Array(this.numOfCols).fill(null);\n this.setState({\n history: [\n {\n currentBoard: Array(this.numOfRows)\n .fill(null)\n .map(() => colArr.slice())\n }\n ],\n isRedTurn: true,\n isGameWon: false,\n isGameTied: false,\n historyIndex: 0\n });\n }", "componentWillReceiveProps(props){\r\n if (props.roomObj.enabled === false){\r\n this.setState({\r\n adultDefaultValue: props.default.adults,\r\n childDefaultValue: props.default.children\r\n })\r\n }\r\n }", "constructor(props){\n super(props);\n this.state={\n visible: false\n }\n }", "componentWillReceiveProps(nextProps) {\n if(nextProps.searchKey){\n if (nextProps.category_id === null) {\n this.setState({\n category_id: null,\n });\n }\n }\n }", "reset(e) {\n \n e.preventDefault();\n this.setState({ \n variables: {\n variableName:'',\n category: '',\n crfDataType: '',\n valueLowerLimit: '',\n valueUpperLimit: '',\n units:'',\n description: '',\n formName:[\"\"],\n isRequired: ''\n \n },\n })\n }", "componentWillReceiveProps(nextProps) {\n if(nextProps.remain) {\n this.setState({\n remain: nextProps.remain\n });\n }\n }", "setState(newProps) {\n let stateChanged = false;\n\n Object.entries(newProps).forEach(([key, val]) => {\n if (val !== this.state[key]) {\n stateChanged = true;\n }\n\n this.state[key] = val;\n });\n\n if (stateChanged) {\n this.render();\n }\n }", "reset() {\n this.setState({\n selectedSurface : -1\n });\n }", "clearBothDisplay () {\n this.setState({display: [], cumDisplay: []});\n }", "componentDidUpdate(prevProps, prevState, snapshot) {\n if(this.props !== prevProps ){ //we have to add condition here, to prevent infinity loop\n if(this.props.reset === true ){ //we have to add condition here, to prevent infinity loop\n console.log(\"catch\");\n this.clearAsyncFunctions();\n }\n else if (this.props.midiEvent !== 0){\n //do nothing. It's used to prevent this component re-render itself on parent midiEvent state change\n console.log(\"midi, no re-rendering\")\n }\n else {\n\n this.loopScoreSets(this.props.scoreSet,this.props.ptKeyName,this.props.loopLocation,this.props.loopLength)\n }\n\n }\n }", "reset(){\n this.setState({items: this.state.itemsOriginales})\n }" ]
[ "0.65752596", "0.64249456", "0.6370593", "0.63347787", "0.62932795", "0.626881", "0.62357223", "0.62201375", "0.6217882", "0.6167349", "0.6165508", "0.6161676", "0.61551905", "0.61420536", "0.61419123", "0.6123111", "0.60797274", "0.6065943", "0.60545725", "0.60207033", "0.60134", "0.6011595", "0.6007174", "0.599234", "0.59919935", "0.59759676", "0.5975113", "0.597286", "0.5972297", "0.59569395", "0.5953795", "0.5939253", "0.5933102", "0.59323907", "0.59193325", "0.59107554", "0.59105414", "0.5902964", "0.5901441", "0.59011453", "0.58911043", "0.5884657", "0.5866624", "0.5865888", "0.5865888", "0.586163", "0.5860838", "0.58597916", "0.58594614", "0.5856294", "0.5853584", "0.58520526", "0.5851705", "0.58513886", "0.58462924", "0.58449316", "0.5843051", "0.5839459", "0.5830966", "0.5825984", "0.5823895", "0.5819086", "0.5812455", "0.5811533", "0.5811185", "0.5797647", "0.5793081", "0.5787458", "0.57857734", "0.5777861", "0.5777571", "0.5771389", "0.5762789", "0.57622427", "0.57594603", "0.5755391", "0.5750589", "0.5739533", "0.57386714", "0.57375836", "0.5728582", "0.5728151", "0.5725531", "0.57223994", "0.57168746", "0.57113254", "0.57103807", "0.5709241", "0.57071745", "0.57070273", "0.57030237", "0.5702214", "0.5700294", "0.5698579", "0.5697339", "0.56913257", "0.5691251", "0.569101", "0.5687821", "0.5684735" ]
0.6590052
0
FUNCTION TO CARRY OUT THE GAME
function checkguess() { // USER GUESS TAKEN FROM TEXT BOX, CONVERTED FROM A STRING AND STORED TO VAR var userguess = parseInt(document.getElementById("input1").value); // IF THE GUESS IS BIGGER if (userguess > randomnum) { //COUNT CLICKS VARIABLE CALLED ON AND ADDS +1 countClicks++; // RESULT result = "Your guess of " + userguess + " is higher than the magic number. <br >You have had </b> " + countClicks + " </b>guesses so far."; } else if (userguess < randomnum) { countClicks++; result ="Your guess of " + userguess + " is lower than the magic number. <br >You have had </b> " + countClicks + " </b>guesses so far."; } else { countClicks++; result = "Success, You win! You took </b> " + countClicks + " </b>guesses."; } // SENDS THE RESULT TO THE DOM document.getElementById("result").innerHTML = result; } //END OF FUNCTION - dont delete!
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endGame() {\n \n}", "function endGame(){\n $('.card-container').removeClass(\"selected-card\");\n $('.card-container').remove();\n while(model.getCardObjArr().length > 0){\n model.removeFromCardObjArr(0);\n }\n\n while(model.getDisplayedCardArr().length > 0){\n model.removeFromDisplayedCardArr(0)\n }\n\n while(model.getSelectedCardObjArr().length > 0){\n model.removeFromSelectedCardArr(0)\n }\n if(($(\".card-display-container\").find(\".game-over-page\").length) === 0){\n createGameOverPage();\n createWinnerPage();\n } else {\n return;\n }\n }", "function endGame() {\n $('.home').css({ 'margin-top': '0px' });\n disappear('.instructions');\n hide('.view-button');\n disappear('.follow-circle');\n disappear('.instructions');\n state = \"view\";\n }", "function endGame() {\n\tif (board.turn >= 5 && board.hasEnded() === \"x\") {\n \talert(\"x won!\");\n \treset();\n } else if (board.turn >= 6 && board.hasEnded() === \"o\") {\n \talert(\"o won!\");\n \treset();\n } else if (board.turn === 9) {\n alert(\"Draw!\");\n reset();\n }\n}", "function endGame() {\n console.log(\"BOOM\");\n console.log(\"GAME OVER\");\n renderAllCells(\"bomb-cell\");\n renderAllCells(\"isRevealed\");\n toggleBombPanel(\"hide\");\n}", "function gameOver(){\n\t\tgameArena.hide()\n\t\tscoring()\n\t}", "function endGame() {\r\n\t\tgameOver = true;\r\n\t\tsetMessage2(\"Game Over\");\r\n\t}", "function endGame(){\n\tspawnBall();\n\tcenterBall();\n\tspawnPlayerOne();\n\tspawnPlayerTwo();\n\tupdateScore();\n\t$('#menuCanvas').show();\n}", "function gameOver() {\n puzzleEnd(false)\n }", "function endGame() {\n fill(start.color.c,start.color.saturation, start.color.brightness);\n stroke(start.color.c,start.color.saturation,start.color.brightness);\n if(score.score1 == score.limit) {\n start.color.c+=2;\n textSize(70);\n background(colours.background);\n text(\"Player 1 Wins!\", start.textX, start.textY);\n movementMoveX = 0;\n movementMoveY = 0;\n }\n if(score.score2 == score.limit) {\n start.color.c+=2;\n textSize(70);\n background(colours.background);\n text(\"Player 2 Wins\", start.textX, start.textY);\n movementMoveX = 0;\n movementMoveY = 0;\n }\n if(start.color.c > 360) start.color.c = 0\n }", "function endGame() {\n\tclearInterval(gameTimer);\n\tshowEndScreen();\n\n\tsetInterval(function() {\n\t\tfor (let i = 0; i < 3; i++) {\n\t\t\tsetTimeout(victoryAnimation, 1000);\n\t\t}\n\t}, 500);\n}", "function gameOver() {\n isGameRunning = false;\n showGameOverMenu();\n setupInstructions();\n cleanBullets();\n teardownScore();\n}", "function endGame(win) {\n that.pause();\n running = false;\n if(win) {\n console.log(\"BOUT 2 ALERT\")\n alert(\"You've reached the highest score!\");\n console.log(\"DONE ALERTING\")\n } else {\n $(\"#ship\").height(0);\n drawBoard();\n alert(\"Looks like you got squashed. Game over!\");\n }\n submitTurk();\n }", "function gameEnd() {\n\tmoves += 1;\n\tstopTimer();\n\toverLay.show();\n\tmodal.show();\n\t$('.score-panel').hide();\n\t$('.final-moves').html(moves);\n}", "function endGame(event){\n\tif (game_state === false){\n\t\tstate = true;\n\t\tvar lose = document.getElementById(\"status\");\n\t\tlose.innerHTML = \"you're a loser :0\";\n\t\tvar wall = document.querySelectorAll(\"div#maze div.boundary\");\n\t\tfor (var i = 0; i<wall.length;i++){\n\t\t\twall[i].classList.add(\"youlose\");\n\t\t}\n\t\tclearInterval(stopclock);\n\t\tstopclock = null;\n\t\ttotaltime = 0;\n\t\t//alive = 1;\n\t}\n}", "function endGame() {\n gameStarted = false;\n}", "function endGame() {\n // Update the max level achieved board\n if (level > maxLevelAchieved) {\n maxLevelAchieved = level;\n $(\".max-level\").text(maxLevelAchieved);\n }\n\n // Make game over sound\n let sound = new Audio(\"sounds/wrong.mp3\");\n sound.play();\n\n // Add visual aspects of game over\n $(\"body\").addClass(\"game-over\");\n setTimeout(function() {\n $(\"body\").removeClass(\"game-over\");\n }, 100);\n $(\"h1\").text(\"Game Over! Press Any Key to Replay\");\n\n // Reinitializing letiables for a new round\n level = 0;\n newGame = true;\n}", "gameOver(){\n\n\t\tthis.mvc.gameState = 0;\n\n\t\tthis.mvc.model.ioSendEnd();\n\n\t\tthis.stop();\n\n\t\tthis.mvc.model.updatedHallOfFame();\n\n\t}", "function endGame () {\n\tif(player1.hasWon) {\n\t\t$('#board').hide()\n\t\t$('.player1-winner').show();\n\n\t} else if(player2.hasWon) {\n\t\t$('#board').hide()\n\t\t$('.player2-winner').show();\n\t}\n}", "function SarahKickPlayerOut() {\n\tDialogLeave();\n\tSarahRoomAvailable = false;\n\tCommonSetScreen(\"Room\", \"MainHall\");\n}", "function endGame() {\n verifyLine();\n verifyColumn();\n // verifyDiagonalUp();\n // verifyDiagonalDown();\n }", "function gameWon() {\n if (winGame == true) {\n endScreen();\n }\n}", "function endGame() {\n if (score === randNum) {\n wins += 1;\n $(\"#score-dis\").html(\"\");\n reset();\n }\n else if (score > randNum) {\n losses += 1;\n $(\"#score-dis\").html(\"\");\n reset();\n }\n }", "function RollBackAction():void\n {\n if((TakeBackFlag || NewGameFlag) && (!C0.c0_moving) && (C0.c0_moves2do.length==0) )\n //&&((C0.c0_sidemoves==C0.c0_side) || gameover) && (drag1_animator==0) && (move_animator==0))\n {\n if(gameover) gameover=false;\n\t\t\n for(var h=0;h<8;h++)\n for(var v=8;v>0;v--)\n {\n var id=\"piece_\"+System.Convert.ToChar(System.Convert.ToInt32(\"a\"[0])+h)+v.ToString();\t\t// Is this square mouse is over?\n var qObj=GameObject.Find(id);\n if(!(qObj==null)) Destroy(qObj);\n }\t\n if(TakeBackFlag)\n {\n if(mode==1)\t{\n C0.c0_take_back();\n if(!(C0.c0_sidemoves==C0.c0_side)) C0.c0_take_back();\n TakeBackFlag=false;\n }\n else if(mode==2) {\n if(C0.c0_moveslist==\"\") {\n TakeBackFlag=false;\n setCamSide=true;\n }\n else {\n C0.c0_take_back();\n temp=white;\n white=black;\n black=temp;\n TakeBackFlag=false;\n if(white == \"w\") {setCamSide=true; setCamSide2=false;}\n if(white != \"w\") {setCamSide=false; setCamSide2=true;}\n }\n }\n }\n if(NewGameFlag)\n {\n if(mode==1) {\n C0.c0_set_start_position(\"\");\n C0.c0_sidemoves=1;\n C0.c0_waitmove=false;\n C0.c0_side=-C0.c0_side;\n C0.c0_waitmove=(C0.c0_side==C0.c0_sidemoves);\n NewGameFlag=false;\n }\n else if(mode==2) {\n if(C0.c0_side==1) message2show =\"WHITE TURN!\";\n else message2show =\"BLACK TURN!\";\n C0.c0_set_start_position(\"\");\n C0.c0_sidemoves=1;\n C0.c0_waitmove=true;\n white=\"w\";\n black=\"b\";\n temp=\"\";\n setCamSide=true; setCamSide2=false;\n NewGameFlag=false;\n }\n }\t\n\t\t\n position2board();\t\t\t\t\t// Set current position on the board visually...\n }\n }", "function endOfGame() {\n\tcreatesMensg();\n\tstopTime();\n\tshowModal();\n}", "function gameend(){\nvar gameover= true;\n$('.message').html('GAME OVER');\t\n}", "function offScreen() {\n \n // Check if the y is greater than canvas height\n if (playerRect.y > cHeight) {\n \n // Die\n die();\n }\n \n}", "function drawGameOver() {\n\tdrawBackground();\n\tdrawBanner();\n\tif (livesRemaining === 0) {\n\t\tcolorTxt('OUT OF LIVES', canvas.width / 2, canvas.height / 2, '100px Arial', 'center', 'middle', '#fff');\n\t} else {\n\t\tcolorTxt('GAME COMPLETE', canvas.width / 2, canvas.height / 2, '100px Arial', 'center', 'middle', '#fff');\n\t}\n}", "loseTurn(){\n this.playerTurn = (this.playerTurn % 2) + 1;\n this.scene.rotateCamera();\n this.previousBishops = ['LostTurn'];\n this.activeBishop = null;\n }", "function endTurn() {\n checkWin(currentTurn);\n if(winStatus == false && drawCounter < boardWidth) {\n switchTurn()\n } else if(winStatus == true){declareWinner()\n }\n}", "function endGame() {\n // Réinitialisation de l'affichage du dé\n resetImage(); \n // Position du sélecteur\n selector();\n //Lancement nouvelle partie\n newGame();\n}", "function endGame(pos) {\n $('#' + pos + \" .gauge-fill\").height(0);\n $('#' + pos + ' .icon').css(\"display\", \"none\");\n if(enlarged != \"\") {\n hideCurrGame();\n }\n delete activeArray[pos];\n onFire += 1;\n if(onFire == 5){\n onFireAction();\n }\n if(activeArray.length == 0){\n cleanSweepAction();\n }\n}", "endTurn() {\n if (this.board.checkWin(this.players[this.turn].token)) {\n console.log(`${this.players[this.turn].name} has won, starting a new game`);\n this.board.resetBoard();\n this.board.printBoard();\n this.turn = (this.turn + 1) % 2;\n } else {\n this.turn = (this.turn + 1) % 2;\n console.log(`It is now ${this.players[this.turn].name}s turn`);\n this.board.printBoard();\n }\n }", "function endGame() {\n //stop timer\n clearInterval(setTimer);\n //remove event listener so no more moves can be made\n deck.removeEventListener('click', showCard);\n //open popup\n showScore();\n}", "function endGame() {\n if (firstPlayer.points >= 100 || secondPlayer.points >= 100) {\n if (firstPlayer.points > secondPlayer.points) {\n // need to display which player wins on screen\n winBox.innerHTML = (\"CONGRATS PLAYER 1. YOU'RE LESS DRUNK THAN PLAYER 2.\")\n gameContainer.innerHTML = (\"\")\n gameContainer.style.cssText = `background: url(\"https://media.giphy.com/media/YfMHLC2s6okBq/giphy.gif\") \n no-repeat; background-size: cover; height: 350px; border-radius: 50%;`\n } else if (secondPlayer.points > firstPlayer.points) {\n winBox.innerHTML = (\"CONGRATS PLAYER 2. YOU'RE LESS DRUNK THAN PLAYER 1.\")\n gameContainer.innerHTML = (\"\")\n gameContainer.style.cssText = `background: url(\"https://media.giphy.com/media/YfMHLC2s6okBq/giphy.gif\") \n no-repeat; background-size: cover; height: 350px; border-radius: 50%;`\n }\n \n }\n //remove truth/drink/next\n}", "function endgame() {\r\n gameOver = true;\r\n\tmusic.playGameOver();\r\n}", "function endGame() {\r\n\r\n\t\tclearInterval(timer);\r\n\t\tclearInterval(target);\r\n\t\tclearInterval(cursor);\r\n\t\tclearTimeout(warnTimeout);\r\n\t\twarning.finish();\r\n\r\n\t\tscoreBox.text(\"Targets Destroyed: \" + targetCount);\r\n\r\n\t\t$('.target').remove();\r\n\r\n\t\t$('body').css(\"cursor\", \"crosshair\");\r\n\r\n\t\t$(\"#timer\").stop().animate({\r\n\t\t\t\t\"width\": \"0px\"\r\n\t\t}, 0);\r\n\r\n\t\t$(\"#message\").css({\"display\": \"block\"})\r\n\r\n\t\t$(\"#text\").text(\"Game Over\").css({\r\n\t\t\t\"display\": \"block\",\r\n\t\t\t\"font-size\": \"100px\",\r\n\t\t\t\"margin-top\": \"3.5em\",\r\n\t\t\t\"width\": \"100%\"\r\n\t\t});\r\n\r\n\t\t$(\"span\").text(\"Retry\");\r\n\t}", "function endGame() {\n //Update UI\n const winner = document.getElementById(`player${logic.getActivePlayer()}-name`);\n winner.innerText = 'WINNER';\n logic.getActivePlayer() === 1 ? score0++ : score1++;\n displayScores();\n gameFieldsEl.forEach(el => el.style.cursor = 'default');\n //Remove game board event listener\n gameBoardEl.removeEventListener('click', makeMove);\n }", "function endGame() {\n //exit to the main menu w/o saving\n gameStart = false; //set flag to false\n TimeMe.resetAllRecordedPageTimes(); //reset timer\n clearInterval(handle); //clear score, time, intervals\n clearInterval(spawn);\n clearInterval(addp);\n clearInterval(addb);\n\n handle = 0;\n spawn = 0;\n addp = 0;\n addb = 0;\n score = 0;\n powerUpScore = 0;\n time = 0;\n $(\"#gameOver\").hide(); //hide game over menu and show main menu\n menu();\n }", "endGameAction() {\n\n }", "function endGame()\r\n{\r\n\tisGameOver=true;\r\n\t\r\n\taudio.stop({channel : 'custom'});\r\n\taudio.stop({channel : 'secondary'});\r\n\taudio.stop({channel : 'tertiary'});\r\n\t\r\n\t//Clear the screen\r\n\tcontext2D.fillStyle=\"rgb(255, 255, 255)\";\r\n\tcontext2D.beginPath();\r\n\tcontext2D.rect(0, 0, canvas.width, canvas.height);\r\n\tcontext2D.closePath();\r\n\tcontext2D.fill();\r\n\t\r\n\tplaySound('Other_Sounds/game_over', 'default', 1, false, none);\r\n\tspeak('You have fallen into a trap and died. Game over, Your final score is: '+score, 'default', false);\r\n}", "function handleEndGame() {\n\n}", "function endGame()\n{\n\tfor(var i = 0; i < 16; i++)\n\t{\n\t\tapp.coverImgArr[i].style.visibility = 'hidden';\n\t\t//app.tileImgArr[i].style.visibility = 'hidden';\n\t}\n\n\tapp.pairsFound = 0;\n\n\tapp.startBtn.disabled = false;\n\tapp.endBtn.disabled = true;\n\n\tremoveTiles();\n\t\n\tinitVars();\n}", "kill(){\r\n this.lives--;\r\n this.livesLost++;\r\n if(this.lives<0){\r\n this.gameOver = true;\r\n }else{\r\n this.resetBoard();\r\n }\r\n }", "function quitGame() {\r\n //add exit logic\r\n \texitGame();\r\n}", "function end() {\n\tif (match === 8) {\n\t\tdeck.innerHTML = \"\";\n\t\tendGame.removeAttribute('style');\n\t\tmovend.textContent = moves + ' Moves';\n\t\tstarend.textContent = starnum + ' Stars';\n\t\ttimeend.textContent = `Your Time ${time.textContent}`;\n\t\tcheckArrey = [];\n\t\tclicks = 0;\n\t\tmatch = 0;\n\t\tmoves = 0;\n\t\tseconds = 0;\n\t\tstars();\n\t\tmov.textContent = moves;\n\t\tendTimer();\n\t\tcreateCard();\n\t}\n}", "endGame() {\n setTimeout(function () {\n collectedItemsFin.innerHTML = player.collected;\n collectedFliesFin.innerHTML = player.collectedFly;\n collectedDragonfliesFin.innerHTML = player.collectedDragonfly;\n collectedButterfliesFin.innerHTML = player.collectedButterfly;\n scoreboardFin.innerHTML = player.score;\n scoreboardWaterFin.textContent = player.scoreWater;\n player.modalShow(gameoverModal, replayBtn);\n player.reset();\n start();\n }, 500);\n }", "function endGame()\n{\n stopTimer();\n $('#timer').text(\"\");\n $('#timer').css('width','0%');\n backgroundMusic.pause();\n disableUnflipped();\n gameOverPopup();\n return;\n}", "function endGame() {\n\tif(matchedCards.length === 16){\n\t\ttimer.stop();\n\t\tdisplayPopup();\n\t}\n}", "function endGame(){\r\n var y, p, z, hello, hello2, holepic, hole, name, count, P1array, P2array;\r\n P1array= 0;\r\n for(var i = 1; i<13; i++){\r\n y = document.querySelector('.hole_'+i+'_pebble').src;\r\n p = y.split('/');\r\n z = p[p.length-1];\r\n hello = z.split('.');\r\n holepic = hello[0].split('_');\r\n hole = holepic[1]*1;\r\n var truth1 = true;\r\n truth1 = arr.includes(allClicks.click(i));\r\n if(truth1){\r\n P1array+=1;\r\n }\r\n if(hole === 0 && !truth1){\r\n winner1+=1;\r\n }else if(!truth1){\r\n \r\n }\r\n else if(!truth1 && hole !== 0){\r\n winner1 = 0;\r\n }\r\n }\r\n //compare the scores if the game should end.\r\n if (winner1 >= 12-P1array&& pebblesInHand===0){\r\n compareScores();\r\n }\r\n winner1 = 0;\r\n}", "function gameEnd(){\n\n game.startBanner = game.add.image(phaser.config.width / 2, phaser.config.height / 2, \"start-banner\")\n \n //If your score is higher than the opponent score, you win, else, you lose.\n if(score > oppScore){\n game.youWin = game.add.image(phaser.config.width / 2, phaser.config.height / 2, \"you-win\")\n }else{\n game.youLose = game.add.image(phaser.config.width / 2, phaser.config.height / 2, \"you-lose\")\n }\n\n game.scene.pause(); //Pause the scene\n\n setTimeout(function(){ //Set timeout then return to menu\n game.scene.start('menu')\n score = 0; //Set score back to 0\n Client.socket.emit('gameEnd');\n },5000)\n }", "function endGame() {\n // Close down game screen, also set hearts back and open endgame\n $('#gameScreen').addClass('hidden');\n $('#heart1').removeClass('removed');\n $('#heart2').removeClass('removed');\n $('#heart3').removeClass('removed');\n $('#endGameText').text(\"Your score was: \" + $('#playerScore').text());\n $('#end-page').removeClass('hidden');\n obstacleSpeed = 0.5;\n spawnRate = 500;\n playerAlive = false;\n playerScore = 0;\n customFlag = 0;\n flag = 1;\n playerScore = 0;\n customFlag = 0;\n seconds = 0; minutes = 0; hours = 0;\n}", "function endGame() {\n pongball.x = width / 2;\n pongball.y = -20;\n window.location.reload();\n}", "function gameOver() {\n clearPrevious();\n clearPreviousLifes();\n imgPrep();\n imgLose.classList.toggle(\"contentHide\");\n setTimeout(function () {\n modeMenu(\"100%\");\n }, 250);\n return winLoseValue = 0;\n}", "function leaveGame() {\n console.log(\"Leaving game...\");\n channelLeaveGame();\n }", "function gameOver() {\n\tstopClock();\n\twriteModalStats();\n\ttoggleModal();\n}", "function endGame() {\n\n partidas++;\n tiempoJugadores();\n\n //Si se termina la segunda ronda va al estado ranking\n if (partidas == 2)\n game.state.start('ranking', true, false, tj1, tj2);\n\n //Si termina la primera ronda, va al estado win\n else\n game.state.start('win', true, false);\n\n}", "function gameOver(){\n\n\tif((playerScores[0] + playerScores[1] == 8) || (playerScores[0] == 5) || (playerScores[1] == 5)){\n\t\t$(\".card\").off(\"click\", flipCard);\n\t\tdocument.querySelector(\".timerDisplay\").innerHTML = \"Game ended!\";\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "function endgame() {\n \tclearInterval(intervalId);\n }", "function endGame() {\n\n\tclearInterval(interval);\n\tinterval = null;\n\ttime = null;\n}", "endGame(){\n this.state = END;\n }", "function lost(){\n pause();\n playing = false;\n lose = true;\n setHighscore();\n html('rows','Game Over')\n }", "function end() {\n gameScene.visible = false;\n gameOverScene.visible = true;\n}", "function end() {\n gameScene.visible = false;\n gameOverScene.visible = true;\n}", "function gameOver() {\r\n\tyouLose = true;\r\n\tdrawX();\r\n}", "function endGame() {\n // console.log('game finished!');\n let $messageBox = $('#message');\n let $dealButton = $('#deal-button');\n let $hitButton = $('#hit-button');\n let $standButton = $('#stand-button');\n let $dealerFirstCard = $('#dealer-hand div:nth-child(1)')\n\n $dealerFirstCard.removeClass('flyin');\n $dealerFirstCard.addClass('loop');\n setTimeout(function() {\n $('#dealer-box').removeClass('hidden');\n $dealerFirstCard.css('background-image', `url(${dealer.hand[0].img}`);\n }, 500);\n\n $hitButton.off('click');\n $hitButton.addClass('subdued');\n\n $standButton.off('click');\n $standButton.addClass('subdued');\n\n $('#player-bet p').html('$0');\n localStorage.setItem('playerMoney', player.money);\n\n $dealButton.removeClass('subdued');\n $dealButton.text('DEAL');\n $dealButton.one('click', resetGame);\n}", "function GameEnd(){\n\t\t\tif(poker._cash == 0 && poker._bet == 0)\n\t\t\t\talert(\"Thanks for playing better luck next time.\\nRefresh the browser to start a new game.\");\n\t}", "function endgame() {\n if(player1pointscore - player2pointscore == 6) {\n showwinner();\n }\n if (player2pointscore - player1pointscore == 6) {\n showwinner();\n }\n if (player1pointscore + player2pointscore > 10) {\n showwinner();\n }\n}", "function endGame() {\n if(!snake2) $('#ouch_kid').trigger('play');\n else $('#game_over').trigger('play');\n clearCanvas();\n clearInterval(timer_game);\n clearInterval(timer_keys);\n clearInterval(timer_time);\n if(snake2) {\n var score_display = \"Snake1: \" + snake1.score + \"<br />Snake2: \" + snake2.score + \"<br />\";\n if(snake1.score > snake2.score) {\n score_display += \"<b>Snake1 Wins!!!</b>\";\n } else if(snake2.score > snake1.score) {\n score_display += \"<b>Snake2 Wins!!!</b>\";\n } else {\n score_display += \"It's a tie!!!\";\n }\n $('#score-display').html(score_display);\n }\n else $('#score-display').html(\"Score: \" + snake1.score);\n if(!snake2) {\n if(snake1.score > 50) $('#score-message-heading').html('Nice Attempt!');\n else $('#score-message-heading').html('Oh! that was a bad luck!');\n }\n $('#info-modal').modal('show');\n }", "function exit() {\r\n if (\r\n snake[0].x < 0 ||\r\n snake[0].x > boardSize - cellSize ||\r\n snake[0].y < 0 ||\r\n snake[0].y > boardSize - cellSize\r\n ) {\r\n window.alert(\"dead\");\r\n resetGlobal();\r\n location.reload();\r\n }\r\n}", "function gameOver() {\r\n disableActions();\r\n }", "function finishGame(isVictory) {\n if (isVictory) {\n highestScore(gLevel.type, gGame.secsPassed);\n renderSmiley(true);\n winningAudio.play();\n // alert('You Win!');\n openModal('You Won!');\n gGame.isOn = false;\n } else {\n gGame.isOn = false;\n losingAudio.play();\n openModal('You Lost :(');\n revealMines();\n }\n clearInterval(gTimerInterval);\n}", "function endGame(){\n gameOver = true;\n gameStarted = false;\n allEnemies = [];\n allFruit = [];\n pickedFruit = [];\n //displayResult();\n resultMessage();\n updateInfo();\n}", "function gameOver() {\n stopClock();\n writeModalStats();\n toggleModal();\n}", "end () {\n this.game.newTurn()\n }", "function loseGame(){\n stopGame();\n alert(\"Game Over. You lost.\");\n}", "function gameover() {\n home();\n }", "function gameEnd(victor) {\n \n if (victor === \"player\") {\n playerVictory();\n } else if (victor === \"computer\") {\n computerVictory();\n }\n}", "function endGame(result){\n if(result){\n clientGame.screen = 'goodWinScreen';\n } else {\n clientGame.screen = 'evilWinScreen';\n }\n\n socket.emit('syncMasterGamestate', clientGame);\n generateView();\n}", "deathOfEither(){\n if (playerPosition === this.position && !cells[playerPosition].classList.contains('powerUp')){\n endTheGame()\n winOrLoseScreen()\n win = false\n } else if (playerPosition === this.position && cells[playerPosition].classList.contains('powerUp')){\n this.position = 337\n playerScore += 5000\n cells[this.position].classList.remove(this.classname)\n gameoverAudio()\n this.eggTimer()\n }\n\n }", "function endGame() {\n p.onSetAppState(state => ({ newGame: false, game: { ...state.game, playedGames: 0 } }));\n p.startGame = false;\n clearTimeout(p.timeOut1);\n clearTimeout(p.timeOut2);\n }", "function endGame() {\n dingSFX.play();\n speak(lineEndGame);\n boxWrite(boxTextEndGame);\n gameState = 20;\n}", "function endGame() {\n\t\tgameOver = true;\n\t\t$('#gameBorder').hide();\n\t\t$('#stats').show();\n\t\twindow.clearInterval(timerFun);\n\t\tvar finishTime = (GAME_DURATION * 1000) / 60000;\n\t\tconsole.log(finishTime);\n \tvar wpm = Math.round(wordCount / finishTime);\n \t$('#totalWords').html(\"Total Words: \" + wordCount);\n \t$('#wpm').html(\"WPM: \" + wpm);\n \t$('#mistakes').html(\"Total Errors: \" + mistakeCount);\n \t$('#playAgain').on('click', function() {\n \t\tgame();\t\n \t});\n \treturn;\n\t}", "function gameOver() {\n\tstopClock();\n\twriteModalStats();\n\ttoggleModal();\n\tmatched=0;\n}", "function endGame() {\r\n clearInterval(animate);\r\n\r\n audioBackground.pause();\r\n alert(`Game over ! Your Score: ${score}`);\r\n\r\n canv.style.display = \"none\";\r\n div1[0].style.display = \"block\";\r\n }", "function endRound () {\n /* check to see how many players are still in the game */\n var inGame = 0;\n var lastPlayer = 0;\n for (var i = 0; i < players.length; i++) {\n if (players[i]) {\n players[i].timeInStage++;\n if (!players[i].out) {\n inGame++;\n lastPlayer = i;\n }\n }\n }\n\n /* if there is only one player left, end the game */\n if (inGame <= 1) {\n if (USAGE_TRACKING) {\n recordEndGameEvent(players[lastPlayer].id);\n }\n \n console.log(\"The game has ended!\");\n $gameBanner.html(\"Game Over! \"+players[lastPlayer].label+\" won Strip Poker Night at the Inventory!\");\n gameOver = true;\n\n if (SENTRY_INITIALIZED) {\n Sentry.addBreadcrumb({\n category: 'game',\n message: 'Game ended with '+players[lastPlayer].id+' winning.',\n level: 'info'\n });\n }\n\n for (var i = 0; i < players.length; i++) {\n if (HUMAN_PLAYER == i) {\n $gamePlayerCardArea.hide();\n $gamePlayerClothingArea.hide();\n }\n else {\n $gameOpponentAreas[i-1].hide();\n }\n }\n endWaitDisplay = -1;\n handleGameOver();\n } else {\n updateBiggestLead();\n allowProgression(eGamePhase.DEAL);\n preloadCardImages();\n }\n}", "function gameWin() {\n puzzleEnd(true)\n }", "function endGame(){\r\n youWonGif();\r\n document.getElementById(\"canvas\").style.display = \"none\";\r\n document.getElementById(\"level\").style.display = \"none\";\r\n document.getElementById(\"scorePoint\").style.display = \"none\";\r\n document.getElementById(\"scoreCat1\").style.display = \"none\";\r\n document.getElementById(\"endScorePoint\").style.display = \"block\";\r\n document.getElementById(\"startbtn\").style.display = \"none\";\r\n document.getElementById(\"newbtn\").style.display = \"block\";\r\n document.getElementById(\"intro\").style.display = \"none\";\r\n document.getElementById(\"endGame\").style.display = \"block\";\r\n \r\n}", "function endcard(){\n if(end_rezult==0 || end_rezult==1 || end_rezult==2){\n document.getElementById(\"tictactoegame\").removeEventListener('mousedown',choosesquere);\n document.getElementById(\"tictactoegame\").addEventListener('mousedown',pressrestartcolor);\n document.getElementById(\"tictactoegame\").addEventListener('mouseup',pressrestart);\n document.getElementById(\"tictactoegame\").addEventListener('mousedown',pressExitcolor);\n document.getElementById(\"tictactoegame\").addEventListener('mouseup',pressExit);\n ctx.fillStyle=\"rgba(0,0,0,0.9)\";\n ctx.fillRect(0,canvas.width/4,canvas.width,canvas.height/2);\n drawrestartbutton(restart_button_press_color);\n drawExit(exit_button_press_color);\n ctx.font=getFontend();\n ctx.fillStyle = \"white\";\n ctx.textAlign = \"center\";\n if(end_rezult==0){\n if(endsound==0){gamesounds(\"win\",mute);endsound=1;socket.emit('endgame');}\n \n gamestart=0;\n if(iam!=which_player){\n ctx.fillText(\"You won\", canvas.width/2,canvas.width/1.9);\n }\n else{\n ctx.fillText(\"O won\", canvas.width/2,canvas.width/1.9);\n }\n\n }\n else if(end_rezult==1){\n if(endsound==0){gamesounds(\"win\",mute);endsound=1;socket.emit('endgame');}\n \n gamestart=0;\n if(iam!=which_player){\n ctx.fillText(\"You won\", canvas.width/2,canvas.width/1.9); \n }\n else{\n ctx.fillText(\"X won\", canvas.width/2,canvas.width/1.9);\n }\n }\n else{\n if(endsound==0){gamesounds(\"draw\",mute);endsound=1;socket.emit('endgame');} \n gamestart=0;\n ctx.fillText(\"Draw\", canvas.width/2,canvas.width/1.9);\n }\n // clearInterval(count_time);\n }\n }", "gameOver() {\n this.clear();\n }", "function GameOver()\n {\n if(points > 10 || points2 > 10)\n {\n endGame();\n }\n }", "function finalize()\r\n {\r\n $(\".cell\").css('cursor', 'default');\r\n $(\".turn\").css('visibility', 'hidden');\r\n gameOver = true;\r\n }", "end() {\n this.isOver = true;\n this.isRunning = false;\n\n if (typeof this.onGameOver === 'function') {\n this.onGameOver();\n }\n }", "function lose() {\n losses++;\n startGame();\n}", "function endGame () {\n\t\t$(\"#timer\").empty();\n\t\t$(\"#game\").html(\"<h2>Game Over! Next stop the Musicians Hall of Fame.</h2>\")\n\t\t$(\"#game\").append(\"<p>Correct answers: \" + correct + \"</p>\");\n\t\t$(\"#game\").append(\"<p>Incorrect answers: \" + incorrect + \"</p>\");\n\t\t$(\"#game\").append(\"<p>A bad guess is better than no guess. Unanswered: \" + unanswered + \"</p>\");\n\t\t$(\"#restart\").css(\"visibility\", \"visible\");\n\t}", "function stopGame(){\n if (!win || win){\n clearWinOrLoseScreen()\n }\n clearInterval(gametimer)\n clearInterval(berryTimer)\n BGM.pause()\n BGM.currentTime = 0\n win = null\n playerScore = 0\n cells[enemyA.position].classList.remove('enemy1')\n cells[enemyB.position].classList.remove('enemy2')\n cells[enemyC.position].classList.remove('enemy3')\n cells[enemyD.position].classList.remove('enemy4')\n clearGrid()\n scoreboard.innerHTML = playerScore\n highScore = localStorage.getItem('highscore')\n highscoreboard.innerHTML = highScore\n cookiesRemaining = 212\n playerPosition = 487\n cells[playerPosition].classList.add('sprite')\n createMaze()\n playerPosition = 487\n cells[playerPosition].classList.add('sprite')\n enemyA.position = 337\n cells[enemyA.position].classList.add('enemy1')\n enemyB.position = 335\n cells[enemyB.position].classList.add('enemy2')\n enemyC.position = 339\n cells[enemyC.position].classList.add('enemy3')\n enemyD.position = 338\n cells[enemyD.position].classList.add('enemy4')\n gameOver = true\n \n }", "function winOrLoseScreen(){\n if (!win){\n GameOverGraphic()\n BGM.pause()\n } else {\n youWinGraphic()\n BGM.pause()\n }\n }", "function gameOver() {\n gameActive = false\n playSound(\"wrong\")\n gameOverAnimation()\n updateLevelText(\"Game Over\")\n resetGame()\n}", "function loseGame() { \n stopGame();\n alert(\"Game Over. You lost.\");\n}", "function gameOver() {\n game_play = false;\n end_tune.play()\n canvas.style.display='none';\n music.pause();\n document.getElementById('game-instructions').style.display = 'none';\n title_card.style.display='inherit';\n intro_text.innerHTML = 'GAME OVER';\n intro_text2.innerHTML = 'press \"Enter\" to play again';\n clearInterval(e_fire)\n\n}", "function endOfGame() {\n clearInterval(gameInterval)\n}" ]
[ "0.7363262", "0.73312306", "0.73222494", "0.71678025", "0.71493006", "0.71201795", "0.7084707", "0.7076073", "0.70394504", "0.7037044", "0.7035264", "0.70291007", "0.7026552", "0.7020337", "0.696077", "0.69574994", "0.6956808", "0.6954702", "0.6951126", "0.69385695", "0.693071", "0.6927719", "0.6920378", "0.6915867", "0.68826646", "0.68807995", "0.687979", "0.68774575", "0.68646467", "0.6855016", "0.6854289", "0.6838694", "0.6837897", "0.68349004", "0.683469", "0.68288517", "0.6827073", "0.68113005", "0.6808448", "0.6806783", "0.6800095", "0.67991525", "0.679903", "0.6792671", "0.6787839", "0.6787212", "0.67799723", "0.6778344", "0.67766637", "0.6769854", "0.6761663", "0.67548466", "0.67489606", "0.674753", "0.6746544", "0.67398643", "0.6737067", "0.67368746", "0.67274725", "0.6718609", "0.67171395", "0.6711776", "0.67104036", "0.67104036", "0.6704675", "0.67029333", "0.6702733", "0.66928005", "0.6689861", "0.66871953", "0.66854036", "0.6684999", "0.66838884", "0.66794825", "0.66792846", "0.6677923", "0.66763246", "0.6669979", "0.66578877", "0.6653433", "0.66532475", "0.66524184", "0.66523933", "0.6651392", "0.6650058", "0.6645664", "0.6642378", "0.66417366", "0.66389036", "0.66336167", "0.66333133", "0.6625799", "0.66227674", "0.66206765", "0.66196406", "0.6614279", "0.661393", "0.6611124", "0.66076106", "0.6605672", "0.66042733" ]
0.0
-1
ADD TIME PERIOD MENU ITEM FUNCTION =========================================================================
function addTimePeriod() { var sheet = getTimesheet(); //GET LAST RECORDED END DATE var lastEndDate = sheet.getRange('B:B').getCell(2, 1).getValue(); sheet.insertRowBefore(2); //GET THE NEXT TIME PERIOD var startDate = lastEndDate.addDays(1); var endDate = startDate.addDays(13); //ADD THE NEXT TIME PERIOD TO SHEET sheet.getRange('A:A').getCell(2, 1).setValue(startDate); sheet.getRange('B:B').getCell(2, 1).setValue(endDate); startDate = formatDate(startDate); endDate = formatDate(endDate); generateForm(startDate, endDate, 2, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTime (i, el) {\n // 1 = 1am \n // 2 = 2am \n // 3 = 3am \n // 4 = 4am \n // 5 = 5am \n // 5 = 5am \n // 6 = 6am \n // 7 = 7am \n // 8 = 8am \n // 9 = 9am \n // 10 = 10am \n // 11 = 11am \n // 12 = 12pm \n // 13 = 1pm \n // 14 = 2pm \n // 15 = 3pm \n // 16 = 4pm \n // 17 = 5pm \n // 18 = 6pm \n // 19 = 7pm \n // 20 = 8pm \n // 21 = 9pm \n // 22 = 10pm \n // 23 = 11pm \n // 24 = 12am \n // 25 = 1am\n \n var prefix = \" AM\";\n \n if ( i > 11 && i < 24) {\n prefix = \" PM\";\n if ( i >= 13) i -= 12;\n } if ( i >= 24 ) {\n prefix = \" AM\";\n if ( i === 24) {\n i -= 12;\n }\n if (i > 24) { \n i -= 24;\n };\n }\n \n // Create new element\n var newElement = '<li class=\"time\">' + i + prefix + '</li>';\n \n // Add new element\n $( el ).find(\".times\").append(newElement);\n }", "function TimeLine() {\n this.items = [];\n this.goalFps = 10;\n this.realFps = \"--\";\n var time = 0;\n var self = this;\n this.run = function() {\n var loop = setInterval(function() {\n time += 1000/self.goalFps;\n\n self.items.forEach(function(item, index) {\n if (time >= item.startTime) {\n item.actions.forEach(function(action, actionIndex) {\n if (!action.done) {\n\n if (time >= action.time + item.startTime) {\n $(item.dom)[action.action.split(\"(\")[0]](action.action.match(/('\\S+'|\"\\S\")/)[0].slice(1,-1));\n action.done = true;\n }\n }\n });\n\n }\n });\n\n // console.log(time);\n }, 1000/self.goalFps);\n }\n this.addItem = function (dom, startTime, actions) {\n self.items.push({\n dom: dom,\n startTime: startTime,\n actions: actions\n });\n }\n this.run();\n }", "function addTime() {\n calcAddHours(TIMELINE_HOURS);\n redrawTimeline();\n}", "function setTime(but)\n {\n var plus = document.createElement(\"span\");\n var minus = document.createElement(\"span\");\n var t = document.createElement(\"span\");\n var tick = document.createElement(\"span\");\n \n tick.className = \"buttons\";\n plus.className = \"time\";\n minus.className = \"time\";\n plus.id = \"plus\";\n t.id = \"time\";\n minus.id = \"minus\";\n tick.id = \"tick\";\n tick.innerHTML = \"&#57409;\"\n t.textContent = time;\n plus.textContent = \" + \";\n minus.textContent = \" - \";\n\n but.after(tick);\n but.after(plus);\n but.after(t);\n but.after(minus);\n\n\n\n \n \n }", "function setTimeDisplay(time) {\n if (time <= 12) {\n toDoHour = time + \"am\";\n } else {\n toDoHour = (time - 12) + \"pm\";\n }\n}", "function createTimeTrigger(type){\n var selector = document.getElementById(\"w\");\n w = selector.options[selector.selectedIndex].value;\n h = document.getElementById('h').value;\n m = document.getElementById('m').value;\n\n operation = h.toString() + ':' + m.toString() + ':' + w.toString();\n\n if(active_parent_id != \"triggers\"){\n var new_id = Date.now();\n task.triggers[new_id] = {\n \"type\": 'time',\n \"parent\": active_parent_id,\n \"operation\": operation\n }\n task.triggers[active_parent_id].operation.push(new_id.toString())\n } else {\n task['triggers']['trigger'] = {\n \"type\": 'time',\n \"parent\": \"triggers\",\n \"operation\": operation\n };\n }\n\n loadTask()\n $('#d2Assitant').modal('hide')\n}", "function addTimes() {\n for (var i = 0; i < bgPage.sites.length; i++) {\n var node = document.createElement(\"LI\");\n var textNode = document.createTextNode(bgPage.sites[i] + \" \"\n + bgPage.formatTime(bgPage.timers[i]));\n node.appendChild(textNode);\n document.getElementById(\"list\").appendChild(node);\n }\n }", "function addTime() {\n seconds++;\n if (seconds >= 60) {\n seconds = 0;\n minutes++;\n }\n time.textContent = `${(minutes ? (minutes > 9 ? minutes : '0' + minutes) : '00')}:${(seconds ? (seconds > 9 ? seconds : '0' + seconds) : '00')}`;\n}", "function addTime() {\n let $currentForm = $(this).parent();\n let parentID = $currentForm.attr(\"data-index\");\n let newID = 0;\n let $previousSibling = $currentForm.find(\"input[type=time]\").last();\n // If there is no previous sibling construct a new time element \n if($previousSibling.length == 0) {\n $currentForm.append(\"<input id='options-\" + parentID + \"-times-0-time' required type='time' value='' data-index = '0'>\");\n return true;\n }\n let previousID = parseInt($previousSibling.attr(\"data-index\"));\n newID = previousID + 1;\n\n if(newID > 4) {\n displayText(\"Can't add more than 5 times to a date\", \"error\");\n return false;\n }\n let $newElement = $previousSibling.clone();\n $newElement.attr(\"id\", $newElement.attr(\"id\").replace(\"times-\" + previousID, \"times-\" + newID))\n $newElement.attr(\"data-index\", newID);\n $currentForm.append($newElement);\n $currentForm.append(\"<br>\");\n \n}", "function changeTime ( time, logout ) {\r\n __TIMER = time;\r\n __EXITM = logout;\r\n document.getElementsByClassName('toptime')[0].innerHTML = '</a> <div class=\"toptime\">Time remaining: <span>' + __TIMER + '</span> <a href=\"/logout\">[' + __EXITM + ']</a></div>';\r\n}", "function addTime(key) {\n _addedTimes = true;\n timeArea = document.getElementById(key+'-times-area');\n timeArea.innerHTML += \"<tr><td class='label'>Days:<td><input style='margin-top: 25px;' class='\"+key+\"-days' type='text' id='\"+key+\"-days' placeholder='e.g. MTWRF' pattern='[MTWRF]{1,5}' required>\";\n timeArea.innerHTML += \"<tr><td class='label'>From:&nbsp;&nbsp;&nbsp;<input class='\"+key+\"-start-times' type='time' id='\"+key+\"-start' placeholder='e.g. 11:00 AM' pattern='[0-1]{0,1}[0-9]{1}:[0-9]{2} (AM|PM){1}' required><td class='label'>To:&nbsp;&nbsp;&nbsp;<input class='\"+key+\"-end-times' type='time' id='\"+key+\"-end' placeholder='e.g. 12:00 PM' pattern='[0-1]{0,1}[0-9]{1}:[0-9]{2} (AM|PM){1}' required></tr>\";\n }", "function setTimeColor(item) {\n //Set block to past\n if (item.time < now) {\n return \"past\";\n }\n //Set block to present\n else if (item.time == now) {\n return \"present\";\n }\n //Set block to future\n else {\n return \"future\";\n }\n }", "function add() {\n seconds++;\n if (seconds >= 60) {\n seconds = 0;\n minutes++;\n if (minutes >= 60) {\n minutes = 0;\n hours++;\n }\n }\n h2.textContent = (hours ? (hours > 9 ? hours : \"0\" + hours) : \"00\") + \":\" + (minutes ? (minutes > 9 ? minutes : \"0\" + minutes) : \"00\") + \":\" + (seconds > 9 ? seconds : \"0\" + seconds);\n timer();\n}", "function addWork(){\n if (workMins > 0){\n workMins += 1;\n workTime.textContent = workMins + ' mins';\n } else {\n workMins = 1\n workTime.textContent = workMins + ' mins';\n }\n}", "function C007_LunchBreak_Natalie_StartLunch() {\r\n CurrentTime = CurrentTime + 120000;\r\n LeaveIcon = \"\";\r\n}", "calcTime() {\n const numIng = this.ingredients.length;\n const periods = Math.ceil(numIng / 3);\n this.time = periods * 15;\n }", "function updateTime(){\n setTimeContent(\"timer\");\n}", "function clock()\r\n{\r\n\tvar today=new Date();\r\n\tvar h=today.getHours();\r\n\tvar m=today.getMinutes();\r\n\tvar s=today.getSeconds();\r\n\t// add a zero in front of numbers<10\r\n\tm=checkTime(m);\r\n\ts=checkTime(s);\r\n\t\r\n\t$(\"#menu-hour\").html(h+\":\"+m+\":\"+s);\r\n}", "function initCountdown(mainMenuItem) { var date = mainMenuItem.attr(\"countdown\"); /* init countdown with the configured date attr */ if (mainMenuItem.find('.buddha-menu-item-countdown').length==0 && date != undefined && !isNaN(Date.parse(date))) { /* date attr is valid */ /* time to elapse is (date - NOW) % 24h */ var timeUntilElapseInSeconds = (((new Date(date)).getTime() - (new Date()).getTime()) / 1000) % 86400; if (timeUntilElapseInSeconds < 0) timeUntilElapseInSeconds += 86400; /* add countdown tag and init flipClock */ if (mainMenuItem.find('>a>i.fa-angle-down:last').length > 0) { mainMenuItem.find('>a>i.fa-angle-down:last').before(\" <i class=\\\"buddha-menu-item-countdown\\\"> <div></div> </i>\"); } else { mainMenuItem.find('>a').append(\" <i class=\\\"buddha-menu-item-countdown\\\"> <div></div> </i>\"); } mainMenuItem.find(\".buddha-menu-item-countdown>div\").FlipClock( timeUntilElapseInSeconds, { clockFace: 'DailyCounter', countdown: true, }); } }", "function addTime() {\n let timer = document.querySelector('.timer');\n\n seconds++;\n if (seconds >= 60) {\n seconds = 0;\n minutes++;\n if (minutes >= 60) {\n minutes = 0;\n }\n }\n timer.textContent = (minutes ? (minutes > 9 ? minutes : \"0\" + minutes) : \"00\") + \":\" + (seconds > 9 ? seconds : \"0\" + seconds);\n\n startTimer();\n }", "changeTimeValue(e, timeValue) {\n if (e.target.textContent === '+') {\n timer[timeValue]++;\n ui.updateUiElement(ui[timeValue], timer[timeValue])\n console.log(timer[timeValue]);\n } else {\n timer[timeValue]--;\n if (timer[timeValue] < 1) {\n timer[timeValue] = 1;\n }\n ui.updateUiElement(ui[timeValue], timer[timeValue])\n console.log(timer[timeValue]);\n }\n }", "function timeAdd(element, start,stop){\n if(typeof(start)!=='number' && typeof(stop)!=='number' || start === stop){\n return;\n }\n start++;\n element.text(start);\n setTimeout(function(){timeAdd(element, start,stop);}, 25);\n}", "function changeTime(){\n document.getElementById(\"clock\").innerHTML = \"Time- \" + (++startTime) + \" seconds\";\n }", "function addTime() {\n timer = timer + 30;\n}", "function addTime() {\n\tadder++;\n\tdocument.getElementById('settimecount').innerHTML = adder;\n}", "calcTime () {\n const numberOfIngredients = this.ingredients.length;\n const period = Math.ceil( numberOfIngredients / 3 )\n this.time = period * 15;\n }", "function addTime(mins, mod) {\n \"use strict\";\n mins = parseInt(mins) || 0;\n if (mins <= 0) {\n if (mod) { cb.sendNotice(\"You did not enter a valid option for /addtime.\\nType /ubhelp addtime to see how to use /addtime.\", mod, ub_color); }\n } else if (setTimer.interval) {\n setTimer.mins += mins;\n if (mod) { cb.sendNotice(mod + \" has has added \" + mins + \" minute\" + (mins === 1 ? \"\" : \"s\") + \" to the timer!\", room, ub_color); }\n } else {\n if (mod) { cb.sendNotice(\"There is no timer running.\", mod, ub_color); }\n }\n}", "calcTime() {\n const ingNum = this.ingredients.length;\n const periods = Math.ceil(ingNum / 3);\n this.time = periods * 15;\n }", "calcTime() {\n const numberOfIngredients = this.ingredients.length;\n const periods = Math.ceil(numberOfIngredients / 3);\n this.time = periods * 15;\n }", "calcTime(){\n const numIng=this.ingredients.length;//ingredients is an array \n const periods= Math.ceil(numIng/3);\n this.time=periods*15;\n }", "function add() {\n seconds++;\n if (seconds >= 60) {\n seconds = 0;\n minutes++;\n if (minutes >= 60) {\n minutes = 0;\n hours++;\n }\n }\n\n // setup running timer display\n timerObj.textContent = (hours ? (hours > 9 ? hours : \"0\" + hours) : \"00\") + \":\" + (minutes ? (minutes > 9 ? minutes : \"0\" + minutes) : \"00\") + \":\" + (seconds > 9 ? seconds : \"0\" + seconds);\n\n timer();\n}", "function startTime() {\n\ttime = setInterval(() => {\n\t\tseconds = seconds + 1;\n\t\tif (seconds == 59) {\n\t\t\tseconds = 0;\n\t\t\tmin = min + 1;\n\t\t}\n\t\tif (min == 60) {\n\t\t\tmin = 0;\n\t\t\thour = hour + 1;\n\t\t}\n\t\ttimeSpace.innerHTML = \"h\" + hour + \":\" + min + \"m : \" + seconds + \"s\";\n\t\t// to Show time\n\t}, 1000)\n}", "function setTime()\n {\n ++totalSeconds;\n $('#timer > #seconds').html(pad(totalSeconds%60));\n $('#timer > #minutes').html(pad(parseInt(totalSeconds/60)));\n }", "function menu(time) {\n clearCanvas();\n\n dessineEtDeplaceLesEtoiles();\n drawVolumeMeter();\n visualize();\n measureFPS(time);\n\n cpt += 1 ;cpt %= 64;\n drawAnimatedTextMenu();\n\n var rand = Math.random();\n rect1 = new Etoile();\n etoiles.push(rect1);\n\n // 4 on rappelle la boucle d'animation 60 fois / s\n if (state == 0){\n requestAnimationFrame(menu);\n }else {\n // c'etait la derniere iteration de l'anim , on repasse au menu\n etoiles=[];\n }\n}", "function add() {\n seconds++;\n if (seconds >= 60) {\n seconds = 0;\n minutes++;\n if (minutes >= 60) {\n minutes = 0;\n }\n }\n timer.textContent = (minutes ? (minutes > 9 ? minutes : \"0\" + minutes) : \"00\") +\n \":\" + (seconds > 9 ? seconds : \"0\" + seconds);\n startTimer();\n}", "startDatePanelClick() {\n // change time type to start time mode\n dispatch(modifyInnerState_timeType(1))\n // route to time selector page\n dispatch(modifyInnerState_route(3))\n }", "function timeClick (buttonID, duration) {\n switch (duration) {\n case 'one':\n minutes = 1;\n break;\n case 'two':\n minutes = 2;\n break;\n case 'three':\n minutes = 3;\n }\n var buttons = document.getElementsByClassName('durationButton'); \n for (var i = 0, length = buttons.length; i < length; i++) {\n buttons[i].style.border = '1px solid #333333';\n }\n document.getElementById(buttonID).style.border = '3px solid red';\n userSelections[2] = true;\n}", "function add() {\n seconds++;\n if (seconds >= 60) {\n seconds = 0;\n minutes++;\n if (minutes >= 60) {\n minutes = 0;\n hours++;\n }\n }\n \n $(\"#timer\").text((hours ? (hours > 9 ? hours : \"0\" + hours) : \"00\") + \":\" + (minutes ? (minutes > 9 ? minutes : \"0\" + minutes) : \"00\") + \":\" + (seconds > 9 ? seconds : \"0\" + seconds));\n\n timer();\n}", "function initTime()\r\n{\r\n\ttempoDiv = document.getElementById(\"time\");\r\n\ttempoDiv.style.display = \"inline\";\r\n\ttime=0;\r\n\ttimeIncrement(time);\r\n}", "_updateTime() {\r\n // Determine what to append to time text content, and update time if required\r\n let append = \"\";\r\n if (this.levelNum <= MAX_LEVEL && !this.paused) {\r\n this.accumulatedTime += Date.now() - this.lastDate;\r\n }\r\n this.lastDate = Date.now();\r\n\r\n // Update the time value in the div\r\n let nowDate = new Date(this.accumulatedTime);\r\n let twoDigitFormat = new Intl.NumberFormat('en-US', {minimumIntegerDigits: 2});\r\n if (nowDate.getHours() - this.startHours > 0) {\r\n this.timerDisplay.textContent = `Time: ${nowDate.getHours() - this.startHours}:`+\r\n `${twoDigitFormat.format(nowDate.getMinutes())}:` +\r\n `${twoDigitFormat.format(nowDate.getSeconds())}${append}`;\r\n }\r\n else {\r\n this.timerDisplay.textContent = `Time: ${twoDigitFormat.format(nowDate.getMinutes())}:` +\r\n `${twoDigitFormat.format(nowDate.getSeconds())}${append}`;\r\n }\r\n }", "function timeSet(index){\n /* find values of time */\n var seconds = Timers[index].time * 60;\n /* if there are seconds in current timer, add to time */\n var secs = Timers[index].seconds;\n if(secs > 0){\n seconds += secs;\n }\n /* save times in seconds*/\n currentTime = seconds;\n startingTime = seconds;\n\n /* if a timer is playing, create new countdown with new time */\n if(statusStart){\n timerFunc(currentTime);\n }\n /* else display current selected timer in display section (formatted) */\n else{\n displayTimeFormat(currentTime);\n }\n /* switch the heading title based on clicked timer */\n switchTitle(buttonsTime[index]);\n currentTimer = Timers[index];/* store clicked timer */\n}", "displayTime() {\n if(app === 1){\n this.d1.value = this.twoDigitNum(stopwatch.t1);\n this.d2.value = this.twoDigitNum(stopwatch.t2);\n this.d3.value = this.twoDigitNum(stopwatch.t3);\n }\n else{\n this.d1.value = this.twoDigitNum(timer.t1);\n this.d2.value = this.twoDigitNum(timer.t2);\n this.d3.value = this.twoDigitNum(timer.t3);\n }\n }", "function addOneSec(buttonName3){\n var time = buttonName3.parentElement.parentElement.querySelectorAll('td')[1].innerHTML;\n var seconds = Number(time.substring(time.indexOf(':')+1));\n var minutes = Number(time.substring(0, time.indexOf(':')));\n seconds = seconds + 1;\n buttonName3.parentElement.parentElement.querySelectorAll('td')[1].innerHTML = (minutes + \":\" + seconds);\n}", "function createLi() {\r\n var li = document.createElement(\"li\");\r\n li.appendChild(document.createTextNode((new Date()).strftime(\"%H:%M:%S \")));\r\n return li;\r\n}", "function t_generateTimeOptions() {\n \n for (var i = 0; i < t_time_sec.length; i++) {\n t_seconds = t_time_sec[i];\n\n var t_timerpickersec = document.getElementById(\"t_timepickersec\");\n var option = document.createElement(\"option\");\n if (t_seconds<10) {//printing the last zero\n option.text = \"0\"+t_seconds;\n } else {\n option.text = t_seconds;\n }\n t_timepickersec.add(option);\n }\n\n for (var i = 0; i < t_time_min.length; i++) {\n t_mins = t_time_min[i];\n\n var t_timerpickermin = document.getElementById(\"t_timepickermin\");\n var option = document.createElement(\"option\");\n if (t_mins<10) {//printing the last zero\n option.text = \"0\"+t_mins;\n } else {\n option.text = t_mins;\n }\n t_timepickermin.add(option);\n }\n}", "function AddDateAndTime() {\n if(date_poll_counter<MAX_OPTIONS)\n {\n $(\"<input type=date name='time-poll-option'/>\").insertBefore($('#add-options'));\n $(\"<input type=time name='time-poll-option'/><br>\").insertBefore($('#add-options'));\n $(\"<input type=date name='time-poll-option'/>\").insertBefore($('#add-options'));\n $(\"<input type=time name='time-poll-option'/><br>\").insertBefore($('#add-options'));\n date_poll_counter+=2;\n }\n else\n window.alert('You have reached maximal number of options.');\n}", "function timer(time, timerType) {\n\n (function move() { // this keeps the counter running in a loop based on changed information\n if (time > -1) {\n\n document.getElementById(\"timer\").innerHTML = timerType + \" \" + time + \"s\";\n setTimeout(move, 1000);\n time = time - 1;\n }\n\n })();\n}", "function changeTimeDisplayTo (mode) {\n var menuTabActiveClass = 'menu__tab--active';\n\n switch (mode) {\n case 'stopwatch':\n // tab modifications\n countdownTab.classList.remove(menuTabActiveClass);\n stopwatchTab.classList.add(menuTabActiveClass);\n countdownTab.setAttribute('onclick', 'changeTimeDisplayTo(\"countdown\");');\n stopwatchTab.removeAttribute('onclick');\n // dialpad modifications\n dialpad.classList.add('hide');\n // button modifications\n startPauseButton.setAttribute('onclick', 'startStopwatch();');\n lapButton.classList.remove('hide');\n resetTimer();\n break;\n case 'countdown':\n // tab modifications\n stopwatchTab.classList.remove(menuTabActiveClass);\n countdownTab.classList.add(menuTabActiveClass);\n stopwatchTab.setAttribute('onclick', 'changeTimeDisplayTo(\"stopwatch\");');\n countdownTab.removeAttribute('onclick');\n // dialpad/lap modifications\n dialpad.classList.remove('hide');\n lapContainer.classList.add('hide');\n // button modifications\n startPauseButton.setAttribute('onclick', 'startCountdown();');\n lapButton.classList.add('hide');\n resetTimer();\n break;\n default:\n console.error('No valid mode to switch to...');\n };\n}", "function timer(times) {\n // grab the hours, minutes, and seconds\n let hour = times.hour;\n let minute = times.minute;\n let second = times.second;\n let hourChoice = times.hourChoice;\n\n let timeDiv = document.getElementById(\"time\");\n let hourDiv = document.getElementById(\"hour\");\n // have the minutes and seconds always contain two digits\n minute = ticker(minute);\n second = ticker(second);\n\n // display the time on the application\n if (parseInt(hourChoice) === 24) {\n timeDiv.children[0].innerHTML = hour + \":\" + minute + \":\" + second;\n } else {\n if (hour > 12) {\n hour = hour - 12;\n document.getElementById(\"number\").innerHTML = hour + \":\" + minute + \":\" + second;\n hourDiv.innerHTML = \"PM\";\n } else if (hour === 12) {\n document.getElementById(\"number\").innerHTML = hour + \":\" + minute + \":\" + second;\n hourDiv.innerHTML = \"PM\";\n } else if (hour === 0) {\n hour = hour + 12;\n document.getElementById(\"number\").innerHTML = hour + \":\" + minute + \":\" + second;\n hourDiv.innerHTML = \"AM\";\n } else {\n document.getElementById(\"number\").innerHTML = hour + \":\" + minute + \":\" + second;\n hourDiv.innerHTML = \"AM\";\n };\n };\n}", "function updateTime() {\n var now = new Date();\n var minutes = now.getMinutes()\n document.getElementById(\"menubarClock\").innerHTML = now.getHours() + \".\" + (minutes > 9 ? '' : '0') + minutes;\n}", "function addEntry(){\n //add box\n var box = document.createElement(\"section\");\n document.getElementById(\"entries\").appendChild(box);\n //add name of med\n var text = document.createElement(\"p\");\n var med = document.getElementById(\"med-name\").value;\n var name = document.createTextNode(med);\n text.append(name);\n document.getElementById(\"entries\").lastElementChild.appendChild(text);\n //add time taken\n var newtime = document.createElement(\"time\");\n var time = document.querySelector('input[type=\"time\"]').value; //for some reason this works but not getElement by ID\n var timeText = document.createTextNode(\"Last taken: \" + time);\n newtime.append(timeText);\n document.getElementById(\"entries\").lastElementChild.appendChild(newtime); \n //get the wait time and calculate next dosage time\n var elem = document.createElement(\"time\");\n var hours = document.getElementById(\"input-number\").value; \n var addTime = parseInt(time.slice(0,2)) + parseInt(hours); \n time = addTime + time.slice(2,5);\n var node = document.createTextNode(\"Next dosage at \" + time);\n elem.append(node);\n document.getElementById(\"entries\").lastElementChild.appendChild(elem);\n //create count down\n var elem = document.createElement(\"time\");\n elem.setAttribute(\"id\", med)\n var node = document.createTextNode(hours+\":00:00\");\n elem.append(node);\n document.getElementById(\"entries\").lastElementChild.appendChild(elem);\n //timer\n miliTime = hours * 60 * 60 * 1000; \n //how can I give each entry a unique timer\n //how can I make the time display as 5:04 and not 5:4\n setInterval(function(){\n var hh = Math.floor((miliTime % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));\n var mm = Math.floor((miliTime % (1000 * 60 * 60)) / (1000 * 60));\n var ss = Math.floor((miliTime % (1000 * 60)) / 1000);\n document.getElementById(med).innerHTML = hh + \":\" + mm + \":\" + ss;\n miliTime -= 1000;\n }, 1000);\n //get rid of form and bring back add button\n document.getElementById(\"add\").style.visibility = \"visible\";\n document.getElementById(\"addForm\").style.visibility = \"hidden\"; \n \n \n}", "function buildTime() {\n var table = ce('table');\n var tr = ce('tr');\n var tdPlus = ce('td');\n var tdMinus = ce('td');\n var tdPlusMinutes = ce('td');\n var tdMinusMinutes = ce('td');\n var td = ce('td');\n var hours = ce('input');\n var minutes = hours.cloneNode(true);\n var currentDown = null;\n\n function fastSeekTime() {\n isMouseDown = true;\n\n navTimer = setTimeout(updateTimeNav, 500);\n }\n\n function updateTimeNav() {\n switch (currentDown) {\n case tdPlus:\n updateHours(1);\n break;\n\n case tdMinus:\n updateHours(-1);\n break;\n\n case tdPlusMinutes:\n updateMinutes(1);\n break;\n\n case tdMinusMinutes:\n updateMinutes(-1);\n break;\n }\n\n navTimer = setTimeout(updateTimeNav, 50);\n }\n\n function updateMinutes(index) {\n if(index > 0) {\n var currentMinute = minutes.value == 59 ? 0 : +minutes.value + index;\n } else {\n var currentMinute = minutes.value == 0 ? 59 : +minutes.value + index;\n }\n minutes.value = pad(currentMinute);\n }\n\n function updateHours(index) {\n var currentHour = hours.value;\n\n if((currentHour == 11 && index > 0 || currentHour == 12 && index < 0) && options.timerFormat != 24) {\n var $amPm = $($self.data('timeContainer')).find('.amPm');\n var currentAmPm = $amPm.text();\n\n if(currentAmPm == 'am') {\n currentAmPm = 'pm';\n } else {\n currentAmPm = 'am';\n }\n\n $amPm.text(currentAmPm);\n }\n\n if(options.timerFormat != 24) {\n if(index > 0) {\n currentHour = currentHour == 12 ? 1 : +hours.value + index;\n } else {\n currentHour = currentHour == 1 ? 12 : +hours.value + index;\n }\n } else {\n if(index > 0) {\n currentHour = currentHour == 23 ? 0 : +hours.value + index;\n } else {\n currentHour = currentHour == 0 ? 23 : +hours.value + index;\n }\n }\n\n hours.value = pad(currentHour);\n }\n\n table.cellSpacing = 0;\n table.cellPadding = 0;\n\n tdPlus.innerHTML = '&#9650;';\n tdMinus.innerHTML = '&#9660;';\n tdPlusMinutes.innerHTML = '&#9650;';\n tdMinusMinutes.innerHTML = '&#9660;';\n\n tdPlus.className = 'stepper';\n tdMinus.className = 'stepper';\n tdPlusMinutes.className = 'stepper';\n tdMinusMinutes.className = 'stepper';\n\n hours.type = 'text';\n hours.name = 'hours';\n hours.value = pad(currentHour);\n\n minutes.type = 'text';\n minutes.name = 'minutes';\n minutes.value = pad(currentMinute);\n\n tdPlus.onmousedown = function() {\n currentDown = this;\n fastSeekTime();\n }\n\n tdMinus.onmousedown = function() {\n currentDown = this;\n fastSeekTime();\n }\n\n tdPlusMinutes.onmousedown = function() {\n currentDown = this;\n fastSeekTime();\n }\n\n tdMinusMinutes.onmousedown = function() {\n currentDown = this;\n fastSeekTime();\n }\n\n tdPlus.onclick = function() {\n updateHours(1);\n }\n\n tdMinus.onclick = function() {\n updateHours(-1);\n }\n\n tdPlusMinutes.onclick = function() {\n updateMinutes(1);\n }\n\n tdMinusMinutes.onclick = function() {\n updateMinutes(-1);\n }\n\n tr.appendChild(tdPlus);\n tr.appendChild(td.cloneNode(false));\n tr.appendChild(tdPlusMinutes);\n\n table.appendChild(tr);\n\n tr = tr.cloneNode();\n\n td.appendChild(hours);\n\n tr.appendChild(td); // hours input\n tr.appendChild(td.cloneNode(false));\n\n var td2 = td.cloneNode(false);\n td2.className = 'minutes-container ' + (options.timerFormat == 24 ? 'military-format' : '');\n td2.appendChild(minutes);\n\n var span = ce('span');\n\n if(options.timerFormat != 24) {\n span.innerHTML = 'pm';\n span.className = 'amPm';\n }\n\n td2.appendChild(span);\n tr.appendChild(td2); // minutes input\n\n table.appendChild(tr);\n\n tr = tr.cloneNode(false);\n\n td = ce('td');\n\n tr.appendChild(tdMinus); // hours minus\n tr.appendChild(td.cloneNode(false));\n tr.appendChild(tdMinusMinutes); // minutes minus\n\n table.appendChild(tr);\n\n tr = tr.cloneNode(false);\n\n var tdColspan = td.cloneNode(false);\n\n tdColspan.colSpan = 4;\n\n var setButton = ce('button');\n\n setButton.innerHTML = 'SET';\n\n setButton.onclick = function() {\n\n var selectedTd = $($self.data('dateContainer')).find('td.selected');\n\n if(selectedTd.length == 0) {\n hide();\n return;\n }\n\n var selectedDate = selectedTd.get(0);\n var $timeContainer = $($self.data('timeContainer'));\n var selectedTime = $timeContainer.find('input');\n\n var amOrPm = $timeContainer.find('.amPm').text();\n var minutesValue = selectedTime.filter('[name=minutes]').val();\n var hoursValue = selectedTime.filter('[name=hours]').val();\n\n var d = selectedDate.dataset;\n\n var valueString = d.dateDayValue +' ';\n valueString += options.monthsLabel[d.dateMonthValue] +', ';\n valueString += d.dateYearValue +' @ ';\n valueString += hoursValue +':'+ minutesValue+' ';\n\n if(options.timerFormat != 24) {\n valueString += amOrPm.toUpperCase();\n }\n\n $self.val( valueString );\n\n if(options.timerFormat != 24) {\n altField.val(d.dateYearValue+'-'+(+d.dateMonthValue+1)+'-'+d.dateDayValue +' '+ (+hoursValue + (amOrPm == 'pm' ? 12 : 0)) +':'+ minutesValue+':00' );\n } else {\n altField.val(d.dateYearValue+'-'+(+d.dateMonthValue+1)+'-'+d.dateDayValue +' '+ hoursValue +':'+ minutesValue+':00' );\n }\n\n hide();\n }\n\n tdColspan.appendChild(setButton);\n\n tr.appendChild(tdColspan);\n\n table.appendChild(tr);\n\n return table;\n }", "function createTimePeriodDropDown(delay_amount, $html) {\n var $download_timePeriod = $(\".download_timePeriod\"),\n timePeriodValue, baseValue, isChecked = false;\n //removing any existing drop down.\n if ($download_timePeriod.find(\"ul\").length > 0) {\n $download_timePeriod.find(\"ul\")[0].remove();\n }\n var rootUL_timePeriod = $(\"<ul>\");\n timePeriods.forEach(function(timePeriodParent) {\n var subMenu = $(\"<ul>\");\n timePeriodParent.timePeriods.forEach(function(timePeriod) {\n var tp = $(\"<li>\");\n timePeriodValue = convertToTimeperiodObject(timePeriod.code).timeInSeconds();\n tp.append(timePeriod.name);\n tp.data(\"timePeriodObject\", timePeriod);\n tp.click(function() {\n var timePeriodObject = $(this).data(\"timePeriodObject\");\n $(\".download_timePeriod\")\n .data(\"timePeriodObject\", timePeriodObject)\n .html($(this).data(\"timePeriodObject\").name);\n $(\".download_timePeriod_container > ul\").toggle();\n var isDayCandles = timePeriodObject.code === '1d';\n var $download_fromTime = $html.find(\".download_fromTime\");\n if (isDayCandles) {\n $download_fromTime.val(\"00:00\");\n $download_fromTime.hide()\n } else {\n $download_fromTime.show();\n }\n });\n if (!_.isUndefined($download_timePeriod.data(\"timePeriodObject\")) && !isChecked) {\n var obj = $download_timePeriod.data(\"timePeriodObject\");\n var value = convertToTimeperiodObject(obj.code).timeInSeconds();\n if(value < delay_amount){\n tp.click();\n $(\".download_timePeriod_container > ul\").toggle();\n }\n isChecked = true;\n }\n subMenu.append(tp);\n\n });\n rootUL_timePeriod.append($(\"<li>\").append(timePeriodParent.name).append(subMenu));\n });\n $(\".download_timePeriod_container\").append(rootUL_timePeriod);\n var menu_options = is_rtl_language ? {position: { my: \"right top\", at: \"left top\" }} : {};\n rootUL_timePeriod.menu(menu_options).toggle();\n }", "addHour() {\n this.state.duration += 60;\n }", "function newTimeSlot(day){\n \n\t$('#add-ts-dd-here').html('<div class=\"ui search selection dropdown\" id=\"add-ts-ses\"><input type=\"hidden\" name=\"add-ts-session\"> <div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\"> </div></div>');\n\tlet search_dat = [];\n\tlet sessions = tt_man.tt_data.session_type;\n\t\n \n\tfor(let i=0; i<sessions.length; i++){\n\t\tsearch_dat.push({value: ''+i+'', name:sessions[i].title});\n\t}\n \n\t// Ready modal components\n\t$('#add-ts-ses').dropdown({values: search_dat});\n\t$('#add-ts-ses').dropdown('setting', 'onChange', \n\t\tfunction(new_val){setAddTSColPreview(parseInt(new_val));});\n \n\tmakeTimeDD('add-ts-st-dd-here', 'add-ts-start', 6, 'add-ts-et-dd-here', 'add-ts-end', 22);\n\t$('#add-ts-error-overlap').hide();\n\t$('#add-ts-error-ses').hide();\n \n\t// TODO change to a default colour stored in the meta\n\t$('#add-ts-col-pre').css('background-color', defualt_col);\n \n\t// Show modal\n\t$('#add-ts')\n\t\t.modal({\n\t\t\tonApprove : function() {\n\t\t\t\treturn addTSSave(day);\n\t\t\t}\n\t\t})\n\t\t.modal('show');\n \n \n}", "createTimer() {\n\n // for the text showing game time left\n let timeTextConfig = {\n fontFamily: 'Courier',\n fontSize: '23px',\n backgroundColor: '#D8D7D7',\n color: '#000000',\n align: 'right',\n padding: {\n top: 5,\n bottom: 5,\n },\n }\n \n this.timeLabel = this.add.text(314, 444, game.settings.gameTimer/1000, timeTextConfig);\n }", "function PaintPeriodTime()\n{\t\n\tvar Static = true;\n\n\tif (TimeCard.View == 4 && TimeCard.Status != 2 && TimeCard.Status != 3)\n\t{\n\t\tStatic = false;\n\t}\t\n\t\n\tvar divObj = self.TABLE.document.getElementById(\"paneBody2\");\t\n\tdivObj.innerHTML = PaintTimeCard(\"Period\", Static);\n\t\n\tself.TABLE.stylePage();\n\tfitToScreen();\n\n\tif (!Static)\n\t{\n\t\tFillValues(\"Period\");\t\n\t}\t\n}", "function createTimeLine(){\r\n\t\tvar timeLine = '<div class=\"timeLineContainer\"><div class=\"timeLine\"><div class=\"progressBar\"></div><div class=\"eventsLine\"></div></div></div>';\r\n\t\t\r\n\t\t$(\"body\").prepend(timeLine);\r\n\t}", "function createOpenedSlot(start, end) {\n var frag = document.createDocumentFragment(),\n cont = document.createElement('div'),\n p = document.createElement('p'),\n li = document.createElement('li'),\n div = document.createElement('div');\n cont.classList.add('fj-time-slot');\n div.classList.add('fj-dropdown-container');\n p.innerHTML = 'Start Time';\n div.appendChild(p);\n p = document.createElement('ul');\n p.setAttribute('data-cur', 'start');\n p.classList.add('fj-dropdown-button');\n if(start === '-:- --') {\n li.innerHTML = '-:- --';\n p.appendChild(li);\n li = document.createElement('li');\n li.classList.add('is-active');\n li.innerHTML = '-:- --';\n p.appendChild(li);\n li = document.createElement('li');\n li.innerHTML = '-:- --';\n } else {\n li.innerHTML = start.clone()\n .subtract(5, 'm')\n .format('h:mm A');\n p.appendChild(li);\n li = document.createElement('li');\n li.classList.add('is-active');\n li.innerHTML = start.format('h:mm A');\n p.appendChild(li);\n li = document.createElement('li');\n li.innerHTML = start.clone()\n .add(5, 'm')\n .format('h:mm A');\n }\n p.appendChild(li);\n div.appendChild(p);\n cont.appendChild(div);\n p = document.createElement('p');\n p.innerHTML = 'to';\n cont.appendChild(p);\n div = document.createElement('div');\n div.classList.add('fj-dropdown-container');\n p = document.createElement('p');\n p.innerHTML = 'End Time';\n div.appendChild(p);\n p = document.createElement('ul');\n p.setAttribute('data-cur', 'end');\n p.classList.add('fj-dropdown-button');\n li = document.createElement('li');\n if(end === '-:- --') {\n li.innerHTML = '-:- --';\n p.appendChild(li);\n li = document.createElement('li');\n li.classList.add('is-active');\n li.innerHTML = '-:- --';\n p.appendChild(li);\n li = document.createElement('li');\n li.innerHTML = '-:- --';\n } else {\n li.innerHTML = end.clone()\n .subtract(5, 'm')\n .format('h:mm A');\n p.appendChild(li);\n li = document.createElement('li');\n li.classList.add('is-active');\n li.innerHTML = end.format('h:mm A');\n p.appendChild(li);\n li = document.createElement('li');\n li.innerHTML = end.clone()\n .add(5, 'm')\n .format('h:mm A');\n }\n p.appendChild(li);\n div.appendChild(p);\n cont.appendChild(div);\n frag.appendChild(cont);\n return frag;\n}", "function updateTime() {\n\t\tvar dateTime = tizen.time.getCurrentDateTime(), secondToday = dateTime.getSeconds() + dateTime.getMinutes() * 60 + dateTime.getHours() * 3600,\n\t\tminDigitLeft = document.querySelector(\"#time-min-digit-left\"),\n\t\tminDigitRight = document.querySelector(\"#time-min-digit-right\"),\n\t\thourDigitLeft = document.querySelector(\"#time-hour-digit-left\"), \n\t\thourDigitRight = document.querySelector(\"#time-hour-digit-right\");\n\n\t\tvar minutesNow = (secondToday % 3600) / 60;\n\t\tvar hourNow = (secondToday / 3600);\n\t\tslideDigit(minDigitRight, minutesNow % 10.0);\n\t\tslideDigit(minDigitLeft, minutesNow / 10.0);\n\t\tslideDigit(hourDigitRight, hourNow % 10.0);\n\t\tslideDigit(hourDigitLeft, hourNow / 10.0);\n\t}", "increaseTime(t) {\n this.currentTime += t;\n this.timeElement.textContent = this.currentTime;\n }", "set_time( t ){ this.current_time = t; this.draw_fg(); return this; }", "function GeneratePeriod(e) {\n setTimeout(() => {\n let starttime = {\n hh: $(`#timepicker${input1.id}`).data(\"timepicker\").hour,\n mm: $(`#timepicker${input1.id}`).data(\"timepicker\").minute,\n }\n let endtime = {\n hh: $(`#timepicker${input2.id}`).data(\"timepicker\").hour,\n mm: $(`#timepicker${input2.id}`).data(\"timepicker\").minute,\n }\n if (endtime.mm < starttime.mm) {\n endtime.hh--;\n endtime.mm += 60;\n }\n let diff = {\n hh: endtime.hh - starttime.hh,\n mm: endtime.mm - starttime.mm,\n time() {\n let str = \"\";\n if (this.hh < 10) str += \"0\" + this.hh;\n else str += this.hh;\n\n str += \":\"\n\n if (this.mm < 10) str += \"0\" + this.mm;\n else str += this.mm;\n\n return str;\n }\n }\n\n if (diff.hh < 0) {\n diff.hh += 24;\n }\n that.span.innerHTML = diff.time();\n }, 2);\n }", "function changeTimeSlide(){\n document.getElementById('labelTimeDiv_id').innerHTML=getNewTimeDisplay(slideCurrent)\n document.getElementById('labelTimeDivLast_id').innerHTML=\"/\" + getNewTimeDisplay(slideFinal) \n}", "function addTASchedule() {\r\n TAName = document.getElementById(\"nameTA\").value;\r\n TAClass = document.getElementById(\"classTA\").value;\r\n TAHours = document.getElementById(\"hoursTA\").value;\r\n var ul = document.getElementById(\"fullTASchedule\");\r\n var li = document.createElement(\"li\");\r\n li.appendChild(document.createTextNode(TAName + \" : \" + TAClass + \" - \" + TAHours))\r\n ul.appendChild(li);\r\n}", "function timer(main_div) {\n var seconds = 0;\n var minutes = 0;\n main_div.append('<div class=\\'timer\\'>00:00</div>')\n clearInterval(intervalFunction);\n intervalFunction = setInterval(function() {\n seconds += 1;\n if (seconds > 59) {\n minutes = seconds / 60;\n seconds = 0;\n }\n if (minutes < 10) {\n $('.timer').text('0' + minutes + ':' + seconds);\n time_global = ('0' + minutes + ':' + seconds);\n }\n else {\n $('.timer').text(minutes + ':' + seconds);\n time_global = (minutes + ':' + seconds);\n }\n },1000);\n}", "function updateTime() {\n\n}", "function setTime() {\n\t++secondsCounter; //incrementer\n\ttimerSeconds.innerHTML = pad(secondsCounter % 60);\n\ttimerMinutes.innerHTML = pad(parseInt(secondsCounter / 60));\n}", "function init() {\n timeDisplay = document.createTextNode (\"\");\n document.getElementById(\"clock\").appendChild (timeDisplay);\n}", "function updateTime() {\n time -= 1000;\n showTime(); \n}", "function set_time_link(task_id, type) {\n $('.time-button').each( (_, bb) => {\n if (type === \"Start\") {\n if (task_id == $(bb).data('task-id') && $(bb).data('type') === \"Start\") {\n $(bb).data('clicked', \"Yes\");\n }\n }\n else {\n // Change the clicked flag of the Start button back to \"No\" so that it\n // will render as a 'Start' link again\n if (task_id == $(bb).data('task-id') && $(bb).data('type') === \"Start\") {\n $(bb).data('clicked', \"No\");\n // Cleat the time id so that the user cannot click 'End' before\n // clicking 'Start'\n TIME_ID = \"\";\n }\n }\n });\n end_links();\n}", "function formatTimeDropdown() {\t\n\t$('.bootstrap-timepicker-widget.dropdown-menu').css('margin-left','0');\n\t$('.icon-chevron-up, .icon-chevron-down').addClass('glyphicon');\n\t$('.icon-chevron-up').addClass('glyphicon-chevron-up');\n\t$('.icon-chevron-up').removeClass('icon-chevron-up');\n\t$('.icon-chevron-down').addClass('glyphicon-chevron-down');\n\t$('.icon-chevron-down').removeClass('icon-chevron-down');\n}", "function cardButtons (t) {\n const items = [\n {\n icon: clockImage,\n text: 'Manage time',\n callback: function (t) {\n return t.popup({\n title: 'Manage time',\n items: async function (t) {\n const ranges = await getRanges(t, true);\n const items = [];\n\n let board = await t.board('members');\n\n board.members.sort((a, b) => {\n const nameA = a.fullName.toUpperCase();\n const nameB = b.fullName.toUpperCase();\n\n if (nameA < nameB) {\n return -1;\n }\n if (nameA > nameB) {\n return 1;\n }\n\n return 0;\n }).forEach((member) => {\n const memberRanges = ranges.items.map((range, rangeIndex) => {\n range.rangeIndex = rangeIndex;\n return {\n rangeIndex,\n item: range\n };\n }).filter((range) => {\n return range.item.memberId === member.id;\n });\n\n if (memberRanges.length > 0) {\n items.push({\n 'text': member.fullName + (member.fullName !== member.username ? ' (' + member.username + ')' : '') + ':'\n });\n\n memberRanges.forEach((range) => {\n const start = new Date(range.item.start * 1000);\n const end = new Date(range.item.end * 1000);\n const _rangeIndex = range.rangeIndex;\n const _range = range;\n\n items.push({\n text: formatDate(start) + ' - ' + formatDate(end),\n callback: function (t) {\n return t.popup({\n title: 'Edit time range',\n items: function (t) {\n const _start = new Date(_range.item.start * 1000);\n const _end = new Date(_range.item.end * 1000);\n\n return [\n {\n text: 'Edit start (' + formatDate(start) + ')',\n callback: (t) => {\n return t.popup({\n type: 'datetime',\n title: 'Change start from (' + formatDate(_start) + ')',\n callback: async function(t, opts) {\n const ranges = await getRanges(t, true);\n ranges.items[_rangeIndex].start = Math.floor(new Date(opts.date).getTime() / 1000);\n await ranges.saveForContext(t);\n return t.closePopup();\n },\n date: _start\n });\n }\n },\n {\n text: 'Edit end (' + formatDate(end) + ')',\n callback: (t) => {\n return t.popup({\n type: 'datetime',\n title: 'Change end from (' + formatDate(_end) + ')',\n callback: async function(t, opts) {\n const ranges = await getRanges(t, true);\n ranges.items[_rangeIndex].end = Math.floor(new Date(opts.date).getTime() / 1000);\n await ranges.saveForContext(t);\n return t.closePopup();\n },\n date: _end\n });\n }\n },\n {\n text: 'Delete',\n callback: async (t) => {\n const ranges = await getRanges(t, true);\n ranges.deleteRangeByIndex(_rangeIndex);\n await ranges.saveForContext(t);\n return t.closePopup();\n }\n }\n ];\n }\n });\n },\n });\n });\n\n items.push({\n 'text': '--------'\n });\n }\n });\n\n if (items.length > 0) {\n items.splice(items.length - 1, 1);\n }\n\n if (items.length > 0) {\n items.push({\n 'text': '--------'\n });\n\n items.push({\n 'text': 'Clear',\n callback: async (t) => {\n return t.popup({\n type: 'confirm',\n title: 'Clear time',\n message: 'Do you wish to clear tracked time?',\n confirmText: 'Yes, clear tracked time',\n onConfirm: async (t) => {\n await t.remove('card', 'shared', dataPrefix + '-ranges');\n await t.remove('card', 'private', dataPrefix + '-start');\n await t.closePopup();\n },\n confirmStyle: 'danger',\n cancelText: 'No, cancel'\n });\n }\n });\n } else {\n items.push({ 'text': 'No activity yet' });\n }\n\n return items;\n }\n });\n },\n condition: 'edit'\n },\n {\n icon: clockImage,\n text: 'Time spent',\n callback: function (t) {\n return t.popup({\n title: 'Time spent',\n items: async function (t) {\n const ranges = await getRanges(t, true);\n const items = [];\n\n let board = await t.board('members');\n\n board.members.sort((a, b) => {\n const nameA = a.fullName.toUpperCase();\n const nameB = b.fullName.toUpperCase();\n\n if (nameA < nameB) {\n return -1;\n }\n if (nameA > nameB) {\n return 1;\n }\n\n return 0;\n }).forEach((member, memberIndex) => {\n const timeSpent = ranges.getTimeSpentByMemberId(member.id);\n\n if (timeSpent !== 0) {\n items.push({\n 'text': member.fullName + (member.fullName !== member.username ? ' (' + member.username + ')' : '') + ': ' + formatTime(timeSpent)\n });\n }\n });\n\n if (items.length === 0) {\n items.push({ 'text': 'No activity yet' });\n }\n\n return items;\n }\n });\n }\n }\n ];\n\n if ('Notification' in window) {\n items.push({\n icon: clockImage,\n text: 'Notifications',\n callback: (t) => {\n return t.popup({\n title: 'Activity timer notifications',\n url: t.signUrl('./notifications.html'),\n height: 85\n });\n }\n });\n }\n\n return items;\n}", "function time(){\n\t $('#Begtime').mobiscroll().time({\n\t theme: 'wp',\n\t display: 'inline',\n\t mode: 'scroller'\n\t });\n\t $('#Endtime').mobiscroll().time({\n\t theme: 'wp',\n\t display: 'inline',\n\t mode: 'scroller'\n\t });\n\t removeUnwanted(); \n\t insertClass(); \n\t getTimeFromInput(\"Begtime\");\n\t getTimeFromInput(\"Endtime\");\n\t}", "function buildTime() {\n\t++sec;\n\tminTotal = pad(parseInt(sec / 60));\n\tsecTotal = pad(sec % 60);\n\ttextTime = minTotal + \":\" + secTotal;\n\ttimerCount.innerHTML = textTime;\n}", "function updateTimeDisplay(newTime) {\n $(\".timer\").text(time);\n time = newTime;\n}", "function update_time_setting (panel, time) {\n\tpanel.innerHTML = time;\n}", "function renderTime(time){\n var timerSpans = document.querySelectorAll(\".timer .act-tim-digit\");\n\n if (time[0]>-1){ // hour\n if (time[0]>9)\n timerSpans[0].innerHTML=time[0]\n else\n timerSpans[0].innerHTML=\"0\"+time[0];\n }\n\n if (time[1]>-1){ // min\n if (time[1]>9)\n timerSpans[1].innerHTML=time[1]\n else\n timerSpans[1].innerHTML=\"0\"+time[1];\n }\n\n if (time[2]>-1){ // sec\n if (time[2]>9)\n timerSpans[2].innerHTML=time[2]\n else\n timerSpans[2].innerHTML=\"0\"+time[2];\n }\n\n}", "function timerStart() {\n var timeLeft = 90;\n timerBarEl.className = \".top-border\";\n timerBarEl.textContent = \"Time Left: \" + timeLeft;\n //console.log(timerBarEl);\n topDiv.appendChild(timerBarEl);\n}", "function C007_LunchBreak_Natalie_Eat() {\r\n CurrentTime = CurrentTime + 300000;\r\n}", "AddTime(){\n var h=$(\"#Hours option:selected\").val();\n var m=$(\"#Mins option:selected\").val();\n var ap=$(\"#AMPM option:selected\").val();\n var time1=h+m+ap;\n var time=h+':'+m+' '+ap;\n var index=TimeToMap.indexOf(time);\n if(index==undefined||index==-1){\n $(\"#TimeSelectionMenuContent\").append('<li><a href=\"#\">'+time+'<span class=\"glyphicon glyphicon-remove\"></span></a></li>');\n TimeToMap.push(time);\n }\n else {\n console.log(\"already entered\");\n }\n console.log(TimeToMap);\n }", "function updateTime() {\r\n\ttimeSec += 1;\r\n\t\r\n\tif (timeSec > 60) {\r\n\t\ttimeSec = 0;\r\n\t\ttimeMin += 1;\r\n\t}\r\n\t\r\n\tvar t = document.getElementById(\"time\");\r\n\t\r\n\tif (timeSec < 10) {\r\n\t\tt.innerHTML = \"Time \" + timeMin + \":0\" + timeSec;\r\n\t} else {\r\n\t\tt.innerHTML = \"Time \" + timeMin + \":\" + timeSec;\r\n\t}\r\n}", "function fillTimeText(dom) {\n\tvar startTime = 9;\n\tfor (var i = 0; i <= 24; i++) {\n\t\tvar timeSlot = document.createElement('div');\n\t\tvar hour = startTime + Math.floor(i / 2);\n\t\tvar minute = i % 2 === 0 ? '00' : '30';\n\t\tif (minute === '00') {\n\t\t\tif (hour < 12) {\n\t\t\t\tvar timeText = document.createTextNode(hour + ':' + minute + ' AM')\n\t\t\t} else {\n\t\t\t\tif (hour > 12) {\n\t\t\t\t\thour = hour % 12;\n\t\t\t\t}\n\t\t\t\tvar timeText = document.createTextNode(hour + ':' + minute + ' PM')\n\t\t\t}\n\t\t\ttimeSlot.className = 'timeSlotRound';\n\t\t\ttimeSlot.appendChild(timeText);\n\t\t\tdom.append(timeSlot);\n\t\t} else {\n\t\t\tif (hour < 12) {\n\t\t\t\tvar timeText = document.createTextNode(hour + ':' + minute);\n\t\t\t} else {\n\t\t\t\tif (hour > 12) {\n\t\t\t\t\thour = hour % 12;\n\t\t\t\t}\n\t\t\t\tvar timeText = document.createTextNode(hour + ':' + minute);\n\t\t\t}\n\t\t\ttimeSlot.className = 'timeSlotHalf';\n\t\t\ttimeSlot.appendChild(timeText);\n\t\t\tdom.append(timeSlot);\n\t\t}\n\t}\n}", "function setTime()\n {\n\t\t\tfor(var i = 0; i <$scope.task_list.length; i++){\n\t\t\t\t$scope.task_list[i].formatted = pad(parseInt($scope.task_list[i].seconds/60)) + ':' + pad($scope.task_list[i].seconds%60);\n\t\t\t\t$scope.$apply();\t\t\t\t\n\t\t\t}\n }", "function update_time()\n{\n\t$('.cronos').each(function() {\n\t\tvar name = $(this).attr(\"name\");\n\t\tvar estado = parseInt($(this).attr(\"estado\"));\n\t\tvar time = $(this).val();\n\t\tvar ID = name.substring(6); // a partir de la 6 posicio\n\t\tvar capa = '#time_'+ID;\n\t\tvar capabotons = '#capabotons_'+ID;\n\t\t\n\t\t// color\n\t\tvar color = \"blue\";\n\t\tif (time<3600) color = \"orange\";\n\t\tif (time<300) color = \"red\";\n\t\t$(capa).html(strtotime(time));\n\t\t$(capa).css(\"color\", color);\n\t\t$(this).val(time-1);\n\t\tif (time<0 && estado < 5)\n\t\t\t$(capabotons).hide();\t\n\t});\t\n}", "function SetTime() {\r\n let date = new Date();\r\n let time = (date.getHours()+1) + ':' + (date.getMinutes() < 10 ? '0' : '') + (date.getMinutes());\r\n \r\n document.querySelector('.order--timer').textContent = time;\r\n // console.log('updated at',time)\r\n setTimeout(SetTime, 60000);\r\n }", "function AmToPm() {\n var value = amOrPmText.shift();\n amOrPmText.push(value);\n document.getElementById(\"amorpm\").innerHTML=value;\n timeSection.classList.toggle('pmmode');\n timeColorOne.classList.toggle('pmtext1');\n timeColorTwo.classList.toggle('pmtext1');\n timeColorThree.classList.toggle('pmtext1');\n timeColorFour.classList.toggle('pmtext1');\n timeButton.classList.toggle('pmbutton');\n}", "function temporizador (time){\n\t\ttiempo=tiempo-1; \n\t\tminutos = Math.floor(tiempo/60);\n\t\tsegundos = Math.floor(tiempo % 60);\n\t\tif (segundos < 10){\n\t\t\tsegundos=\"0\" + segundos;\n\t\t}\n\t\t$(\"#timer\").text(minutos + \":\" + segundos);\n\t\tif (tiempo <= 0){\n\t\t\tgameOver();\n\t\t}\n\t}", "addTime(s){\n if (timer.minutes === 59 && (timer.secondes + s) >= 60){\n timer.hours++\n timer.minutes = 0\n timer.secondes = (timer.secondes + s) - 60\n } else if (timer.secondes + s >= 60){\n timer.minutes++\n timer.secondes = (timer.secondes + s) - 60 \n } else {\n timer.secondes = timer.secondes + s\n }\n }", "function onUpdateTiempoRestante(e) {\n let comodin = (e.detail.total >= 3600 && e.detail.duration < 3600) ? \"00<span style='color: yellow'>:</span>\" : \"\";\n lastTimeIndicator.innerHTML = comodin + getReadableTime(e.detail.duration);\n}", "function displayTime() {\n currDate = moment().format(\"dddd, MMMM Do YYYY, h:mm:ss a\");\n currentDayEl.html(currDate);\n currM = moment().format('m');\n currh = parseInt(moment().format(\"H\"));\n if(parseInt(currM)+0 === 0 && currh > prevHour){ /// This check is set the active hour automatically\n setBGClass();\n }\n}", "function C007_LunchBreak_Natalie_Tickle() {\r\n CurrentTime = CurrentTime + 60000;\r\n if (ActorHasInventory(\"Rope\")) {\r\n OveridenIntroText = GetText(\"TickleTied\");\r\n if (!C007_LunchBreak_Natalie_TickleDone) {\r\n C007_LunchBreak_Natalie_TickleDone = true;\r\n ActorChangeAttitude(-1, 1);\r\n }\r\n }\r\n C007_LunchBreak_Natalie_TimeLimit()\r\n}", "function time(arr) {\n $(\"#time\").empty(); //To reset\n $(\"#time\").append(\"<option>--Select--</option>\");\n $(arr).each(function(i) { //to list\n $(\"#time\").append(\"<option value=\\\"\" + arr[i].value + \"\\\">\" + arr[i].display + \"</option>\")\n });\n }", "function toggleTime() {\n const currentActive = document.getElementsByClassName(\"status active\")[0].id;\n document.getElementsByClassName(\"time active\")[0].classList.remove(\"active\");\n let element;\n switch (currentActive) {\n case 'pomodoro':\n element = document.querySelector(\"#pomodoroTime\");\n break;\n case 'break':\n element = document.querySelector(\"#breakTime\");\n break;\n case 'longbreak':\n element = document.querySelector(\"#longbreakTime\");\n break;\n }\n element.classList.add(\"active\");\n reset();\n}", "function timeAssistant(parent){\n active_parent_id = parent;\n\n // Hour\n html = ' <div class=\"form-group\">\\\n <label for=\"h\">Hour</label>\\\n <input type=\"number\" class=\"form-control\" id=\"h\" max=\"23\" min=\"0\">\\\n </div>';\n\n // Minute\n html += ' <div class=\"form-group\">\\\n <label for=\"m\">Minute</label>\\\n <input type=\"number\" class=\"form-control\" id=\"m\" max=\"59\" min=\"0\">\\\n </div>';\n\n // Week day\n html += ' <div class=\"form-group\">\\\n <label for=\"w\">Week day</label>\\\n <select class=\"form-control\" id=\"w\">\\\n <option value=\"0\">Sunday</option>\\\n <option value=\"1\">Monday</option>\\\n <option value=\"2\">Tuesday</option>\\\n <option value=\"3\">Wednesday</option>\\\n <option value=\"4\">Thursday</option>\\\n <option value=\"5\">Friday</option>\\\n <option value=\"6\">Saturday</option>\\\n </select>\\\n </div>';\n\n html += '<button type=\"button\" class=\"btn btn-primary\" style=\"float:right\" onclick=\"createTimeTrigger()\">Create</button>';\n\n\n document.getElementById('d2AssistantBody').innerHTML = html\n}", "function showTimer() {\n time=getItemFromLocalStorage('time');\n time=time.split(':');\n /*convert time to integers and calculate*/\n var total=(parseInt(time[0])*60)+parseInt(time[1])-1;\n var newTime=Math.floor(total/60);\n var seconds=Math.floor(total-(newTime*60));\n\n /*assemble back to minute format*/\n if(newTime>0 || seconds> 0) {\n if (seconds < 10)\n seconds = '0' + seconds;\n if(newTime===0)\n newTime='00';\n newTime = newTime + \":\" + seconds;\n saveItemInLocalStorage('time',newTime);\n\n /*Passes the new time to be displayed*/\n showTimerDigits(newTime);\n }\n else\n alert(gameOver(0));\n}", "function updateMenu(data){\n console.log(\"## updateMenu ##\");\n\n // Update \"last update\" on menu\n var timer = new Date();\n mainView.section(0, { title: \"last update : \" + timer.toLocaleTimeString()});\n\n var USDDiff = moneyDiff(data.USD.last, lastSnapshot.USD.last);\n var EURDiff = moneyDiff(data.EUR.last, lastSnapshot.EUR.last);\n var GBPDiff = moneyDiff(data.GBP.last, lastSnapshot.GBP.last);\n\n // Update values on menu - Variation displaying\n mainView.item(0, 0, { subtitle: '$ ' + formatMoney(data.USD.last) + \" \" + USDDiff });\n mainView.item(0, 1, { subtitle: '€ ' + formatMoney(data.EUR.last) + \" \" + EURDiff });\n mainView.item(0, 2, { subtitle: '£ ' + formatMoney(data.GBP.last) + \" \" + GBPDiff });\n\n // Hide variation after 3 seconds\n if (USDDiff != \"\") setTimeout(function(){ mainView.item(0, 0, { subtitle: '$ ' + formatMoney(data.USD.last) });}, 3000);\n if (EURDiff != \"\") setTimeout(function(){ mainView.item(0, 1, { subtitle: '$ ' + formatMoney(data.EUR.last) });}, 3000);\n if (GBPDiff != \"\") setTimeout(function(){ mainView.item(0, 2, { subtitle: '$ ' + formatMoney(data.GBP.last) });}, 3000);\n\n}", "function printTime()\n\t{\n\t\tvar time = getTime();\n\n\t\t// Print time\n\t\ttaskline.obj.time_timeday.innerHTML = time.hour + ':' + time.min;\n\t}", "function timer() {\n sec += 1;\n if (sec === 60) {\n min += 1;\n sec = 0;\n }\n\n for (let i = 0; i < timeEl.length; i++) {\n timeEl[i].innerText = min.pad(2) + \":\" + sec.pad(2);\n }\n }", "function createTimer() {\n debug(\"createTimer\");\n clock = document.createElement('span');\n clock.setAttribute(\"class\", \"timer\");\n clock.innerHTML = \"0 Seconds\";\n\n document.querySelector('.score-panel').appendChild(clock);\n startTime();\n }", "function setUpBlocks(start, end, thisDate) {\n // console.log(thisDate.format(\"M\"));\n for (var i = start; i <= end; i++) {\n var timeOfDay = i;\n var displayTime = timeOfDay;\n var suff = \"<span class='time-suffix'>a.m.</span>\";\n if (displayTime > 12) {\n displayTime -= 12;\n suff = \"<span class='time-suffix'>p.m.</span>\";\n }\n if (displayTime === 12) suff = \"<span class='time-suffix'>p.m.</span>\";\n\n // The id will be set to the time of day, 24-hour time\n\n // But the time will be displayed in 12-hour time\n displayTime = displayTime.toString() + \":00 \" + suff;\n // $(\"#displayTime-block-section\").append(newTimeBlock(displayTime, timeOfDay, thisDate).attr(\"id\", timeOfDay));\n $(\"#time-block-section\").append(newTimeBlock(displayTime, timeOfDay, thisDate));\n populateEventText(timeOfDay, thisDate);\n }\n}" ]
[ "0.66761744", "0.6578709", "0.6476905", "0.64587754", "0.61977345", "0.61643726", "0.610499", "0.60938215", "0.6052688", "0.6025024", "0.600126", "0.5966274", "0.5916883", "0.5916523", "0.5902393", "0.58783394", "0.5838918", "0.58361965", "0.583377", "0.5818206", "0.5809925", "0.5797567", "0.5793055", "0.5771863", "0.57597655", "0.5733125", "0.57306695", "0.572676", "0.57239", "0.5710345", "0.5672519", "0.5670228", "0.5668688", "0.56679964", "0.5657664", "0.5651516", "0.56437165", "0.56419927", "0.56413007", "0.56372464", "0.5633113", "0.563192", "0.5624923", "0.561879", "0.5618744", "0.5615124", "0.560685", "0.5605871", "0.56023335", "0.55958253", "0.5590611", "0.55771226", "0.5572143", "0.55545604", "0.55525327", "0.55481213", "0.5544988", "0.5537916", "0.55355126", "0.55291235", "0.55140424", "0.55094236", "0.5506439", "0.54945934", "0.54823023", "0.54817796", "0.5479865", "0.5478712", "0.547289", "0.5464841", "0.5457858", "0.54550666", "0.54509664", "0.5437881", "0.543766", "0.5435799", "0.5435445", "0.5432231", "0.5422847", "0.5417583", "0.5412488", "0.5412386", "0.54113406", "0.5410207", "0.54084396", "0.540836", "0.54074466", "0.5401976", "0.53928334", "0.53918445", "0.53874063", "0.5386148", "0.5382696", "0.5381446", "0.53809327", "0.53769916", "0.53723735", "0.53718174", "0.5371795", "0.5365204", "0.5364628" ]
0.0
-1
========================================================================= CREATE FORM(S) MENU ITEM FUNCTION =========================================================================
function createTimePeriodForms() { var timesheet = getTimesheet(); var missingRows = getMissingForms(timesheet); var missingForms = getMissingForms(timesheet).length; for (i in missingRows) { var row = missingRows[i]; var startDate = formatDate(timesheet.getRange("A:A").getCell(row, 1).getValue()); var endDate = formatDate(timesheet.getRange("B:B").getCell(row, 1).getValue()); createForm(startDate, endDate, row, missingForms); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_nav_forms(node,cmd1,employ,dflt,text1,classe,cmd2=undefined,text2=undefined){\n var Entry = document.createElement(\"INPUT\");\n Entry.setAttribute(\"type\", \"text\");\n var Valid = document.createElement(\"BUTTON\");\n Valid.setAttribute(\"type\", \"button\");\n Entry.defaultValue = dflt;\n Entry.size = 16;\n Entry.className = classe;\n Valid.innerHTML = text1;\n Valid.onclick = cmd1;\n Valid.className = \"rename\";\n Valid.Employ = employ;\n var Form = document.createElement(\"h5\");\n Form.appendChild(Entry);\n if (text2 == undefined){\n Form.appendChild(Valid);\n }else {\n var Valid2 = document.createElement(\"BUTTON\");\n Valid2.setAttribute(\"type\", \"button\");\n Valid2.innerHTML = text2;\n Valid2.onclick = cmd2;\n Valid2.className = \"rename\";\n Valid2.Employ = employ;\n var Validiv = document.createElement(\"div\");\n Validiv.appendChild(Valid);\n Validiv.appendChild(Valid2);\n Form.appendChild(Validiv);\n };\n node.appendChild(Form);\n}", "function create_item() {\n document.getElementById('modify-header').textContent = 'Creating new Item';\n create_form('meat_shop_item','content-div');\n}", "function buildListTitleForm() {\n\tvar node = document.createElement('form')\n\tnode.innerHTML =\n\t\t'<div class=\"newitem-title-wrapper\">' +\n\t\t'<input id=\"trello-list-title-input\" type=\"text\">' +\n\t\t'<input id=\"trello-list-title-submit\" type=\"submit\" value=\"Save\">' +\n\t\t'</div>'\n\tnode.style.display = 'none'\n\treturn node\n}", "function newForm() {\n\n var form = document.createElement(\"form\")\n form.style = \"heigth:100px;width:300px;border-style:solid;border-color:black;border-width:1px\"\n form.id = \"form\"\n\n var ObjLabel = document.createElement(\"label\")\n ObjLabel.textContent = \"Object \"\n\n var ObjInput = document.createElement(\"input\")\n ObjInput.id = \"object-input\"\n ObjInput.name = \"object\"\n ObjInput.type = \"text\"\n ObjInput.placeholder = \"Object name\"\n\n var QtyLabel = document.createElement(\"label\")\n QtyLabel.textContent = \"Quantity \"\n\n var QtyInput = document.createElement(\"input\")\n QtyInput.id = \"quantity-input\"\n QtyInput.name = \"quantity\"\n QtyInput.type = \"text\"\n QtyInput.placeholder = \"Please insert a positive number\"\n\n var submit = document.createElement(\"input\")\n submit.id = \"submit\"\n submit.type = \"button\"\n submit.value = \"Confirm\"\n submit.setAttribute(\"onmousedown\", \"addItems()\")\n\n // adding all items under \"form\" in the DOM tree\n form.appendChild(ObjLabel)\n form.appendChild(ObjInput)\n form.appendChild(document.createElement(\"br\"))\n form.appendChild(QtyLabel)\n form.appendChild(QtyInput)\n form.appendChild(document.createElement(\"br\"))\n form.appendChild(submit)\n\n return form\n}", "function addAFormItem(itemNum, itemName) {\n let resultsArea = document.getElementById('results-container');\n createForm(itemName, resultsArea, itemNum);\n\n itemsChosen.push(itemName);\n}", "NewItemForm(e) {\n if (typeof this.props.onNew === 'function') {\n var props = {\n type: \"existing\",\n item_id: this.props.menu[1].item_id,\n menu: {\n \"name\": this.props.menu[0],\n \"category\": this.props.menu[1].category,\n \"price\" : this.props.menu[1].price,\n \"calories\": this.props.menu[1].calories,\n \"in_stock\": this.props.menu[1].in_stock,\n \"description\": this.props.menu[1].description\n }\n }\n this.props.onNew(props);\n }\n }", "function createListItem(item) {\n const ul = document.getElementById(\"item-list\");\n const listItem = extractItemTemplate();\n const deleteBtn = listItem.getElementById(\"delete-btn\");\n const editBtn = listItem.getElementById(\"edit-btn\");\n const itemContainer = listItem.getElementById(\"item-container\");\n itemContainer.innerText = JSON.stringify(item, null, 4);\n\n deleteBtn.addEventListener(\"click\", () => deleteItem(item));\n editBtn.addEventListener(\"click\", () => displayForm(item));\n\n ul.append(listItem);\n}", "function buildFormItem(options) {\n itemIdCount ++;\n \n options = options || {};\n \n Ext.applyIf(options, {\n valid: true,\n dirty: false,\n id : itemIdCount\n });\n \n return (function(itemId, config) {\n return Ext.apply(config || {}, {\n isFormField: true,\n itemId : itemId,\n\n getName: function() {\n return config.name || config.id;\n },\n\n getItemId: function() {\n return itemId;\n },\n\n validate: function() {\n return config.valid;\n },\n\n isDirty: function() {\n return config.dirty;\n },\n \n setValue: function() {\n return true;\n }\n });\n })(itemIdCount, options);\n }", "function addListItemFromForm() {\n addListItem( getFormValues());\n}", "function createSellform(d,item,quant,descid,hash,itemimage,textdesc) {\n var form = document.createElement('form');\n form.setAttribute('name','sellform');\n form.setAttribute('action','managestore.php');\n form.setAttribute('method','post');\n form.setAttribute('style','display:inline;');\n var input = document.createElement('input'); \n input.setAttribute('type','hidden');\n input.setAttribute('name','action');\n input.setAttribute('value','additem');\n form.appendChild(input);\n input = document.createElement('input'); \n input.setAttribute('id','quickmall_hash');\n input.setAttribute('type','hidden');\n input.setAttribute('name','pwd');\n input.setAttribute('value',hash);\n form.appendChild(input);\n if (itemimage) {\n var img = itemimage.cloneNode(false);\n img.setAttribute('id','quickmall_itemimage');\n img.setAttribute('title',textdesc);\n form.appendChild(img);\n }\n input = document.createTextNode('Qty:'); \n form.appendChild(input);\n input = document.createElement('input'); \n input.setAttribute('id','quickmall_quant');\n input.setAttribute('name','qty1');\n input.setAttribute('size','3');\n input.setAttribute('value',quant);\n form.appendChild(input);\n \n input = document.createElement('input'); \n input.setAttribute('id','quickmall_itemdesc');\n input.setAttribute('type','hidden');\n input.setAttribute('name','item1');\n input.setAttribute('value',item);\n input.setAttribute('descid',descid);\n form.appendChild(input);\n \n input = document.createTextNode('Price:'); \n form.appendChild(input);\n input = document.createElement('input'); \n input.setAttribute('name','price1');\n input.setAttribute('size','9');\n form.appendChild(input);\n input = document.createTextNode('Limit:'); \n form.appendChild(input);\n input = document.createElement('input'); \n input.setAttribute('name','limit1');\n input.setAttribute('size','3');\n form.appendChild(input);\n input = document.createElement('input'); \n input.setAttribute('class','button');\n input.setAttribute('type','submit');\n input.setAttribute('value','Add Items to Store');\n form.appendChild(input);\n // and then insert it\n // add a row above this tdnode\n var tbl = document.createElement('table');\n var row = document.createElement('tr');\n var cell = document.createElement('td');\n //cell.setAttribute('colspan','2');\n cell.appendChild(form);\n row.appendChild(cell);\n tbl.appendChild(row);\n d.appendChild(tbl);\n}", "function createMenu() {\n zeroStarArrays();\n num_stars_input = createInput('');\n num_stars_input.position(20, 50);\n submit_num = createButton('# Stars');\n submit_num.position(20 + num_stars_input.width, 50);\n submit_num.mousePressed(setNumStars);\n num_planets_input = createInput('');\n num_planets_input.position(20 + num_stars_input.width + 70, 50);\n submit_num_planets = createButton('# Planets');\n submit_num_planets.position(20 + num_planets_input.width + num_stars_input.width + 70, 50);\n submit_num_planets.mousePressed(setNumPlanets);\n}", "function buildNewForm() {\n return `\n <form id='js-new-item-form'>\n <div>\n <legend>New Bookmark</legend>\n <div class='col-6'>\n <!-- Title -->\n <label for='js-form-title'>Title</label>\n <li class='new-item-li'><input type='text' id='js-form-title' name='title' placeholder='Add Title'></li>\n <!-- Description -->\n <label for='js-form-description'>Description</label>\n <li class='new-item-li'><textarea id='js-form-description' name='description' placeholder=\"Add Description\"></textarea>\n </div>\n <div class='col-6'>\n <!-- URL -->\n <label for='js-form-url'>URL</label>\n <li class='new-item-li'><input type='url' id='js-form-url' name='url' placeholder='starting with https://'></li>\n <!-- Rating -->\n <label for='js-form-rating' id='rating-label'>Rating: </label>\n <select id='js-form-rating' name='rating' aria-labelledby='rating-label'>\n <option value='5' selected>5</option>\n <option value='4'>4</option>\n <option value='3'>3</option>\n <option value='2'>2</option>\n <option value='1'>1</option>\n </select>\n </div>\n <!-- Add button -->\n <div class='add-btn-container col-12'>\n <button type='submit' id='js-add-bookmark' class='add-button'>Click to Add!</button>\n <button type='button' id='js-cancel-bookmark'>Cancel</button>\n </div>\n </div>\n </form>\n `;\n }", "function newItem(){\n sendRequest(\n 'usergroups',\n {\n 'action': 'getNewItemForm',\n \"id_menucategory\": $('#kategoria').val()\n }, function(data){\n $('#listcontent').css('display','none');\n $('#editorholder').html(data);\n });\n}", "function wraper() {\r\n if (div.length < 1) { // Solo crea el formulario una vez\r\n newElement('h2', 'VIAJE', div);\r\n newElement('label', 'Nombre: ', div);\r\n newElement('input', 'undefined', div, {'type': 'text', 'name': 'Nombre'});\r\n newElement('br', 'undefined', div);\r\n newElement('label', 'Descripcion: ', div);\r\n newElement('input', 'undefined', div, {'type': 'text', 'name': 'Descripcion'});\r\n newElement('br', 'undefined', div);\r\n newElement('label', 'Moneda: ', div);\r\n newElement('select', 'undefined', div, {'name': 'Frutas', 'id': 'curList'});\r\n newElement('br', 'undefined', div);\r\n newElement('input', 'undefined', div, {'type': 'submit', 'value' : 'ENVIAR' ,'class' : 'button', 'accesskey' : 'e'});\r\n newElement('br', 'undefined', div);\r\n let optionsList = document.getElementById('curList');\r\n addItems([\"Manzana\", \"Banana\"], optionsList)\r\n }\r\n}", "function newField(field, action) {\n var label = document.createElement(field + \"_label\");\n label.id = field + \"_label\";\n \n if (action == \"add\"){\n if (field == 'preacher')\n label.appendChild(document.createTextNode('Please enter preacher\\'s full name: '));\n else if (field == 'series')\n label.appendChild(document.createTextNode('Please enter title of series: '));\n }\n else if (action == \"select\") {\n if (field == 'preacher')\n label.appendChild(document.createTextNode('Preacher: '));\n else if (field == 'series')\n label.appendChild(document.createTextNode('Series: '));\n }\n\n label.setAttribute(\"style\", \"font-weight:normal\");\n\n // replace field label with new label\n var fieldDiv = document.getElementById(field + \"_label\");\n var parentDiv = fieldDiv.parentNode;\n parentDiv.replaceChild(label, fieldDiv);\n\n // create new input box\n if (action == \"add\"){\n var txtbox = document.createElement(\"input\");\n txtbox.setAttribute(\"type\", \"text\");\n }\n else if (action == \"select\") {\n var txtbox = document.createElement(\"select\");\n txtbox.setAttribute(\"size\", \"4\");\n \n // TODO: HERE\n var arr = $.parseJSON('<?php echo json_encode($preacher_list); ?>');\n var i = 0;\n for (i=0; i<=arr.length; i++) {\n var option = document.createElement(arr[i]);\n option.text = arr[i];\n txtbox.add(option);\n }\n }\n \n txtbox.setAttribute(\"id\", field);\n txtbox.setAttribute(\"value\", \"\");\n txtbox.setAttribute(\"name\", field);\n txtbox.setAttribute(\"style\", \"width:200px\");\n\n // replace selection box with input box\n var fieldDiv = document.getElementById(field);\n var parentDiv = fieldDiv.parentNode;\n parentDiv.replaceChild(txtbox, fieldDiv);\n\n // create link to select field instead\n var link = document.createElement('a');\n link.id = \"new_\" + field;\n \n if (action == \"add\") {\n var linkText = document.createTextNode('Select ' + field + ' from list');\n link.setAttribute('href', \"javascript:newField('\" + field + \"','select')\");\n } \n else if (action == \"select\") {\n var linkText = document.createTextNode('New ' + field + '?');\n link.setAttribute('href', \"javascript:newField('\" + field + \"','action')\");\n }\n \n link.appendChild(linkText);\n \n var fieldname = \"new_\" + field;\n var fieldDiv = document.getElementById(fieldname);\n var parentDiv = fieldDiv.parentNode;\n\n // replace existing node sp2 with the new span txtbox sp1\n parentDiv.replaceChild(link, fieldDiv);\n}", "function createLiUl() {\n if (!validateLiUl()) {\n let form = document.forms['formUl'];\n let countLiUl = form.countLiUl.value;\n let typeLiUl = form.typeLiUl.value;\n area.value += '<ul style=\"list-style-type: ' + typeLiUl + ';\">';\n for (let i = 1; i <= countLiUl; i++) {\n area.value += '<li>' + `item ` + i;\n }\n area.value += '</li>';\n }\n}", "function createMenu() {\n inquirer.prompt({\n type: \"list\",\n name: \"action\",\n message: \"What would you like to add?\",\n choices: [\n { name: \"Add a department\", value: createDepartment },\n { name: \"Add a role\", value: createRole },\n { name: \"Add an employee\", value: createEmployee },\n { name: \"Go back\", value: mainMenu }\n ]\n }).then(({ action }) => action());\n}", "function addItemViaUi(form) \r\n{\r\n\tvar inputText = $('#nameInput');\r\n\tvar amountText = $('#amountInput');\r\n\t\r\n\t//add here the item and amount\r\n\tvar item = new GroceryItem(inputText.val(), amountText.val());\r\n\t\r\n\tgroceryItems.push(item);\r\n\tstoreGroceryItems();\r\n\tupdateListItem(inputText.val());\r\n\taddNewUiItem(item);\r\n\t//empty the input text field\r\n\tinputText.val(\"\");\r\n}", "renderNewItemForm(e) {\n const form = e.target.parentElement.querySelector('form')\n form.style.display = 'block'\n }", "function createTeamForm () {\n var item = team_form.addMultipleChoiceItem();\n \n // Create form UI\n team_form.setShowLinkToRespondAgain(false);\n team_form.setTitle(name + \" game\");\n team_form.setDescription(\"Game RSVP form\");\n // Set the form items\n item.setTitle(\"Will you attend the game?\");\n item.setChoices([\n item.createChoice(rsvp_opts[0]),\n item.createChoice(rsvp_opts[1]),\n item.createChoice(rsvp_opts[2]),\n item.createChoice(rsvp_opts[3])]);\n team_form.addSectionHeaderItem().setTitle(\n \"Do not change if you want your reply to count.\");\n team_form.addTextItem();\n team_form.addTextItem();\n\n // Attach the form to its destination [spreadsheet]\n team_form.setDestination(destination_type, destination);\n }", "function createForm(itemName, resultsArea) {\n // Name input, but disabled because the name is from json file\n let labelElem = document.createElement(\"input\");\n labelElem.setAttribute('name', `item${numOfSelectedItems}`);\n labelElem.setAttribute('class', 'form-control mr-5 mb-4 shadow');\n labelElem.setAttribute('id', `item${numOfSelectedItems}`);\n labelElem.setAttribute('type', 'text');\n labelElem.setAttribute('placeholder', 'Exercise name');\n labelElem.setAttribute('value', itemName);\n labelElem.required = true;\n labelElem.readOnly = true;\n\n // Time input\n let inputTimeElement = document.createElement(\"input\");\n inputTimeElement.setAttribute('type', 'number');\n inputTimeElement.setAttribute('name', `item${numOfSelectedItems}timeInput`);\n inputTimeElement.setAttribute('id', `item${numOfSelectedItems}timeInput`);\n inputTimeElement.setAttribute('class', 'form-control mr-5 mb-4 shadow');\n inputTimeElement.setAttribute('placeholder', 'Minutes exercised');\n inputTimeElement.setAttribute('step', '1');\n inputTimeElement.setAttribute('min', '1');\n inputTimeElement.required = true;\n\n // Remove (X) button\n let removeEntry = document.createElement(\"button\");\n removeEntry.setAttribute('id', `remove${numOfSelectedItems}Entry`);\n removeEntry.setAttribute('class', 'btn btn-danger mb-4 shadow');\n removeEntry.setAttribute('type', 'button');\n removeEntry.innerHTML = \"X\";\n\n // 2 line breakers for space consistency between entries\n let linebreakElem = document.createElement(\"br\");\n linebreakElem.setAttribute('id', `br1${numOfSelectedItems}`);\n let linebreakElem2 = document.createElement(\"br\");\n linebreakElem2.setAttribute('id', `br2${numOfSelectedItems}`);\n\n // Create onclick listner to know when to remove an entry\n removeEntry.setAttribute('onClick', `renameAttributes('item${numOfSelectedItems}',` + \n `'item${numOfSelectedItems}timeInput',` + \n `'remove${numOfSelectedItems}Entry',` +\n `'br1${numOfSelectedItems}',` +\n `'br2${numOfSelectedItems}',` +\n `true)`);\n\n inputTimeElement.setAttribute('onInput', 'validate_time_field(this)');\n \n // Appends the entry components to the entry area\n resultsArea.appendChild(labelElem);\n resultsArea.appendChild(inputTimeElement);\n resultsArea.appendChild(removeEntry);\n resultsArea.appendChild(linebreakElem);\n resultsArea.appendChild(linebreakElem2);\n\n ++numOfSelectedItems;\n}", "function createLiOl() {\n if (!validateLiOl()) {\n let form = document.forms['formOl'];\n let countLi = form.countLi.value;\n let typeLi = form.typeLi.value;\n area.value += '<ul style=\"list-style-type: ' + typeLi + ';\">';\n for (let i = 1; i <= countLi; i++) {\n area.value += '<li>' + `item ` + i;\n }\n area.value += '</li>';\n }\n}", "function addSection(section, item){\r\n\ttry{\r\n\t\tvar id = section.name + section.count;\r\n\t\t//Nav Element\r\n\t\tvar n_li = document.createElement(\"li\");\r\n\t\tvar n_txt = document.createTextNode(id);\r\n\t\tn_li.appendChild(n_txt);\r\n\t\titem.parentNode.appendChild(n_li);\r\n\t\tn_li.setAttribute(\"class\",\"\");\r\n\t\tn_li.setAttribute(\"value\",id);\r\n\t\tn_li.setAttribute(\"id\",id+\"_nav\");\r\n\t\tn_li.setAttribute(\"onclick\",\"changeActive(this)\");\r\n\t\t\r\n\t\t//Form Element\r\n\t\tvar p_div = document.getElementById(section.div);\r\n\t\tvar n_div = document.createElement(\"div\");\r\n\t\tn_div.innerHTML = p_div.innerHTML;\r\n\t\tp_div.parentNode.appendChild(n_div);\r\n\t\tn_div.setAttribute(\"class\",\"hide\");\r\n\t\tn_div.setAttribute(\"id\",id+\"_div\");\r\n\t\tn_div.setAttribute(\"name\",section.name);\r\n\t\ttry{\r\n\t\t\tvar children = n_div.childNodes[1].childNodes;\r\n\t\t\tfor(var i in children){\r\n\t\t\t\t\r\n\t\t\t\tif(children[i].nodeName == \"SELECT\" || children[i].nodeName == \"INPUT\"){\r\n\t\t\t\t\tvar stub = children[i].getAttribute(\"id\");\r\n\t\t\t\t\tvar name = section.name + \"[\" + section.count + \"][\" + stub + \"]\";\r\n\t\t\t\t\tchildren[i].setAttribute(\"id\", id + \"_\" +stub);\r\n\t\t\t\t\tchildren[i].setAttribute(\"name\", name);\r\n\t\t\t\t}else if(children[i].nodeName == \"H3\"){\r\n\t\t\t\t\tchildren[i].innerHTML = id;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}catch(err){\r\n\t\t\tthrow err;\r\n\t\t}\r\n\t\t\r\n\t\tchangeActive(n_li);\r\n\t}catch(err){\r\n\t\tthrow err;\r\n\t}\r\n}", "function gameInventory_createModule_defineItem() {\n var itemID = 'item-' + generateID();//Generate ID that will be used for the item & item html elements\n defineItemModal.prompt(itemID, true);\n }", "createForm () {\n if (document.getElementById('leaderboardButton')) {\n document.getElementById('leaderboardButton').remove();\n }\n crDom.createLeaderboardButton();\n crDom.createForm();\n crDom.createCategoriesChoice(this.filter.category);\n crDom.createDifficultyChoice(this.filter.difficulty);\n crDom.createRangeSlider(this.filter.limit);\n crDom.createStartButton();\n }", "function addItem () {\n let li = document.createElement(\"li\");\n if (newItem.value != \"\") {\n li.innerHTML = newItem.value.charAt(0).toUpperCase() + newItem.value.slice(1)\n attachRemoveButtons(li);\n attachDownButtons(li);\n attachUpButtons(li);\n ul.appendChild(li);\n newItem.value = \"\";\n } else {\n alert('Oops! Please enter an item.');\n }\n}", "function showEditItemNameForm(itemId) {\r\n\r\n let editItemNameForm = document.getElementById(\"editItemNameForm\" + itemId);\r\n let itemName = document.getElementById(\"itemName\" + itemId);\r\n let inputEditItemName = document.getElementById(\"inputEditItemName\" + itemId);\r\n\r\n editItemNameForm.classList.remove(\"invisible\");\r\n itemName.classList.add(\"invisible\");\r\n inputEditItemName.focus();\r\n}", "function addNewForm() {\n var prototype = $collectionHolder.data('prototype')\n var index = $collectionHolder.data('index')\n var newForm = prototype\n newForm = newForm.replace(/__name__/g, index)\n $collectionHolder.data('index', index+1)\n // création panel\n var $panel = $(\n '<div class=\"panel panel-warning\"><div class=\"panel-heading\"></div></div>',\n )\n var $panelBody = $('<div class=\"panel-body\"></div>').append(newForm)\n $panel.append($panelBody)\n addRemoveButton($panel)\n $addNewItem.before($panel)\n}", "function addListItem( formValues){\n\n /* make the list item element */\n var item = document.createElement(\"li\");\n \n /* put a checkbox at the start of the list item and make it clickable*/\n var checkbox = document.createElement(\"input\");\n checkbox.setAttribute(\"type\", \"checkbox\");\n checkbox.addEventListener(\"click\", completeItem);\n item.appendChild(checkbox)\n\n /* add the text from the parameter and make it stylable using a span element */\n var the_span = document.createElement(\"span\");\n \n /* make the text node and attach it to the span element */\n var node = document.createTextNode( formValues.task);\n the_span.appendChild(node);\n item.appendChild(the_span);\n\n /* make the image for the delete button and attach it to the list element */\n deleteButtonImage = document.createElement(\"img\");\n deleteButtonImage.setAttribute(\"src\", \"http://www2.psd100.com/icon/2013/09/1001/minus-icon-0910125918.png\");\n deleteButtonImage.setAttribute(\"alt\", \"[X]\");\n deleteButtonImage.setAttribute(\"class\", \"deleteListItem\");\n \n /* make it clickable */\n deleteButtonImage.addEventListener(\"click\", removeListItem);\n \n /* attach the button to the list item */\n item.appendChild(deleteButtonImage);\n \n /* attach the list item to the list */\n var list = document.getElementById(\"todoList\");\n list.appendChild(item);\n}", "function showAddForm(quad, linkClicked) {\n $(`#quad-${ quad}`).prepend('<li><span></span><input name=\"newToDoLabel\" value=\"\" type=\"text\"></li>');\n // $('[name=\"newToDoQuad\"]').val(quad);\n // $('.addNewShortcutFormSpace').appendTo('#addNewQuad' + quad).show();\n $('[name=\"newToDoLabel\"]').trigger('focus');\n}", "function createNewItem(e) {\n const newItem = document.createElement(\"li\")\n const itemName = document.createElement(\"div\")\n itemName.innerText = input.value\n\n //function to create X button element\n const xButton = document.createElement(\"button\") \n xButton.innerText = \"X\"\n xButton.title = \"Delete Item\"\n xButton.addEventListener(\"click\", function(e) {\n e.preventDefault()\n e.target.parentElement.remove(newItem)\n })\n\n\n //function to create edit button\n const editButton = document.createElement(\"button\")\n editButton.innerText = \"edit\"\n editButton.addEventListener(\"click\", edit(e))\n\n\n newItem.appendChild(itemName)\n newItem.appendChild(xButton)\n return newItem\n}", "function addListItem() {\n let item = document.querySelector(\".item\").value; \n let info = document.querySelector(\".textarea\").value;\n fullList.push({\n \"item\" : item,\n \"info\" : info\n });\n modal.classList.remove(\"open\");\n adauga.classList.remove(\"open\");\n adauga.reset();\n build();\n}", "function makeItemLinks(key, linksLi, rev) {\n\n\t var editLink = document.createElement('input');\n editLink.setAttribute(\"type\", \"button\");\n editLink.key = key;\n\teditLink.rev = rev;\n editLink.setAttribute(\"id\", \"edit\");\n editLink.setAttribute(\"value\", \"Edit\");\n editLink.setAttribute(\"onclick\", \"editItem(key, rev);\");\n editLink.setAttribute(\"data-theme\", \"a\");\n editLink.setAttribute(\"style\", \"width:120px; margin:0px 5px 20px -10px; display:inline;\");\n editLink.setAttribute(\"class\", \"ui-btn-up-c ui-btn-inner ui-btn-corner-all\");\n linksLi.appendChild(editLink);\n editLink.addEventListener(\"click\", editItem);\t\n\n var deleteLink = document.createElement('input');\n deleteLink.setAttribute(\"type\", \"button\");\n deleteLink.key = key;\n\tdeleteLink.rev = rev;\n deleteLink.setAttribute(\"id\", \"del\");\n deleteLink.setAttribute(\"value\", \"Delete\");\n deleteLink.setAttribute(\"onclick\", \"deleteItem(key, rev);\");\n deleteLink.setAttribute(\"data-theme\", \"a\");\n deleteLink.setAttribute(\"style\", \"width:120px; margin:0px 0px 20px 5px; display:inline;\");\n deleteLink.setAttribute(\"class\", \"ui-btn-up-a ui-btn-inner ui-btn-corner-all\");\n linksLi.appendChild(deleteLink);\n \n\n\n}", "function addListItem() {\n if (checkInputLen() > 0) {\n createLi();\n }\n}", "function newToDoItem(){\r\n let textField = document.getElementById(\"todolst\");\r\n let list = document.getElementById(\"todoitems\");\r\n let li = document.createElement(\"li\");\r\n if (textField.value == \"CLEAR_ALL\") {\r\n list.innerHTML = \"\";\r\n }\r\n else if(textField.value !== \"\"){\r\n li.innerText = textField.value;\r\n li.onclick = function(){\r\n this.parentNode.removeChild(this);\r\n postToDo(list);\r\n };\r\n list.appendChild(li);\r\n postToDo(list);\r\n }\r\n else{\r\n alert(\"Please enter a thing todo!\");\r\n }\r\n }", "function addNewItem () {\n\t\"use strict\";\n\tvar addInputText = addInput.value;\n\tif (addInputText !== \"\") {\n\t\t\n\t\tvar newLabel = addNewLabel(addInputText, this);\t\n\t\tvar newEditButton = addNewEditButton();\n\t\tvar newDeleteButton = addNewDeleteButton();\n\t\t\n\t\tinsertAfter(newLabel, h6List[1]);\n\t\tinsertAfter(newEditButton, newLabel);\n\t\tinsertAfter(newDeleteButton, newEditButton);\n\t\t\n\t\t//Attaching the event handlers to the new elements\n\t\tnewEditButton.onclick = toggleEdit;\n\t\tnewLabel.firstChild.onclick = toggleCompletion;\n\t\tnewDeleteButton.onclick = deleteItem;\n\t}\n}", "function resetAddMenuItemForm(){\r\n MenuItemNameField.reset();\r\n \tMenuItemDescField.reset();\r\n // \tMenuItemValidFromField.reset();\r\n MenuItemValidToField.reset();\r\n \tMenuItemPriceField.reset();\r\n \tMenuItemTypePerField.reset();\r\n\t\t\t\t\t \r\n }", "function newLiButtonClicked(){\n createListItem();\n }", "function TagMenu_getNiceName(node, position) \r\n{\r\n retVal = MM.LABEL_Unnamed;\r\n \r\n if (node && node.isRadio) {\r\n node = node[0];\r\n }\r\n\r\n if (node) {\r\n if (node.tagName == \"A\") \r\n {\r\n var displayString = dwscripts.trim(node.innerHTML);\r\n displayString = displayString.replace(/\\s+/,\" \"); //replace all newlines and whitespace with a single space\r\n displayString = dwscripts.entityNameDecode(displayString);\r\n retVal = '\"' + displayString + '\"';\r\n \r\n } \r\n else if (node.tagName == \"INPUT\" || node.tagName == \"TEXTAREA\" || node.tagName == \"SELECT\") \r\n {\r\n var nodeName = node.getAttribute(\"name\");\r\n var nodeType = '';\r\n if (node.tagName == \"TEXTAREA\") \r\n {\r\n nodeType = \"TEXTAREA\";\r\n } \r\n else if (node.tagName == \"SELECT\")\r\n {\r\n nodeType = \"SELECT\";\r\n }\r\n else \r\n {\r\n nodeType = node.type;\r\n }\r\n\r\n //get enclosing form node\r\n var formNode = node;\r\n while (!formNode || (formNode.tagName && formNode.tagName.toUpperCase() != \"FORM\")) \r\n {\r\n formNode = formNode.parentNode;\r\n }\r\n \r\n //if we found a form tag, construct the display string\r\n if (formNode && formNode.tagName && formNode.tagName.toUpperCase() == \"FORM\") \r\n {\r\n\r\n //get the form name\r\n var formName = '';\r\n if (formNode.getAttribute(\"name\")) \r\n {\r\n formName = \" \" + MM.TYPE_Separator + \" \" + MM.TYPE_Form + \" \\\"\" + formNode.getAttribute(\"name\") + \"\\\"\";\r\n } \r\n else \r\n {\r\n var formNum = 0;\r\n var dom = dw.getDocumentDOM();\r\n var formList = dom.getElementsByTagName(\"FORM\");\r\n for (var i=0; i < formList.length; i++) \r\n {\r\n if (formList[i] == formNode) \r\n {\r\n formNum = i;\r\n break;\r\n }\r\n }\r\n formName = \" \" + MM.TYPE_Separator + \" \" + MM.TYPE_Form + \" \" + formNum;\r\n }\r\n \r\n if (nodeName) \r\n {\r\n retVal = \"\\\"\" + nodeName + \"\\\"\" + formName;\r\n } \r\n else if (nodeType) \r\n {\r\n retVal = nodeType.toLowerCase() + \" [\"+ position +\"]\" + formName;\r\n }\r\n\r\n } \r\n else \r\n { // no form node found\r\n if (nodeName && nodeType) \r\n {\r\n retVal = nodeType.toLowerCase() + \" \\\"\" + nodeName + \"\\\"\";\r\n } \r\n else if (nodeType) \r\n {\r\n retVal = nodeType.toLowerCase() + \" [\"+ position +\"]\";\r\n }\r\n }\r\n \r\n } \r\n else \r\n {\r\n retVal = node.getAttribute(\"name\");\r\n if (!retVal) \r\n {\r\n retVal = node.tagName.toLowerCase() + \" [\"+position+\"]\";\r\n }\r\n }\r\n }\r\n \r\n return retVal;\r\n}", "function createListItem(){\r\n //use createElement to create all the buttons \r\n console.log(\"create a item...\");\r\n\tvar listItem=document.createElement(\"li\");\r\n\tvar checkBox=document.createElement(\"input\");\r\n\tvar label=document.createElement(\"label\");\r\n\tvar inputText=document.createElement(\"input\");\r\n\tvar editButton=document.createElement(\"button\");\r\n\tvar deleteButton=document.createElement(\"button\");\r\n\t\r\n\r\n\t//set type information\r\n\tcheckBox.type=\"checkbox\";\r\n\tinputText.type=\"text\";\r\n\teditButton.className=\"edit\";\r\n\tdeleteButton.className=\"delete\";\r\n\teditButton.innerText=\"Edit\";\r\n\tdeleteButton.innerText=\"Delete\";\r\n label.innerText=input.value;\r\n\r\n\t//append buttons to listItem\r\n\t//well,have to follow the order- -!\r\n\tlistItem.appendChild(checkBox);\r\n\tlistItem.appendChild(label);\r\n\tlistItem.appendChild(inputText);\r\n\tlistItem.appendChild(editButton);\r\n\tlistItem.appendChild(deleteButton);\r\n\t\r\n\r\n\treturn listItem;\r\n\t\r\n\r\n}", "function newItem() {\n //get value of text input, with Type Assertion <HTMLInputElement>\n var newItem = document.getElementById('new-item').value;\n var newPrg = document.createElement('p');\n newPrg.appendChild(document.createTextNode(newItem));\n uiEl.appendChild(newPrg);\n}", "function initializeUI(){\n var niceNameSrcArray,nameArray,i;\n var menuLength = 0; //menu now zero length\n\n //Populate the Form Menu\n document.MM_NS_REFS = getAllObjectRefs(\"NS 4.0\",\"INPUT/TEXT\",\"TEXTAREA\",\"INPUT/PASSWORD\");\n document.MM_IE_REFS = getAllObjectRefs(\"IE 4.0\",\"INPUT/TEXT\",\"TEXTAREA\",\"INPUT/PASSWORD\");\n niceNameSrcArray = document.MM_NS_REFS;\n\n //Search for unreferenceable objects. <DIV id=\"foo\"> is IE only, <LAYER> is NS only.\n //if REF_CANNOT found, return empty string, and use IE refs for nice namelist.\n for (i=0; i<document.MM_NS_REFS.length; i++) {\n if (document.MM_IE_REFS[i].indexOf(REF_CANNOT) == 0) {\n document.MM_IE_REFS[i] = \"\"; //blank it out\n }\n if (document.MM_NS_REFS[i].indexOf(REF_CANNOT) == 0) {\n document.MM_NS_REFS[i] = \"\"; //blank it out\n niceNameSrcArray = document.MM_IE_REFS; //use the IE list\n }\n }\n nameArray = niceNames(niceNameSrcArray,MM.TYPE_Text);\n\n for (i in nameArray) {\n document.theForm.fieldMenu.options[i]=new Option(nameArray[i]); //load menu\n menuLength++;\n }\n\n //Store the field menu length\n document.theForm.fieldMenu.length = menuLength; //store the menu length (hack - prop not supp)\n\n //Select first item\n document.theForm.fieldMenu.selectedIndex = 0;\n}", "function createEntry(itemText) {\n\tconsole.log(\"Creating item '\" + itemText + \"'...\");\n\tvar entry = handle + checkYes;\n\tentry += '<div class=\"item-display unchecked\">' + itemText + '</div>';\n\tentry += editBox + edit + delButton;\n\t$('<li class=\"item-box\"></div>').appendTo('.item-list').html(entry);\n}", "function menuCreate(menu) {\n if (typeof menu !== \"undefined\") {\n elements[menu.id] = new Menu()\n for(let i = 0; i < menu.items.length; i++) {\n elements[menu.id].append(menuItemCreate(menu.items[i]))\n }\n return elements[menu.id]\n }\n return null\n}", "function createForm(e){\n var newTaskForm = document.createElement(\"form\");\n newTaskForm.setAttribute(\"id\", \"newTaskForm\");\n newTaskForm.setAttribute(\"class\", \"popup\");\n\n //add a header to the new form\n newTaskForm.innerHTML += \"<h2 id='newTaskFormHeader'>Create New Task</h2>\";\n\n //add form elements\n addTaskBox(newTaskForm);\n addPriorityBox(newTaskForm);\n addDueDate(newTaskForm);\n addDescriptionBox(newTaskForm);\n addButtons(newTaskForm);\n\n //make form draggable\n drag(newTaskForm);\n\n count = 1;\n\n return newTaskForm;\n}", "function addItemsToExistingForm(items){\n function Item(itemJSON){\n this.id = itemJSON.id\n this.name = itemJSON.name\n }\n\n Item.prototype.itemFormHTML = function(){\n return `<input type=\"radio\" value=\"${this.id}\" name=\"trip[item_ids]\" id=\"trip_item_ids_${this.id}\"> ${this.name} `\n }\n\n actualItems = []\n\n items.forEach(function(item) {\n actualItem = new Item(item)\n actualItems.push(actualItem)\n })\n\n html = \" \"\n\n actualItems.forEach(function(actualItem) {\n html += actualItem.itemFormHTML()\n })\n\n $(\"#existing_items\").html(html)\n}", "function addItem() {\n\tvar msgFrame = document.querySelector(\"div#msg\");\n\tvar msg = msgFrame.getElementsByTagName(\"ul\");\n\tif (msg.length > 0) {\n\t\tmsgFrame.removeChild(msg[0]);\n\t}\n\tmsg = document.createElement(\"ul\");\n\tmsgFrame.appendChild(msg);\n\tmsg.style.display = \"none\";\n\tvar msgItems = msg.childNodes;\n\tfor (var i = 0; i < msgItems.length; i++) {\n\t\tmsg.removeChild(msgItems[i]);\n\t}\n\tvar newItem = itemFactory();\n\tvar valid = true;\n\tvar name = document.getElementById(\"iname\").value;\n\tif (name.length < 1) {\n\t\tvar nMsg = document.createElement(\"li\");\n\t\tnMsg.innerHTML = \"Please specify a name for the item.\";\n\t\tmsg.appendChild(nMsg);\n\t\tvalid = false;\n\t} else {\n\t\tnewItem.name = name;\n\t}\n\tvar type = document.getElementById(\"itype\").value;\n\tif (type.length < 1) {\n\t\tvar tMsg = document.createElement(\"li\");\n\t\ttMsg.innerHTML = \"Please specify a type for the item\";\n\t\tvalid = false;\n\t} else if (/ /.test(type)) {\n\t\tvar tMsg = document.createElement(\"li\"); tMsg = \"Please specify a type for the item\";\n\t\ttMsg.innerHTML = \"The value for type must not contain any white spaces.\";\n\t} else if (type === \"types\") {\n\t\tvar tMsg = document.createElement(\"li\"); \n\t\ttMsg.innerHTML = \"The keyword \\\"types\\\" is reserved and may not be used for as type.\";\n\t\tvalid = false;\n\t} else {\n\t\tnewItem.type = type;\n\t}\n\tif (tMsg) {\n\t\tmsg.appendChild(tMsg);\n\t}\n\tif (baseItems.get(type, name) !== undefined || optionalItems.get(type, name) !== undefined) {\n\t\tvar stMsg = document.createElement(\"li\");\n\t\tstMsg.innerHTML = \"An item of the same type and name already exists.\";\n\t\tmsg.appendChild(stMsg);\n\t\tvalid = false;\n\t} \n\tif (document.getElementById(\"ibase\").checked) {\n\t\tnewItem.isBase = true;\n\t} else {\n\t\tnewItem.isBase = false;\n\t}\n\tvar numberFields = document.querySelectorAll('form#newitem input[type=\"number\"]');\n\tfor (var i = 0; i < numberFields.length; i++) {\n\t\tif (numberFields[i].value.length < 1 || isNaN(numberFields[i].value) || numberFields[i].value < 0) {\n\t\t\tvar numMsg = document.createElement(\"li\");\n\t\t\tnumMsg.innerHTML = \"Value in the field for \" + numberFields[i].name + \" Must be a positive number.\";\n\t\t\tmsg.appendChild(numMsg);\n\t\t\tvalid = false;\n\t\t} else {\n\t\t\tnewItem[numberFields[i].name] = Number(numberFields[i].value);\n\t\t}\n\t}\n\tvar created;\n\tif (valid && newItem.isValidInventory()) {\n\t\tif (newItem.isBase) {\n\t\t\tcreated = baseItems.add(newItem);\n\t\t} else {\n\t\t\tcreated = optionalItems.add(newItem)\n\t\t}\n\t}\n\tif (created) {\n\t\tvar successMsg = document.createElement(\"li\");\n\t\tsuccessMsg.innerHTML = \"Item successfully added!\";\n\t\tmsg.append(successMsg);\n\t\tsyncToStorage();\n\t\tdocument.getElementById(\"newitem\").reset();\n\t\tdocument.querySelector(\"form#newitem input\").focus();\n\t\tpopulateInventory();\n\t}\n\tmsg.style.display = \"block\";\n}", "function addPriorityBox(newTaskForm){\n //add drop down box\n var priorityBtn = document.createElement(\"select\");\n priorityBtn.setAttribute(\"id\", \"priorityBtn\");\n priorityBtn.innerText += \"Priority\";\n\n //add drop down items\n var div = document.createElement(\"div\");\n div.setAttribute(\"class\", \"newTaskInput\");\n div.setAttribute(\"aria-labelledby\", \"dropdownMenuButton\");\n newTaskForm.appendChild(div);\n\n var high = document.createElement(\"option\");\n high.setAttribute(\"class\", \"dropdown-item\");\n high.setAttribute(\"value\", \"high\");\n high.innerHTML += \"High Priority\";\n priorityBtn.appendChild(high);\n\n var medium = document.createElement(\"option\");\n medium.setAttribute(\"value\", \"medium\");\n medium.setAttribute(\"class\", \"dropdown-item\");\n medium.innerHTML += \"Medium Priority\";\n priorityBtn.appendChild(medium);\n\n var low = document.createElement(\"option\");\n low.setAttribute(\"value\", \"low\");\n low.setAttribute(\"class\", \"dropdown-item\");\n low.innerHTML += \"Low Priority\";\n priorityBtn.appendChild(low); \n\n newTaskForm.appendChild(priorityBtn);\n newTaskForm.innerHTML += \"<br>\";\n\n return newTaskForm;\n}", "function formCategorias(tipo){\n\t//Selecciona la zona debajo del menu horizontal de edicion y la oculta\n\tvar contenidoCentral = document.getElementById(\"contenidoCentral\");\n\tcontenidoCentral.setAttribute(\"class\",\"d-none\");\n\t//Selecciona la zona para poner los formularios\n\tvar contenidoFormularios = document.getElementById(\"contenidoFormularios\");\n\tcontenidoFormularios.setAttribute(\"class\",\"d-block\");\n\t//QUITA TODO EL CONTENIDO PREVIO POR SI HAY OTROS FORMULARIOS\n\twhile (contenidoFormularios.firstChild) {\n\t\tcontenidoFormularios.removeChild(contenidoFormularios.firstChild);\n\t}\n\n\tif (tipo == \"add\") {\n\t\t//Se limpia el array\n\t\twhile(arrayProducciones.length != 0){\n\t\t\tarrayProducciones.shift();\n\t\t}\n\t\tvar formulario = document.createElement(\"form\");\n\t\tformulario.setAttribute(\"name\",\"addCategory\");\n\t\tformulario.setAttribute(\"action\",\"\");\n\t\tformulario.setAttribute(\"onsubmit\",\"validarCategorias(); return false\");\n\t\tformulario.setAttribute(\"method\",\"post\");\n\t\tvar leyenda = document.createElement(\"legend\");\n\t\tleyenda.appendChild(document.createTextNode(\"Añadir categoria\"));\n\t\tvar grupo1 = document.createElement(\"div\");\n\t\tgrupo1.setAttribute(\"class\",\"form-group\");\n\t\tvar label1 = document.createElement(\"label\");\n\t\tlabel1.setAttribute(\"for\",\"nombreCat\");\n\t\tlabel1.appendChild(document.createTextNode(\"Nombre de la categoria\"));\n\t\tvar input1 = document.createElement(\"input\");\n\t\tinput1.setAttribute(\"type\",\"text\");\n\t\tinput1.setAttribute(\"class\",\"form-control\");\n\t\tinput1.setAttribute(\"id\",\"nombreCat\");\n\t\tinput1.setAttribute(\"onblur\",\"validarCampoTexto(this)\");\n\t\tinput1.setAttribute(\"placeholder\",\"Nombre de la categoria\");\n\t\tvar mal1 = document.createElement(\"small\");\n\t\tmal1.setAttribute(\"class\",\"form-text text-muted\");\n\t\tmal1.setAttribute(\"id\",\"nombreMal\");\n\t\tvar grupo2 = document.createElement(\"div\");\n\t\tgrupo2.setAttribute(\"class\",\"form-group\");\n\t\tvar label2 = document.createElement(\"label\");\n\t\tlabel2.setAttribute(\"for\",\"descripCat\");\n\t\tlabel2.appendChild(document.createTextNode(\"Descripcion de la categoria\"));\n\t\tvar input2 = document.createElement(\"input\");\n\t\tinput2.setAttribute(\"type\",\"text\");\n\t\tinput2.setAttribute(\"class\",\"form-control\");\n\t\tinput2.setAttribute(\"id\",\"descripCat\");\n\t\tinput2.setAttribute(\"onblur\",\"validarCampoTexto(this)\");\n\t\tinput2.setAttribute(\"placeholder\",\"Descripcion de la categoria\");\n\t\tvar mal2 = document.createElement(\"small\");\n\t\tmal2.setAttribute(\"id\",\"descMal\");\n\t\tmal2.setAttribute(\"class\",\"form-text text-muted\");\n\t\t//SE CREA EL BUSCADOR \n\t\tvar grupo3 = document.createElement(\"div\");\n\t\tgrupo3.setAttribute(\"class\",\"form-group\");\n\t\tvar label3 = document.createElement(\"label\");\n\t\tlabel3.setAttribute(\"for\",\"produccionesCat\");\n\t\tlabel3.appendChild(document.createTextNode(\"Asignar producciones a la nueva categoria\"));\n\t\tvar divInputBtn = document.createElement(\"div\");\n\t\tdivInputBtn.setAttribute(\"class\",\"input-group\");\n\t\tvar divBtn = document.createElement(\"div\");\n\t\tdivBtn.setAttribute(\"class\",\"input-group-prepend\");\n\t\tvar botonRemover = document.createElement(\"button\");\n\t\tbotonRemover.setAttribute(\"type\",\"button\");\n\t\tbotonRemover.setAttribute(\"class\",\"btn btn-sm btn-outline-secondary\");\n\t\tbotonRemover.appendChild(document.createTextNode(\"Remover\"));\n\t\t//añade el evento al hacer click al boton de remover\n\t\tbotonRemover.addEventListener(\"click\",function(){\n\t\t\tvar input = document.forms[\"addCategory\"][\"producciones\"];\n\t\t\t\t//Quita el ultimo elemento del array\n\t\t\t\tarrayProducciones.pop();\n\t\t\t\tinput.value = arrayProducciones.toString();\n\n\t\t});\n\t\tvar produc = document.createElement(\"input\");\n\t\tproduc.setAttribute(\"class\",\"form-control \");\n\t\tproduc.setAttribute(\"type\",\"text\");\n\t\tproduc.setAttribute(\"id\",\"producciones\");\n\t\tproduc.readOnly = true;\n\t\tvar malProduc = document.createElement(\"small\");\n\t\tmalProduc.setAttribute(\"class\",\"form-text text-muted\");\n\t\tmalProduc.setAttribute(\"id\",\"producMal\");\n\t\tvar buscador = document.createElement(\"input\");\n\t\tbuscador.setAttribute(\"class\",\"form-control my-3\");\n\t\tbuscador.setAttribute(\"type\",\"text\");\n\t\tbuscador.setAttribute(\"id\",\"buscador\");\n\t\tbuscador.setAttribute(\"placeholder\",\"Buscar...\");\n\t\t//SE CREA LA TABLA DE LAS PRODUCCIONES\n\t\tvar tabla = document.createElement(\"table\");\n\t\ttabla.setAttribute(\"class\",\"table table-bordered\");\n\t\ttabla.setAttribute(\"name\",\"produccion\");\n\t\ttabla.setAttribute(\"id\",\"produccion\");\n\t\tvar thead = document.createElement(\"thead\");\n\t\tvar tr = document.createElement(\"tr\");\n\t\tvar thVacio = document.createElement(\"th\");\n\t\tvar ocultar = document.createElement(\"button\");\n\t\tocultar.setAttribute(\"type\",\"button\");\n\t\tocultar.setAttribute(\"class\",\"btn btn-secondary\");\n\t\tocultar.appendChild(document.createTextNode(\"Mostrar/Ocultar\"));\n\t\tocultar.addEventListener(\"click\", function(){\n\t\t\tvar cont = document.getElementById(\"tablaProducciones\");\n\t\t\tif(cont.style.display==\"table-row-group\"){\n\t\t\t\tcont.style.display = \"none\";\n\t\t\t}else{\n\t\t\t\tcont.style.display = \"table-row-group\";\n\t\t\t}\n\t\t});\n\t\tthVacio.appendChild(ocultar);\n\t\tvar thNombre = document.createElement(\"th\");\n\t\tthNombre.appendChild(document.createTextNode(\"Nombre\"));\n\t\tvar thDesc = document.createElement(\"th\");\n\t\tthDesc.appendChild(document.createTextNode(\"Tipo\"));\n\t\tvar tbody = document.createElement(\"tbody\");\n\t\ttbody.setAttribute(\"id\",\"tablaProducciones\");\n\t\t//Abre la conexion con la base de datos categorias\n\t\tvar produccionesDB = indexedDB.open(nombreDB);\n\t\t//Si ha salido bien\n\t\tproduccionesDB.onsuccess = function(event) { \n\t\t\tvar db = event.target.result; \n\t\t\tvar objectStore = db.transaction([\"producciones\"],\"readonly\").objectStore(\"producciones\");\n\t\t\t//Abre un cursor para recorrer todos los objetos de la base de datos \n\t\t\tobjectStore.openCursor().onsuccess = function(event) {\n\t\t\t\tvar produccion = event.target.result;\n\t\t\t\t//Si el cursor devuelve un valor \n\t\t\t\tif (produccion) {\n\t\t\t\t\tvar trPro = document.createElement(\"tr\");\n\t\t\t\t\tvar tdAdd = document.createElement(\"td\");\n\t\t\t\t\tvar add = document.createElement(\"button\");\n\t\t\t\t\tadd.setAttribute(\"type\",\"button\");\n\t\t\t\t\tadd.setAttribute(\"class\",\"btn btn-danger\");\n\t\t\t\t\tadd.setAttribute(\"value\",produccion.value.title);\n\t\t\t\t\tadd.appendChild(document.createTextNode(\"Añadir\"));\n\t\t\t\t\tvar tdTitulo = document.createElement(\"td\");\n\t\t\t\t\ttdTitulo.appendChild(document.createTextNode(produccion.value.title));\n\t\t\t\t\tvar tdTipo = document.createElement(\"td\");\n\t\t\t\t\tvar nomTipo = \"\";\n\t\t\t\t\tif (produccion.value.tipo == \"Movie\") {\n\t\t\t\t\t\tnomTipo = \"Pelicula\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnomTipo = \"Serie\";\n\t\t\t\t\t}\n\t\t\t\t\ttdTipo.appendChild(document.createTextNode(nomTipo));\n\t\t\t\t\ttdAdd.appendChild(add);\n\t\t\t\t\ttrPro.appendChild(tdAdd);\n\t\t\t\t\ttrPro.appendChild(tdTitulo);\n\t\t\t\t\ttrPro.appendChild(tdTipo);\n\t\t\t\t\ttbody.appendChild(trPro);\n\t\t\t\t\t//Añade una funcion a cada boton de añadir\n\t\t\t\t\tadd.addEventListener(\"click\", function(){\n\t\t\t\t\t\tvar input = document.forms[\"addCategory\"][\"producciones\"];\n\t\t\t\t\t\t//Añade al array el nomnbre de boton\n\t\t\t\t\t\tarrayProducciones.push(this.value);\n\t\t\t\t\t\tinput.value = arrayProducciones.toString();\n\t\t\t\t\t});\n\t\t\t\t\t//Pasa a la siguiente categoria\n\t\t\t\t\tproduccion.continue();\n\t\t\t\t}//Fin del if\n\t\t\t};//Fin de objectStore.openCursor().onsuccess\n\t\t};//Fin de request.onsuccess\n\t\tvar grupoBtn = document.createElement(\"div\");\n\t\tgrupoBtn.setAttribute(\"class\",\"form-group d-flex justify-content-around\");\n\t\tvar aceptar = document.createElement(\"button\");\n\t\taceptar.setAttribute(\"type\",\"submit\");\n\t\taceptar.setAttribute(\"class\",\"btn btn-primary \");\n\t\taceptar.appendChild(document.createTextNode(\"Guardar\"));\n\t\tvar cancelar = document.createElement(\"button\");\n\t\tcancelar.setAttribute(\"type\",\"button\");\n\t\tcancelar.setAttribute(\"class\",\"btn btn-primary\");\n\t\tcancelar.appendChild(document.createTextNode(\"Cancelar\"));\n\t\t\t\n\t\t//Añade eventos al hacer click sobre los botones del formulario creado\n\t\t$(document).ready(function(){\n\t\t\t$(\"#buscador\").on(\"keyup\", function() {\n\t\t\t var value = $(this).val().toLowerCase();\n\t\t\t $(\"#tablaProducciones tr\").filter(function() {\n\t\t\t\t$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)\n\t\t\t });\n\t\t\t});\n\t\t});\n\n\t\tcancelar.addEventListener(\"click\", showHomePage);\n\t\tcancelar.addEventListener(\"click\", function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontenidoCentral.setAttribute(\"class\",\"d-block\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontenidoFormularios.setAttribute(\"class\",\"d-none\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t//Se limpia el array\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile(arrayProducciones.length != 0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarrayProducciones.shift();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t//Crea el formulario\n\t\tgrupo1.appendChild(label1);\n\t\tgrupo1.appendChild(input1);\n\t\tgrupo1.appendChild(mal1);\n\t\tgrupo2.appendChild(label2);\n\t\tgrupo2.appendChild(input2);\n\t\tgrupo2.appendChild(mal2);\n\t\tgrupo3.appendChild(label3);\n\t\tdivInputBtn.appendChild(divBtn);\n\t\tdivBtn.appendChild(botonRemover);\n\t\tdivInputBtn.appendChild(produc);\n\t\tgrupo3.appendChild(divInputBtn);\n\t\tgrupo3.appendChild(malProduc);\n\t\tgrupo3.appendChild(buscador);\n\t\tgrupo3.appendChild(tabla);\n\t\ttabla.appendChild(thead);\n\t\ttabla.appendChild(tbody);\n\t\tthead.appendChild(tr);\n\t\ttr.appendChild(thVacio);\n\t\ttr.appendChild(thNombre);\n\t\ttr.appendChild(thDesc);\n\t\tgrupoBtn.appendChild(aceptar);\n\t\tgrupoBtn.appendChild(cancelar);\n\t\tformulario.appendChild(leyenda);\n\t\tformulario.appendChild(grupo1);\n\t\tformulario.appendChild(grupo2);\n\t\tformulario.appendChild(grupo3);\n\t\tformulario.appendChild(grupoBtn);\n\t\tcontenidoFormularios.appendChild(formulario);\n\t\t/* FIN DEL FORMULARIO DE AÑADIR CATEGORIA */\n\t}else if (tipo == \"delete\") {\n\t\tvar formulario = document.createElement(\"form\");\n\t\tformulario.setAttribute(\"name\",\"deleteCategory\");\n\t\tformulario.setAttribute(\"action\",\"\");\n\t\tformulario.setAttribute(\"onsubmit\",\"return false\");\n\t\tformulario.setAttribute(\"method\",\"post\");\n\t\tvar leyenda = document.createElement(\"legend\");\n\t\tvar grupo = document.createElement(\"div\");\n\t\tgrupo.setAttribute(\"class\",\"form-group\");\n\t\tleyenda.appendChild(document.createTextNode(\"Eliminar categoria\"));\n\t\t//SE CREA EL BUSCADOR \n\t\tvar buscador = document.createElement(\"input\");\n\t\tbuscador.setAttribute(\"class\",\"form-control mb-3\");\n\t\tbuscador.setAttribute(\"type\",\"text\");\n\t\tbuscador.setAttribute(\"id\",\"buscador\");\n\t\tbuscador.setAttribute(\"placeholder\",\"Buscar...\");\n\t\t//SE CREA LA TABLA DE LAS CATEGORIAS\n\t\tvar tabla = document.createElement(\"table\");\n\t\ttabla.setAttribute(\"class\",\"table table-bordered\");\n\t\ttabla.setAttribute(\"name\",\"categoria\");\n\t\ttabla.setAttribute(\"id\",\"categoria\");\n\t\tvar thead = document.createElement(\"thead\");\n\t\tvar tr = document.createElement(\"tr\");\n\t\tvar thVacio = document.createElement(\"th\");\n\t\tvar ocultar = document.createElement(\"button\");\n\t\tocultar.setAttribute(\"type\",\"button\");\n\t\tocultar.setAttribute(\"class\",\"btn btn-secondary\");\n\t\tocultar.appendChild(document.createTextNode(\"Mostrar/Ocultar\"));\n\t\tocultar.addEventListener(\"click\", function(){\n\t\t\tvar cont = document.getElementById(\"tablaCategorias\");\n\t\t\tif(cont.style.display==\"table-row-group\"){\n\t\t\t\tcont.style.display = \"none\";\n\t\t\t}else{\n\t\t\t\tcont.style.display = \"table-row-group\";\n\t\t\t}\n\t\t});\n\t\tthVacio.appendChild(ocultar);\n\t\tvar thNombre = document.createElement(\"th\");\n\t\tthNombre.appendChild(document.createTextNode(\"Nombre\"));\n\t\tvar thDesc = document.createElement(\"th\");\n\t\tthDesc.appendChild(document.createTextNode(\"Descripcion\"));\n\t\tvar tbody = document.createElement(\"tbody\");\n\t\ttbody.setAttribute(\"id\",\"tablaCategorias\");\n\t\t//Abre la conexion con la base de datos categorias\n\t\tvar categoriasDB = indexedDB.open(nombreDB);\n\t\t//Si ha salido bien\n\t\tcategoriasDB.onsuccess = function(event) { \n\t\t\tvar db = event.target.result; \n\t\t\tvar objectStore = db.transaction([\"categorias\"],\"readonly\").objectStore(\"categorias\");\n\t\t\t//Abre un cursor para recorrer todos los objetos de la base de datos \n\t\t\tobjectStore.openCursor().onsuccess = function(event) {\n\t\t\t\tvar categoria = event.target.result;\n\t\t\t\t//Si el cursor devuelve un valor \n\t\t\t\tif (categoria) {\n\t\t\t\t\tvar trCat = document.createElement(\"tr\");\n\t\t\t\t\tvar tdEliminar = document.createElement(\"td\");\n\t\t\t\t\tvar eliminar = document.createElement(\"button\");\n\t\t\t\t\teliminar.setAttribute(\"type\",\"button\");\n\t\t\t\t\teliminar.setAttribute(\"class\",\"btn btn-danger\");\n\t\t\t\t\teliminar.setAttribute(\"value\",categoria.value.name);\n\t\t\t\t\teliminar.appendChild(document.createTextNode(\"Eliminar\"));\n\t\t\t\t\teliminar.addEventListener(\"click\", deleteCategory);\n\t\t\t\t\tvar tdCat = document.createElement(\"td\");\n\t\t\t\t\ttdCat.appendChild(document.createTextNode(categoria.value.name));\n\t\t\t\t\tvar tdDesc = document.createElement(\"td\");\n\t\t\t\t\ttdDesc.appendChild(document.createTextNode(categoria.value.description));\n\t\t\t\t\ttdEliminar.appendChild(eliminar);\n\t\t\t\t\ttrCat.appendChild(tdEliminar);\n\t\t\t\t\ttrCat.appendChild(tdCat);\n\t\t\t\t\ttrCat.appendChild(tdDesc);\n\t\t\t\t\ttbody.appendChild(trCat);\n\t\t\t\t\t//Pasa a la siguiente categoria\n\t\t\t\t\tcategoria.continue();\n\t\t\t\t}//Fin del if\n\t\t\t};//Fin de objectStore.openCursor().onsuccess\n\t\t};//Fin de request.onsuccess\n\t\tvar grupoBtn = document.createElement(\"div\");\n\t\tgrupoBtn.setAttribute(\"class\",\"form-group d-flex justify-content-around\");\n\t\tvar cancelar = document.createElement(\"button\");\n\t\tcancelar.setAttribute(\"type\",\"button\");\n\t\tcancelar.setAttribute(\"class\",\"btn btn-primary\");\n\t\tcancelar.appendChild(document.createTextNode(\"Cancelar\"));\n\t\t//Añade eventos al hacer click sobre los botones del formulario creado y el buscador\n\t\t$(document).ready(function(){\n\t\t\t$(\"#buscador\").on(\"keyup\", function() {\n\t\t\t var value = $(this).val().toLowerCase();\n\t\t\t $(\"#tablaCategorias tr\").filter(function() {\n\t\t\t\t$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)\n\t\t\t });\n\t\t\t});\n\t\t});\n\t\tcancelar.addEventListener(\"click\", showHomePage);\n\t\tcancelar.addEventListener(\"click\", function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontenidoCentral.setAttribute(\"class\",\"d-block\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontenidoFormularios.setAttribute(\"class\",\"d-none\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t//se crea el formulario de borrado\n\t\tformulario.appendChild(leyenda);\n\t\tgrupo.appendChild(buscador);\n\t\tgrupo.appendChild(tabla);\n\t\tformulario.appendChild(grupo);\n\t\ttabla.appendChild(thead);\n\t\ttabla.appendChild(tbody);\n\t\tthead.appendChild(tr);\n\t\ttr.appendChild(thVacio);\n\t\ttr.appendChild(thNombre);\n\t\ttr.appendChild(thDesc);\n\t\tgrupoBtn.appendChild(cancelar);\n\t\tformulario.appendChild(grupoBtn);\n\t\tcontenidoFormularios.appendChild(formulario);\n\t}else if (tipo == \"update\") {\n\t\tvar formulario = document.createElement(\"form\");\n\t\tformulario.setAttribute(\"name\",\"modCategory\");\n\t\tformulario.setAttribute(\"action\",\"\");\n\t\tformulario.setAttribute(\"onsubmit\",\"return false\");\n\t\tformulario.setAttribute(\"method\",\"post\");\n\t\tvar leyenda = document.createElement(\"legend\");\n\t\tleyenda.appendChild(document.createTextNode(\"Modificar categoria\"));\n\t\t//SE CREA EL BUSCADOR \n\t\tvar divModificar = document.createElement(\"div\");\n\t\tdivModificar.setAttribute(\"id\",\"divModificar\");\n\t\tvar grupo1 = document.createElement(\"div\");\n\t\tgrupo1.setAttribute(\"class\",\"form-group mt-3\");\n\t\tvar label1 = document.createElement(\"label\");\n\t\tlabel1.setAttribute(\"for\",\"produccionesCat\");\n\t\tlabel1.appendChild(document.createTextNode(\"Selecciona una categoria\"));\n\t\tvar divInputBtn = document.createElement(\"div\");\n\t\tdivInputBtn.setAttribute(\"class\",\"input-group\");\n\t\tvar divBtn = document.createElement(\"div\");\n\t\tdivBtn.setAttribute(\"class\",\"input-group-prepend\");\n\t\tvar botonRemover = document.createElement(\"button\");\n\t\tbotonRemover.setAttribute(\"type\",\"button\");\n\t\tbotonRemover.setAttribute(\"class\",\"btn btn-sm btn-outline-secondary\");\n\t\tbotonRemover.appendChild(document.createTextNode(\"Remover\"));\n\t\t//añade el evento al hacer click al boton de remover\n\t\tbotonRemover.addEventListener(\"click\",function(){\n\t\t\tvar input = document.forms[\"modCategory\"][\"categoria\"];\n\t\t\t\tinput.value = \"\";\n\t\t\t\t//muestra la tabla\n\t\t\t\tdocument.getElementById(\"divTabla\").style.display = \"block\";\n\t\t\t\t//oculta los campos de la categoria para modificar\n\t\t\t\tdivModificar.removeChild(divModificar.firstChild);\n\t\t});\n\t\tvar inputCat = document.createElement(\"input\");\n\t\tinputCat.setAttribute(\"class\",\"form-control \");\n\t\tinputCat.setAttribute(\"type\",\"text\");\n\t\tinputCat.setAttribute(\"id\",\"categoria\");\n\t\tinputCat.readOnly = true;\n\t\tvar divTabla = document.createElement(\"div\");\n\t\tdivTabla.setAttribute(\"id\",\"divTabla\");\n\t\tvar buscador = document.createElement(\"input\");\n\t\tbuscador.setAttribute(\"class\",\"form-control my-3\");\n\t\tbuscador.setAttribute(\"type\",\"text\");\n\t\tbuscador.setAttribute(\"id\",\"buscador\");\n\t\tbuscador.setAttribute(\"placeholder\",\"Buscar...\");\n\t\t//SE CREA LA TABLA DE LAS CATEGORIAS\n\t\tvar tabla = document.createElement(\"table\");\n\t\ttabla.setAttribute(\"class\",\"table table-bordered\");\n\t\ttabla.setAttribute(\"name\",\"tablaCategorias\");\n\t\ttabla.setAttribute(\"id\",\"tablaCategorias\");\n\t\tvar thead = document.createElement(\"thead\");\n\t\tvar tr = document.createElement(\"tr\");\n\t\tvar thVacio = document.createElement(\"th\");\n\t\tvar ocultar = document.createElement(\"button\");\n\t\tocultar.setAttribute(\"type\",\"button\");\n\t\tocultar.setAttribute(\"class\",\"btn btn-secondary\");\n\t\tocultar.appendChild(document.createTextNode(\"Mostrar/Ocultar\"));\n\t\tocultar.addEventListener(\"click\", function(){\n\t\t\tvar cont = document.getElementById(\"tablaBody\");\n\t\t\tif(cont.style.display==\"table-row-group\"){\n\t\t\t\tcont.style.display = \"none\";\n\t\t\t}else{\n\t\t\t\tcont.style.display = \"table-row-group\";\n\t\t\t}\n\t\t});\n\t\tthVacio.appendChild(ocultar);\n\t\tvar thNombre = document.createElement(\"th\");\n\t\tthNombre.appendChild(document.createTextNode(\"Nombre completo\"));\n\t\tvar tbody = document.createElement(\"tbody\");\n\t\ttbody.setAttribute(\"id\",\"tablaBody\");\n\t\t//Abre la conexion con la base de datos categorias\n\t\tvar categoriasDB = indexedDB.open(nombreDB);\n\t\t//Si ha salido bien\n\t\tcategoriasDB.onsuccess = function(event) { \n\t\t\tvar db = event.target.result; \n\t\t\tvar objectStore = db.transaction([\"categorias\"],\"readonly\").objectStore(\"categorias\");\n\t\t\t//Abre un cursor para recorrer todos los objetos de la base de datos \n\t\t\tobjectStore.openCursor().onsuccess = function(event) {\n\t\t\t\tvar categoria = event.target.result;\n\t\t\t\t//Si el cursor devuelve un valor \n\t\t\t\tif (categoria) {\n\t\t\t\t\tvar trCat = document.createElement(\"tr\");\n\t\t\t\t\tvar tdAdd = document.createElement(\"td\");\n\t\t\t\t\tvar add = document.createElement(\"button\");\n\t\t\t\t\tadd.setAttribute(\"type\",\"button\");\n\t\t\t\t\tadd.setAttribute(\"class\",\"btn btn-danger\");\n\t\t\t\t\tadd.setAttribute(\"value\",categoria.value.name);\n\t\t\t\t\tadd.appendChild(document.createTextNode(\"Modificar\"));\n\t\t\t\t\tvar tdNombre = document.createElement(\"td\");\n\t\t\t\t\ttdNombre.appendChild(document.createTextNode(categoria.value.name));\n\t\t\t\t\ttdNombre.setAttribute(\"class\",\"col-8\");\n\t\t\t\t\ttdAdd.appendChild(add);\n\t\t\t\t\ttrCat.appendChild(tdAdd);\n\t\t\t\t\ttrCat.appendChild(tdNombre);\n\t\t\t\t\ttbody.appendChild(trCat);\n\t\t\t\t\t//Añade una funcion a cada boton de añadir\n\t\t\t\t\tadd.addEventListener(\"click\", function(){\n\t\t\t\t\t\tvar input = document.forms[\"modCategory\"][\"categoria\"];\n\t\t\t\t\t\tinput.value = this.value;\n\t\t\t\t\t\t//oculta la tabla\n\t\t\t\t\t\tdocument.getElementById(\"divTabla\").style.display = \"none\";\n\t\t\t\t\t\t//muestra los campos de la categoria para modificar\n\t\t\t\t\t\tmodifyCategory(this.value);\n\t\t\t\t\t});\n\t\t\t\t\t//Pasa a la siguiente categoria\n\t\t\t\t\tcategoria.continue();\n\t\t\t\t}//Fin del if\n\t\t\t};//Fin de objectStore.openCursor().onsuccess\n\t\t};//Fin de request.onsuccess\n\t\t//Añade los eventos de la tabla\n\t\t$(document).ready(function(){\n\t\t\t$(\"#buscador\").on(\"keyup\", function() {\n\t\t\t var value = $(this).val().toLowerCase();\n\t\t\t $(\"#tablaCategorias tr\").filter(function() {\n\t\t\t\t$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)\n\t\t\t });\n\t\t\t});\n\t\t});\n\t\tgrupo1.appendChild(label1);\n\t\tdivInputBtn.appendChild(divBtn);\n\t\tdivBtn.appendChild(botonRemover);\n\t\tdivInputBtn.appendChild(inputCat);\n\t\tgrupo1.appendChild(divInputBtn);\n\t\tdivTabla.appendChild(buscador);\n\t\tdivTabla.appendChild(tabla);\n\t\tgrupo1.appendChild(divTabla);\n\t\ttabla.appendChild(thead);\n\t\ttabla.appendChild(tbody);\n\t\tthead.appendChild(tr);\n\t\ttr.appendChild(thVacio);\n\t\ttr.appendChild(thNombre);\n\t\tformulario.appendChild(grupo1);\n\t\tformulario.appendChild(divModificar);\n\t\tcontenidoFormularios.appendChild(formulario);\n\t}//Fin de los if\n}//Fin de formCategorias", "function addNewItem() { switchToView('edit-form'); }", "function createForm(idInput,inputItemArray,corner){\n // Exceptions (one is later)\n if (typeof idInput!='string'){\n throw \"createForm: idInput must be string. Found \" + (typeof idInput) + \".\";\n }\n if (typeof inputItemArray!='object' || !(inputItemArray instanceof Array)){\n if (typeof inputItemArray!='object'){\n throw \"createForm: inputItemArray must be an array. Received \" + (typeof inputItemArray) + \".\";\n } else {\n throw \"createForm: inputItemArray must be an array. Received \" + (inputItemArray.constructor.name) + \".\";\n }\n }\n if (typeof corner!='boolean' && typeof corner!='undefined'){\n throw \"createForm: corner must be boolean or undefined.\";\n }\n if (typeof corner=='undefined') corner=false;\n var i,len;\n var type;\n var htmlOutput = `<div class=\"form\" id=\"${idInput}\">`;\n for (i=0,len=inputItemArray.length;i<len;i++){\n // Exception\n if (typeof inputItemArray[i] !='object' || typeof inputItemArray[i]['objClass']!='string' || inputItemArray[i]['objClass']!='Input'){\n throw `createForm: Item ${i} is not an Input object.`;\n }\n type = inputItemArray[i]['type'];\n var createSpace = true;\n switch(type){\n case \"text\":\n htmlOutput += createTextInputDiv(inputItemArray[i]);\n break;\n case 'droplist':\n htmlOutput += createDroplistInputDiv(inputItemArray[i]);\n break;\n case 'timezoneDroplist':\n htmlOutput += createTimezoneDroplistInputDiv(inputItemArray[i]);\n break;\n case 'button':\n htmlOutput += createButtonInputDiv(inputItemArray[i]);\n break;\n case 'textItem':\n htmlOutput += createTextItemDiv(inputItemArray[i]);\n createSpace = false;\n break;\n case 'invisible':\n htmlOutput += createInvisibleInputDiv(inputItemArray[i]);\n createSpace = false;\n break;\n default:\n throw `Unknown input type: ${type}.`;\n }\n // Create divs underneath (for messages).\n if (createSpace){\n var idDum = inputItemArray[i]['id'];\n htmlOutput += `\n <div class=\"formSpace\">\n <div class=\"formSidePadding\"><p>&nbsp;</p></div>\n <div class=\"formLabel\"><p>&nbsp;</p></div>\n <div class=\"formValue\" id=\"${idDum}Message\">&nbsp;</div>\n <div class=\"formSidePadding\"><p>&nbsp;</p></div>\n </div>\n `;\n }\n \n }\n\n htmlOutput+=\"</div>\";\n var formContainer = (corner) ? \"formContainerCorner\" : \"formContainer\";\n htmlOutput = `<div class=\"${formContainer}\">${htmlOutput}</div>`;\n return htmlOutput;\n }", "function NewItem(value) {\n \n return '<br><input name = \"NewItem1\" id= \"NewItem1\" type=\"text\" placeholder =\"Degree\" value = \"' + value + '\" />&nbsp;&nbsp;&nbsp;' +\n '<input name = \"NewItem2\" id= \"NewItem2\" type=\"text\" placeholder =\"Specialization\" value = \"' + value + '\" />&nbsp;'+\n '<input name = \"NewItem3\" id= \"NewItem3\" type=\"text\" placeholder =\"University\" value = \"' + value + '\" />&nbsp;'+\n '<input type=\"button\" id =\"remove\" value=\"Remove\" class=\"remove\" /><br>'\n}", "function addItem(e) {\n e.preventDefault(); // To stop page from reloading, because by default the form tag is going to reload or send the data,\n // to external source, generally server side and prevent keeps it on a client side in this case\n \n const text = (this.querySelector('[name=item]')).value; //this keyword is a form tag in this case, value is the values of the items\n const item = {\n text,\n done: false\n };\n items.push(item) // to put everything we inputted into the empty array;\n populateList(items, itemsList); // Everytime we add item it calls populateList function which is going to create- \n //list of item (<li>) with a label inside of it;\n//To store everything in localeStorage-\n localStorage.setItem('items', JSON.stringify(items)); // everything can be stored as a string only, otherwise browser will \n //convert under the hood to the string using toString method, so to avoid this \n //we have to convert our items going to the localStorage into JSON file.\n //When we go to our localStorage we can see that everything storaed as a big string;\n \n \n this.reset() //to reset all the input we have done\n}", "function create_entity_list_form() {\n var str_array = [];\n str_array.push(\"<form name='entities'>\");\n str_array.push(\"<select name='entity' onchange='update_entity_select(this.options[this.selectedIndex].value);'>\");\n for(var ent in Domain.entities) {\n var sel = \"\";\n if(ent == \"User\") {\n sel = \"selected\";\n }\n str_array.push(\"<option value='\" + ent + \"' \" + sel + \">\" + ent + \"</option>\");\n }\n str_array.push(\"</select>\");\n str_array.push(\"</form>\");\n return str_array.join(\"\\n\");\n}", "crearFormulario(formCL,contenedor){\n\t\tlet arrAttrb = new Array(['class',formCL]);\n\t\tlet formular = this.crearNodo('form',arrAttrb,contenedor);\n\t\treturn formular;\n\t}", "function addItemsClick() {\n var createItems = document.createElement(\"li\");\n // var dividor = document.createElement(\"hr\");\n createItems.setAttribute(\"id\", \"li\" + (liIdCounter++));\n var itemsNode = document.createTextNode(userInputBox.value);\n createItems.appendChild(itemsNode);\n\n // Form Validation: To make sure not to add empty items or spaces\n if (userInputBox.value.length > 0 && userInputBox.value.trim() != \"\") {\n addedItemsList.appendChild(createItems);\n // addedItemsList.appendChild(dividor);\n }\n\n userInputBox.value = \"\"; // Reset the Input box after adding the item\n\n // To Mark the item as completed and move it to the completed section\n var isClicked = false;\n function completeItem() {\n createItems.classList.toggle(\"completeItem\");\n if (!isClicked) {\n completedItemsList.appendChild(createItems);\n // completedItemsList.appendChild(dividor);\n\n isClicked = true;\n } else {\n addedItemsList.appendChild(createItems);\n // addedItemsList.appendChild(dividor);\n isClicked = false;\n }\n }\n createItems.addEventListener(\"click\", completeItem);\n\n // To Delete an item\n var deleteBtn = document.createElement(\"button\");\n var deleteBtnNode = document.createTextNode(\"x\");\n deleteBtn.appendChild(deleteBtnNode);\n createItems.appendChild(deleteBtn);\n\n function deleteItem() {\n createItems.classList.add(\"deleteItem\");\n }\n deleteBtn.addEventListener(\"click\", deleteItem);\n }", "function addFormationForm($formation, $newLinkLiFormation) {\n \n //contenu du data attribute prototype qui contient le HTML d'un champ\n var newFormFormation = $formation.data('prototype');\n //le nombre de champs déjà présents dans la collection\n var index = $formation.data('index');\n //on remplace l'emplacement prévu pour l'id d'un champ par son index dans la collection\n newFormFormation = newFormFormation.replace(/__name__/g, index);\n //on modifie le data index de la collection par le nouveau nombre d'éléments\n $formation.data('index', index+1);\n\n //on construit l'élément li avec le champ et le bouton supprimer\n var $newFormLiFormation = $('<li></li>').append(newFormFormation).append(generateDeleteButton($formation));\n //on ajoute la nouvelle li au dessus de celle qui contient le bouton \"ajouter\"\n $newLinkLiFormation.before($newFormLiFormation);\n}", "function setUpForm() {\n var button = document.getElementById(\"submitButton\");\n button.addEventListener(\"click\", addListItemFromForm);\n }", "function addToDoItem() {\n var itemText = document.getElementById(\"new-todo\").value\n newToDoItem(itemText, false)\n}", "function createSelectionForm(request, response)\r\n{\r\n\ttry\r\n\t{\r\n\t\t//CreateSselection Form\r\n\t\tselectionForm = nlapiCreateForm('Add Item',true);\r\n\r\n\t\t//Create Buttons\r\n\t\tselectionForm.addSubmitButton('Submit');\r\n\r\n\t\t//Create Fields\r\n\t\terrorLabel = selectionForm.addField('custpage_errorlabel','text', 'Error').setDefaultValue(errorText);\r\n\t\tselectionForm.getField('custpage_errorlabel').setDisplaySize(37, 10);\r\n\t\tselectionForm.getField('custpage_errorlabel').setDisplayType(errorDisplay);\r\n\r\n\t\thiddenCustomer = selectionForm.addField('custpage_hiddencustomer','integer','Customer Id').setDefaultValue(customer);\r\n\t\tselectionForm.getField('custpage_hiddencustomer').setDisplaySize(10, 10);\r\n\t\tselectionForm.getField('custpage_hiddencustomer').setDisplayType('hidden');\r\n\r\n\t\thiddencustomerBrand = selectionForm.addField('custpage_hiddencustomerbrand','integer','Customer Brand Id').setDefaultValue(custBrandParam);\r\n\t\tselectionForm.getField('custpage_hiddencustomerbrand').setDisplaySize(10, 10);\r\n\t\tselectionForm.getField('custpage_hiddencustomerbrand').setDisplayType('hidden');\r\n\r\n\t\t//Create SubList\r\n\t\titemlines = selectionForm.addSubList('custpage_sublist_itemlines', 'inlineeditor', 'Add Items', 'itemlines');\r\n\t\titemCode = itemlines.addField('custpage_custcol_item', 'text', 'Item Code').setMandatory(true);\r\n\t\titemlines.setLineItemValues(itemCode);\r\n\t\tqty = itemlines.addField('custpage_custcol_quantity', 'integer', 'Quantity').setMandatory(true);\r\n\t\titemlines.setLineItemValues(qty);\r\n\t}\r\n\tcatch(e)\r\n\t{\r\n\t\terrorHandler('createSelectionForm ', e);\r\n\t}\r\n}", "function displayForm(item) {\n clearElements();\n const formContainer = document.getElementById(\"form-container\");\n const formTemplate = extractFormTemplate();\n const form = formTemplate.getElementById(\"post-edit-form\");\n\n if (item) {\n setInputValuesWhenEditItem(formTemplate, item);\n }\n\n formContainer.append(form);\n form.onsubmit = (event) => addOrEditItem(event, item);\n}", "function pageMenusEdit( menuID, menuNome, menuType, menuRef, menuPos ) {\n\t//get objects\n\tvar hdnId = document.getElementById('hdnId');\n\t\n\tvar lblTipoItem = document.getElementById('lblTipoItem');\n\t\n\tvar edtNome = document.getElementById('edtNome');\n\tvar selTipo = document.getElementById('selTipo');\n\tvar selRef = document.getElementById('selRef');\n\tvar edtPos = document.getElementById('edtPosicao');\n\t\n\tvar btnSalvar = document.getElementById('btnSalvar');\n\t\n\t//change action name\n\tlblTipoItem.innerHTML = 'Editar item:';\n\tbtnSalvar.value = 'alterar';\n\t\n\t//add value to hidden ID\n\thdnId.value = menuID;\n\t\n\t//mark item info\n\tedtNome.value = menuNome;\n\tselTipo.selectedIndex = 1;\n\tselRef.selectedIndex = 1;\n\tedtPos.value = menuPos;\n\t\n\t//change form action\n\tvar strAction = document.frmMenus.action;\n\tstrAction = strAction.replace(\"act=1\", \"act=2\");\n\tdocument.frmMenus.action = strAction;\n\t\n\t//focus on item name\n\tedtNome.focus();\n\t\n}", "function buildMenu(items){\n let output = \"\";\n items.forEach(function(item){\n output += \"<div class='item'\" + \"onclick='saveSelection(\" + item.id + \");'>\" +\n \"<h1>\" + item.name + \"</h1>\" +\n \"<img src='img/\" + item.pic + \".jpg'/>\" +\n \"</div>\";\n });\n document.getElementById(\"menu_items\").innerHTML = output;\n}", "function addNewFormReveal(form_name) {\r\n\t$('#new-'+form_name).html('<span style=\"margin-left:25px;font-weight:bold;\">'+langNewInstName+'</span>&nbsp; '\r\n\t\t+ '<input type=\"text\" class=\"x-form-text x-form-field\" id=\"new_form-'+form_name+'\"> '\r\n\t\t+ '<input type=\"button\" value=\"'+langCreate+'\" style=\"font-size:11px;\" onclick=\\'addNewForm(\"'+form_name+'\")\\'>'\r\n\t\t+ '<span style=\"padding-left:10px;\"><a href=\"javascript:;\" style=\"font-size:10px;text-decoration:underline;\" onclick=\"showAddForm()\">'+langCancel+'</a></span>');\r\n\tsetCaretToEnd(document.getElementById('new_form-'+form_name));\r\n}", "function createNewSection() {\n let fullMenu = [starters, oysters, clams, dinners, sides]\n fullMenu.forEach(menuItems => {\n let newMenuSection = new menuSection(menuItems.header, menuItems.subheader)\n let parent = newMenuSection.createSubheader()\n menuItems.items.forEach(part => {\n let newSection = new menuItem(parent, part.item, part.description, part.price, part.id)\n newSection.createItem()\n })\n })\n}", "function makeCategory() {\n var pageForms = document.getElementsByTagName(\"form\"), // pageForms is an array of all the form tags\n selectLi = $(\"select\"),\n makeSelect = document.createElement(\"select\");\n\n makeSelect.setAttribute(\"id\", \"Title\");\n for (var i = 0; i < titleList.length; i++){\n var makeOption = document.createElement(\"option\");\n var optText = titleList[i];\n makeOption.setAttribute(\"value\", optText);\n makeOption.innerHTML = optText;\n makeSelect.appendChild(makeOption);\n }\n selectLi.appendChild(makeSelect);\n }", "function newItem () {\n let userItem = document.getElementsByClassName(\"itemInput\");\n let li = document.createElement('li');\n li.innerHTML = userItem[0].value + \" \"; // or you can try this\n document.body.appendChild(li);\n let iconTag = document.createElement('i');\n iconTag.setAttribute('class', \"fa fa-trash fa-1x\");\n iconTag.setAttribute('aria-hidden', \"true\");\n li.appendChild(iconTag);\n console.log(li);\n iconTag.addEventListener('click', function() { //This format makes it easier to addEvent listeners to the icons like this! << // Execute whatever you need to do depending on icon -\n document.body.removeChild(li);//for example we used trash can here, meaning delete, process delete here.\n });\n clearText();\n}", "function createElement() {\n\tvar li = document.createElement(\"li\");\n\t\tli.appendChild(document.createTextNode(input.value));\n\t\t\tui.appendChild(li);\n\t\t\tinput.value = \"\";\n\n\t// Create delete button for each new list item\n\tvar btn = document.createElement(\"button\");\n\t\t\tbtn.appendChild(document.createTextNode(\"Delete\"));\n\t\t\tli.appendChild(btn);\n\t\t\tbtn.onclick = removeParent;\n}", "function addItem(e) {\r\n e.preventDefault();\r\n //Get input value\r\n var newItem = item.value;\r\n //Create new li \r\n var li = document.createElement('li');\r\n //add class to li element\r\n li.className = 'list-group-item';\r\n //create new button\r\n var deleteBtn = document.createElement('button');\r\n //add class to button\r\n deleteBtn.className = 'btn btn-danger btn-sm float-right delete';\r\n //add text node to li with the item value\r\n li.appendChild(document.createTextNode(newItem));\r\n //add text to the deleteBtn\r\n deleteBtn.appendChild(document.createTextNode('X'));\r\n // append delete button to li;\r\n li.appendChild(deleteBtn);\r\n itemList.appendChild(li);\r\n\r\n}", "function addItem(item, container) {\n var option = $(item).text(),\n key = $(item).val(),\n isDisabled = $(item).is(':disabled');\n\n if (!isDisabled && !$(item).parents().is(':disabled')) {\n //add first letter of each word to array\n keys.push(option.charAt(0).toLowerCase());\n }\n container.append($('<li><a'+(isDisabled ? ' class=\"newListItemDisabled\"' : '')+' href=\"JavaScript:void(0);\">'+option+'</a></li>').data({\n 'key' : key,\n 'selected' : $(item).is(':selected')\n }));\n }", "function addGoal()\n{\n const enteredGoal = inputGoalEl.value ;\n const enteredGoalDesc = inputDescEl.value ;\n\n if( enteredGoal.length > 0 )\n {\n const enteredGoalStrong = document.createElement('strong')\n enteredGoalStrong.textContent = enteredGoal\n\n var attribId = \"goalItem\"\n attribId = attribId.concat( listEl.childElementCount+1 ) \n\n const buttonDeleteItem = document.createElement('input')\n buttonDeleteItem.setAttribute('onclick', 'removeItem(\"' + attribId + '\")')\n buttonDeleteItem.setAttribute('type', 'button')\n buttonDeleteItem.setAttribute('style', 'margin-top: 8px')\n \n buttonDeleteItem.value = \"Delete\"\n\n const lineBreak = document.createElement('br')\n const listItem = document.createElement('li');\n listItem.setAttribute('id', attribId)\n\n listItem.appendChild(enteredGoalStrong)\n listItem.append(lineBreak)\n listItem.append(enteredGoalDesc)\n listItem.append(buttonDeleteItem)\n \n listEl.appendChild(listItem)\n }\n else\n {\n alert(\"Title cannot be empty\")\n }\n\n // Reset values in form\n inputGoalEl.value = ''\n inputDescEl.value = ''\n}", "onNewItem(item, type) {\n const { items, itemMaps } = this.state;\n\n items[type].push(item);\n Form.updateItemMap(type, itemMaps[type], items[type].length - 1,\n item.r, item.c, item.h, item.w);\n\n this.setState({\n items, itemMaps,\n });\n }", "function createPage(){\nvar header = document.createElement('h3');\nheader.innerText = \"Shopping List\";\ndocument.body.appendChild(header);\ncreateForm();\npopulateList();\n}", "function createMenuItem(name, price, category) {\n\treturn {name, price, category};\n}", "render() { \n return (\n <div class=\"FrontBackground\">\n\n <header>\n <form id=\"FormType\" onSubmit={this.InsertItem}>\n <input type =\"text\" placeholder =\"Type you want\"\n value= {this.state.currentItem.text}\n onChange ={this.ManageInput}\n />\n <button type=\"submit\">Insert</button>\n </form>\n\n \n </header>\n <ListItems items={this.state.items}\n RemoveItem = {this.RemoveItem} \n Edititem = { this.Edititem }></ListItems>\n </div>\n );\n }", "function getInput(level) {\n var currentID = inputArea + \".\" + inputList + \".\" + inputItem + \".\" + inputThing;\n var selectedItem = document.getElementById(level).value;\n var previewArea = document.getElementById('preview');\n var aTag = document.createElement('a');\n aTag.setAttribute('href', '#');\n aTag.setAttribute('value', selectedItem);\n aTag.setAttribute('onclick', 'buttons(\"' + currentID + '\",\"' + level + '\")');\n aTag.setAttribute('id', currentID);\n aTag.setAttribute('class', level);\n var selectedItemText = document.createTextNode(selectedItem);\n aTag.appendChild(selectedItemText);\n previewArea.appendChild(aTag);\n // <br> to help with tree building\n var br = document.createElement('br');\n br.setAttribute('id', 'br' + currentID)\n previewArea.appendChild(br);\n}", "addMenuItem(menuItem){\r\n\r\n }", "function addItem(e) {\n e.preventDefault();\n\n // get input value\n var newItem = document.getElementById('item').value;\n\n // create new li element\n var li = document.createElement('li');\n // create css selector for li\n li.className = 'list-group-item';\n\n //add text node with input value\n li.appendChild(document.createTextNode(newItem));\n\n // create delete button element\n deleteBtn = document.createElement('button');\n\n // create class selectors for the button created above\n deleteBtn.className = '\"btn btn-danger btn-sm float-right delete';\n // create 'X' text and add it inside the button\n deleteBtn.appendChild(document.createTextNode('X'));\n\n // now that button creation is complete, add it inside the li\n li.appendChild(deleteBtn);\n \n // add bran new li with its content inside the ul, at the end of it\n itemList.appendChild(li); \n \n // select element and hide it\n var hideTitle = document.getElementById('first-title');\n hideTitle.style.display = 'none';\n\n // select element and display it\n document.getElementById('my-list').style.display = 'block';\n}", "function crearFormulario() {\n\t// se crea un elemnto div, se le colocan clases, y se agrega antes del boton de Añaidr Lista\n\t//este elemento es de color azul y tiene un input y un boton\n\tvar formulario = document.createElement('div');\n\tformulario.setAttribute(\"class\",\"forma arriba\");\n\tboton.parentNode.insertBefore(formulario, boton);\n\t//se crea un input para escribir el nombre de la nueva lista y se agrega como hijo del div que se creo arriba, tiene focus para poder esccribir directamente en el \n\tvar nombre = document.createElement('input');\n\tnombre.setAttribute(\"type\",\"text\");\n\tnombre.setAttribute(\"placeholder\",\"Nombre de la lista\");\n\tformulario.appendChild(nombre);\n\tnombre.focus();\n\n\tvar agregar = document.createElement('button');\n\tagregar.innerHTML = \"Aceptar\";\n\tagregar.setAttribute(\"class\",\"amarillo blanco\");\n\tagregar.setAttribute(\"type\",\"submit\");\t\n\tformulario.appendChild(agregar);\n\n\tcrearCierre(formulario);\n\tcrearLista(nombre,formulario);\n\tcerrarCuadro(formulario,boton);\n}", "function createMenu(app) {\n const { commands } = app;\n let menu = new widgets_1.Menu({ commands });\n menu.title.label = 'BookMark';\n exports.BookMarks.forEach(item => menu.addItem({ command: `BookMark-${item.name}:show` }));\n return menu;\n }", "function createListElement() {\n\tvar li = document.createElement(\"li\"); // create an li\n\tli.appendChild(document.createTextNode(input.value)); //append a child with the value of input\n\tassignDoneToggle(li); // assign an event listener \n\tul.appendChild(li); // append the li to the ul\n\taddDeleteButton(li); //item has delete button\n\tinput.value = \"\"; // reset the input field to empty\n\n}", "function addItem() {\n let text = $('#newItemText').val();\n let value = $('#newItemValue').val();\n let menu = $('#menu');\n menu.append($(\"<option></option>\")\n .attr(\"value\", value)\n .text(text));\n $('#newItemText').val('');\n $('#newItemValue').val('');\n\n}", "function addMarkerFormToList($list){\n\n var $item = $('<div class=\"item\">');\n var $icon = $('<i class=\"map marker icon\">').appendTo($item);\n var $content = $('<div class=\"content\">').appendTo($item);\n var $form = $('<form class=\"ui form\">').appendTo($content);\n var $title = $('<input type=\"text\" name=\"title\" placeholder=\"Pin Title\">').appendTo($form);\n var $description = $('<input type=\"text\" name=\"description\" placeholder=\"Description\">').appendTo($form);\n var $add = $('<button class=\"ui button\" type=\"submit\">Add</button>').appendTo($form);\n\n $item.prependTo($list);\n $title.focus();\n\n return $form;\n\n }", "function makeMenu(menuItem){\r\n\t\tvar menuLi = document.createElement(\"li\");\r\n\t\tmenuLi.className = \"menuItem\";\r\n\t\tmenuLi.id = menuItem.id;\r\n\t\tvar divMenuItem = document.createElement(\"div\");\r\n\t\t//TODO:mc_\r\n\t\tdivMenuItem.id = \"mc_\" + menuItem.id;\r\n\t\r\n\t\tvar divMenuIcon = document.createElement(\"div\");\r\n\t\t//TODO:mi_\r\n\t\tdivMenuIcon.id = \"mi_\" + menuItem.id;\r\n\t\tdivMenuIcon.className = \"menuItemIcon_blank\";\r\n\t\t\r\n\t\tdivMenuItem.appendChild(divMenuIcon);\r\n\t\t\r\n\t\tvar title = menuItem.directoryTitle || menuItem.title;\r\n\t\tvar divMenuTitle = document.createElement(\"div\");\r\n\t\tdivMenuTitle.id = \"m_\" + menuItem.id;\r\n\t\tif (menuItem.href && !menuItem.linkDisabled) {\r\n\t\t\tvar aTag = document.createElement('a');\r\n\t\t\taTag.appendChild(document.createTextNode(title));\r\n\t\t\tif(/^javascript:/i.test( menuItem.href )){\r\n\t\t\t\taTag.removeAttribute('href');\r\n\t\t\t\taTag.className = 'scriptlink';\r\n\t\t\t\tvar aTagOnClick = function(e) {\r\n\t\t\t\t\teval( menuItem.href );\r\n\t\t\t\t}\r\n\t\t\t\tIS_Event.observe(aTag, \"click\", aTagOnClick, false, \"_menu\");\r\n\t\t\t\tIS_Event.observe(aTag, \"mouseover\", function(){this.className = 'scriptlinkhover';}.bind(aTag), false, \"_menu\");\r\n\t\t\t\tIS_Event.observe(aTag, \"mouseout\", function(){this.className = 'scriptlink';}.bind(aTag), false, \"_menu\");\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\taTag.href = menuItem.href;\r\n\t\t\t\tif(menuItem.display == \"self\") {\r\n\t\t\t\t\taTag.target = \"_self\";\r\n\t\t\t\t} else if(menuItem.display == \"newwindow\"){\r\n\t\t\t\t\taTag.target = \"_blank\";\r\n\t\t\t\t} else {\r\n\t\t\t\tif(menuItem.display == \"inline\")\r\n\t\t\t\t\taTag.target=\"ifrm\";\r\n\t\t\t\t\tvar aTagOnClick = function(e) {\r\n\t\t\t\t\t\tIS_Portal.buildIFrame(aTag);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tIS_Event.observe(aTag, \"click\", aTagOnClick, false, \"_menu\");\r\n\t\t\t\t}\r\n\t\t\t\tIS_Event.observe(aTag, \"mousedown\", function(e){Event.stop(e);}, false, \"_menu\");\r\n\t\t\t}\r\n\t\t\tdivMenuTitle.appendChild(aTag);\r\n\t\t}else{\r\n\t\t\tdivMenuTitle.appendChild(document.createTextNode(title));\r\n\t\t}\r\n\t\tdivMenuTitle.className = \"menuTitle\";\r\n\t\t\r\n\t\tdivMenuItem.appendChild(divMenuTitle);\r\n\t\t\r\n\t\tif ( menuItem.type ){\r\n//\t\t\tvar handler = IS_SiteAggregationMenu.menuDragInit(menuItem, divMenuIcon, divMenuItem);\r\n\t\t\tvar handler = IS_SiteAggregationMenu.getDraggable(menuItem, divMenuIcon, divMenuItem);\r\n\r\n\t\t\tIS_Event.observe(menuLi, \"mousedown\", function(e){\r\n\t\t\t\tEvent.stop(e);\r\n\t\t\t}, false, \"_menu\");\t\r\n\r\n\t\t\tvar returnToMenuFunc = IS_SiteAggregationMenu.getReturnToMenuFuncHandler( divMenuIcon, menuItem.id, handler );\r\n\t\t\tvar displayTabName = IS_SiteAggregationMenu.getDisplayTabNameHandler( divMenuIcon, menuItem.id, handler, returnToMenuFunc, \"_menu\" );\r\n\t\t\t\r\n\t\t\tdivMenuIcon.className = \"menuItemIcon\";\r\n\t\t\tmenuLi.style.cursor = \"move\";\r\n\t\t\tIS_Widget.setIcon(divMenuIcon, menuItem.type, {multi:menuItem.multi});\r\n\t\t\t\r\n\t\t\tif(IS_Portal.isChecked(menuItem) && !/true/.test(menuItem.multi)){\r\n\t\t\t\thandler.destroy();\r\n\t\t\t\tElement.addClassName(divMenuIcon, 'menuItemIcon_dropped');\r\n\t\t\t\tIS_Event.observe(divMenuIcon, 'mouseover', displayTabName, false, \"_menu\");\r\n\t\t\t\tmenuLi.style.cursor = \"default\";\r\n\t\t\t}\r\n\r\n\t\t\t//The time of 200 to 300millsec is lost because addListener execute new Array\r\n\t\t\tfunction getPostDragHandler(menuItemId, handler){\r\n\t\t\t\treturn function(){ postDragHandler(menuItemId, handler);};\r\n\t\t\t}\r\n\t\t\tfunction postDragHandler(menuItemId, handler){\r\n\t\t\t\t//fix 209 The widget can not be dropped to a tab sometimes if it is allowed to be dropped plurally.\r\n\t\t\t\tif( /true/i.test( menuItem.multi ) )\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\r\n\t\t\t\ttry{\r\n//\t\t\t\t\tEvent.stopObserving(menuLi, \"mousedown\", handler, false);\r\n\t\t\t\t\thandler.destroy();\r\n\t\t\t\t\t\r\n\t\t\t\t\tElement.addClassName(divMenuIcon, 'menuItemIcon_dropped');\r\n\t\t\t\t\t\r\n\t\t\t\t\t$(\"mc_\" + menuItemId).parentNode.style.background = \"#F6F6F6\";\r\n\t\t\t\t\t//$(\"m_\" + menuItemId).style.color = \"#5286bb\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tIS_Event.observe(divMenuIcon, 'mouseover', displayTabName, false, \"_menu\");\r\n\t\t\t\t}catch(e){\r\n\t\t\t\t\tmsg.debug(IS_R.getResource(IS_R.ms_menuIconException,[menuItemId,e]));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmenuLi.style.cursor = \"default\";\r\n\t\t\t}\r\n\t\t\tIS_EventDispatcher.addListener('dropWidget', menuItem.id, getPostDragHandler(menuItem.id,handler), true);\r\n\t\t\tif( menuItem.properties && menuItem.properties.url ) {\r\n\t\t\t\tvar url = menuItem.properties.url;\r\n\t\t\t\tIS_EventDispatcher.addListener( IS_Widget.DROP_URL,url,( function( menuItem,handler ) {\r\n\t\t\t\t\t\treturn function( widget ) {\r\n\t\t\t\t\t\t\tif( !IS_Portal.isMenuType( widget,menuItem )) return;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpostDragHandler(menuItem.id, handler);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})( menuItem,handler ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfunction getCloseWidgetHandler(menuItemId, handler){\r\n\t\t\t\treturn function(){ closeWidgetHandler(menuItemId, handler);};\r\n\t\t\t}\r\n\t\t\tfunction closeWidgetHandler(menuItemId, handler){\r\n\t\t\t\ttry{\r\n//\t\t\t\t\tIS_Event.observe(menuLi, \"mousedown\", handler, false, \"_menu\");\r\n\t\t\t\t\tEvent.observe(handler.handle, \"mousedown\", handler.eventMouseDown);\r\n\t\t\t\t\tIS_Draggables.register(handler);\r\n\t\t\t\t\t\r\n\t\t\t\t\tElement.removeClassName(divMenuIcon, 'menuItemIcon_dropped');\r\n\t\t\t\t\t\r\n//\t\t\t\t\tdivMenuIcon.className = (/MultiRssReader/.test(menuItem.type))? \"menuItemIcon_multi_rss\" : \"menuItemIcon_rss\";\r\n\t\t\t\t\tmenuLi.style.cursor = \"move\"\r\n\t\t\t\t\t\r\n\t\t\t\t\tdivMenuIcon.title = \"\";\r\n\t\t\t\t\tIS_Event.stopObserving(divMenuIcon, 'mouseover', displayTabName, false, \"_menu\");\r\n\t\t\t\t}catch(e){\r\n\t\t\t\t\tmsg.debug(IS_R.getResource(IS_R.ms_menuIconException,[menuItemId,e]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tIS_EventDispatcher.addListener('closeWidget', menuItem.id, getCloseWidgetHandler(menuItem.id, handler), true);\r\n\t\t\tif( menuItem.properties && menuItem.properties.url ) {\r\n\t\t\t\tvar url = menuItem.properties.url;\r\n\t\t\t\tIS_EventDispatcher.addListener( IS_Widget.CLOSE_URL,url,( function( menuItem,handler ) {\r\n\t\t\t\t\t\treturn function( widget ) {\r\n\t\t\t\t\t\t\tif( !IS_Portal.isMenuType( widget,menuItem )) return;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcloseWidgetHandler(menuItem.id, handler);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})( menuItem,handler ) );\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif ( IS_SiteAggregationMenu.menuItemTreeMap[menuItem.id] && IS_SiteAggregationMenu.menuItemTreeMap[menuItem.id].length > 0) {\r\n\t\t\tvar divSubMenuIcon = document.createElement(\"div\");\r\n\t\t\tdivSubMenuIcon.className = \"subMenuIcon\";\r\n\t\t\tdivMenuItem.appendChild(divSubMenuIcon);\r\n\t\t}\r\n\t\r\n\t\tmenuLi.appendChild(divMenuItem);\r\n\t\tIS_Event.observe(menuLi,\"mouseout\", getMenuItemMOutHandler(menuLi), false, \"_menu\");\r\n\t\tIS_Event.observe(menuLi,\"mouseover\", getMenuItemMoverFor(menuLi, menuItem), false, \"_menu\");\r\n\t\treturn menuLi;\r\n\t}", "function addNewLiOnClick() {\n document.querySelector('form').addEventListener('click', function(event){\n addNewElementAsLi();\n input.value = \"\";\n });\n}", "function makeItemLinks(key, linksLi){\n\t\tvar editLink = document.createElement('a');\n\t\teditLink.href = \"#custform\"; // shows up sometimes, then it doesn't?\n\t\teditLink.key = key;\n\t\tvar editText = \"Edit Contact\";\n\t\teditLink.addEventListener(\"click\", editItem);\n\t\teditLink.innerHTML = editText;\n\t\tlinksLi.appendChild(editLink);\n\t\t\n\t\t// appends line break to local storage between edit and delete\n\t\tvar breakTag = document.createElement('br');\n\t\tlinksLi.appendChild(breakTag);\n\n\t\t// delete \n\t\tvar deleteLink = document.createElement('a');\n\t\tdeleteLink.href = \"#\";\n\t\tdeleteLink.key = key;\n\t\tvar deleteText = \"Delete Contact\";\n\t\tdeleteLink.addEventListener(\"click\", deleteItem);\n\t\tdeleteLink.innerHTML = deleteText;\n\t\tlinksLi.appendChild(deleteLink);\n\t}", "function menuItemCreate(menuItem) {\n const itemId = menuItem.id\n menuItem.options.click = function(menuItem) {\n client.write(itemId, consts.eventNames.menuItemEventClicked, {menuItemOptions: menuItemToJSON(menuItem)})\n }\n if (typeof menuItem.submenu !== \"undefined\") {\n menuItem.options.type = 'submenu'\n menuItem.options.submenu = menuCreate(menuItem.submenu)\n }\n elements[itemId] = new MenuItem(menuItem.options)\n return elements[itemId]\n}", "function NewEntryForm() {\n $(\"#addCancel\").click(this.clearForm);\n $(\"#addButton\").click(this.submitForm);\n }", "function createMenu(){\n\t\n\t\n\t//add menu items by section names\n\tfor(const section of sectionsList){\n\t\t// Create a <li> \n\t\tlet listItem = document.createElement(\"li\"); \n\t\t// Create a <a> \n\t\tlet address = document.createElement(\"a\");\n\t\t//set address location\n\t\taddress.setAttribute(\"href\",\"#\"+section.getAttribute('id')); // Scroll to section on link click\n\t\t//set address showing name\n\t\taddress.textContent = section.getAttribute('data-nav');\n\t\t//add to the list item\n\t\tlistItem.appendChild(address);\n\t\t//add to the menu\n\t\tmyMenu.appendChild(listItem);\n\t}\n}", "function createListElement(){\r\n//The item element consists of\r\n\tconst line = document.createElement(\"div\");\r\n\tline.setAttribute(\"class\", \"listElement\");\r\n//a checkbox\r\n\tconst check = document.createElement(\"input\");\r\n\tcheck.type = \"checkbox\";\r\n\tcheck.setAttribute(\"onchange\", \"itemCheck(this)\");\r\n//name of an item\r\n\tconst myItem = document.createElement(\"div\");\r\n\tmyItem.setAttribute(\"class\",\"itemName\") \r\n\tmyItem.innerHTML = item.value;\r\n//and a \"delete\" button. \r\n\tconst deleteButton = document.createElement(\"button\");\r\n\tdeleteButton.setAttribute(\"onclick\", \"deleteListElement(this)\");\r\n\tdeleteButton.setAttribute(\"class\", \"del\");\r\n\tdeleteButton.innerHTML = \"X\";\r\n\r\n//The item can not be added if inputbox is empty \r\n//because of checking function on \"add\" button\r\n\t\r\n\tlistBox.appendChild(line);\r\n\r\n\tline.appendChild(check);\r\n\r\n\tline.appendChild(myItem);\r\n\r\n\tline.appendChild(deleteButton);\r\n\t\r\n}", "function addQuizQuestionForm(event) {\n var jListItem = GeoMarkup.QuizMarkup.GetQuestionsListItem();\n\n var id = quiz.GetNextAvailableQuestionId();\n quiz.AddQuestion(new Question(\"\", id));\n\n //set the id of the created question to the list item\n jListItem.attr(\"data-id\", id);\n $(\".closeQuestionForm\", jListItem).click(hideAndRemoveQuizQuestion);\n\n $(\".questionFormAnswers\", jListItem).click(showQuestionAnswersForm);\n\n jQuestionsList.append(jListItem);\n jListItem.slideDown(animationTime);\n event.stopPropagation();\n\n }", "function formActoresDirectores(tipo,rol){\n\t//Selecciona la zona debajo del menu horizontal de edicion y la oculta\n\tvar contenidoCentral = document.getElementById(\"contenidoCentral\");\n\tcontenidoCentral.setAttribute(\"class\",\"d-none\");\n\t//Selecciona la zona para poner los formularios\n\tvar contenidoFormularios = document.getElementById(\"contenidoFormularios\");\n\tcontenidoFormularios.setAttribute(\"class\",\"d-block\");\n\t//QUITA TODO EL CONTENIDO PREVIO POR SI HAY OTROS FORMULARIOS\n\twhile (contenidoFormularios.firstChild) {\n\t\tcontenidoFormularios.removeChild(contenidoFormularios.firstChild);\n\t}\n\t\t\n\tif (tipo == \"add\") {\n\t\tvar formulario = document.createElement(\"form\");\n\t\tformulario.setAttribute(\"name\",\"addActorDirector\");\n\t\tformulario.setAttribute(\"action\",\"\");\n\t\tformulario.setAttribute(\"onsubmit\",\"validarActoresDirectores('\"+rol+\"'); return false\");\n\t\tformulario.setAttribute(\"method\",\"post\");\n\t\tvar leyenda = document.createElement(\"legend\");\n\t\tleyenda.appendChild(document.createTextNode(\"Añadir \"+rol+\"\"));\n\t\t//NOMBRE DEL ACTOR/DIRECTOR\n\t\tvar grupo1 = document.createElement(\"div\");\n\t\tgrupo1.setAttribute(\"class\",\"form-group\");\n\t\tvar labelName = document.createElement(\"label\");\n\t\tlabelName.setAttribute(\"for\",\"nombreActor\");\n\t\tlabelName.appendChild(document.createTextNode(\"Nombre*\"));\n\t\tvar inputName = document.createElement(\"input\");\n\t\tinputName.setAttribute(\"type\",\"text\");\n\t\tinputName.setAttribute(\"class\",\"form-control\");\n\t\tinputName.setAttribute(\"id\",\"nombreActor\");\n\t\tinputName.setAttribute(\"onblur\",\"validarCampoTexto(this)\");\n\t\tinputName.setAttribute(\"placeholder\",\"Nombre\");\n\t\tvar malName = document.createElement(\"small\");\n\t\tmalName.setAttribute(\"class\",\"form-text text-muted\");\n\t\tmalName.setAttribute(\"id\",\"nombreMal\");\n\t\t//APELLIDO1 DEL ACTOR/DIRECTOR\n\t\tvar grupo2 = document.createElement(\"div\");\n\t\tgrupo2.setAttribute(\"class\",\"form-group\");\n\t\tvar labelLastName1 = document.createElement(\"label\");\n\t\tlabelLastName1.setAttribute(\"for\",\"lastName1\");\n\t\tlabelLastName1.appendChild(document.createTextNode(\"Primer apellido*\"));\n\t\tvar inputLastName1 = document.createElement(\"input\");\n\t\tinputLastName1.setAttribute(\"type\",\"text\");\n\t\tinputLastName1.setAttribute(\"class\",\"form-control\");\n\t\tinputLastName1.setAttribute(\"id\",\"lastName1\");\n\t\tinputLastName1.setAttribute(\"onblur\",\"validarCampoTexto(this)\");\n\t\tinputLastName1.setAttribute(\"placeholder\",\"Primer apellido\");\n\t\tvar malLastName1 = document.createElement(\"small\");\n\t\tmalLastName1.setAttribute(\"class\",\"form-text text-muted\");\n\t\tmalLastName1.setAttribute(\"id\",\"lastName1Mal\");\n\t\t//APELLIDO2 DEL ACTOR/DIRECTOR\n\t\tvar grupo3 = document.createElement(\"div\");\n\t\tgrupo3.setAttribute(\"class\",\"form-group\");\n\t\tvar labelLastName2 = document.createElement(\"label\");\n\t\tlabelLastName2.setAttribute(\"for\",\"lastName2\");\n\t\tlabelLastName2.appendChild(document.createTextNode(\"Segundo apellido\"));\n\t\tvar inputLastName2 = document.createElement(\"input\");\n\t\tinputLastName2.setAttribute(\"type\",\"text\");\n\t\tinputLastName2.setAttribute(\"class\",\"form-control\");\n\t\tinputLastName2.setAttribute(\"id\",\"lastName2\");\n\t\tinputLastName2.setAttribute(\"onblur\",\"validarCampoTexto(this)\");\n\t\tinputLastName2.setAttribute(\"placeholder\",\"Segundo apellido\");\n\t\tvar malLastName2 = document.createElement(\"small\");\n\t\tmalLastName2.setAttribute(\"class\",\"form-text text-muted\");\n\t\tmalLastName2.setAttribute(\"id\",\"lastName2Mal\");\n\t\t//FECHA DE NACIMIENTO DEL ACTOR/DIRECTOR\n\t\tvar grupo4 = document.createElement(\"div\");\n\t\tgrupo4.setAttribute(\"class\",\"form-group\");\n\t\tvar labelBorn = document.createElement(\"label\");\n\t\tlabelBorn.setAttribute(\"for\",\"born\");\n\t\tlabelBorn.appendChild(document.createTextNode(\"Fecha de nacimiento*\"));\n\t\tvar inputBorn = document.createElement(\"input\");\n\t\tinputBorn.setAttribute(\"type\",\"text\");\n\t\tinputBorn.setAttribute(\"class\",\"form-control\");\n\t\tinputBorn.setAttribute(\"id\",\"born\");\n\t\tinputBorn.setAttribute(\"onblur\",\"validarCampoFecha(this)\");\n\t\tinputBorn.setAttribute(\"placeholder\",\"DD/MM/AAAA\");\n\t\tvar malBorn = document.createElement(\"small\");\n\t\tmalBorn.setAttribute(\"class\",\"form-text text-muted\");\n\t\tmalBorn.setAttribute(\"id\",\"bornMal\");\n\t\t//IMAGEN DEL ACTOR/DIRECTOR\n\t\tvar grupo5 = document.createElement(\"div\");\n\t\tgrupo5.setAttribute(\"class\",\"form-group\");\n\t\tvar labelPicture = document.createElement(\"label\");\n\t\tlabelPicture.setAttribute(\"for\",\"picture\");\n\t\tlabelPicture.appendChild(document.createTextNode(\"Ruta de la imagen\"));\n\t\tvar inputPicture = document.createElement(\"input\");\n\t\tinputPicture.setAttribute(\"type\",\"text\");\n\t\tinputPicture.setAttribute(\"class\",\"form-control\");\n\t\tinputPicture.setAttribute(\"id\",\"picture\");\n\t\tinputPicture.setAttribute(\"onblur\",\"validarCampoRuta(this)\");\n\t\tinputPicture.setAttribute(\"placeholder\",\"X://xxxxxx/xxxx\");\n\t\tvar malPicture = document.createElement(\"small\");\n\t\tmalPicture.setAttribute(\"class\",\"form-text text-muted\");\n\t\tmalPicture.setAttribute(\"id\",\"pictureMal\");\n\t\t//BOTONES DEL FORMULARIO\n\t\tvar grupoBtn = document.createElement(\"div\");\n\t\tgrupoBtn.setAttribute(\"class\",\"form-group d-flex justify-content-around\");\n\t\tvar aceptar = document.createElement(\"button\");\n\t\taceptar.setAttribute(\"type\",\"submit\");\n\t\taceptar.setAttribute(\"class\",\"btn btn-primary \");\n\t\taceptar.appendChild(document.createTextNode(\"Guardar\"));\n\t\tvar cancelar = document.createElement(\"button\");\n\t\tcancelar.setAttribute(\"type\",\"button\");\n\t\tcancelar.setAttribute(\"class\",\"btn btn-primary\");\n\t\tcancelar.appendChild(document.createTextNode(\"Cancelar\"));\n\t\t\t\n\t\t//Añade eventos al hacer click sobre los botones del formulario creado\n\t\tcancelar.addEventListener(\"click\", showHomePage);\n\t\tcancelar.addEventListener(\"click\", function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontenidoCentral.setAttribute(\"class\",\"d-block\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontenidoFormularios.setAttribute(\"class\",\"d-none\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t//Crea el formulario\n\t\tgrupo1.appendChild(labelName);\n\t\tgrupo1.appendChild(inputName);\n\t\tgrupo1.appendChild(malName);\n\t\tgrupo2.appendChild(labelLastName1);\n\t\tgrupo2.appendChild(inputLastName1);\n\t\tgrupo2.appendChild(malLastName1);\n\t\tgrupo3.appendChild(labelLastName2);\n\t\tgrupo3.appendChild(inputLastName2);\n\t\tgrupo3.appendChild(malLastName2);\n\t\tgrupo4.appendChild(labelBorn);\n\t\tgrupo4.appendChild(inputBorn);\n\t\tgrupo4.appendChild(malBorn);\n\t\tgrupo5.appendChild(labelPicture);\n\t\tgrupo5.appendChild(inputPicture);\n\t\tgrupo5.appendChild(malPicture);\n\t\tgrupoBtn.appendChild(aceptar);\n\t\tgrupoBtn.appendChild(cancelar);\n\t\tformulario.appendChild(leyenda);\n\t\tformulario.appendChild(grupo1);\n\t\tformulario.appendChild(grupo2);\n\t\tformulario.appendChild(grupo3);\n\t\tformulario.appendChild(grupo4);\n\t\tformulario.appendChild(grupo5);\n\t\tformulario.appendChild(grupoBtn);\n\t\tcontenidoFormularios.appendChild(formulario);\n\t\t/* FIN DEL FORMULARIO DE AÑADIR ACTOR/DIRECTOR */\n\t}else if (tipo == \"delete\") {\n\t\tvar formulario = document.createElement(\"form\");\n\t\tformulario.setAttribute(\"name\",\"deleteActorDirector\");\n\t\tformulario.setAttribute(\"action\",\"\");\n\t\tformulario.setAttribute(\"onsubmit\",\"return false\");\n\t\tformulario.setAttribute(\"method\",\"post\");\n\t\tvar leyenda = document.createElement(\"legend\");\n\t\tvar grupo = document.createElement(\"div\");\n\t\tgrupo.setAttribute(\"class\",\"form-group\");\n\t\tleyenda.appendChild(document.createTextNode(\"Eliminar \"+rol+\"\"));\n\t\tvar label = document.createElement(\"label\");\n\t\tlabel.setAttribute(\"for\",\"person\");\n\t\tlabel.appendChild(document.createTextNode(\"Nombre del \"+rol+\"\"));\n\t\t//SE CREA EL BUSCADOR \n\t\tvar buscador = document.createElement(\"input\");\n\t\tbuscador.setAttribute(\"class\",\"form-control mb-3\");\n\t\tbuscador.setAttribute(\"type\",\"text\");\n\t\tbuscador.setAttribute(\"id\",\"buscador\");\n\t\tbuscador.setAttribute(\"placeholder\",\"Buscar...\");\n\t\t//SE CREA LA TABLA DE LOS ACTORES O DIRECTORES\n\t\tvar tabla = document.createElement(\"table\");\n\t\ttabla.setAttribute(\"class\",\"table table-bordered\");\n\t\ttabla.setAttribute(\"name\",\"person\");\n\t\ttabla.setAttribute(\"id\",\"person\");\n\t\tvar thead = document.createElement(\"thead\");\n\t\tvar tr = document.createElement(\"tr\");\n\t\tvar thVacio = document.createElement(\"th\");\n\t\tvar ocultar = document.createElement(\"button\");\n\t\tocultar.setAttribute(\"type\",\"button\");\n\t\tocultar.setAttribute(\"class\",\"btn btn-secondary\");\n\t\tocultar.appendChild(document.createTextNode(\"Mostrar/Ocultar\"));\n\t\tocultar.addEventListener(\"click\", function(){\n\t\t\tvar cont = document.getElementById(\"tablaPersonas\");\n\t\t\tif(cont.style.display==\"table-row-group\"){\n\t\t\t\tcont.style.display = \"none\";\n\t\t\t}else{\n\t\t\t\tcont.style.display = \"table-row-group\";\n\t\t\t}\n\t\t});\n\t\tthVacio.appendChild(ocultar);\n\t\tvar thNombre = document.createElement(\"th\");\n\t\tthNombre.appendChild(document.createTextNode(\"Nombre completo\"));\n\t\tvar tbody = document.createElement(\"tbody\");\n\t\ttbody.setAttribute(\"id\",\"tablaPersonas\");\n\t\tvar base = \"\";\n\t\tif (rol == \"Actor\") {\n\t\t\tbase = \"actores\";\n\t\t}else{\n\t\t\tbase = \"directores\";\n\t\t}\n\t\t//Abre la conexion con la base de datos categorias\n\t\tvar request = indexedDB.open(nombreDB);\n\t\t//Si ha salido bien\n\t\trequest.onsuccess = function(event) {\n\t\t\t//Asigna el resultado a la variable db, que tiene la base de datos \n\t\t\tvar db = event.target.result; \n\t\t\tvar objectStore = db.transaction([base],\"readonly\").objectStore(base);\n\t\t\t//Abre un cursor para recorrer todos los objetos de la base de datos \n\t\t\tobjectStore.openCursor().onsuccess = function(event) {\n\t\t\t\tvar persona = event.target.result;\n\t\t\t\t//Si el cursor devuelve un valor \n\t\t\t\tif (persona) {\n\t\t\t\t\tvar trAct = document.createElement(\"tr\");\n\t\t\t\t\tvar tdEliminar = document.createElement(\"td\");\n\t\t\t\t\tvar eliminar = document.createElement(\"button\");\n\t\t\t\t\teliminar.setAttribute(\"type\",\"button\");\n\t\t\t\t\teliminar.setAttribute(\"class\",\"btn btn-danger\");\n\t\t\t\t\teliminar.setAttribute(\"value\",persona.value.name+\" \"+persona.value.lastName1+\" \"+persona.value.lastName2);\n\t\t\t\t\teliminar.appendChild(document.createTextNode(\"Eliminar\"));\n\t\t\t\t\t//Se le añade el evento al boton\n\t\t\t\t\tif (rol == \"Actor\") {\n\t\t\t\t\t\teliminar.addEventListener(\"click\", deleteActor);\n\t\t\t\t\t}else{\n\t\t\t\t\t\teliminar.addEventListener(\"click\", deleteDirector);\n\t\t\t\t\t}\n\t\t\t\t\tvar tdAct = document.createElement(\"td\");\n\t\t\t\t\ttdAct.setAttribute(\"class\",\"col-8\");\n\t\t\t\t\t//Evita que se muestren null los apellidos vacios\n\t\t\t\t\tif (persona.value.lastName2 == null) {\n\t\t\t\t\t\tpersona.value.lastName2 = \" \";\n\t\t\t\t\t}\n\t\t\t\t\ttdAct.appendChild(document.createTextNode(persona.value.name+\" \"+persona.value.lastName1+\" \"+persona.value.lastName2));\n\t\t\t\t\ttdEliminar.appendChild(eliminar);\n\t\t\t\t\ttrAct.appendChild(tdEliminar);\n\t\t\t\t\ttrAct.appendChild(tdAct);\n\t\t\t\t\ttbody.appendChild(trAct);\n\t\t\t\t\t//Pasa a la siguiente persona\n\t\t\t\t\tpersona.continue();\n\t\t\t\t}//Fin del if\n\t\t\t};//Fin de objectStore.openCursor().onsuccess\n\t\t};//Fin de request.onsuccess\n\t\tvar grupoBtn = document.createElement(\"div\");\n\t\tgrupoBtn.setAttribute(\"class\",\"form-group d-flex justify-content-around\");\n\t\tvar cancelar = document.createElement(\"button\");\n\t\tcancelar.setAttribute(\"type\",\"button\");\n\t\tcancelar.setAttribute(\"class\",\"btn btn-primary\");\n\t\tcancelar.appendChild(document.createTextNode(\"Cancelar\"));\n\t\t//Añade eventos al hacer click sobre los botones del formulario creado y el buscador\n\t\t$(document).ready(function(){\n\t\t\t$(\"#buscador\").on(\"keyup\", function() {\n\t\t\t var value = $(this).val().toLowerCase();\n\t\t\t $(\"#tablaPersonas tr\").filter(function() {\n\t\t\t\t$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)\n\t\t\t });\n\t\t\t});\n\t\t});\n\t\tcancelar.addEventListener(\"click\", showHomePage);\n\t\tcancelar.addEventListener(\"click\", function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontenidoCentral.setAttribute(\"class\",\"d-block\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontenidoFormularios.setAttribute(\"class\",\"d-none\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t//se crea el formulario de borrado\n\t\tformulario.appendChild(leyenda);\n\t\tgrupo.appendChild(buscador);\n\t\tgrupo.appendChild(tabla);\n\t\tformulario.appendChild(grupo);\n\t\ttabla.appendChild(thead);\n\t\ttabla.appendChild(tbody);\n\t\tthead.appendChild(tr);\n\t\ttr.appendChild(thVacio);\n\t\ttr.appendChild(thNombre);\n\t\tgrupoBtn.appendChild(cancelar);\n\t\tformulario.appendChild(grupoBtn);\n\t\tcontenidoFormularios.appendChild(formulario);\n\t\t/* FIN DEL FORMULARIO DE ELIMINAR ACTOR/DIRECTOR */\n\t}else if (tipo == \"update\") {\n\t\tvar formulario = document.createElement(\"form\");\n\t\tformulario.setAttribute(\"name\",\"modActorDirector\");\n\t\tformulario.setAttribute(\"action\",\"\");\n\t\tformulario.setAttribute(\"onsubmit\",\"return false\");\n\t\tformulario.setAttribute(\"method\",\"post\");\n\t\tvar leyenda = document.createElement(\"legend\");\n\t\tleyenda.appendChild(document.createTextNode(\"Modificar \"+rol+\"\"));\n\t\t//SE CREA EL BUSCADOR \n\t\tvar divModificar = document.createElement(\"div\");\n\t\tdivModificar.setAttribute(\"id\",\"divModificar\");\n\t\tvar grupo1 = document.createElement(\"div\");\n\t\tgrupo1.setAttribute(\"class\",\"form-group mt-3\");\n\t\tvar label1 = document.createElement(\"label\");\n\t\tlabel1.setAttribute(\"for\",\"produccionesCat\");\n\t\tlabel1.appendChild(document.createTextNode(\"Selecciona un \"+rol+\"\"));\n\t\tvar divInputBtn = document.createElement(\"div\");\n\t\tdivInputBtn.setAttribute(\"class\",\"input-group\");\n\t\tvar divBtn = document.createElement(\"div\");\n\t\tdivBtn.setAttribute(\"class\",\"input-group-prepend\");\n\t\tvar botonRemover = document.createElement(\"button\");\n\t\tbotonRemover.setAttribute(\"type\",\"button\");\n\t\tbotonRemover.setAttribute(\"class\",\"btn btn-sm btn-outline-secondary\");\n\t\tbotonRemover.appendChild(document.createTextNode(\"Remover\"));\n\t\t//añade el evento al hacer click al boton de remover\n\t\tbotonRemover.addEventListener(\"click\",function(){\n\t\t\tvar input = document.forms[\"modActorDirector\"][\"Person\"];\n\t\t\t\tinput.value = \"\";\n\t\t\t\t//muestra la tabla\n\t\t\t\tdocument.getElementById(\"divTabla\").style.display = \"block\";\n\t\t\t\t//oculta los campos de la categoria para modificar\n\t\t\t\tdivModificar.removeChild(divModificar.firstChild);\n\t\t});\n\t\tvar inputCat = document.createElement(\"input\");\n\t\tinputCat.setAttribute(\"class\",\"form-control \");\n\t\tinputCat.setAttribute(\"type\",\"text\");\n\t\tinputCat.setAttribute(\"id\",\"Person\");\n\t\tinputCat.readOnly = true;\n\t\tvar divTabla = document.createElement(\"div\");\n\t\tdivTabla.setAttribute(\"id\",\"divTabla\");\n\t\tvar buscador = document.createElement(\"input\");\n\t\tbuscador.setAttribute(\"class\",\"form-control my-3\");\n\t\tbuscador.setAttribute(\"type\",\"text\");\n\t\tbuscador.setAttribute(\"id\",\"buscador\");\n\t\tbuscador.setAttribute(\"placeholder\",\"Buscar...\");\n\t\t//SE CREA LA TABLA DEL ROL\n\t\tvar tabla = document.createElement(\"table\");\n\t\ttabla.setAttribute(\"class\",\"table table-bordered\");\n\t\ttabla.setAttribute(\"name\",\"tablaPerson\");\n\t\ttabla.setAttribute(\"id\",\"tablaPerson\");\n\t\tvar thead = document.createElement(\"thead\");\n\t\tvar tr = document.createElement(\"tr\");\n\t\tvar thVacio = document.createElement(\"th\");\n\t\tvar ocultar = document.createElement(\"button\");\n\t\tocultar.setAttribute(\"type\",\"button\");\n\t\tocultar.setAttribute(\"class\",\"btn btn-secondary\");\n\t\tocultar.appendChild(document.createTextNode(\"Mostrar/Ocultar\"));\n\t\tocultar.addEventListener(\"click\", function(){\n\t\t\tvar cont = document.getElementById(\"tablaBody\");\n\t\t\tif(cont.style.display==\"table-row-group\"){\n\t\t\t\tcont.style.display = \"none\";\n\t\t\t}else{\n\t\t\t\tcont.style.display = \"table-row-group\";\n\t\t\t}\n\t\t});\n\t\tthVacio.appendChild(ocultar);\n\t\tvar thNombre = document.createElement(\"th\");\n\t\tthNombre.appendChild(document.createTextNode(\"Nombre completo\"));\n\t\tvar tbody = document.createElement(\"tbody\");\n\t\ttbody.setAttribute(\"id\",\"tablaBody\");\n\t\tvar base = \"\";\n\t\tif (rol == \"Actor\") {\n\t\t\tbase = \"actores\";\n\t\t}else{\n\t\t\tbase = \"directores\";\n\t\t}\n\t\t//Abre la conexion con la base de datos categorias\n\t\tvar request = indexedDB.open(nombreDB);\n\t\t//Si ha salido bien\n\t\trequest.onsuccess = function(event) {\n\t\t\t//Asigna el resultado a la variable db, que tiene la base de datos \n\t\t\tvar db = event.target.result; \n\t\t\tvar objectStore = db.transaction([base],\"readonly\").objectStore(base);\n\t\t\t//Abre un cursor para recorrer todos los objetos de la base de datos \n\t\t\tobjectStore.openCursor().onsuccess = function(event) {\n\t\t\t\tvar persona = event.target.result;\n\t\t\t\t//Si el cursor devuelve un valor \n\t\t\t\tif (persona) {\n\t\t\t\t\tvar trAct = document.createElement(\"tr\");\n\t\t\t\t\tvar tdAdd = document.createElement(\"td\");\n\t\t\t\t\tvar add = document.createElement(\"button\");\n\t\t\t\t\tadd.setAttribute(\"type\",\"button\");\n\t\t\t\t\tadd.setAttribute(\"class\",\"btn btn-danger\");\n\t\t\t\t\tif (persona.value.lastName2 == null) {\n\t\t\t\t\t\tpersona.value.lastName2 = \" \";\n\t\t\t\t\t}\n\t\t\t\t\tadd.setAttribute(\"value\",persona.value.name+\" \"+persona.value.lastName1+\" \"+persona.value.lastName2);\n\t\t\t\t\tadd.appendChild(document.createTextNode(\"Modificar\"));\n\t\t\t\t\t//Se le añade el evento al boton\n\t\t\t\t\tadd.addEventListener(\"click\", function(){\n\t\t\t\t\t\tvar input = document.forms[\"modActorDirector\"][\"Person\"];\n\t\t\t\t\t\tinput.value = this.value;\n\t\t\t\t\t\t//oculta la tabla\n\t\t\t\t\t\tdocument.getElementById(\"divTabla\").style.display = \"none\";\n\t\t\t\t\t\t//muestra los campos de la categoria para modificar\n\t\t\t\t\t\tmodifyPerson(this.value,rol);\n\t\t\t\t\t});\n\t\t\t\t\tvar tdAct = document.createElement(\"td\");\n\t\t\t\t\ttdAct.setAttribute(\"class\",\"col-8\");\n\t\t\t\t\ttdAct.appendChild(document.createTextNode(persona.value.name+\" \"+persona.value.lastName1+\" \"+persona.value.lastName2));\n\t\t\t\t\ttdAdd.appendChild(add);\n\t\t\t\t\ttrAct.appendChild(tdAdd);\n\t\t\t\t\ttrAct.appendChild(tdAct);\n\t\t\t\t\ttbody.appendChild(trAct);\n\t\t\t\t\t//Pasa a la siguiente persona\n\t\t\t\t\tpersona.continue();\n\t\t\t\t}//Fin del if\n\t\t\t};//Fin de objectStore.openCursor().onsuccess\n\t\t};//Fin de request.onsuccess\n\t\t//Añade los eventos de la tabla\n\t\t$(document).ready(function(){\n\t\t\t$(\"#buscador\").on(\"keyup\", function() {\n\t\t\t var value = $(this).val().toLowerCase();\n\t\t\t $(\"#tablaPerson tr\").filter(function() {\n\t\t\t\t$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)\n\t\t\t });\n\t\t\t});\n\t\t});\n\t\tgrupo1.appendChild(label1);\n\t\tdivInputBtn.appendChild(divBtn);\n\t\tdivBtn.appendChild(botonRemover);\n\t\tdivInputBtn.appendChild(inputCat);\n\t\tgrupo1.appendChild(divInputBtn);\n\t\tdivTabla.appendChild(buscador);\n\t\tdivTabla.appendChild(tabla);\n\t\tgrupo1.appendChild(divTabla);\n\t\ttabla.appendChild(thead);\n\t\ttabla.appendChild(tbody);\n\t\tthead.appendChild(tr);\n\t\ttr.appendChild(thVacio);\n\t\ttr.appendChild(thNombre);\n\t\tformulario.appendChild(grupo1);\n\t\tformulario.appendChild(divModificar);\n\t\tcontenidoFormularios.appendChild(formulario);\n\t}//Fin de los if\n}//Fin de formActores", "static newItem(id, txt) {\n return `<li id='${id}'><button class=\"w3-btn w3-bar w3-red\" type=button\">${txt} <b>&times;</b></button></li>`;\n }", "function addByClick(){\r\n\tif (inputValueLength())\r\n\t{\r\n\tinputItemsName()\r\n\t}\r\n}", "function OSelect_XFormItem() {}", "function formGen(lista, padre){\n\nvar a = new Array();\n\nfor each (var x in lista) {\n\t//x ha una prop. name e una descr.\n\tvar i = padre.createElement(\"input\");\n\ti.setAttribute(\"type\", \"text\"); i.setAttribute(\"name\", x.name);\n\tvar d = padre.createTextNode(x.descr);\n\tvar nl = padre.createElement(\"br\");\n//\ti.textContent = x.descr;\n\ta.push(i, d, nl); \t}\n\nreturn a;\t}", "setUpNameChangeForm(){\n let itemNameTexts = document.getElementsByClassName(\"listItemName\");\n for(let i = 0; i < itemNameTexts.length; i++){\n itemNameTexts[i].onclick = () => {\n itemNameTexts[i].style.display = \"none\";\n itemNameTexts[i].parentNode.style.background = \"#4D5059\";\n let itemId = itemNameTexts[i].parentNode.parentNode.id;\n itemId = itemId.substring(15);\n let itemNameForm = document.getElementById(\"todo-list-itemName-form-\" + itemId);\n itemNameForm.value = itemNameTexts[i].innerHTML;\n itemNameForm.style.display = \"block\";\n itemNameForm.focus();\n itemNameForm.onblur = () => {\n itemNameTexts[i].style.display = \"block\";\n itemNameTexts[i].parentNode.style.background = \"auto\";\n itemNameForm.style.display = \"none\";\n this.editItemNameTransaction(itemId, itemNameForm.value);\n this.performTransaction();\n }\n }\n }\n }", "function Estiliza_menu_itens()\n{\n //PARA CADA ITEM DO MENU, BASTA CHAMAR A FUNÇÃO ABAIXO, ESPECIFICANDO\n //SEU INDICE(NUMERO), SUA COR(STRING), SEU CONTEUDO(STRING), SEU LABEL(STRING)\n //Estiliza_item(Indice, Cor, Conteudo, Texto Lateral);\n Estiliza_item(0,\"blue\",\"+\",\"Adicionar\");\n Estiliza_item(1,\"red\",\"Botão\");\n}", "function generateNewQuestionForm(item, counter) {\n return `\n <input name=\"answer\" required type=\"radio\" value=\"${item}\" id=\"answer-${counter}\">\n <label for=\"answer-${counter}\">${item}</label><br>`;\n }", "addForm() {\n // Creates a new form based on TEMPLATE\n let template = document.importNode(TEMPLATE.content, true);\n FORMSET_BODY.appendChild(template);\n let form = FORMSET_BODY.children[FORMSET_BODY.children.length -1];\n\n // Updates the id's of the form to unique values\n form.innerHTML = form.innerHTML.replace(MATCH_FORM_IDS, this.updateMatchedId.bind(this, form));\n\n let index = FORMSET_BODY.children.length;\n FORMSET.querySelector('[name=\"form-TOTAL_FORMS\"]').value = index;\n this.updateButton();\n }", "function addToList(){\n \n\n \n if(inputField.value === ''){\n alert('Please enter the name of the item before adding it.');\n } \n else {\n \n \n const item = `<li class=item>\n <i class=\"far ${tbdStyle}\" onclick=\"toggleClasses(this)\"></i>\n <p class=\"${tbdText}\">${inputField.value}</p>\n <i class=\"fas fa-minus-circle\" onclick=\"removeFromList()\"></i>\n </li>`;\n list.insertAdjacentHTML(\"beforeend\", item);\n inputField.value=\"\";\n }\n \n}" ]
[ "0.6990442", "0.68305516", "0.6804216", "0.6776516", "0.67021793", "0.6616066", "0.65786904", "0.6508785", "0.6497008", "0.64693415", "0.64639425", "0.6453863", "0.63167304", "0.6272989", "0.6255736", "0.6229853", "0.6201799", "0.6198153", "0.6197487", "0.61962646", "0.6180993", "0.61674756", "0.61382806", "0.6138078", "0.6130922", "0.6127209", "0.610491", "0.6100282", "0.6097584", "0.6082015", "0.60793716", "0.6071078", "0.60624033", "0.6058805", "0.60466564", "0.60384244", "0.60268396", "0.6013229", "0.5997746", "0.5997437", "0.59855884", "0.597214", "0.5970659", "0.59622633", "0.5960112", "0.5948537", "0.5936221", "0.5935251", "0.59287924", "0.5926745", "0.59153605", "0.5905502", "0.5905123", "0.5899819", "0.58969885", "0.58963615", "0.5889259", "0.5879334", "0.5864298", "0.5863909", "0.58628446", "0.5859936", "0.5851845", "0.58480567", "0.5845571", "0.5843479", "0.58430237", "0.58356386", "0.58355", "0.5829161", "0.58274776", "0.582681", "0.58189934", "0.58124787", "0.5810829", "0.58088845", "0.58083904", "0.58007807", "0.5800624", "0.57995635", "0.57983285", "0.5796344", "0.5796005", "0.57928747", "0.57895654", "0.57883346", "0.5783315", "0.57813025", "0.5781286", "0.5780943", "0.57796896", "0.5774746", "0.57727", "0.57719976", "0.5770481", "0.5770262", "0.5767242", "0.57614386", "0.57485586", "0.5745141", "0.5744134" ]
0.0
-1
========================================================================= DIALOG TO CREATE FORM =========================================================================
function generateForm(startDate, endDate, row, missingForms) { var ui = SpreadsheetApp.getUi(); var result = ui.alert( 'Create form for ' + startDate + ' - ' + endDate, 'Would you like to create form?', ui.ButtonSet.YES_NO_CANCEL); if(result == ui.Button.YES) { createForm(startDate, endDate, row, missingForms); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserCreateForm(){\n showCreateDialog();\n}", "createForm () {\n if (document.getElementById('leaderboardButton')) {\n document.getElementById('leaderboardButton').remove();\n }\n crDom.createLeaderboardButton();\n crDom.createForm();\n crDom.createCategoriesChoice(this.filter.category);\n crDom.createDifficultyChoice(this.filter.difficulty);\n crDom.createRangeSlider(this.filter.limit);\n crDom.createStartButton();\n }", "createDialog(title, text, argumentName) {\n return new FrontendDialog(title, text, argumentName);\n }", "function crearFormCliente(){\n $('#id-agregar-nuevo-cliente').on('click', function(){\n $('#div-venta-nuevo-cliente').dialog({\n width: 800,\n height : 400,\n modal:true,\n draggable:true\n });\n });\n procesarFormularioCliente();\n}", "function createForm(e){\n var newTaskForm = document.createElement(\"form\");\n newTaskForm.setAttribute(\"id\", \"newTaskForm\");\n newTaskForm.setAttribute(\"class\", \"popup\");\n\n //add a header to the new form\n newTaskForm.innerHTML += \"<h2 id='newTaskFormHeader'>Create New Task</h2>\";\n\n //add form elements\n addTaskBox(newTaskForm);\n addPriorityBox(newTaskForm);\n addDueDate(newTaskForm);\n addDescriptionBox(newTaskForm);\n addButtons(newTaskForm);\n\n //make form draggable\n drag(newTaskForm);\n\n count = 1;\n\n return newTaskForm;\n}", "createForm(){\n this.form_ = this.create_();\n }", "function showCreateDialog() {\n\t$(\"#createWorkspaceDialog\").dialog({\n\t\tmodal : true,\n\t\tdraggable : false,\n\t\tbuttons : {\n\t\t\tCancel : function () {\n\t\t\t\t$(this).dialog(\"close\");\n\t\t\t},\n\t\t\t\"Create\" : function () {\n\t\t\t\tif($('form').parsley().isValid())\n\t\t\t\t{\n\t\t\t\t\tcreateNewWorkspace($('#wsNameInput').val());\n\t\t\t\t\t$(this).dialog(\"close\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}", "function openFormDialog(options) {\n return openDialog(\n options.url,\n '<div class=\"text-center\"><i class=\"fa fa-spin fa-spinner\"></i> Loading...</div>',\n options.title,\n options.type || BOOTBOX_TYPES.FORM,\n options.class_name,\n options.on_save,\n options.on_cancel,\n options.on_loaded,\n options.confirm_btn_title,\n options.cancel_btn_title\n );\n}", "async create(opts) {\r\n const dialog = document.createElement('materials-dialog');\r\n dialog.dialogTitle = opts.title;\r\n dialog.actions = [];\r\n if (opts.cancelText) {\r\n dialog.actions.push({\r\n label: opts.cancelText,\r\n role: 'close',\r\n action: opts.onCancel\r\n });\r\n }\r\n dialog.actions.push({\r\n label: opts.acceptText,\r\n role: 'accept',\r\n action: opts.onAccept\r\n });\r\n dialog.body = opts.message;\r\n dialog.addEventListener('accept', () => dialog.remove());\r\n dialog.addEventListener('cancel', () => dialog.remove());\r\n document.body.appendChild(dialog);\r\n return dialog;\r\n }", "function initForm(){\n\tvar input = document.querySelector(\".gwt-DialogBox input.gwt-TextBox\");\n\t// If no input founded or has already a form\n\tif(!input || input.form){\n\t\treturn;\n\t}\n\n\t// Find table parent\n\tvar table = input.closest(\"table\");\n\n\t// Fail to found a table\n\tif(!table){\n\t\tconsole.error(\"Error: TABLE not found for the given input:\", input);\n\t\treturn;\n\t}\n\n\t//Wrap table with a form to allow input be autofilled\n\tvar form = document.createElement(\"form\");\n\t// Prevent form submit\n\tform.addEventListener(\"submit\", function(event){event.preventDefault();}, false);\n\ttable.parentNode.insertBefore(form, table);\n\tform.appendChild(table);\n\t// To submit the form, find first button (and suppose is the right one) and change its type to a submit button\n\tform.getElementsByTagName(\"button\")[0].setAttribute(\"type\", \"submit\");\n}", "function createForm() {\n var formElement = $(\"[name='contactForm']\").empty();\n // Add form elements and their event listeners\n formFields.forEach(function (formField) {\n var labelElement = $(\"<label>\")\n .attr(\"for\", formField.name)\n .text(formField.des);\n formElement.append(labelElement);\n var inputElement = $(\"<input>\")\n .attr(\"type\", formField.type)\n .attr(\"name\", formField.name)\n .attr(\"value\", (anime[formField.name] || \"\"));\n if (formField.required) {\n inputElement.prop(\"required\", true).attr(\"aria-required\", \"true\");\n }\n if (formField.type == \"date\"){\n inputElement.get(0).valueAsDate = new Date(anime[formField.name]);\n }\n formElement.append(inputElement);\n inputElement.on('input', function () {\n var thisField = $(this);\n inputHandler(formField.name, thisField.val());\n });\n // clear the horizontal and vertical space next to the \n // previous element\n formElement.append('<div style=\"clear:both\"></div>');\n });\n if (editForm) {\n addUpdateAndDeleteButtons(formElement);\n } else {\n addNewButton(formElement);\n }\n\n }", "function dialogForm(title, body) {\n return '<span style=\"font-weight: bold\" class=\"lu-popup-title\">' + title + '</span>' +\n '<form onsubmit=\"return false\">' +\n body + '<button type = \"submit\" class=\"ok fa fa-check\" title=\"ok\"></button>' +\n '<button type = \"reset\" class=\"cancel fa fa-times\" title=\"cancel\"></button>' +\n '<button type = \"button\" class=\"reset fa fa-undo\" title=\"reset\"></button></form>';\n}", "function createTeamForm () {\n var item = team_form.addMultipleChoiceItem();\n \n // Create form UI\n team_form.setShowLinkToRespondAgain(false);\n team_form.setTitle(name + \" game\");\n team_form.setDescription(\"Game RSVP form\");\n // Set the form items\n item.setTitle(\"Will you attend the game?\");\n item.setChoices([\n item.createChoice(rsvp_opts[0]),\n item.createChoice(rsvp_opts[1]),\n item.createChoice(rsvp_opts[2]),\n item.createChoice(rsvp_opts[3])]);\n team_form.addSectionHeaderItem().setTitle(\n \"Do not change if you want your reply to count.\");\n team_form.addTextItem();\n team_form.addTextItem();\n\n // Attach the form to its destination [spreadsheet]\n team_form.setDestination(destination_type, destination);\n }", "createUI(layout) {\n let attr = Object.assign({\n width: 20, height: 10,\n }, layout);\n return this.CreateFormWindow(this.title, attr);\n }", "showCreateForm(data) {\n this.clearNewOrgan(data);\n this.changeFormMode(this.FORM_MODES.CREATE);\n }", "function openModalForm(){\n createForm();\n openModalWindow();\n}", "function openConfirmCreate() {\n // Get our data\n var name = document.getElementById(\"createDeckName\").value\n var mode = document.getElementById(\"createIssueModeSelect\").value\n var decimals = document.getElementById(\"createDeckDecimals\").value\n var asd = document.getElementById(\"createASD\").value\n\n\n // Fill the confirmation forms\n // Fill deck name\n document.getElementById(\"deckNameConfirmCreate\").innerHTML = name\n // Fill mode\n document.getElementById(\"issueModeConfirmCreate\").innerHTML = mode\n // Fill amount\n document.getElementById(\"decimalPlaceConfirmCreate\").innerHTML = decimals\n // Fill ASD\n document.getElementById(\"aSDConfirmCreate\").innerHTML = asd\n\n // Open the confirmation form\n document.getElementById(\"confirmTransactionCreate\").style.display = \"flex\"\n}", "function createForm() {\n let form = document.createElement(`form`);\n form.id = `form`;\n document.getElementById(`create-monster`).appendChild(form);\n\n document.getElementById(`form`).appendChild(createInputAndPlaceholder(`input`,`Name`));\n document.getElementById(`form`).appendChild(createInputAndPlaceholder(`input`,`Age`));\n document.getElementById(`form`).appendChild(createInputAndPlaceholder(`input`,`Description`));\n\n let button = document.createElement('button');\n button.innerHTML = `Create`;\n document.getElementById(`form`).appendChild(button);\n\n\n}", "function loadForm() {\n var $this = $(this),\n type = $this.attr('id').split('-')[2],\n opts = options[type];\n\n if (windowManager) {\n windowManager.openWindow(reportDialog);\n } else {\n function ReportDialog(config) {\n ReportDialog.super.call(this, config);\n }\n OO.inheritClass(ReportDialog, OO.ui.ProcessDialog);\n\n ReportDialog.static.name = 'report-dialog';\n ReportDialog.static.title = opts.buttonText;\n ReportDialog.static.actions = [\n { label: 'Cancel', flags: ['safe', 'close'] },\n { label: 'Submit', action: 'submit', flags: ['secondary'] },\n ];\n\n // initialise dialog, append content\n ReportDialog.prototype.initialize = function () {\n ReportDialog.super.prototype.initialize.apply(this, arguments);\n this.content = new OO.ui.PanelLayout({\n padded: true,\n expanded: true\n });\n this.content.$element.append(opts.form);\n this.$body.append(this.content.$element);\n this.$content.addClass('vstf-ui-Dialog');\n this.$content.addClass('soap-reports');\n };\n\n // Handle actions\n ReportDialog.prototype.getActionProcess = function (action) {\n if (action === 'submit') {\n var dialog = this;\n dialog.pushPending();\n dialog.actions.others[0].pushPending();\n submitForm(opts).then(function() {\n dialog.popPending();\n dialog.actions.others[0].popPending();\n }); // disable the Submit button\n }\n return ReportDialog.super.prototype.getActionProcess.call(this, action);\n };\n\n // Create the Dialog and add the window manager.\n windowManager = new OO.ui.WindowManager({\n classes: ['vstf-windowManager']\n });\n $(document.body).append(windowManager.$element);\n // Create a new dialog window.\n reportDialog = new ReportDialog({\n size: 'larger'\n });\n // Add window and open\n windowManager.addWindows([reportDialog]);\n windowManager.openWindow(reportDialog);\n\n // Close dialog when clicked outside the dialog\n reportDialog.$frame.parent().on('click', function (e) {\n if (!$(e.target).closest('.vstf-ui-Dialog').length) {\n reportDialog.close();\n }\n });\n\n // Expand dialog when socks is clicked\n $('#socks, label[for=socks]').on('click', function (e) {\n setTimeout(function(){\n reportDialog.updateSize();\n }, 600);\n });\n\n mw.hook('soap.reportsform').fire();\n }\n }", "function openCreateFileDialog(){\r\n\t\t\r\n\t\tvar objDialog = jQuery(\"#uc_dialog_create_file\");\r\n\t\tif(objDialog.length == 0)\r\n\t\t\tthrow new Error(\"The create file dialog must be here\");\r\n\t\t\r\n\t\t//init fields\r\n\t\tjQuery(\"#uc_dialog_create_file_name\").val(\"\");\r\n\t\t\r\n\t\t//open dialog\r\n\t\tg_ucAdmin.openCommonDialog(objDialog);\r\n\t\t\r\n\t}", "function NewEntryForm() {\n $(\"#addCancel\").click(this.clearForm);\n $(\"#addButton\").click(this.submitForm);\n }", "function createForm(){\n addWindow = new BrowserWindow({\n width: 800,\n height: 400,\n title: 'New Form'\n });\n\n addWindow.loadURL(url.format({\n pathname: path.join(__dirname, \"../public/createForm.html\"),\n protocol: 'file:',\n slashes: true\n }));\n}", "function create_customer(){\n\tjQuery(\"#customer_dialog_boxe\")\n\t.attr(\"title\",\"Créer un nouveau client\")\n\t.wrapInner('<div class=\"dialog\"></div>');\n\t\n\tjQuery(\"#customer_dialog_boxe\")\n\t.dialog({ modal:true, \n \t\twidth:420,\n \t\tbuttons: { \n \t\t\t\"Enregistrer\": function() {\n \t\t\t\ttier();\n \t\t\t\tjQuery('#fullName').attr('disabled','disabled');\n \t\t\t\tjQuery(this).dialog(\"close\");\n \t\t\t},\n \t\t\t\"Cancel\": function() {jQuery(this).dialog(\"close\");},\n \t\t\t}\n \t});\n}", "function createRegistrationForm(){\n registrationForm = new MyForm(\n templates.tNewForm,\n [\n {\n id : 'registrate',\n class : 'btn btn-primary',\n name : 'Registrate',\n action : registrationUser\n },\n {\n id : 'cancel',\n class : 'btn btn-primary',\n name : 'Cancel',\n action : function(e){\n e.preventDefault();\n registrationForm.hide();\n }\n }\n ]\n );\n validation(registrationForm.form);\n }", "function createUser(){\n var isFilled = checkEmptynessOfDialogFields();\n \n if(isFilled == 1){\n var data = getDataOfDialogField();\n createNewUser(data.nickname, data.password, data.email);\n closeDialog();\n }\n}", "function loadForm() {\n var $this = $(this),\n type = $this.attr('id').split('-')[2],\n opts = options[type];\n\n $.showCustomModal(\n opts.buttonText,\n opts.form,\n {\n id: 'requestWindow',\n width: 650,\n buttons: [{\n id: 'cancel',\n message: 'Cancel',\n handler: function () {\n $('#requestWindow').closeModal();\n }\n }, {\n id: 'submit',\n defaultButton: true,\n message: 'Save',\n handler: function () {\n submitForm(opts);\n }\n }],\n callback: function() {\n // Fire hook for scripts that use the form\n mw.hook('vstf.reportsform').fire();\n }\n }\n );\n }", "createDialogue() {\n var dialogue = document.createElement(\"div\");\n dialogue.id = \"dialogue\";\n document.getElementsByTagName(\"body\")[0].appendChild(dialogue);\n }", "function dialogCreateContactSubmit(form){\n if(!check_form('EditView')){\n return false;\n }\n \n $('#ajaxRequest', $(form)).val(1);\n $('#from', $(form)).val('dialog');\n return true;\n}", "static createConfirmEditDialog() {\n\t const bx = calendar_util.Util.getBX();\n\t return new bx.Calendar.Controls.ConfirmEditDialog();\n\t }", "function openFormCreate(elem)\n{\n\t//Clean form data\n\tdocument.getElementById('formEnreg').reset();\t\n\t//Cache table list film\n\trendreInvisible(elem);\n\t//Display form\n\t$(\"#divFormFilm\").show();\n}", "function createDialog(title, content, buttons) {\n var id = $.parser.getObjGUID();\n var win = $('<div id=\"' + id + '\" class=\"messager-body\"></div>').appendTo('body');\n win.append(content);\n if (buttons) {\n var tb = $('<div class=\"messager-button\"></div>').appendTo(win);\n for (var label in buttons) {\n $('<a></a>').attr('href', 'javascript:void(0)').text(label)\n .css('margin-left', 10)\n .bind('click', eval(buttons[label]))\n .appendTo(tb).linkbutton();\n }\n }\n win.window({\n title: title,\n noheader: (title ? false : true),\n width: 300,\n height: 'auto',\n modal: true,\n collapsible: false,\n minimizable: false,\n maximizable: false,\n resizable: false,\n onClose: function () {\n setTimeout(function () {\n $('#' + id).window('destroy');\n }, 100);\n }\n });\n win.window('window').addClass('messager-window');\n win.children('div.messager-button').children('a:first').focus();\n return win;\n }", "onClickNewBoard() {\n commonActions.click(this.createNewBoardButton);\n return new boardForm();\n }", "function fn_mdl_muestraForm(pControlDiv, pFuncion, pFuncion1, pTitulo, pWidth) {\r\n if (pWidth == null) { pWidth = '85%'; }\r\n var pHTML = $(pControlDiv).html();\r\n pControlDiv.innerHTML = '';\r\n if ((pTitulo == null) | (pTitulo == 'undefined')) { pTitulo = ''; }\r\n $(\"body\").append(\"<div id='divDialogForm'></div>\");\r\n $(\"#divDialogForm\").html(pHTML);\r\n\r\n $(\"#divDialogForm\").dialog({\r\n modal: true\r\n , title: pTitulo\r\n , resizable: false\r\n , width: pWidth\r\n\t , beforeclose: function (event, ui) {\r\n\t pControlDiv.innerHTML = pHTML;\r\n\t $(this).remove();\r\n\t if (pFuncion1 != null) {\r\n\t pFuncion1();\r\n\t }\r\n\t },\r\n buttons: {\r\n 'Guardar': function () {\r\n pControlDiv.innerHTML = $(this).find(\"table[id^=tbForm]\").parent().html();\r\n pFuncion();\r\n },\r\n 'Cancelar': function () {\r\n pControlDiv.innerHTML = pHTML;\r\n $(this).remove();\r\n if (pFuncion1 != null) {\r\n pFuncion1();\r\n }\r\n }\r\n }\r\n });\r\n}", "function createChannel() {\n // Remove button \n createChannelButton.setAttribute(\"style\", \"display: none;\");\n channelCreatedNotif.setAttribute(\"style\", \"display: none;\");\n channelCreatedNotif.innerHTML = \"\";\n // Show form.\n channelNameInput.removeAttribute(\"style\"); \n newChannelValue.focus();\n}", "function createUpdateForm(){\n updateForm = new MyForm(\n templates.tNewForm,\n [\n {\n id : 'update',\n class : 'btn btn-primary',\n name : 'Update',\n action : updateUser\n },\n {\n id : 'esc',\n class : 'btn btn-primary',\n name : 'Cancel',\n action : function(e){\n e.preventDefault();\n updateForm.hide();\n }\n }\n ]\n );\n validation(updateForm.form);\n }", "insertForm() {\n this.builder = new Builder(this.container, this.options.template, {\n style: this.options.style,\n formContainerClass: this.options.formContainerClass,\n inputGroupClass: this.options.inputGroupClass,\n inputClass: this.options.inputClass,\n labelClass: this.options.labelClass,\n btnClass: this.options.btnClass,\n errorClass: this.options.errorClass,\n successClass: this.options.successClass,\n });\n this.build();\n }", "function createForm(adata, resource, method) {\n\t\tvar formTitle = formatTitle( getCurrentHash() );\n\t\tlet html = `<h3>${ formTitle } - ${ method }</h3>`;\n\t\tconst fhref = apiU + getCurrentHash();\n\t\t\n\t\t\n html += `\n <p>Please note that all fields marked with an asterisk (*) are required.</p>\n <form\n class=\"resource-form\"\n data-href=\"${resource + '/'}\"\n data-method=\"${escapeAttr(method)}\">\n `;\n\t\t\n //adata = JSON.parse(adata);\n\n for (key in adata.data) {\n\t\t\t\n\t\t\tconst properties = adata.data[key];\n\t\t\tconst name = properties.name;\n\t\t\t\n const title = formatTitle(properties.name);\n\t\t\tconst isInteger = false;\n const isRequired = properties.required;\n\n html += `\n <label>\n ${escapeHtml(title)}\n ${isRequired ? '*' : ''}\n <br>\n <input\n class=\"u-full-width\"\n name=\"${name}\"\n type=\"${isInteger ? 'number' : 'text'}\"\n placeholder=\"${escapeAttr(properties.prompt)}\"\n ${isRequired ? 'required' : ''}>\n </label>\n `;\n }\n\n html += '<br><input class=\"btn waves-effect waves-light\" type=\"submit\" value=\"Submit\">';\n html += '</form>';\n return html;\n }", "function showCreateGDocResultForm(resultText) {\n\n // Modal add form behavior:\n // 05.29.2019 tps Modal behavior experiment: Clicking [Esc] closes the form\n var modal = document.getElementById('createGDocResultDiv');\n closeOnEscapeKeypress(modal, cancelCreateGDocResult);\n\n // Populate form with document creation result.\n // document.getElementById('createGDocResultTextArea').value = resultText;\n\n // Link to new document\n var result = JSON.parse(resultText);\n var anchor = document.getElementById('createGDocResultLink');\n var link = result.docLink;\n anchor.href = link;\n anchor.text = link;\n\n // Say stuff about the new document\n var contentDiv = document.getElementById('createGDocResultText');\n var textContent = `Created Google Doc \"${result.docName}\" in folder \"${result.folderName}\"`;\n contentDiv.textContent = textContent;\n\n // Display modal form\n modal.style.display = 'block';\n document.getElementById('btnCreateGDocResultCancel').focus(); // [Enter] closes modal\n}", "function makeUpdateDialog(name,total,type,notes,id){\n\n\tvar moneyDisplay1 = total.toString().slice(0,-2);\n \tvar moneyDisplay2 = total.toString().slice(-2);\n\n\t$(\"body\").append(\"<div id='updateForm\"+id+\"' class='updateDialogContainDiv'><form id='update-form-form\"+id+\"'><fieldset><label>Name:</label><input type='text' id='accountNameEntered' name='accountNameEntered' value='\"+name+\"'/><label>Total:</label>\"+currencyStmbol+\"<input type='number' step='1' id='accountTotalDollarsEntered' name='Total' value='\"+moneyDisplay1+\"' min='0'/>.<input type='number' step='1' id='accountTotalCentsEntered' name='Total' value='\"+moneyDisplay2+\"' min='0' max='99'/><label>Type:</label><input type='text' id='accountTypeEntered' name='accountTypeEntered' value='\"+type+\"'/><label>Notes:</label><textarea rows='4' cols='20' id='accountNotesEntered' name='accountNotesEntered' value='\"+notes+\"'>\"+notes+\"</textarea></fieldset></form></div>\");\n}", "function showDialogBarcodeCreation() {\n var title = 'Generate and Export Barcodes'; \n var templateName = 'barcodes'; \n var width = 800; \n \n createDialog(title,templateName,width);\n}", "function ObtenerFormaAgregarCondicionPago() {\n $(\"#dialogAgregarCondicionPago\").obtenerVista({\n nombreTemplate: \"tmplAgregarCondicionPago.html\",\n despuesDeCompilar: function(pRespuesta) {\n $(\"#dialogAgregarCondicionPago\").dialog(\"open\");\n }\n });\n}", "function Form(options) {\n this.setForm(options.inputID);\n this.setInput(options.inputID);\n this.setResult(options.resultID);\n this.setItemClass(options.itemClass);\n this.setSortButton(options.sortID);\n }", "function newMessageForm () {\n var form = dom.createElement('tr')\n var lhs = dom.createElement('td')\n var middle = dom.createElement('td')\n var rhs = dom.createElement('td')\n form.appendChild(lhs)\n form.appendChild(middle)\n form.appendChild(rhs)\n form.AJAR_date = '9999-01-01T00:00:00Z' // ISO format for field sort\n var field, sendButton\n\n function sendMessage (text) {\n var now = addNewTableIfNeeded()\n\n if (!text) {\n field.setAttribute('style', messageBodyStyle + 'color: #bbb;') // pendingedit\n field.disabled = true\n }\n var sts = []\n var timestamp = '' + now.getTime()\n var dateStamp = $rdf.term(now)\n let chatDocument = chatDocumentFromDate(now)\n\n var message = kb.sym(chatDocument.uri + '#' + 'Msg' + timestamp)\n var content = kb.literal(text || field.value)\n // if (text) field.value = text No - don't destroy half-finsihed user input\n\n sts.push(new $rdf.Statement(subject, ns.wf('message'), message, chatDocument))\n sts.push(new $rdf.Statement(message, ns.sioc('content'), content, chatDocument))\n sts.push(new $rdf.Statement(message, DCT('created'), dateStamp, chatDocument))\n if (me) sts.push(new $rdf.Statement(message, ns.foaf('maker'), me, chatDocument))\n\n var sendComplete = function (uri, success, body) {\n if (!success) {\n form.appendChild(UI.widgets.errorMessageBlock(\n dom, 'Error writing message: ' + body))\n } else {\n var bindings = { '?msg': message,\n '?content': content,\n '?date': dateStamp,\n '?creator': me}\n renderMessage(messageTable, bindings, false) // not green\n\n if (!text) {\n field.value = '' // clear from out for reuse\n field.setAttribute('style', messageBodyStyle)\n field.disabled = false\n }\n }\n }\n updater.update([], sts, sendComplete)\n }\n form.appendChild(dom.createElement('br'))\n\n // DRAG AND DROP\n function droppedFileHandler (files) {\n UI.widgets.uploadFiles(kb.fetcher, files, chatDocument.dir().uri + 'Files', chatDocument.dir().uri + 'Pictures',\n function (theFile, destURI) { // @@@@@@ Wait for eachif several\n sendMessage(destURI)\n })\n }\n\n // When a set of URIs are dropped on the field\n var droppedURIHandler = function (uris) {\n sendMessage(uris[0]) // @@@@@ wait\n /*\n Promise.all(uris.map(function (u) {\n return sendMessage(u) // can add to meetingDoc but must be sync\n })).then(function (a) {\n saveBackMeetingDoc()\n })\n */\n }\n\n // When we are actually logged on\n function turnOnInput () {\n if (options.menuHandler && menuButton) {\n let menuOptions = { me, dom, div, newBase: messageTable.chatDocument.dir().uri }\n menuButton.addEventListener('click',\n event => { options.menuHandler(event, subject, menuOptions) }\n , false)\n }\n creatorAndDate(lhs, me, '', null)\n\n field = dom.createElement('textarea')\n middle.innerHTML = ''\n middle.appendChild(field)\n field.rows = 3\n // field.cols = 40\n field.setAttribute('style', messageBodyStyle + 'background-color: #eef;')\n\n // Trap the Enter BEFORE it is used ti make a newline\n field.addEventListener('keydown', function (e) { // User preference?\n if (e.keyCode === 13) {\n if (!e.altKey) { // Alt-Enter just adds a new line\n sendMessage()\n }\n }\n }, false)\n UI.widgets.makeDropTarget(field, droppedURIHandler, droppedFileHandler)\n\n rhs.innerHTML = ''\n sendButton = UI.widgets.button(dom, UI.icons.iconBase + 'noun_383448.svg', 'Send')\n sendButton.setAttribute('style', UI.style.buttonStyle + 'float: right;')\n sendButton.addEventListener('click', ev => sendMessage(), false)\n rhs.appendChild(sendButton)\n\n const chatDocument = chatDocumentFromDate(new Date())\n var imageDoc\n function getImageDoc () {\n imageDoc = kb.sym(chatDocument.dir().uri + 'Image_' + Date.now() + '.png')\n return imageDoc\n }\n function tookPicture (imageDoc) {\n if (imageDoc) {\n sendMessage(imageDoc.uri)\n }\n }\n middle.appendChild(UI.media.cameraButton(dom, kb, getImageDoc, tookPicture))\n\n UI.pad.recordParticipation(subject, subject.doc()) // participation =\n } // turn on inpuut\n\n let context = {div: middle, dom: dom}\n UI.authn.logIn(context).then(context => {\n me = context.me\n turnOnInput()\n })\n\n return form\n }", "function newForm() {\n\n var form = document.createElement(\"form\")\n form.style = \"heigth:100px;width:300px;border-style:solid;border-color:black;border-width:1px\"\n form.id = \"form\"\n\n var ObjLabel = document.createElement(\"label\")\n ObjLabel.textContent = \"Object \"\n\n var ObjInput = document.createElement(\"input\")\n ObjInput.id = \"object-input\"\n ObjInput.name = \"object\"\n ObjInput.type = \"text\"\n ObjInput.placeholder = \"Object name\"\n\n var QtyLabel = document.createElement(\"label\")\n QtyLabel.textContent = \"Quantity \"\n\n var QtyInput = document.createElement(\"input\")\n QtyInput.id = \"quantity-input\"\n QtyInput.name = \"quantity\"\n QtyInput.type = \"text\"\n QtyInput.placeholder = \"Please insert a positive number\"\n\n var submit = document.createElement(\"input\")\n submit.id = \"submit\"\n submit.type = \"button\"\n submit.value = \"Confirm\"\n submit.setAttribute(\"onmousedown\", \"addItems()\")\n\n // adding all items under \"form\" in the DOM tree\n form.appendChild(ObjLabel)\n form.appendChild(ObjInput)\n form.appendChild(document.createElement(\"br\"))\n form.appendChild(QtyLabel)\n form.appendChild(QtyInput)\n form.appendChild(document.createElement(\"br\"))\n form.appendChild(submit)\n\n return form\n}", "_onClick() {\n let commitID = this.model.get('id');\n\n if (commitID.length > 7) {\n commitID = commitID.slice(0, 7);\n }\n\n const dialogView = new RB.DialogView({\n title: gettext('Create Review Request?'),\n body: this._dialogBodyTemplate({\n prefixText: gettext('You are creating a new review request from the following published commit:'),\n commitID: commitID,\n summary: this.model.get('summary'),\n suffixText: gettext('Are you sure you want to continue?'),\n }),\n buttons: [\n {\n id: 'cancel',\n label: gettext('Cancel'),\n },\n {\n id: 'create',\n label: gettext('Create Review Request'),\n primary: true,\n onClick: this._createReviewRequest.bind(this),\n }\n ]\n });\n\n dialogView.show();\n }", "function repoForm() {\n return {id:'repo-form',title:'Add your module or theme ...',type:'form',method:'POST',action:'',tabs:false,\n fields:[\n {label:'Name',name:'repo[name]',type:'text',description:'Enter the name of your module or theme (no spaces or invalid chars).'},\n {label:'Type',name:'repo[type]',type:'select',options:[{label:\"Module\",value:\"module\"},{label:\"Theme\",value:\"theme\"},{label:\"Profile\",value:\"profile\"}],description:'What is it?'},\n {label:'Description',name:'repo[description]',type:'textarea',description:'Provide a description so others understand what youre trying to do.'},\n {label:'Author',name:'repo[author]',type:'text',description:'Enter your name.',readonly:false}\n ],\n buttons:[\n {name:'submit',type:'submit',value:'Submit'}\n ]};\n}", "function showDialogAdd() {\n var title = 'Add Parts to Locations'; \n var templateName = 'addUi'; \n var width = 600; \n \n // custom function to insert part data into the dialog box. For code modularity and simplicity\n createDialogWithPartData(title,templateName,width);\n}", "function create_form_page()\n{\n empty_content('content');\n\n const form = document.createElement('form');\n\n let form_inner_html = '';\n\n form_inner_html += \n `\n <div id=\"form_title\">\n Devenez hébergeur pour <i>Merci pour l'invit'</i>'\n </div>\n <p1 id=\"description\">\n Vous avez une chambre libre ? Vous souhaitez devenir hébergeur solidaire et faire \n parti de l'aventure <i> Merci pour l'invit' </i> ? \n <br> <br>\n <i> Merci pour l'invit' </i> est un projet qui prône l'hébergement solidaire afin de faciliter la \n réinsertion socioprofessionnelle de femmes et de jeunes en grande précarité. \n <br> <br>\n <i> Merci pour l'invit' </i> se développe actuellement à BORDEAUX, à PARIS et sa banlieue. \n <br> <br>\n Après avoir rempli ce questionnaire, la responsable \"hébergement\"vous contactera pour \n vous expliquer plus amplement la démarche. La Charte de cohabitation sera signée entre \n vous et la personne accueillie lors du début de l'hébergement. \n <br> <br>\n Vous habitez une autre ville ? N'hésitez pas à remplir ce formulaire, notre équipe \n vous répondra dès que possible. \n <br> <br>\n Ce questionnaire <b>NE VOUS ENGAGE PAS A HEBERGER.</b>\n <br> <br>\n Toutes les informations collectées sont strictement pour l'association, elles ne \n seront pas partagées et ne serviront que pour les besoins du projet.\n <br> <br>\n <m style='color: red; display: inline-block;'> * Champ obligatoire </m>\n </p1>\n `;\n\n let names = ['Nom','Prénom','Genre','Ville','Code Postal','Adresse',\n 'Numéro de téléphone','Adresse mail', \"Nombres d'habitants dans le foyer\"];\n\n for(let i = 0;i < names.length ; i++)\n {\n form_inner_html += create_form_text_holder(names[i]);\n };\n\n let drop_names = [\"Modalités d'hébergement\",\"Durée d'hébergement\"];\n let drop_elements = [[\"Une chambre à part\",\"Canapé-lit\",\"Logement entier\",\"Autre\"],\n [\"Deux semaines\",\"De 1 mois à 3 mois\",\"De 4 mois à 6 mois\",\"6 mois ou plus\"]];\n\n for(let i = 0;i < drop_names.length ; i++)\n {\n form_inner_html += create_form_drop_down(drop_names[i],drop_elements[i]);\n };\n\n names = [\"A partir de quand pouvez-vous recevoir quelqu'un chez vous?\",\n \"Qu'attendez-vous de cette expérience d'accueil ?\", \"Des questions ou commentaires?\"];\n\n let place_holder = ['jj/mm/aaaa','Votre reponse','Votre reponse'];\n\n for(let i = 0;i < names.length ; i++)\n {\n form_inner_html += create_form_text_holder(names[i],place_holder[i]);\n };\n\n form_inner_html += `<div id=\"form_button\">\n <button id=\"envoyer\" type=\"button\">\n Envoyer\n </button>\n </div>`;\n \n form.innerHTML = form_inner_html;\n \n const form_container = document.createElement('div');\n form_container.setAttribute(\"class\",\"form_container\")\n form_container.appendChild(form);\n\n const content = document.querySelector('#content');\n content.innerHTML += create_page_title(\"Formulaire d'héberement\");\n content.appendChild(form_container);\n\n const submit = document.querySelector(\"#envoyer\");\n submit.addEventListener('click', submitForm);\n}", "function newContact() {\n document.getElementById('txtName').value = \"\";\n document.getElementById('txtSurname').value = \"\";\n document.getElementById('txtPhone').value = \"\";\n document.getElementById('txtAddress').value = \"\";\n\n let title = document.getElementById('titleContactForm');\n title.innerHTML = '<h2 id=\"titleContactForm\">Add a new contact</h2>';\n $('#contactForm').show();\n}", "createForm() {\n cy\n .get(this.locators.createButtonContainer)\n .find(this.locators.createButton)\n .click()\n\n return this;\n }", "function createDialog(options) {\n var destroyed = false;\n \n var htmlDialog = System.createDialog({\n onbeforeclose: function() {\n // overwrite the behavior of top right \"x\" button\n if (!destroyed) {\n reject();\n return false;\n }\n }\n });\n \n htmlDialog.visible = false;\n htmlDialog.title = options.title;\n\n // restore position\n if (options.id) {\n DIMENSION_PROPS.forEach(function(prop) {\n htmlDialog[prop] =\n options.id && GlobalSettings.get(\"dialog.\" + options.id + \".\" + prop) ||\n options[prop] ||\n htmlDialog[prop];\n });\n }\n\n // Build interface\n var document = htmlDialog.document;\n\n document.write(options.html);\n document.close();\n\n document.forms[0].onsubmit = function() {\n resolve(document.getElementById(\"entry\").value);\n return false;\n };\n\n document.getElementById(\"cancel\").onclick = function() {\n reject();\n };\n\n document.onkeydown = function(e) {\n e = e || document.parentWindow.event;\n if (e.keyCode == 27) {\n reject();\n }\n };\n \n function show() {\n htmlDialog.visible = true;\n var autofocus = document.querySelector(\"[autofocus]\");\n if (autofocus) {\n autofocus.focus();\n }\n if (options.onshow) {\n options.onshow(htmlDialog);\n }\n }\n \n function hide() {\n if (options.id) {\n DIMENSION_PROPS.forEach(function (prop) {\n GlobalSettings.set(\n \"dialog.\" + options.id + \".\" + prop,\n htmlDialog[prop]\n );\n });\n }\n htmlDialog.visible = false;\n }\n \n function resolve(value) {\n hide();\n if (options.onresolve) {\n options.onresolve(value);\n }\n }\n \n function reject(value) {\n hide();\n if (options.onreject) {\n options.onreject(value);\n }\n }\n \n function destroy() {\n destroyed = true;\n htmlDialog.close();\n }\n \n return {\n show: show,\n hide: hide,\n resolve: resolve,\n reject: reject,\n destroy: destroy,\n isShown: function() {\n return htmlDialog.visible;\n }\n };\n }", "function newProjectForm() {\n\t\t$.get(\"/projects/new\", function(projectForm) {\n\t\t\tdocument.getElementById('js-new-project-form').innerHTML = projectForm;\n\t\t}).done(function() {\n\t\t\tlistenerSaveProject();\n\t\t})\n}", "function buildForm(e, t)\n{\n\tvar htmlReference = \"<div id='createForm'>\";\n\thtmlReference += \"<p>Title:</p><input type='text' id='title'/>\";\n\thtmlReference += \"<p><h5 id='type'><span>\" + t + \"</span> >> <select id='category'><option value='Revit'>Revit</option><option value='Rhino'>Rhino</option><option value='AutoCAD'>AutoCAD</option></select> >> \";\n\thtmlReference += \"<select id='subcategory'><option value='Tip'>Tip</option><option value='Reference'>Reference</option></select></h5></p>\";\n\thtmlReference += \"<p>Content:</p><textarea id='content'></textarea>\";\n\thtmlReference += \"<form enctype='multipart/form-data'><input name='file' type='file' style='margin: 10px 0 10px 0;'/>\";\n\thtmlReference += \"<div id='bar'><table><tr><td style='width: 80px;'><input type='button' value='Submit' id='submit' class='create' style='width: 60px;'/></td><td><progress></progress></td></tr></table></div>\";\n\thtmlReference += \"</form></div>\";\n\t// insert the new HTML into the document\n\t$('#main')[0].innerHTML = htmlReference;\n}", "function dialogCreateContact(){\n $(\"#create_new_contact\").length ? $(\"#create_new_contact\") : $(\"<div id='create_new_contact'/>\").appendTo($('body'));\n \n $.ajax({\n async:true,\n cache:true,\n url: '/student/create',\n type: 'GET',\n data: {from:'dialog', ajaxRequest : 1},//this will let the form use dialogCreateContactSubmit() to submit.\n dataType: 'html',\n timeout:15000,\n beforeSend:function(){\n showTip('Loading...');\n },\n success: function(data){\n $('#create_new_contact').dialog({\n title: 'Create new contact',\n width: 650,\n modal: true,\n close: function(event, ui) { \n }\n });\n $(\"#create_new_contact\").html(data);\n hideTip();\n }\n }); \n}", "function showAddPatientForm(){\n\tvar f = document.createElement(\"form\");\n\n\tvar table = document.createElement(\"table\");\n\n\n\t/**Surname row**/\n\tvar row = document.createElement(\"tr\");\n\tvar data1 = document.createElement(\"td\");\n\tvar text1 = document.createTextNode(\"Surname: \");\n\t\tdata1.appendChild(text1);\n\n\tvar surname = document.createElement(\"input\"); //input element, text\n\tsurname.setAttribute('type',\"text\");\n\tsurname.setAttribute('name',\"surname\");\n\tsurname.setAttribute('id',\"surname\");\n\tvar data2 = document.createElement(\"td\");\n\tdata2.appendChild(surname);\n\t//creating row structure\n\t\trow.appendChild(data1);\n\t\trow.appendChild(data2);\n\ttable.appendChild(row);\n\n\t/**Name row**/\n\tvar row = document.createElement(\"tr\");\n\tvar data1 = document.createElement(\"td\");\n\tvar text1 = document.createTextNode(\"Name: \");\n\t\tdata1.appendChild(text1);\n\n\tvar name = document.createElement(\"input\"); //input element, text\n\tname.setAttribute('type',\"text\");\n\tname.setAttribute('name',\"name\");\n\tname.setAttribute('id',\"name\");\n\tvar data2 = document.createElement(\"td\");\n\tdata2.appendChild(name);\n\t//creating row structure\n\t\trow.appendChild(data1);\n\t\trow.appendChild(data2);\n\ttable.appendChild(row);\n\n\t/**Age row**/\n\tvar row = document.createElement(\"tr\");\n\tvar data1 = document.createElement(\"td\");\n\tvar text1 = document.createTextNode(\"Age: \");\n\t\tdata1.appendChild(text1);\n\n\tvar age = document.createElement(\"input\"); //input element, text\n\tage.setAttribute('type',\"text\");\n\tage.setAttribute('name',\"age\");\n\tage.setAttribute('id',\"age\");\n\tvar data2 = document.createElement(\"td\");\n\tdata2.appendChild(age);\n\t//creating row structure\n\t\trow.appendChild(data1);\n\t\trow.appendChild(data2);\n\ttable.appendChild(row);\n\n\t//BUTTONS\n\n\tvar row = document.createElement(\"tr\");\n\tvar data1 = document.createElement(\"td\");\n\tvar s = document.createElement(\"input\"); //input element, Submit button\n\ts.setAttribute('type',\"button\");\n\ts.setAttribute('onclick', \"addPatient();\")\n\ts.setAttribute('value',\"Submit\");\n\tdata1.appendChild(s);\n\ttable.appendChild(data1);\t\n\n\n\tf.appendChild(s);\n\tf.appendChild(table);\n\n\tdocument.getElementsByTagName('article')[0].innerHTML = \"\";\n\tdocument.getElementsByTagName('article')[0].appendChild(f);\n\n\t//Adding element to print the addPatient result\n\tvar result = document.createElement(\"p\"); //input element, Submit button\n\tresult.setAttribute('id',\"addPatientResult\");\n\tdocument.getElementsByTagName('article')[0].appendChild(result);\n}", "function createDynamicForm(){\n\t\ttry{\n\t\t\trandom = 0;\n\t\t\tgListId = 0;\n\t\t\tcount = 1;\n\t\t\tvar frmLogBasiConf = {id: \"frmDynamicJS\",type:constants.FORM_TYPE_NATIVE,addWidgets :addWidgetsToDynamicForm,skin :\"frmSampleSkin\",headers:[hBoxForHeader()]};\n\t\t\tvar frmLayoutConf = {percent:true};\n\t\t\tvar frmPSPConfig = {inTransitionConfig:{transitionDirection:\"topCenter\"}};\n\t\t frmDynamicJS = new kony.ui.Form2(frmLogBasiConf, frmLayoutConf, frmPSPConfig);\n\t\t frmDynamicJS.show();\n\t\t}\n\t\tcatch(err){\n\t\t\talert(\"error while creating the forms\"+err);\n\t\t}\n\t}", "function showNewRosterPromptDialog(cfg, initialValues) {\n\tvar $dlg = $(\"#newRosterPromptDialog\");\n\tvar $formId = \"newRosterPromptForm\";\n\t\n\tvar $dialog = showModal({\n\t\ttitle: cfg.title || getResource(\"dialog.prompt\"),\n\t\twidth: cfg.width || 400,\n\t\tcontent: $dlg.children(),\n\t\tonShown: function(dlg, e) {\n\t\t\tvar $form = $(\"#\"+$formId, dlg);\n\t\t\t$form.removeData(\"valid\");\n\t\t\t\n\t\t\tvar $name = $(\"#new-roster-prompt-name\", $form), $select = $(\"#new-roster-prompt-tag\", $form);\n\t\t\tif ($select) {\n\t\t\t\t$select.empty();\n\t\t\t\tvar now = new Date(), y = now.getFullYear(), m = now.getMonth();\n\t\t\t\t$select.append(\"<option value='\"+y+\"' selected>\"+y+\"</option>\");\n\t\t\t\tif (m >= 10) {\n\t\t\t\t\t$select.append(\"<option value='\"+(y+1)+\"' selected>\"+(y+1)+\"</option>\");\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tonOk: function(dlg, e) {\n\t\t\tvar $form = $(\"#\"+$formId, dlg);\n\t\t\tif ($form && $form.data('formValidation')) {\n\t\t\t\tif($form.data('formValidation').validate().isValid()) {\n\t\t\t\t\t$form.data(\"valid\", true);\n\t\t\t\t\tvar $name = $(\"#new-roster-prompt-name\", $form), $tag = $(\"#new-roster-prompt-tag\", $form);\n\t\t\t\t\tif (cfg.onOk) cfg.onOk(dlg, {name: $name, tag: $tag});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$form.data(\"valid\", false);\n\t\t\treturn { canceled : true };\n\t\t},\n\t\tonCancel: function(dlg, e) {\n\t\t\tvar $form = $(\"#\"+$formId, dlg);\n\t\t\t$form.data(\"valid\", false);\n\t\t\tif (cfg.onCancel) cfg.onCancel(dlg, $form);\n\t\t},\n\t\tonClose: function(parent, e) {\n\t\t\tvar $form = $(\"#\"+$formId, parent);\t\n\t\t\tvar $name = $(\"#new-roster-prompt-name\", $form), $tag = $(\"#new-roster-prompt-tag\", $form);\n\t\t\tif (cfg.onClose) cfg.onClose(parent, {valid: $form.data(\"valid\"), name: $name, tag: $tag});\n\t\t\t\n\t\t\tif ($form && $form.data('formValidation')) {\t\t\t\t\n\t\t\t\t$form.data('formValidation').resetForm(true).destroy();\n\t\t\t}\n\t\t}\n\t});\n\t\n\t$(\"#\"+$formId, $dialog).formValidation({\n\t\tframework: 'bootstrap',\n icon: {\n valid: 'glyphicon glyphicon-ok',\n invalid: 'glyphicon glyphicon-remove',\n validating: 'glyphicon glyphicon-refresh'\n },\n fields: {\n \"newRosterPromptName\": {\n validators: {\n notEmpty: {\n message: getResource(\"dialog.promptRequired\")\n },\n callback: {\n \tmessage: getResource(\"histroyTab.dialog.mustUniqueName\"),\n \tcallback: function(value, validator, $field) {\n \t\tvar $form = $(\"#\"+$formId, $dialog);\t\n \t\tvar $tag = $(\"#new-roster-prompt-tag\", $form);\n \t\treturn !checkRosterExists(value, $tag.val());\n \t}\n }\n }\n },\n \t\"newRosterPromptTag\": {\n validators: {\n notEmpty: {\n message: getResource(\"dialog.promptRequired\")\n }\n }\n \t}\n }\n\t});\n\t\n\tif (initialValues) {\n\t\tvar $form = $(\"#\"+$formId, $dialog);\n\t\tvar $name = $(\"#new-roster-prompt-name\", $form), $tag = $(\"#new-roster-prompt-tag\", $form);\n\t\tif (initialValues.name) $name.val(initialValues.name);\n\t\tif (initialValues.tag) $tag.val(initialValues.tag);\n\t}\n\t\n\treturn $dialog;\n}", "showForm() {\n let form = document.createElement(\"form\");\n let input = document.createElement(\"input\");\n // Add input to form\n form.appendChild(input);\n form.addEventListener(\"submit\", function (evt) {\n evt.preventDefault();\n if (game.checkForm(input.value)) {\n // Create hero\n hero = new Hero(input.value);\n // Remove form on submit\n form.remove();\n // Begin introduction part\n introduction = new Introduction();\n }\n });\n this.main.appendChild(form);\n // Add focus on input tag\n document.getElementsByTagName(\"input\")[0].focus();\n }", "function ouvrir() {\n creationModal();\n }", "function setupCreateUserDialog(){\n dialogs_context.append('<div title=\\\"'+tr(\"Create user\")+'\\\" id=\"create_user_dialog\"></div>');\n $create_user_dialog = $('#create_user_dialog',dialogs_context);\n var dialog = $create_user_dialog;\n dialog.html(create_user_tmpl);\n\n //Prepare jquery dialog\n dialog.dialog({\n autoOpen: false,\n modal:true,\n width: 400\n });\n\n $('button',dialog).button();\n\n $('input[name=\"custom_auth\"]',dialog).parent().hide();\n $('select#driver').change(function(){\n if ($(this).val() == \"custom\")\n $('input[name=\"custom_auth\"]',dialog).parent().show();\n else\n $('input[name=\"custom_auth\"]',dialog).parent().hide();\n });\n\n\n $('#create_user_form',dialog).submit(function(){\n var user_name=$('#username',this).val();\n var user_password=$('#pass',this).val();\n var driver = $('#driver', this).val();\n if (driver == 'custom')\n driver = $('input[name=\"custom_auth\"]').val();\n\n if (!user_name.length || !user_password.length){\n notifyError(tr(\"User name and password must be filled in\"));\n return false;\n };\n\n var user_json = { \"user\" :\n { \"name\" : user_name,\n \"password\" : user_password,\n \"auth_driver\" : driver\n }\n };\n Sunstone.runAction(\"User.create\",user_json);\n $create_user_dialog.dialog('close');\n return false;\n });\n}", "function openAddNewEntryUI() {\n var html = HtmlService.createTemplateFromFile('newEntry').evaluate()\n .setWidth(400)\n .setHeight(300);\n SpreadsheetApp.getUi()\n .showModalDialog(html, 'Add a new entry');\n}", "function fn_mdl_muestraForm2(pControlDiv, pFuncion, pFuncion1, pTitulo, pWidth) {\r\n if (pWidth == null) { pWidth = '85%'; }\r\n var pHTML = $(pControlDiv).html();\r\n pControlDiv.innerHTML = '';\r\n if ((pTitulo == null) | (pTitulo == 'undefined')) { pTitulo = ''; }\r\n $(\"body\").append(\"<div id='divDialogForm'></div>\");\r\n $(\"#divDialogForm\").html(pHTML);\r\n\r\n $(\"#divDialogForm\").dialog({\r\n modal: true\r\n , closeOnEscape: true\r\n , title: pTitulo\r\n , resizable: false\r\n , width: pWidth\r\n\t , beforeclose: function (event, ui) {\r\n\t pControlDiv.innerHTML = pHTML;\r\n\t $(this).remove();\r\n\t if (pFuncion1 != null) {\r\n\t pFuncion1();\r\n\t }\r\n\t },\r\n buttons: {\r\n 'Aceptar': function () {\r\n pControlDiv.innerHTML = $(this).find(\"table[id^=tbForm]\").parent().html();\r\n pFuncion();\r\n },\r\n 'Cancelar': function () {\r\n pControlDiv.innerHTML = pHTML;\r\n $(this).remove();\r\n if (pFuncion1 != null) {\r\n pFuncion1();\r\n }\r\n }\r\n }\r\n });\r\n}", "function initForm() {\n var formTemplate = document.getElementById(\"recipe-form-template\").innerHTML\n var template = Handlebars.compile(formTemplate)\n document.getElementsByTagName(\"main\")[0].innerHTML = template({'submitAction': 'createRecipe()'})\n}", "function openCreateFolderDialog(){\r\n\t\t\r\n\t\tvar objDialog = jQuery(\"#uc_dialog_create_folder\");\r\n\t\tif(objDialog.length == 0)\r\n\t\t\tthrow new Error(\"The create folder dialog must be here\");\r\n\t\t\r\n\t\t//init fields\r\n\t\tjQuery(\"#uc_dialog_create_folder_name\").val(\"\");\r\n\t\t\r\n\t\t//oepn dialog\r\n\t\tg_ucAdmin.openCommonDialog(objDialog);\r\n\t\t\r\n\t}", "function OLD_build_dialog(xmldoc, sfw_host, ref)\n {\n var docel = xmldoc.documentElement;\n \n var schema;\n if (!(schema=xmldoc.selectSingleNode(\"*/schema\")))\n if (!(schema=xmldoc.selectSingleNode(\"*/*[@type='form' | @type='record']/schema\")))\n schema = xmldoc.selectSingleNode(\"*/*/schema\");\n \n if (!schema)\n {\n console.error(\"Can't find schema necessary for building a form.\");\n return null;\n }\n\n var host = addEl(\"div\", sfw_host);\n\n var result = schema.parentNode;\n var datanode = null;\n if (result==xmldoc.documentElement)\n datanode = result.selectSingleNode(\"*[@rndx=1]/*[1]\");\n else\n {\n var nodename = schema.getAttribute(\"name\");\n datanode = result.selectSingleNode(nodename);\n }\n\n if (datanode)\n {\n datanode.setAttribute(\"make_node_dialog\", \"true\");\n xslo.transformFill(host, datanode);\n datanode.removeAttribute(\"make_node_dialog\");\n }\n else\n {\n result.setAttribute(\"make_dialog\", \"true\");\n xslo.transformFill(host, result);\n result.removeAttribute(\"make_dialog\");\n }\n \n var form = host.getElementsByTagName(\"form\")[0];\n if (form)\n {\n form.style.visible = \"hidden\";\n \n function finish()\n {\n form.className = \"dialog Schema\";\n position_dialog(form,ref);\n form.style.visible = \"visible\";\n \n focus_on_first_field(form);\n }\n\n if (\"custom_form_setup\" in window)\n custom_form_setup(form, finish);\n else\n finish();\n }\n else\n {\n console.error(\"The build_dialog transform failed to make a form.\");\n remove_from_parent(host);\n }\n\n return form;\n }", "function showDialogAdd() {\n\n // Print that we got here\n console.log(\"Opening add item dialog\");\n\n // Clear out the values in the form.\n // Otherwise we'll keep values from when we last\n // opened or hit edit.\n // I'm getting it started, you can finish.\n $('#firstName').val(\"\");\n $('#lastName').val(\"\");\n $('#email').val(\"\");\n $('#phone').val(\"\");\n $('#birthday').val(\"\");\n\n // Remove style for outline of form field\n $('#firstNameDiv').removeClass(\"has-error\");\n $('#firstNameGlyph').removeClass(\"glyphicon-remove\");\n $('#firstNameDiv').removeClass(\"has-success\");\n $('#firstNameGlyph').removeClass(\"glyphicon-ok\");\n $('#lastNameDiv').removeClass(\"has-error\");\n $('#lastNameGlyph').removeClass(\"glyphicon-remove\");\n $('#lastNameDiv').removeClass(\"has-success\");\n $('#lastNameGlyph').removeClass(\"glyphicon-ok\");\n $('#emailDiv').removeClass(\"has-error\");\n $('#emailGlyph').removeClass(\"glyphicon-remove\");\n $('#emailDiv').removeClass(\"has-success\");\n $('#emailGlyph').removeClass(\"glyphicon-ok\");\n $('#phoneDiv').removeClass(\"has-error\");\n $('#phoneGlyph').removeClass(\"glyphicon-remove\");\n $('#phoneDiv').removeClass(\"has-success\");\n $('#phoneGlyph').removeClass(\"glyphicon-ok\");\n $('#birthdayDiv').removeClass(\"has-error\");\n $('#birthdayGlyph').removeClass(\"glyphicon-remove\");\n $('#birthdayDiv').removeClass(\"has-success\");\n $('#birthdayGlyph').removeClass(\"glyphicon-ok\");\n\n // Show the hidden dialog\n $('#myModal').modal('show');\n}", "function setupForm() {\n var index = 1;\n document.getElementById(\"name\").focus();\n document.getElementById(\"colors-js-puns\").classList.add(\"is-hidden\");\n document.getElementById(\"other-title\").classList.add(\"is-hidden\");\n document.getElementById(\"payment\").selectedIndex = index;\n\n createTotal();\n togglePaymentDiv(index);\n }", "onAgregar() {\n this.dialog.show({\n title: \"Agregar Nuevo Tipo de Mascota\",\n body: \"Ingrese el nombre del nuevo tipo de mascota:\",\n prompt: Dialog.TextPrompt({\n placeholder: \"Nombre del tipo de mascota\",\n initialValue: \"\",\n required: true\n }),\n actions: [Dialog.CancelAction(), Dialog.OKAction((dialog) =>{\n axios.post(rutaApi+'animal', {idRaza:this.state.tipoMascota,Descripcion: dialog.value }).then(()=>{console.log('works'); window.location.replace(\"/AdministrarTiposDeMascotas\");})\n \n })],\n bsSize: \"small\",\n onHide: dialog => {\n dialog.hide();\n console.log(\"closed by clicking background.\");\n }\n });\n }", "hideCreateForm() {\n this.changeFormMode(this.FORM_MODES.LIST);\n }", "function showAddCommitmentForm() {\n vm.form.data = {\n category: null,\n question: null,\n name: null,\n description: null,\n status: null,\n dueDate: null\n };\n vm.form.title = \"Add Commitment\";\n vm.form.onSave = vm.add;\n vm.form.onClose = vm.form.show = false;\n\n vm.form.show = true;\n }", "function showDialog() {\n var ui = HtmlService.createTemplateFromFile('Dialog')\n .evaluate()\n .setWidth(400)\n .setHeight(150);\n DocumentApp.getUi().showModalDialog(ui, DIALOG_TITLE);\n}", "function initializePage_createAccount()\r\n{\r\n page_createAccount.initializeForm(page_createUserAccount);\r\n}", "function display_new_avistamiento_form() {\n\n // Get the html form that we will fill\n let add_elements_form = document.getElementById(\"nuevos_avistamientos\");\n\n // Check if the form is empty\n if (add_elements_form.children.length === 0) {\n // if it is empty, we have to add:\n // * html div to put the inputs of each avistamiento\n // * html div to put the inputs of the contacto\n // * the button to send the form\n\n // avistamiento input\n let form_input_div = document.createElement(\"div\");\n // submit button\n let submit_form_div = document.createElement(\"div\");\n let form_error_msgs = document.createElement(\"ul\");\n form_error_msgs.id = \"form_error_messages\";\n let submit_form_button = document.createElement(\"button\");\n submit_form_button.type = \"button\";\n submit_form_button.append(\"Enviar Información de AvistamientoDB\");\n submit_form_button.addEventListener('click', function () {\n if (is_valid_form()) {\n display_modal_confirmation(); // add a confirmation box before submitting\n }\n })\n submit_form_div.append(form_error_msgs, submit_form_button);\n\n // contacto input\n let form_contacto_div = document.createElement(\"div\");\n form_contacto_div.className = \"contacto flex_col\";\n form_contacto_div.append(\"Info de Contacto\");\n let form_contacto_name_div = document.createElement(\"div\");\n let form_contacto_name_label = document.createElement(\"label\");\n form_contacto_name_label.htmlFor = \"nombre\";\n form_contacto_name_label.append(\"Nombre:\");\n let form_contacto_name_input = document.createElement(\"input\");\n form_contacto_name_input.id = \"nombre\";\n form_contacto_name_input.name = \"nombre\";\n form_contacto_name_input.className = \"unchecked_input\";\n form_contacto_name_input.type = \"text\";\n form_contacto_name_input.size = 100;\n form_contacto_name_input.maxLength = 200;\n form_contacto_name_input.required = true;\n form_contacto_name_div.append(form_contacto_name_label, form_contacto_name_input);\n let form_contacto_mail_phone_div = document.createElement(\"div\");\n form_contacto_mail_phone_div.className = \"flex_row\";\n let form_contacto_mail_div = document.createElement(\"div\");\n let form_contacto_mail_label = document.createElement(\"label\");\n form_contacto_mail_label.append(\"Correo:\")\n form_contacto_mail_label.htmlFor = \"email\";\n let form_contacto_mail_input = document.createElement(\"input\");\n form_contacto_mail_input.id = \"email\";\n form_contacto_mail_input.name = \"email\";\n form_contacto_mail_input.className = \"unchecked_input\";\n // form_contacto_mail_input.type = \"email\";\n form_contacto_mail_input.type = \"text\";\n form_contacto_mail_input.size = 100;\n form_contacto_mail_input.required = true;\n form_contacto_mail_div.append(form_contacto_mail_label, form_contacto_mail_input)\n let form_contacto_phone_div = document.createElement(\"div\");\n let form_contacto_phone_label = document.createElement(\"label\");\n form_contacto_phone_label.htmlFor = \"celular\";\n form_contacto_phone_label.append(\"Teléfono\");\n let form_contacto_phone_input = document.createElement(\"input\");\n form_contacto_phone_input.id = \"celular\";\n form_contacto_phone_input.name = \"celular\";\n form_contacto_phone_input.className = \"unchecked_input\";\n // form_contacto_phone_input.type = \"tel\";\n form_contacto_phone_input.type = \"text\";\n form_contacto_phone_input.size = 15;\n form_contacto_phone_div.append(form_contacto_phone_label, form_contacto_phone_input);\n form_contacto_mail_phone_div.append(form_contacto_mail_div, form_contacto_phone_div);\n form_contacto_div.append(form_contacto_name_div, form_contacto_mail_phone_div);\n add_elements_form.append(form_input_div, form_contacto_div, submit_form_div);\n }\n\n // Take the form's div where we'll put the inputs\n let form_main_div = add_elements_form.children[0];\n const i = add_elements_form.children[0].children.length; // get the number of children to calculate html ids\n\n let new_div = document.createElement(\"div\");\n new_div.className = \"avistamiento\";\n new_div.id = \"new_avistamiento\"+i;\n\n let datetime_div = document.createElement(\"div\"); // div with date_time's label and input\n let datetime_label = document.createElement(\"label\");\n datetime_label.htmlFor = \"dia-hora-avistamiento\"+i;\n datetime_label.append(\"Fecha y Hora\");\n let datetime_input = document.createElement(\"input\");\n datetime_input.name = \"dia-hora-avistamiento\";\n datetime_input.id = \"dia-hora-avistamiento\"+i;\n datetime_input.className = \"unchecked_input\";\n // datetime_input.type = \"datetime-local\";\n datetime_input.type = \"text\";\n datetime_input.size = 20;\n datetime_input.placeholder = \"año-mes-dia hora:minuto\";\n let time_now = new Date();\n datetime_input.value =\n time_now.getFullYear() + \"-\"\n + (time_now.getMonth()+1>=10? time_now.getMonth()+1: \"0\"+(time_now.getMonth()+1)) + \"-\"\n + (time_now.getDate()>=10? time_now.getDate(): \"0\"+time_now.getDate()) + \" \"\n + (time_now.getHours()>=10? time_now.getHours(): \"0\"+time_now.getHours()) + \":\"\n + (time_now.getMinutes()>=10? time_now.getMinutes(): \"0\"+time_now.getMinutes());\n datetime_input.required = true;\n datetime_div.append(datetime_label, datetime_input);\n let lugar_div = document.createElement(\"div\"); // row with divs for region, comuna and sector\n lugar_div.className = \"flex_row\";\n let region_div = document.createElement(\"div\"); // div with region's label and select\n region_div.className = \"flex_col\";\n let region_div_label = document.createElement(\"label\");\n region_div_label.htmlFor = \"region\"+i;\n region_div_label.append(\"Region\");\n let region_div_select = document.createElement(\"select\");\n region_div_select.name = \"region\";\n region_div_select.id = \"region\"+i;\n region_div_select.className = \"unchecked_input\";\n region_div_select.required = true;\n // the region options will be generated later\n region_div.append(region_div_label, region_div_select);\n let comuna_div = document.createElement(\"div\"); // div with comuna 's label and select\n comuna_div.className = \"flex_col\";\n let comuna_div_label = document.createElement(\"label\");\n comuna_div_label.htmlFor = \"comuna\" + i;\n comuna_div_label.append(\"Comuna\");\n let comuna_div_select = document.createElement(\"select\");\n comuna_div_select.name = \"comuna\";\n comuna_div_select.id = \"comuna\" + i;\n comuna_div_select.className = \"unchecked_input\";\n comuna_div_select.required = true;\n comuna_div_select.innerHTML = \"<option selected value=''>--Elija una Región--</option>\" // you need a region first\n // as the comuna options depends on the region, they will be generated dynamically\n comuna_div.append(comuna_div_label, comuna_div_select);\n let sector_div = document.createElement(\"div\"); // div with sector's label and input\n sector_div.className = \"flex_col\";\n let sector_div_label = document.createElement(\"label\");\n sector_div_label.htmlFor = \"sector\" + i;\n sector_div_label.append(\"Sector\");\n let sector_div_select = document.createElement(\"input\");\n sector_div_select.name = \"sector\";\n sector_div_select.id = \"sector\" + i;\n sector_div_select.className = \"unchecked_input\";\n sector_div_select.type = \"text\";\n sector_div_select.size = 200;\n sector_div_select.maxLength = 100;\n\n sector_div.append(sector_div_label, sector_div_select);\n lugar_div.append(region_div, comuna_div, sector_div)\n let avistamiento_div = document.createElement(\"div\"); // row with divs for description and photo\n avistamiento_div.className = \"flex_row\";\n let avistamiento_text_div = document.createElement(\"div\"); // column with tipo and estado\n avistamiento_text_div.className = \"flex_col\";\n let avistamiento_text_div_type_label = document.createElement(\"label\");\n avistamiento_text_div_type_label.htmlFor = \"tipo-avistamiento\" + i;\n avistamiento_text_div_type_label.append(\"Tipo\");\n let avistamiento_text_div_type_select = document.createElement(\"select\");\n avistamiento_text_div_type_select.name = \"tipo-avistamiento\";\n avistamiento_text_div_type_select.id = \"tipo-avistamiento\" + i;\n avistamiento_text_div_type_select.className = \"unchecked_input\";\n avistamiento_text_div_type_select.required = true;\n let base_option = document.createElement(\"option\");\n base_option.value = \"\"; base_option.append(\"--Elija un subfilo de artrópodo--\");\n avistamiento_text_div_type_select.append(base_option);\n for (let k = 0; k < arthropod_options.length; k++) {\n let o = document.createElement(\"option\");\n o.value = arthropod_options[k]['value'];\n o.append(arthropod_options[k]['option']);\n avistamiento_text_div_type_select.append(o);\n }\n let avistamiento_text_div_state_label = document.createElement(\"label\");\n avistamiento_text_div_state_label.htmlFor = \"estado-avistamiento\"+i;\n avistamiento_text_div_state_label.append(\"Estado\");\n let avistamiento_text_div_state_select = document.createElement(\"select\");\n avistamiento_text_div_state_select.name = \"estado-avistamiento\";\n avistamiento_text_div_state_select.id = \"estado-avistamiento\"+i;\n avistamiento_text_div_state_select.className = \"unchecked_input\";\n avistamiento_text_div_state_select.required = true;\n avistamiento_text_div_state_select.innerHTML = \"<option value=\\\"\\\">--Elija un estado--</option>\";\n for (let k = 0; k < state_options.length; k++) {\n let o = document.createElement(\"option\");\n o.value = state_options[k][\"value\"];\n o.append(state_options[k][\"option\"]);\n avistamiento_text_div_state_select.append(o);\n }\n avistamiento_text_div.append(\n avistamiento_text_div_type_label, avistamiento_text_div_type_select,\n avistamiento_text_div_state_label, avistamiento_text_div_state_select\n )\n let avistamiento_photo_div = document.createElement(\"div\"); // column with rows of photos photo\n avistamiento_photo_div.className = \"flex_col\";\n let avistamiento_photo_div_text = document.createElement(\"div\");\n avistamiento_photo_div_text.append(\"Foto\");\n let avistamiento_photo_div_div = document.createElement(\"div\"); // row with columns with input and preview\n avistamiento_photo_div_div.className = \"flex_row\";\n avistamiento_photo_div_div.id = \"row_of_photo_divs\"+i;\n add_photo_column_input(avistamiento_photo_div_div, i);\n avistamiento_photo_div.append(avistamiento_photo_div_text, avistamiento_photo_div_div)\n avistamiento_div.append(avistamiento_text_div, avistamiento_photo_div);\n\n new_div.append(datetime_div, lugar_div, avistamiento_div);\n form_main_div.append(new_div);\n\n // now we can generate the region options\n generate_region_options(i);\n\n document.getElementById(\"region\"+i).addEventListener('change', function () {display_comuna_options_k(i);})\n\n if (i > 0) {\n display_comuna_options_k(i); // usually, we would wait until the user to select a region, but it's already preset\n sector_div_select.value = document.getElementById(\"sector0\").value;\n }\n}", "function handleSubmit(e) {\n // function to create a new contact and then close the model\n e.preventDefault();\n createContact(idRef.current.value,nameRef.current.value);\n closeModal();\n\n // create contact\n }", "function prepareFormModal(accion,form){\n removeInputId(form);\n removeValidateForm(form);\n form.reset();\n let textoAccion = \"\";\n if(accion == 'create'){\n textoAccion = \"Registrar\";\n $(\"#btn-store\").show();\n $(\"#btn-update\").hide();\n $(\".only-edit\").hide();\n $(\".only-create\").show();\n }else{\n textoAccion = \"Actualizar\";\n $(\"#btn-update\").show();\n $(\"#btn-store\").hide();\n $(\".only-edit\").show();\n $(\".only-create\").hide();\n }\n\n $(\".modal-header .modal-title span\",form).text(textoAccion);\n}", "function createProjectsDialog() {\n\tvar projects = getProjects();\n\tconsole.log(projects);\n\t\n\t// If there are no projects, show the Create New Project form\n\tif (projects.projects.length == 0) {\n\t\tconsole.log(' There are no projects ');\n\t\tshowNewProjectForm();\n\t}\n\telse { // If there is at least one project, show the Select Project form.\n\t\tconsole.log(' There are ' + projects.projects.length + ' projects');\n\t\tshowSelectProjectForm();\n\t}\n}", "function loginDiv(){\n var emailAddress = gui.textInput(\"Email Address:\",\"emailAddressLogin\");\n var password = gui.textInput(\"Password:\",\"passwordLogin\",true);\n var submit = gui.buttonInput(\"Log in\",\"loginSubmit\");\n var resetPassword = gui.buttonInput(\"Reset password\",\"resetPassword\");\n var cancel = gui.buttonInput(\"Cancel\",\"cancelSubmit\");\n var formItems = [\n emailAddress ,\n password ,\n submit ,\n resetPassword ,\n cancel\n ];\n var corner = true;\n return gui.createForm(\"loginDiv\",formItems,corner);\n}", "function makeCreditDialog(id){\n\t$(\"body\").append(\"<div id='creditForm\"+id+\"' class='creditDiv'><h2>Credit</h2><form id='credit-form-form'><label>Total:</label>\"+currencyStmbol+\"<input id='creditTotalDollarsEntered' type='number' step='1' value='0' min='0'/>.<input id='creditTotalCentsEntered' type='number' step='1' value='0' min='0' max='99'/><label>Credit From:</label><input type='text' id='creditFromEntered'/><label>Notes:</label><textarea rows='4' cols='20' id='creditNotesEntered'/><label>Date:</label><input type='date' id='creditDateEntered'/></form></div>\");\n}", "function buildAddPlayer() {\n var pane = buildBaseForm(\"Add a new player account\", \"javascript: addPlayer()\");\n var form = pane.children[0];\n\n form.appendChild(buildBasicInput(\"player_username\", \"Username\"));\n form.appendChild(buildPasswordInput(\"player_password\", \"Password\"));\n form.appendChild(buildPasswordInput(\"player_password_confirm\", \"Password (Confirmation)\"));\n\n var birthdateLabel = document.createElement(\"span\");\n birthdateLabel.className = \"form_label\";\n birthdateLabel.textContent = \"Birthdate\";\n form.appendChild(birthdateLabel);\n\n form.appendChild(buildDateInput(\"player_birthdate\"));\n\n var countryLabel = document.createElement(\"span\");\n countryLabel.className = \"form_label\";\n countryLabel.textContent = \"Country\";\n form.appendChild(countryLabel);\n\n\n form.appendChild(buildSelector(\"player_country\", Object.keys(countries)));\n form.appendChild(buildBasicSubmit(\"Add\"));\n}", "function create_form_onChange(self, new_v, old_v)\n {\n var $form = $$(build_name(self, \"create_form\"));\n var changed = $form.isDirty();\n if(changed) {\n var btn = $$(build_name(self, \"create_record\"));\n webix.html.addCss(btn.getNode(), \"icon_color_submmit\");\n btn = $$(build_name(self, \"discard_record\"));\n webix.html.addCss(btn.getNode(), \"icon_color_cancel\");\n }\n }", "buildForm() {\n const form = build.elementWithText(\"form\", \"\", \"friendForm\", \"inputForm\");\n\n form.appendChild(build.fieldset(\"Search for a friend\", \"text\", \"friend\"));\n\n let formSubmitButton = build.button(\"postMessageButton\", \"Post Message\", \"saveButton\");\n formSubmitButton.addEventListener(\"click\", action.handleFriendSearch);\n form.appendChild(formSubmitButton);\n\n return form;\n}", "function createForm() {\n var form = FormApp.create('Temperature Data Trends');\n form.addTextItem().setTitle('UserID').setRequired(true);\n // Will need to manually add validation after this is created!\n form.addTextItem().setTitle('Temperature (F)').setRequired(true);\n \n var feelingItem = form.addMultipleChoiceItem().setTitle('Feeling').setRequired(true); \n var symptomsPage = form.addPageBreakItem().setTitle('Do you have any of these symptoms?');\n var wellChoice = feelingItem.createChoice('Well', FormApp.PageNavigationType.SUBMIT);\n var sickChoice = feelingItem.createChoice('Sick', symptomsPage);\n feelingItem.setChoices([wellChoice, sickChoice]);\n \n var symptomsCheckbox = form.addCheckboxItem().setTitle('Symptoms');\n symptomsCheckbox.setChoices([symptomsCheckbox.createChoice('Extreme tiredness'),\n symptomsCheckbox.createChoice('Muscle pain'),\n symptomsCheckbox.createChoice('Headache'), \n symptomsCheckbox.createChoice('Sore throat'), \n symptomsCheckbox.createChoice('Vomiting'), \n symptomsCheckbox.createChoice('Diarrhea'), \n symptomsCheckbox.createChoice('Rash'), \n symptomsCheckbox.createChoice('Unexplained bleeding'), \n symptomsCheckbox.createChoice('Taking pain relievers')]);\n \n \nLogger.log('Published URL: ' + form.getPublishedUrl());\nLogger.log('Editor URL: ' + form.getEditUrl());\n}", "function launchNPCEditForm() {\n $(\"npc-legend-form\").innerHTML = \"Edit NPC\";\n\tshowElement(\"npc-form\");\n\tshowElement(\"npc-edit-buttons\");\n hideElement(\"npc-create-buttons\");\n $(\"npc-monster-name\").value = characters[npcEdit].name;\n $(\"npc-race\").value = characters[npcEdit].race;\n\t$(\"npc-passive-perception\").value = characters[npcEdit].passivePerception;\n\t$(\"npc-armor-class\").value = characters[npcEdit].armorClass;\n $(\"npc-dexterity\").value = characters[npcEdit].dexterity;\n $(\"npc-hit-points\").value = characters[npcEdit].hitPoints;\n $(\"npc-hit-dice\").value = characters[npcEdit].hitDice;\n $(\"npc-modifier\").value = characters[npcEdit].hpModifier;\n\t$(\"npc-page-number\").value = characters[npcEdit].pageNumber;\n\tif (characters[npcEdit].formID != \"\") {\n\t\t$(characters[npcEdit].formID).checked = true;\n\t}\n}", "constructor(parent) {\n this.parent = parent;\n this.form = this.createForm();\n }", "function inquireForm() {\n inquirer.prompt([\n {\n name: \"supervisorQ\",\n message: \"Select an Action\",\n type: \"list\",\n choices: [\"View Product Sales by Department\", \"Create New Department\",\"Close Application\"]\n }\n ]).then(function (answers) {\n var answer = answers.supervisorQ;\n switch (answer) {\n\n case \"View Product Sales by Department\":\n displayDepartments();\n break;\n \n case \"Create New Department\":\n addDepartment();\n break;\n\n case \"Close Application\":\n console.log(\"Good bye!\");\n connection.end();\n break;\n\n default:\n console.log(\"Please try again or contact your Server Administrator\");\n inquireForm();\n break;\n } \n });\n}", "createBoard() {\n commonActions.click(this.createNewBoardButton);\n return new dashboardForm();\n }", "function onCreateCourse() {\n dialogCreateCourse.showModal();\n }", "function openCaseForm(caseID)\n{\n // If the case exists, display the correct data\n if (typeof caseList[caseID] !== 'undefined') {\n document.getElementById('caseFormName').value = caseList[caseID].name;\n document.getElementById('caseInfoInput').value = caseList[caseID].info;\n }\n\n // If the case being created is new and in the correct spot, reset the form\n else if (caseID === caseList.length)\n {\n document.getElementById('caseForm').reset();\n }\n\n // Otherwise, display an error\n else if (caseID >= caseList.length)\n {\n popupDialog('Error!', 'Case does not exist. Create a new case.');\n return;\n }\n caseIDText = caseID;\n displayElement('caseFormPopup');\n}", "function _openDialog( pDialog ) {\n var lWSDlg$, lTitle, lId,\n lButtons = [{\n text : MSG.BUTTON.CANCEL,\n click : function() {\n lWSDlg$.dialog( \"close\" );\n }\n }];\n\n function _displayButton(pAction, pLabel, pHot, pClose ) {\n var lLabel, lStyle;\n\n if ( pLabel ) {\n lLabel = pLabel;\n } else {\n lLabel = MSG.BUTTON.APPLY;\n }\n if ( pHot ) {\n lStyle = 'ui-button--hot';\n }\n lButtons.push({\n text : lLabel,\n class : lStyle,\n click : function() {\n that.actions( pAction );\n if ( pClose ) {\n lWSDlg$.dialog( \"close\" );\n }\n }\n });\n }\n\n if ( pDialog==='WEBSHEET' ) {\n lTitle = MSG.DIALOG_TITLE.PROPERTIES;\n _displayButton( 'websheet_properties_save', null, true, false );\n } else if ( pDialog==='ADD_COLUMN' ) {\n lTitle = MSG.DIALOG_TITLE.ADD_COLUMN;\n _displayButton( 'column_add', null, true, false );\n } else if ( pDialog==='COLUMN_PROPERTIES' ) {\n lTitle = MSG.DIALOG_TITLE.COLUMN_PROPERTIES;\n _displayButton( 'column_properties_save', null, true, false );\n } else if ( pDialog==='LOV' ) {\n lTitle = MSG.DIALOG_TITLE.LOV;\n lId = apex.item( \"apexir_LOV_ID\" ).getValue();\n if ( lId ) {\n _displayButton( 'lov_delete', MSG.BUTTON.DELETE, false, false );\n }\n _displayButton( 'lov_save', null, true, false );\n } else if ( pDialog==='GROUP' || pDialog==='GROUP2' ) {\n lTitle = MSG.DIALOG_TITLE.COLUMN_GROUPS;\n lId = apex.item( \"apexir_GROUP_ID\" ).getValue();\n if ( lId ) {\n _displayButton( 'column_groups_delete', MSG.BUTTON.DELETE, false, false );\n }\n _displayButton( 'column_groups_save', null, true, false );\n } else if ( pDialog==='VALIDATION' ) {\n lTitle = MSG.DIALOG_TITLE.VALIDATION;\n lId = apex.item( \"apexir_VALIDATION_ID\" ).getValue();\n if ( lId ) {\n _displayButton( 'VALIDATION_DELETE', MSG.BUTTON.DELETE, false, false );\n }\n _displayButton( 'VALIDATION_SAVE', null, true, false );\n } else if ( pDialog==='REMOVE_COLUMN' ) {\n lTitle = MSG.DIALOG_TITLE.DELETE_COLUMNS;\n _displayButton( 'column_remove', MSG.BUTTON.DELETE, true, false );\n } else if ( pDialog==='SET_COLUMN_VALUE' ) {\n lTitle = MSG.DIALOG_TITLE.SET_COLUMN_VALUES;\n _displayButton( 'set_column_value', null, true, false );\n } else if ( pDialog==='REPLACE' ) {\n lTitle = MSG.DIALOG_TITLE.REPLACE;\n _displayButton( 'replace_column_value', null, true, false );\n } else if ( pDialog==='FILL' ) {\n lTitle = MSG.DIALOG_TITLE.FILL;\n _displayButton( 'fill_column_value', null, true, false );\n } else if ( pDialog==='DELETE_ROWS' ) {\n lTitle = MSG.DIALOG_TITLE.DELETE_ROWS;\n _displayButton( 'delete_rows', MSG.BUTTON.DELETE, true, false );\n } else if ( pDialog==='COPY' ) {\n lTitle = MSG.DIALOG_TITLE.COPY_DATA_GRID;\n _displayButton( 'copy', MSG.BUTTON.COPY, true, false );\n } else if ( pDialog==='DELETE' ) {\n lTitle = MSG.DIALOG_TITLE.DELETE_DATA_GRID;\n _displayButton( 'delete_websheet', MSG.BUTTON.DELETE, true, false );\n } else if ( pDialog==='ATTACHMENT' ) {\n lTitle = MSG.DIALOG_TITLE.ADD_FILE;\n _displayButton( 'ATTACHMENT_SAVE', null, true, true );\n } else if ( pDialog==='NOTE' ) {\n lTitle = MSG.DIALOG_TITLE.ADD_NOTE;\n _displayButton( 'NOTE_SAVE', null, true, false );\n } else if ( pDialog==='LINK' ) {\n lTitle = MSG.DIALOG_TITLE.ADD_LINK;\n _displayButton( 'LINK_SAVE', null, true, false );\n } else if ( pDialog==='TAGS' ) {\n lTitle = MSG.DIALOG_TITLE.ADD_TAGS;\n _displayButton( 'TAG_SAVE', null, true, false );\n }\n\n lWSDlg$ = $( \"#a-IRR-dialog-js\", apex.gPageContext$ ).dialog({\n modal : true,\n dialogClass: \"a-IRR-dialog\",\n width : \"auto\",\n height : \"auto\",\n minWidth : \"360\",\n title : lTitle,\n buttons : lButtons,\n close : function() {\n lWSDlg$.dialog( \"destroy\");\n }\n });\n }", "newForm(){\n this.setState({\n type: 'Add',\n id: null,\n avatar: null,\n nameValid: false,\n neighborhoodValid: false,\n formValid: false,\n counter: 0,\n neighborhood: {\n name: 'Choose Neighborhood'\n }\n })\n }", "function dialogCreateNotesSubmit(form, parent_type, parent_id){\n if(!check_form('EditView')){\n return false;\n }\n\n var data = $(form).serializeArray();\n data.push({name:'ajaxRequest', value:1});\n data.push({name:'from', value:'diaglog'});\n data.push({name:'parent_type', value:parent_type});\n data.push({name:'parent_id', value:parent_id});\n\n $.ajax({\n async:true,\n cache:true,\n url: $(form).attr('action'),\n type: $(form).attr('method'),\n data: data,\n dataType: 'html',\n timeout:15000,\n beforeSend:function(){\n showTip('Loading...');\n },\n success: function(data){\n showTip('Saved.');\n \n //refresh notes list\n refreshNotesList(parent_type, parent_id);\n \n $('#create_new_notes').dialog('close');\n return false;\n }\n });\n\n return false;\n}", "function buildUI() {\n showForms();\n const config = {removePlugins: [ 'Heading', 'List' ]};\n ClassicEditor.create(document.getElementById('message-input'), config );\n fetchAboutMe();\n}", "function FillForm() {\r\n}", "create() {\n this.id = 0;\n this.familyName = null;\n this.givenNames = null;\n this.dateOfBirth = null;\n\n this.validator.resetForm();\n $(\"#form-section-legend\").html(\"Create\");\n this.sectionSwitcher.swap('form-section');\n }", "function openAddQuesForm(sq_id,question_type,section_header,signature) {\r\n\t//Only super users can add/edit \"sql\" fields\r\n\tif (!super_user && question_type == 'sql') {\r\n\t\tsimpleDialog(langOD18, langOD17);\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t//Reset the form before we open it\r\n\tresetAddQuesForm();\r\n\t\r\n\t// In case someone changes a Section Header to a normal field, note this in a hidden field\r\n\t$('#wasSectionHeader').val(section_header);\r\n\t\r\n\t//Open Add Question form\r\n\tif (question_type == \"\" && section_header == 0) {\r\n\t\tdocument.getElementById('sq_id').value = \"\";\r\n\t\tdocument.getElementById(\"field_name\").removeAttribute(\"readonly\");\r\n\t\t// Add SQL field type for super users\r\n\t\tif (super_user) {\r\n\t\t\tif ($('#field_type option[value=\"sql\"]').length < 1) $('#field_type').append('<option value=\"sql\">'+langOD19+'</option>');\r\n\t\t}\r\n\t\t// Make popup visible\r\n\t\topenAddQuesFormVisible(sq_id);\r\n\t\t// If we're adding a field before or after a SH, then remove SH as an option in the drop-down Field Type list\r\n\t\tif (sq_id.indexOf('-sh') > -1 || $('#'+sq_id+'-sh-tr').length) {\r\n\t\t\tif ($('#field_type').val() == 'section_header') $('#field_type').val('');\r\n\t\t\t$('#field_type option[value=\"section_header\"]').wrap('<span>').hide(); // Wrap in span in order to hide for IE/Safari\r\n\t\t}\r\n\t\t// For non-obvious reasons, Firefox 4 will sometimes leave old text inside the textarea boxes in the dialog pop-up when opened, \r\n\t\t// so clear out after it's visible just to be safe.\r\n\t\tdocument.getElementById('field_label').value = '';\r\n\t\tif (document.getElementById('element_enum') != null) document.getElementById('element_enum').value = '';\r\n\t\t// Customize pop-up window\r\n\t\t$('#div_add_field').dialog('option', 'title', '<span style=\"color:#800000;font-size:15px;\">'+addNewFieldMsg+'</span>');\r\n\t\tif ($('#field_type').val().length < 1) {\r\n\t\t\t$('#div_add_field').dialog(\"widget\").find(\".ui-dialog-buttonpane\").hide();\r\n\t\t} else {\r\n\t\t\t$('#div_add_field').dialog(\"widget\").find(\".ui-dialog-buttonpane\").show();\r\n\t\t}\r\n\t\t// Call function do display/hide items in pop-up based on field type\r\n\t\tselectQuesType();\r\n\t\t\r\n\t//Pre-fill form if editing question\r\n\t} else {\r\n\t\r\n\t\t// If field types \"sql\", \"advcheckbox\" (i.e. Easter eggs) are used for this field, \r\n\t\t// add it specially to the drop-down, but do not show otherwise.\r\n\t\tif (question_type == 'sql' || super_user) {\r\n\t\t\tif ($('#field_type option[value=\"sql\"]').length < 1) $('#field_type').append('<option value=\"sql\">'+langOD19+'</option>');\r\n\t\t} else if (question_type == 'advcheckbox') {\r\n\t\t\tif ($('#field_type option[value=\"advcheckbox\"]').length < 1) $('#field_type').append('<option value=\"advcheckbox\">'+langOD20+'</option>');\r\n\t\t}\r\n\t\t// Show the progress bar\r\n\t\tshowProgress(1);\r\n\t\t// Set sq_id\r\n\t\tdocument.getElementById('sq_id').value = sq_id;\r\n\t\t// Set field type ('file' and 'signature' fields are both 'file' types)\r\n\t\t$('#isSignatureField').val(signature);\r\n\t\tif (question_type == 'file') {\r\n\t\t\t$('#field_type option[value=\"file\"]').each(function(){\r\n\t\t\t\tif ($(this).attr('sign') == signature) {\r\n\t\t\t\t\t$(this).attr('selected', true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tdocument.getElementById('field_type').value = question_type;\r\n\t\t}\r\n\t\t// Call function do display/hide items in pop-up based on field type\r\n\t\tselectQuesType();\r\n\t\t// AJAX call to get question values for pre-filling\r\n\t\t$.get(app_path_webroot+\"Design/edit_field_prefill.php\", { pid: pid, field_name: sq_id },\r\n\t\t\tfunction(data) {\r\n\t\t\t\t//Eval the javascript passed from AJAX and pre-fill form\r\n\t\t\t\teval(data);\r\n\t\t\t\t//If error occurs, stop here\r\n\t\t\t\tif (typeof ques == 'undefined') {\r\n\t\t\t\t\t// Close progress\r\n\t\t\t\t\t$('#fade').dialog('destroy');\r\n\t\t\t\t\tdocument.getElementById('working').style.display = 'none';\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// Set field type drop-down vlaue\r\n\t\t\t\tif ((question_type == \"radio\" || question_type == \"checkbox\") && ques['grid_name'] != '') {\t\t\r\n\t\t\t\t\t// If is a Matrix formatted checkbox or radio, set field type drop-down as \"in a Matrix/Grid\"\t\t\r\n\t\t\t\t\t$('#dd_'+question_type+'grid').attr('selected',true);\r\n\t\t\t\t\t// Call this function again to now catch any Matrix specific setup\r\n\t\t\t\t\tselectQuesType();\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t// Remove all options in matrix group drop-down (except the first blank option)\r\n\t\t\t\t$('#grid_name_dd option').each(function(){\r\n\t\t\t\t\tif ($(this).val().length > 0) {\r\n\t\t\t\t\t\t$(this).remove();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t// Set matrix group name drop-down options (from adjacent fields)\r\n\t\t\t\tvar grid_names = ques['adjacent_grid_names'].split(',');\r\n\t\t\t\tfor (var i=0; i<grid_names.length; i++) {\t\r\n\t\t\t\t\t$('#grid_name_dd').append(new Option(grid_names[i],grid_names[i]));\r\n\t\t\t\t}\r\n\t\t\t\t// Set value for either matrix group drop-down or input field (if field's group name exists in drop-down, then select drop-down)\r\n\t\t\t\t// if (ques['grid_name'] != '') {\r\n\t\t\t\t\t// $('#grid_name_text').val(ques['grid_name']);\r\n\t\t\t\t// }\r\n\t\t\t\t// matrixGroupNameTextBlur();\r\n\t\t\t\t// Value DOM elements from AJAX response values\r\n\t\t\t\tdocument.getElementById('field_name').value = ques['field_name'];\r\n\t\t\t\tdocument.getElementById('field_note').value = ques['element_note'];\t\t\t\t\r\n\t\t\t\tdocument.getElementById('field_req').value = ques['field_req'];\r\n\t\t\t\tdocument.getElementById('field_phi').value = ques['field_phi'];\r\n\t\t\t\tdocument.getElementById('custom_alignment').value = ques['custom_alignment'];\r\n\t\t\t\t// Clean-up: Loop through all hidden validation types (listed as not 'visible' from db table) and hide each UNLESS field has this validation (Easter Egg)\r\n\t\t\t\tfor (i=0;i<valTypesHidden.length;i++) {\r\n\t\t\t\t\tvar thisHiddenValType = $('#val_type option[value=\"'+valTypesHidden[i]+'\"]');\r\n\t\t\t\t\tif (valTypesHidden[i].length > 0 && thisHiddenValType.length > 0) {\r\n\t\t\t\t\t\tthisHiddenValType.remove();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Add hidden validation type to drop-down, if applicable\r\n\t\t\t\tif (question_type == 'text' && ques['element_validation_type'] != '') {\r\n\t\t\t\t\tif (in_array(ques['element_validation_type'],valTypesHidden)) {\r\n\t\t\t\t\t\t$('#val_type').append('<option value=\"'+ques['element_validation_type']+'\">'+ques['element_validation_type']+'</option>');\r\n\t\t\t\t\t\t$('#val_type').val(ques['element_validation_type']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//\r\n\t\t\t\tif (document.getElementById('question_num') != null) document.getElementById('question_num').value = ques['question_num'];\r\n\t\t\t\tif (question_type == \"slider\") {\r\n\t\t\t\t\tdocument.getElementById('slider_label_left').value = ques['slider_label_left'];\t\t\t\t\r\n\t\t\t\t\tdocument.getElementById('slider_label_middle').value = ques['slider_label_middle'];\r\n\t\t\t\t\tdocument.getElementById('slider_label_right').value = ques['slider_label_right'];\r\n\t\t\t\t\tdocument.getElementById('slider_display_value').checked = (ques['element_validation_type'] == 'number');\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (ques['element_validation_type'] == 'float') {\r\n\t\t\t\t\t\tques['element_validation_type'] = 'number';\r\n\t\t\t\t\t} else if (ques['element_validation_type'] == 'int') {\r\n\t\t\t\t\t\tques['element_validation_type'] = 'integer';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdocument.getElementById('val_type').value = ques['element_validation_type'];\t\t\t\t\r\n\t\t\t\t\tdocument.getElementById('val_min').value = ques['element_validation_min'];\r\n\t\t\t\t\tdocument.getElementById('val_max').value = ques['element_validation_max'];\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t// If has file attachment\r\n\t\t\t\tif (question_type == \"descriptive\" && ques['edoc_id'].length > 0) {\t\t\t\t\r\n\t\t\t\t\t$('#edoc_id').val(ques['edoc_id']);\r\n\t\t\t\t\t$('#div_attach_upload_link').hide();\r\n\t\t\t\t\t$('#div_attach_download_link').show();\r\n\t\t\t\t\tif (ques['attach_download_link'] != null) {\r\n\t\t\t\t\t\t$('#attach_download_link').html(ques['attach_download_link']);\r\n\t\t\t\t\t\tcheckAttachImg(ques['attach_download_link'],ques['edoc_display_img']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// If a section header, close out all other fields except Label\r\n\t\t\t\tif (section_header) {\r\n\t\t\t\t\tif (document.getElementById('question_num') != null) document.getElementById('question_num').value = '';\r\n\t\t\t\t\tdocument.getElementById('field_type').value = \"section_header\";\r\n\t\t\t\t\tselectQuesType();\r\n\t\t\t\t\tdocument.getElementById('field_name').value = '';\r\n\t\t\t\t}\r\n\t\t\t\t// Determine if need to show Min/Max validation text boxes\r\n\t\t\t\thide_val_minmax($('#val_type'));\r\n\t\t\t\t// If field is the Primary Key field, then disable certain attributes in Edit Field pop-up\r\n\t\t\t\tif (document.getElementById('field_name').value == table_pk) {\r\n\t\t\t\t\t// Disable certain attributes\r\n\t\t\t\t\t$('#field_type').val('text').prop('disabled', true);\r\n\t\t\t\t\tdocument.getElementById('div_field_req').style.display='none';\r\n\t\t\t\t\tdocument.getElementById('div_branching').style.display='none';\r\n\t\t\t\t\tdocument.getElementById('div_field_note').style.display='none';\r\n\t\t\t\t\tdocument.getElementById('div_custom_alignment').style.display='none';\r\n\t\t\t\t\tdocument.getElementById('div_pk_field_info').style.display='block';\t\t\t\t\t\r\n\t\t\t\t\t// If record auto-numbering is enabled, then disable validation drop-down\r\n\t\t\t\t\tif (auto_inc_set) $('#val_type').val('').prop('disabled', true);\r\n\t\t\t\t}\r\n\t\t\t\t// Close progress\r\n\t\t\t\t$('#fade').dialog('destroy');\r\n\t\t\t\tdocument.getElementById('working').style.display = 'none';\r\n\t\t\t\t//Open Edit Question form\t\t\t\r\n\t\t\t\tif (status != 0) {\r\n\t\t\t\t\tdocument.getElementById(\"field_name\").setAttribute(\"readonly\", \"true\"); \r\n\t\t\t\t} else {\r\n\t\t\t\t\tdocument.getElementById(\"field_name\").removeAttribute(\"readonly\");\r\n\t\t\t\t}\r\n\t\t\t\t// Open dialog\r\n\t\t\t\topenAddQuesFormVisible(sq_id);\r\n\t\t\t\t$('#div_add_field').dialog('option', 'title', '<span style=\"color:#800000;font-size:15px;\">'+editFieldMsg+'</span>');\r\n\t\t\t\t// For non-obvious reasons, Firefox 4 will sometimes clear out the textarea boxes in the dialog pop-up when opened, \r\n\t\t\t\t// so pre-fill them after it's visible just to be safe.\r\n\t\t\t\tif (section_header) {\r\n\t\t\t\t\tdocument.getElementById('field_label').value = ques['element_preceding_header'].replace(/<br>/gi,\"\\n\");\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdocument.getElementById('field_label').value = ques['element_label'].replace(/<br>/gi,\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\tif (question_type == \"slider\") {\r\n\t\t\t\t\tdocument.getElementById('element_enum').value = '';\r\n\t\t\t\t} else {\t\t\r\n\t\t\t\t\tdocument.getElementById('element_enum').value = ques['element_enum'];\r\n\t\t\t\t\t// Add raw coded enums to hidden field\r\n\t\t\t\t\tdocument.getElementById('existing_enum').value = ques['existing_enum'];\r\n\t\t\t\t}\r\n\t\t\t\t// Run the code to select radios after dialog is set because IE will not set radios correctly when done beforehand\r\n\t\t\t\tif (ques['field_req'] == '1') {\r\n\t\t\t\t\tdocument.getElementById('field_req1').checked = true;\r\n\t\t\t\t\tdocument.getElementById('field_req0').checked = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdocument.getElementById('field_req0').checked = true;\r\n\t\t\t\t\tdocument.getElementById('field_req1').checked = false;\r\n\t\t\t\t}\r\n\t\t\t\tif (ques['field_phi'] == '1') {\r\n\t\t\t\t\tdocument.getElementById('field_phi1').checked = true;\r\n\t\t\t\t\tdocument.getElementById('field_phi0').checked = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdocument.getElementById('field_phi0').checked = true;\r\n\t\t\t\t\tdocument.getElementById('field_phi1').checked = false;\r\n\t\t\t\t}\r\n\t\t\t\t//Disable field_name field if appropriate\r\n\t\t\t\tif (status != 0) {\r\n\t\t\t\t\t$.get(app_path_webroot+\"Design/check_field_disable.php\", { pid: pid, field_name: $('#field_name').val() },\r\n\t\t\t\t\t\tfunction(data) {\r\n\t\t\t\t\t\t\tif (data == '0') {\r\n\t\t\t\t\t\t\t\tdocument.getElementById(\"field_name\").removeAttribute(\"readonly\");\r\n\t\t\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\t\t\t}\r\n\t\t);\t\t\r\n\t}\r\n}", "function validate_addHelp() {\n\n BootstrapDialog.show({\n type: BootstrapDialog.TYPE_DANGER,\n title: \"Recuperar Contraseña.\",\n message: \"¿Tus datos son correctos?.\",\n buttons: [{\n label: 'Cerrar',\n action: function (dialogItself) {\n dialogItself.close();\n }\n }, {\n cssClass: 'btn-warning',\n label: 'Guardar',\n action: function () {\n formHelp_add();\n }\n }]\n });\n\n return false;\n\n}", "function createForm(idInput,inputItemArray,corner){\n // Exceptions (one is later)\n if (typeof idInput!='string'){\n throw \"createForm: idInput must be string. Found \" + (typeof idInput) + \".\";\n }\n if (typeof inputItemArray!='object' || !(inputItemArray instanceof Array)){\n if (typeof inputItemArray!='object'){\n throw \"createForm: inputItemArray must be an array. Received \" + (typeof inputItemArray) + \".\";\n } else {\n throw \"createForm: inputItemArray must be an array. Received \" + (inputItemArray.constructor.name) + \".\";\n }\n }\n if (typeof corner!='boolean' && typeof corner!='undefined'){\n throw \"createForm: corner must be boolean or undefined.\";\n }\n if (typeof corner=='undefined') corner=false;\n var i,len;\n var type;\n var htmlOutput = `<div class=\"form\" id=\"${idInput}\">`;\n for (i=0,len=inputItemArray.length;i<len;i++){\n // Exception\n if (typeof inputItemArray[i] !='object' || typeof inputItemArray[i]['objClass']!='string' || inputItemArray[i]['objClass']!='Input'){\n throw `createForm: Item ${i} is not an Input object.`;\n }\n type = inputItemArray[i]['type'];\n var createSpace = true;\n switch(type){\n case \"text\":\n htmlOutput += createTextInputDiv(inputItemArray[i]);\n break;\n case 'droplist':\n htmlOutput += createDroplistInputDiv(inputItemArray[i]);\n break;\n case 'timezoneDroplist':\n htmlOutput += createTimezoneDroplistInputDiv(inputItemArray[i]);\n break;\n case 'button':\n htmlOutput += createButtonInputDiv(inputItemArray[i]);\n break;\n case 'textItem':\n htmlOutput += createTextItemDiv(inputItemArray[i]);\n createSpace = false;\n break;\n case 'invisible':\n htmlOutput += createInvisibleInputDiv(inputItemArray[i]);\n createSpace = false;\n break;\n default:\n throw `Unknown input type: ${type}.`;\n }\n // Create divs underneath (for messages).\n if (createSpace){\n var idDum = inputItemArray[i]['id'];\n htmlOutput += `\n <div class=\"formSpace\">\n <div class=\"formSidePadding\"><p>&nbsp;</p></div>\n <div class=\"formLabel\"><p>&nbsp;</p></div>\n <div class=\"formValue\" id=\"${idDum}Message\">&nbsp;</div>\n <div class=\"formSidePadding\"><p>&nbsp;</p></div>\n </div>\n `;\n }\n \n }\n\n htmlOutput+=\"</div>\";\n var formContainer = (corner) ? \"formContainerCorner\" : \"formContainer\";\n htmlOutput = `<div class=\"${formContainer}\">${htmlOutput}</div>`;\n return htmlOutput;\n }", "render() {\n return (\n <div className=\"div-add-notes\">\n <Button \n className=\"button-add-notes\"\n variant=\"fab\" \n color=\"primary\" \n aria-label=\"Add\" \n onClick={this.handleClickOpen}\n >\n <AddIcon/>\n </Button>\n <Dialog \n open={this.state.open}\n onClose={this.handleClose}\n aria-labelledby=\"form-dialog-title\"\n >\n <DialogTitle id=\"form-dialog-title\">Nova Atividade </DialogTitle>\n <DialogContent className=\"add-notes-dialog\">\n <DialogContentText>\n Título da sua atividade\n </DialogContentText>\n <TextField\n autoFocus\n margin=\"dense\"\n id=\"name\"\n label=\"Título\"\n type=\"text\"\n fullWidth\n value= {this.state.newTarefaName}\n onChange= {event => this.onNameInputChange(event.target.value)}\n />\n\n <DialogContentText>\n Descreva aqui sua atividade\n </DialogContentText>\n <TextField\n autoFocus\n margin=\"dense\"\n id=\"name\"\n label=\"Descrição\"\n type=\"text\"\n fullWidth\n value= {this.state.newTarefaValue}\n onChange= {event => this.onDescInputChange(event.target.value)}\n />\n\n </DialogContent>\n <DialogActions>\n <Button onClick={this.handleClose} color=\"primary\">\n Cancel\n </Button>\n <Button onClick={this.onAddTarefa} color=\"primary\">\n Adicionar\n </Button>\n </DialogActions>\n </Dialog>\n </div>\n );\n }", "modalForm(){\n\t\t// let's prepare our data\n let specs= this.getSpecs;\n\t\t// (I hate using only letters as variables but let's break the rules for once ! it won't hurt ;) ) \n let l=specs.length;\n let values= this.getValues;\n let t_list = this.getToggles; \n\t\t// in case we actualy have nothing! let's give the modal nothing as in \"\" to loop over it (:))\n if(values == null) values = specs.map( spec => \"\");\n\t\t// this is the form var \n let newForm = '<form id=\"modalForm\" \">';\n\t\t// and here we loop over all the inputs \n for(let i=0; i<l;i++){\n\t\t\t\t// if have a toggle \n if(t_list.indexOf(specs[i])!= -1){ \n\t\t\t\t\t\t// then let's display a toggle \n newForm += '<label>'+specs[i]+'</label><br>';\n \n newForm += '<label class=\"switch\"><input type=\"checkbox\" id=\"chk\" onclick=\"toggleCheck()\" value=\"positive\" checked>';\n newForm += '<span class=\"slider round\"></span></label>';\n }else \n newForm += '<label for=\"'+specs[i]+'\">'+specs[i]+'</label><input type=\"text\" value=\"'+values[i]+'\"><br>';\n\n }\n\t\t// here we close the form and return it \n newForm += '</form>';\n return newForm; \n}", "function newForm(){\r\n let createNew = document.querySelector(\"form\")\r\ncreateNew.innerHTML = `\r\n<input type=\"text\" id=\"userName\" placeholder =\"Enter User Name\" >\r\n<input type=\"text\" id=\"picture\" placeholder =\"Enter Photo URL\"><br>\r\n<input class= \"donebtn\" type=\"button\" value=\"DONE\" onclick=\"adder()\">\r\n<input class= \"cancelbtn\" type=\"button\" value=\"CANCEL\" onclick=\"adder()\"><br>\r\n`\r\n}" ]
[ "0.76364017", "0.6876544", "0.68446994", "0.6825602", "0.67201614", "0.66626805", "0.65998334", "0.6504871", "0.6492423", "0.64827424", "0.64483285", "0.6444652", "0.6433792", "0.64095736", "0.6385686", "0.6385537", "0.63339317", "0.6331208", "0.6310927", "0.6288114", "0.6222063", "0.6220152", "0.61942744", "0.61621225", "0.6143802", "0.6122032", "0.6116893", "0.6115058", "0.6114894", "0.6106221", "0.60868573", "0.60729444", "0.60610807", "0.60457945", "0.6045003", "0.6038846", "0.6038807", "0.60342944", "0.6023756", "0.6019414", "0.60150117", "0.60143226", "0.60121214", "0.6004765", "0.5988629", "0.5971716", "0.5955264", "0.5948084", "0.59445083", "0.59403783", "0.592573", "0.59254164", "0.5917926", "0.5910616", "0.5904917", "0.59034395", "0.58857924", "0.58783156", "0.58626765", "0.58609426", "0.5859172", "0.5828883", "0.5819477", "0.5816491", "0.58074325", "0.58072793", "0.5801812", "0.5793725", "0.5787476", "0.57870877", "0.57846016", "0.5772161", "0.5768693", "0.57605165", "0.5760003", "0.5751251", "0.57474715", "0.57470286", "0.5746197", "0.57349867", "0.5731719", "0.57307833", "0.57254845", "0.57165366", "0.5715781", "0.57101953", "0.5706904", "0.57013035", "0.56992286", "0.5698594", "0.56980705", "0.56979364", "0.5697674", "0.5696023", "0.5687698", "0.5684067", "0.5683748", "0.5679972", "0.56787235", "0.5673996" ]
0.5929561
50
========================================================================= CREATE FORM =========================================================================
function createForm(startDate, endDate, row, missingForms) { var timesheet = getTimesheet(); var folder = getFolder(); updateForm(); var formId = getFormDrive().makeCopy(folder).setName(startDate + ' - ' + endDate + ' | Time Tracking').getId(); var form = FormApp.openById(formId); form.setTitle(startDate + ' - ' + endDate + ' | Time Tracking'); form.setDescription('Enter the percentage of time you have spent on up to 5 main projects you have worked on over this time period ' + startDate + ' - ' + endDate + '. If you have have worked on a project that is not in the list, please specify it in the text box at the bottom. Regardless if you enter time off, always add 100% of your time for projects. We will take into account the days you took time off for. Please do not forget to send your invoice for this time period as well.'); var ss = SpreadsheetApp.create('Responses'); //DELETE RESPONSE var ssId = ss.getId(); var ssFile = DriveApp.getFileById(ssId); ssFile.setTrashed(true); //MOVE RESPONSE var responseId = ssFile.makeCopy(folder).setName(startDate + ' - ' + endDate + ' | Responses').getId(); var response = SpreadsheetApp.openById(responseId); form.setDestination(FormApp.DestinationType.SPREADSHEET, responseId); timesheet.getRange('C:C').getCell(row,1).setValue(form.getPublishedUrl()); timesheet.getRange('D:D').getCell(row,1).setValue(response.getUrl()); if(missingForms < 2) { generateSlackFormLink(startDate, endDate, form.getPublishedUrl()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createForm () {\n if (document.getElementById('leaderboardButton')) {\n document.getElementById('leaderboardButton').remove();\n }\n crDom.createLeaderboardButton();\n crDom.createForm();\n crDom.createCategoriesChoice(this.filter.category);\n crDom.createDifficultyChoice(this.filter.difficulty);\n crDom.createRangeSlider(this.filter.limit);\n crDom.createStartButton();\n }", "function createForm() {\n var formElement = $(\"[name='contactForm']\").empty();\n // Add form elements and their event listeners\n formFields.forEach(function (formField) {\n var labelElement = $(\"<label>\")\n .attr(\"for\", formField.name)\n .text(formField.des);\n formElement.append(labelElement);\n var inputElement = $(\"<input>\")\n .attr(\"type\", formField.type)\n .attr(\"name\", formField.name)\n .attr(\"value\", (anime[formField.name] || \"\"));\n if (formField.required) {\n inputElement.prop(\"required\", true).attr(\"aria-required\", \"true\");\n }\n if (formField.type == \"date\"){\n inputElement.get(0).valueAsDate = new Date(anime[formField.name]);\n }\n formElement.append(inputElement);\n inputElement.on('input', function () {\n var thisField = $(this);\n inputHandler(formField.name, thisField.val());\n });\n // clear the horizontal and vertical space next to the \n // previous element\n formElement.append('<div style=\"clear:both\"></div>');\n });\n if (editForm) {\n addUpdateAndDeleteButtons(formElement);\n } else {\n addNewButton(formElement);\n }\n\n }", "createForm(){\n this.form_ = this.create_();\n }", "function createForm() {\n let form = document.createElement(`form`);\n form.id = `form`;\n document.getElementById(`create-monster`).appendChild(form);\n\n document.getElementById(`form`).appendChild(createInputAndPlaceholder(`input`,`Name`));\n document.getElementById(`form`).appendChild(createInputAndPlaceholder(`input`,`Age`));\n document.getElementById(`form`).appendChild(createInputAndPlaceholder(`input`,`Description`));\n\n let button = document.createElement('button');\n button.innerHTML = `Create`;\n document.getElementById(`form`).appendChild(button);\n\n\n}", "function createForm() {\n // Create the form elements\n var form = createDOMElement('form', {id: 'form'});\n formFields.search = createDOMElement('input', {id: 's'});\n formFields.place = createDOMElement('input', {id: 'p'});\n formFields.recruiter = createDOMElement('input', {id: 'r'});\n formFields.nrOfJobs = createDOMElement('input', {id: 'l'});\n formFields.width = createDOMElement('input', {id: 'w'});\n formFields.radius = createDOMElement('input', {id: 'rad', className: 'radius-selector btn distance'});\n\n // Append them to the form object\n form.appendChild(formFields.search);\n form.appendChild(formFields.place);\n form.appendChild(formFields.recruiter);\n form.appendChild(formFields.nrOfJobs);\n form.appendChild(formFields.width);\n form.appendChild(formFields.radius);\n\n // Place the form in the DOM\n containerTestDiv.appendChild(form);\n }", "function createForm(e){\n var newTaskForm = document.createElement(\"form\");\n newTaskForm.setAttribute(\"id\", \"newTaskForm\");\n newTaskForm.setAttribute(\"class\", \"popup\");\n\n //add a header to the new form\n newTaskForm.innerHTML += \"<h2 id='newTaskFormHeader'>Create New Task</h2>\";\n\n //add form elements\n addTaskBox(newTaskForm);\n addPriorityBox(newTaskForm);\n addDueDate(newTaskForm);\n addDescriptionBox(newTaskForm);\n addButtons(newTaskForm);\n\n //make form draggable\n drag(newTaskForm);\n\n count = 1;\n\n return newTaskForm;\n}", "function createTeamForm () {\n var item = team_form.addMultipleChoiceItem();\n \n // Create form UI\n team_form.setShowLinkToRespondAgain(false);\n team_form.setTitle(name + \" game\");\n team_form.setDescription(\"Game RSVP form\");\n // Set the form items\n item.setTitle(\"Will you attend the game?\");\n item.setChoices([\n item.createChoice(rsvp_opts[0]),\n item.createChoice(rsvp_opts[1]),\n item.createChoice(rsvp_opts[2]),\n item.createChoice(rsvp_opts[3])]);\n team_form.addSectionHeaderItem().setTitle(\n \"Do not change if you want your reply to count.\");\n team_form.addTextItem();\n team_form.addTextItem();\n\n // Attach the form to its destination [spreadsheet]\n team_form.setDestination(destination_type, destination);\n }", "insertForm() {\n this.builder = new Builder(this.container, this.options.template, {\n style: this.options.style,\n formContainerClass: this.options.formContainerClass,\n inputGroupClass: this.options.inputGroupClass,\n inputClass: this.options.inputClass,\n labelClass: this.options.labelClass,\n btnClass: this.options.btnClass,\n errorClass: this.options.errorClass,\n successClass: this.options.successClass,\n });\n this.build();\n }", "function generateForm() {\n let form = document.getElementById('dynamic-form');\n\n window.fields.forEach(field => {\n switch (field.type) {\n case 'radio':\n form.appendChild(radioInput(field));\n break;\n default:\n form.appendChild(textInput(field));\n }\n });\n}", "function formal_field_create(params) {\n var form = params.form;\n var key = params.key;\n var label = params.label;\n var description = params.description;\n var value = params.value;\n var field_type = params.field_type;\n var input_type = params.input_type;\n var has_error = false; // XXX\n var is_required = params.is_required;\n\n var cssid = formal_key_to_cssid(form, key);\n\n var div1 = document.createElement(\"div\");\n var classes = [];\n classes = classes.concat([\"field\"]);\n classes = classes.concat([field_type]);\n classes = classes.concat([input_type]);\n if (is_required) {\n classes = classes.concat([\"required\"]);\n }\n if (has_error) {\n classes = classes.concat([\"error\"]);\n }\n div1.className = classes.join(\" \");\n div1.setAttribute(\"id\", cssid + \"-field\");\n\n var label1 = document.createElement(\"label\");\n label1.className = \"label\";\n label1.setAttribute(\"for\", cssid);\n label1.appendChild(document.createTextNode(label));\n div1.appendChild(label1);\n\n var div2 = document.createElement(\"div\");\n div2.className = \"inputs\";\n div1.appendChild(div2);\n\n var div3 = document.createElement(\"div\");\n div3.className = \"description\";\n if (description == undefined) {\n description = \"\";\n }\n div3.appendChild(document.createTextNode(description));\n div1.appendChild(div3);\n\n /*\n * XXX: the \"widget\" part here has not been implemented fully.\n * Instead of full widget support, we're only able to create\n * inputs of specific types.\n */\n \n // setAttribute must be used instead of element.attribute = \n // The latter does not assign all the attribute values in Safari.\n function __create_text_element() { \n var input_text = document.createElement(\"input\");\n input_text.setAttribute(\"id\", cssid);\n input_text.setAttribute(\"value\", value);\n input_text.setAttribute(\"name\", key);\n input_text.setAttribute(\"type\", \"text\"); // NB: input1.type doesn't work in IE6\n input_text.setAttribute(\"tabIndex\", 1);\n div2.appendChild(input_text);\n }\n\n function __create_semihidden_element() { \n var input_text = document.createElement(\"input\");\n input_text.setAttribute(\"id\", cssid);\n input_text.setAttribute(\"value\", value);\n input_text.setAttribute(\"name\", key);\n input_text.setAttribute(\"type\", \"password\");\n input_text.setAttribute(\"tabIndex\", 1);\n input_text.className = \"semihidden\";\n\n input_text.onfocus = function() { return function() { formal_semi_hidden_password_show(this.id); } } ();\n input_text.onblur = function() { return function() { formal_semi_hidden_password_hide(this.id); } } ();\n\n div2.appendChild(input_text);\n }\n \n function __create_checkbox() {\n var input_checkbox = document.createElement(\"input\");\n input_checkbox.setAttribute(\"type\", \"checkbox\");\n input_checkbox.setAttribute(\"tabIndex\", 1);\n input_checkbox.setAttribute(\"id\", cssid);\n input_checkbox.value = \"True\"; // XXX: seems like value is always true in checkboxes.\n input_checkbox.setAttribute(\"name\", key);\n if (params.checked) {\n /* NB: .checked may be cleared in IE when the node is added or moved in the DOM; workaround using defaultChecked */\n input_checkbox.setAttribute(\"checked\", true);\n input_checkbox.setAttribute(\"defaultChecked\", true);\n }\n div2.appendChild(input_checkbox);\n }\n \n function __create_select_element() {\n var input_select = document.createElement(\"select\");\n input_select.setAttribute(\"tabIndex\", 1);\n input_select.setAttribute(\"id\", cssid);\n input_select.setAttribute(\"name\", key);\n if (params.select_options == null || params.select_options == undefined) {\n alert(\"params.options is null or undefined.\")\n }\n \n for (x in params.select_options) {\n var opt = params.select_options[x]; \n var input_option = document.createElement(\"option\");\n input_option.setAttribute(\"value\", opt.value);\n input_option.appendChild(document.createTextNode(opt.label));\n if (opt.selected) {\n input_option.setAttribute(\"selected\", \"selected\");\n }\n input_select.appendChild(input_option);\n }\n div2.appendChild(input_select);\n }\n \n function __create_radio_group() {\n for (x in params.radiobuttons) {\n var rbutton = params.radiobuttons[x];\n \n /*\n * IE 6 requires a special DOM-insertion of radio buttons. The following code works around that lack of support.\n * XXX: The fix is based to the example shown at: http://www.gtalbot.org/DHTMLSection/DynamicallyCreateRadioButtons.html\n */\n if(document.all && !window.opera && document.createElement) {\n // XXX: Defaultchecked value has not been tested. Currently none of the dynamically created radiobuttons is checked by default.\n var defCheck = rbutton.checked ? \"true\" : \"false\"; \n var input_radio = document.createElement(\"<input type='radio' name='\" + key +\"' id='\"+ cssid + \"-\" + rbutton.id + \"' value='\" + rbutton.value + \"' defaultChecked='\" + defCheck + \"'>\");\n }\n else {\n var input_radio = document.createElement(\"input\"); \n \n input_radio.type = \"radio\";\n input_radio.setAttribute(\"tabIndex\", 1);\n input_radio.setAttribute(\"id\", cssid + \"-\" + rbutton.id);\n input_radio.setAttribute(\"value\", rbutton.value);\n input_radio.setAttribute(\"name\", key);\n\n if (rbutton.checked) {\n /* NB: .checked may be cleared in IE when the node is added or moved in the DOM; workaround using defaultChecked */\n input_radio.setAttribute(\"checked\", true);\n input_radio.setAttribute(\"defaultChecked\", true);\n }\n }\n \n var radio_label = document.createElement(\"label\");\n radio_label.setAttribute(\"for\", cssid + \"-\" + rbutton.id);\n radio_label.appendChild(document.createTextNode(rbutton.label));\n \n div2.appendChild(input_radio);\n div2.appendChild(document.createTextNode(\" \")); // server generates one space here\n div2.appendChild(radio_label);\n div2.appendChild(document.createElement(\"br\"));\n \n }\n }\n \n switch (input_type) {\n case \"textinput\":\n __create_text_element();\n break;\n case \"semihidden\":\n __create_semihidden_element();\n break;\n case \"selectchoice\":\n __create_select_element();\n break;\n case \"radiochoice\":\n __create_radio_group();\n break;\n case \"checkbox\":\n __create_checkbox();\n break;\n default:\n myfatal(\"Unknown input type in formal_field_create: \" + input_type);\n }\n\n return div1;\n}", "function newForm() {\n\n var form = document.createElement(\"form\")\n form.style = \"heigth:100px;width:300px;border-style:solid;border-color:black;border-width:1px\"\n form.id = \"form\"\n\n var ObjLabel = document.createElement(\"label\")\n ObjLabel.textContent = \"Object \"\n\n var ObjInput = document.createElement(\"input\")\n ObjInput.id = \"object-input\"\n ObjInput.name = \"object\"\n ObjInput.type = \"text\"\n ObjInput.placeholder = \"Object name\"\n\n var QtyLabel = document.createElement(\"label\")\n QtyLabel.textContent = \"Quantity \"\n\n var QtyInput = document.createElement(\"input\")\n QtyInput.id = \"quantity-input\"\n QtyInput.name = \"quantity\"\n QtyInput.type = \"text\"\n QtyInput.placeholder = \"Please insert a positive number\"\n\n var submit = document.createElement(\"input\")\n submit.id = \"submit\"\n submit.type = \"button\"\n submit.value = \"Confirm\"\n submit.setAttribute(\"onmousedown\", \"addItems()\")\n\n // adding all items under \"form\" in the DOM tree\n form.appendChild(ObjLabel)\n form.appendChild(ObjInput)\n form.appendChild(document.createElement(\"br\"))\n form.appendChild(QtyLabel)\n form.appendChild(QtyInput)\n form.appendChild(document.createElement(\"br\"))\n form.appendChild(submit)\n\n return form\n}", "function makeForms()\n{\n\t\n\t// Headers\n\t$('fieldset legend').each(function(){\n\t\t$(this).parent().prepend('<h2>'+$(this).css({display:'none'}).html()+'</h2>');\n\t\t\n\t});\n\t\n\t\n\t// Inputs\n\t$('.form input').each(function(){\n\t\t\n\t\tswitch( $(this).attr('type') )\n\t\t{\n\t\t\tcase 'submit':\n\t\t\t\t$(this).addClass('btn btn-large btn-primary');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'number':\n\t\t\tcase 'text':\n\t\t\tcase 'password':\n\t\t\t\t$(this).addClass('input-block-level').attr({\n\t\t\t\t\tplaceholder: $(this).parent().find('label').css({display:'none'}).html()\n\t\t\t\t}); \n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t});\n\t\n\t// textArea\n\t$('.form textarea').each(function(){\n\t\t\n\t\t$(this).addClass('input-block-level').attr({\n\t\t\tplaceholder: $(this).parent().find('label').css({display:'none'}).html()\n\t\t}); \n\t\t\t\t\n\t\t\n\t});\n\t\n\t// Select\n\t$('.form select').each(function(){\n\t\t\n\t\t$(this).addClass('input-block-level').attr({\n\t\t\tplaceholder: $(this).parent().find('label').html()\n\t\t}); \n\t\t\t\t\n\t\t\n\t});\n}", "function createForm(adata, resource, method) {\n\t\tvar formTitle = formatTitle( getCurrentHash() );\n\t\tlet html = `<h3>${ formTitle } - ${ method }</h3>`;\n\t\tconst fhref = apiU + getCurrentHash();\n\t\t\n\t\t\n html += `\n <p>Please note that all fields marked with an asterisk (*) are required.</p>\n <form\n class=\"resource-form\"\n data-href=\"${resource + '/'}\"\n data-method=\"${escapeAttr(method)}\">\n `;\n\t\t\n //adata = JSON.parse(adata);\n\n for (key in adata.data) {\n\t\t\t\n\t\t\tconst properties = adata.data[key];\n\t\t\tconst name = properties.name;\n\t\t\t\n const title = formatTitle(properties.name);\n\t\t\tconst isInteger = false;\n const isRequired = properties.required;\n\n html += `\n <label>\n ${escapeHtml(title)}\n ${isRequired ? '*' : ''}\n <br>\n <input\n class=\"u-full-width\"\n name=\"${name}\"\n type=\"${isInteger ? 'number' : 'text'}\"\n placeholder=\"${escapeAttr(properties.prompt)}\"\n ${isRequired ? 'required' : ''}>\n </label>\n `;\n }\n\n html += '<br><input class=\"btn waves-effect waves-light\" type=\"submit\" value=\"Submit\">';\n html += '</form>';\n return html;\n }", "function setupForm() {\n var index = 1;\n document.getElementById(\"name\").focus();\n document.getElementById(\"colors-js-puns\").classList.add(\"is-hidden\");\n document.getElementById(\"other-title\").classList.add(\"is-hidden\");\n document.getElementById(\"payment\").selectedIndex = index;\n\n createTotal();\n togglePaymentDiv(index);\n }", "function createFormCntrls() {\n return {\n name: createControl(\n {\n label: \"Name\",\n errorMessage: \"Name is a must field!\"\n },\n { required: true }\n ),\n yearsOfExperience: createControl(\n {\n label: \"My experience in years\",\n errorMessage: \"Experience is a must field!\"\n },\n { required: true }\n ),\n jobs: createControl(\n {\n label: \"Developer position that I'm looking for\",\n errorMessage: \"Position is a must field!\"\n },\n { required: true }\n ),\n location: createControl(\n {\n label: \"My location is\",\n errorMessage: \"Location is a must field!\"\n },\n { required: true }\n ),\n description: createControl(\n {\n label: \"Short description about myself\",\n errorMessage: \"Description is a must field!\"\n },\n { required: true }\n ),\n url: createControl(\n {\n label: \"Link to my LinkedIn profile\",\n errorMessage: \"Link is a must field!\"\n },\n { required: true }\n )\n \n };\n}", "function initForm(){\n\tvar input = document.querySelector(\".gwt-DialogBox input.gwt-TextBox\");\n\t// If no input founded or has already a form\n\tif(!input || input.form){\n\t\treturn;\n\t}\n\n\t// Find table parent\n\tvar table = input.closest(\"table\");\n\n\t// Fail to found a table\n\tif(!table){\n\t\tconsole.error(\"Error: TABLE not found for the given input:\", input);\n\t\treturn;\n\t}\n\n\t//Wrap table with a form to allow input be autofilled\n\tvar form = document.createElement(\"form\");\n\t// Prevent form submit\n\tform.addEventListener(\"submit\", function(event){event.preventDefault();}, false);\n\ttable.parentNode.insertBefore(form, table);\n\tform.appendChild(table);\n\t// To submit the form, find first button (and suppose is the right one) and change its type to a submit button\n\tform.getElementsByTagName(\"button\")[0].setAttribute(\"type\", \"submit\");\n}", "function createBook()\n\t{\t\n\t\tlet elem = text = document.createElement(\"form\");\n\t\telem.id = \"superform\";\n\t\tdocument.body.appendChild(elem); //Adds the form element to the body.\n\t}", "function buildForm() {\n\tdocument.querySelector('h3').after(form);\n\tform.append(containerDivOne);\n\tform.append(containerDivTwo);\n\tform.append(multiplicationBtn);\n\tform.append(divisionBtn);\n\tform.append(clearBtn);\n\tform.append(resultParagraph);\n\tcontainerDivOne.append(inputLabelOne);\n\tcontainerDivTwo.append(inputLabelTwo);\n\tinputLabelOne.after(inputTextOne);\n\tinputLabelTwo.after(inputTextTwo);\n}", "function buildListTitleForm() {\n\tvar node = document.createElement('form')\n\tnode.innerHTML =\n\t\t'<div class=\"newitem-title-wrapper\">' +\n\t\t'<input id=\"trello-list-title-input\" type=\"text\">' +\n\t\t'<input id=\"trello-list-title-submit\" type=\"submit\" value=\"Save\">' +\n\t\t'</div>'\n\tnode.style.display = 'none'\n\treturn node\n}", "function repoForm() {\n return {id:'repo-form',title:'Add your module or theme ...',type:'form',method:'POST',action:'',tabs:false,\n fields:[\n {label:'Name',name:'repo[name]',type:'text',description:'Enter the name of your module or theme (no spaces or invalid chars).'},\n {label:'Type',name:'repo[type]',type:'select',options:[{label:\"Module\",value:\"module\"},{label:\"Theme\",value:\"theme\"},{label:\"Profile\",value:\"profile\"}],description:'What is it?'},\n {label:'Description',name:'repo[description]',type:'textarea',description:'Provide a description so others understand what youre trying to do.'},\n {label:'Author',name:'repo[author]',type:'text',description:'Enter your name.',readonly:false}\n ],\n buttons:[\n {name:'submit',type:'submit',value:'Submit'}\n ]};\n}", "function buildForm(e, t)\n{\n\tvar htmlReference = \"<div id='createForm'>\";\n\thtmlReference += \"<p>Title:</p><input type='text' id='title'/>\";\n\thtmlReference += \"<p><h5 id='type'><span>\" + t + \"</span> >> <select id='category'><option value='Revit'>Revit</option><option value='Rhino'>Rhino</option><option value='AutoCAD'>AutoCAD</option></select> >> \";\n\thtmlReference += \"<select id='subcategory'><option value='Tip'>Tip</option><option value='Reference'>Reference</option></select></h5></p>\";\n\thtmlReference += \"<p>Content:</p><textarea id='content'></textarea>\";\n\thtmlReference += \"<form enctype='multipart/form-data'><input name='file' type='file' style='margin: 10px 0 10px 0;'/>\";\n\thtmlReference += \"<div id='bar'><table><tr><td style='width: 80px;'><input type='button' value='Submit' id='submit' class='create' style='width: 60px;'/></td><td><progress></progress></td></tr></table></div>\";\n\thtmlReference += \"</form></div>\";\n\t// insert the new HTML into the document\n\t$('#main')[0].innerHTML = htmlReference;\n}", "function buildNewForm() {\n return `\n <form id='js-new-item-form'>\n <div>\n <legend>New Bookmark</legend>\n <div class='col-6'>\n <!-- Title -->\n <label for='js-form-title'>Title</label>\n <li class='new-item-li'><input type='text' id='js-form-title' name='title' placeholder='Add Title'></li>\n <!-- Description -->\n <label for='js-form-description'>Description</label>\n <li class='new-item-li'><textarea id='js-form-description' name='description' placeholder=\"Add Description\"></textarea>\n </div>\n <div class='col-6'>\n <!-- URL -->\n <label for='js-form-url'>URL</label>\n <li class='new-item-li'><input type='url' id='js-form-url' name='url' placeholder='starting with https://'></li>\n <!-- Rating -->\n <label for='js-form-rating' id='rating-label'>Rating: </label>\n <select id='js-form-rating' name='rating' aria-labelledby='rating-label'>\n <option value='5' selected>5</option>\n <option value='4'>4</option>\n <option value='3'>3</option>\n <option value='2'>2</option>\n <option value='1'>1</option>\n </select>\n </div>\n <!-- Add button -->\n <div class='add-btn-container col-12'>\n <button type='submit' id='js-add-bookmark' class='add-button'>Click to Add!</button>\n <button type='button' id='js-cancel-bookmark'>Cancel</button>\n </div>\n </div>\n </form>\n `;\n }", "function create_form_page()\n{\n empty_content('content');\n\n const form = document.createElement('form');\n\n let form_inner_html = '';\n\n form_inner_html += \n `\n <div id=\"form_title\">\n Devenez hébergeur pour <i>Merci pour l'invit'</i>'\n </div>\n <p1 id=\"description\">\n Vous avez une chambre libre ? Vous souhaitez devenir hébergeur solidaire et faire \n parti de l'aventure <i> Merci pour l'invit' </i> ? \n <br> <br>\n <i> Merci pour l'invit' </i> est un projet qui prône l'hébergement solidaire afin de faciliter la \n réinsertion socioprofessionnelle de femmes et de jeunes en grande précarité. \n <br> <br>\n <i> Merci pour l'invit' </i> se développe actuellement à BORDEAUX, à PARIS et sa banlieue. \n <br> <br>\n Après avoir rempli ce questionnaire, la responsable \"hébergement\"vous contactera pour \n vous expliquer plus amplement la démarche. La Charte de cohabitation sera signée entre \n vous et la personne accueillie lors du début de l'hébergement. \n <br> <br>\n Vous habitez une autre ville ? N'hésitez pas à remplir ce formulaire, notre équipe \n vous répondra dès que possible. \n <br> <br>\n Ce questionnaire <b>NE VOUS ENGAGE PAS A HEBERGER.</b>\n <br> <br>\n Toutes les informations collectées sont strictement pour l'association, elles ne \n seront pas partagées et ne serviront que pour les besoins du projet.\n <br> <br>\n <m style='color: red; display: inline-block;'> * Champ obligatoire </m>\n </p1>\n `;\n\n let names = ['Nom','Prénom','Genre','Ville','Code Postal','Adresse',\n 'Numéro de téléphone','Adresse mail', \"Nombres d'habitants dans le foyer\"];\n\n for(let i = 0;i < names.length ; i++)\n {\n form_inner_html += create_form_text_holder(names[i]);\n };\n\n let drop_names = [\"Modalités d'hébergement\",\"Durée d'hébergement\"];\n let drop_elements = [[\"Une chambre à part\",\"Canapé-lit\",\"Logement entier\",\"Autre\"],\n [\"Deux semaines\",\"De 1 mois à 3 mois\",\"De 4 mois à 6 mois\",\"6 mois ou plus\"]];\n\n for(let i = 0;i < drop_names.length ; i++)\n {\n form_inner_html += create_form_drop_down(drop_names[i],drop_elements[i]);\n };\n\n names = [\"A partir de quand pouvez-vous recevoir quelqu'un chez vous?\",\n \"Qu'attendez-vous de cette expérience d'accueil ?\", \"Des questions ou commentaires?\"];\n\n let place_holder = ['jj/mm/aaaa','Votre reponse','Votre reponse'];\n\n for(let i = 0;i < names.length ; i++)\n {\n form_inner_html += create_form_text_holder(names[i],place_holder[i]);\n };\n\n form_inner_html += `<div id=\"form_button\">\n <button id=\"envoyer\" type=\"button\">\n Envoyer\n </button>\n </div>`;\n \n form.innerHTML = form_inner_html;\n \n const form_container = document.createElement('div');\n form_container.setAttribute(\"class\",\"form_container\")\n form_container.appendChild(form);\n\n const content = document.querySelector('#content');\n content.innerHTML += create_page_title(\"Formulaire d'héberement\");\n content.appendChild(form_container);\n\n const submit = document.querySelector(\"#envoyer\");\n submit.addEventListener('click', submitForm);\n}", "function createForm (node) { \n let formContainer = document.createElement(\"form\")\n formContainer.id = \"form\"\n let input = document.createElement(\"input\")\n let submit = document.createElement(\"input\")\n submit.type = \"submit\"\n submit.dataset.id = \"submit\"\n input.placeholder = \"name\"\n formContainer.style.display = \"none\"\n formContainer.appendChild(input)\n formContainer.appendChild(submit)\n node.appendChild(formContainer)\n formContainer.addEventListener(\"submit\", formHandler)\n\n }", "function buildAddPlayer() {\n var pane = buildBaseForm(\"Add a new player account\", \"javascript: addPlayer()\");\n var form = pane.children[0];\n\n form.appendChild(buildBasicInput(\"player_username\", \"Username\"));\n form.appendChild(buildPasswordInput(\"player_password\", \"Password\"));\n form.appendChild(buildPasswordInput(\"player_password_confirm\", \"Password (Confirmation)\"));\n\n var birthdateLabel = document.createElement(\"span\");\n birthdateLabel.className = \"form_label\";\n birthdateLabel.textContent = \"Birthdate\";\n form.appendChild(birthdateLabel);\n\n form.appendChild(buildDateInput(\"player_birthdate\"));\n\n var countryLabel = document.createElement(\"span\");\n countryLabel.className = \"form_label\";\n countryLabel.textContent = \"Country\";\n form.appendChild(countryLabel);\n\n\n form.appendChild(buildSelector(\"player_country\", Object.keys(countries)));\n form.appendChild(buildBasicSubmit(\"Add\"));\n}", "build() {\n \n // create the container\n var container = document.createElement('form');\n container.id = this.moduleID;\n container.className = this.moduleClassName;\n\n // create the label\n var textInputLabel = document.createElement('div');\n textInputLabel.className = 'inputLabel';\n textInputLabel.innerHTML = this.moduleLabelText;\n container.appendChild(textInputLabel);\n\n // create the input\n this.input = document.createElement('input');\n this.input.id = this.inputID;\n this.input.setAttribute(\"type\", \"text\");\n container.appendChild(this.input);\n\n return container;\n }", "function createRegistrationForm(){\n registrationForm = new MyForm(\n templates.tNewForm,\n [\n {\n id : 'registrate',\n class : 'btn btn-primary',\n name : 'Registrate',\n action : registrationUser\n },\n {\n id : 'cancel',\n class : 'btn btn-primary',\n name : 'Cancel',\n action : function(e){\n e.preventDefault();\n registrationForm.hide();\n }\n }\n ]\n );\n validation(registrationForm.form);\n }", "createForm() {\n const newForm = document.createElement(\"form\");\n newForm.setAttribute(\"method\", \"GET\");\n newForm.setAttribute(\"action\", \"#\");\n this.parent.appendChild(newForm);\n return newForm;\n }", "buildForm() {\n const form = build.elementWithText(\"form\", \"\", \"friendForm\", \"inputForm\");\n\n form.appendChild(build.fieldset(\"Search for a friend\", \"text\", \"friend\"));\n\n let formSubmitButton = build.button(\"postMessageButton\", \"Post Message\", \"saveButton\");\n formSubmitButton.addEventListener(\"click\", action.handleFriendSearch);\n form.appendChild(formSubmitButton);\n\n return form;\n}", "function createEmptyForm(){\r\n\t\tvar newGiftForm=$('<form class=newGiftForm></form>')\r\n\t\tnewGiftForm.append($('<input type=\"text\" name=\"newGiftName\" placeholder=\"Nazwa prezentu\">'))\r\n\t\tnewGiftForm.append($('<p>Liczba punktów</p>'))\r\n\t\tnewGiftForm.append($('<span class=\"less\">-</span>'))\r\n\t\tnewGiftForm.append($('<input type=\"number\" name=\"newGiftPoints\" placeholder=\"Liczba punktów\">'))\r\n\t\tnewGiftForm.append($('<span class=\"more\">+</span>'))\r\n\r\n\t\r\n\t\treturn newGiftForm;\r\n\t}", "function createForm() {\n let form = document.createElement(\"form\");\n form.id = \"formBook\";\n form.className = \"bookForm\"\n\n let title = document.createElement(\"input\")\n title.setAttribute(\"type\", \"text\")\n title.setAttribute(\"name\", \"booktitle\")\n title.setAttribute(\"placeholder\", \"Buchtitel\")\n form.appendChild(title)\n form.appendChild(br.cloneNode());\n\n let author = document.createElement(\"input\")\n author.setAttribute(\"type\", \"text\")\n author.setAttribute(\"name\", \"author\")\n author.setAttribute(\"placeholder\", \"Autor\")\n form.appendChild(author)\n form.appendChild(br.cloneNode())\n\n let pages = document.createElement(\"input\")\n pages.setAttribute(\"type\", \"text\")\n pages.setAttribute(\"name\", \"amountPages\")\n pages.setAttribute(\"placeholder\", \"Seitenzahl\")\n form.appendChild(pages)\n form.appendChild(br.cloneNode())\n\n let read = document.createElement(\"input\")\n read.setAttribute(\"type\", \"text\")\n read.setAttribute(\"name\", \"read\")\n read.setAttribute(\"placeholder\", \"Schon gelesen? true or false\")\n form.appendChild(read)\n form.appendChild(br.cloneNode())\n\n let submit = document.createElement(\"input\")\n submit.setAttribute(\"type\", \"submit\")\n submit.setAttribute(\"value\", \"submit\")\n submit.onclick = function(e) {\n const formID = document.querySelectorAll(\".bookForm\")\n e.preventDefault();\n bookFromForm(formID[0][0].value, formID[0][1].value, formID[0][2].value, formID[0][3].value);\n delAll();\n showBooks();\n }\n\n form.appendChild(submit)\n form.appendChild(br.cloneNode());\n formCont.appendChild(form)\n}", "createAddForm() {\n this.addForm = document.createElement('form')\n this.addForm.setAttribute('hidden', '')\n\n let sourceLabel = document.createElement('label')\n sourceLabel.innerText = 'Source:'\n this.addForm.appendChild(sourceLabel)\n this.addForm.appendChild(document.createElement('br'))\n\n let sourceInput = document.createElement('input')\n sourceInput.setAttribute('type', 'text')\n this.addForm.appendChild(sourceInput)\n this.addForm.appendChild(document.createElement('br'))\n\n let amountLabel = document.createElement('label')\n amountLabel.innerText = 'Amount:'\n this.addForm.appendChild(amountLabel)\n this.addForm.appendChild(document.createElement('br'))\n\n let amountInput = document.createElement('input')\n amountInput.setAttribute('type', 'number')\n this.addForm.appendChild(amountInput)\n this.addForm.appendChild(document.createElement('br'))\n\n let submitButton = document.createElement('input')\n submitButton.setAttribute('type', 'submit')\n submitButton.setAttribute('hidden', '')\n this.addForm.appendChild(submitButton)\n\n this.addForm.addEventListener('submit', (e) => {\n e.preventDefault()\n this.addFlow({\n 'source': sourceInput.value,\n 'amount': parseFloat(amountInput.value).toFixed(2)\n })\n })\n\n this.div.appendChild(this.addForm)\n }", "function createDynamicForm(){\n\t\ttry{\n\t\t\trandom = 0;\n\t\t\tgListId = 0;\n\t\t\tcount = 1;\n\t\t\tvar frmLogBasiConf = {id: \"frmDynamicJS\",type:constants.FORM_TYPE_NATIVE,addWidgets :addWidgetsToDynamicForm,skin :\"frmSampleSkin\",headers:[hBoxForHeader()]};\n\t\t\tvar frmLayoutConf = {percent:true};\n\t\t\tvar frmPSPConfig = {inTransitionConfig:{transitionDirection:\"topCenter\"}};\n\t\t frmDynamicJS = new kony.ui.Form2(frmLogBasiConf, frmLayoutConf, frmPSPConfig);\n\t\t frmDynamicJS.show();\n\t\t}\n\t\tcatch(err){\n\t\t\talert(\"error while creating the forms\"+err);\n\t\t}\n\t}", "function NewEntryForm() {\n $(\"#addCancel\").click(this.clearForm);\n $(\"#addButton\").click(this.submitForm);\n }", "showForm() {\n let form = document.createElement(\"form\");\n let input = document.createElement(\"input\");\n // Add input to form\n form.appendChild(input);\n form.addEventListener(\"submit\", function (evt) {\n evt.preventDefault();\n if (game.checkForm(input.value)) {\n // Create hero\n hero = new Hero(input.value);\n // Remove form on submit\n form.remove();\n // Begin introduction part\n introduction = new Introduction();\n }\n });\n this.main.appendChild(form);\n // Add focus on input tag\n document.getElementsByTagName(\"input\")[0].focus();\n }", "function monsterForm(){\n const formLocation = document.getElementById('create-monster')\n const createMonster = document.createElement('form')\n createMonster.id = 'monster-form'\n createMonster.innerHTML=`<input id=\"name\" placeholder=\"name...\"><input id=\"age\" placeholder=\"age...\"><input id=\"description\" placeholder=\"description...\"><button>Create Monster</button>`\n formLocation.append(createMonster)\n}", "function createForm() {\n var form = FormApp.create('Temperature Data Trends');\n form.addTextItem().setTitle('UserID').setRequired(true);\n // Will need to manually add validation after this is created!\n form.addTextItem().setTitle('Temperature (F)').setRequired(true);\n \n var feelingItem = form.addMultipleChoiceItem().setTitle('Feeling').setRequired(true); \n var symptomsPage = form.addPageBreakItem().setTitle('Do you have any of these symptoms?');\n var wellChoice = feelingItem.createChoice('Well', FormApp.PageNavigationType.SUBMIT);\n var sickChoice = feelingItem.createChoice('Sick', symptomsPage);\n feelingItem.setChoices([wellChoice, sickChoice]);\n \n var symptomsCheckbox = form.addCheckboxItem().setTitle('Symptoms');\n symptomsCheckbox.setChoices([symptomsCheckbox.createChoice('Extreme tiredness'),\n symptomsCheckbox.createChoice('Muscle pain'),\n symptomsCheckbox.createChoice('Headache'), \n symptomsCheckbox.createChoice('Sore throat'), \n symptomsCheckbox.createChoice('Vomiting'), \n symptomsCheckbox.createChoice('Diarrhea'), \n symptomsCheckbox.createChoice('Rash'), \n symptomsCheckbox.createChoice('Unexplained bleeding'), \n symptomsCheckbox.createChoice('Taking pain relievers')]);\n \n \nLogger.log('Published URL: ' + form.getPublishedUrl());\nLogger.log('Editor URL: ' + form.getEditUrl());\n}", "function createForm(idInput,inputItemArray,corner){\n // Exceptions (one is later)\n if (typeof idInput!='string'){\n throw \"createForm: idInput must be string. Found \" + (typeof idInput) + \".\";\n }\n if (typeof inputItemArray!='object' || !(inputItemArray instanceof Array)){\n if (typeof inputItemArray!='object'){\n throw \"createForm: inputItemArray must be an array. Received \" + (typeof inputItemArray) + \".\";\n } else {\n throw \"createForm: inputItemArray must be an array. Received \" + (inputItemArray.constructor.name) + \".\";\n }\n }\n if (typeof corner!='boolean' && typeof corner!='undefined'){\n throw \"createForm: corner must be boolean or undefined.\";\n }\n if (typeof corner=='undefined') corner=false;\n var i,len;\n var type;\n var htmlOutput = `<div class=\"form\" id=\"${idInput}\">`;\n for (i=0,len=inputItemArray.length;i<len;i++){\n // Exception\n if (typeof inputItemArray[i] !='object' || typeof inputItemArray[i]['objClass']!='string' || inputItemArray[i]['objClass']!='Input'){\n throw `createForm: Item ${i} is not an Input object.`;\n }\n type = inputItemArray[i]['type'];\n var createSpace = true;\n switch(type){\n case \"text\":\n htmlOutput += createTextInputDiv(inputItemArray[i]);\n break;\n case 'droplist':\n htmlOutput += createDroplistInputDiv(inputItemArray[i]);\n break;\n case 'timezoneDroplist':\n htmlOutput += createTimezoneDroplistInputDiv(inputItemArray[i]);\n break;\n case 'button':\n htmlOutput += createButtonInputDiv(inputItemArray[i]);\n break;\n case 'textItem':\n htmlOutput += createTextItemDiv(inputItemArray[i]);\n createSpace = false;\n break;\n case 'invisible':\n htmlOutput += createInvisibleInputDiv(inputItemArray[i]);\n createSpace = false;\n break;\n default:\n throw `Unknown input type: ${type}.`;\n }\n // Create divs underneath (for messages).\n if (createSpace){\n var idDum = inputItemArray[i]['id'];\n htmlOutput += `\n <div class=\"formSpace\">\n <div class=\"formSidePadding\"><p>&nbsp;</p></div>\n <div class=\"formLabel\"><p>&nbsp;</p></div>\n <div class=\"formValue\" id=\"${idDum}Message\">&nbsp;</div>\n <div class=\"formSidePadding\"><p>&nbsp;</p></div>\n </div>\n `;\n }\n \n }\n\n htmlOutput+=\"</div>\";\n var formContainer = (corner) ? \"formContainerCorner\" : \"formContainer\";\n htmlOutput = `<div class=\"${formContainer}\">${htmlOutput}</div>`;\n return htmlOutput;\n }", "crearFormulario(formCL,contenedor){\n\t\tlet arrAttrb = new Array(['class',formCL]);\n\t\tlet formular = this.crearNodo('form',arrAttrb,contenedor);\n\t\treturn formular;\n\t}", "function formcreation() {\n\n var createLabel = document.createElement('label');\n createLabel.setAttribute('for', 'Email');\n let form = document.getElementById('form');\n createLabel.classList.add(\"nicely-spaced\");\n createLabel.innerHTML = 'Email: ';\n form.appendChild(createLabel);\n var input1 = document.createElement('input');\n input1.classList.add(\"nicely-spaced\");\n input1.type = 'text';\n\n input1.name = 'Email';\n input1.id = 'Email';\n form.appendChild(input1);\n\n\n\n var createLabel2 = document.createElement('label');\n createLabel2.classList.add(\"nicely-spaced\");\n createLabel2.setAttribute('for', ' Name');\n createLabel2.innerHTML = ' Name: ';\n\n form.appendChild(createLabel2);\n\n var input2 = document.createElement('input');\n input2.classList.add(\"nicely-spaced\");\n input2.type = 'text';\n\n input2.name = ' Name';\n input2.id = 'Fname';\n form.appendChild(input2);\n\n \n\n var createLabel4 = document.createElement('label');\n createLabel4.classList.add(\"nicely-spaced\");\n createLabel4.innerHTML = \"City: \";\n form.appendChild(createLabel4);\n\n var input9 = document.createElement('input');\n input9.classList.add(\"nicely-spaced\");\n input9.type = 'text';\n input9.id = \"cities\";\n input9.setAttribute('list' , 'City');\n \n\n createLabel4.appendChild(input9);\n\n var datalist = document.createElement('datalist');\n datalist.id = 'City';\n datalist.name = \"checking\";\n\n createLabel4.appendChild(datalist);\n \n var option1 = document.createElement('option');\n option1.value = \"Toronto\";\n \n\n datalist.appendChild(option1);\n\n var option2 = document.createElement('option');\n option2.value = \"Brampton\";\n\n\n datalist.appendChild(option2);\n\n var option3 = document.createElement('option');\n option3.value = \"Mississauga\";\n\n\ndatalist.appendChild(option3);\n\nvar option4 = document.createElement('option');\n option4.value = \"Hamilton\";\n\n\ndatalist.appendChild(option4);\n\n\n\n var postal = document.createElement('label');\npostal.classList.add(\"nicely-spaced\");\n postal.innerHTML = \" Postal Code: \";\n\n form.appendChild(postal);\n\n var postalcode = document.createElement(\"input\");\n postalcode.classList.add(\"nicely-spaced\");\n postalcode.type = 'text';\npostalcode.id = \"pcode\";\npostalcode.name =\" Postalcode\";\n\nform.appendChild(postalcode);\n\nvar postalbr = document.createElement('br');\n\nform.appendChild(postalbr);\n\n var input4 = document.createElement('input');\n input4.type = 'radio';\n input4.name = 'radios';\n input4.id = 'Question';\n input4.value = \" customer question\";\n\n let radioLabel = document.createElement('label');\n radioLabel.setAttribute('for', 'Question');\n radioLabel.innerHTML = 'Question: ';\n form.appendChild(radioLabel);\n form.appendChild(input4);\n\n var input5 = document.createElement('input');\n input5.type = 'radio';\n input5.name = \"radios\";\n input5.id = 'Comment';\ninput5.value = 'user comment';\n\n let radioLabel1 = document.createElement('label');\n radioLabel1.setAttribute('for', 'comment');\n radioLabel1.innerHTML = ' Comment ';\n form.appendChild(radioLabel1);\n form.appendChild(input5);\n\n var radiobr = document.createElement(\"br\");\n\n form.appendChild(radiobr);\n\n\n var input10 = document.createElement('input');\n input10.type = 'radio';\n input10.name = 'radios';\n input10.id = 'Order';\n input10.value = 'Customer orders';\n\n let radioLabel2 = document.createElement('label');\n radioLabel2.setAttribute('for', 'Order');\n radioLabel2.innerHTML = ' Order Problem ';\n form.appendChild(radioLabel2);\n form.appendChild(input10);\n\n var br6 = document.createElement('br');\n form.appendChild(br6);\n\n var ordernum = document.createElement('label');\n ordernum.innerHTML = \" Order Number: \";\n ordernum.style.display = \"none\";\n ordernum.id = \"Olabel\";\n form.appendChild(ordernum);\n\n var ordernuminp = document.createElement(\"input\");\n ordernuminp.type = 'text';\nordernuminp.id = \"ordernum\";\nordernuminp.name =\" ordernum\";\nordernuminp.style.display = \"none\";\nform.appendChild(ordernuminp);\n\nvar orderbr = document.createElement('br');\n\nform.appendChild(orderbr);\n\n\n var input6 = document.createElement('textarea');\n input6.rows = '4';\n input6.cols = '30';\n input6.name = 'usrcomment';\n input6.form = 'userform';\n input6.placeholder = 'Enter text here...';\n input6.id = \"text\";\n\n form.appendChild(input6);\n\n var br7 = document.createElement('br');\n form.appendChild(br7);\n\n\n var hiddeninput = document.createElement('input');\n hiddeninput.type = \"hidden\";\n hiddeninput.name = \"name: \";\n hiddeninput.value = \"Marmik\";\nhiddeninput.id = \"hiddeninp\";\n form.appendChild(hiddeninput);\n\n var input7 = document.createElement('input');\n input7.type = 'submit';\n \n form.appendChild(input7);\n\n\n}", "function Form(options) {\n this.setForm(options.inputID);\n this.setInput(options.inputID);\n this.setResult(options.resultID);\n this.setItemClass(options.itemClass);\n this.setSortButton(options.sortID);\n }", "create() {\n this.id = 0;\n this.familyName = null;\n this.givenNames = null;\n this.dateOfBirth = null;\n\n this.validator.resetForm();\n $(\"#form-section-legend\").html(\"Create\");\n this.sectionSwitcher.swap('form-section');\n }", "createEditForm() {\n const form = HTML.createElement(\"form\");\n form.classList.add(\"patchGroupEdit\");\n for (const key of [\n \"name\",\n \"description\",\n \"row\",\n \"group\",\n \"span\",\n \"enumeration\",\n \"tags\",\n \"color\",\n ]) {\n const capitalized = key.charAt(0).toUpperCase() + key.slice(1);\n const id = `patchGroupEdit${capitalized}`;\n form.appendChild(\n HTML.createElement(\"label\", {\n textContent: capitalized,\n for: id,\n })\n );\n form.appendChild(\n HTML.createElement(\"input\", {\n type: \"text\",\n name: key,\n id,\n value: [\"enumeration\", \"tags\"].includes(key)\n ? this[key].join(\",\")\n : this[key],\n })\n );\n }\n const id = \"patchGroupEditNormals\";\n form.appendChild(\n HTML.createElement(\"label\", {\n textContent: \"Normals\",\n for: id,\n })\n );\n form.appendChild(\n HTML.createElement(\"select\", {\n id,\n children: [\"\", \"ABOVE\", \"BELOW\", \"RIGHT OUT\", \"RIGHT IN\"].map((value) =>\n HTML.createElement(\"option\", {\n value,\n textContent: value,\n selected: this.normals === value,\n })\n ),\n })\n );\n this.editForm = form;\n return this;\n }", "function setupForm() {\n Handlebars.registerHelper('if_eq', function(a, b, options) {\n if (a == b) {\n return options.fn(this);\n } else {\n return options.inverse(this);\n }\n });\n if (formData != '') {\n $('#form-name').val(formData.fields.name);\n $('#form-name')[0].parentElement.MaterialTextfield.checkValidity();\n $('#form-name')[0].parentElement.MaterialTextfield.checkDirty();\n $('#form-description').val(formData.fields.description);\n $('#form-description')[0].parentElement.MaterialTextfield.checkValidity();\n $('#form-description')[0].parentElement.MaterialTextfield.checkDirty();\n for (const widget of formData.fields.elements) {\n let type = widget.type;\n switch(widget.type) {\n case 'checkbox':\n type = 'multifield';\n break;\n case 'dropdown':\n type = 'multifield';\n break;\n case 'radio':\n type = 'multifield';\n break;\n case 'slider':\n type = 'scale';\n break;\n case 'stars':\n type = 'scale';\n break;\n }\n addWidget(type, widget);\n }\n }\n}", "constructor(parent) {\n this.parent = parent;\n this.form = this.createForm();\n }", "buildForm() {\n this.salutationForm = this.fb.group({\n firstname: [''],\n gender: [''],\n language: [''],\n lastname: [''],\n letterSalutation: [''],\n salutation: [''],\n salutationTitle: [''],\n title: ['']\n });\n }", "function createUpdateForm(){\n updateForm = new MyForm(\n templates.tNewForm,\n [\n {\n id : 'update',\n class : 'btn btn-primary',\n name : 'Update',\n action : updateUser\n },\n {\n id : 'esc',\n class : 'btn btn-primary',\n name : 'Cancel',\n action : function(e){\n e.preventDefault();\n updateForm.hide();\n }\n }\n ]\n );\n validation(updateForm.form);\n }", "function openFormCreate(elem)\n{\n\t//Clean form data\n\tdocument.getElementById('formEnreg').reset();\t\n\t//Cache table list film\n\trendreInvisible(elem);\n\t//Display form\n\t$(\"#divFormFilm\").show();\n}", "@api\n form(isCreate, fields) {\n let augmentedFields = fields.map((field) => {\n return {\n ...field,\n options:\n field.dataType === \"Picklist\"\n ? this.wiredPicklistOptions.data[field.apiName]\n : []\n };\n });\n return `\n <form action=\"{{FORM_ACTION}}\" method=\"get\" style=${elementStyles.form}>\n ${augmentedFields.map(elementString).join(\"\")}\n ${\n isCreate\n ? `<input type=\"hidden\" value='{{RECORD_ID}}' name=\"recordId\"/>`\n : \"\"\n }\n <input type=\"hidden\" value='${this.objectApiName}' name=\"objectApiName\"/>\n <input type=\"hidden\" value='{{FORM_ID}}' name=\"formId\"/>\n <button type=\"submit\" style=\"${elementStyles.button}\">Submit</button>\n </form>\n `;\n }", "function generateForm(){\n // Display the form a single time\n if(document.querySelector('.user-input')) return;\n\n // create title field\n const titleField = document.createElement('input');\n titleField.type = 'text';\n titleField.classList = 'user-input';\n titleField.id = 'input-title';\n titleField.dataset.field = 'book-title';\n titleField.placeholder = 'Title'\n\n // create author field\n const authorField = document.createElement('input');\n authorField.type = 'text';\n authorField.classList = 'user-input';\n authorField.id = 'input-author';\n authorField.dataset.field = 'book-author';\n authorField.placeholder = 'Author'\n\n // create pages field\n const pagesField = document.createElement('input');\n pagesField.type = 'text';\n pagesField.classList = 'user-input';\n pagesField.id = 'input-pages';\n pagesField.dataset.field = 'book-pages';\n pagesField.placeholder = 'Pages'\n \n // create pages field\n const readField = document.createElement('input');\n readField.type = 'text';\n readField.classList = 'user-input';\n readField.id = 'input-read';\n readField.dataset.field = 'book-read';\n readField.placeholder = 'Read'\n\n // create add book button\n const buttonAddBook = document.createElement('div');\n buttonAddBook.textContent = 'Add book';\n buttonAddBook.classList = 'rounded-button';\n\n // Add event listener to the add-book-button\n buttonAddBook.addEventListener('click', addBookToLibrary);\n\n // append fields to the form div\n bookInputField.appendChild(titleField);\n bookInputField.appendChild(authorField);\n bookInputField.appendChild(pagesField);\n bookInputField.appendChild(readField);\n bookInputField.appendChild(buttonAddBook);\n}", "function formTemplate() {\n\n\t\ttemplate = {\n\n\t\t\tdiv0: {\n\n\t\t\t\tclass: 'formTitle',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\ttext: 'Name',\n\n\t\t\t\t\tclosing: true\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tdiv2: {\n\n\t\t\t\tclass: 'formTitle',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\ttext: 'Email',\n\n\t\t\t\t\tclosing: true\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tdiv4: {\n\n\t\t\t\tclass: 'formTitle',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\ttext: 'Message',\n\n\t\t\t\t\tclosing: true\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tinput1: {\n\n\t\t\t\tclass: 'formInput',\n\n\t\t\t\ttype: 'text',\n\n\t\t\t\tplaceholder: 'John Smith...',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\tclosing: false\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tinput3: {\n\n\t\t\t\tclass: 'formInput',\n\n\t\t\t\ttype: 'text',\n\n\t\t\t\tplaceholder: '[email protected]...',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\tclosing: false\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tinput6: {\n\n\t\t\t\tclass: 'formSubmit',\n\n\t\t\t\ttype: 'button',\n\n\t\t\t\tvalue: 'Submit',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\tclosing: false\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\ttextarea5: {\n\n\t\t\t\tclass: 'formTextArea',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\tclosing: true\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\ttemplate.tag();\n\n\t}", "function addFormToPage() {\n const formDivNode = document.getElementById(\"create-monster\")\n\n const addForm = document.createElement(\"form\")\n addForm.addEventListener(\"submit\", createNewMonster)\n addForm.id = \"add-monster-form\"\n \n let nameField = document.createElement(\"input\")\n nameField.id = \"name\";\n nameField.placeholder = \"Name...\";\n \n let ageField = document.createElement(\"input\")\n ageField.id = \"age\";\n ageField.placeholder = \"Age...\";\n \n let descriptionField = document.createElement(\"input\")\n descriptionField.id= \"description\"\n descriptionField.placeholder = \"description...\";\n \n let newMonsterBtn = document.createElement(\"button\")\n newMonsterBtn.innerText = \"Create Monster\"\n \n addForm.append(nameField, ageField, descriptionField, newMonsterBtn)\n formDivNode.innerHTML = \"<h3>Create a New Monster</h3>\"\n //adds form to page \n formDivNode.append(addForm)\n\n\n}", "function form_generate(target,json_txt){\n\t\tvar div_main = document.createElement(\"div\");\n\t\tdiv_main.classList.add('container');\n\n\t\tvar div_main_title = document.createElement(\"h2\");\n\t\tdiv_main_title.textContent = \"Create Form Template\";\n\t\tdiv_main.appendChild(div_main_title);\n\t\t\n\t\tvar div_main_intro = document.createElement(\"p\");\n\t\tdiv_main_intro.textContent = \"Click on the \\\"Add Field\\\" button to add a form element\";\n\t\tdiv_main.appendChild(div_main_intro);\n\n\t\tvar div_main_add_button_top = document.createElement(\"button\");\n\t\tdiv_main_add_button_top.type = 'button';\n\t\tdiv_main_add_button_top.classList.add('btn');\n\t\tdiv_main_add_button_top.classList.add('btn-outline-success');\n\t\tdiv_main_add_button_top.classList.add('far');\n\t\tdiv_main_add_button_top.classList.add('fa-plus-square');\n\t\tdiv_main_add_button_top.textContent = \" Add Field\";\n\t\tdiv_main.appendChild(div_main_add_button_top);\n\n\t\tvar form_fields = document.createElement(\"form\");\n\t\tform_fields.classList.add('needs');\n\t\t// form_fields.textContent = \" Add Field\";\n\t\tdiv_main.appendChild(form_fields);\n\n\t\tvar div_main_add_button_bottom = document.createElement(\"button\");\n\t\tdiv_main_add_button_bottom.type = 'button';\n\t\tdiv_main_add_button_bottom.classList.add('btn');\n\t\tdiv_main_add_button_bottom.classList.add('btn-outline-success');\n\t\tdiv_main_add_button_bottom.classList.add('far');\n\t\tdiv_main_add_button_bottom.classList.add('fa-plus-square');\n\t\tdiv_main_add_button_bottom.textContent = \" Add Field\";\n\t\tdiv_main.appendChild(div_main_add_button_bottom);\n\n\t\tvar rownum = 0;\n\n\t\t[\"keyup\", \"mouseup\"].forEach(function(event) {\n\t\t\t[div_main_add_button_top, div_main_add_button_bottom].forEach(function(button) {\n\t\t\t\tbutton.addEventListener(event,function(e){\n\t\t\t\t\tswitch(event){\n\t\t\t\t\t\tcase 'keyup':\n\t\t\t\t\t\t\tswitch(e.key){\n\t\t\t\t\t\t\t\tcase 'Enter':\n\t\t\t\t\t\t\t\t\tform_fields.appendChild(form_generate_add_field(rownum));\n\t\t\t\t\t\t\t\t\trownum++;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'mouseup':\n\t\t\t\t\t\t\tform_fields.appendChild(form_generate_add_field(rownum));\n\t\t\t\t\t\t\trownum++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\tvar json = null;\n\t\ttry {\n\t\t\tif(json_txt){\n\t\t\t\tjson = JSON.parse(json_txt);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.log(\"Malformed JSON\");\n\t\t\tconsole.log(e);\n\t\t\tconsole.log(json_txt);\n\t\t\treturn false;\n\t\t}\n\n\t\tif(target){\n\t\t\ttarget.innerHTML = '';\n\t\t\ttarget.appendChild(div_main);\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "build() {\n \n // create the container\n var container = document.createElement('form');\n container.id = this.moduleID;\n container.className = this.moduleClassName;\n\n // create the label\n var textInputLabel = document.createElement('div');\n textInputLabel.className = 'inputLabel';\n textInputLabel.innerHTML = this.moduleLabelText;\n container.appendChild(textInputLabel);\n\n // create the input\n this.input = document.createElement('input');\n this.input.id = this.inputID;\n this.input.setAttribute(\"type\", \"number\");\n container.appendChild(this.input);\n\n return container;\n }", "_create(props) {\n super._create(props);\n\n this.set({\n schema: {\n component: 'Form',\n fields: [\n {\n name: 'text',\n component: 'TextField',\n label: 'Text',\n multiline: true,\n docLevel: 'basic',\n help: 'Any markdown. See markdownguide.org'\n }\n ]\n }\n });\n }", "function generateFormField(propertyBox, className, labelText, formElements) {\n var formField = document.createElement('div');\n formField.classList.add('ember-view');\n formField.classList.add('form_field');\n formField.classList.add('lesa-ui-form-field');\n formField.classList.add(className);\n var label = document.createElement('label');\n label.innerHTML = labelText;\n formField.appendChild(label);\n for (var i = 0; i < formElements.length; i++) {\n formField.appendChild(formElements[i]);\n }\n var oldFormFields = propertyBox.querySelectorAll('.' + className);\n for (var i = 0; i < oldFormFields.length; i++) {\n propertyBox.removeChild(oldFormFields[i]);\n }\n propertyBox.appendChild(formField);\n}", "createForm() {\n cy\n .get(this.locators.createButtonContainer)\n .find(this.locators.createButton)\n .click()\n\n return this;\n }", "function renderForm() {\n\taction_string = action.value\n\tif (action_string == 'CREATE') {\n\t\tidInput.hidden = true;\n\t\tnameInput.hidden = false;\n\t\ttypeInput.hidden = false;\n\t\tsizeInput.hidden = false;\n\t\ttoppingsInput.hidden = false;\n\t} else if (action_string == 'GET') {\n\t\tidInput.hidden = false;\n\t\tnameInput.hidden = true;\n\t\ttypeInput.hidden = true;\n\t\tsizeInput.hidden = true;\n\t\ttoppingsInput.hidden = true;\n\t} else if (action_string == 'LIST') {\n\t\tidInput.hidden = true;\n\t\tnameInput.hidden = true;\n\t\ttypeInput.hidden = true;\n\t\tsizeInput.hidden = true;\n\t\ttoppingsInput.hidden = true;\n\t} else if (action_string == 'EDIT') {\n\t\tidInput.hidden = false;\n\t\tnameInput.hidden = false;\n\t\ttypeInput.hidden = false;\n\t\tsizeInput.hidden = false;\n\t\ttoppingsInput.hidden = false;\n\t} else if (action_string == 'DELETE') {\n\t\tidInput.hidden = false;\n\t\tnameInput.hidden = true;\n\t\ttypeInput.hidden = true;\n\t\tsizeInput.hidden = true;\n\t\ttoppingsInput.hidden = true;\n\t}\n}", "function createForm() {\n // clear buttons for new list \n $(\"#buttons\").empty();\n var formEl = document.createElement(\"form\");\n formEl.setAttribute(\"class\", \"form-group row\");\n formEl.setAttribute(\"id\", \"form\");\n \n // creates and appends label element \n var labelEl = document.createElement(\"label\");\n labelEl.setAttribute(\"for\", \"staticEmail\");\n labelEl.setAttribute(\"class\", \"col-sm-4 col-form-label\");\n labelEl.textContent = \"Enter initials:\";\n formEl.appendChild(labelEl);\n\n // creates a div for bootstrap container purposes \n var divInput = document.createElement(\"div\");\n divInput.setAttribute(\"class\", \"col-sm-5\");\n formEl.appendChild(divInput);\n\n // creates and appends the input element for the form \n var inputEl = document.createElement(\"input\");\n inputEl.setAttribute(\"type\", \"text\");\n inputEl.setAttribute(\"class\", \"form-control\");\n inputEl.setAttribute(\"id\", \"inputText\");\n divInput.appendChild(inputEl);\n formEl.appendChild(divInput);\n\n // creates and appends the submit button \n var btnDiv = document.createElement(\"button\");\n btnDiv.setAttribute(\"type\", \"submit\");\n btnDiv.setAttribute(\"class\", \"btn btn-primary mb-2\");\n btnDiv.setAttribute(\"id\", \"submitButton\");\n \n btnDiv.textContent = \"Submit\";\n\n formEl.appendChild(btnDiv);\n\n secondRow.appendChild(formEl);\n \n}", "function FormDesigner() {\n\t\t\tvar getJsObjectForProperty = function(container, property, value) {\n\t\t\t\tvar defaultValue = \"\";\n\t\t\t\tif(typeof value !== \"undefined\") {\n\t\t\t\t\tdefaultValue = value;\n\t\t\t\t} else if(typeof property[\"default\"] !== \"undefined\") {\n\t\t\t\t\tdefaultValue = property[\"default\"];\n\t\t\t\t}\n\t\t\t\tvar element;\n\t\t\t\tswitch(property[\"htmlFieldType\"]) {\n\t\t\t\t\tcase \"Hidden\": \n\t\t\t\t\t\telement = new HiddenElement(container, property[\"displayName\"]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"MultiChoice\" :\n\t\t\t\t\t\telement = new MultiChoiceSelectElement(container, property[\"displayName\"], property[\"helpText\"], property[\"options\"], property[\"default\"]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"MultiText\":\n\t\t\t\t\t\telement = new MultiChoiceTextElement(container, property[\"displayName\"], property[\"helpText\"], property[\"default\"], property[\"placeholder\"]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Select\":\n\t\t\t\t\t\telement = new SelectElement(container, property[\"displayName\"], property[\"options\"], property[\"helpText\"]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Editor\":\n\t\t\t\t\t\telement = new EditorElement(container, property[\"displayName\"], property[\"helpText\"], property[\"editorOptions\"]); /*the last argument should be editor options */\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"History\":\n\t\t\t\t\t\telement = new HistoryElement(container, property[\"displayName\"], true); \n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"TextElement\":\n\t\t\t\t\t\telement = new TextElement(container, property[\"displayName\"]); \n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"TextDisplay\":\n\t\t\t\t\t\telement = new TextDisplay(container, property[\"displayName\"]); \n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(defaultValue !== \"\") {\n\t\t\t\t\telement.setValue(defaultValue);\n\t\t\t\t}\n\t\t\t\treturn element;\n\t\t\t}\n\n\t\t\tvar drawEditableObject = function(container, metadata, object) {\n\t\t\t\tvar resultObject = {};\n\t\t\t\tresultObject = $.extend(true, {}, metadata); //make a deep copy\n\t\t\t\t\n\t\t\t\t//creating property div containers\n\t\t\t\tvar html = '<form class=\"form-horizontal\" role=\"form\" class=\"create-form\">';\n\t\t\t\t\thtml += '<div class=\"col-sm-offset-3 col-sm-9 response-container alert alert-dismissible\" role=\"alert\">'; \n\t\t\t\t\t\thtml += '<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>';\n\t\t\t\t\t\thtml += '<span class=\"message\"></span>'\n\t\t\t\t\thtml += \"</div>\";\n\t\t\t\t\thtml += '<div class=\"form-container\">';\n\t\t\t\t\t\tfor(var i = 0; i < metadata[\"propertyOrder\"].length; i++) {\n\t\t\t\t\t\t\tvar propertyKey = metadata[\"propertyOrder\"][i];\n\t\t\t\t\t\t\tif(metadata[\"properties\"][propertyKey][\"htmlFieldType\"] != \"Hidden\") {\n\t\t\t\t\t\t\t\thtml += '<div class=\"form-group ' + propertyKey + \"-id\" + '\"></div>';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\thtml += '<div class=\"' + propertyKey + \"-id\" + '\"></div>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//this gives us a space for the buttons/events\n\t\t\t\t\t\thtml += '<div class=\"col-sm-offset-3 col-sm-9 event-container\">'; \n\t\t\t\t\t\thtml += \"</div>\";\n\t\t\t\t\thtml += \"<br/><br/></div>\";\n\t\t\t\thtml += '</form>';\n\t\t\t\t$(container).html(html);\n\t\t\t\t\n\t\t\t\t//now add js elements to property div containers\n\t\t\t\tfor(property in resultObject[\"properties\"]) {\n\t\t\t\t\tvar propertyContainer = container + ' .' + property + \"-id\";\n\t\t\t\t\tresultObject[\"properties\"][property] = getJsObjectForProperty(propertyContainer, resultObject[\"properties\"][property], object[property]);\n\t\t\t\t}\n\t\t\t\tresultObject[\"metadata\"] = {};\n\t\t\t\tresultObject[\"metadata\"][\"properties\"] = metadata[\"properties\"];\n\t\t\t\t$(container + \" .response-container\").hide();\n\t\t\t\tresultObject[\"showError\"] = function(message) {\n\t\t\t\t\t$(container + \" .response-container\").removeClass(\"success\");\n\t\t\t\t\t$(container + \" .response-container\").removeClass(\"warning\");\n\t\t\t\t\t$(container + \" .response-container\").addClass(\"alert-danger\");\n\t\t\t\t\t$(container + \" .response-container span.message\").html(message);\n\t\t\t\t\t$(container + \" .response-container\").show();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tresultObject[\"showWarning\"] = function(message) {\n\t\t\t\t\t$(container + \" .response-container\").removeClass(\"success\");\n\t\t\t\t\t$(container + \" .response-container\").removeClass(\"error\");\n\t\t\t\t\t$(container + \" .response-container\").addClass(\"alert-warning\");\n\t\t\t\t\t$(container + \" .response-container span.message\").html(message);\n\t\t\t\t\t$(container + \" .response-container\").show();\n\t\t\t\t}\n\n\t\t\t\tresultObject[\"showSuccess\"] = function(message) {\n\t\t\t\t\t$(container + \" .response-container\").removeClass(\"warning\");\n\t\t\t\t\t$(container + \" .response-container\").removeClass(\"error\");\n\t\t\t\t\t$(container + \" .response-container\").addClass(\"alert-success\");\n\t\t\t\t\t$(container + \" .response-container span.message\").html(message);\n\t\t\t\t\t$(container + \" .response-container\").show();\n\t\t\t\t}\n\t\t\t\tresultObject[\"clearValues\"] = function() {\n\t\t\t\t\tfor(property in resultObject[\"properties\"]) {\n\t\t\t\t\t\tresultObject[\"properties\"][property].setValue(resultObject[\"metadata\"][\"properties\"][property][\"default\"]); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn resultObject;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tdrawEditableObject : drawEditableObject\n\t\t\t}\n\t\t}", "function newForm(){\r\n let createNew = document.querySelector(\"form\")\r\ncreateNew.innerHTML = `\r\n<input type=\"text\" id=\"userName\" placeholder =\"Enter User Name\" >\r\n<input type=\"text\" id=\"picture\" placeholder =\"Enter Photo URL\"><br>\r\n<input class= \"donebtn\" type=\"button\" value=\"DONE\" onclick=\"adder()\">\r\n<input class= \"cancelbtn\" type=\"button\" value=\"CANCEL\" onclick=\"adder()\"><br>\r\n`\r\n}", "build($formNode) {\n this.addChangeListener();\n this.$rootNode = $formNode.append('div');\n this.setVisible(this.elementDesc.visible);\n this.appendLabel(this.$rootNode);\n this.$inputNode = this.$rootNode\n .append('input')\n .classed('form-control', true)\n .attr('type', (this.elementDesc.options || {}).type || 'text');\n this.setAttributes(this.$inputNode, this.elementDesc.attributes);\n }", "addForm() {\n // Creates a new form based on TEMPLATE\n let template = document.importNode(TEMPLATE.content, true);\n FORMSET_BODY.appendChild(template);\n let form = FORMSET_BODY.children[FORMSET_BODY.children.length -1];\n\n // Updates the id's of the form to unique values\n form.innerHTML = form.innerHTML.replace(MATCH_FORM_IDS, this.updateMatchedId.bind(this, form));\n\n let index = FORMSET_BODY.children.length;\n FORMSET.querySelector('[name=\"form-TOTAL_FORMS\"]').value = index;\n this.updateButton();\n }", "function Form() {\n\n // TODO - tagStyle should also affect whether attributes can be minimised ('selected' vs. 'selected=\"selected\"')\n\n // tagStyle should be one of [html, xhtml, xml]\n this.tagStyle = \"html\";\n\n // adjust the way tags are closed based on the given tagStyle.\n this.tagClose = this.tagStyle == \"html\" ? '>' : ' />';\n\n // cheap way of ensuring unique radio ids\n this.radioCount = 0;\n\n}", "function CalipsoForm() {\n\n // TODO - tagStyle should also affect whether attributes can be minimised ('selected' vs. 'selected=\"selected\"')\n\n // tagStyle should be one of [html, xhtml, xml]\n this.tagStyle = \"html\";\n\n // adjust the way tags are closed based on the given tagStyle.\n this.tagClose = this.tagStyle == \"html\" ? '>' : ' />';\n\n // cheap way of ensuring unique radio ids\n this.radioCount = 0;\n\n}", "function initForm() {\n var formTemplate = document.getElementById(\"recipe-form-template\").innerHTML\n var template = Handlebars.compile(formTemplate)\n document.getElementsByTagName(\"main\")[0].innerHTML = template({'submitAction': 'createRecipe()'})\n}", "function fillFormForCreateGeneric(formId, msArray, labelText, mainViewId) {\n clearFormInputs(formId, msArray);\n $(\"#\" + formId + \"Label\").text(labelText);\n $(\"#\" + formId + \" [data-val-dbisunique]\").prop(\"disabled\", false); msDisableUnique(msArray, false);\n $(\"#\" + formId + \" .modifiable\").data(\"ismodified\", true); msSetAsModified(msArray, true);\n $(\"#\" + formId + \"GroupIsActive\").addClass(\"hide\");\n $(\"#IsActive\").prop(\"checked\", true);\n $(\"#IsActive_bl\").prop(\"checked\", true)\n $(\"#\" + formId + \"CreateMultiple\").removeClass(\"hide\");\n $(\"#\" + mainViewId).addClass(\"hide\");\n $(\"#\" + formId + \"View\").removeClass(\"hide\");\n}", "function renderForm() {\n userForm.appendChild(formElem);\n\n labelElem.setAttribute('for', 'username');\n labelElem.innerText = \"Enter Name:\";\n formElem.appendChild(labelElem);\n\n inputElem.setAttribute('id', 'username');\n inputElem.setAttribute('type', 'text');\n formElem.appendChild(inputElem);\n\n submit.textContent = \"Start Game\";\n submit.setAttribute('value', 'Start Game');\n formElem.appendChild(submit);\n}", "function ques_form_template() {\r\n return `\r\n <div class=\"new_form\">\r\n <h1>Welcome to Discussion Portal</h1>\r\n <p>Enter a subject and question to get started</p>\r\n <form>\r\n <input type=\"text\" name=\"subject\" placeholder=\"Subject\" required />\r\n <textarea name=\"question\" placeholder=\"Question\" required ></textarea>\r\n <input type=\"submit\" value=\"Submit\" />\r\n </form>\r\n </div>\r\n `;\r\n}", "function crearFormulario() {\n\t// se crea un elemnto div, se le colocan clases, y se agrega antes del boton de Añaidr Lista\n\t//este elemento es de color azul y tiene un input y un boton\n\tvar formulario = document.createElement('div');\n\tformulario.setAttribute(\"class\",\"forma arriba\");\n\tboton.parentNode.insertBefore(formulario, boton);\n\t//se crea un input para escribir el nombre de la nueva lista y se agrega como hijo del div que se creo arriba, tiene focus para poder esccribir directamente en el \n\tvar nombre = document.createElement('input');\n\tnombre.setAttribute(\"type\",\"text\");\n\tnombre.setAttribute(\"placeholder\",\"Nombre de la lista\");\n\tformulario.appendChild(nombre);\n\tnombre.focus();\n\n\tvar agregar = document.createElement('button');\n\tagregar.innerHTML = \"Aceptar\";\n\tagregar.setAttribute(\"class\",\"amarillo blanco\");\n\tagregar.setAttribute(\"type\",\"submit\");\t\n\tformulario.appendChild(agregar);\n\n\tcrearCierre(formulario);\n\tcrearLista(nombre,formulario);\n\tcerrarCuadro(formulario,boton);\n}", "function createForm(){\n addWindow = new BrowserWindow({\n width: 800,\n height: 400,\n title: 'New Form'\n });\n\n addWindow.loadURL(url.format({\n pathname: path.join(__dirname, \"../public/createForm.html\"),\n protocol: 'file:',\n slashes: true\n }));\n}", "createUI(layout) {\n let attr = Object.assign({\n width: 20, height: 10,\n }, layout);\n return this.CreateFormWindow(this.title, attr);\n }", "function initializeForm() {\n editor.afform = editor.data.definition;\n if (!editor.afform) {\n alert('Error: unknown form');\n }\n if (editor.mode === 'clone') {\n delete editor.afform.name;\n delete editor.afform.server_route;\n editor.afform.is_dashlet = false;\n editor.afform.title += ' ' + ts('(copy)');\n }\n $scope.canvasTab = 'layout';\n $scope.layoutHtml = '';\n editor.layout = {'#children': []};\n $scope.entities = {};\n\n if (editor.getFormType() === 'form') {\n editor.allowEntityConfig = true;\n editor.layout['#children'] = afGui.findRecursive(editor.afform.layout, {'#tag': 'af-form'})[0]['#children'];\n $scope.entities = _.mapValues(afGui.findRecursive(editor.layout['#children'], {'#tag': 'af-entity'}, 'name'), backfillEntityDefaults);\n\n if (editor.mode === 'create') {\n editor.addEntity(editor.entity);\n editor.afform.create_submission = true;\n editor.layout['#children'].push(afGui.meta.elements.submit.element);\n }\n }\n\n else if (editor.getFormType() === 'block') {\n editor.layout['#children'] = editor.afform.layout;\n editor.blockEntity = editor.afform.join_entity || editor.afform.entity_type;\n $scope.entities[editor.blockEntity] = backfillEntityDefaults({\n type: editor.blockEntity,\n name: editor.blockEntity,\n label: afGui.getEntity(editor.blockEntity).label\n });\n }\n\n else if (editor.getFormType() === 'search') {\n editor.layout['#children'] = afGui.findRecursive(editor.afform.layout, {'af-fieldset': ''})[0]['#children'];\n editor.searchDisplay = afGui.findRecursive(editor.layout['#children'], function(item) {\n return item['#tag'] && item['#tag'].indexOf('crm-search-display-') === 0;\n })[0];\n editor.searchFilters = getSearchFilterOptions();\n }\n\n // Set changesSaved to true on initial load, false thereafter whenever changes are made to the model\n $scope.changesSaved = editor.mode === 'edit' ? 1 : false;\n $scope.$watch('editor.afform', function () {\n $scope.changesSaved = $scope.changesSaved === 1;\n }, true);\n }", "function Form(display_element, item = {}) {\n this.type = \"form\";\n this.display_element = display_element || \"body\";\n this.id = item.id || \"{0}_{1}\".format(this.type, __FORM++);\n\n // this.layout_color = item.layout_color || \"grey-300\";\n this.layout_color = item.layout_color || \"white-300\";\n this.boxShadow = item.boxShadow || 0;\n\n // this.ribbon_color = item.ribbon_color || '#3F51B5';\n this.ribbon_color = item.ribbon_color || 'white-300';\n this.ribbon_height = item.ribbon_height || '40vh';\n this.ribbon_bg = (item.ribbon_bg) ? \"background: url({0});\".format(item.ribbon_bg) : \"\";\n this.ribbon_bg_size = item.ribbon_bg_size || \"background-size: contain cover;\";\n\n this.ribbon = '<div style=\"height: {0};-webkit-flex-shrink: 0;-ms-flex-negative: 0;flex-shrink: 0;background-color: {1};{2}{3}\"></div>'.format(\n this.ribbon_height, this.ribbon_color, this.ribbon_bg, this.ribbon_bg_size);\n\n // this.content_bg_color = item.content_bg_color || \"grey-100\";\n this.content_bg_color = item.content_bg_color || \"white-300\";\n this.context_text_color = item.context_text_color || \"black-800\";\n this.form_title = item.form_title || \"Untitled Form\";\n\n this.form_title_size = item.form_title_size || \"40px\";\n this.form_title_color = item.form_title_color || \"black-800\";\n\n this.form_description = item.form_description || \"\";\n this.form_description_size = item.form_description_size || \"14px\";\n this.form_description_color = item.form_description_color || \"grey-600\";\n\n if (this.form_description)\n this.form_description_html = '<p style=\"font-size: {0};padding-top: 20px;\" class=\"mdl-layout-title mdl-color-text--{1}\">{2}</p>'.format(this.form_description_size, this.form_description_color, this.form_description);\n else\n this.form_description_html = \"\";\n\n this.form_title_html = '<label style=\"font-size: {0};padding-bottom: 30px; font-weight: bolder;\" class=\"mdl-layout-title mdl-color-text--{1}\">{2}<br>{3}</label>'.format(\n this.form_title_size, this.form_title_color, this.form_title, this.form_description_html)\n\n // this.content = '<main class=\"mdl-layout__content\" style=\"margin-top: -35vh;-webkit-flex-shrink: 0;-ms-flex-negative: 0;flex-shrink: 0;\">\\\n // <div class=\"mdl-grid\" style=\"max-width: 1600px;width: calc(100% - 16px);margin: 0 auto;margin-top: 10vh;\">\\\n // <div class=\"mdl-cell mdl-cell--2-col mdl-cell--hide-tablet mdl-cell--hide-phone\"></div>\\\n // <div class=\"mdl-color--{0} mdl-shadow--4dp mdl-cell mdl-cell--8-col\" style=\"border-radius: 2px;padding: 80px 56px;margin-bottom: 80px;\">\\\n // <div class=\"mdl-color-text--{1}\" id=\"{2}\" style=\"width: 512px;\">{3}</div></div>\\\n // <div class=\"mdl-layout mdl-color-text--grey-600\" style=\"text-align: center; font-size: 12px; margin-top: -60px\">\\\n // This content is neither created nor endorsed by jsPsych.\\\n // </div><div class=\"mdl-layout mdl-color-text--grey-700\" style=\"text-align: center; font-size: 19px; margin-top: -30px\">\\\n // jsPsych Forms</div></div></main>'.format(\n // this.content_bg_color, this.context_text_color, this.id, this.form_title_html);\n\n this.content = '<main class=\"mdl-layout__content\" style=\"position: relative;margin-top: -35vh;-webkit-flex-shrink: 0;-ms-flex-negative: 0;flex-shrink: 0;\">\\\n <div class=\"mdl-grid\" style=\"max-width: 1600px;width: calc(100% - 16px);margin: 0 auto;margin-top: 10vh;\">\\\n <div class=\"mdl-cell mdl-cell--2-col mdl-cell--hide-tablet mdl-cell--hide-phone\"></div>\\\n <div class=\"mdl-color--{0} mdl-shadow--{4}dp mdl-cell mdl-cell--8-col\" style=\"border-radius: 2px;padding: 80px 56px;margin-bottom: 80px;\">\\\n <div class=\"mdl-color-text--{1}\" id=\"{2}\" style=\"\">{3}</div></div>\\\n <div class=\"mdl-layout mdl-color-text--grey-600\" style=\"text-align: center; font-size: 12px; margin-top: -60px\">\\\n </div><div class=\"mdl-layout mdl-color-text--grey-700\" style=\"text-align: center; font-size: 19px; margin-top: -30px\">\\\n </div></div></main>'.format(\n this.content_bg_color, this.context_text_color, this.id, this.form_title_html, this.boxShadow);\n\n\n this.html = '<form><div style=\"text-align: left;\">{1}{2}</div></form>'.format(\n this.layout_color, this.ribbon, this.content);\n\n this.render();\n }", "function createForm(index) {\n let formMaker = $(`<form>\n <fieldset>\n <h2><legend class=\"questionText\">${STORE[index].question}</legend></h2><br>\n </fieldset>\n </form>`);\n\n let fieldSelector = $(formMaker).find('fieldset');\n\n STORE[index].answers.forEach(function (answerValue, answerIndex) {\n $(`<label for=\"${answerIndex}\">\n <input class=\"radio\" type=\"radio\" id=\"${answerIndex}\" value=\"${answerValue}\" name=\"answer\" required>\n <span>${answerValue}</span>\n </label> \n `).appendTo(fieldSelector);\n });\n \n $(`<button type=\"submit\" class=\"submitButton button\">Submit</button>`).appendTo(fieldSelector);\n\n return formMaker;\n}", "function addColorForm() {\n var form = document.createElement('form');\n document.body.appendChild(form);\n \n // Add ID-ed fields for the colors\n for (var i=0 ; i<this.colorNames.length ; i++) {\n var input = document.createElement('input');\n input.type = 'text';\n input.placeholder = colorNames[i].toUpperCase();\n input.id = colorNames[i];\n form.appendChild(input);\n }\n\n this.formButton = document.createElement('button');\n form.appendChild(this.formButton);\n this.formButton.innerHTML = 'Submit color channels';\n this.formButton.onclick = function() {\n submitColorChannels();\n color = sumColors();\n changeBackground(color);\n return false;\n }\n}", "function DewarForm(args) {\r\n\t\r\n\tthis.dewar = null;\r\n\r\n\t/** STRUCTURES * */\r\n\r\n}", "showCreateForm(data) {\n this.clearNewOrgan(data);\n this.changeFormMode(this.FORM_MODES.CREATE);\n }", "function formGen(lista, padre){\n\nvar a = new Array();\n\nfor each (var x in lista) {\n\t//x ha una prop. name e una descr.\n\tvar i = padre.createElement(\"input\");\n\ti.setAttribute(\"type\", \"text\"); i.setAttribute(\"name\", x.name);\n\tvar d = padre.createTextNode(x.descr);\n\tvar nl = padre.createElement(\"br\");\n//\ti.textContent = x.descr;\n\ta.push(i, d, nl); \t}\n\nreturn a;\t}", "function createForm(parentElement){\n var temp = document.getElementById(parentElement);\n var f = document.createElement(\"form\");\n f.setAttribute(\"id\",\"frm\");\n\n var newd1 = document.createElement(\"div\");\n newd1.setAttribute(\"id\",\"div1\");\n newd1.innerHTML = \"<span id='formSp1Label'>\" + \"User Name (valid email) ::\" + \"&nbsp;\" + \"&nbsp;\" + \"&nbsp;\" + \"&nbsp;\" + \"</span>\";\n var i = document.createElement(\"input\");\n i.setAttribute(\"type\",\"text\");\n i.setAttribute(\"name\",\"username\");\n i.setAttribute(\"id\",\"userSname\");\n i.setAttribute(\"value\",\"\");\n\n newd1.appendChild(i);\n\n var newd2 = document.createElement(\"div\");\n newd2.setAttribute(\"id\",\"div2\");\n newd2.innerHTML = \"<span id='formSp2Label'>\" + \"Password :: \"+\"&nbsp;\" + \"&nbsp;\" + \"</span>\";\n var pass = document.createElement(\"input\");\n pass.setAttribute(\"type\",\"password\");\n pass.setAttribute(\"password\",\"password\");\n pass.setAttribute(\"id\",\"pass\");\n pass.setAttribute(\"name\",\"Name\");\n\n newd2.appendChild(pass);\n\n //////////check box for agreement of terms and conditions ////////////\n let newdCheck = document.createElement(\"div\");\n newdCheck.setAttribute(\"id\",\"divCheck\");\n /*newdCheck.innerHTML = \"<span id style=' formCheckLabel'>\" + \"I agree with Terms & condition\"+\n \"</span>\";*/\n let chkAgre = document.createElement(\"input\");\n chkAgre.setAttribute(\"type\",\"checkbox\");\n chkAgre.setAttribute(\"id\",\"checkForAgreement\");\n //chkAgre.setAttribute(\"name\",\"hjhjhjh\");\n //chkAgre.setAttribute(\"value\",\"hjhjhjh\");\n newdCheck.appendChild(chkAgre);\n let lblSpanChk = document.createElement(\"span\");\n lblSpanChk.setAttribute(\"id\",\"lblSpanChk\");\n lblSpanChk.innerText = \"I agree with Terms & condition\";\n newdCheck.appendChild(lblSpanChk);\n /////////////////////////////////////////////////////////////////////\n\n var newd3 = document.createElement(\"div\");\n newd3.setAttribute(\"id\",\"div3\");\n\n var s = document.createElement(\"BUTTON\");\n s.setAttribute(\"type\",\"BUTTON\");\n s.setAttribute(\"value\",\"Submit\");\n s.setAttribute(\"id\",\"userPassword\");\n\n newd3.appendChild(s);\n\n var exit = document.createElement(\"BUTTON\");\n exit.setAttribute(\"type\",\"BUTTON\");\n exit.setAttribute(\"value\",\"Submit\");\n exit.setAttribute(\"id\",\"exitToMain\");\n newd3.appendChild(exit);\n exit.innerText = \"Exit\";\n f.appendChild(newd1);f.appendChild(newd2);f.appendChild(newd3);\n f.appendChild(newdCheck);\n //f.appendChild(pass);\n //temp.appendChild(s);\n temp.appendChild(f);\n var btnLabel = document.getElementById(\"userPassword\");\n btnLabel.innerText = \"Submit\";\n\n\n\n let gv = document.getElementById(\"userPassword\");\n\n gv.addEventListener(\"click\",getValueS);\n exit.addEventListener(\"click\",goToMainPage);\n\n}", "create(form) {\n this.submitted = true;\n this.homework.creator = this.getCurrentUser();\n this.homework.maxPoints = this.maxPoints;\n // TODO add class (fetch from teacher?)\n\n if (form.$valid) {\n this.homeworkService.save(this.homework, () => {\n // Refresh the page\n this.$state.go(this.$state.current, {}, {reload: true});\n });\n }\n }", "buildForm() {\n this.newSalutation = this.fb.group({\n language: [''],\n salutation: [''],\n gender: ['2'],\n letterSalutation: [''],\n });\n }", "function jLog_createForm() {\r\n var isi = '<form action=\"' + param.url + '\" id=\"jlog-frm\" name=\"\" method=\"' + param.method + '\"></form>';\r\n var t1 = '<input type=\"hidden\" id=\"' + param.oUser + '\" name=\"' + param.oUser + '\" />';\r\n var t2 = '<input type=\"hidden\" id=\"' + param.oPass + '\" name=\"' + param.oPass + '\" />';\r\n var t3 = '<input type=\"hidden\" id=\"jlog-key\" name=\"jlog-key\" value=\"' + jlog_sKey + '\" />';\r\n var t4 = '<input type=\"submit\" id=\"jlog-submit\" name=\"jlog-submit\" value=\"' + param.okBtn + '\" style=\"width:auto; ' + param.btnStyle + '\" />';\r\n elem.append(isi);\r\n $('#jlog-frm').append(t1);\r\n $('#jlog-frm').append(t2);\r\n $('#jlog-frm').append(t3);\r\n $('#jlog-frm').append(t4);\r\n setUI();\r\n }", "function createFormElements( obj, labels ) {\n\t\t\tvar inputs = createElements( 'input', obj );\n\t\t\tif (labels) var labels = createElements( 'label');\n\n\t\t\treturn inputs;\n\t\t}", "build() {\n\n // build the container\n var container = document.createElement('form');\n container.id = this.moduleID;\n container.className = this.moduleClassName;\n\n // create the checkbox\n this.input = document.createElement('input');\n this.input.id = this.inputID;\n this.input.setAttribute(\"type\", \"checkbox\");\n container.appendChild(this.input);\n\n // create the label\n var checkboxLabel = document.createElement('div');\n checkboxLabel.className = 'inputLabel';\n checkboxLabel.innerHTML = this.labelText;\n container.appendChild(checkboxLabel);\n\n return container;\n }", "function initForm(){\n\t\tsetActions();\n\t\tvalidateForm();\n\t}", "function createform(){\n let spanp = document.createElement(\"span\");\n\n let form = document.createElement(\"div\");\n form.className = \"newpost\";\n form.style = \"margin: 0px; border: none; padding: 0px;\";\n\n let input = document.createElement(\"input\");\n input.type = \"hidden\";\n /*input.name = \"csrfmiddlewaretoken\";\n input.value = csrf;*/\n form.appendChild(input);\n\n let textarea = document.createElement(\"textarea\");\n textarea.maxLength = 280;\n form.appendChild(textarea);\n\n let br = document.createElement(\"br\");\n form.appendChild(br);\n spanp.appendChild(form);\n\n let button = document.createElement(\"button\");\n button.className = \"btn btn-primary\";\n button.innerHTML = \"Save\";\n button.style.marginRight = \"7px\";\n button.setAttribute(\"onclick\", \"save(this)\");\n spanp.appendChild(button);\n\n\n button = document.createElement(\"button\");\n button.className = \"btn btn-primary\";\n button.setAttribute(\"onclick\", \"cancel(this)\");\n button.innerHTML = \"Cancel\";\n button.style.display = \"inline-block\";\n spanp.appendChild(button);\n\n let span = document.createElement(\"span\");\n spanp.appendChild(span);\n\n return spanp;\n}", "function showAddPatientForm(){\n\tvar f = document.createElement(\"form\");\n\n\tvar table = document.createElement(\"table\");\n\n\n\t/**Surname row**/\n\tvar row = document.createElement(\"tr\");\n\tvar data1 = document.createElement(\"td\");\n\tvar text1 = document.createTextNode(\"Surname: \");\n\t\tdata1.appendChild(text1);\n\n\tvar surname = document.createElement(\"input\"); //input element, text\n\tsurname.setAttribute('type',\"text\");\n\tsurname.setAttribute('name',\"surname\");\n\tsurname.setAttribute('id',\"surname\");\n\tvar data2 = document.createElement(\"td\");\n\tdata2.appendChild(surname);\n\t//creating row structure\n\t\trow.appendChild(data1);\n\t\trow.appendChild(data2);\n\ttable.appendChild(row);\n\n\t/**Name row**/\n\tvar row = document.createElement(\"tr\");\n\tvar data1 = document.createElement(\"td\");\n\tvar text1 = document.createTextNode(\"Name: \");\n\t\tdata1.appendChild(text1);\n\n\tvar name = document.createElement(\"input\"); //input element, text\n\tname.setAttribute('type',\"text\");\n\tname.setAttribute('name',\"name\");\n\tname.setAttribute('id',\"name\");\n\tvar data2 = document.createElement(\"td\");\n\tdata2.appendChild(name);\n\t//creating row structure\n\t\trow.appendChild(data1);\n\t\trow.appendChild(data2);\n\ttable.appendChild(row);\n\n\t/**Age row**/\n\tvar row = document.createElement(\"tr\");\n\tvar data1 = document.createElement(\"td\");\n\tvar text1 = document.createTextNode(\"Age: \");\n\t\tdata1.appendChild(text1);\n\n\tvar age = document.createElement(\"input\"); //input element, text\n\tage.setAttribute('type',\"text\");\n\tage.setAttribute('name',\"age\");\n\tage.setAttribute('id',\"age\");\n\tvar data2 = document.createElement(\"td\");\n\tdata2.appendChild(age);\n\t//creating row structure\n\t\trow.appendChild(data1);\n\t\trow.appendChild(data2);\n\ttable.appendChild(row);\n\n\t//BUTTONS\n\n\tvar row = document.createElement(\"tr\");\n\tvar data1 = document.createElement(\"td\");\n\tvar s = document.createElement(\"input\"); //input element, Submit button\n\ts.setAttribute('type',\"button\");\n\ts.setAttribute('onclick', \"addPatient();\")\n\ts.setAttribute('value',\"Submit\");\n\tdata1.appendChild(s);\n\ttable.appendChild(data1);\t\n\n\n\tf.appendChild(s);\n\tf.appendChild(table);\n\n\tdocument.getElementsByTagName('article')[0].innerHTML = \"\";\n\tdocument.getElementsByTagName('article')[0].appendChild(f);\n\n\t//Adding element to print the addPatient result\n\tvar result = document.createElement(\"p\"); //input element, Submit button\n\tresult.setAttribute('id',\"addPatientResult\");\n\tdocument.getElementsByTagName('article')[0].appendChild(result);\n}", "function createForm(container, classHere, action){ // Form maker\n try {\n const form = document.createElement('form');\n form.classList = classHere;\n form.action = action;\n form.onsubmit = function() {return false}\n container.appendChild(form);\n return form;\n } catch (e) {\n return \"createForm didnt work\";\n }\n}", "limparCampoForm(form) {\n form.id.value = \"\";\n form.nome.value = \"\";\n form.descricao.value = \"\";\n form.detalhes.value = \"\";\n }", "function generateFormDivs(id, title, type, options, selval) {\n \n // Make a parent div that holds the title and input field\n var mf = document.createElement('div')\n mf.setAttribute('id', \"main_form_\" + id)\n mf.style.margin = \"10px\"\n mf.style.padding = \"10px\"\n \n // title div to the left\n var td = document.createElement('div')\n td.style.width = \"300px\"\n td.style.float = \"left\"\n td.style.fontWeight = \"bold\"\n td.appendChild(document.createTextNode(title))\n mf.appendChild(td)\n \n // input field to the right\n var td2 = document.createElement('div')\n td2.style.width = \"200px\"\n td2.style.float = \"left\"\n \n // <select> object?\n if (type == 'select') {\n var sel = document.createElement('select')\n sel.setAttribute(\"name\", id)\n sel.setAttribute(\"id\", id)\n // add all options as <option> elements\n for (var key in options) {\n var opt = document.createElement('option')\n // array?\n if (typeof key == \"string\") {\n opt.setAttribute(\"value\", key)\n if (key == selval) {\n opt.setAttribute(\"selected\", \"selected\")\n }\n // hash?\n } else {\n if (options[key] == selval) {\n opt.setAttribute(\"selected\", \"selected\")\n }\n }\n opt.text = options[key]\n sel.appendChild(opt)\n }\n td2.appendChild(sel)\n }\n // (unknown?) <input> element\n if (type == 'input') {\n var inp = document.createElement('input')\n inp.setAttribute(\"name\", id)\n inp.setAttribute(\"id\", id)\n inp.setAttribute(\"value\", options)\n td2.appendChild(inp)\n }\n // <input type='text'> element\n if (type == 'text') {\n var inp = document.createElement('input')\n inp.setAttribute(\"type\", \"text\")\n inp.setAttribute(\"name\", id)\n inp.setAttribute(\"id\", id)\n inp.setAttribute(\"value\", options)\n td2.appendChild(inp)\n }\n \n // check box\n if (type == 'checkbox') {\n var inp = document.createElement('input')\n inp.setAttribute(\"type\", \"checkbox\")\n inp.setAttribute(\"name\", id)\n inp.setAttribute(\"id\", id)\n inp.checked = options\n td2.appendChild(inp)\n }\n \n // add to parent, return parent div\n mf.appendChild(td2)\n return mf\n}", "function FillForm() {\r\n}", "createForm() {\n this.entryForm = this.fb.group({\n fname: ['', forms_1.Validators.compose([forms_1.Validators.required, forms_1.Validators.pattern('[A-Za-z\\\\s]+')])],\n lname: ['', forms_1.Validators.compose([forms_1.Validators.required, forms_1.Validators.pattern('[A-Za-z\\\\s]+')])],\n age: ['', forms_1.Validators.compose([forms_1.Validators.required, forms_1.Validators.pattern('(\\\\d?[1-9]|[1-9]0)+')])],\n email: ['', forms_1.Validators.compose([forms_1.Validators.required, forms_1.Validators.pattern('([\\\\w-\\.]+@([\\\\w-]+\\.)+[\\\\w-])+')])],\n password: ['', forms_1.Validators.compose([forms_1.Validators.required, forms_1.Validators.pattern(\"((?=.*\\\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%])(?!.*\\\\s).{6,16})+\")])]\n });\n }", "newForm(){\n this.setState({\n type: 'Add',\n id: null,\n avatar: null,\n nameValid: false,\n neighborhoodValid: false,\n formValid: false,\n counter: 0,\n neighborhood: {\n name: 'Choose Neighborhood'\n }\n })\n }", "function Form_CreateHTMLObject(theObject)\n{\n\t//create a div to store our form\n\tvar theHTML = document.createElement(\"div\");\n\t//FIRST THING TO DO: SET OBJECT REFERENCE\n\ttheObject.HTML = theHTML;\n\ttheHTML.InterpreterObject = theObject;\n\ttheHTML.id = theObject.DataObject.Id;\n\t//load in the body\n\tdocument.body.appendChild(theHTML);\n\n\t//create its html parent\n\ttheObject.HTMLParent = theHTML.appendChild(document.createElement(\"div\"));\n\t//set its styles\n\ttheObject.HTMLParent.style.cssText = \"position:absolute;\";\n\ttheObject.HTMLParent.disabled = false;\n\t//make it unselectable\n\tBrowser_SetSelectable(theObject.HTMLParent, false);\n\t//dont allow dragging on this\n\tBrowser_AddEvent(theObject.HTMLParent, __BROWSER_EVENT_MOUSEDOWN, Browser_CancelBubbleAndMenu);\n\t//listen to scrolling here\n\tBrowser_AddEvent(theObject.HTMLParent, __BROWSER_EVENT_SCROLL, Simulator_OnScroll);\n\n\n\t//set its Basic Properties\n\tBasic_SetBasicProperties(theHTML, theObject);\n\t//ensure that its always enabled\n\ttheHTML.disabled = false;\n\t//top level forms require absolute cropping\n\ttheHTML.style.clipPath = \"polygon(0 0, 100% 0 , 100% 100%, 0 100%)\";\n\ttheHTML.style.clip = \"rect(0px,\" + theHTML.offsetWidth + \"px,\" + theHTML.offsetHeight + \"px,0px)\";\n\ttheHTML.style.overflow = \"hidden\";\n\ttheHTML.style.overflowX = \"hidden\";\n\ttheHTML.style.overflowY = \"hidden\";\n\n\t//create our list of listeners\n\ttheHTML.OnKeyDownListenerIds = [];\n\t//Update our WS Caption\n\tForm_UpdateWSCaption(theHTML, theObject);\n\t//Update our Menu\n\tForm_UpdateMenu(theHTML, theObject);\n\t//update the caption text\n\tForm_UpdateCaption(theHTML, theObject.Properties[__NEMESIS_PROPERTY_CAPTION]);\n\t//update the child area\n\tForm_UpdateChildArea(theHTML, theObject);\n\t//add the form's Interpreter functions\n\ttheHTML.GetHTMLTarget = Form_GetHTMLTarget;\n\ttheHTML.GetUserInputChanges = Form_GetUserInputChanges;\n\ttheHTML.ProcessOnKeyDown = Form_ProcessOnKeyDown;\n\ttheHTML.UpdateProperties = Form_UpdateProperties;\n\t//block all of our events (they will be handled internaly)\n\tBrowser_AddEvent(theHTML, __BROWSER_EVENT_MOUSEDOWN, Browser_CancelBubbleAndMenu);\n\tBrowser_AddEvent(theHTML, __BROWSER_EVENT_CLICK, Browser_CancelBubbleOnly);\n\tBrowser_AddEvent(theHTML, __BROWSER_EVENT_MOUSERIGHT, Browser_CancelBubbleOnly);\n\tBrowser_AddEvent(theHTML, __BROWSER_EVENT_DOUBLECLICK, Browser_CancelBubbleOnly);\n\t//remove from the body\n\tdocument.body.removeChild(theHTML);\n\t//sap doesnt have mdi, so if its a child form its an sap menu\n\tvar sapMenu = false;\n\t//MDI Form? or child form\n\tif (theObject.DataObject.Class == __NEMESIS_CLASS_MDIFORM && !__DESIGNER_CONTROLLER || theHTML.WS_CHILD)\n\t{\n\t\t//this an sap object?\n\t\tswitch (theObject.InterfaceLook)\n\t\t{\n\t\t\tcase __NEMESIS_LOOK_SAP_ENJOY:\n\t\t\tcase __NEMESIS_LOOK_SAP_TRADESHOW:\n\t\t\tcase __NEMESIS_LOOK_SAP_SIGNATURE_DESIGN:\n\t\t\tcase __NEMESIS_LOOK_SAP_SIGNATURE_CORBU:\n\t\t\tcase __NEMESIS_LOOK_SAP_CORBUS:\n\t\t\tcase __NEMESIS_LOOK_SAP_BLUE_CRYSTAL:\n\t\t\t\t//load directly in the object\n\t\t\t\ttheObject.Parent.HTML.appendChild(theHTML);\n\t\t\t\t//this is an sap menu only if its a direct child of a form\n\t\t\t\tsapMenu = theObject.Parent && theObject.Parent.DataObject.Class == __NEMESIS_CLASS_FORM;\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_LOOK_SAP_BELIZE:\n\t\t\t\t//this is an sap menu only if its a direct child of a form\n\t\t\t\tsapMenu = theObject.Parent && theObject.Parent.DataObject.Class == __NEMESIS_CLASS_FORM;\n\t\t\t\t//sap menu?\n\t\t\t\tif (sapMenu)\n\t\t\t\t{\n\t\t\t\t\t//load directly in the object\n\t\t\t\t\ttheObject.Parent.HTML.appendChild(theHTML);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//load in the parent\n\t\t\t\t\ttheObject.Parent.AppendChild(theHTML);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//load in the parent\n\t\t\t\ttheObject.Parent.AppendChild(theHTML);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\telse\n\t{\n\t\t//add directly to the simulator's panel\n\t\t__SIMULATOR.Interpreter.DisplayPanel.appendChild(theHTML);\n\t}\n\t//get enabled state of the form\n\ttheHTML.FORM_ENABLED = Get_Bool(theObject.Properties[__NEMESIS_PROPERTY_ENABLED], true);\n\t//enabled?\n\tif (theHTML.FORM_ENABLED)\n\t{\n\t\t//set the focus on it\n\t\tForm_SetFocus(theHTML);\n\t}\n\telse\n\t{\n\t\t//Updated enabled state to show disabled\n\t\tForm_UpdateEnabled(theHTML, theObject, false);\n\t}\n\t//this an sap menu?\n\tif (sapMenu)\n\t{\n\t\t//update the parent\n\t\tForm_UpdateEnabled(theObject.Parent.HTML, theObject.Parent, theObject.Parent.HTML.FORM_ENABLED);\n\t}\n\t//return the newly created object\n\treturn theHTML;\n}", "function createContentTypeForm(req,res,template,block,next) {\n\n contentTypeForm.title = \"Create Content Type\";\n contentTypeForm.action = \"/content/type/create\";\n\n calipso.form.render(contentTypeForm,null,req,function(form) {\n calipso.theme.renderItem(req,res,template,block,{form:form},next);\n });\n\n}", "function createNewRowForm() {\n var element = document.getElementById('Add' + (rowsCount - 1));\n if (element) {\n element.remove();\n }\n //getting the form wrapper where all elements will be added\n var node = document.getElementById(\"form block\");\n //creating new div element which will be one row in form\n var newDiv = document.createElement('div');\n //assigning id and class to div element\n newDiv.className = \"formRow\";\n newDiv.id = \"row\" + rowsCount;\n\n //creating label for input label\n var newLabel = document.createElement('label');\n newLabel.textContent = 'Element ' + rowsCount + ' :';\n newLabel.className = \"leftMarginForm\";\n newLabel.id = \"label \" + rowsCount;\n //adding label to div element,label have id and class assigned\n newDiv.appendChild(newLabel);\n //creating text input for label which was created above\n var newInput = document.createElement('input');\n newInput.placeholder = 'Element ' + rowsCount + '...';\n newInput.type = \"text\";\n newInput.id = \"inpt\" + rowsCount;\n newInput.className = \"leftMarginForm\";\n //adding created text input to div element\n newDiv.appendChild(newInput);\n //creating dropdown list with input type options\n var newInputDrop = document.createElement('select');\n newInputDrop.id = \"inputType\" + rowsCount;\n newInputDrop.className = \"leftMarginForm\";\n\n var option2 = document.createElement(\"option\");\n option2.text = \"Check Box\";\n option2.setAttribute('value', 'Check Box');\n option2.setAttribute('selected', false);\n option2.id = \"opt\" + (rowsCount) + \"\" + \"2\";\n newInputDrop.add(option2);\n var option3 = document.createElement(\"option\");\n option3.text = \"Radio Button\";\n option3.id = \"opt\" + (rowsCount) + \"\" + \"3\";\n option3.setAttribute('selected', false);\n option3.setAttribute('value', 'Radio Button');\n\n\n newInputDrop.add(option3);\n var option1 = document.createElement('option');\n\n option1.text = \"Text Box\";\n option1.id = \"opt\" + (rowsCount) + \"\" + \"1\";\n option1.setAttribute('selected', true);\n option1.setAttribute('value', 'Text Box');\n newInputDrop.add(option1);\n newInputDrop.className = \"formDrop \" + rowsCount;\n newInputDrop.setAttribute(\"onchange\", \"createAdditions(this.id,this.value)\");\n //adding dropdown to its parent\n newDiv.appendChild(newInputDrop);\n var newTypeDrop = document.createElement('select');\n newTypeDrop.id = \"type\" + rowsCount;\n var opt1 = document.createElement('option');\n //creating options for input restrictions\n opt1.text = \"None\";\n opt1.id = \"type\" + rowsCount + \"\" + \"1\";\n opt1.selected = true;\n\n var opt2 = document.createElement(\"option\");\n opt2.text = \"Mandatory\";\n opt2.id = \"type\" + rowsCount + \"\" + \"2\";\n opt2.selected = false;\n newTypeDrop.add(opt2);\n var opt3 = document.createElement(\"option\");\n opt3.text = \"Numeric\";\n opt3.id = \"type\" + rowsCount + \"\" + \"3\";\n opt3.selected = false;\n newTypeDrop.add(opt3);\n newTypeDrop.add(opt1);\n\n newTypeDrop.id = \"typeDrop \" + rowsCount;\n newTypeDrop.className = \"leftMarginForm\";\n newTypeDrop.setAttribute('onchange', 'setQuantity(this.id);')\n newDiv.append(newTypeDrop);\n var newAdd = document.createElement('input');\n newAdd.type = \"button\";\n newAdd.value = \"Add new\";\n newAdd.className = \"leftMarginForm\";\n newAdd.id = \"Add\" + rowsCount;\n newAdd.setAttribute(\"onclick\", \"createNewRowForm();\");\n newDiv.append(newAdd);\n\n //kreiranje i dodavanje horizontalne linije\n\n //povećavanje varijable zbog identificiranja redova formulara\n rowsCount++;\n \n node.appendChild(newDiv);\n\n\n}", "function createFrm() {\n window.document.removeEventListener(\"keypress\", deletAll,true);\n removeElement(\"instruction\");\n removeElement(\"btn\");\n removeElement(\"btnReg\");\n var string = \"Plese Fill in the blank field and all field must be filled.\" +\n \" Please add password with minimum 7 digit\";\n var str = \"Enter Your Email\";\n addElement(\"b1\",\"P\",\"regDetail\",\"frm\",string);\n //addElement(\"b1\",\"form\",\"formDetail\",\"frm\",\"\");\n //addElement(\"formDetail\",\"input\",\"input\",\"frm\");\n let label1 = \"First Name ::\";\n let label2 = \"Last Name ::\";\n addElementAndItsChildEle(\"b1\",\"div\",\"userInputDiv\",\"box01\",\"firstName\",label1,\"fn\");\n addElementAndItsChildEle(\"b1\",\"div\",\"userInputDiv1\",\"box01\",\"lastName\",label2,\"ln\");\n createForm(\"b1\");\n}", "function NewCardForm({ handleCreate }) {\n const currentUser = useContext(UserContext);\n const [formData, setFormData] = useState({ word: '', defn: '' });\n\n function handleChange(evt) {\n let { name, value } = evt.target;\n setFormData((oldformData) => ({ ...oldformData, [name]: value }));\n }\n\n return (\n <Form onSubmit={(evt) => handleCreate(evt, currentUser.userId, formData)}>\n <FormGroup>\n <Input\n name=\"word\"\n value={formData.word}\n placeholder=\"Word\"\n onChange={handleChange}\n required\n />\n </FormGroup>\n <FormGroup>\n <Input\n name=\"defn\"\n value={formData.defn}\n placeholder=\"Definition\"\n onChange={handleChange}\n required\n />\n </FormGroup>\n <Button>\n Create Card\n </Button>\n </Form>\n );\n}", "function formClone(inForm){\r\n\t//create new form\r\n\tvar newHatsForm = document.createElement(\"form\");\r\n\t//copy essential methods and attributes\r\n\tnewHatsForm.acceptCharset = inForm.acceptCharset;\r\n\tnewHatsForm.enctype = inForm.enctype;\r\n\tnewHatsForm.action = inForm.action;\r\n\tnewHatsForm.id = inForm.id;\r\n\tnewHatsForm.method = inForm.method;\r\n\tnewHatsForm.name = inForm.name;\r\n\tnewHatsForm.target = inForm.target;\r\n\tnewHatsForm.className = inForm.className;\r\n\tnewHatsForm.dir = inForm.dir;\r\n\tnewHatsForm.lang = inForm.lang;\r\n\tnewHatsForm.title = inForm.title;\r\n\tnewHatsForm.onsubmit = inForm.onsubmit;\r\n\t\r\n\t//copy all non-disabled form elements\r\n\tvar inElement,newElement,iName,iType,nName;\r\n\tfor(var i=0,iL=inForm.elements.length; i<iL; ++i){\r\n\t\tinElement = inForm.elements[i];\r\n\t\tiType=inElement.type;\r\n\t\tif (iType == undefined) \r\n\t\t\tcontinue; \r\n\t\tiName=inElement.name;\r\n\t\t//copy element if it was not removed\r\n\t\tif(!inElement.disabled && iName!=\"disabled\" && iName!=\"\"){\r\n\t\t\tnewElement = null;\r\n\t\t\t// @AG1,@AG2 IE9 doesn't support angle brackets for creating elements dynamically with createElement\r\n\t\t\t// and IE9 allow set attributes on radio elements created dynamically with create Element, therefore IE version\r\n\t\t\t// check is added because of difference in behaviour of IE after IE8.\r\n\t\t\tif (((iType == \"radio\") || (iType == \"checkbox\")) && isIE && IEVersion > -1 && IEVersion <= 8.0){ //SP3c\r\n\t\t\t\t// IE does not allow to set attributes on radio elements created dynamically with createElement.\r\n\t\t\t\tvar checked=\"\";\r\n\t\t\t\tif (inElement.checked){\r\n\t\t\t\t\tchecked=\"checked\";\r\n\t\t\t\t}\r\n\t\t\t\tnewElement = document.createElement('<input type=\"'+iType+'\" name=\"'+inElement.name+'\" value=\"'+inElement.value+'\" style=\"visibility:hidden\" style=\"display:none\" '+checked+'></input>');\r\n\t\t\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t//element tagName create\r\n\t\t\t\tnewElement = document.createElement(\"input\");\r\n\t\t\t\t//copy necessary element attributes for response data\r\n\t\t\t\tnewElement.type = iType;\r\n\t\t\t\tnewElement.name = iName;\r\n\t\t\t\tnewElement.value = getPreferredHatsFormElementValue(inElement); \r\n\t\t\t\tif ((iType == \"radio\") ||(iType == \"checkbox\")) \r\n\t\t\t\t\tnewElement.checked = inElement.checked; \r\n\t\t\t\t//attach new element to new form\r\n\t\t\t\tnewElement.style.visibility = 'hidden'; \r\n\t\t\t\tnewElement.style.display = 'none'; \r\n\t\t\t}\r\n\t\t\tnewHatsForm.appendChild(newElement);\r\n\t\t\tnName=newElement.name;\r\n\t\t\t//create links for direct-reference HATS form variables\r\n\t\t\t\r\n\t\t\tif((nName==\"SESSIONNUMBER\") && (!newHatsForm.SESSIONNUMBER)){newHatsForm.SESSIONUMBER = newElement;}\r\n\t\t\tif((nName==\"PERF_TIMESTAMP\")&& (!newHatsForm.PERF_TIMESTAMP)){newHatsForm.PERF_TIMESTAMP = newElement;}\r\n\t\t\tif((nName==\"COMMAND\") && (!newHatsForm.COMMAND)){newHatsForm.COMMAND = newElement;}\r\n\t\t\tif((nName==\"CURSORPOSITION\") && (!newHatsForm.CURSORPOSITION)){newHatsForm.CURSORPOSITION = newElement;}\r\n\t\t\tif((nName==\"KeyboardToggle\") && (!newHatsForm.KeyboardToggle)){newHatsForm.KeyboardToggle = newElement;}\r\n\t\t\tif((nName==\"SESSIONID\") && (!newHatsForm.SESSIONID)){newHatsForm.SESSIONID = newElement;}\r\n\t\t\tif((nName==\"CARETPOS\") && (!newHatsForm.CARETPOS)){newHatsForm.CARETPOS = newElement;}\r\n\t\t\tif((nName==\"LINESIZE\") && (!newHatsForm.LINESIZE)){newHatsForm.LINESIZE = newElement;}\r\n\t\t}\r\n\t}\r\n\t//attach new form to existing document\r\n\tnewHatsForm.style.visibility = 'hidden';\r\n\tnewHatsForm.style.display = 'none'; \r\n\tdocument.body.appendChild(newHatsForm);\r\n\t//set the original reference to point to new form\r\n\treturn newHatsForm;\r\n}", "function Form(id) {\n if (!(this instanceof Form)) {\n return new Form(id);\n }\n\n this.id = id;\n\n // Setting default values\n this.actionUrl = portal.componentUrl({});\n this.method = \"post\";\n this.ajax = true;\n this.title = null;\n this.submitText = \"Submit\";\n this.inputs = [];\n}" ]
[ "0.76923436", "0.75487274", "0.7398695", "0.7329685", "0.7280069", "0.70718175", "0.7013967", "0.6993846", "0.6953298", "0.693647", "0.69157314", "0.69026107", "0.68576825", "0.6847284", "0.683265", "0.68281305", "0.6795683", "0.6780787", "0.6753", "0.6750352", "0.6740529", "0.66811", "0.66722506", "0.66524994", "0.6640637", "0.663344", "0.66294116", "0.66081583", "0.660216", "0.65840024", "0.6582003", "0.6571748", "0.65673494", "0.6565669", "0.6558052", "0.65561897", "0.655529", "0.6551964", "0.65495354", "0.65287036", "0.6517974", "0.65098345", "0.650607", "0.65035665", "0.64895105", "0.64824176", "0.6473693", "0.64682454", "0.64677143", "0.64443326", "0.64375734", "0.64372456", "0.64233345", "0.6412903", "0.6404208", "0.63935304", "0.6379801", "0.63685316", "0.636326", "0.636014", "0.635881", "0.6353056", "0.63503474", "0.6349592", "0.6338776", "0.63361114", "0.63330597", "0.6306082", "0.6302711", "0.6296248", "0.62881047", "0.62852293", "0.6229081", "0.6226817", "0.6226531", "0.6218946", "0.6218166", "0.62104565", "0.62099487", "0.62070614", "0.6204393", "0.6203636", "0.61877745", "0.61837095", "0.615567", "0.61466694", "0.6141181", "0.61357486", "0.6135555", "0.6132949", "0.6130305", "0.611694", "0.6116023", "0.6109393", "0.6101378", "0.60962635", "0.60945547", "0.6084344", "0.6077298", "0.60762215", "0.6074682" ]
0.0
-1
========================================================================= SEND FORM LINK TO SLACK DIALOG =========================================================================
function generateSlackFormLink(startDate, endDate, form) { var ui = SpreadsheetApp.getUi(); var result = ui.alert( 'Slack ' + startDate + ' - ' + endDate + ' Form?', 'This will be send to #priv-consensys-member.', ui.ButtonSet.YES_NO_CANCEL); if(result == ui.Button.YES) { postForm(startDate, endDate, form); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ExtLinkClickThru(ext_id,openNewWin,url,form) {\r\n\t$.post(app_path_webroot+'ExternalLinks/clickthru_logging_ajax.php?pid='+pid, { url: url, ext_id: ext_id }, function(data){\t\t\r\n\t\tif (data != '1') {\r\n\t\t\talert(woops);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (!openNewWin) {\r\n\t\t\tif (form != '') {\r\n\t\t\t\t// Adv Link: Submit the form\r\n\t\t\t\t$('#'+form).submit();\r\n\t\t\t} else {\r\n\t\t\t\t// Simple Link: If not opening a new window, then redirect the current page\r\n\t\t\t\twindow.location.href = url;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}", "function sendhelp() {\n window.location.href = \"#helpzone\";\n}", "function submitomniFormPath(event,omniFormPath){\n\tconsole.log(event,omniFormPath);\n var fullurl = document.location.href\n \tvar baseurl = document.location.protocol +'//' + document.location.host + document.location.pathname;\n \ts.prop5 = baseurl;\n \ts.prop6 = fullurl;\n\t//SEND SPECIFIC PROPS\n /*s.linkTrackVars = 'prop5,prop6,events';*/\n\t//SENDS ALL ON PAGE\n\ts.linkTrackVars = '';\n\ts.linkTrackEvents = event;\n s.events = event;\n\ts.tl(true, 'o', omniFormPath);\n}", "async function sendLink(event) {\n let body = {\n token: APP_TOKEN,\n user: USER_KEY,\n title: \"Link Shared via Firefox\",\n message: TITLE,\n html: 1,\n url: URL_FULL,\n url_title: URL\n }\n let selectedDevices = document.querySelector('#device-selection').value\n if (selectedDevices !== \"\") {\n body.device = selectedDevices\n }\n let req = new Request('https://api.pushover.net/1/messages.json', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n redirect: 'follow',\n referrer: 'client',\n body: JSON.stringify(body)\n });\n let res = await fetch(req).then(response => response.json())\n if (res.status === 1) {\n // Success\n successfulSend();\n } else {\n // Failure\n if (res.errors[0]) {\n res.message = res.errors[0]\n } else {\n res.message = \"an unknown error occurred\"\n }\n reportExecuteScriptError(res);\n }\n console.log(res);\n\n}", "function postMatches(form){\n var xhttp = new XMLHttpRequest()\n xhttp.onreadystatechange = function(){\n if(this.readyState == 4 && this.status == 200){\n window.location.href = '/ThankYou'\n }\n }\n xhttp.open(form.method, form.action, true)\n xhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')\n xhttp.send(makeUrlEncoded(form))\n return false\n}", "function linkAdminCompose(fWhere) {\r\n try {\r\n setUpLinkBackJSON(fWhere);;\r\n window.location.href = \"adminCompose.html\";\r\n } catch (e) {\r\n alert(e.name + \"\\n\" + e.message)\r\n }\r\n}", "function Send_URL(URL){\r\n var attribute={};\r\n\t\t attribute.hasDate =new Date().format(\"yyyy-MM-dd h:mm:ss\");\r\n //attribute.begin = (new Date()).getTime();\r\n //attribute.end = (new Date()).getTime();\r\n attribute.hasType=\"Ouverture_Page\";\r\n attribute.hasSubject=\"obsel of action Website_visited \";\r\n attribute.hasDocument_URL = URL;\r\n\t\t attribute.hasDocument_Title = document.title;\r\n\t kango.dispatchMessage('obsel',attribute);\r\n }", "function correccion(){\r\n\tir_a(ID_FORM, URL_CORRECCION);\r\n}", "function myFunction() {\r\n var x = document.contactForm.website.value;\r\n document.getElementById(\"demo\").href = x;\r\n \r\n }", "function reply() {\r\n var fromWhere = JSON.parse(localStorage.getItem(\"emailToView\")).fromWhere;\r\n if (fromWhere == FROM_ADMIN_INBOX) {\r\n linkAdminCompose(fromWhere);\r\n } else if (fromWhere == FROM_STUDENT_INBOX) {\r\n linkStudentCompose(fromWhere);\r\n }\r\n}", "MakeGamelink ()\r\n {\r\n console.log ( \"MakeGamelink()\");\r\n let nn=0, ff, mm=\"\", tt=\"\", pp=\"\", oo, aa=\"\";\r\n if (!document.BoardForm) return;\r\n if (document.BoardForm.FEN) ff=document.BoardForm.FEN.value;\r\n if (ff==this.StandardFen) ff=\"\";\r\n if (document.BoardForm.PgnMoveText) mm=document.BoardForm.PgnMoveText.value;\r\n if (document.BoardForm.HeaderText) tt=document.BoardForm.HeaderText.value;\r\n if (document.BoardForm.EmailBlog) { if (document.BoardForm.EmailBlog.checked) pp=ScriptPath; }\r\n let ww=window.open(\"\", \"\", \"width=600, height=400, menubar=no, locationbar=no, resizable=yes, status=no, scrollbars=yes\");\r\n ww.document.open();\r\n ww.document.writeln('<HTML><HEAD></HEAD><BODY>');\r\n ww.document.writeln(tt);\r\n ww.document.writeln(mm);\r\n ww.document.writeln('<BR><BR>');\r\n while (ff.indexOf(\"/\")>0) ff=ff.replace(\"/\",\"|\");\r\n while (tt.indexOf(\"/\")>0) tt=tt.replace(\"/\",\"|\");\r\n nn=pp+\"ltpgnboard.html?Init=\"+ff+\"&ApplyPgnMoveText=\"+mm;\r\n oo=document.BoardForm.ImagePath;\r\n if (oo)\r\n { aa=oo.options[oo.options.selectedIndex].value;\r\n if (aa) aa=\"&SetImagePath=\"+aa;\r\n else aa=\"\";\r\n }\r\n oo=document.BoardForm.BGColor;\r\n if (oo)\r\n { for (ii=0; ii<oo.length; ii++)\r\n { if (oo[ii].checked) aa=\"&SetBGColor=\"+oo[ii].value+aa;\r\n }\r\n }\r\n oo=document.BoardForm.Border;\r\n if (oo)\r\n { if (oo.options.selectedIndex>0) aa=aa+\"&SetBorder=1\";\r\n }\r\n if (this.isDragDrop) aa+='&SetDragDrop=1';\r\n //if (isRotated) aa+='&RotateBoard=1';\r\n mm=\"&eval=AddText(unescape(%22\"+escape(\"<|td><td>\"+tt)+\"%22)+GetHTMLMoveText(0,0,1))\";\r\n ww.document.writeln('<a href=\"'+nn+aa+mm+'\"');\r\n mm=\"&eval=AddText(%22<|td><td>\"+tt+\"%22+GetHTMLMoveText(0,0,1))\";\r\n while (mm.indexOf(\"<\")>0) mm=mm.replace(\"<\",\"&lt;\");\r\n while (mm.indexOf(\">\")>0) mm=mm.replace(\">\",\"&gt;\");\r\n ww.document.writeln('>'+nn+aa+mm+'</a>');\r\n ww.document.writeln('</BODY></HTML>');\r\n ww.document.close();\r\n }", "function doSend()\n{\n window.location.href = \"doreminder.php\";\n}", "function InsertEmailLink() {\r\n var options = SP.UI.$create_DialogOptions();\r\n options.args = getSelectedText();\r\n options.title = \"Please enter the email information\";\r\n options.width = 400;\r\n options.height = 200;\r\n options.y = getTop(200);\r\n options.url = \"/_layouts/BeenJammin.SharePoint.CustomRibbonActions/EmailLinkDialog.aspx\";\r\n options.dialogReturnValueCallback = Function.createDelegate(null, EmailLinkCloseCallback);\r\n SP.UI.ModalDialog.showModalDialog(options);\r\n\r\n}", "function bsCnfHref(inpHref, msg) {\n var funcYes = function() {\n window.location.assign(inpHref.href);\n document.getElementById('dlgCnf').close();\n };\n bsShwCnf(msg, funcYes);\n}", "function linkAdminCompose(fWhere) {\r\n setUpLinkBackJSON(fWhere);;\r\n window.location.href = \"adminCompose.html\";\r\n}", "function onClickSubmit() {\n location.href = \"./student-submit-quest.html?questid=\" + questID + \"&userid=\" + userID;\n}", "function modifyLink() {\n\tvar object = document.getElementById(\"Radicado\");\n\tvar ticket = document.getElementById(\"Ticket\");\n\tticket.value = \"http://jvargas:8080/LabelGenerator/view/rotuloFrames.jsp?params=Radicado=\"\n\t\t\t+ object.value;\n\tdocument.getElementById(\"LINK_Ticket\").href = ticket.value;\n}", "function sendIntroResponse(text_area, choice, defaultmsg, form, message_id, theBtn, buttonText, route, successmsg, requester, target) {\n\n // Wire the textarea\n responseTextarea('show', choice, defaultmsg, text_area);\n\n // Cancel request response\n $('.btn_cancel_message').unbind('click').bind('click', function () {\n responseTextarea('hide', choice, defaultmsg, text_area);\n });\n\n // SUBMIT THE INTRO RESPONSE FORM\n // =================================================================================================+\n $(form).unbind('submit').bind(\"submit\", function() {\n\n if (choice === 'accept' || choice === 'send') {\n var message = $('#accept_response_text').val();\n } else if (choice === 'deny') {\n var message = $('#deny_response_text').val();\n }\n \n var params = { 'response':message, 'id':message_id };\n\n $(theBtn).css('cursor','auto');\n $(theBtn).css('background','#ccc');\n $(theBtn).text(buttonText);\n $(theBtn).attr(\"disabled\", \"disabled\");\n\n WHOAT.networking.postToServerWithAjax(('/inbox/'+message_id+route), params, function (response) {\n\n if (response) {\n\n if (choice === 'accept') {\n $(theBtn).text(successmsg);\n location.reload();\n\n } else if (choice === 'send') {\n $(theBtn).text('Request Forwarded');\n setTimeout(function () {\n window.location = '/dashboard';\n }, 2000);\n\n } else if (choice === 'deny') {\n window.location = '/';\n }\n\n } else if (response.statusText === 'error') {\n // error message...\n }\n \n });\n\n return false;\n });\n }", "function submitLink(link) {\n const form =\n $('<form>', {\n method: 'POST',\n action: link.attr('href'),\n });\n\n const token =\n $('<input>', {\n type: 'hidden',\n name: 'authenticity_token',\n value: $.rails.csrfToken(),\n });\n\n const method =\n $('<input>', {\n name: '_method',\n type: 'hidden',\n value: link.data('method'),\n });\n\n form.append(token, method).appendTo(document.body).submit();\n}", "function wbFB(){ this.sendFrm = wbFBSendForm }", "preparingEmailSending() {\n const url = 'mailto:' + this.state.email + '?subject=Your Storj mnemonic&body=' + this.state.mnemonic;\n Linking.openURL(url); \n }", "function sendSelfEmail(survey_id,url) {\r\n\t$.get(app_path_webroot+'Surveys/email_self.php', { pid: pid, survey_id: survey_id, url: url }, function(data) {\r\n\t\tif (data != '0') {\r\n\t\t\tsimpleDialog('The survey link was successfully emailed to '+data,'Email sent!');\r\n\t\t} else {\r\n\t\t\talert(woops);\r\n\t\t}\r\n\t});\r\n}", "function generateLink(ev) {\n ev.preventDefault();\n\n const fullNameValidation = validateFullName();\n const rollNumberValidation = validateRollNumber();\n const departmentValidation = validateSelection();\n\n firstValidation = false;\n\n if (fullNameValidation && rollNumberValidation && departmentValidation) {\n const fullNameValue = fullName.value.trim();\n const rollNumberValue = rollNumber.value.trim();\n const departmentValue = department.value;\n\n // Pick a random rating for feedback\n const ratingsAvailable = ['5 - Excellent', '4 - Good', '3 - Average'];\n const randomRating = ratingsAvailable[Math.floor(Math.random() * 3)];\n\n const baseUrl =\n 'https://docs.google.com/forms/d/e/1FAIpQLScJu10Mv2uYVoCEvY7-thq5UMpbXfV466aMU6O9REaqVosNeA/formResponse';\n\n const queryUrl = `${baseUrl}?entry.1110617932=${rollNumberValue.toUpperCase()}&entry.1569197185=${fullNameValue}&entry.1265045525=${departmentValue}&entry.248948479=${rollNumberValue.toLowerCase()}@cvsr.ac.in&entry.362064286=${randomRating}&entry.624867601=No+issues&entry.940688449=Nothing&submit=Submit`;\n\n linkContent.textContent = queryUrl;\n linkBox.classList.add('show');\n } else {\n return;\n }\n}", "function finalizeLink(base_url, ref_id, ref_type_id, txt_link_url, txt_link_title, txt_link_desc, div_thanks, div_add_a_link, div_place_holder, ajax_new_link_container, b_from_news_page, optional_sls_link_id){\n\tvar b_valid = true;\n\t// Validate the link url\n\tif($(txt_link_url).value == '' || $(txt_link_url).value == 'http://'){\n\t\talert('You must enter a link to be validated.');\n\t\tb_valid = false;\n\t}\n\t// Validate the link title\n\telse if($(txt_link_title).value == ''){\n\t\talert('You must enter a title.');\n\t\tb_valid = false;\n\t}\n\telse if(!isValidUrl($(txt_link_url).value)){\n\t\talert('You must enter a valid link.');\n\t\tb_valid = false;\n\t}\n\n\t// If an sls link id was passed in - then the submission is an edit\n\tif(optional_sls_link_id && b_edit_sls){\n\t\tif(b_valid){\n\t\t\tvar link = $(txt_link_url).value;\n\t\t\t$('div_save').innerHTML = '<b>Submitting Link...</b>';\n\t\t\tpars = 'type=38&action=ajax_submit_edited_link&sls_link_id='+optional_sls_link_id+'&sls_link_title='+encodeURIComponent($(txt_link_title).value)+'&sls_link_deck='+encodeURIComponent($(txt_link_desc).value)+'&ref_type_id='+ref_type_id+'&ref_id='+ref_id;\n\n\t\t\t// Make the ajax call to update the div\n\t\t\tvar myAjax = new Ajax.Updater(\n\t\t\t\t\t\t 'div_thanks',\n\t\t\t\t\t\t base_url, {\n\t\t\t\t\t\t\t\tmethod: 'get',\n\t\t\t\t\t\t\t\tparameters: pars,\n\t\t\t\t\t\t\t\tonComplete:function(){\n\t\t\t\t\t\t\t\t\tfoldUp($(div_add_a_link), .5, 210); //HIDE THE FORM\n\t\t\t\t\t\t\t\t\tb_open_form = false;\n\t\t\t\t\t\t\t\t\tb_open_thank_you_div = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t });\n\t\t}\n\t}\n\telse{\n\t\t// If everything is all good -> submit the link\n\t\tif(b_valid){\n\n\t\t\tvar link = $(txt_link_url).value;\n\n\t\t\t$('div_save').innerHTML = '<b>Submitting Link...</b>';\n\n\t\t\tpars = 'type=38&action=ajax_submit_link&txtStoryURL='+encodeURIComponent($(txt_link_url).value)+'&txtStoryTitle_mand='+encodeURIComponent($(txt_link_title).value)+'&tarStoryDesc_mand='+encodeURIComponent($(txt_link_desc).value)+'&ref_type_id='+ref_type_id+'&ref_id='+ref_id;\n\n\t\t\t// AJAX > SUBMIT THE COMMENT AND FOLD UP\n\t\t\t// The div to get updated should be the 'THANK YOU' div..... this should print either\n\t\t\t// - 'Submitted Successfully'\n\t\t\t// - 'Duplicate link'\n\t\t\t// - 'Invalid (malformed) link'\n\t\t\tvar myAjax = new Ajax.Updater(\n\t\t\t\t\t\t\t 'div_thanks',\n\t\t\t\t\t\t\t base_url, {\n\t\t\t\t\t\t\t\tmethod: 'get',\n\t\t\t\t\t\t\t\tparameters: pars,\n\t\t\t\t\t\t\t\tonComplete:function(){\n\t\t\t\t\t\t\t\t\tfoldUp($(div_add_a_link), .5, 210); //HIDE THE FORM\n\t\t\t\t\t\t\t\t\tfadeIn($(div_thanks), .8); //DISPLAY THE THANK YOU DIV\n\t\t\t\t\t\t\t\t\t$(txt_link_url).value = 'http://'; //RESET THE FORM VALUES\n\t\t\t\t\t\t\t\t\t$(txt_link_title).value = ''; //RESET THE FORM VALUES\n\t\t\t\t\t\t\t\t\t$(txt_link_desc).value = ''; //RESET THE FORM VALUES\n\t\t\t\t\t\t\t\t\tb_open_form = false; //THE FORM SHOULD HAVE FOLDED UP SO SET THIS BOOLEAN\n\t\t\t\t\t\t\t\t\tb_open_thank_you_div = true; //THE THANKS DIV SHOULD NOW BE VISIBLE SO SET THIS BOOLEAN\n\n\t\t\t\t\t\t\t\t\t// RESET THE SUBMIT/CLOSE LINKS (the form is closed - so it shouldn't be noticeable)\n\t\t\t\t\t\t\t\t\tif(b_from_news_page)\n\t\t\t\t\t\t\t\t\t\tpars = 'type=38&action=ajax_get_submit_tpl&b_from_news_page=true&ref_type_id='+ref_type_id+'&ref_id='+ref_id;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tpars = 'type=38&action=ajax_get_submit_tpl&b_from_news_page=false&ref_type_id='+ref_type_id+'&ref_id='+ref_id;\n\t\t\t\t\t\t\t\t\tvar secondAjax = new Ajax.Updater(\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'div_save',\n\t\t\t\t\t\t\t\t\t\t\t\t\t base_url, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t method: 'get',\n\t\t\t\t\t\t\t\t\t\t\t\t\t parameters: pars,\n\t\t\t\t\t\t\t\t\t\t\t\t\t onComplete:function(){\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//IF THIS CAME FROM THE NEWS PAGE, THEN DO THE DIV APPEND, ETC.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(b_from_news_page){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// GRAB THE SUBMISSION AND POPULATE THE CONTAINER DIV WITH THE RECENTLY SUBMITTED LINK\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar container_div = $(ajax_new_link_container); // CONTAINER DIV\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar newdiv = document.createElement('div'); // CREATE A NEW DIV TO BE APPENDED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$(newdiv).style.display = 'none'; // SEST THE STYLE TO NONE (SO WE CAN FADE IT IN SMOOTHLY)\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpars = 'type=38&action=ajax_get_container_div&b_from_news_page=true&=true&txtStoryURL='+encodeURIComponent(link)+'&ref_type_id='+ref_type_id+'&ref_id='+ref_id;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar secondAjax = new Ajax.Updater(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t newdiv,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t base_url, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t method: 'get',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t parameters: pars,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t onComplete:function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontainer_div.appendChild(newdiv); // APPEND THE NEW DIV TO THE CONTAINER\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//container_div.prepend(newdiv);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//$(ajax_new_link_container).insertBefore(newdiv);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfadeIn($(newdiv)); // NOW FADE THIS BAD BOY IN\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ADDING DW TAGGING -COONCE (11/3/2006)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar dw_url = 'http://dw.com.com/redir?ltype=&siteid=45&edid=3&asId=&astId=12&ptId=&ontid=9349&useract=156&destURL=http://img.gamespot.com/gamespot/b.gif';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar clrgif = document.createElement('img');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclrgif.setAttribute('src', dw_url);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdocument.body.appendChild(clrgif);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//IF THIS CAME FROM THE SUMMARY PAGE -> DO AN LI APPEND, ETC.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// GRAB THE SUBMISSION AND POPULATE THE CONTAINER DIV WITH THE RECENTLY SUBMITTED LINK\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar container_list = $('ul_updates'); // CONTAINER List Element (UL)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar new_li = document.createElement('li'); // CREATE A NEW LI TO BE APPENDED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$(new_li).style.display = 'none'; // SEST THE STYLE TO NONE (SO WE CAN FADE IT IN SMOOTHLY)\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpars = 'type=38&action=ajax_get_container_div&b_from_news_page=false&=true&txtStoryURL='+encodeURIComponent(link)+'&ref_type_id='+ref_type_id+'&ref_id='+ref_id;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar secondAjax = new Ajax.Updater(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t new_li,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t base_url, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t method: 'get',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t parameters: pars,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t onComplete:function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontainer_list.appendChild(new_li); // APPEND THE NEW DIV TO THE CONTAINER\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfadeIn($(new_li)); // NOW FADE THIS BAD BOY IN\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ADDING DW TAGGING -COONCE (11/3/2006)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar dw_url = 'http://dw.com.com/redir?ltype=&siteid=45&edid=3&asId=&astId=12&ptId=&ontid=9349&useract=156&destURL=http://img.gamespot.com/gamespot/b.gif';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar clrgif = document.createElement('img');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclrgif.setAttribute('src', dw_url);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdocument.body.appendChild(clrgif);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t });\n\n\t\t}\n\t}\n\n\n}", "function onSubmitted(){\n\t\t\t\t\t\t\t\t\t\t\tlocation.hash = \"/tool/list\";\n\t\t\t\t\t\t\t\t\t\t}", "function SubmissionForm() {\n var urlLink = \"https://docs.google.com/a/noaa.gov/spreadsheet/viewform?usp=drive_web&formkey=dHAycC1MYndJb0hTdGRaYXAzVTVBdWc6MA#gid=0\";\n var Win = open(urlLink, \"SubmissionFormPage\",\"height=800,width=1000,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes\");\n Win.focus();\n }", "function linkHandler ( info, tab ) {\n sendItem( { 'message': info.linkUrl } );\n}", "sendEmail() {\n Linking.openURL(`mailto:${this.state.emailAddr}?subject=${this.state.subject}&body=${this.state.body}`);\n }", "function replyTo(s, c) {\n if (c || document.message_inbox_form.setvar_autofillInbox.checked) {\n document.message_inbox_form.message.value = \"/msg \"+s+\" \";\n document.message_inbox_form.message.focus();\n }\n}", "function sendQuestion(){\n $('#questionModal').modal('hide');\n // window.open(taeUIInline.getInstance().questionsURL+\"/create?text=\"+$(\"#inputQuestion\").val()+\"&tags=Infanzia,\"+simpaticoEservice,\"_blank\");\n window.open(taeUIInline.getInstance().questionsURL+\"/create?tags=Infanzia,\"+simpaticoEservice,\"_blank\");\n}", "function handleSubmit(event) {\n event.preventDefault()\n const form = new FormData(this)\n correo.setAttribute('href', `mailto:[email protected]?subject=${form.get('name')}${form.get('email')}${form.get('asunto')}&body=}${form.get('mensaje')}`)\n correo.click()\n}", "function sendMail() {\n var link = \"mailto:\" + encodeURIComponent(document.getElementById('correo_D').value)\n + \"?cc=\" \n + \"&subject=\" + encodeURIComponent(document.getElementById('asunto').value)\n + \"&body=\" + encodeURIComponent(document.getElementById('mensaje').value)\n ;\n \n window.location.href = link;\n}", "function submitMessage() {\r\n\t$(\"#contact form input, #contact form textarea\").hide();\r\n\t$(\"#contact form\").append(\"<strong>Thank you, we'll be in touch shortly!</strong>\");\r\n _gaq.push(['_trackPageview', '/thankyou']);\r\n\tdocument.getElementById(\"google-adwords-fake-target\").src = \"thank-you.html\";\r\n}", "function contactAuthor()\n{\n _gwAuthor = window.open( '', 'gexAuthor', '' );\n _gwAuthor.location = 'http://' + window.location.hostname + '/World/Popmundo.aspx/Conversations/Conversation/3248185';\n}", "function Slack_ReceiveMooMooCommand(data){\r\n var url = data.text;\r\n if (validateUrl(url)) {\r\n return \"Please enter a valid URL\";\r\n } else {\r\n Slack_SendMessageCard(data);\r\n }\r\n}", "function AllOKAllowSubmit() {\n if (formInUse === \"#rpsForm\") {\n AppendReasonToRequest(reasonForChallenge);\n\n challengeString += `Do you <a href=\"https://spelmakare.se/steem/rps?challenger=${userName}&permlink=${permLink}\">accept?</a>`;\n\n jsonChallenge.author = userName;\n jsonChallenge.permlink = permLink;\n jsonChallenge.parent_author = userToChallenge;\n jsonChallenge.parent_permlink = permLinkParent;\n jsonChallenge.body = encodeURIComponent(challengeString);\n jsonChallenge.json_metadata.challenged = userToChallenge;\n jsonChallenge.json_metadata.challenge_type = reasonForChallenge;\n jsonChallenge.json_metadata.challenger_rpschoicemd5 = rpsChoiceMD5;\n }\n else {\n jsonResponse.author = userName;\n jsonResponse.permlink = permLink;\n jsonResponse.parent_author = userToChallenge;\n jsonResponse.parent_permlink = permLinkParent;\n jsonResponse.body = encodeURIComponent(actualResponse);\n jsonChallenge.json_metadata.challenger = userToChallenge; ///Challenger is userToChallenge in response!\n jsonChallenge.json_metadata.result = winner;\n }\n\n $(\"#question6\").delay(200).fadeIn(300);\n $(\"#rpsPreviewTitle\").delay(200).fadeIn(300);\n $(\"#rpsPreview\").delay(200).fadeIn(300);\n $(\"#submit\").delay(200).fadeIn(300);\n $(\"#rpsPreview\").html(challengeString);\n\n readyToSubmit = true;\n }", "function addLink(elem, site_name, target, site, state, scout_tick, post_data) {\r\n // State should always be one of the values defined in valid_states.\r\n if ($.inArray(state, valid_states) < 0) {\r\n console.log(\"Unknown state: \" + state);\r\n }\r\n\r\n var link = $('<a />').attr('href', target).attr('target', '_blank');\r\n // Link and add Form element for POST method.\r\n if ('mPOST' in site) {\r\n var form_name = (site['TV']) ? site['name'] + '-TV-form-' + scout_tick : site['name'] + '-form-' + scout_tick;\r\n var placebo_url = new URL(target).origin;\r\n link = $('<a />').attr('href', placebo_url).attr('onclick', \"$('#\" + form_name + \"').submit(); return false;\").attr('target', '_blank');\r\n\r\n var data = (post_data.match('{')) ? post_data : '{\"' + post_data.replace(/&/g, '\",\"').replace(/=/g, '\":\"').replace(/\\+/g, ' ') + '\"}';\r\n var addform = $('<form></form>');\r\n addform.attr('id', form_name);\r\n addform.attr('action', target);\r\n addform.attr('method', 'post');\r\n addform.attr('style', 'display: none;');\r\n addform.attr('target', '_blank');\r\n\r\n if (post_data.match('},{')) {\r\n const dataArray = (new Function(\"return [\" +data+ \"];\")());\r\n dataArray.forEach(function (item, index) {\r\n let addinput = $(\"<input>\");\r\n addinput.attr('type', 'text');\r\n addinput.attr('name', item.key);\r\n addinput.attr('value', item.value);\r\n addform.append(addinput);\r\n $('body').append(addform);\r\n });\r\n } else {\r\n data = JSON.parse(data);\r\n for (const name in data) {\r\n let addinput = $(\"<input>\");\r\n addinput.attr('type', 'text');\r\n addinput.attr('name', name);\r\n addinput.attr('value', data[name]);\r\n addform.append(addinput);\r\n $('body').append(addform);\r\n }\r\n }\r\n }\r\n // Icon/Text appearance.\r\n let icon;\r\n const border_width = GM_config.get('iconsborder_size');\r\n if (getPageSetting('use_mod_icons') && getPageSetting('call_http_mod')) {\r\n icon = getFavicon(site);\r\n (!GM_config.get('one_line') && !onSearchPage) ? icon.css({'border-width': '0px', 'border-style': 'solid', 'border-radius': '2px', 'margin': '1px 0px 2px'})\r\n : icon.css({'border-width': border_width, 'border-style': 'solid', 'border-radius': '2px', 'margin': '1px 0px 2px'});\r\n if (state == 'error' || state == 'logged_out') {\r\n (getPageSetting('highlight_sites').split(',').includes(site['name'])) ? icon.css('border-color', 'rgb(255,0,0)')\r\n : icon.css('border-color', 'rgb(180,0,0)');\r\n } else if (state == 'missing') {\r\n (getPageSetting('highlight_sites').split(',').includes(site['name'])) ? icon.css('border-color', 'rgb(255,255,0)')\r\n : icon.css('border-color', 'rgb(230,200,100)');\r\n } else if (state == 'found') {\r\n (getPageSetting('highlight_sites').split(',').includes(site['name'])) ? icon.css('border-color', 'rgb(0,220,0)')\r\n : icon.css('border-color', 'rgb(0,130,0)');\r\n if ((site['name']).match('-Req')) icon.css('border-color', 'rgb(50,50,200)');\r\n }\r\n link.append(icon);\r\n } else if (!getPageSetting('use_mod_icons')) {\r\n site_name = (getPageSetting('highlight_sites').split(',').includes(site['name'])) ? site_name.bold() : site_name;\r\n if (state == 'missing' || state == 'error' || state == 'logged_out') {\r\n link.append($('<s />').append(site_name));\r\n } else {\r\n link.append(site_name);\r\n }\r\n if (state == 'error' || state == 'logged_out') {\r\n link.css('color', 'red');\r\n }\r\n } else {\r\n icon = getFavicon(site);\r\n icon.css({'border-width': '0px', 'border-style': 'solid', 'border-radius': '2px', 'margin': '1px 0px 2px'});\r\n (getPageSetting('highlight_sites').split(',').includes(site['name'])) ? icon.css('border-color', 'rgb(0,220,0)')\r\n : icon.css('border-color', 'rgb(0,130,0)');\r\n if ((site['name']).match('-Req')) icon.css('border-color', 'rgb(50,50,200)');\r\n link.append(icon);\r\n }\r\n // Create/find elements for Search/List pages.\r\n if (onSearchPage) {\r\n var result_box = $(elem).find('td.result_box');\r\n if (result_box.length == 0) {\r\n $(elem).append($('<td />').addClass('result_box'));\r\n $.each(valid_states, function(i, name) {\r\n $(elem).find('td.result_box').append(\"<span id='imdbscout_\" + name + scout_tick + \"'>\"+'</span>');\r\n });\r\n }\r\n }\r\n if (onSearchPage && GM_config.get('load_third_bar_search')) {\r\n var result_box3 = $(elem).find('xd.result_box_3rd');\r\n if (result_box3.length == 0) {\r\n $(elem).append($('<xd />').addClass('result_box_3rd'));\r\n $.each(valid_states, function(i, name) {\r\n $(elem).find('xd.result_box_3rd').append(\"<span id='imdbscout3_\" + name + scout_tick + \"'>\"+'</span>');\r\n });\r\n }\r\n }\r\n // Add links to IMDb page.\r\n var in_element_two = ('inSecondSearchBar' in site) ? site['inSecondSearchBar'] : false;\r\n var in_element_three = ('inThirdSearchBar' in site) ? site['inThirdSearchBar'] : false;\r\n if (onSearchPage && in_element_two || in_element_three && !getPageSetting('load_third_bar') || in_element_two && in_element_three) {\r\n return;\r\n } else if (!onSearchPage && in_element_two) {\r\n $('#imdbscoutsecondbar_' + state).append(link).append(' ');\r\n } else if (!onSearchPage && in_element_three) {\r\n $('#imdbscoutthirdbar_' + state).append(link).append(' ');\r\n } else if (!onSearchPage) {\r\n $('#imdbscout_' + state).append(link).append(' ');\r\n } else if (!in_element_three) {\r\n $('#imdbscout_' + state + scout_tick).append(link);\r\n } else {\r\n $('#imdbscout3_' + state + scout_tick).append(link);\r\n }\r\n\r\n if (onSearchPage) {\r\n // Hack: Convert link to button to deal with same-origin problem (icons mode only).\r\n // Sorting removes event, so on the title pages same hack will run at the end of the sorting (iconToButtonHack).\r\n if (site['name'] == \"TorSyndikat\") {\r\n const button = $('span[id*='+ scout_tick +']').find('img[title=\"TorSyndikat\"]').parent();\r\n const link = button.attr('href');\r\n button.prop(\"href\", \"javascript: void(0)\");\r\n button.removeAttr(\"target\");\r\n button.click(function() {\r\n GM.openInTab(link);\r\n });\r\n }\r\n if (site['name'] == \"TorSyndikat-Req\") {\r\n const button = $('span[id*='+ scout_tick +']').find('img[title=\"TorSyndikat-Req\"]').parent();\r\n const link = button.attr('href');\r\n button.prop(\"href\", \"javascript: void(0)\");\r\n button.removeAttr(\"target\");\r\n button.click(function() {\r\n GM.openInTab(link);\r\n });\r\n }\r\n }\r\n // Hack: Same-origin problem with POST, so remove 'onclick' form (icons mode only).\r\n if (site['name'] == \"SFP-Req\") {\r\n const button = $('img[title=\"SFP-Req\"]').parent();\r\n button.prop(\"href\", \"https://s-f-p.dyndns.dk/viewrequests.php\");\r\n button.removeAttr(\"onclick\");\r\n }\r\n\r\n // Call to the sorting launcher.\r\n if (!onSearchPage && !in_element_two && !in_element_three) {\r\n iconSorterLauncher(site);\r\n }\r\n}", "function puliziaForm() {\n var action = $(this).data(\"href\");\n // Invio il form\n $(\"#formRichiestaEconomale\").attr(\"action\", action)\n .submit();\n }", "function puliziaForm() {\n var action = $(this).data(\"href\");\n // Invio il form\n $(\"#formRichiestaEconomale\").attr(\"action\", action)\n .submit();\n }", "function newResponselnk(recipientId, text) {\n text = text || \"\";\n var buscar = text.match(/buscar/gi);\n var ux = text.match(/ux/gi);\n var blog = text.match(/blog/gi);\n var php = text.match(/php/gi);\n var android = text.match(/android/gi);\n var javascript = text.match(/javascript/gi);\n var python = text.match(/python/gi);\n var ruby = text.match(/ruby/gi);\n if(buscar != null && blog != null) {\n var query = \"\";\n\n //sendMessage(recipientId, message);\n if(android != null) {\n query = \"Android\";\n } else if (javascript != null) {\n query = \"Javascript\";\n } else if (php != null) {\n query = \"PHP\";\n } else if (ux != null) {\n query = \"UX\";\n } else if (python != null) {\n query = \"Python\";\n } else if (ruby != null) {\n query = \"Ruby\";\n }\n sendButtonMessagelnk(recipientId, query);\n return true\n }\n return false;\n}", "function sendButtonMessagelnk(recipientId, query) {\n var messageData = {\n recipient: {\n id: recipientId\n },\n message: {\n attachment: {\n type: \"template\",\n payload: {\n template_type: \"button\",\n text: \"Resultados de \"+query+\":\",\n buttons:[{\n type: \"web_url\",\n url: \"https://platzi.com/blog/?s=\"+query,\n title: \"Platzi: \" + query\n }]\n }\n }\n }\n }; \n\n callSendAPI(messageData);\n}", "function shareLink(groupID) {\n share.setAttribute(\"value\", `https://jus-watch.web.app/invite.html?${groupID}`); // *** need to change to hosted link \n nominateBtn.addEventListener(\"click\", function (e) {\n e.preventDefault;\n window.location.href = `nominate.html?${groupID}`;\n })\n voteBtn.addEventListener(\"click\", function (e) {\n e.preventDefault;\n window.location.href = `vote.html?${groupID}`;\n })\n chatBtn.addEventListener(\"click\", function (e) {\n e.preventDefault;\n window.location.href = `group-msgs.html?${groupID}`;\n })\n}", "function send_messenger(){\n var text_messenger = $('#text_messenger').val();\n doGetBotResponse(text_messenger, false);\n }", "function referringPage() {\n window.location = quizLink;\n}", "function frmPatientSummary_btnOpenCPGLinksClick() {\n searchPatient_closeSearchList();\n kony.print(\"frmPatientSummary.btnreftxt.text---->>>\" +frmPatientSummary.btnreftxt.text);\n CPG_Links.fileName=\"\";\n CPG_Links.fileName=patientSummaryObjects.CPGLinks[0];\n var link = MF_CONSTANTS.CLOUD_URL+\"/\"+CPG_Links.pdfLink+\"=\"+CPG_Links.fileName;\n kony.print(\"CPG link ---->>>\" +link);\n com.healogics.patientSummary.openCPGLink(link);\n}", "function add_link(link_name) {\n document.querySelector(\"#link-view\").style.display = \"none\"\n document.querySelector(\"#add_link-view\").style.display = \"block\"\n \n document.querySelector(\"#add_link-view\").innerHTML = `<form id='add_link'><div class=\"input-group mb-3\">\n <input type=\"text\" class=\"form-control\" placeholder=\"URL\" id=\"basic_url\" aria-describedby=\"basic-addon3\"> </div>\n <div class=\"input-group mb-3\"> <input type=\"text\" class=\"form-control\" placeholder=\"Name\" id=\"basic_name\" aria-describedby=\"basic-addon3\"> \n </div> <button type=\"submit\" class=\"add_link btn btn-dark\" name=\"add_link\">Add Link</button></form>`\n\n // Submit link and add to database\n document.querySelector('#add_link').onsubmit = function() {\n fetch(`/add`, {\n method: 'POST',\n body: JSON.stringify({\n name: document.querySelector('#basic_name').value,\n subject: link_name,\n link: document.querySelector('#basic_url').value\n }) \n })\n } \n }", "function sendMessage(target, page, title) {\n if ('twitter' === target) {\n document.location.href = `https://twitter.com/intent/tweet?original_referer=${encodeURI(page)}&text=${encodeURI(title) + ' @DevMindFr'}&tw_p=tweetbutton&url=${encodeURI(page)}`;\n }\n else if ('linkedin' === target) {\n document.location.href = `https://www.linkedin.com/shareArticle?mini=true&url=${encodeURI(page)}&text=${encodeURI(title)}`;\n }\n }", "function showDirectInquiry(url, paramMap, showLightBox, lightBoxOptions) {\n\n var parameterPairs = paramMap.split(\",\");\n var queryString = \"&showHome=false\";\n\n for (i in parameterPairs) {\n parameters = parameterPairs[i].split(\":\");\n\n if (jQuery('[name=\"' + escapeName(parameters[0]) + '\"]').val() == \"\") {\n alert(\"Please enter a value in the appropriate field.\");\n return false;\n } else {\n queryString = queryString + \"&\" + parameters[1] + \"=\" + jQuery('[name=\"' + escapeName(parameters[0]) + '\"]').val();\n }\n }\n\n if (showLightBox) {\n // Check if this is called within a light box\n if (!getContext().find('.fancybox-inner').length) {\n queryString = queryString + \"&showHistory=false&dialogMode=true\";\n lightBoxOptions['href'] = url + queryString;\n getContext().fancybox(lightBoxOptions);\n } else {\n // If this is already in a lightbox just open in current lightbox\n queryString = queryString + \"&showHistory=true&dialogMode=true\";\n window.open(url + queryString, \"_self\");\n }\n } else {\n queryString = queryString + \"&showHistory=false\";\n window.open(url + queryString, \"_blank\", \"width=640, height=600, scrollbars=yes\");\n }\n}", "function sendMail(contactform) {\n emailjs.send(\"gmail\", \"patagonianexperience\", {\n \"first_name\": contactform.firstname.value,//Link to contactForm input on contact page\n \"last_name\": contactform.lastname.value,\n \"from_email\": contactform.emailaddress.value,\n \"travel_query\": contactform.query.value\n })\n .then(\n function(response) {\n console.log(\"SUCCESS\", response);\n },\n function(error) {\n console.log(\"FAILED\", error);\n }\n );\n return false; // To block from loading a new page\n}", "function form_submit()\n {\n /* Get reply form */\n var form = submit_btn.form;\n\n /* The fields we need when do a post */\n var fields = [\"followup\", \"rootid\", \"subject\", \"upfilerename\",\n \"username\", \"passwd\", \"star\", \"totalusetable\", \"content\",\n \"expression\", \"signflag\"];\n\n /* The fields we need to encode when post */\n var encode_fields = [ \"content\" ];\n\n /* Do ajax post */\n ajax_post(form, fields, encode_fields, {\"onreadystatechange\": post_callback});\n }", "function puliziaForm() {\n var action = $(this).data(\"href\");\n // Invio il form\n $(\"#formInserisciPrimaNotaLibera\").attr(\"action\", action)\n .submit();\n }", "function reply() {\r\n try {\r\n var fromWhere = JSON.parse(localStorage.getItem(\"emailToView\")).fromWhere;\r\n if (fromWhere == FROM_ADMIN_INBOX) {\r\n linkAdminCompose(fromWhere);\r\n } else if (fromWhere == FROM_STUDENT_INBOX) {\r\n linkStudentCompose(fromWhere);\r\n }\r\n } catch(e) {\r\n alert(e.name + \"\\n\" + e.message);\r\n }\r\n}", "function redirect_from_waiver_form(site_url)\n{\t\n\tif ($('#accept_terms').is(':checked'))\n\t{\n\t\tvar video_id = $('#terms_video_id').val();\n\t\t//alert(video_id);\n\t\t$.ajax({\n\t\t\tcache: false,\n\t\t\turl: site_url+\"myaccount/user_update_health_waiver_status/\",\t\t\t\n\t\t\tsuccess: function(data){\n\t\t\t\t//alert(data);\n\t\t\t\twindow.location = site_url+'video/play_option/'+video_id+'/';\t\t\n\t\t\t}\n\t\t});\n\t\t\t\t\n\t}else{\n\t\t//alert('Please accept our terms & conditions!');\n\t\topen_messagebox(\"Alert\", \"Please accept our terms & conditions!\");\n\t\t\n\t}\n}", "function useMail(s){\r\n s = s.replace(/\\s+/g, ''); // .replace(/\\[dot\\]/g,\".\")\r\n this.location.href = \"mailto://\" + s + \"?subject=link from fbt-mechatronik.de\" + iAM;\r\n} // useMail", "function send_form_in( name )\r\n{\r\n\treturn send_form( name , function( data ){ set_form_notice( name , data ) } );\r\n}", "function manageAnswer(e) {\n var form = e.source;\n var rep = {\n \"Title\":\"\",\n \"Message\":\"\",\n \"Email\":\"\"\n };\n var itemResponses = e.response.getItemResponses();\n for (var i = 0; i < itemResponses.length; i++) {\n var itemTitle = itemResponses[i].getItem().getTitle();\n var itemResponse = itemResponses[i].getResponse();\n rep[itemTitle] = itemResponse;\n Logger.log(itemTitle + ': ' + itemResponse );\n }\n try{\n var issue = submitIssue(rep);\n var body = \"<p>Hi,</p>\"\n +\"<p>Thank you for submitting your issue, you can follow it on this page : <a href='\"+issue.html_url+\"'>link</a>.</p>\"\n +\"<p>Title : \"+rep.Title+\"<br>\"\n +\"Message : \"+rep.Message+\"</p>\"\n +\"Regards\";\n GmailApp.sendEmail(rep.Email, 'Issue posted on GitHub', '', {\n htmlBody:body,\n });\n }catch(e){\n GmailApp.sendEmail(Session.getEffectiveUser().getEmail(), 'Error issue submission', '', {\n htmlBody:JSON.stringify(rep),\n });\n }\n}", "function sendLinks() {\n const resultLink = $(\"#resultlink\").serialize();\n const voteLink = $(\"#polllink\").serialize();\n $.ajax({\n method: \"GET\",\n url: \"/links\",\n data: resultLink + voteLink,\n dataType: \"json\",\n success: function (result) {\n console.log(\"it was success \", result);\n },\n error: function (err) {\n console.log(\"we are in an error\", err);\n }\n })\n }", "function btn() {\n var name = document.getElementById('artistName').value;\n var email = document.getElementById('email').value;\n var phone = document.getElementById('phoneNum').value;\n var message = document.getElementById('statement').value;\n var artTitle = document.getElementById('artworkTitle').value;\n var body = \"\";\n\n\n if (name != \"\" && email != \"\" && phone != \"\" && message != \"\" && artTitle != \"\") {\n var valid = true;\n\n } else {\n var valid = false;\n }\n\n if (valid) {\n body = \"Dear Art Gallery,%0D%0A%0D%0A\" +\n artTitle + \" is the title of this art piece.%0D%0A\" +\n \"Here is a statement about this piece: %0D%0A\" +\n message + \"%0D%0A%0D%0A\" +\n \"Thank you,%0D%0A\" +\n name + \"%0D%0A\" +\n email + \"%0D%0A\" +\n phone;\n\n // constructed the body of the message above.\n window.open('mailto:[email protected]?subject=Artwork Submission&body=' + body);\n alert('Thank you for the submission! If we choose your artwork, we will be in contact shortly.');\n\n\n } else {\n alert(\"Please fill in all fields.\");\n }\n}", "function share(){\r\n\turlstring = window.location.hostname+\"?seed=\"+state.getSeed()+\"&time=\"+endTime+\"&caption=\"+encodeURIComponent(captionText.toString())+\"&text=\"+encodeURIComponent(simText);\r\n\tconsole.log(urlstring);\r\n\tvar textarea = document.getElementById(\"sharetext\");\r\n\ttextarea.value = urlstring;\r\n\tmodal.style.display = \"block\";\r\n}", "function send() {\n window.location.href = \"/add\";\n}", "function sendAccountLinking(recipientId) {\n var messageData = {\n recipient: {\n id: recipientId\n },\n message: {\n attachment: {\n type: \"template\",\n payload: {\n template_type: \"button\",\n text: \"Welcome. Link your account.\",\n buttons:[{\n type: \"account_link\",\n url: SERVER_URL + \"/authorize\"\n }]\n }\n }\n }\n }; \n\n callSendAPI(messageData);\n}", "function goToTaskForm() {\n window.location.href = TASK_CREATOR + '?id=' + projectID;\n}", "function linkStudentCompose(fWhere) {\r\n try {\r\n setUpLinkBackJSON(fWhere);\r\n window.location.href = \"studentCompose.html\";\r\n } catch (e) {\r\n alert(e.name + \"\\n\" + e.message)\r\n }\r\n}", "function send($form) {\n\t\tvar $btn = $form.find('.submit');\n\t\tvar programTitle = $form.closest('figure').find('figcaption h3').text();\n\t\tvar department = $('#degrees-header h2').text();\n\t\t$form.find('input[name=program]').val(programTitle);\n\t\t$form.find('input[name=department]').val(department);\n\t\t$btn.removeClass('success error');\n\t\t$btn.addClass('pending');\n\t\t$.ajax({\n\t\t\ttype: \"POST\",\n\t\t\tcache: false,\n\t\t\turl: \"https://ouresources.usu.edu/_assets/forms/forms.php\", //form_submit.aspx\n\t\t\tdata: $form.serialize(),\n\t\t\tsuccess: function(data) {\n\t\t\t\tshowDownload();\n\t\t\t},\n\t\t\terror: function(data) {\n\t\t\t\t$btn.find('input').val(\"Couldn't Submit\");\n\t\t\t\t$btn.removeClass('pending');\n\t\t\t\t$btn.addClass('error');\n\t\t\t}\n\t\t});\n\t}", "function sesblogsendQuickShare(url){\n\tif(!url)\n\t\treturn;\n\tsesJqueryObject('.sesbasic_popup_slide_close').trigger('click');\n\t(new Request.HTML({\n method: 'post',\n 'url': url,\n 'data': {\n format: 'html',\n\t\t\t\tis_ajax : 1\n },\n onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript) {\n //keep Silence\n\t\t\t\tshowTooltip('10','10','<i class=\"fa fa-envelope\"></i><span>'+(en4.core.language.translate(\"Blog shared successfully.\"))+'</span>','sesbasic_message_notification');\n }\n })).send();\n}", "function submitForm(e){\n e.preventDefault(); // stop the form from submitting\n var $textarea = $('form textarea'); // cache the textarea\n if (window.debug) { // not really important but you can set the debug variable at the top to true and add some test stuff inside here\n window.alert('submit');\n }\n urls = $textarea.val(); // get the values from the div\n // this line would clear the textarea but I'm removing this feature $textarea.val(''); // clears the textarea\n link_them(urls); // this creates the links and adds them to the bottom div\n }", "sendAccountLinking( recipientId ) {\n var messageData = {\n recipient: {\n id: recipientId\n },\n message: {\n attachment: {\n type: \"template\",\n payload: {\n template_type: \"button\",\n text: \"Welcome. Link your account.\",\n buttons: [ {\n type: \"account_link\",\n url: envVars.SERVER_URL + \"/authorize\"\n } ]\n }\n }\n }\n };\n\n this.callSendAPI( messageData );\n }", "function sendForm(data) {\n document.querySelector('form').style.display = 'none'\n let box = document.createElement('div')\n box.className = 'everythingOK'\n\n //append the (THANK YOU) box to the HTML\n box.innerHTML = ` \n <h3>Thank you for your time! We will take a look at your Request.</h3>\n `\n document.querySelector('.contactContent').prepend(box)\n }", "function sendMessage() {\n var data = messageBox.value();\n var destination = addressBox.value();\n var outGoing = encodeURI(data);\n httpGet('/destination/' + destination + '/msg/' + outGoing, 'text', requestDone);\n}", "sendSignInLinkEmail (voter_email_address){\n Dispatcher.loadEndpoint(\"voterEmailAddressSave\", {\n text_for_email_address: voter_email_address,\n send_link_to_sign_in: true,\n make_primary_email: true\n });\n }", "function lrpOnEnterSubmit()\n{\n\t// non-lrp, ignore\n\tif (!isLrpTask())\n\t{\n\t\treturn;\n\t}\n\t\n\t// non-Webfacing\n\tif (isWebFacing())\n\t{\n\t\treturn;\n\t}\n\n\t// retrieve frame for main window\n\tvar frame = getFrameCurrent();\n\tvar superMsgElement = frame.document.getElementById(OBJ_SUPMSG);\n\tif (superMsgElement != null)\n\t{\n\t\tsuperMsgElement.value = rtvCommentField();\n\t}\n}", "function submit() {\n var url = urlstartcat + document.getElementById(\"text\").value + urlfinishcat;\n check(url);\n}", "function sendAccountLinking(recipientId) {\n var messageData = {\n recipient: {\n id: recipientId\n },\n message: {\n attachment: {\n type: \"template\",\n payload: {\n template_type: \"button\",\n text: \"Welcome. Link your account.\",\n buttons:[{\n type: \"account_link\",\n url: config.SERVER_URL + \"/authorize\"\n }]\n }\n }\n }\n }; \n\n callSendAPI(messageData);\n}", "function mHttpBtnClick() {\n var outputRecordManager = new ndebug.OutputRecordManager();\n var objTelnet = new ndebug.Telnet('mail.google.com',\n 80,\n outputRecordManager);\n objTelnet.\n setPlainTextDataToSend('GET / HTTP/1.1\\r\\nHost: mail.google.com\\r\\n\\r\\n');\n objTelnet.setCompletedCallbackFnc(printFinishedTelnetOutput);\n objTelnet.createSocket();\n}", "function sendTo(e, url) {\n\n var label, text, model;\n\n e.preventDefault();\n e.stopPropagation();\n\n hideCategoryNav();\n\n text = /build/gi.test(e.target.textContent) ? \"Build Your Lexus\" : e.target.textContent;\n label = e.target.getAttribute(\"data-label\") || \"Category not found\";\n model = e.target.getAttribute(\"data-model\") || \"Model data not found\";\n\n if (typeof fireTag === \"function\") {\n onGlobalNavModelClick(\"Model Flyout\", \"CTA Click\", label, text, model);\n }\n\n window.location.href = url;\n }", "function sendRequest ()\n\t{\n\t\t// Create post comment request queries\n\t\tvar postQueries = queries.concat ([\n\t\t\tbutton.name + '=' + encodeURIComponent (button.value)\n\t\t]);\n\n\t\t// Send request to post a comment\n\t\thashover.ajax ('POST', form.action, postQueries, commentHandler, true);\n\t}", "function MtcClick(){window.open(\"//mtc.contactatonce.com/MobileTextConnectConversationInitiater.aspx?MerchantId=\"+objMtc.MerchantId+\"&ProviderId=\"+objMtc.ProviderId+\"&PlacementId=31\",\"\",\"resizable=yes,toolbar=no,menubar=no,location=no,scrollbars=no,status=no,height=400,width=410\")}", "function linkStudentCompose(fWhere) {\r\n setUpLinkBackJSON(fWhere);\r\n window.location.href = \"studentCompose.html\";\r\n}", "function letsGo() {\r\n\t\tjq(\"div.reply\").each(function()\r\n\t\t{\r\n\t\t\tvar div = jq(this);\r\n\t\t\tif (/^[^Ответ]/.test(div.html()))\r\n\t\t\t{\r\n\t\t\t\tdiv.append(\"[<a class='lor-report-msg' href='javascript:{/*Сообщить модератору (страница не будет перезагружена)*/}'>Сообщить модератору</a>]\");\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\tjq(\"a.lor-report-msg\").click(function() {\r\n\t\t\t// hack: why .unbind() doesn't work\r\n\t\t if (jq(this).html() == \"Просмотреть\") { return true; }\r\n\t\t\t//\r\n\t\t var comment = prompt(\"Please provide a comment about this message\", \"Нацпол\");\r\n\t\t if (comment === null) { return false; }\r\n\t\t // Constructing message for posting\r\n\t\t var msgtext = null;\r\n\t\t var reportlink = jq(this);\r\n\t\t var url1 = reportlink.parent().parent().parent().parent().find(\"div.msg_body h1 a:first\");\r\n\t\t if (url1.length == 0) {\r\n\t\t\t url1 = reportlink.parent().find(\"li:nth-child(2) a:first\");\r\n\t\t }\r\n\r\n\t\t if (!msgtext) {\r\n\t\t\t msgtext = comment + \" : \" + url1.get(0).href;\r\n\t\t }\r\n\r\n\t\t var message = {\r\n\t\t\t\tcsrf: /CSRF_TOKEN=\"(.+)\"/.exec(document.cookie)[1],\r\n\t\t\t\ttopic: jq.GMReport.topicnum,\r\n\t\t\t\ttitle: \"\",\r\n\t\t\t\tmsg: msgtext\r\n\t\t }\r\n\t\t jq.post(location.protocol + \"//www.linux.org.ru/add_comment.jsp\", message, function(data) {\r\n\t\t var allmsgs = jq(data).find(\"article.msg\");\r\n\t\t var reportnum = /\\d+/.exec(allmsgs.eq(allmsgs.length - 1).attr(\"id\"))[0];\r\n\t\t reportlink.unbind().attr(\"href\", location.protocol + \"//www.linux.org.ru/jump-message.jsp?msgid=\" + jq.GMReport.topicnum + \"&cid=\" + reportnum).html(\"Просмотреть\");\r\n\t\t })\r\n\t });\r\n\t}", "function lcom_RegOKCompleta(){\n\topenFBbox(context_ssi+\"boxes/community/login/verifica_ok_nomail.shtml\");\n}", "function openForm() { \n var props = PropertiesService.getDocumentProperties();\n var open = props.getProperty(\"openTime\");\n props.setProperty(\"lastTime\", open);\n props.deleteProperty(\"openTime\");\n\n sendNotification_(\"Your form is now accepting responses!\");\n\n var close = props.getProperty(\"closeTime\");\n if (close) {\n setCloseTrigger_(new Date(close) - new Date(open));\n } else {\n props.deleteProperty(\"user\");\n }\n \n FormApp.getActiveForm().setAcceptingResponses(true);\n}", "function accediLinkPop(){\n\tif (checkCustomLoginComUrl(LOGIN_COM_URL_TYPE.REG_URL))\n\t\treturn false;\n\talreadyRcsUser = false;\n\twaitingToLoad = false;\n\tBotAccetto = false;\n\tBotConcludi = false;\n\n\tcallOmnitureTracing('event2','COR/Accesso Network Corriere.it','Corriere');\n\tsocial_selected = null;\n\topenFBbox(context_ssi+\"boxes/community/login/accedi.shtml?\"+corriereDevice);\n}", "function onFormSubmit(formEvent) {\n\tsaveResponse(formEvent.response);\n\tsendMail();\n}", "function submitRewardInvite(form)\n{\n\tnew Ajax.Request(form.action, {\n sourceElement: form,\n method: form.method,\n parameters: form.serialize(),\n\t\tonLoading: function(e) {\n\t\t\tform.insert(\"<div id=\\\"\" + form.id + \"_loading\\\" class=\\\"loading\\\"></div>\");\n\t\t},\n\t\tonComplete: function(e) {\n\t\t\tElement.remove(form.id + \"_loading\");\n\t\t}\n\t});\n\treturn false;\n}", "function sendMail(contactForm) {\n emailjs.send(\"template_ho1z60q\", \"Learn Gaeilge for Primary School\", {\n \"from_name\": contactForm.name.value,\n \"from_email\": contactForm.emailaddress.value,\n \"message\": contactForm.message.value\n })\n .then(\n function (response) {\n alert(\"Thanks for contacting Learn Gaeilge\");\n window.location.replace(\"/\");\n },\n function (error) {\n alert(\"Whoops! There seems to be a problem. Please try again.\");\n });\n return false;\n \n\n}", "function goToRoomURL(){\n \tvar number = $.trim($(\"#roomNameInput\").val());\n\t\t$( \"#link\" ).html(\"Calling Room Created\");\n\t\t//window.location = \"https://appr.tc/r/\" + number;\n document.getElementById(\"videobox\").innerHTML = \"<iframe src=\\\"https://appr.tc/r/\" + number + \"\\\" id=\\\"appr\\\"></iframe>\";\n //$( \"#videobox\" ).innerHTML = \"<iframe src=\\\"https://appr.tc/r/\" + number + \"\\\" id=\\\"appr\\\"></iframe>\";\n }", "function fn_forwardmsg(subject)\n{\n\tif($(\"#forwardform\").validate().form())\n\t{\n\t\tif($('#hiddropdowntype').val()==1)\n\t\t{\n\t\t\tmsg=\"&msgto=\"+$('#msgto').val();\n\t\t}\n\t\telse if($('#hiddropdowntype').val()==2)\n\t\t{\n\t\t\tmsg=\"&msgto=\"+$('#msgto1').val();\n\t\t}\n\t\telse if($('#hiddropdowntype').val()==3)\n\t\t{\n\t\t\tmsg=\"&msgto=\"+$('#teacherto').val();\n\t\t}\n\t\t\n\t\tvar messagefwd = encodeURIComponent(tinymce.get('messagefwd').getContent());\n\t\tif(messagefwd == ''){\n $.Zebra_Dialog(\"Please enter the Content.\", { 'type': 'information', 'buttons': false, 'auto_close': 2000 });\n return false;\n }\t\t\n\t\tvar dataparam = \"oper=forwardmsg\"+msg+\"&fwdmessage=\"+messagefwd+\"&dropdowntype=\"+$('#hiddropdowntype').val()+\"&subject=\"+subject;\n\t\t$.ajax({\n\t\t\ttype: 'post',\n\t\t\turl: 'tools/message/tools-message-message-ajax.php',\n\t\t\tdata: dataparam,\t\t\n\t\t\tbeforeSend: function(){\n\t\t\t\tshowloadingalert(\"Message sending, please wait.\");\t\n\t\t\t},\n\t\t\tsuccess: function (data) {\n\t\t\t\tif(data==\"success\"){\t\t\n\t\t\t\t\tsetTimeout('closeloadingalert()',500);\n\t\t\t\t\tshowloadingalert(\"Message sent successfully\");\n\t\t\t\t\tsetTimeout('closeloadingalert()',1000);\n\t\t\t\t\tsetTimeout('$(\"#tools-message-view\").nextAll().hide(\"fade\").remove();',500);\n\t\t\t\t}\n\t\t\t\telse if(data==\"fail\"){\n\t\t\t\t\t$('.lb-content').html(\"Incorrect Data\");\n\t\t\t\t\tsetTimeout('closeloadingalert()',1000);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t\n}", "function loadReferer()\n{\n let sending = browser.runtime.sendMessage({\n action: 'getReferer'\n });\n \n sending.then(\n \n response => {\n refererInput.value = response.referer\n },\n\n error => {\n console.error( error );\n }\n\n );\n}", "navigateAdd() {\n this.channel.trigger('show:form');\n }", "function BusquedaAvanzada(){\r\tvar url =document.forms[0].urlBusquedas.value + \"fBusqueda?OpenForm\";\r\twindow.open(url);\r\t//document.forms[0].Protocolo.value+\"://\"+document.forms[0].sHostDbBusquedas.value+\":\"+document.forms[0].Puerto.value+\"/\"+document.forms[0].sPathDbBusquedas.value+\"/BusquedaGeneral?OpenForm\"\r}", "function formSubmitted(e) {\n\n var action = e.target.getAttribute('action');\n\n if (action[0] === '#') {\n e.preventDefault();\n trigger('POST', action, e, serialize(e.target));\n }\n }", "function sendLink(receiver, shareID, callback) {\n\n const transporter = nodemailer.createTransport({ service: 'gmail', auth: { user: '[email protected]', pass: 'CloudNein' }, });\n var mailOptions = {\n from: '[email protected]',\n to: receiver,\n subject: 'CloudNein Files',\n text: \"Link to files: \" + \"https://localhost:3000/sharefile?shareID=\" + shareID\n };\n\n transporter.sendMail(mailOptions, function (error, info) {\n if (error) {\n console.error(error.stack);\n throw error;\n } else {\n console.log('Email sent: ' + info.response);\n callback(error, info);\n }\n });\n}", "function notifyOnSubmission() {\r\n \r\n var form = FormApp.openById(\"Redacted\");\r\n \r\n // get response that was just submitted.\r\n var mostRecentResponse = form.getResponses().pop();\r\n \r\n // access the boxes the user filled out - They're indexed in the order they appear\r\n var itemResponses = mostRecentResponse.getItemResponses(); // -> ItemResponse[]\r\n \r\n var responseObject = {\r\n name : itemResponses[0].getResponse(),\r\n email : itemResponses[1].getResponse(),\r\n platform : itemResponses[2].getResponse(),\r\n issue : itemResponses[3].getResponse(),\r\n };\r\n \r\n Logger.log(responseObject); \r\n \r\n var memberAssigned = getMemberToSendTo(responseObject);\r\n var emailBody = \r\n `\r\n New Support Ticket From ${responseObject.name} \\n\r\n Platform: ${responseObject.platform}\\n\r\n Issue: ${responseObject.issue}\r\n `;\r\n GmailApp.sendEmail(memberAssigned.email, `New Support Ticket From ${responseObject.name}`, emailBody);\r\n Logger.log(\"Sent to \" + memberAssigned.email);\r\n var admin_email = \"\";\r\n GmailApp.sendEmail(admin_email, `New Support Ticket From ${responseObject.name}`, emailBody);\r\n Logger.log(\"Sent to Admin\");\r\n }", "function showLink(link) {\n textMessage = $('.canvas-wrapper .canvas .canvas__message').html();\n textMessage2 = $('.canvas-wrapper .canvas .canvas__message2').html();\n textMessage3 = $('.canvas-wrapper .canvas .canvas__message3').html();\n // backMessage = $('.canvas-wrapper .canvas .back .paper div').html();\n textFont = $('.canvas-wrapper .canvas .canvas__message').css(\"font-family\");\n\n if (link != '') {\n backgroundImage = link;\n }\n\n var url = [location.protocol, '//', location.host, location.pathname].join('');\n url = url + '?ccshare=a&ccs='+ encodeURIComponent(encode64(textMessage))+'&ccs2='+ encodeURIComponent(encode64(textMessage2)) +'&ccs3='+ encodeURIComponent(encode64(textMessage3)) +'&ccl='+ encodeURIComponent(encode64(template)) +'&cca='+ encodeURIComponent(encode64(((aspectRatio == 'horizontal') ? 0 : 1 ))) +'&ccd='+ encodeURIComponent(encode64(decorationImage)) +'&cci='+ encodeURIComponent(encode64(backgroundImage)) +'&ccb='+ encodeURIComponent(encode64(backgroundColor.slice( 1 ))) +'&cct='+ encodeURIComponent(encode64(textColor.slice( 1 ))) +'&ccf='+ encodeURIComponent(encode64(textFont));\n var subject = textMessage+' you are '+textMessage3+ '\\'s angel';\n var body2 = 'Dear '+textMessage+ '\\t\\n\\t\\n'+ 'You are my angel. I\\'ve made an ornament to support VGH & UBC Hospital Foundation\\'s';\n $('.celebration-cards-share-modal__content__cancel').css('display', 'none');\n $('.celebration-cards-share-modal__content__input input').val( url );\n $('.twitter-share-button').remove();\n $('.fb-share-button').remove();\n $('.email-share-button').remove();\n// $('.celebration-cards-share-modal__content__input').append('<a class=\"twitter-share-button\" title=\"\" data-text=\"\" href=\"https://twitter.com/intent/tweet?url='+encodeURIComponent(url)+'\"></a')\n // $('.celebration-cards-share-modal__content__input').append('<div class=\"fb-share-button\" data-layout=\"button\" data-href=\"'+url+'\"></div>')\n // $('.celebration-cards-share-modal__content__input').append(' <a class=\"email-share-button\" href=\"mailto:?subject='+subject+'&amp;body='+body2+'\" title=\"\">Email</a>')\n\n $('.celebration-cards-share-modal__content__input').css('display', 'block');\n $('.celebration-cards-share-modal__content__input').animate( {\n opacity: 1\n }, 500, function() {\n twttr.widgets.load();\n FB.XFBML.parse();\n\n });\n }", "function open_waiver_form(site_url, video_id){\n\t$.ajax({\n\t\tcache: false,\n\t\turl: site_url+\"video/video_waiver\",\n\t\ttype: \"POST\",\n\t\tdata: \"video_id=\"+video_id,\n\t\tsuccess: function(data){\n\t\t\t//alert(data);\n\t\t\topen_messagebox(\"Health Waiver Form\", data);\n\t\t}\n\t\t\n\t});\n}", "function iniciarSesion(){\n document.getElementById(\"formularioA\").action=\"/experimentoConHash/\";\n}", "function enrich(options) {\n var defaultOptions = {\n description: \"\",\n popup: false\n };\n\n if (typeof options.description == 'undefined')\n options.description = defaultOptions.description;\n if (typeof options.popup == 'undefined')\n options.popup = defaultOptions.popup;\n if (typeof options.list == 'undefined')\n alert('No genes defined.');\n\n var form = document.createElement('form');\n form.setAttribute('method', 'post');\n form.setAttribute('action', 'http://amp.pharm.mssm.edu/Enrichr/enrich');\n if (options.popup)\n form.setAttribute('target', '_blank');\n form.setAttribute('enctype', 'multipart/form-data');\n\n var listField = document.createElement('input');\n listField.setAttribute('type', 'hidden');\n listField.setAttribute('name', 'list');\n listField.setAttribute('value', options.list);\n form.appendChild(listField);\n\n var descField = document.createElement('input');\n descField.setAttribute('type', 'hidden');\n descField.setAttribute('name', 'description');\n descField.setAttribute('value', options.description);\n form.appendChild(descField);\n\n document.body.appendChild(form);\n form.submit();\n document.body.removeChild(form);\n}", "function send_form_pop( name )\r\n{\r\n\treturn send_form( name , function( data ){ show_pop_box( data ); } );\r\n}", "activate(form_data, success_callback, failure_callback) {\n let url = \"/global/str/subscription/activate\";\n return WebClient.basicPost(form_data, url, success_callback, failure_callback);\n }", "function sendRegistrationForm(newToken, response) {\r\n console.log(\">>> send registration !!! \");\r\n var redirectLocation = \"/registration.html?token=\" + newToken;\r\n response.writeHead(301, \"Moved Permanently\", {\"Location\": redirectLocation});\r\n response.end(\"\"); \r\n}" ]
[ "0.64329827", "0.61569136", "0.61007124", "0.60126394", "0.60083985", "0.5876832", "0.5870301", "0.58429945", "0.5808113", "0.5797652", "0.5797511", "0.57779825", "0.5767741", "0.5749849", "0.5732234", "0.5730894", "0.5705166", "0.5668229", "0.56551516", "0.56508774", "0.5647461", "0.5638554", "0.56378734", "0.5624117", "0.56048477", "0.5602372", "0.55705005", "0.5551082", "0.55473775", "0.55473554", "0.55419886", "0.5532195", "0.5532115", "0.55187035", "0.5514695", "0.55065477", "0.55047345", "0.5501383", "0.5501383", "0.54922324", "0.548957", "0.5489359", "0.5488211", "0.5469327", "0.54682547", "0.5462395", "0.54560584", "0.5454399", "0.5446935", "0.5437007", "0.5435515", "0.54320925", "0.5420661", "0.5418566", "0.54159826", "0.54066753", "0.5384393", "0.53829694", "0.53741086", "0.53610116", "0.53605634", "0.53516394", "0.53512514", "0.53476787", "0.5336243", "0.53352654", "0.53305364", "0.5327661", "0.53249174", "0.5323935", "0.53202385", "0.5318934", "0.53150153", "0.5311863", "0.53079885", "0.53059655", "0.5300973", "0.5299363", "0.5295973", "0.52954537", "0.52934605", "0.528829", "0.5288172", "0.52768326", "0.52710885", "0.5266994", "0.52660275", "0.5265492", "0.52645886", "0.52633697", "0.525724", "0.52544534", "0.52513313", "0.525003", "0.52495635", "0.5248063", "0.52454257", "0.52382946", "0.52352035", "0.523264" ]
0.6645757
0
========================================================================= CREATE NEW FORM TEMPLATE =========================================================================
function createFormTemplate() { var timesheet = getTimesheet(); var folder = getFolder(); var ff = FormApp.create('Time Tracking'); ff.setCollectEmail(true); ff.setAllowResponseEdits(true); ff.setLimitOneResponsePerUser(true); createFormFields(ff); //DELETE FORM var ffId = ff.getId(); var ffFile = DriveApp.getFileById(ffId); ffFile.setTrashed(true); //MOVE FORM var formId = ffFile.makeCopy(folder).setName('1 NEW Form Template - DO NOT DELETE').getId(); var form = FormApp.openById(formId); Logger.log(formId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createFormTemplate( itcb ) {\n // if no form to look up then we can skip this step\n\n formOptions.callback = onFormTemplateCreated;\n Y.dcforms.createTemplate( formOptions );\n\n function onFormTemplateCreated( err, newFormTemplate ) {\n if ( !err && !newFormTemplate ) { err = 'Could not create form template'; }\n if ( err ) { return itcb( err ); }\n\n template = newFormTemplate;\n template.highlightEditable = false;\n template.fromDict( editTemplate.toDict() );\n template.mode = 'locked';\n itcb( null );\n }\n }", "function formTemplate() {\n\n\t\ttemplate = {\n\n\t\t\tdiv0: {\n\n\t\t\t\tclass: 'formTitle',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\ttext: 'Name',\n\n\t\t\t\t\tclosing: true\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tdiv2: {\n\n\t\t\t\tclass: 'formTitle',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\ttext: 'Email',\n\n\t\t\t\t\tclosing: true\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tdiv4: {\n\n\t\t\t\tclass: 'formTitle',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\ttext: 'Message',\n\n\t\t\t\t\tclosing: true\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tinput1: {\n\n\t\t\t\tclass: 'formInput',\n\n\t\t\t\ttype: 'text',\n\n\t\t\t\tplaceholder: 'John Smith...',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\tclosing: false\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tinput3: {\n\n\t\t\t\tclass: 'formInput',\n\n\t\t\t\ttype: 'text',\n\n\t\t\t\tplaceholder: '[email protected]...',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\tclosing: false\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tinput6: {\n\n\t\t\t\tclass: 'formSubmit',\n\n\t\t\t\ttype: 'button',\n\n\t\t\t\tvalue: 'Submit',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\tclosing: false\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\ttextarea5: {\n\n\t\t\t\tclass: 'formTextArea',\n\n\t\t\t\tspecial: {\n\n\t\t\t\t\tclosing: true\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\ttemplate.tag();\n\n\t}", "function ques_form_template() {\r\n return `\r\n <div class=\"new_form\">\r\n <h1>Welcome to Discussion Portal</h1>\r\n <p>Enter a subject and question to get started</p>\r\n <form>\r\n <input type=\"text\" name=\"subject\" placeholder=\"Subject\" required />\r\n <textarea name=\"question\" placeholder=\"Question\" required ></textarea>\r\n <input type=\"submit\" value=\"Submit\" />\r\n </form>\r\n </div>\r\n `;\r\n}", "function createContentTypeForm(req,res,template,block,next) {\n\n contentTypeForm.title = \"Create Content Type\";\n contentTypeForm.action = \"/content/type/create\";\n\n calipso.form.render(contentTypeForm,null,req,function(form) {\n calipso.theme.renderItem(req,res,template,block,{form:form},next);\n });\n\n}", "function initForm() {\n var formTemplate = document.getElementById(\"recipe-form-template\").innerHTML\n var template = Handlebars.compile(formTemplate)\n document.getElementsByTagName(\"main\")[0].innerHTML = template({'submitAction': 'createRecipe()'})\n}", "function createForm(e){\n var newTaskForm = document.createElement(\"form\");\n newTaskForm.setAttribute(\"id\", \"newTaskForm\");\n newTaskForm.setAttribute(\"class\", \"popup\");\n\n //add a header to the new form\n newTaskForm.innerHTML += \"<h2 id='newTaskFormHeader'>Create New Task</h2>\";\n\n //add form elements\n addTaskBox(newTaskForm);\n addPriorityBox(newTaskForm);\n addDueDate(newTaskForm);\n addDescriptionBox(newTaskForm);\n addButtons(newTaskForm);\n\n //make form draggable\n drag(newTaskForm);\n\n count = 1;\n\n return newTaskForm;\n}", "function createForm() {\n var formElement = $(\"[name='contactForm']\").empty();\n // Add form elements and their event listeners\n formFields.forEach(function (formField) {\n var labelElement = $(\"<label>\")\n .attr(\"for\", formField.name)\n .text(formField.des);\n formElement.append(labelElement);\n var inputElement = $(\"<input>\")\n .attr(\"type\", formField.type)\n .attr(\"name\", formField.name)\n .attr(\"value\", (anime[formField.name] || \"\"));\n if (formField.required) {\n inputElement.prop(\"required\", true).attr(\"aria-required\", \"true\");\n }\n if (formField.type == \"date\"){\n inputElement.get(0).valueAsDate = new Date(anime[formField.name]);\n }\n formElement.append(inputElement);\n inputElement.on('input', function () {\n var thisField = $(this);\n inputHandler(formField.name, thisField.val());\n });\n // clear the horizontal and vertical space next to the \n // previous element\n formElement.append('<div style=\"clear:both\"></div>');\n });\n if (editForm) {\n addUpdateAndDeleteButtons(formElement);\n } else {\n addNewButton(formElement);\n }\n\n }", "function createTemplate( itcb ) {\n function onFormTemplateLoaded( err ) {\n var\n clientBFB = Y.dcforms.clientHasBFB(),\n i, j, elem;\n\n // race between form loading and navigating away\n if ( !self.template || 'function' !== typeof self.isFormLoading ) { return; }\n\n self.isFormLoading( false );\n if ( err ) {\n Y.log( 'Problem creating form template: ' + JSON.stringify( err ), 'warn', NAME );\n return itcb( err );\n }\n\n // BFB settings may require a different form to be loaded at this point\n if( doBFBRedirect && self.template.isBFB && !clientBFB ) {\n\n if( self.template.bfbAlternative && '' !== self.template.bfbAlternative ) {\n Y.log( 'No BFB certification, loading alternative form', 'info', NAME );\n formOptions.canonicalId = self.template.bfbAlternative;\n formOptions.formVersionId = '';\n\n if ( 'UTILITY' === currentActivity.actType() ) {\n Y.log( 'No clearing content in mask.', 'debug', NAME );\n } else {\n // clear user content to set new form name\n currentActivity.userContent( '' );\n self.isFormLoading( true );\n self.template.load( self.template.bfbAlternative, '', onFormTemplateLoaded );\n return;\n }\n\n }\n\n }\n\n // some forms have elements which should be hidden if no KBV/BFB certification is available\n // this situation should persist for the lifetime of activities, and in other contexts such\n // as the patient portal\n\n //if (doBFBHide || (doBFBRedirect && !clientBFB)) {\n if( doBFBHide && !clientBFB ) {\n Y.log( 'Hiding non-BFB elements in form', 'info', NAME );\n\n for( i = 0; i < self.template.pages.length; i++ ) {\n for( j = 0; j < self.template.pages[i].elements.length; j++ ) {\n\n elem = self.template.pages[i].elements[j];\n elem.isHiddenBFB = (elem.isBFB && !clientBFB);\n\n //if (elem.isHiddenBFB) {\n // //console.log('hiding BFB element ' + elem.elemId);\n //}\n }\n }\n }\n\n // this may be different than what was requested due to BFB redirects, missing versions, etc\n if ( currentActivity._isEditable() ) {\n currentActivity.formId( self.template.canonicalId );\n if (\n self.template.formVersionId &&\n '' !== self.template.formVersionId &&\n self.template.formVersionId !== unwrap( currentActivity.formVersion )\n ) {\n Y.log( 'Setting missing form version Id: ' + self.template.formVersionId, 'debug', NAME );\n currentActivity.formVersion( self.template.formVersionId );\n }\n }\n\n // EXTMOJ-858 set subtype from template when activity is created\n if (\n ( 'CREATED' === currentActivity.status() && currentActivity.subType ) &&\n ( self.template.shortName && '' !== self.template.shortName ) &&\n ( !currentActivity.subType() || '' === currentActivity.subType )\n ) {\n currentActivity.subType( self.template.shortName );\n }\n\n // check for validation state of form after changes MOJ-11933\n self.template.on( 'valueChanged', NAME, function( el ) { self.onFormValueChanged( el ); } );\n self.activityActionButtonsViewModel.isFormValid( self.template.isValid() );\n\n // enable or disable extra serialization for backmapping to activity content\n self.template.backmappingFields = Y.doccirrus.schemas.activity.actTypeHasBackmapping( ko.unwrap( currentActivity.actType ) );\n itcb( null );\n }\n\n function onFormTemplateCreated( err, newFormTemplate ) {\n if ( err ) {\n Y.log( 'Could not create empty form template: ' + JSON.stringify( err ), 'error', NAME );\n return itcb( err );\n }\n self.template = newFormTemplate;\n self.template.load( ko.unwrap( currentActivity.formId || '' ), ko.unwrap( currentActivity.formVersion || '' ), onFormTemplateLoaded );\n }\n\n formOptions.callback = onFormTemplateCreated;\n Y.dcforms.createTemplate( formOptions );\n }", "createForm () {\n if (document.getElementById('leaderboardButton')) {\n document.getElementById('leaderboardButton').remove();\n }\n crDom.createLeaderboardButton();\n crDom.createForm();\n crDom.createCategoriesChoice(this.filter.category);\n crDom.createDifficultyChoice(this.filter.difficulty);\n crDom.createRangeSlider(this.filter.limit);\n crDom.createStartButton();\n }", "function createForm() {\n let form = document.createElement(`form`);\n form.id = `form`;\n document.getElementById(`create-monster`).appendChild(form);\n\n document.getElementById(`form`).appendChild(createInputAndPlaceholder(`input`,`Name`));\n document.getElementById(`form`).appendChild(createInputAndPlaceholder(`input`,`Age`));\n document.getElementById(`form`).appendChild(createInputAndPlaceholder(`input`,`Description`));\n\n let button = document.createElement('button');\n button.innerHTML = `Create`;\n document.getElementById(`form`).appendChild(button);\n\n\n}", "insertForm() {\n this.builder = new Builder(this.container, this.options.template, {\n style: this.options.style,\n formContainerClass: this.options.formContainerClass,\n inputGroupClass: this.options.inputGroupClass,\n inputClass: this.options.inputClass,\n labelClass: this.options.labelClass,\n btnClass: this.options.btnClass,\n errorClass: this.options.errorClass,\n successClass: this.options.successClass,\n });\n this.build();\n }", "function getAddCategoryFormTemplate() {\n let categoryElement = document.createElement('div');\n categoryElement.classList.add('category-element');\n categoryElement.classList.add('hidden');\n categoryElement.id = 'add-category-form-wrapper';\n\n let categoryForm = document.createElement('form');\n categoryForm.id = 'save-category-form';\n categoryForm.innerHTML = `\n <input id=\"category-title-input\" name=\"title\" value=\"\" placeholder=\"Category Name\" required />\n <div id=\"add-category-input-error\" class=\"error-msg\"></div>\n <div class=\"category-save-wrapper\">\n <div>\n <input type=\"submit\" value=\"&#xf0c7;\" name=\"submit\" class=\"icons fas fa-save save-category category-save-action-button\" />\n </div>\n <div>\n <i class=\"icons fas fa-trash discard-category category-save-action-button\"></i>\n </div>\n </div>\n `;\n\n saveAddCategoryButtonClicked(categoryForm);\n discardAddCategoryButtonClicked(categoryForm);\n\n categoryElement.appendChild(categoryForm);\n return categoryElement;\n}", "@api\n form(isCreate, fields) {\n let augmentedFields = fields.map((field) => {\n return {\n ...field,\n options:\n field.dataType === \"Picklist\"\n ? this.wiredPicklistOptions.data[field.apiName]\n : []\n };\n });\n return `\n <form action=\"{{FORM_ACTION}}\" method=\"get\" style=${elementStyles.form}>\n ${augmentedFields.map(elementString).join(\"\")}\n ${\n isCreate\n ? `<input type=\"hidden\" value='{{RECORD_ID}}' name=\"recordId\"/>`\n : \"\"\n }\n <input type=\"hidden\" value='${this.objectApiName}' name=\"objectApiName\"/>\n <input type=\"hidden\" value='{{FORM_ID}}' name=\"formId\"/>\n <button type=\"submit\" style=\"${elementStyles.button}\">Submit</button>\n </form>\n `;\n }", "function form_generate(target,json_txt){\n\t\tvar div_main = document.createElement(\"div\");\n\t\tdiv_main.classList.add('container');\n\n\t\tvar div_main_title = document.createElement(\"h2\");\n\t\tdiv_main_title.textContent = \"Create Form Template\";\n\t\tdiv_main.appendChild(div_main_title);\n\t\t\n\t\tvar div_main_intro = document.createElement(\"p\");\n\t\tdiv_main_intro.textContent = \"Click on the \\\"Add Field\\\" button to add a form element\";\n\t\tdiv_main.appendChild(div_main_intro);\n\n\t\tvar div_main_add_button_top = document.createElement(\"button\");\n\t\tdiv_main_add_button_top.type = 'button';\n\t\tdiv_main_add_button_top.classList.add('btn');\n\t\tdiv_main_add_button_top.classList.add('btn-outline-success');\n\t\tdiv_main_add_button_top.classList.add('far');\n\t\tdiv_main_add_button_top.classList.add('fa-plus-square');\n\t\tdiv_main_add_button_top.textContent = \" Add Field\";\n\t\tdiv_main.appendChild(div_main_add_button_top);\n\n\t\tvar form_fields = document.createElement(\"form\");\n\t\tform_fields.classList.add('needs');\n\t\t// form_fields.textContent = \" Add Field\";\n\t\tdiv_main.appendChild(form_fields);\n\n\t\tvar div_main_add_button_bottom = document.createElement(\"button\");\n\t\tdiv_main_add_button_bottom.type = 'button';\n\t\tdiv_main_add_button_bottom.classList.add('btn');\n\t\tdiv_main_add_button_bottom.classList.add('btn-outline-success');\n\t\tdiv_main_add_button_bottom.classList.add('far');\n\t\tdiv_main_add_button_bottom.classList.add('fa-plus-square');\n\t\tdiv_main_add_button_bottom.textContent = \" Add Field\";\n\t\tdiv_main.appendChild(div_main_add_button_bottom);\n\n\t\tvar rownum = 0;\n\n\t\t[\"keyup\", \"mouseup\"].forEach(function(event) {\n\t\t\t[div_main_add_button_top, div_main_add_button_bottom].forEach(function(button) {\n\t\t\t\tbutton.addEventListener(event,function(e){\n\t\t\t\t\tswitch(event){\n\t\t\t\t\t\tcase 'keyup':\n\t\t\t\t\t\t\tswitch(e.key){\n\t\t\t\t\t\t\t\tcase 'Enter':\n\t\t\t\t\t\t\t\t\tform_fields.appendChild(form_generate_add_field(rownum));\n\t\t\t\t\t\t\t\t\trownum++;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'mouseup':\n\t\t\t\t\t\t\tform_fields.appendChild(form_generate_add_field(rownum));\n\t\t\t\t\t\t\trownum++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\tvar json = null;\n\t\ttry {\n\t\t\tif(json_txt){\n\t\t\t\tjson = JSON.parse(json_txt);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.log(\"Malformed JSON\");\n\t\t\tconsole.log(e);\n\t\t\tconsole.log(json_txt);\n\t\t\treturn false;\n\t\t}\n\n\t\tif(target){\n\t\t\ttarget.innerHTML = '';\n\t\t\ttarget.appendChild(div_main);\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "createForm(){\n this.form_ = this.create_();\n }", "function construirTemplate(nombre, numero, registro_id){\n\n\n //MANIPULANDO EL DOM para crear un formulario sin necesidad de etiquetas html\n //crear Nombre de contacto\n var tdNombre = document.createElement('TD');\n var textoNombre = document.createTextNode(nombre);\n var parrafoNombre = document.createElement('P');\n parrafoNombre.appendChild(textoNombre);\n tdNombre.appendChild(parrafoNombre);\n\n //crear Teléfono de contacto\n var tdNumero = document.createElement('TD');\n var textoNumero = document.createTextNode(numero);\n var parrafoNumero = document.createElement('P');\n parrafoNumero.appendChild(textoNumero);\n tdNumero.appendChild(parrafoNumero);\n\n //Crear campo editar\n var nodoBtn = document.createElement('A');\n var textoEnlace = document.createTextNode('Editar');\n nodoBtn.appendChild(textoEnlace);\n nodoBtn.href = '#';\n nodoBtn.classList.add('editarBtn');\n\n //Crear Campo guardar\n var guardarBTN = document.createElement('A');\n var EnlaceGuardar = document.createTextNode('Guardar');\n guardarBTN.appendChild(EnlaceGuardar);\n guardarBTN.href = \"#\";\n guardarBTN.classList.add('guardarBtn');\n\n //agregar el boton al td\n var nodotdEditar = document.createElement('TD');\n nodotdEditar.appendChild(nodoBtn);\n nodotdEditar.appendChild(guardarBTN);\n\n //Creando Checkbox Borrar\n var checkBorrar = document.createElement('INPUT');\n checkBorrar.type = 'checkbox';\n checkBorrar.name = registro_id;\n checkBorrar.classList.add('borrar_contacto');\n\n //creando td para que contiene checkbox\n var tdCheckbox = document.createElement('TD');\n tdCheckbox.classList.add('borrar');\n tdCheckbox.appendChild(checkBorrar);\n\n //Creando input Nombre que toma el ultimo valor\n var inputNombre = document.createElement('INPUT');\n inputNombre.type = 'text';\n inputNombre.name = 'contacto_' + registro_id;\n inputNombre.value = nombre;\n inputNombre.classList.add('nombre_contacto');\n tdNombre.appendChild(inputNombre);//agregando al td nombre\n\n\n //Creando input Nùmero que toma el ultimo valor\n var inputNumero = document.createElement('INPUT');\n inputNumero.type = \"text\";\n inputNumero.name = \"contacto_\" + registro_id;\n inputNumero.value = numero;\n inputNumero.classList.add('numero_contacto');\n tdNumero.appendChild(inputNumero);\n\n\n //Creando el tr del contacto donde sotiene todos los demas\n var trContacto = document.createElement('TR');\n trContacto.appendChild(tdNombre);\n trContacto.appendChild(tdNumero);\n trContacto.appendChild(nodotdEditar);\n trContacto.appendChild(tdCheckbox);\n\n\n\n //le pasamos todos los campos a la tabla\n tablaRegistrados.childNodes[3].append(trContacto);\n\n //llamamos al los metodos cuando se agrega un nuevo usuario incrementa,\n //cuando se va editar un contacto lo edite y guardar lo guarde teniendo una ventaja que no se necesita\n //recagar la página\n\n actualizarNumero();\n botonEditarContacto();\n botonGuardarContacto(registro_id);\n }", "function addNewTemplate() {\n\n\tvar templateHtml = $(\"#template\").html();\n\tvar template = new Template();\n\ttemplate.makeHtml(\"templateContent\", templateHtml, function(templateName) {\n\t\tconsole.log('template call back!!..');\n\n\t\t// jquery日付の呼び出す初期化\n\t\t$(\".datepicker\").datepicker();\n\n\t\t// 連動呼び出す\n\t\titemAreaHide(templateName + 'item');\n\t});\n}", "function renderCreate(context) {\n context.loggedIn = sessionStorage.getItem('authtoken') !== null;\n context.username = sessionStorage.getItem('username');\n\n this.loadPartials({\n header: './templates/common/header.hbs',\n footer: './templates/common/footer.hbs',\n createForm: './templates/create/createForm.hbs'\n }).then(function () {\n this.partial('./templates/create/createPage.hbs');\n })\n }", "function generateForm() {\n let form = document.getElementById('dynamic-form');\n\n window.fields.forEach(field => {\n switch (field.type) {\n case 'radio':\n form.appendChild(radioInput(field));\n break;\n default:\n form.appendChild(textInput(field));\n }\n });\n}", "function createBook()\n\t{\t\n\t\tlet elem = text = document.createElement(\"form\");\n\t\telem.id = \"superform\";\n\t\tdocument.body.appendChild(elem); //Adds the form element to the body.\n\t}", "function formAlter(event,form,next) {\n \n // Content - fires\n var newSection = {\n id:'form-section-template',\n label:'Template Alter',\n fields:[\n {label:'Status',name:'content[template]',type:'textarea',description:'A field added dynamically to the content from by the template module'}, \n ]\n }\n \n form.sections.push(newSection);\n \n return next(form);\n \n}", "function citeTemplate(templatename, shortform, basicfields, expandedfields) {\n // Properties\n this.templatename = templatename; // The template name - \"cite web\", \"cite book\", etc.\n this.shortform = shortform; // A short form, used for the dropdown box\n this.basic = basicfields; // Basic fields - author, title, publisher...\n // Less common - quote, archiveurl - should be everything the template supports minus the basic ones\n this.extra = expandedfields;\n \n // Add it to the list\n CiteTB.Templates[this.templatename] = this;\n // Methods\n this.makeFormInner = function(fields) {\n var i=0;\n var trs = new Array();\n for (i=0; i<fields.length; i++) {\n var fieldobj = fields[i];\n var field = fieldobj.field;\n var ad = false;\n if ($j.inArray(field, CiteTB.getOption('autodate fields')) != -1 ) {\n im = $j('<img />').attr('src', 'http://upload.wikimedia.org/wikipedia/commons/thumb/7/7b/Nuvola_apps_date.svg/20px-Nuvola_apps_date.svg.png');\n im.attr('alt', mw.usability.getMsg('cite-insert-date')).attr('title', mw.usability.getMsg('cite-insert-date'));\n var ad = $j('<a />').attr('href', '#');\n ad.append(im);\n ad.attr('id', 'cite-date-'+CiteTB.escStr(this.shortform)+'-'+field);\n $j('#cite-date-'+CiteTB.escStr(this.shortform)+'-'+field).live('click', CiteTB.fillAccessdate);\n }\n \n if (fieldobj.autofillid) {\n var autotype = fieldobj.autofillid;\n im = $j('<img />').attr('src', 'http://upload.wikimedia.org/wikipedia/commons/thumb/1/17/System-search.svg/20px-System-search.svg.png');\n im.attr('alt', mw.usability.getMsg('cite-autofill-alt')).attr('title', mw.usability.getMsg('cite-autofill-alt'));\n var ad = $j('<a />').attr('href', '#');\n ad.append(im);\n ad.attr('id', 'cite-auto-'+CiteTB.escStr(this.shortform)+'-'+field+'-'+autotype);\n $j('#cite-auto-'+CiteTB.escStr(this.shortform)+'-'+field+'-'+autotype).live('click', CiteTB.initAutofill);\t \n }\n \n var display = fieldobj.label ? fieldobj.label : CiteTB.fixStr(field);\n var tooltip = fieldobj.tooltip ? $j('<abbr />').attr('title', fieldobj.tooltip).text('*') : false;\n \n var input = '';\n if (ad) {\n input = $j('<input tabindex=\"1\" style=\"width:85%\" type=\"text\" />');\n } else {\n input = $j('<input tabindex=\"1\" style=\"width:100%\" type=\"text\" />');\n }\n input.attr('id', 'cite-'+CiteTB.escStr(this.shortform)+'-'+field);\n\t if (fieldobj.autofillprop) {\n\t input.addClass('cite-'+CiteTB.escStr(this.shortform)+'-'+fieldobj.autofillprop);\n\t }\n var label = $j('<label />');\n label.attr('for', 'cite-'+CiteTB.escStr(this.shortform)+'-'+field).text(display);\n if (tooltip) {\n label.append(tooltip);\n }\n var style = 'text-align:right; width:20%;';\n if (i%2 == 1) {\n style += ' padding-left:1em;';\n } else {\n var tr = $j('<tr />');\n }\n var td1 = $j('<td class=\"cite-form-td\" />').attr('style', style);\n td1.append(label);\n tr.append(td1);\n var td2 = $j('<td class=\"cite-form-td\" style=\"width:30%\" />');\n td2.append(input);\n if (ad) {\n td2.append(ad);\n }\n tr.append(td2);\n if (i%2 == 0) {\n trs.push(tr);\n }\n }\n return trs;\n \n }\n \n // gives a little bit of HTML so the open form can be identified\n this.getInitial = function() {\n var hidden = $j('<input type=\"hidden\" class=\"cite-template\" />');\n hidden.val(this.templatename);\n return hidden;\n }\n \n // makes the form used in the dialog boxes\n this.getForm = function() {\n var main = $j(\"<div class='cite-form-container' />\");\n var form1 = $j('<table style=\"width:100%; background-color:transparent;\" class=\"cite-basic-fields\" />');\n var i=0;\n var trs = this.makeFormInner(this.basic);\n for (var i=0; i<trs.length; i++) {\n form1.append(trs[i]);\n }\n \n var form2 = $j('<table style=\"width:100%; background-color:transparent; display:none\" class=\"cite-extra-fields\">');\n trs = this.makeFormInner(this.extra);\n for (var i=0; i<trs.length; i++) {\n form2.append(trs[i]);\n } \n main.append(form1).append(form2);\n \n var form3 = $j('<table style=\"width:100%; background-color:transparent;padding-top:1em\" class=\"cite-other-fields\">');\n var tr = $j('<tr />');\n var td1 = $j('<td class=\"cite-form-td\" style=\"text-align:right; width:20%\" />');\n var label1 = $j('<label />');\n label1.attr('for', \"cite-\"+CiteTB.escStr(this.shortform)+'-name').text(mw.usability.getMsg('cite-name-label'));\n td1.append(label1);\n var td2 = $j('<td class=\"cite-form-td\" style=\"width:30%\" />');\n var input1 = $j('<input tabindex=\"1\" style=\"width:100%\" type=\"text\" />');\n input1.attr('id', 'cite-'+CiteTB.escStr(this.shortform)+'-name');\n td2.append(input1);\n var td3 = $j('<td class=\"cite-form-td\" style=\"text-align:right; padding-left:1em; width:20%\">');\n var label2 = $j('<label />');\n label2.attr('for', 'cite-'+CiteTB.escStr(this.shortform)+'-group').text(mw.usability.getMsg('cite-group-label'));\n td3.append(label2);\n var td4 = $j('<td class=\"cite-form-td\" style=\"width:30%\" />');\n var input2 = $j('<input tabindex=\"1\" style=\"width:100%\" type=\"text\" />');\n input2.attr('id', 'cite-'+CiteTB.escStr(this.shortform)+'-group');\n td4.append(input2);\n tr.append(td1).append(td2).append(td3).append(td4);\n form3.append(tr);\n main.append(form3);\n var extras = $j('<div />');\n extras.append('<input type=\"hidden\" class=\"cite-form-status\" value=\"closed\" />');\n var hidden = $j('<input type=\"hidden\" class=\"cite-template\" />');\n hidden.val(this.templatename);\n extras.append(hidden);\n var span1 = $j('<span class=\"cite-preview-label\" style=\"display:none;\" />');\n span1.text(mw.usability.getMsg('cite-raw-preview'));\n extras.append(span1).append('<div class=\"cite-ref-preview\" style=\"padding:0.5em; font-size:110%\" />');\n var span2 = $j('<span class=\"cite-prev-parsed-label\" style=\"display:none;\" />');\n span2.text(mw.usability.getMsg('cite-parsed-label'));\n extras.append(span2).append('<div class=\"cite-preview-parsed\" style=\"padding-bottom:0.5em; font-size:110%\" />');\n var link = $j('<a href=\"#\" class=\"cite-prev-parse\" style=\"margin:0 1em 0 1em; display:none; color:darkblue\" />');\n link.text(mw.usability.getMsg('cite-form-parse'));\n extras.append(link); \n main.append(extras);\n \n return main;\n }\n}", "function formAlter(event,form,next) {\n\n // Content - fires\n var newSection = {\n id:'form-section-template',\n label:'Template Alter',\n fields:[\n {label:'Status',name:'content[template]',type:'textarea',description:'A field added dynamically to the content from by the template module'},\n ]\n }\n\n form.sections.push(newSection);\n\n return next(form);\n\n}", "function generate_new_form(){\n\t$('.form_div:first').clone().insertAfter('.form_div:last')\n}", "function buildNewForm() {\n return `\n <form id='js-new-item-form'>\n <div>\n <legend>New Bookmark</legend>\n <div class='col-6'>\n <!-- Title -->\n <label for='js-form-title'>Title</label>\n <li class='new-item-li'><input type='text' id='js-form-title' name='title' placeholder='Add Title'></li>\n <!-- Description -->\n <label for='js-form-description'>Description</label>\n <li class='new-item-li'><textarea id='js-form-description' name='description' placeholder=\"Add Description\"></textarea>\n </div>\n <div class='col-6'>\n <!-- URL -->\n <label for='js-form-url'>URL</label>\n <li class='new-item-li'><input type='url' id='js-form-url' name='url' placeholder='starting with https://'></li>\n <!-- Rating -->\n <label for='js-form-rating' id='rating-label'>Rating: </label>\n <select id='js-form-rating' name='rating' aria-labelledby='rating-label'>\n <option value='5' selected>5</option>\n <option value='4'>4</option>\n <option value='3'>3</option>\n <option value='2'>2</option>\n <option value='1'>1</option>\n </select>\n </div>\n <!-- Add button -->\n <div class='add-btn-container col-12'>\n <button type='submit' id='js-add-bookmark' class='add-button'>Click to Add!</button>\n <button type='button' id='js-cancel-bookmark'>Cancel</button>\n </div>\n </div>\n </form>\n `;\n }", "function createTeamForm () {\n var item = team_form.addMultipleChoiceItem();\n \n // Create form UI\n team_form.setShowLinkToRespondAgain(false);\n team_form.setTitle(name + \" game\");\n team_form.setDescription(\"Game RSVP form\");\n // Set the form items\n item.setTitle(\"Will you attend the game?\");\n item.setChoices([\n item.createChoice(rsvp_opts[0]),\n item.createChoice(rsvp_opts[1]),\n item.createChoice(rsvp_opts[2]),\n item.createChoice(rsvp_opts[3])]);\n team_form.addSectionHeaderItem().setTitle(\n \"Do not change if you want your reply to count.\");\n team_form.addTextItem();\n team_form.addTextItem();\n\n // Attach the form to its destination [spreadsheet]\n team_form.setDestination(destination_type, destination);\n }", "function buildForm(e, t)\n{\n\tvar htmlReference = \"<div id='createForm'>\";\n\thtmlReference += \"<p>Title:</p><input type='text' id='title'/>\";\n\thtmlReference += \"<p><h5 id='type'><span>\" + t + \"</span> >> <select id='category'><option value='Revit'>Revit</option><option value='Rhino'>Rhino</option><option value='AutoCAD'>AutoCAD</option></select> >> \";\n\thtmlReference += \"<select id='subcategory'><option value='Tip'>Tip</option><option value='Reference'>Reference</option></select></h5></p>\";\n\thtmlReference += \"<p>Content:</p><textarea id='content'></textarea>\";\n\thtmlReference += \"<form enctype='multipart/form-data'><input name='file' type='file' style='margin: 10px 0 10px 0;'/>\";\n\thtmlReference += \"<div id='bar'><table><tr><td style='width: 80px;'><input type='button' value='Submit' id='submit' class='create' style='width: 60px;'/></td><td><progress></progress></td></tr></table></div>\";\n\thtmlReference += \"</form></div>\";\n\t// insert the new HTML into the document\n\t$('#main')[0].innerHTML = htmlReference;\n}", "create() {\n this.id = 0;\n this.familyName = null;\n this.givenNames = null;\n this.dateOfBirth = null;\n\n this.validator.resetForm();\n $(\"#form-section-legend\").html(\"Create\");\n this.sectionSwitcher.swap('form-section');\n }", "crearFormulario(formCL,contenedor){\n\t\tlet arrAttrb = new Array(['class',formCL]);\n\t\tlet formular = this.crearNodo('form',arrAttrb,contenedor);\n\t\treturn formular;\n\t}", "function addOrderTypePoste(){\n\t\t\t\tcontentTemplateEdit = $('.OrderWork')\n\t\t\t\tvar templateEditPoste = document.createElement('div')\n\t\t\t\ttemplateEditPoste.setAttribute('class', 'EditPoste')\n\t\t\t\tvar template = `<form action=\"\" class=\"EditPoste__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditPoste__containner--head\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3>NUEVA ORDEN DE TRABAJO</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditPoste__containner--body\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Servicio</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select required class=\"selectBox__select\" name=\"type_service\" id=\"type_service\" disabled>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_servicio_P\" selected>Poste</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_servicio_C\">Cliente</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Detalle del Servicio</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select required class=\"selectBox__select\" name=\"detail_service\" id=\"detail_service\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">Seleccione</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_A\">Zona sin Alumbrado Público</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_CH\">Poste Chocado</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_CC\">Poste Caido por Corrosión</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_M\">Mantenimiento de Poste</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_I\">Instalacion de Poste</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_R\">Registro de Poste</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Usuario</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select required class=\"selectBox__select\" name=\"\" id=\"codigo_contratista\"></select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Supervisor</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select required class=\"selectBox__select\" name=\"\" id=\"codigo_supervisor\"></select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Prioridad</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select required class=\"selectBox__select\" name=\"priority\" id=\"priority\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">Seleccione</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_urgencia_A\">Alta</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_urgencia_M\">Media</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_urgencia_B\">Baja</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Dirección</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input required id=\"direccion\" type=\"text\" class=\"inputs-label\" value=\"\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"mapEdit\" style=\"width:100%;height:200px\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada X</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input required id=\"coordenada_X\" type=\"text\" class=\"inputs-label\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada Y</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input required id=\"coordenada_Y\" type=\"text\" class=\"inputs-label\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left labelTextarea\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Descripción</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<textarea required class=\"inputs-label\" name=\"\" id=\"descripcion\" cols=\"30\" rows=\"5\"></textarea>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Fecha de Visita Esperada</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input required id=\"date\" type=\"date\" class=\"inputs-label\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Público</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right inputStatus\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right--true\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input required checked=\"checked\" name=\"public\" id=\"true\" value=\"true\" type=\"radio\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"true\">Si</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right--false\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input required name=\"public\" id=\"false\" value=\"false\" type=\"radio\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"false\">No</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left countPoste\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Cantidad de Postes</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\" id=\"ElementsContainner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"searchItem\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"searchItem__btnSearch\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"searchItem__btnSearch--input\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"inputs-label\" id=\"codigoPoste\" type=\"text\" class=\"inputs-label\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"searchItem__btnSearch--btn\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"AddOrderCodigo\"><span>+</span> Agregar Poste</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__btns\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__btns--cancel\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button id=\"closeAddOrder\">CANCELAR</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__btns--send\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"submit\">GUARDAR</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</form>`\n\n\t\t\t\ttemplateEditPoste.innerHTML = template\n\t\t\t\tcontentTemplateEdit.append(templateEditPoste)\n\n\n\t\t\t\t$http({\n\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\turl:'/dashboard/usuarios/list/users-campo'\n\t\t\t\t}).then(function(res){\n\t\t\t\t\tconsole.log('XD123456')\n\t\t\t\t\tconsole.log(res)\n\t\t\t\t\tvar usersListContratista = res.data.usuarios\n\t\t\t\t\tfor (var i = 0; i < usersListContratista.length; i++) {\n\t\t\t\t\t\tvar content = $('#codigo_contratista')\n\t\t\t\t\t\tvar user = document.createElement('option')\n\t\t\t\t\t\tuser.setAttribute('value', usersListContratista[i]._id)\n\t\t\t\t\t\tuser.innerHTML = usersListContratista[i].full_name\n\t\t\t\t\t\tcontent.append(user)\n\t\t\t\t\t}\n\t\t\t\t}, function(err){\n\t\t\t\t\tconsole.log(err)\n\t\t\t\t})\n\n\t\t\t\t$http({\n\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\turl: '/dashboard/usuarios/list/officers'\n\t\t\t\t}).then(function(res){\n\t\t\t\t\tvar usersListSupervisor = res.data.usuarios\n\t\t\t\t\tfor (var i = 0; i < usersListSupervisor.length; i++) {\n\t\t\t\t\t\tconsole.log('XD')\n\t\t\t\t\t\tvar content = $('#codigo_supervisor')\n\t\t\t\t\t\tvar user = document.createElement('option')\n\t\t\t\t\t\tuser.setAttribute('value', usersListSupervisor[i]._id)\n\t\t\t\t\t\tuser.innerHTML = usersListSupervisor[i].full_name\n\t\t\t\t\t\tcontent.append(user)\n\t\t\t\t\t}\n\t\t\t\t}, function(err){\n\t\t\t\t\tconsole.log(err)\n\t\t\t\t})\n\n\t\t\t\t// var lat, lng\n\t\t\t\t// ASE AGREGA MAPA PARA PODER USAR Y OBTENER LATNLNG\n\t\t\t\tmapAdd = new GMaps({\n\t\t\t\t div: '#mapEdit',\n\t\t\t\t zoom: 11,\n\t\t\t\t lat: -12.043333,\n\t\t\t\t lng: -77.028333,\n\t\t\t\t click: function(e) {\n\t\t\t\t console.log(e)\n\t\t\t\t $('#coordenada_X').val(e.latLng.lat())\n\t\t\t\t $('#coordenada_Y').val(e.latLng.lng())\n\t\t\t\t mapAdd.removeMarkers()\n\t\t\t\t mapAdd.addMarker({\n\t\t\t\t lat: e.latLng.lat(),\n\t\t\t\t lng: e.latLng.lng(),\n\t\t\t\t title: 'Lima',\n\t\t\t\t })\n\t\t\t\t }\n\t\t\t\t})\n\n\t\t\t\t// VARIABLE ID DE LA ORDEN RECIEN CREADA\n\t\t\t\tvar idNuevo , itemEditable\n\n\t\t\t\t// DETECTAR CAMBIO DE DETALLE DE SERVICIO Y CREACION INMEDIATA DE ORDEN\n\t\t\t\t$('#detail_service').one('change',function(){\n\t\t\t\t\t// this.removeAttribute('id')\n\t\t\t\t\tvar detail_service = $(this)\n\t\t\t\t\t// var type_order = $('#')\n\t\t\t\t\tdata = {\n\t\t\t\t\t\tcodigo_supervisor:'',\n\t\t\t\t\t\tcodigo_contratista:'',\n\t\t\t\t\t\ttipo_servicio:'tipo_servicio_P', \n\t\t\t\t\t\tdetalle_servicio:detail_service.val(), \n\t\t\t\t\t\ttipo_urgencia:'', \n\t\t\t\t\t\tcoordenada_X:'', \n\t\t\t\t\t\tcoordenada_Y:'', \n\t\t\t\t\t\tdireccion:'', \n\t\t\t\t\t\tdescripcion:'', \n\t\t\t\t\t\tpublic:'',\n\t\t\t\t\t\tconclusiones :'',\n\t\t\t\t\t\tfecha_visita_esperada:'',\n\t\t\t\t\t}\n\n\t\t\t\t\t$http({\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/create',\n\t\t\t\t\t\tdata: data\n\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\tif (detail_service.val() === 'detalle_servicio_R') {\n\t\t\t\t\t\t\titem = res.data.work_order.elementos[0]\n\t\t\t\t\t\t\tvar template = `<div class=\"itemContainner\" id=\"itemContainner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"contentItems\" >\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem\" data-id=\"${item._id}\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__image\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ItemPhoto\" style=\"background-image:url(${item.image_element.path})\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"titleHead\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"codigo_poste\">Sin Datos</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__text\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_poste\"><strong>Sin Datos</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_material\">Sin Datos</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__edit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"EditarPoste\" data-id=\"${item._id}\">EDITAR</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"BtnNewElement\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"BtnNewElement__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"addNewElement\"><span class=\"icon-icon_agregar_poste\"></span></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\n\t\t\t\t\t\t\t$('#ElementsContainner').html(template)\n\t\t\t\t\t\t\t// EDICION DE ELEMENTO EXISTENTE EN LA ORDEN\n\t\t\t\t\t\t\t$('#EditarPoste').on('click', editElementOrder)\n\t\t\t\t\t\t\t$('#addNewElement').on('click', addNewElementEdited)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tidNuevo = res.data.work_order._id\n\t\t\t\t\t\titemEditable = res.data.work_order.elementos[0]._id\n\t\t\t\t\t}, function(err){\n\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t})\n\t\t\t\t})\n\n\t\t\t\t// EDICION DEL ELEMENTO QUE SE CREA POR DEFAUL AL REGISTRAR UN POSTE\n\t\t\t\tfunction editElementOrder(){\n\t\t\t\t\tconsole.log(this)\n\t\t\t\t\tvar idElement = this.getAttribute('data-id')\n\t\t\t\t\tconsole.log(idElement)\n\t\t\t\t\tvar contentTemplateEditPoste = document.createElement('div')\n\t\t\t\t\tcontentTemplateEditPoste.setAttribute('class', 'editPosteModal')\n\t\t\t\t\tvar template = `<form action=\"\" id=\"sendEditPoste\" class=\"editPoste\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3>EDITAR REGISTRO DE POSTE</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--content\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Caracteristicas</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Código Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"codigo_newPoste\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Altura de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"altura_newPoste\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<!--<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select class=\"selectBox__select\" id=\"altura_newPoste\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"\"></option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>-->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_newPoste\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Material</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_of_material\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de pastoral</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_pastoral\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Luminaria</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_luminaria\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Lampará</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_lampara\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Ubicación</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication_item--map\" style=\"width:100%;height:200px\" id=\"mapsEdit\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada X</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"element_coordenada_X\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada Y</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"element_coordenada_Y\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Estado</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_newPoste\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Pastoral</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_pastoral\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Luminaria</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_luminaria\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Lampará</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_lampara\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--buttons\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteCancel\">CANCELAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteSave\" type=\"submit\">GUARDAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</form>`\n\n\t\t\t\t\tcontentTemplateEditPoste.innerHTML = template\n\t\t\t\t\t$('.OrderWork').append(contentTemplateEditPoste)\n\n\t\t\t\t\t// $('#mapsEdit').css('background-image', 'url('+url+')')\n\n\t\t\t\t\tvar btnCloseEditPoste = $('#editPosteCancel')\n\t\t\t\t\t// btnCloseEditPoste.on('click', closeEditPoste)\n\n\t\t\t\t\tmapEdit = new GMaps({\n\t\t\t\t\t div: '#mapsEdit',\n\t\t\t\t\t zoom: 11,\n\t\t\t\t\t lat: -12.043333,\n\t\t\t\t\t lng: -77.028333,\n\t\t\t\t\t click: function(e) {\n\t\t\t\t\t console.log(e)\n\t\t\t\t\t $('#element_coordenada_X').val(e.latLng.lat())\n\t\t\t\t\t $('#element_coordenada_Y').val(e.latLng.lng())\n\t\t\t\t\t mapEdit.removeMarkers()\n\t\t\t\t\t mapEdit.addMarker({\n\t\t\t\t\t lat: e.latLng.lat(),\n\t\t\t\t\t lng: e.latLng.lng(),\n\t\t\t\t\t title: 'Lima',\n\t\t\t\t\t })\n\t\t\t\t\t }\n\t\t\t\t\t})\n\n\t\t\t\t\tbtnCloseEditPoste.on('click',function (ev){\n\t\t\t\t\t\tev.preventDefault()\n\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t})\n\n\t\t\t\t\t$('#sendEditPoste').submit(function(ev){\n\t\t\t\t\t\tev.preventDefault()\n\n\t\t\t\t\t\tvar codigo_poste = $('#codigo_newPoste')\n\t\t\t\t\t\tvar type_poste = $('#type_newPoste')\n\t\t\t\t\t\tvar altura_poste = $('#altura_newPoste')\n\t\t\t\t\t\tvar type_material = $('#type_of_material')\n\t\t\t\t\t\tvar type_pastoral = $('#type_pastoral')\n\t\t\t\t\t\tvar type_luminaria = $('#type_luminaria')\n\t\t\t\t\t\tvar type_lampara = $('#type_lampara')\n\t\t\t\t\t\tvar coordenada_X = $('#element_coordenada_X')\n\t\t\t\t\t\tvar coordenada_Y = $('#element_coordenada_Y')\n\t\t\t\t\t\t// var observaciones = $('#observaciones')\n\t\t\t\t\t\tvar estado_poste = $('#estado_newPoste')\n\t\t\t\t\t\tvar estado_pastoral = $('#estado_pastoral')\n\t\t\t\t\t\tvar estado_luminaria = $('#estado_luminaria')\n\t\t\t\t\t\tvar estado_lampara = $('#estado_lampara')\n\n\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\tcodigo_poste: codigo_poste.val(),\n\t\t\t\t\t\t\ttype_poste: type_poste.val(),\n\t\t\t\t\t\t\taltura_poste: altura_poste.val(),\n\t\t\t\t\t\t\ttype_material: type_material.val(),\n\t\t\t\t\t\t\ttype_pastoral: type_pastoral.val(),\n\t\t\t\t\t\t\ttype_luminaria: type_luminaria.val(),\n\t\t\t\t\t\t\ttype_lampara: type_lampara.val(),\n\t\t\t\t\t\t\tcoordenada_X: coordenada_X.val(),\n\t\t\t\t\t\t\tcoordenada_Y: coordenada_Y.val(),\n\t\t\t\t\t\t\t// observaciones:\n\t\t\t\t\t\t\testado_poste: estado_poste.val(),\n\t\t\t\t\t\t\testado_pastoral: estado_pastoral.val(),\n\t\t\t\t\t\t\testado_luminaria: estado_luminaria.val(),\n\t\t\t\t\t\t\testado_lampara: estado_lampara.val()\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconsole.log(data)\n\n\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+idNuevo+'/item/poste/'+idElement+'?_method=put',\n\t\t\t\t\t\t\tdata: data\n\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t$('[data-content=\"'+idElement+'\"] #image').attr('src', res.data.service.imagen_poste[0].path)\n\t\t\t\t\t\t\t$('[data-content=\"'+idElement+'\"] #codigo_poste').html(res.data.service.codigo_poste)\n\t\t\t\t\t\t\t$('[data-content=\"'+idElement+'\"] #type_poste').html(res.data.service.type_poste)\n\t\t\t\t\t\t\t$('[data-content=\"'+idElement+'\"] #type_material').html(res.data.service.type_material)\n\t\t\t\t\t\t\t// location.reload()\n\t\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\t$('#AddOrderCodigo').on('click',addNewElementOrder)\n\n\t\t\t\t// SE AGREGA NUEVO ELEMENTO A LA ORDEN\n\t\t\t\tfunction addNewElementOrder(){\n\t\t\t\t\t// SE COMPRUEBA EL NUMERO DE ELEMENTOS DENTRO DE LA ORDEN\n\t\t\t\t\t$http({\n\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t\turl:'/dashboard/ordenes_trabajo/'+idNuevo,\n\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\tvar num_elements = res.data.work_order.elementos.length\n\t\t\t\t\t\t// console.log(num_elements)\n\t\t\t\t\t\tvar elements__count = $('.itemElement')\n\t\t\t\t\t\t// console.log(elements__count.length)\n\t\t\t\t\t\tvar codigo_poste = $('#codigoPoste')\n\t\t\t\t\t\t// console.log(codigo_poste.val())\n\t\t\t\t\t\tvar idFirstElement = res.data.work_order.elementos[0]._id\n\t\t\t\t\t\tif (codigo_poste.val() !== '') {\n\t\t\t\t\t\t\tif (elements__count.length < 1) {\n\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\tcode_service: codigo_poste.val()\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// SE OBTIENE DATOS LOS DATOS DEL SERVICIO BUSCADO\n\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/poste',\n\t\t\t\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\tif (!res.data.status) {\n\t\t\t\t\t\t\t\t\t\tvar box_Content = $('#Elements_containner')\n\t\t\t\t\t\t\t\t\t\tvar newDiv = document.createElement('div')\n\t\t\t\t\t\t\t\t\t\tnewDiv.setAttribute('id', 'contentItems')\n\t\t\t\t\t\t\t\t\t\tvar template = `<div class=\"itemElement\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ItemPhoto\" style=\"background-image:url(${res.data.service.imagen_poste[0].path})\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"titleHead\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"codigo_poste\">${res.data.poste.codigo_poste}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__text\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_poste\"><strong>${res.data.poste.type_poste}</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_material\">${res.data.poste.type_material}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t\t\t\t\tnewDiv.innerHTML = template\n\t\t\t\t\t\t\t\t\t\tbox_Content.append(newDiv)\n\n\t\t\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\t\t\tcodigo_poste:res.data.poste.codigo_poste,\n\t\t\t\t\t\t\t\t\t\t\ttype_poste:res.data.poste.type_poste,\n\t\t\t\t\t\t\t\t\t\t\taltura_poste:res.data.poste.altura_poste,\n\t\t\t\t\t\t\t\t\t\t\ttype_material:res.data.poste.type_material,\n\t\t\t\t\t\t\t\t\t\t\ttype_pastoral:res.data.poste.type_pastoral,\n\t\t\t\t\t\t\t\t\t\t\ttype_luminaria:res.data.poste.Luminaria,\n\t\t\t\t\t\t\t\t\t\t\ttype_lampara:res.data.poste.type_lampara,\n\t\t\t\t\t\t\t\t\t\t\tcoordenada_X:res.data.poste.coordenada_X,\n\t\t\t\t\t\t\t\t\t\t\tcoordenada_Y:res.data.poste.coordenada_Y,\n\t\t\t\t\t\t\t\t\t\t\tobservaciones:res.data.poste.observaciones,\n\t\t\t\t\t\t\t\t\t\t\testado_poste:res.data.poste.estado_poste,\n\t\t\t\t\t\t\t\t\t\t\testado_pastoral:res.data.poste.estado_pastoral,\n\t\t\t\t\t\t\t\t\t\t\testado_luminaria:res.data.poste.estado_luminaria,\n\t\t\t\t\t\t\t\t\t\t\testado_lampara:res.data.poste.estado_lampara,\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// EDICION DE POSTE NUEVO CREADO RECIENTEMENTE\n\t\t\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+idNuevo+'/item/poste/'+idFirstElement+'?_method=put',\n\t\t\t\t\t\t\t\t\t\t\tdata: data\n\t\t\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t\t\t})\t\n\t\t\t\t\t\t\t\t\t}\telse {\n\t\t\t\t\t\t\t\t\t\tconsole.log('No se encontro datos')\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconsole.log('XD')\n\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\tcode_service: codigo_poste.val()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// SE OBTIENE DATOS LOS DATOS DEL SERVICIO BUSCADO\n\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/poste',\n\t\t\t\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\tconsole.log(res)\n\n\t\t\t\t\t\t\t\t\tif (!res.data.status) {\n\t\t\t\t\t\t\t\t\t\tvar elementNew = res.data.poste\n\t\t\t\t\t\t\t\t\t\tvar box_Content = $('#Elements_containner')\n\t\t\t\t\t\t\t\t\t\tvar newDiv = document.createElement('div')\n\t\t\t\t\t\t\t\t\t\tvar template = `<div class=\"itemElement\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ItemPhoto\" style=\"background-image:url(${res.data.service.imagen_poste[0].path})\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"titleHead\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"codigo_poste\">${res.data.poste.codigo_poste}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_poste\"><strong>${res.data.poste.type_poste}</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_material\">${res.data.poste.type_material}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t\t\t\t\tnewDiv.innerHTML = template\n\t\t\t\t\t\t\t\t\t\tbox_Content.append(newDiv)\n\n\t\t\t\t\t\t\t\t\t\t// CREACION DE NUEVO POSTE\n\t\t\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+idNuevo+'/add-item/poste'\n\t\t\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\t\t\t\tcodigo_poste:elementNew.codigo_poste,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_poste:elementNew.type_poste,\n\t\t\t\t\t\t\t\t\t\t\t\taltura_poste:elementNew.altura_poste,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_material:elementNew.type_material,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_pastoral:elementNew.type_pastoral,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_luminaria:elementNew.Luminaria,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_lampara:elementNew.type_lampara,\n\t\t\t\t\t\t\t\t\t\t\t\tcoordenada_X:elementNew.coordenada_X,\n\t\t\t\t\t\t\t\t\t\t\t\tcoordenada_Y:elementNew.coordenada_Y,\n\t\t\t\t\t\t\t\t\t\t\t\tobservaciones:elementNew.observaciones,\n\t\t\t\t\t\t\t\t\t\t\t\testado_poste:elementNew.estado_poste,\n\t\t\t\t\t\t\t\t\t\t\t\testado_pastoral:elementNew.estado_pastoral,\n\t\t\t\t\t\t\t\t\t\t\t\testado_luminaria:elementNew.estado_luminaria,\n\t\t\t\t\t\t\t\t\t\t\t\testado_lampara:elementNew.estado_lampara,\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// EDICION DE POSTE NUEVO CREADO RECIENTEMENTE\n\t\t\t\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+idNuevo+'/item/poste/'+res.data.service._id+'?_method=put',\n\t\t\t\t\t\t\t\t\t\t\t\tdata: data\n\t\t\t\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t\t\t\t})\t\t\n\n\t\t\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconsole.log('ingrese codigo de poste')\n\t\t\t\t\t\t}\n\t\t\t\t\t}, function(err){\n\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\t// DETECTAR CAMBIO DE DETALLE DE SERVICIO EN LA CREACION DE ORDEN\n\t\t\t\t$('#detail_service').on('change', function(){\n\t\t\t\t\t// console.log(this)\n\t\t\t\t\tvar detail_service = $(this)\n\t\t\t\t\tif (detail_service.val() === 'detalle_servicio_R') {\n\t\t\t\t\t\t// console.log('XD')\n\t\t\t\t\t\ttemplate = `<div class=\"itemContainner\" id=\"itemContainner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"contentItems\" >\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem\" data-content=\"${itemEditable}\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__image\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ItemPhoto\" style=\"background-image:url('/images/elemento_defaul.png')\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"titleHead\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"codigo_poste\">Sin Datos</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__text\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_poste\"><strong>Sin Datos</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_material\">Sin Datos</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__edit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"EditarPoste\" data-id=\"${itemEditable}\">EDITAR</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"BtnNewElement\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"BtnNewElement__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"addNewElement\"><span class=\"icon-icon_agregar_poste\"></span></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\n\t\t\t\t\t\t$('#ElementsContainner').html(template)\n\t\t\t\t\t\t$('.EditarPoste').on('click', editElementOrder)\n\t\t\t\t\t\t$('#addNewElement').on('click', addNewElementEdited)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar template = `<div class=\"searchItem\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"searchItem__btnSearch\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"searchItem__btnSearch--input\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"inputs-label\" id=\"codigoPoste\" type=\"text\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"searchItem__btnSearch--btn\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"AddOrderCodigo\"><span>+</span> Agregar Poste</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"Elements_containner\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t$('#ElementsContainner').html(template)\t\t\n\t\t\t\t\t\t$('#AddOrderCodigo').on('click',addNewElementOrder)\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tfunction deletePoste(){\n\t\t\t\t\tconsole.log(this.getAttribute('data-id'))\n\t\t\t\t\tvar id = this.getAttribute('data-id')\n\t\t\t\t\t$http({\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+idNuevo+'/delete/poste/'+id+'?_method=delete'\n\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t$('[data-content=\"'+id+'\"]').remove()\n\t\t\t\t\t}, function(err){\n\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\t// AGREGAR UN NUEVO POSTE EN REGISTRO\n\t\t\t\tfunction addNewElementEdited(){\n\t\t\t\t\tconsole.log('XD')\n\t\t\t\t\t$http({\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+idNuevo+'/add-item/poste'\n\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\tvar item = res.data.service\n\t\t\t\t\t\tvar containner = $('#contentItems')\n\t\t\t\t\t\tvar div = document.createElement('div')\n\t\t\t\t\t\tdiv.setAttribute('data-content', item._id)\n\t\t\t\t\t\tdiv.setAttribute('class', 'EditItem')\n\t\t\t\t\t\tvar template = `<div class=\"EditItem__image\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ItemPhoto\" style=\"background-image:url(${item.imagen_poste[0].path})\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"titleHead\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"codigo_poste\">Sin Datos</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__text\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_poste\"><strong>Sin Datos</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_material\">Sin Datos</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__edit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"EditarPoste\" data-id=\"${item._id}\">EDITAR</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__delete\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"DeletePoste\" data-id=\"${item._id}\">x</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\n\t\t\t\t\t\tdiv.innerHTML = template\n\t\t\t\t\t\tcontainner.append(div)\n\t\t\t\t\t\t$('.EditarPoste').on('click', editElementOrder)\n\t\t\t\t\t\t$('.DeletePoste').on('click', deletePoste)\n\t\t\t\t\t}, function(err){\n\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\t// CREACION/EDICION DE ORDEN DE TRABAJO\n\t\t\t\t$('.EditPoste__containner').submit(function(ev){\n\t\t\t\t\tev.preventDefault()\n\n\t\t\t\t\tLoader.create('.EditPoste__containner--body', 'CreacionOrder')\n\n\t\t\t\t\tvar codigo_contratista = $('#codigo_contratista')\n\t\t\t\t\tvar codigo_supervisor = $('#codigo_supervisor')\n\t\t\t\t\tvar priority = $('#priority')\n\t\t\t\t\tvar direccion = $('#direccion')\n\t\t\t\t\tvar coordenada_X = $('#coordenada_X')\n\t\t\t\t\tvar coordenada_Y = $('#coordenada_Y')\n\t\t\t\t\tvar descripcion = $('#descripcion')\n\t\t\t\t\tvar date = $('#date')\n\t\t\t\t\tvar public = $('[name=\"public\"]:checked')\n\t\t\t\t\tvar detail_service = $('#detail_service')\n\n\t\t\t\t\tvar data = {\n\t\t\t\t\t\tcodigo_supervisor:codigo_supervisor.val(),\n\t\t\t\t\t\tcodigo_contratista:codigo_contratista.val(),\n\t\t\t\t\t\ttipo_servicio:'tipo_servicio_P', \n\t\t\t\t\t\tdetalle_servicio:detail_service.val(), \n\t\t\t\t\t\ttipo_urgencia:priority.val(), \n\t\t\t\t\t\tcoordenada_X:coordenada_X.val(), \n\t\t\t\t\t\tcoordenada_Y:coordenada_Y.val(), \n\t\t\t\t\t\tdireccion:direccion.val(), \n\t\t\t\t\t\tdescripcion:descripcion.val(), \n\t\t\t\t\t\tpublic:public.val(),\n\t\t\t\t\t\t// conclusiones: 'asdfgdsad',\n\t\t\t\t\t\t// fecha_publicado: 'asdfgdsad',\n\t\t\t\t\t\t// reprogramado_de: 'asdfgdsad',\n\t\t\t\t\t\tfecha_visita_esperada:date.val(),\n\t\t\t\t\t}\n\n\t\t\t\t\t$http({\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+idNuevo+'?_method=put',\n\t\t\t\t\t\tdata: data\n\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\tLoader.delete('.EditPoste__containner--body', 'CreacionOrder')\n\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t// var item = res.data.work_order\n\n\t\t\t\t\t\t// var template_tarjeta = ''\n\t\t\t\t\t\t// var title = ''\n\t\t\t\t\t\t// var image = ''\n\n\t\t\t\t\t\t// if (item.tipo_servicio === 'tipo_servicio_P') {\n\t\t\t\t\t\t// \ttitle = 'Poste'\n\t\t\t\t\t\t// \timage = '../images/icon-Poste.png'\n\t\t\t\t\t // template_tarjeta = `<div>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t<img src=\"${item.cover_image.path}\" width=\"40\">\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t<strong>Servicio: Poste</strong>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t<p>codigo_orden: ${item.codigo_orden}</p>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t<p>codigo_contrtista: ${item.codigo_contratista}</p>\n\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t<p>X: ${item.coordenada_X} Y: ${item.coordenada_Y}</p>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t// } else {\n\t\t\t\t\t\t// \ttitle = 'Cliente'\n\t\t\t\t\t\t// \timage = '../images/icon-Cliente.png'\n\t\t\t\t\t\t// \ttemplate_tarjeta = `<div>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t<img src=\"${item.cover_image.path}\" width=\"40\">\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t<strong>Servicio: Cliente</strong>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t<p>codigo_orden: ${item.codigo_orden}</p>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t<p>codigo_contrtista: ${item.codigo_contratista}</p>\n\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t<p>X: ${item.coordenada_X} Y: ${item.coordenada_Y}</p>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t// map.addMarker({\n\t\t\t\t\t\t// \tlat: Number(item.coordenada_X),\n\t\t\t\t\t\t// \tlng: Number(item.coordenada_Y),\n\t\t\t\t\t\t// \ttitle: title,\n\t\t\t\t\t\t// \tclick: function(e){\n\t\t\t\t\t\t// \t\tconsole.log(e)\n\t\t\t\t\t\t// \t},\n\t\t\t\t\t\t// \tinfoWindow: {\n\t\t\t\t\t\t// \t\tcontent: template_tarjeta\n\t\t\t\t\t\t// \t},\n\t\t\t\t\t\t// \ticon: image\n\t\t\t\t\t\t// })\n\n\t\t\t\t\t\t// if(item.estado === 'no_asignado'){\n\t\t\t\t\t\t// \tif (document.getElementById('orderNoAsignado') === null) {\n\t\t\t\t\t\t// \t\tvar ContainnerBox = document.createElement('div')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('class','DatasItems')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('id','orderNoAsignado')\n\t\t\t\t\t\t// \t\tvar template = `<div class=\"DatasItems__title\">\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t\t<h2>NO ASIGNADO</h2>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t</div>`\n\n\t\t\t\t\t\t// \t\tContainnerBox.innerHTML = template\n\t\t\t\t\t\t// \t\t$('.OrderWork__left--list').append(ContainnerBox)\n\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderNoAsignado', item)\n\n\t\t\t\t\t\t// \t} else {\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderNoAsignado', item)\n\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t// } else if(item.estado === 'reportado'){\n\t\t\t\t\t\t// \tif (document.getElementById('orderReportada') === null) {\n\t\t\t\t\t\t// \t\tvar ContainnerBox = document.createElement('div')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('class','DatasItems')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('id','orderReportada')\n\t\t\t\t\t\t// \t\tvar template = `<div class=\"DatasItems__title\">\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t\t<h2>REPORTADAS</h2>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t</div>`\n\n\t\t\t\t\t\t// \t\tContainnerBox.innerHTML = template\n\t\t\t\t\t\t// \t\t$('.OrderWork__left--list').append(ContainnerBox)\n\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderReportada', item)\n\n\t\t\t\t\t\t// \t} else {\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderReportada', item)\n\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t// } else if(item.estado === 'cancelado'){\n\t\t\t\t\t\t// \tif (document.getElementById('orderCancelado') === null) {\n\t\t\t\t\t\t// \t\tvar ContainnerBox = document.createElement('div')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('class','DatasItems')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('id','orderCancelado')\n\t\t\t\t\t\t// \t\tvar template = `<div class=\"DatasItems__title\">\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t\t<h2>CANCELADAS</h2>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t</div>`\n\n\t\t\t\t\t\t// \t\tContainnerBox.innerHTML = template\n\t\t\t\t\t\t// \t\t$('.OrderWork__left--list').append(ContainnerBox)\n\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderCancelado', item)\n\n\t\t\t\t\t\t// \t} else {\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderCancelado', item)\n\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t// } else if(item.estado === 'reprogramado'){\n\t\t\t\t\t\t// \tif (document.getElementById('orderReprogramado') === null) {\n\t\t\t\t\t\t// \t\tvar ContainnerBox = document.createElement('div')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('class','DatasItems')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('id','orderReprogramado')\n\t\t\t\t\t\t// \t\tvar template = `<div class=\"DatasItems__title\">\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t\t<h2>REPROGRAMADAS</h2>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t</div>`\n\n\t\t\t\t\t\t// \t\tContainnerBox.innerHTML = template\n\t\t\t\t\t\t// \t\t$('.OrderWork__left--list').append(ContainnerBox)\n\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderReprogramado', item)\n\n\t\t\t\t\t\t// \t} else {\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderReprogramado', item)\n\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t// } else if(item.estado === 'no_resuelto'){\n\t\t\t\t\t\t// \tif (document.getElementById('orderNoResuelto') === null) {\n\t\t\t\t\t\t// \t\tvar ContainnerBox = document.createElement('div')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('class','DatasItems')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('id','orderNoResuelto')\n\t\t\t\t\t\t// \t\tvar template = `<div class=\"DatasItems__title\">\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t\t<h2>NO RESUELTAS</h2>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t</div>`\n\n\t\t\t\t\t\t// \t\tContainnerBox.innerHTML = template\n\t\t\t\t\t\t// \t\t$('.OrderWork__left--list').append(ContainnerBox)\n\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderNoResuelto', item)\n\n\t\t\t\t\t\t// \t} else {\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderNoResuelto', item)\n\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t// } else if(item.estado === 'en_proceso'){\n\t\t\t\t\t\t// \tif (document.getElementById('orderEnProceso') === null) {\n\t\t\t\t\t\t// \t\tvar ContainnerBox = document.createElement('div')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('class','DatasItems')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('id','orderEnProceso')\n\t\t\t\t\t\t// \t\tvar template = `<div class=\"DatasItems__title\">\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t\t<h2>EN CURSO</h2>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t</div>`\n\n\t\t\t\t\t\t// \t\tContainnerBox.innerHTML = template\n\t\t\t\t\t\t// \t\t$('.OrderWork__left--list').append(ContainnerBox)\n\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderEnProceso', item)\n\n\t\t\t\t\t\t// \t} else {\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderEnProceso', item)\n\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t// } else if (item.estado === 'resuelto') {\n\t\t\t\t\t\t// \tif (document.getElementById('orderResuelto') === null) {\n\t\t\t\t\t\t// \t\tvar ContainnerBox = document.createElement('div')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('class','DatasItems')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('id','orderResuelto')\n\t\t\t\t\t\t// \t\tvar template = `<div class=\"DatasItems__title\">\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t\t<h2>RESUELTAS</h2>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t</div>`\n\n\t\t\t\t\t\t// \t\tContainnerBox.innerHTML = template\n\t\t\t\t\t\t// \t\t$('.OrderWork__left--list').append(ContainnerBox)\n\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderResuelto', item)\n\n\t\t\t\t\t\t// \t} else {\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderResuelto', item)\n\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t// } else if (item.estado === 'pendiente') {\n\t\t\t\t\t\t// \tif (document.getElementById('orderPendiente') === null) {\n\t\t\t\t\t\t// \t\tvar ContainnerBox = document.createElement('div')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('class','DatasItems')\n\t\t\t\t\t\t// \t\tContainnerBox.setAttribute('id','orderPendiente')\n\t\t\t\t\t\t// \t\tvar template = `<div class=\"DatasItems__title\">\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t\t<h2>PENDIENTES</h2>\n\t\t\t\t\t\t// \t\t\t\t\t\t\t\t\t\t</div>`\n\n\t\t\t\t\t\t// \t\tContainnerBox.innerHTML = template\n\t\t\t\t\t\t// \t\t$('.OrderWork__left--list').append(ContainnerBox)\n\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderPendiente', item)\n\n\t\t\t\t\t\t// \t} else {\n\t\t\t\t\t\t// \t\ttemplateOrder('#orderPendiente', item)\n\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t// } else {\n\t\t\t\t\t\t// \tconsole.log('XD')\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tlocation.reload()\n\t\t\t\t\t\t// $('.EditPoste').remove()\n\t\t\t\t\t}, function(err){\n\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t})\n\t\t\t\t})\n\n\t\t\t\t//CANCELAR CREACION DE ORDEN DE TRABAJO\n\t\t\t\t$('#closeAddOrder').on('click', function(ev){\n\t\t\t\t\tev.preventDefault()\n\t\t\t\t\t$('.EditPoste').remove()\n\t\t\t\t\tif (idNuevo !== undefined) {\n\t\t\t\t\t\tconsole.log(idNuevo)\n\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\tmethod:'POST',\n\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/delete/'+idNuevo+'?_method=delete'\n\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}", "function makeForms()\n{\n\t\n\t// Headers\n\t$('fieldset legend').each(function(){\n\t\t$(this).parent().prepend('<h2>'+$(this).css({display:'none'}).html()+'</h2>');\n\t\t\n\t});\n\t\n\t\n\t// Inputs\n\t$('.form input').each(function(){\n\t\t\n\t\tswitch( $(this).attr('type') )\n\t\t{\n\t\t\tcase 'submit':\n\t\t\t\t$(this).addClass('btn btn-large btn-primary');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'number':\n\t\t\tcase 'text':\n\t\t\tcase 'password':\n\t\t\t\t$(this).addClass('input-block-level').attr({\n\t\t\t\t\tplaceholder: $(this).parent().find('label').css({display:'none'}).html()\n\t\t\t\t}); \n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t});\n\t\n\t// textArea\n\t$('.form textarea').each(function(){\n\t\t\n\t\t$(this).addClass('input-block-level').attr({\n\t\t\tplaceholder: $(this).parent().find('label').css({display:'none'}).html()\n\t\t}); \n\t\t\t\t\n\t\t\n\t});\n\t\n\t// Select\n\t$('.form select').each(function(){\n\t\t\n\t\t$(this).addClass('input-block-level').attr({\n\t\t\tplaceholder: $(this).parent().find('label').html()\n\t\t}); \n\t\t\t\t\n\t\t\n\t});\n}", "function create_form_page()\n{\n empty_content('content');\n\n const form = document.createElement('form');\n\n let form_inner_html = '';\n\n form_inner_html += \n `\n <div id=\"form_title\">\n Devenez hébergeur pour <i>Merci pour l'invit'</i>'\n </div>\n <p1 id=\"description\">\n Vous avez une chambre libre ? Vous souhaitez devenir hébergeur solidaire et faire \n parti de l'aventure <i> Merci pour l'invit' </i> ? \n <br> <br>\n <i> Merci pour l'invit' </i> est un projet qui prône l'hébergement solidaire afin de faciliter la \n réinsertion socioprofessionnelle de femmes et de jeunes en grande précarité. \n <br> <br>\n <i> Merci pour l'invit' </i> se développe actuellement à BORDEAUX, à PARIS et sa banlieue. \n <br> <br>\n Après avoir rempli ce questionnaire, la responsable \"hébergement\"vous contactera pour \n vous expliquer plus amplement la démarche. La Charte de cohabitation sera signée entre \n vous et la personne accueillie lors du début de l'hébergement. \n <br> <br>\n Vous habitez une autre ville ? N'hésitez pas à remplir ce formulaire, notre équipe \n vous répondra dès que possible. \n <br> <br>\n Ce questionnaire <b>NE VOUS ENGAGE PAS A HEBERGER.</b>\n <br> <br>\n Toutes les informations collectées sont strictement pour l'association, elles ne \n seront pas partagées et ne serviront que pour les besoins du projet.\n <br> <br>\n <m style='color: red; display: inline-block;'> * Champ obligatoire </m>\n </p1>\n `;\n\n let names = ['Nom','Prénom','Genre','Ville','Code Postal','Adresse',\n 'Numéro de téléphone','Adresse mail', \"Nombres d'habitants dans le foyer\"];\n\n for(let i = 0;i < names.length ; i++)\n {\n form_inner_html += create_form_text_holder(names[i]);\n };\n\n let drop_names = [\"Modalités d'hébergement\",\"Durée d'hébergement\"];\n let drop_elements = [[\"Une chambre à part\",\"Canapé-lit\",\"Logement entier\",\"Autre\"],\n [\"Deux semaines\",\"De 1 mois à 3 mois\",\"De 4 mois à 6 mois\",\"6 mois ou plus\"]];\n\n for(let i = 0;i < drop_names.length ; i++)\n {\n form_inner_html += create_form_drop_down(drop_names[i],drop_elements[i]);\n };\n\n names = [\"A partir de quand pouvez-vous recevoir quelqu'un chez vous?\",\n \"Qu'attendez-vous de cette expérience d'accueil ?\", \"Des questions ou commentaires?\"];\n\n let place_holder = ['jj/mm/aaaa','Votre reponse','Votre reponse'];\n\n for(let i = 0;i < names.length ; i++)\n {\n form_inner_html += create_form_text_holder(names[i],place_holder[i]);\n };\n\n form_inner_html += `<div id=\"form_button\">\n <button id=\"envoyer\" type=\"button\">\n Envoyer\n </button>\n </div>`;\n \n form.innerHTML = form_inner_html;\n \n const form_container = document.createElement('div');\n form_container.setAttribute(\"class\",\"form_container\")\n form_container.appendChild(form);\n\n const content = document.querySelector('#content');\n content.innerHTML += create_page_title(\"Formulaire d'héberement\");\n content.appendChild(form_container);\n\n const submit = document.querySelector(\"#envoyer\");\n submit.addEventListener('click', submitForm);\n}", "addForm() {\n // Creates a new form based on TEMPLATE\n let template = document.importNode(TEMPLATE.content, true);\n FORMSET_BODY.appendChild(template);\n let form = FORMSET_BODY.children[FORMSET_BODY.children.length -1];\n\n // Updates the id's of the form to unique values\n form.innerHTML = form.innerHTML.replace(MATCH_FORM_IDS, this.updateMatchedId.bind(this, form));\n\n let index = FORMSET_BODY.children.length;\n FORMSET.querySelector('[name=\"form-TOTAL_FORMS\"]').value = index;\n this.updateButton();\n }", "function createRegistrationForm(){\n registrationForm = new MyForm(\n templates.tNewForm,\n [\n {\n id : 'registrate',\n class : 'btn btn-primary',\n name : 'Registrate',\n action : registrationUser\n },\n {\n id : 'cancel',\n class : 'btn btn-primary',\n name : 'Cancel',\n action : function(e){\n e.preventDefault();\n registrationForm.hide();\n }\n }\n ]\n );\n validation(registrationForm.form);\n }", "function TemplateInput() {}", "function createFormFromTemplate(url,template,id,button_name,handler){\n\t$form=$('<form></form>');\n\t$form.attr(\"id\",id);\n\t$form.attr(\"action\",url);\n\tif (template.data) {\n\t\tfor (var i =0; i<template.data.length; i++){\n\t\t\tvar name = template.data[i].name;\n\t\t\tvar id = name+\"_id\";\n\t\t\tvar value = template.data[i].value;\n\t\t\tvar prompt = template.data[i].prompt;\n\t\t\tvar required = template.data[i].required;\n\t\t\t$input = $('<input type=\"text\"></input>');\n\t\t\t$input.addClass(\"editable\");\n\t\t\t$input.attr('name',name);\n\t\t\t$input.attr('id',id);\n\t\t\tif(value){\n\t\t\t\t$input.attr('value', value);\n\t\t\t}\n\t\t\tif(prompt){\n\t\t\t\t$input.attr('placeholder', prompt);\n\t\t\t}\n\t\t\tif(required){\n\t\t\t\t$input.prop('required',true);\n\t\t\t}\n\t\t\t$label_for = $('<label></label>')\n\t\t\t$label_for.attr(\"for\",id);\n\t\t\t$label_for.text(name);\n\t\t\t$form.append($label_for);\n\t\t\t$form.append($input);\n\t\t}\n\t\tif (button_name) { \n\t\t\t$button = $('<button type=\"submit\"></button>');\n\t\t\t$button.attr(\"value\",button_name);\n\t\t\t$button.text(button_name);\n\t\t\t$form.append($button);\n\t\t\t$form.submit(handler);\n\t\t}\n\t}\n\treturn $form;\n}", "_create(props) {\n super._create(props);\n\n this.set({\n schema: {\n component: 'Form',\n fields: [\n {\n name: 'text',\n component: 'TextField',\n label: 'Text',\n multiline: true,\n docLevel: 'basic',\n help: 'Any markdown. See markdownguide.org'\n }\n ]\n }\n });\n }", "function formTemplate(data) {\n // the first variable relates the form field for question with the data in the object for\n // each question so that the questions can be inputed into that form field\n var qString = \"<form id='q1'><h4>\" + data.question + \"</h4><br>\";\n // this variable to access the question object's possibles array needed to answer each question\n var possibles = data.possibles;\n // $(possibles[i]).addClass(\"choices\");\n\n // a for loop to go through the possibles array for each question to add the values of each possibles\n // array and using qString, add them as radio buttons to the question to which they are\n // associated\n for (var i = 0; i < possibles.length; i++) {\n var possible = possibles[i];\n console.log(possible);\n qString =\n qString +\n \"<input type='radio' name='\" +\n data.id +\n \"' value=\" +\n i +\n \">\" +\n \" \" +\n possible +\n \"<br>\";\n }\n return qString + \"</form><br><br>\";\n }", "function generateAndSaveFormularTemplate() {\n rows = document.getElementById('form block').childElementCount;\n var parentNode = document.createElement('div');\n \n for (var i = 0; i < rows; i++) {\n var rowNode = document.createElement('div');\n\n var newLabel = document.createElement('label');\n newLabel.textContent = document.getElementById('inpt' + (i + 1)).value;\n if (document.getElementById('typeDrop ' + (i + 1) + \"\").value == \"Mandatory\") {\n newLabel.textContent += \"*\";\n }\n if (document.getElementById('typeDrop ' + (i + 1) + \"\").value == \"Numeric\") {\n newLabel.textContent += \"(numeric)\";\n }\n newLabel.className = \"leftMarginForm\";\n newLabel.id = \"lbl \" + (i + 1);\n rowNode.appendChild(newLabel);\n if (document.getElementById('inputType' + (i + 1)).value == \"Text Box\") {\n \n var newInput = document.createElement('input');\n newInput.type = \"text\";\n newInput.id = \"text\" + (i + 1);\n newInput.value = \" \";\n\n newInput.setAttribute('oninput', \"setTextValue(this.id);\")\n newInput.style.paddingRight = \"20%\";\n newInput.style.cssFloat = \"right\";\n newInput.style.marginRight = \"30%\";\n rowNode.appendChild(newInput);\n var line=document.createElement('hr');\n rowNode.appendChild(line);\n }\n\n\n var check1 = document.getElementById('countRadio' + (i + 1) + \" 1\");\n\n var check2 = document.getElementById('countRadio' + (i + 1) + \" 2\");\n\n var check3 = document.getElementById('countRadio' + (i + 1) + \" 3\");\n\n //checking if two radios are in store ,setting them and adding to parent node\n if (check1 && !check2 && !check3) {\n var radioBlock = document.createElement('div');\n\n radioBlock.style.display = \"block\";\n radioBlock.style.marginLeft = \"150px\";\n\n radioBlock.innerHTML = \"<form><input onclick=\\\"radioChangeState(this.id)\\\" name=\\\"option\\\" type=\\\"radio\\\" id=\\\"radio\" + (i + 1) + \" 1\\\" value=\\\"value\" + (i + 1) + \"\\\"> \" + check1.value + \"<br></form>\";\n rowNode.appendChild(radioBlock);\n rowNode.appendChild(document.createElement('hr'));\n\n }\n if (check1 && check2 && !check3) {\n var radioBlock = document.createElement('div');\n\n radioBlock.style.display = \"block\";\n radioBlock.style.marginLeft = \"150px\";\n\n radioBlock.innerHTML = \"<form><input onclick=\\\"radioChangeState(this.id)\\\" name=\\\"option\\\" type=\\\"radio\\\" id=\\\"radio\" + (i + 1) + \" 1\\\" value=\\\"value\" + (i + 1) + \"\\\"> \" + check1.value + \"<br><input onclick=\\\"radioChangeState(this.id)\\\" name=\\\"option\\\" type=\\\"radio\\\" id=\\\"radio\" + (i + 1) + \" 2\\\" value=\\\"value\" + (i + 2) + \"\\\"> \" + check2.value + \"<br></form>\";\n rowNode.appendChild(radioBlock);\n rowNode.appendChild(document.createElement('hr'));\n\n }\n //checking if all three radios are present in store,setting them and adding to parent node\n if (check1 && check2 && check3) {\n var radioBlock = document.createElement('div');\n\n radioBlock.style.display = \"block\";\n radioBlock.style.marginLeft = \"150px\";\n radioBlock.innerHTML = \"<form><input onclick=\\\"radioChangeState(this.id)\\\" name=\\\"option\\\" type=\\\"radio\\\" id=\\\"radio\" + (i + 1) + \" 1\\\" value=\\\"value\" + (i + 1) + \"\\\"> \" + check1.value + \"<br><input onclick=\\\"radioChangeState(this.id)\\\" name=\\\"option\\\" type=\\\"radio\\\" id=\\\"radio\" + (i + 1) + \" 2\\\" value=\\\"value\" + (i + 2) + \"\\\"> \" + check2.value + \"<br><input onclick=\\\"radioChangeState(this.id)\\\" name=\\\"option\\\" type=\\\"radio\\\" id=\\\"radio\" + (i + 1) + \" 3\\\" value=\\\"value\" + (i + 3) + \"\\\"> \" + check3.value + \"<br></form>\";\n rowNode.appendChild(radioBlock);\n rowNode.appendChild(document.createElement('hr'));\n }\n\n\n var check1 = document.getElementById('countCheck' + (i + 1) + \" 1\");\n\n var check2 = document.getElementById('countCheck' + (i + 1) + \" 2\");\n\n var check3 = document.getElementById('countCheck' + (i + 1) + \" 3\");\n //selection will be executed if only first checkbox is present in store\n if (check1 && !check2 && !check3) {\n var checkBlock = document.createElement('div');\n checkBlock.style.display = \"block\";\n checkBlock.style.marginLeft = \"150px\";\n checkBlock.innerHTML = \"<form><input onchange=\\\"checkBoxStateChanged(this.id)\\\" type=\\\"checkbox\\\" id=\\\"check\" + (i + 1) + \"1\\\">\" + check1.value + \"</form>\";\n rowNode.appendChild(checkBlock);\n rowNode.appendChild(document.createElement('hr'));\n }\n\n //selection will be executed if two checkboxes are present in store\n if (check1 && check2 && !check3) {\n var checkBlock = document.createElement('div');\n checkBlock.style.display = \"block\";\n checkBlock.style.marginLeft = \"150px\";\n checkBlock.innerHTML = \"<form><input onchange=\\\"checkBoxStateChanged(this.id)\\\" type=\\\"checkbox\\\" id=\\\"check\" + (i + 1) + \" 1\\\">\" + check1.value + \"<br><input checked=\\\"unchecked\\\" onchange=\\\"checkBoxStateChanged(this.id)\\\" type=\\\"checkbox\\\" id=\\\"check\" + (i + 1) + \" 2\\\">\" + check2.value + \"</form>\";\n rowNode.appendChild(checkBlock);\n rowNode.appendChild(document.createElement('hr'));\n }\n\n //selection will be executed if all three checkboxes are present\n if (check1 && check2 && check3) {\n var checkBlock = document.createElement('div');\n checkBlock.style.display = \"block\";\n checkBlock.style.marginLeft = \"150px\";\n checkBlock.innerHTML = \"<form><input onclick=\\\"checkBoxStateChanged(this.id)\\\" type=\\\"checkbox\\\" id=\\\"check\" + (i + 1) + \" 1\\\">\" + check1.value + \"<br><input onclick=\\\"checkBoxStateChanged(this.id)\\\" type=\\\"checkbox\\\" id=\\\"check\" + (i + 1) + \" 2\\\">\" + check2.value + \"<br><input onclick=\\\"checkBoxStateChanged(this.id)\\\" type=\\\"checkbox\\\" id=\\\"check\" + (i + 1) + \" 3\\\">\" + check3.value + \"</form>\";\n rowNode.appendChild(checkBlock);\n rowNode.appendChild(document.createElement('hr'));\n }\n parentNode.appendChild(rowNode);\n \n }\n //formular template will be aded in two object stores,first templates for admin panel and second as empty version for formular tab\n addFormularTemplateToDB(parentNode.innerHTML, document.getElementById('search').value);\n addToFormularData(parentNode.innerHTML, document.getElementById('search').value);\n //after save function will refresh formular list in formular tab\n updateFormularList();\n}", "function createEmptyForm(){\r\n\t\tvar newGiftForm=$('<form class=newGiftForm></form>')\r\n\t\tnewGiftForm.append($('<input type=\"text\" name=\"newGiftName\" placeholder=\"Nazwa prezentu\">'))\r\n\t\tnewGiftForm.append($('<p>Liczba punktów</p>'))\r\n\t\tnewGiftForm.append($('<span class=\"less\">-</span>'))\r\n\t\tnewGiftForm.append($('<input type=\"number\" name=\"newGiftPoints\" placeholder=\"Liczba punktów\">'))\r\n\t\tnewGiftForm.append($('<span class=\"more\">+</span>'))\r\n\r\n\t\r\n\t\treturn newGiftForm;\r\n\t}", "function setupForm() {\n Handlebars.registerHelper('if_eq', function(a, b, options) {\n if (a == b) {\n return options.fn(this);\n } else {\n return options.inverse(this);\n }\n });\n if (formData != '') {\n $('#form-name').val(formData.fields.name);\n $('#form-name')[0].parentElement.MaterialTextfield.checkValidity();\n $('#form-name')[0].parentElement.MaterialTextfield.checkDirty();\n $('#form-description').val(formData.fields.description);\n $('#form-description')[0].parentElement.MaterialTextfield.checkValidity();\n $('#form-description')[0].parentElement.MaterialTextfield.checkDirty();\n for (const widget of formData.fields.elements) {\n let type = widget.type;\n switch(widget.type) {\n case 'checkbox':\n type = 'multifield';\n break;\n case 'dropdown':\n type = 'multifield';\n break;\n case 'radio':\n type = 'multifield';\n break;\n case 'slider':\n type = 'scale';\n break;\n case 'stars':\n type = 'scale';\n break;\n }\n addWidget(type, widget);\n }\n }\n}", "createForm() {\n cy\n .get(this.locators.createButtonContainer)\n .find(this.locators.createButton)\n .click()\n\n return this;\n }", "function handleCreateUserForm(event){\n\tif (DEBUG) {\n\t\tconsole.log (\"Triggered handleCreateUserForm\")\n\t}\n\t//Call the API method to extract the template\n\t//$this is the href\n\tgetUsersForm($(this).attr(\"href\"))\n\treturn false;\n}", "function createFormCntrls() {\n return {\n name: createControl(\n {\n label: \"Name\",\n errorMessage: \"Name is a must field!\"\n },\n { required: true }\n ),\n yearsOfExperience: createControl(\n {\n label: \"My experience in years\",\n errorMessage: \"Experience is a must field!\"\n },\n { required: true }\n ),\n jobs: createControl(\n {\n label: \"Developer position that I'm looking for\",\n errorMessage: \"Position is a must field!\"\n },\n { required: true }\n ),\n location: createControl(\n {\n label: \"My location is\",\n errorMessage: \"Location is a must field!\"\n },\n { required: true }\n ),\n description: createControl(\n {\n label: \"Short description about myself\",\n errorMessage: \"Description is a must field!\"\n },\n { required: true }\n ),\n url: createControl(\n {\n label: \"Link to my LinkedIn profile\",\n errorMessage: \"Link is a must field!\"\n },\n { required: true }\n )\n \n };\n}", "function editOrder(){\n\t\t\t\t\t\t\tcontentTemplateEdit = $('.OrderWork')\n\t\t\t\t\t\t\tvar templateEditPoste = document.createElement('div')\n\t\t\t\t\t\t\ttemplateEditPoste.setAttribute('class', 'EditPoste')\n\t\t\t\t\t\t\tvar template = `<form action=\"\" class=\"EditPoste__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditPoste__containner--head\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3>EDITAR ORDEN DE TRABAJO</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditPoste__containner--body\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Servicio</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select name=\"type_service\" id=\"type_service\" class=\"selectBox__select\" disabled>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_servicio_P\" selected>Poste</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_servicio_C\">Cliente</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Detalle del Servicio</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select class=\"selectBox__select\" name=\"detail_service\" id=\"detail_service\" disabled>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_A\">Zona sin Alumbrado Público</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_CH\">Poste Chocado</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_CC\">Poste Caido por Corrosión</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_M\">Mantenimiento de Poste</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_I\">Instalacion de Poste</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"detalle_servicio_R\">Registro de Poste</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Usuario</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select class=\"selectBox__select\" required name=\"\" id=\"codigo_contratista\"></select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Supervisor</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select class=\"selectBox__select\" required name=\"\" id=\"codigo_supervisor\"></select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Prioridad</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"selectBox\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select class=\"selectBox__select\" name=\"priority\" id=\"priority\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option>Seleccione</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_urgencia_A\">Alta</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_urgencia_M\">Media</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"tipo_urgencia_B\">Baja</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Dirección</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input id=\"direccion\" type=\"text\" class=\"inputs-label\" value=\"${item.direccion}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"mapEdit\" style=\"width:100%;height:200px\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada X</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input id=\"coordenada_X\" class=\"inputs-label\" type=\"text\" disabled value=\"${item.coordenada_X}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada Y</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input id=\"coordenada_Y\" type=\"text\" disabled class=\"inputs-label\" value=\"${item.coordenada_Y}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left labelTextarea\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Descripción</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<textarea class=\"inputs-label\" name=\"\" id=\"descripcion\" cols=\"30\" rows=\"5\">${item.descripcion}</textarea>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Fecha de Visita Esperada</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"inputs-label\" id=\"date\" type=\"date\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Público</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right inputStatus\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right--true\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input name=\"public\" id=\"true\" value=\"true\" type=\"radio\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"true\">Si</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right--false\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input name=\"public\" id=\"false\" value=\"false\" type=\"radio\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"false\">No</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__left countPoste\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Cantidad de Postes</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__right\" id=\"postesContainner\">\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__btns\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__btns--cancel\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button id=\"closeEditOrder\">CANCELAR</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"Data__btns--send\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"submit\">GUARDAR</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</form>`\n\n\t\t\t\t\t\t\ttemplateEditPoste.innerHTML = template\n\t\t\t\t\t\t\tcontentTemplateEdit.append(templateEditPoste)\n\t\t\t\t\t\t\tconsole.log(item.coordenada_Y, item.coordenada_X)\n\t\t\t\t\t\t\tconsole.log(item.fecha_visita_esperada)\n\n\t // Validando reemplazo del inicio del path uploads\n\t\t\t\t\t\t\tvar OldDate = item.fecha_visita_esperada\n\t\t\t\t\t\t\tOldDate = OldDate.split('/')\n\t\t\t\t\t\t\tconsole.log(OldDate)\n\t\t\t\t\t\t\tvar day = OldDate[0]\n\t\t\t\t\t\t\tvar mounth = OldDate[1]\n\t\t\t\t\t\t\tvar year = OldDate[2]\n\n\t\t\t\t\t\t\tif (parseInt(mounth) < 10) {\n\t\t\t\t\t\t\t\tmounth = '0'+mounth\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (parseInt(day) < 10) {\n\t\t\t\t\t\t\t\tday = '0'+day\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar fechaDate = year+'-'+mounth+'-'+day\n\t\t\t\t\t\t\tconsole.log(typeof fechaDate, fechaDate)\n\t\t\t\t\t\t\t$('#date').val(fechaDate)\n\t\t\t\t\t\t // var day = (\"0\" + fecha_visita_esperada.getDate()).slice(-2);\n\t\t\t\t\t\t // var month = (\"0\" + (fecha_visita_esperada.getMonth() + 1)).slice(-2);\n\n\t\t\t\t\t\t // var today = fecha_visita_esperada.getFullYear()+\"-\"+(month)+\"-\"+(day);\n\t\t\t\t\t\t // console.log(today)\n\n\t\t\t\t\t\t // LISTA DE USUARIOS CONTRATISTAS\n\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t\t\t\turl:'/dashboard/usuarios/list/users-campo'\n\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\tconsole.log('XD123456')\n\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\tvar usersListContratista = res.data.usuarios\n\t\t\t\t\t\t\t\tfor (var i = 0; i < usersListContratista.length; i++) {\n\t\t\t\t\t\t\t\t\tvar content = $('#codigo_contratista')\n\t\t\t\t\t\t\t\t\tvar user = document.createElement('option')\n\t\t\t\t\t\t\t\t\tuser.setAttribute('value', usersListContratista[i]._id)\n\t\t\t\t\t\t\t\t\tuser.innerHTML = usersListContratista[i].full_name\n\t\t\t\t\t\t\t\t\tcontent.append(user)\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// SELECCION AUTOMATICA CON VALORES YA EXISTENTES DE DATA usuario\n\t\t\t\t\t\t\t\tfor (var i = 0; i < $('#codigo_contratista option').length; i++) {\n\t\t\t\t\t\t\t\t\tvar option = $('#codigo_contratista option')[i]\n\t\t\t\t\t\t\t\t\tif ($(option)[0].value === item.codigo_contratista) {\n\t\t\t\t\t\t\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t// LISTA DE USUARIOS SUPERVISORES\n\n\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t\t\t\turl: '/dashboard/usuarios/list/officers'\n\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\tvar usersListSupervisor = res.data.usuarios\n\t\t\t\t\t\t\t\tfor (var i = 0; i < usersListSupervisor.length; i++) {\n\t\t\t\t\t\t\t\t\tconsole.log('XD')\n\t\t\t\t\t\t\t\t\tvar content = $('#codigo_supervisor')\n\t\t\t\t\t\t\t\t\tvar user = document.createElement('option')\n\t\t\t\t\t\t\t\t\tuser.setAttribute('value', usersListSupervisor[i]._id)\n\t\t\t\t\t\t\t\t\tuser.innerHTML = usersListSupervisor[i].full_name\n\t\t\t\t\t\t\t\t\tcontent.append(user)\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tfor (var i = 0; i < $('#codigo_supervisor option').length; i++) {\n\t\t\t\t\t\t\t\t\tvar option = $('#codigo_supervisor option')[i]\n\t\t\t\t\t\t\t\t\tif ($(option)[0].value === item.codigo_supervisor) {\n\t\t\t\t\t\t\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t// contentPostesContainner.on('click', postesItem)\n\t\t\t\t\t\t\tvar mapEdit = new GMaps({\n\t\t\t\t\t\t\t div: '#mapEdit',\n\t\t\t\t\t\t\t lat: item.coordenada_X,\n\t\t\t\t\t\t\t lng: item.coordenada_Y\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t// mapEdit.markers\n\t\t\t\t\t\t\tmapEdit.addMarker({\n\t\t\t\t\t\t\t lat: item.coordenada_X,\n\t\t\t\t\t\t\t lng: item.coordenada_Y,\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tvar contentBoxItem = $('#postesContainner')\n\n\t\t\t\t\t\t\tconsole.log(contentBoxItem)\n\t\t\t\t\t\t\tif (item.detalle_servicio === 'detalle_servicio_R') {\n\t\t\t\t\t\t\t\tvar templatebox = `<div class=\"itemContainner\" id=\"itemContainner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"contentItems\" >\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"BtnNewElement\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"BtnNewElement__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"addNewElement\"><span class=\"icon-icon_agregar_poste\"></span></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t\t\tcontentBoxItem.html(templatebox)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvar templatebox = `<div class=\"searchItem\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"searchItem__btnSearch\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"searchItem__btnSearch--input\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"inputs-label\" id=\"codigoPoste\" type=\"text\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"searchItem__btnSearch--btn\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"AddOrderCodigo\"><span>+</span> Agregar Poste</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"contentItems\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t\t\tcontentBoxItem.html(templatebox)\n\t\t\t\t\t\t\t\t$('#AddOrderCodigo').on('click', addNewElementOrder)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// AGREGADO DE NUEVOS POSTES A LA LISTA DE ELEMENTOS\n\t\t\t\t\t\t\tfunction addNewElementOrder(){\n\t\t\t\t\t\t\t\tvar codigo_poste = $('#codigoPoste')\n\t\t\t\t\t\t\t\tif (codigo_poste.val() !== '') {\n\t\t\t\t\t\t\t\t\tconsole.log('XD')\n\t\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\t\tcode_service: codigo_poste.val()\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// SE OBTIENE DATOS LOS DATOS DEL SERVICIO BUSCADO\n\t\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/poste',\n\t\t\t\t\t\t\t\t\t\tdata: data,\n\t\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\t\tconsole.log(res)\n\n\t\t\t\t\t\t\t\t\t\tvar elementNew = res.data.poste\n\t\t\t\t\t\t\t\t\t\tvar box_Content = $('#contentItems')\n\t\t\t\t\t\t\t\t\t\tvar newDiv = document.createElement('div')\n\t\t\t\t\t\t\t\t\t\tnewDiv.setAttribute('class', 'EditItem')\n\t\t\t\t\t\t\t\t\t\tnewDiv.setAttribute('data-content', res.data.poste._id)\n\t\t\t\t\t\t\t\t\t\tvar template = `<div class=\"EditItem__image\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ItemPhoto\" style=\"background-image:url(${res.data.poste.imagen_poste[0].path})\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"titleHead\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"codigo_poste\">${res.data.poste.codigo_poste}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__text\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_poste\"><strong>${res.data.poste.type_poste}</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"type_material\">${res.data.poste.type_material}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__delete\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"DeletePoste\" data-id=\"${res.data.poste._id}\">x</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t\t\t\t\tnewDiv.innerHTML = template\n\t\t\t\t\t\t\t\t\t\tbox_Content.append(newDiv)\n\t\t\t\t\t\t\t\t\t\t$('.DeletePoste').on('click', deletePoste)\n\n\t\t\t\t\t\t\t\t\t\t// CREACION DE NUEVO POSTE\n\t\t\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+item._id+'/add-item/poste'\n\t\t\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\t\t\t\tcodigo_poste:elementNew.codigo_poste,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_poste:elementNew.type_poste,\n\t\t\t\t\t\t\t\t\t\t\t\taltura_poste:elementNew.altura_poste,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_material:elementNew.type_material,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_pastoral:elementNew.type_pastoral,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_luminaria:elementNew.Luminaria,\n\t\t\t\t\t\t\t\t\t\t\t\ttype_lampara:elementNew.type_lampara,\n\t\t\t\t\t\t\t\t\t\t\t\tcoordenada_X:elementNew.coordenada_X,\n\t\t\t\t\t\t\t\t\t\t\t\tcoordenada_Y:elementNew.coordenada_Y,\n\t\t\t\t\t\t\t\t\t\t\t\tobservaciones:elementNew.observaciones,\n\t\t\t\t\t\t\t\t\t\t\t\testado_poste:elementNew.estado_poste,\n\t\t\t\t\t\t\t\t\t\t\t\testado_pastoral:elementNew.estado_pastoral,\n\t\t\t\t\t\t\t\t\t\t\t\testado_luminaria:elementNew.estado_luminaria,\n\t\t\t\t\t\t\t\t\t\t\t\testado_lampara:elementNew.estado_lampara,\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// EDICION DE POSTE NUEVO CREADO RECIENTEMENTE\n\t\t\t\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+item._id+'/item/poste/'+res.data.service._id+'?_method=put',\n\t\t\t\t\t\t\t\t\t\t\t\tdata: data\n\t\t\t\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t\t\t\t})\t\t\n\n\t\t\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tconsole.log('ingrese codigo de poste')\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// OBTENCION DE DATOS DE CADA ELEMENTO DE LA ORDEN\n\t\t\t\t\t\t\tconsole.log(item)\n\t\t\t\t\t\t\tfor (var e = 0; e < item.elementos.length; e++) {\n\t\t\t\t\t\t\t\tvar element = item.elementos[e]\n\t\t\t\t\t\t\t\tvar it = e\n\n\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\tmethod:'POST',\n\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+item._id+'/read/'+element.type+'/'+element._id\n\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\tconsole.log(res)\n\n\t\t\t\t\t\t\t\t\tvar contentElement = document.createElement('div')\n\t\t\t\t\t\t\t\t\tcontentElement.setAttribute('class', 'EditItem')\n\t\t\t\t\t\t\t\t\tcontentElement.setAttribute('data-content', res.data.service._id)\n\t\t\t\t\t\t\t\t\tconsole.log(item.detalle_servicio)\n\n\t\t\t\t\t\t\t\t\tif (item.detalle_servicio === 'detalle_servicio_R') {\n\n\t\t\t\t\t\t\t\t\t\tvar template = `<div class=\"EditItem__image\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ItemPhoto\" style=\"background-image:url(${res.data.service.imagen_poste[0].path})\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"titleHead\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"codigo_poste\">${res.data.service.codigo_poste}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__text\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"type_poste\"><strong>${res.data.service.type_poste}</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"type_material\">${res.data.service.type_material}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__edit\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"EditarPoste\" data-id=\"${res.data.service._id}\">EDITAR</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__delete\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"DeletePoste\" data-id=\"${res.data.service._id}\">x</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\n\t\t\t\t\t\t\t\t\t\t// $('#ElementsContainner').html(template)\n\t\t\t\t\t\t\t\t\t\tcontentElement.innerHTML = template\n\t\t\t\t\t\t\t\t\t\t$('#contentItems').append(contentElement)\n\t\t\t\t\t\t\t\t\t\t// contentPostesContainner.append(contentElement)\n\t\t\t\t\t\t\t\t\t\t$('.EditarPoste').on('click', editOrdenItem)\n\t\t\t\t\t\t\t\t\t\t// $('#addNewElement').on('click', addNewElementEdited)\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tvar template = `<div class=\"EditItem__image\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ItemPhoto\" style=\"background-image:url(${res.data.service.imagen_poste[0].path})\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"titleHead\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p id=\"codigo_poste\">${res.data.service.codigo_poste}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__text\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"type_poste\"><strong>${res.data.service.type_poste}</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"type_material\">${res.data.service.type_material}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"EditItem__delete\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"DeletePoste\" data-id=\"${res.data.service._id}\">x</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t\t\t\t\tcontentElement.innerHTML = template\n\t\t\t\t\t\t\t\t\t\t$('#contentItems').append(contentElement)\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// console.log(it, $('.EditItem').length-1)\n\n\t\t\t\t\t\t\t\t\tif (e === $('.EditItem').length) {\n\t\t\t\t\t\t\t\t\t\t// console.log(i+2, $('.EditItem').length)\n\t\t\t\t\t\t\t\t\t\t// console.log('XD')\n\t\t\t\t\t\t\t\t\t\t// var items = $('.editOrdenItem')\n\t\t\t\t\t\t\t\t\t\t// items.on('click', editOrdenItem)\n\t\t\t\t\t\t\t\t\t\t$('.DeletePoste').on('click', deletePoste)\n\t\t\t\t\t\t\t\t\t\t// console.log($('.EditItem').length)\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// ELIMINACION DE POSTES\n\t\t\t\t\t\t\tfunction deletePoste(){\n\t\t\t\t\t\t\t\tconsole.log(this.getAttribute('data-id'))\n\t\t\t\t\t\t\t\tvar id = this.getAttribute('data-id')\n\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+item._id+'/delete/poste/'+id+'?_method=delete'\n\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\t$('[data-content=\"'+id+'\"]').remove()\n\t\t\t\t\t\t\t\t\t$('[data-id=\"'+id+'\"]').remove()\n\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// EDICION DE ITEM DE ORDEN DE TRABAJO\n\t\t\t\t\t\t\tfunction editOrdenItem(){\n\t\t\t\t\t\t\t\tvar idPoste = this.getAttribute('data-id')\n\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+item._id+'/read/poste/'+idPoste\n\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\tvar item = res.data.service\n\t\t\t\t\t\t\t\t\tvar contentTemplateEditPoste = document.createElement('div')\n\t\t\t\t\t\t\t\t\tcontentTemplateEditPoste.setAttribute('class', 'editPosteModal')\n\t\t\t\t\t\t\t\t\tvar template = `<form action=\"\" id=\"sendEditPoste\" class=\"editPoste\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3>EDITAR REGISTRO DE POSTE</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--content\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Caracteristicas</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Código Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"txt_codigo_poste\" value=\"${item.codigo_poste}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Altura de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"altura_poste\" value=\"${item.altura_poste}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"txt_type_poste\" value=\"${item.type_poste}\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Material</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"txt_type_material\" value=\"${item.type_material}\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de pastoral</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_pastoral\" value=\"${item.type_pastoral}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Luminaria</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_luminaria\" value=\"${item.type_luminaria}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Tipo de Lampará</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"characteristic__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"type_lampara\" value=\"${item.type_lampara}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Ubicación</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication_item--map\" id=\"mapsEdit\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada X</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"coordenada_X\" value=\"${item.coordenada_X}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Coordenada Y</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ubication__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"coordenada_Y\" value=\"${item.coordenada_Y}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>Estado</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Poste</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_poste\" value=\"${item.estado_poste}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Pastoral</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_pastoral\" value=\"${item.estado_pastoral}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Luminaria</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_luminaria\" value=\"${item.estado_luminaria}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p><strong>Estado de Lampará</strong></p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"estado__item--right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"inputs-label\" id=\"estado_lampara\" value=\"${item.estado_lampara}\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"editPoste__containner--buttons\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteCancel\">CANCELAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"btn\"><button id=\"editPosteSave\" type=\"submit\">GUARDAR</button></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</form>`\n\n\t\t\t\t\t\t\t\t\tcontentTemplateEditPoste.innerHTML = template\n\t\t\t\t\t\t\t\t\t$('.OrderWork').append(contentTemplateEditPoste)\n\n\t\t\t\t\t\t\t\t\tvar url = GMaps.staticMapURL({\n\t\t\t\t\t\t\t\t\t size: [800, 400],\n\t\t\t\t\t\t\t\t\t lat: item.coordenada_X,\n\t\t\t\t\t\t\t\t\t lng: item.coordenada_Y,\n\t\t\t\t\t\t\t\t\t markers: [\n\t\t\t\t\t\t\t\t\t {lat: item.coordenada_X, lng: item.coordenada_Y}\n\t\t\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t$('#mapsEdit').css('background-image', 'url('+url+')')\n\n\t\t\t\t\t\t\t\t\tvar btnCloseEditPoste = $('#editPosteCancel')\n\t\t\t\t\t\t\t\t\tbtnCloseEditPoste.on('click', closeEditPoste)\n\n\t\t\t\t\t\t\t\t\tfunction closeEditPoste(ev){\n\t\t\t\t\t\t\t\t\t\tev.preventDefault()\n\t\t\t\t\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$('#sendEditPoste').submit(function(ev){\n\t\t\t\t\t\t\t\t\t\tev.preventDefault()\n\n\t\t\t\t\t\t\t\t\t\tvar codigo_poste = $('#txt_codigo_poste')\n\t\t\t\t\t\t\t\t\t\tvar type_poste = $('#txt_type_poste')\n\t\t\t\t\t\t\t\t\t\tvar altura_poste = $('#altura_poste')\n\t\t\t\t\t\t\t\t\t\tvar type_material = $('#txt_type_material')\n\t\t\t\t\t\t\t\t\t\tvar type_pastoral = $('#type_pastoral')\n\t\t\t\t\t\t\t\t\t\tvar type_luminaria = $('#type_luminaria')\n\t\t\t\t\t\t\t\t\t\tvar type_lampara = $('#type_lampara')\n\t\t\t\t\t\t\t\t\t\tvar coordenada_X = $('#coordenada_X')\n\t\t\t\t\t\t\t\t\t\tvar coordenada_Y = $('#coordenada_Y')\n\t\t\t\t\t\t\t\t\t\t// var observaciones = $('#observaciones')\n\t\t\t\t\t\t\t\t\t\tvar estado_poste = $('#estado_poste')\n\t\t\t\t\t\t\t\t\t\tvar estado_pastoral = $('#estado_pastoral')\n\t\t\t\t\t\t\t\t\t\tvar estado_luminaria = $('#estado_luminaria')\n\t\t\t\t\t\t\t\t\t\tvar estado_lampara = $('#estado_lampara')\n\n\t\t\t\t\t\t\t\t\t\tconsole.log(altura_poste);\n\n\t\t\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\t\t\tcodigo_poste: codigo_poste.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_poste: type_poste.val(),\n\t\t\t\t\t\t\t\t\t\t\taltura_poste: altura_poste.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_material: type_material.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_pastoral: type_pastoral.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_luminaria: type_luminaria.val(),\n\t\t\t\t\t\t\t\t\t\t\ttype_lampara: type_lampara.val(),\n\t\t\t\t\t\t\t\t\t\t\tcoordenada_X: coordenada_X.val(),\n\t\t\t\t\t\t\t\t\t\t\tcoordenada_Y: coordenada_Y.val(),\n\t\t\t\t\t\t\t\t\t\t\t// observaciones:\n\t\t\t\t\t\t\t\t\t\t\testado_poste: estado_poste.val(),\n\t\t\t\t\t\t\t\t\t\t\testado_pastoral: estado_pastoral.val(),\n\t\t\t\t\t\t\t\t\t\t\testado_luminaria: estado_luminaria.val(),\n\t\t\t\t\t\t\t\t\t\t\testado_lampara: estado_lampara.val()\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tconsole.log(data)\n\n\t\t\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\t\t\turl: '/dashboard/ordenes_trabajo/'+res.data.work_order_id+'/item/poste/'+res.data.service._id+'?_method=put',\n\t\t\t\t\t\t\t\t\t\t\tdata: data\n\t\t\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\t\t\tconsole.log($('[data-content=\"'+res.data.service._id+'\"] .codigo_poste'))\n\t\t\t\t\t\t\t\t\t\t\t$('[data-content=\"'+res.data.service._id+'\"] .codigo_poste').html(res.data.service.codigo_poste)\n\t\t\t\t\t\t\t\t\t\t\t$('[data-content=\"'+res.data.service._id+'\"] .type_material').html(res.data.service.type_material)\n\t\t\t\t\t\t\t\t\t\t\t$('[data-content=\"'+res.data.service._id+'\"] .type_poste').html(res.data.service.type_poste)\n\t\t\t\t\t\t\t\t\t\t\t// location.reload()\n\t\t\t\t\t\t\t\t\t\t\t$('.editPosteModal').remove()\n\t\t\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconsole.log($('#type_service'))\n\t\t\t\t\t\t\tvar option = $('#detail_service option')\n\t\t\t\t\t\t\t// console.log(option)\n\n\t\t\t\t\t\t\t// SELECCION AUTOMATICA CON VALORES YA EXISTENTES DE DATA detalle de servicio\n\t\t\t\t\t\t\tvar order_type_service\n\t\t\t\t\t\t\tif (item.detalle_servicio === 'Zona sin Alumbrado Público') {\n\t\t\t\t\t\t\t\titem.detalle_servicio = 'detalle_servicio_A'\n\t\t\t\t\t\t\t} else if (item.detalle_servicio === 'Poste Chocado') {\n\t\t\t\t\t\t\t\titem.detalle_servicio = 'detalle_servicio_CH'\n\t\t\t\t\t\t\t} else if (item.detalle_servicio === 'Poste Caido por Corrosión') {\n\t\t\t\t\t\t\t\titem.detalle_servicio = 'detalle_servicio_CC'\n\t\t\t\t\t\t\t} else if (item.detalle_servicio === 'Mantenimiento de Poste') {\n\t\t\t\t\t\t\t\titem.detalle_servicio = 'detalle_servicio_M'\n\t\t\t\t\t\t\t} else if (item.detalle_servicio === 'Instalacion de Poste') {\n\t\t\t\t\t\t\t\titem.detalle_servicio = 'detalle_servicio_I'\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\titem.detalle_servicio = 'detalle_servicio_R'\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfor (var i = 0; i < $('#detail_service option').length; i++) {\n\t\t\t\t\t\t\t\tvar option = $('#detail_service option')[i]\n\t\t\t\t\t\t\t\tconsole.log('Esto es un form :D', item.detalle_servicio, option.value)\n\t\t\t\t\t\t\t\tif (option.value === item.detalle_servicio) {\n\t\t\t\t\t\t\t\t\tconsole.log('los datos estan aqui!',option.value, item.detalle_servicio)\n\t\t\t\t\t\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// SELECCION AUTOMATICA CON VALORES YA EXISTENTES DE DATA prioridad\n\t\t\t\t\t\t\tfor (var i = 0; i < $('#priority option').length; i++) {\n\t\t\t\t\t\t\t\tvar option = $('#priority option')[i]\n\t\t\t\t\t\t\t\tif ($(option)[0].value === item.tipo_urgencia) {\n\t\t\t\t\t\t\t\t\toption.setAttribute('selected', 'selected')\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// // SELECCION AUTOMATICA CON VALORES YA EXISTENTES DE DATA usuario\n\t\t\t\t\t\t\t// for (var i = 0; i < $('#codigo_contratista option').length; i++) {\n\t\t\t\t\t\t\t// \tvar option = $('#codigo_contratista option')[i]\n\t\t\t\t\t\t\t// \tif ($(option)[0].value === item.codigo_contratista) {\n\t\t\t\t\t\t\t// \t\toption.setAttribute('selected', 'selected')\n\t\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// for (var i = 0; i < $('#codigo_supervisor option').length; i++) {\n\t\t\t\t\t\t\t// \tvar option = $('#codigo_supervisor option')[i]\n\t\t\t\t\t\t\t// \tif ($(option)[0].value === item.codigo_supervisor) {\n\t\t\t\t\t\t\t// \t\toption.setAttribute('selected', 'selected')\n\t\t\t\t\t\t\t// \t}\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// $('#date').val(item.fecha_visita_esperada)\n\n\t\t\t\t\t\t\tif (item.public === true) {\n\t\t\t\t\t\t\t\tdocument.getElementById('true').checked = true\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdocument.getElementById('false').checked = true\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar sendEditOrder = $('.EditPoste__containner')\n\n\t\t\t\t\t\t\tsendEditOrder.submit(function(ev){\n\t\t\t\t\t\t\t\tvar cod_contr = $('#codigo_contratista')\n\t\t\t\t\t\t\t\tvar cod_super = $('#codigo_supervisor')\n\t\t\t\t\t\t\t\tvar urgency = $('#priority')\n\t\t\t\t\t\t\t\tvar direccion = $('#direccion')\n\t\t\t\t\t\t\t\tvar descripcion = $('#descripcion')\n\t\t\t\t\t\t\t\tvar fecha_visita_esperada = $('#date')\n\t\t\t\t\t\t\t\tvar public = $(\"[name='public']:checked\")\n\n\t\t\t\t\t\t\t\tev.preventDefault()\n\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\tcodigo_supervisor: cod_contr.val(),\n\t\t\t\t\t\t\t\t\tcodigo_contratista: cod_super.val(),\n\t\t\t\t\t\t\t\t\ttipo_urgencia: urgency.val(),\n\t\t\t\t\t\t\t\t\tdireccion: direccion.val(),\n\t\t\t\t\t\t\t\t\tdescripcion: descripcion.val(),\n\t\t\t\t\t\t\t\t\tfecha_visita_esperada: fecha_visita_esperada.val(),\n\t\t\t\t\t\t\t\t\tpublic:public.val()\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tconsole.log(data)\n\n\t\t\t\t\t\t\t\t$http({\n\t\t\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\t\t\turl:'/dashboard/ordenes_trabajo/'+order+'?_method=put',\n\t\t\t\t\t\t\t\t\tdata: data\n\t\t\t\t\t\t\t\t}).then(function(res){\n\t\t\t\t\t\t\t\t\tconsole.log(res)\n\t\t\t\t\t\t\t\t\tlocation.reload()\n\t\t\t\t\t\t\t\t}, function(err){\n\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t$('#closeEditOrder').on('click', function(ev){\n\t\t\t\t\t\t\t\tev.preventDefault()\n\t\t\t\t\t\t\t\t$('.EditPoste').remove()\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}", "function buildListTitleForm() {\n\tvar node = document.createElement('form')\n\tnode.innerHTML =\n\t\t'<div class=\"newitem-title-wrapper\">' +\n\t\t'<input id=\"trello-list-title-input\" type=\"text\">' +\n\t\t'<input id=\"trello-list-title-submit\" type=\"submit\" value=\"Save\">' +\n\t\t'</div>'\n\tnode.style.display = 'none'\n\treturn node\n}", "new(req, res, next) {\n res.render('post_form');\n }", "function createDoctype() {\n const selectedOption = getSelectedOption();\n createListItem(selectedOption.textContent);\n hide(doctypeSelector);\n createAddButton();\n createCancelButton();\n createAgeSelector(selectedOption);\n createTitleInput();\n}", "function createform(){\n let spanp = document.createElement(\"span\");\n\n let form = document.createElement(\"div\");\n form.className = \"newpost\";\n form.style = \"margin: 0px; border: none; padding: 0px;\";\n\n let input = document.createElement(\"input\");\n input.type = \"hidden\";\n /*input.name = \"csrfmiddlewaretoken\";\n input.value = csrf;*/\n form.appendChild(input);\n\n let textarea = document.createElement(\"textarea\");\n textarea.maxLength = 280;\n form.appendChild(textarea);\n\n let br = document.createElement(\"br\");\n form.appendChild(br);\n spanp.appendChild(form);\n\n let button = document.createElement(\"button\");\n button.className = \"btn btn-primary\";\n button.innerHTML = \"Save\";\n button.style.marginRight = \"7px\";\n button.setAttribute(\"onclick\", \"save(this)\");\n spanp.appendChild(button);\n\n\n button = document.createElement(\"button\");\n button.className = \"btn btn-primary\";\n button.setAttribute(\"onclick\", \"cancel(this)\");\n button.innerHTML = \"Cancel\";\n button.style.display = \"inline-block\";\n spanp.appendChild(button);\n\n let span = document.createElement(\"span\");\n spanp.appendChild(span);\n\n return spanp;\n}", "showCreateForm(data) {\n this.clearNewOrgan(data);\n this.changeFormMode(this.FORM_MODES.CREATE);\n }", "function formcreation() {\n\n var createLabel = document.createElement('label');\n createLabel.setAttribute('for', 'Email');\n let form = document.getElementById('form');\n createLabel.classList.add(\"nicely-spaced\");\n createLabel.innerHTML = 'Email: ';\n form.appendChild(createLabel);\n var input1 = document.createElement('input');\n input1.classList.add(\"nicely-spaced\");\n input1.type = 'text';\n\n input1.name = 'Email';\n input1.id = 'Email';\n form.appendChild(input1);\n\n\n\n var createLabel2 = document.createElement('label');\n createLabel2.classList.add(\"nicely-spaced\");\n createLabel2.setAttribute('for', ' Name');\n createLabel2.innerHTML = ' Name: ';\n\n form.appendChild(createLabel2);\n\n var input2 = document.createElement('input');\n input2.classList.add(\"nicely-spaced\");\n input2.type = 'text';\n\n input2.name = ' Name';\n input2.id = 'Fname';\n form.appendChild(input2);\n\n \n\n var createLabel4 = document.createElement('label');\n createLabel4.classList.add(\"nicely-spaced\");\n createLabel4.innerHTML = \"City: \";\n form.appendChild(createLabel4);\n\n var input9 = document.createElement('input');\n input9.classList.add(\"nicely-spaced\");\n input9.type = 'text';\n input9.id = \"cities\";\n input9.setAttribute('list' , 'City');\n \n\n createLabel4.appendChild(input9);\n\n var datalist = document.createElement('datalist');\n datalist.id = 'City';\n datalist.name = \"checking\";\n\n createLabel4.appendChild(datalist);\n \n var option1 = document.createElement('option');\n option1.value = \"Toronto\";\n \n\n datalist.appendChild(option1);\n\n var option2 = document.createElement('option');\n option2.value = \"Brampton\";\n\n\n datalist.appendChild(option2);\n\n var option3 = document.createElement('option');\n option3.value = \"Mississauga\";\n\n\ndatalist.appendChild(option3);\n\nvar option4 = document.createElement('option');\n option4.value = \"Hamilton\";\n\n\ndatalist.appendChild(option4);\n\n\n\n var postal = document.createElement('label');\npostal.classList.add(\"nicely-spaced\");\n postal.innerHTML = \" Postal Code: \";\n\n form.appendChild(postal);\n\n var postalcode = document.createElement(\"input\");\n postalcode.classList.add(\"nicely-spaced\");\n postalcode.type = 'text';\npostalcode.id = \"pcode\";\npostalcode.name =\" Postalcode\";\n\nform.appendChild(postalcode);\n\nvar postalbr = document.createElement('br');\n\nform.appendChild(postalbr);\n\n var input4 = document.createElement('input');\n input4.type = 'radio';\n input4.name = 'radios';\n input4.id = 'Question';\n input4.value = \" customer question\";\n\n let radioLabel = document.createElement('label');\n radioLabel.setAttribute('for', 'Question');\n radioLabel.innerHTML = 'Question: ';\n form.appendChild(radioLabel);\n form.appendChild(input4);\n\n var input5 = document.createElement('input');\n input5.type = 'radio';\n input5.name = \"radios\";\n input5.id = 'Comment';\ninput5.value = 'user comment';\n\n let radioLabel1 = document.createElement('label');\n radioLabel1.setAttribute('for', 'comment');\n radioLabel1.innerHTML = ' Comment ';\n form.appendChild(radioLabel1);\n form.appendChild(input5);\n\n var radiobr = document.createElement(\"br\");\n\n form.appendChild(radiobr);\n\n\n var input10 = document.createElement('input');\n input10.type = 'radio';\n input10.name = 'radios';\n input10.id = 'Order';\n input10.value = 'Customer orders';\n\n let radioLabel2 = document.createElement('label');\n radioLabel2.setAttribute('for', 'Order');\n radioLabel2.innerHTML = ' Order Problem ';\n form.appendChild(radioLabel2);\n form.appendChild(input10);\n\n var br6 = document.createElement('br');\n form.appendChild(br6);\n\n var ordernum = document.createElement('label');\n ordernum.innerHTML = \" Order Number: \";\n ordernum.style.display = \"none\";\n ordernum.id = \"Olabel\";\n form.appendChild(ordernum);\n\n var ordernuminp = document.createElement(\"input\");\n ordernuminp.type = 'text';\nordernuminp.id = \"ordernum\";\nordernuminp.name =\" ordernum\";\nordernuminp.style.display = \"none\";\nform.appendChild(ordernuminp);\n\nvar orderbr = document.createElement('br');\n\nform.appendChild(orderbr);\n\n\n var input6 = document.createElement('textarea');\n input6.rows = '4';\n input6.cols = '30';\n input6.name = 'usrcomment';\n input6.form = 'userform';\n input6.placeholder = 'Enter text here...';\n input6.id = \"text\";\n\n form.appendChild(input6);\n\n var br7 = document.createElement('br');\n form.appendChild(br7);\n\n\n var hiddeninput = document.createElement('input');\n hiddeninput.type = \"hidden\";\n hiddeninput.name = \"name: \";\n hiddeninput.value = \"Marmik\";\nhiddeninput.id = \"hiddeninp\";\n form.appendChild(hiddeninput);\n\n var input7 = document.createElement('input');\n input7.type = 'submit';\n \n form.appendChild(input7);\n\n\n}", "function createForm() {\n // clear buttons for new list \n $(\"#buttons\").empty();\n var formEl = document.createElement(\"form\");\n formEl.setAttribute(\"class\", \"form-group row\");\n formEl.setAttribute(\"id\", \"form\");\n \n // creates and appends label element \n var labelEl = document.createElement(\"label\");\n labelEl.setAttribute(\"for\", \"staticEmail\");\n labelEl.setAttribute(\"class\", \"col-sm-4 col-form-label\");\n labelEl.textContent = \"Enter initials:\";\n formEl.appendChild(labelEl);\n\n // creates a div for bootstrap container purposes \n var divInput = document.createElement(\"div\");\n divInput.setAttribute(\"class\", \"col-sm-5\");\n formEl.appendChild(divInput);\n\n // creates and appends the input element for the form \n var inputEl = document.createElement(\"input\");\n inputEl.setAttribute(\"type\", \"text\");\n inputEl.setAttribute(\"class\", \"form-control\");\n inputEl.setAttribute(\"id\", \"inputText\");\n divInput.appendChild(inputEl);\n formEl.appendChild(divInput);\n\n // creates and appends the submit button \n var btnDiv = document.createElement(\"button\");\n btnDiv.setAttribute(\"type\", \"submit\");\n btnDiv.setAttribute(\"class\", \"btn btn-primary mb-2\");\n btnDiv.setAttribute(\"id\", \"submitButton\");\n \n btnDiv.textContent = \"Submit\";\n\n formEl.appendChild(btnDiv);\n\n secondRow.appendChild(formEl);\n \n}", "create(context) {\r\n extend(context).then(function () {\r\n this.partial('../templates/cause/create.hbs')\r\n })\r\n }", "function formTemplate(data) {\n // the first variable relates the form field for question with the data in the object for\n // each question so that the questions can be inputed into that form field\n var qString = \"<form id='questionOne'>\"+ data.question + \"<br>\" ;\n // this variable to access the question object's possibles array needed to answer each question\n var possibles = data.possibles;\n // a for loop to go through the possibles array for each question to add the values of each possibles\n // array and using qString, add them as radio buttons to the question to which they are\n // associated\n for (var i = 0; i < possibles.length; i++) {\n var possible = possibles[i];\n console.log(possible);\n qString = qString + \"<input type='radio' name=\"+data.id+\" value=\"+ i +\">\"+possible;\n \n }\n return qString + \"</form> <br>\";\n }", "function createForm(adata, resource, method) {\n\t\tvar formTitle = formatTitle( getCurrentHash() );\n\t\tlet html = `<h3>${ formTitle } - ${ method }</h3>`;\n\t\tconst fhref = apiU + getCurrentHash();\n\t\t\n\t\t\n html += `\n <p>Please note that all fields marked with an asterisk (*) are required.</p>\n <form\n class=\"resource-form\"\n data-href=\"${resource + '/'}\"\n data-method=\"${escapeAttr(method)}\">\n `;\n\t\t\n //adata = JSON.parse(adata);\n\n for (key in adata.data) {\n\t\t\t\n\t\t\tconst properties = adata.data[key];\n\t\t\tconst name = properties.name;\n\t\t\t\n const title = formatTitle(properties.name);\n\t\t\tconst isInteger = false;\n const isRequired = properties.required;\n\n html += `\n <label>\n ${escapeHtml(title)}\n ${isRequired ? '*' : ''}\n <br>\n <input\n class=\"u-full-width\"\n name=\"${name}\"\n type=\"${isInteger ? 'number' : 'text'}\"\n placeholder=\"${escapeAttr(properties.prompt)}\"\n ${isRequired ? 'required' : ''}>\n </label>\n `;\n }\n\n html += '<br><input class=\"btn waves-effect waves-light\" type=\"submit\" value=\"Submit\">';\n html += '</form>';\n return html;\n }", "function repoForm() {\n return {id:'repo-form',title:'Add your module or theme ...',type:'form',method:'POST',action:'',tabs:false,\n fields:[\n {label:'Name',name:'repo[name]',type:'text',description:'Enter the name of your module or theme (no spaces or invalid chars).'},\n {label:'Type',name:'repo[type]',type:'select',options:[{label:\"Module\",value:\"module\"},{label:\"Theme\",value:\"theme\"},{label:\"Profile\",value:\"profile\"}],description:'What is it?'},\n {label:'Description',name:'repo[description]',type:'textarea',description:'Provide a description so others understand what youre trying to do.'},\n {label:'Author',name:'repo[author]',type:'text',description:'Enter your name.',readonly:false}\n ],\n buttons:[\n {name:'submit',type:'submit',value:'Submit'}\n ]};\n}", "function _createNewPageEntry(isTemplate){\n\t\t\t_checkState(CONST_STATE_ADD_SELECT_TYPE);\n\t\t\t_removeAddEntrySelectTypeIfRequired();\n\t\t\tvar newId = _generateNewId();\n\t\t\tvar options = {\n\t\t\t\tkey: newId,\n\t\t\t\tisTemplate: isTemplate,\n\t\t\t\ttitle: \"\"\n\t\t\t};\n\t\t\t\n\t\t\tvar itemToInsertPage = _findItemToInsertPage(isTemplate);\n\t\t\tvar renderedInsertTitle = $.tmpl($(\"#render-add-page-insert-title-template\"), options);\n\t\t\tif(itemToInsertPage == null || itemToInsertPage.domElement == null){\n\t\t\t\tvar innerUL = _domElement.find(\"> ul\");\n\t\t\t\tinnerUL.append(renderedInsertTitle);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(itemToInsertPage.after)\n\t\t\t\t\titemToInsertPage.domElement.after(renderedInsertTitle);\n\t\t\t\telse\n\t\t\t\t\titemToInsertPage.domElement.before(renderedInsertTitle);\n\t\t\t}\n\t\t\t\n\t\t\t$(\"#new-item-title-\"+newId).focus();\n\t\t\t\n\t\t\t_state = isTemplate ? CONST_STATE_ADD_PAGE_TEMPLATE_SET_TITLE : CONST_STATE_ADD_PAGE_SET_TITLE;\n\t\t\t\n\t\t\tvar jsonCreator = {\n\t\t\t\t\tcreate: function(newId, title, isTemplate, id){\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tisTemplate: isTemplate,\n\t\t\t\t\t\t\tkey: newId,\n\t\t\t\t\t\t\ttitle: title,\n\t\t\t\t\t\t\ttype: \"page\",\n\t\t\t\t\t\t\tparentId: id\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\t// add the handles to create the new channel\n\t\t\t$(\"#new-item-title-\"+newId).keypress(function (e){\n\t\t\t\tswitch(e.which){\n\t\t\t\tcase CONST_VK_CONFIRM: //enter\n\t\t\t\t\t_confirmObjectCreation(newId, jsonCreator, \"#render-page-template\", itemToInsertPage, isTemplate);\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t$(\".insert-title > span.title-entry\").click(function(e){\n\t\t\t\te.stopPropagation();\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\t\n\t\t\t$(\".insert-title > span.actions > span.ok\").click(function(e){\n\t\t\t\t_confirmObjectCreation(newId, jsonCreator, \"#render-page-template\", itemToInsertPage, isTemplate);\n\t\t\t\te.stopPropagation();\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}", "function printNewForm() {\n $(\"<div/>\", {\n id: \"new_form\",\n class: \"editform\"\n }).appendTo(\"#back_form\");\n}", "get template(){\n return `\n <div class=\"col-3 mt-3 p-3 border rounded bg-light tasks\" style=\"margin: 1em;\">\n <h1 class=\"text-left border-bottom\" id=\"name\">${this.name}<button class=\"btn btn-outline btn-danger\" onclick=\"app.listController.removeList('${this.id}')\">X</button></h1>\n\n \n ${this.drawTask()}\n \n <form style=\"margin-bottom: 1em;\" onsubmit=\"app.listController.createTask(event,'${this.id}')\">\n <div class=\"input-group mb-3\">\n <input id=\"task\" type=\"text\" class=\"form-control\" placeholder=\"Add Task\" aria-label=\"task\" aria-describedby=\"task-addon\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-outline-secondary\" type=\"submit\">+</button>\n </div>\n </div>\n </form>\n </div>\n `;\n }", "function newProjectForm() {\n\t\t$.get(\"/projects/new\", function(projectForm) {\n\t\t\tdocument.getElementById('js-new-project-form').innerHTML = projectForm;\n\t\t}).done(function() {\n\t\t\tlistenerSaveProject();\n\t\t})\n}", "function createNewCommentForm() {\n var userSession = RB.UserSession.instance,\n yourcomment_id = \"yourcomment_\" + review_id + \"_\" +\n context_type;\n if (sectionId) {\n yourcomment_id += \"_\" + sectionId;\n }\n\n yourcomment_id += \"-draft\";\n\n var yourcomment = $(\"<li/>\")\n .addClass(\"reply-comment draft editor\")\n .attr(\"id\", yourcomment_id + \"-item\")\n .append($(\"<dl/>\")\n .append($(\"<dt/>\")\n .append($(\"<label/>\")\n .attr(\"for\", yourcomment_id)\n .append($(\"<a/>\")\n .attr(\"href\", userSession.get('userPageURL'))\n .html(userSession.get('fullName'))\n )\n )\n .append('<dd><pre id=\"' + yourcomment_id + '\"/></dd>')\n )\n )\n .appendTo(commentsList);\n\n var yourcommentEl = $(\"#\" + yourcomment_id);\n createCommentEditor(yourcommentEl);\n yourcommentEl\n .inlineEditor(\"startEdit\")\n .on(\"cancel\", function(el, initialValue) {\n if (initialValue == \"\") {\n yourcomment.remove();\n }\n });\n\n addCommentLink.hide();\n }", "function monsterForm(){\n const formLocation = document.getElementById('create-monster')\n const createMonster = document.createElement('form')\n createMonster.id = 'monster-form'\n createMonster.innerHTML=`<input id=\"name\" placeholder=\"name...\"><input id=\"age\" placeholder=\"age...\"><input id=\"description\" placeholder=\"description...\"><button>Create Monster</button>`\n formLocation.append(createMonster)\n}", "function fillFormForCreateGeneric(formId, msArray, labelText, mainViewId) {\n clearFormInputs(formId, msArray);\n $(\"#\" + formId + \"Label\").text(labelText);\n $(\"#\" + formId + \" [data-val-dbisunique]\").prop(\"disabled\", false); msDisableUnique(msArray, false);\n $(\"#\" + formId + \" .modifiable\").data(\"ismodified\", true); msSetAsModified(msArray, true);\n $(\"#\" + formId + \"GroupIsActive\").addClass(\"hide\");\n $(\"#IsActive\").prop(\"checked\", true);\n $(\"#IsActive_bl\").prop(\"checked\", true)\n $(\"#\" + formId + \"CreateMultiple\").removeClass(\"hide\");\n $(\"#\" + mainViewId).addClass(\"hide\");\n $(\"#\" + formId + \"View\").removeClass(\"hide\");\n}", "renderNewItemForm(e) {\n const form = e.target.parentElement.querySelector('form')\n form.style.display = 'block'\n }", "function newForm() {\n\n var form = document.createElement(\"form\")\n form.style = \"heigth:100px;width:300px;border-style:solid;border-color:black;border-width:1px\"\n form.id = \"form\"\n\n var ObjLabel = document.createElement(\"label\")\n ObjLabel.textContent = \"Object \"\n\n var ObjInput = document.createElement(\"input\")\n ObjInput.id = \"object-input\"\n ObjInput.name = \"object\"\n ObjInput.type = \"text\"\n ObjInput.placeholder = \"Object name\"\n\n var QtyLabel = document.createElement(\"label\")\n QtyLabel.textContent = \"Quantity \"\n\n var QtyInput = document.createElement(\"input\")\n QtyInput.id = \"quantity-input\"\n QtyInput.name = \"quantity\"\n QtyInput.type = \"text\"\n QtyInput.placeholder = \"Please insert a positive number\"\n\n var submit = document.createElement(\"input\")\n submit.id = \"submit\"\n submit.type = \"button\"\n submit.value = \"Confirm\"\n submit.setAttribute(\"onmousedown\", \"addItems()\")\n\n // adding all items under \"form\" in the DOM tree\n form.appendChild(ObjLabel)\n form.appendChild(ObjInput)\n form.appendChild(document.createElement(\"br\"))\n form.appendChild(QtyLabel)\n form.appendChild(QtyInput)\n form.appendChild(document.createElement(\"br\"))\n form.appendChild(submit)\n\n return form\n}", "function createModal(template, title, context) {\n $('#newmodal .modal-title').text(title);\n $('#newmodal .modal-body').html(template(context || {}))\n }", "function addNewForm() {\n var prototype = $collectionHolder.data('prototype')\n var index = $collectionHolder.data('index')\n var newForm = prototype\n newForm = newForm.replace(/__name__/g, index)\n $collectionHolder.data('index', index+1)\n // création panel\n var $panel = $(\n '<div class=\"panel panel-warning\"><div class=\"panel-heading\"></div></div>',\n )\n var $panelBody = $('<div class=\"panel-body\"></div>').append(newForm)\n $panel.append($panelBody)\n addRemoveButton($panel)\n $addNewItem.before($panel)\n}", "function startTemplate(){\r\n return (\r\n `<form>\r\n <p>Industrial automation is the use of control systems, computers, robots, information technologies and intrumentation for handling different industry processes</p>\r\n <h2>${store.questions[0].question}</h2>\r\n <button type=\"submit\" id=\"quizStart\">${store.questions[0].buttonText}</button>\r\n </form>`\r\n ); \r\n}", "function FormDesigner() {\n\t\t\tvar getJsObjectForProperty = function(container, property, value) {\n\t\t\t\tvar defaultValue = \"\";\n\t\t\t\tif(typeof value !== \"undefined\") {\n\t\t\t\t\tdefaultValue = value;\n\t\t\t\t} else if(typeof property[\"default\"] !== \"undefined\") {\n\t\t\t\t\tdefaultValue = property[\"default\"];\n\t\t\t\t}\n\t\t\t\tvar element;\n\t\t\t\tswitch(property[\"htmlFieldType\"]) {\n\t\t\t\t\tcase \"Hidden\": \n\t\t\t\t\t\telement = new HiddenElement(container, property[\"displayName\"]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"MultiChoice\" :\n\t\t\t\t\t\telement = new MultiChoiceSelectElement(container, property[\"displayName\"], property[\"helpText\"], property[\"options\"], property[\"default\"]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"MultiText\":\n\t\t\t\t\t\telement = new MultiChoiceTextElement(container, property[\"displayName\"], property[\"helpText\"], property[\"default\"], property[\"placeholder\"]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Select\":\n\t\t\t\t\t\telement = new SelectElement(container, property[\"displayName\"], property[\"options\"], property[\"helpText\"]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Editor\":\n\t\t\t\t\t\telement = new EditorElement(container, property[\"displayName\"], property[\"helpText\"], property[\"editorOptions\"]); /*the last argument should be editor options */\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"History\":\n\t\t\t\t\t\telement = new HistoryElement(container, property[\"displayName\"], true); \n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"TextElement\":\n\t\t\t\t\t\telement = new TextElement(container, property[\"displayName\"]); \n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"TextDisplay\":\n\t\t\t\t\t\telement = new TextDisplay(container, property[\"displayName\"]); \n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(defaultValue !== \"\") {\n\t\t\t\t\telement.setValue(defaultValue);\n\t\t\t\t}\n\t\t\t\treturn element;\n\t\t\t}\n\n\t\t\tvar drawEditableObject = function(container, metadata, object) {\n\t\t\t\tvar resultObject = {};\n\t\t\t\tresultObject = $.extend(true, {}, metadata); //make a deep copy\n\t\t\t\t\n\t\t\t\t//creating property div containers\n\t\t\t\tvar html = '<form class=\"form-horizontal\" role=\"form\" class=\"create-form\">';\n\t\t\t\t\thtml += '<div class=\"col-sm-offset-3 col-sm-9 response-container alert alert-dismissible\" role=\"alert\">'; \n\t\t\t\t\t\thtml += '<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>';\n\t\t\t\t\t\thtml += '<span class=\"message\"></span>'\n\t\t\t\t\thtml += \"</div>\";\n\t\t\t\t\thtml += '<div class=\"form-container\">';\n\t\t\t\t\t\tfor(var i = 0; i < metadata[\"propertyOrder\"].length; i++) {\n\t\t\t\t\t\t\tvar propertyKey = metadata[\"propertyOrder\"][i];\n\t\t\t\t\t\t\tif(metadata[\"properties\"][propertyKey][\"htmlFieldType\"] != \"Hidden\") {\n\t\t\t\t\t\t\t\thtml += '<div class=\"form-group ' + propertyKey + \"-id\" + '\"></div>';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\thtml += '<div class=\"' + propertyKey + \"-id\" + '\"></div>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//this gives us a space for the buttons/events\n\t\t\t\t\t\thtml += '<div class=\"col-sm-offset-3 col-sm-9 event-container\">'; \n\t\t\t\t\t\thtml += \"</div>\";\n\t\t\t\t\thtml += \"<br/><br/></div>\";\n\t\t\t\thtml += '</form>';\n\t\t\t\t$(container).html(html);\n\t\t\t\t\n\t\t\t\t//now add js elements to property div containers\n\t\t\t\tfor(property in resultObject[\"properties\"]) {\n\t\t\t\t\tvar propertyContainer = container + ' .' + property + \"-id\";\n\t\t\t\t\tresultObject[\"properties\"][property] = getJsObjectForProperty(propertyContainer, resultObject[\"properties\"][property], object[property]);\n\t\t\t\t}\n\t\t\t\tresultObject[\"metadata\"] = {};\n\t\t\t\tresultObject[\"metadata\"][\"properties\"] = metadata[\"properties\"];\n\t\t\t\t$(container + \" .response-container\").hide();\n\t\t\t\tresultObject[\"showError\"] = function(message) {\n\t\t\t\t\t$(container + \" .response-container\").removeClass(\"success\");\n\t\t\t\t\t$(container + \" .response-container\").removeClass(\"warning\");\n\t\t\t\t\t$(container + \" .response-container\").addClass(\"alert-danger\");\n\t\t\t\t\t$(container + \" .response-container span.message\").html(message);\n\t\t\t\t\t$(container + \" .response-container\").show();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tresultObject[\"showWarning\"] = function(message) {\n\t\t\t\t\t$(container + \" .response-container\").removeClass(\"success\");\n\t\t\t\t\t$(container + \" .response-container\").removeClass(\"error\");\n\t\t\t\t\t$(container + \" .response-container\").addClass(\"alert-warning\");\n\t\t\t\t\t$(container + \" .response-container span.message\").html(message);\n\t\t\t\t\t$(container + \" .response-container\").show();\n\t\t\t\t}\n\n\t\t\t\tresultObject[\"showSuccess\"] = function(message) {\n\t\t\t\t\t$(container + \" .response-container\").removeClass(\"warning\");\n\t\t\t\t\t$(container + \" .response-container\").removeClass(\"error\");\n\t\t\t\t\t$(container + \" .response-container\").addClass(\"alert-success\");\n\t\t\t\t\t$(container + \" .response-container span.message\").html(message);\n\t\t\t\t\t$(container + \" .response-container\").show();\n\t\t\t\t}\n\t\t\t\tresultObject[\"clearValues\"] = function() {\n\t\t\t\t\tfor(property in resultObject[\"properties\"]) {\n\t\t\t\t\t\tresultObject[\"properties\"][property].setValue(resultObject[\"metadata\"][\"properties\"][property][\"default\"]); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn resultObject;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tdrawEditableObject : drawEditableObject\n\t\t\t}\n\t\t}", "function serializeFormTemplate($form){\n\tvar envelope={'template':{\n\t\t\t\t\t\t\t\t'data':[]\n\t}};\n\t// get all the inputs into an array.\n var $inputs = $form.children(\"input\");\n $inputs.each(function(){\n \tvar _data = {};\n \t_data.name = this.name;\n \t_data.value = $(this).val();\n \tenvelope.template.data.push(_data);\n });\n return envelope;\n\n}", "function NewEntryForm() {\n $(\"#addCancel\").click(this.clearForm);\n $(\"#addButton\").click(this.submitForm);\n }", "function generateFormField(propertyBox, className, labelText, formElements) {\n var formField = document.createElement('div');\n formField.classList.add('ember-view');\n formField.classList.add('form_field');\n formField.classList.add('lesa-ui-form-field');\n formField.classList.add(className);\n var label = document.createElement('label');\n label.innerHTML = labelText;\n formField.appendChild(label);\n for (var i = 0; i < formElements.length; i++) {\n formField.appendChild(formElements[i]);\n }\n var oldFormFields = propertyBox.querySelectorAll('.' + className);\n for (var i = 0; i < oldFormFields.length; i++) {\n propertyBox.removeChild(oldFormFields[i]);\n }\n propertyBox.appendChild(formField);\n}", "create(form) {\n this.submitted = true;\n this.homework.creator = this.getCurrentUser();\n this.homework.maxPoints = this.maxPoints;\n // TODO add class (fetch from teacher?)\n\n if (form.$valid) {\n this.homeworkService.save(this.homework, () => {\n // Refresh the page\n this.$state.go(this.$state.current, {}, {reload: true});\n });\n }\n }", "function addFormToPage() {\n const formDivNode = document.getElementById(\"create-monster\")\n\n const addForm = document.createElement(\"form\")\n addForm.addEventListener(\"submit\", createNewMonster)\n addForm.id = \"add-monster-form\"\n \n let nameField = document.createElement(\"input\")\n nameField.id = \"name\";\n nameField.placeholder = \"Name...\";\n \n let ageField = document.createElement(\"input\")\n ageField.id = \"age\";\n ageField.placeholder = \"Age...\";\n \n let descriptionField = document.createElement(\"input\")\n descriptionField.id= \"description\"\n descriptionField.placeholder = \"description...\";\n \n let newMonsterBtn = document.createElement(\"button\")\n newMonsterBtn.innerText = \"Create Monster\"\n \n addForm.append(nameField, ageField, descriptionField, newMonsterBtn)\n formDivNode.innerHTML = \"<h3>Create a New Monster</h3>\"\n //adds form to page \n formDivNode.append(addForm)\n\n\n}", "function createDynamicForm(){\n\t\ttry{\n\t\t\trandom = 0;\n\t\t\tgListId = 0;\n\t\t\tcount = 1;\n\t\t\tvar frmLogBasiConf = {id: \"frmDynamicJS\",type:constants.FORM_TYPE_NATIVE,addWidgets :addWidgetsToDynamicForm,skin :\"frmSampleSkin\",headers:[hBoxForHeader()]};\n\t\t\tvar frmLayoutConf = {percent:true};\n\t\t\tvar frmPSPConfig = {inTransitionConfig:{transitionDirection:\"topCenter\"}};\n\t\t frmDynamicJS = new kony.ui.Form2(frmLogBasiConf, frmLayoutConf, frmPSPConfig);\n\t\t frmDynamicJS.show();\n\t\t}\n\t\tcatch(err){\n\t\t\talert(\"error while creating the forms\"+err);\n\t\t}\n\t}", "function signUpTemplate() {\n return `<form class=\"signUpForm\" autocomplete=\"on\">\n <div class=\"loginError\"></div>\n <legend class=\"loginRegisterTitle\">Welcome, aboard!</legend>\n <label for=\"username\">USERNAME:</label>\n <input class=\"usernameSignUp\" type=\"text\" name=\"username\" pattern=\".{1,}\" required title=\"1 characters minimum\" required>\n <br>\n <label for=\"password\">PASSWORD:</label>\n <input class=\"passwordSignUp\" type=\"password\" name=\"password\" pattern=\".{10, 72}\" required title=\"10 characters minimum\" required>\n <br>\n <label for=\"firstName\">FIRST NAME:</label>\n <input class=\"firstnameSignUp\" type=\"text\" name=\"firstName\" required>\n <br>\n <label for=\"lastName\">LAST NAME:</label>\n <input class=\"lastnameSignUp\" type=\"text\" name=\"lastName\" required>\n <br>\n <label for=\"email\">EMAIL:</label>\n <input class=\"emailSignUp\" type=\"email\" name=\"email\" required>\n <br>\n <button class=\"loginButton signingUpNewAccount\" type=\"submit\">Submit</button>\n </form>\n <a href=\"#\" id=\"login\"><p class=\"toggleReg\">Login!</p></a>`;\n}", "createEditForm() {\n const form = HTML.createElement(\"form\");\n form.classList.add(\"patchGroupEdit\");\n for (const key of [\n \"name\",\n \"description\",\n \"row\",\n \"group\",\n \"span\",\n \"enumeration\",\n \"tags\",\n \"color\",\n ]) {\n const capitalized = key.charAt(0).toUpperCase() + key.slice(1);\n const id = `patchGroupEdit${capitalized}`;\n form.appendChild(\n HTML.createElement(\"label\", {\n textContent: capitalized,\n for: id,\n })\n );\n form.appendChild(\n HTML.createElement(\"input\", {\n type: \"text\",\n name: key,\n id,\n value: [\"enumeration\", \"tags\"].includes(key)\n ? this[key].join(\",\")\n : this[key],\n })\n );\n }\n const id = \"patchGroupEditNormals\";\n form.appendChild(\n HTML.createElement(\"label\", {\n textContent: \"Normals\",\n for: id,\n })\n );\n form.appendChild(\n HTML.createElement(\"select\", {\n id,\n children: [\"\", \"ABOVE\", \"BELOW\", \"RIGHT OUT\", \"RIGHT IN\"].map((value) =>\n HTML.createElement(\"option\", {\n value,\n textContent: value,\n selected: this.normals === value,\n })\n ),\n })\n );\n this.editForm = form;\n return this;\n }", "get listTemplate() {\n return /*html*/`\n <div class=\"col-3 border rounded shadow-lg\">\n <h2>${this.title} <button type=\"button\"class=\"text-danger close mt-3\" onclick=\"app.listController.delete('${this.id}')\"><span>&times;</span></button></h2>\n\n <form onsubmit=\"app.taskController.create(event, '${this.id}')\">\n <div class=\"form-group\">\n <input type=\"text\" name=\"taskTitle\" class=\"form-control\" placeholder = \"Enter List Item...\">\n <button type=\"submit\" name=\"\" id=\"\" class=\"btn btn-primary\">Add List</button>\n </div>\n <div class=\"row\">\n ${this.tasks}\n </div>\n </form>\n </div>`\n }", "get Template() {\n let template = '';\n\n this.items.forEach(item => {\n template += `\n <div class=\"item-container m-1 p-1\">\n <span><input type=\"checkbox\" value=\"done\" class=\"form-check-input\">${item}</span><i class=\"fas fa-trash-alt removeIcon\" onclick=\"app.listController.removeListItem('${item}', '${this.id}')\" title=\"remove item from list\"></i>\n </div>\n `\n });\n\n return `\n <div class=\"card\" style=\"width: 15rem; background-color: ${this.color};\">\n <div class=\"card-body\">\n <form action=\"\" id=\"add-item\" onsubmit=\"app.listController.addListItem(event, '${this.id}')\">\n <i class=\"fa fa-times removeIcon\" onclick=\"app.listController.removeList('${this.id}')\"></i>\n <div class=\"listBtns m-1\">\n <h5 class=\"card-title\">${this.name}</h5>\n <button class=\"btn btn-light\" type=\"submit\" title=\"Add a task\"><i class=\"fas fa-plus add-item-btn\"></i></button></div>\n <div class=\"form-group\">\n <input type=\"text\" class=\"form-control\" id=\"listItemName\" name=\"listItemName\"\n placeholder=\"Add Task...\" required=\"true\">\n </div>\n </form>\n <div>${template}</div>\n </div>\n </div>\n </div>\n `\n }", "function newForm(){\r\n let createNew = document.querySelector(\"form\")\r\ncreateNew.innerHTML = `\r\n<input type=\"text\" id=\"userName\" placeholder =\"Enter User Name\" >\r\n<input type=\"text\" id=\"picture\" placeholder =\"Enter Photo URL\"><br>\r\n<input class= \"donebtn\" type=\"button\" value=\"DONE\" onclick=\"adder()\">\r\n<input class= \"cancelbtn\" type=\"button\" value=\"CANCEL\" onclick=\"adder()\"><br>\r\n`\r\n}", "constructStackblitzForm(data) {\n const indexFile = `app%2F${data.indexFilename}.ts`;\n const form = this.createFormElement(indexFile);\n TAGS.forEach((tag, i) => this.appendFormInput(form, `tags[${i}]`, tag));\n this.appendFormInput(form, 'private', 'true');\n this.appendFormInput(form, 'description', data.description);\n this.appendFormInput(form, 'dependencies', JSON.stringify(dependencies));\n return new Promise((resolve) => {\n const templateContents = TEMPLATE_FILES\n .map((file) => this.readFile(form, data, file, TEMPLATE_PATH));\n const exampleContents = data.exampleFiles\n .map((file) => this.readFile(form, data, file, DOCS_CONTENT_PATH));\n // TODO: Prevent including assets to be manually checked.\n if (data.selectorName === 'icon-svg-example') {\n this.readFile(form, data, 'assets/img/examples/thumbup-icon.svg', '', false);\n }\n Promise.all(templateContents.concat(exampleContents)).then(() => {\n resolve(form);\n });\n });\n }", "function create_item() {\n document.getElementById('modify-header').textContent = 'Creating new Item';\n create_form('meat_shop_item','content-div');\n}", "function create_person(data) {\n\t\t$('#submissions').loadTemplate($('#submission-template'), data, {append: true});\n\t}", "function createForm(index) {\n let formMaker = $(`<form>\n <fieldset>\n <h2><legend class=\"questionText\">${STORE[index].question}</legend></h2><br>\n </fieldset>\n </form>`);\n\n let fieldSelector = $(formMaker).find('fieldset');\n\n STORE[index].answers.forEach(function (answerValue, answerIndex) {\n $(`<label for=\"${answerIndex}\">\n <input class=\"radio\" type=\"radio\" id=\"${answerIndex}\" value=\"${answerValue}\" name=\"answer\" required>\n <span>${answerValue}</span>\n </label> \n `).appendTo(fieldSelector);\n });\n \n $(`<button type=\"submit\" class=\"submitButton button\">Submit</button>`).appendTo(fieldSelector);\n\n return formMaker;\n}", "function createForm() {\n // Create the form elements\n var form = createDOMElement('form', {id: 'form'});\n formFields.search = createDOMElement('input', {id: 's'});\n formFields.place = createDOMElement('input', {id: 'p'});\n formFields.recruiter = createDOMElement('input', {id: 'r'});\n formFields.nrOfJobs = createDOMElement('input', {id: 'l'});\n formFields.width = createDOMElement('input', {id: 'w'});\n formFields.radius = createDOMElement('input', {id: 'rad', className: 'radius-selector btn distance'});\n\n // Append them to the form object\n form.appendChild(formFields.search);\n form.appendChild(formFields.place);\n form.appendChild(formFields.recruiter);\n form.appendChild(formFields.nrOfJobs);\n form.appendChild(formFields.width);\n form.appendChild(formFields.radius);\n\n // Place the form in the DOM\n containerTestDiv.appendChild(form);\n }", "function createEditProfileDataForm() {\n \n // This function creates a form for the profile info that the user would like to update\n\n $(\"dt\").click(function() {\n \n // First remove any exisiting form that has been generated already...\n \n $('#update-form').remove();\n \n // Then create a new form...\n \n var field = this.className;\n var profileID = $('#profile-id').text();\n\n if (field === \"date_of_birth\") {\n var type = \"date\"\n }\n else {\n var type = \"text\"\n }\n\n if (field != \"\") {\n var updateForm = '<form id=\"update-form\" method=\"POST\" action=\"edit_profile/' +\n profileID +\n '\"><div class=\"remove-parent-btn\">x</div><label>' +\n field + '</label><input type=\"' + type + '\" name=\"' + field +\n '\" id=\"' + field +\n '\"><button type=\"submit\" class=\"update-form-btn hover-effect-gold click-shrink\">Update</button></form>'\n }\n\n $('.profile-page').append(updateForm);\n })\n}", "function createUpdateForm(){\n updateForm = new MyForm(\n templates.tNewForm,\n [\n {\n id : 'update',\n class : 'btn btn-primary',\n name : 'Update',\n action : updateUser\n },\n {\n id : 'esc',\n class : 'btn btn-primary',\n name : 'Cancel',\n action : function(e){\n e.preventDefault();\n updateForm.hide();\n }\n }\n ]\n );\n validation(updateForm.form);\n }", "function renderNewEventForm() {\n $(\".create-event-or-task\").append(`\n <form id='new-event-form'>\n <fieldset>\n <legend>Create new Event</legend>\n <label for=\"title\">Title: </label> <input type=\"text\" name=\"title\" id='js-event-title' placeholder=\"Meet with manager\"><br>\n <label for=\"day\">Day: </label> <select id='js-event-day' name=\"day\" required>\n <option value=\"0\">Monday</option>\n <option value=\"1\">Tuesday</option>\n <option value=\"2\">Wednesday</option>\n <option value=\"3\">Thursday</option>\n <option value=\"4\">Friday</option>\n <option value=\"5\">Saturday</option>\n <option value=\"6\">Sunday</option>\n </select><br>\n <label for=\"startTime\">Start: </label> <input type=\"time\" name=\"startTime\" id='js-event-time' required><br>\n <label for=\"notes\">Notes: </label> <input type=\"text\" id=\"js-event-notes\" name=\"notes\" placeholder=\"Bring resume...\"><br>\n <input type=\"submit\" id=\"js-btn-create-event\" class='hvr-fade'>\n <button id='js-cancel-create-event' name='cancel-create-event' class='hvr-fade'><label for='cancel-create-event'>Cancel</label></button>\n </fieldset>\n </form>\n `);\n}", "function createWithAdminId(req,res){\n var newTemplate = new TemplateForm();\n newTemplate._admin_id = req.params.adminid;\n newTemplate.template = req.body.template;\n\n newTemplate.save(function(err, template) {\n if(err)\n return res.status(400).json(err);\n else\n return res.status(200).json(template);\n });\n}", "addForm() {\n let index = this.totalForms; // 1 based to 0 based\n let computedPrefix = `${this.prefix}-${index}`;\n let html = this.template.replace(this.id_regex, computedPrefix);\n // update the counter, so the next forms will be added correctly\n this.totalForms += 1;\n return [html, index];\n }", "function generateNewTemplate(TemplateModelInfo) {\n if (vm.configure_template != undefined) {\n if (vm.configure_template.template_type == 'new') {\n var templateInfo = {}, resetParams = {}, params = {};\n templateInfo = angular.copy(vm.TemplateModelInfo);\n /**\n * validation on generate template\n */\n // if ((templateInfo.template_code == \"F1_46\" && templateInfo.secondaryDefendantsAttorney.length > 5) || (templateInfo.template_code == \"F1_45\" && templateInfo.secondaryDefendantsAttorney.length > 5)) {\n // notificationService.error(\"Please select only 5 secondary defendants attorney\");\n // return;\n // }\n params = [];\n params = angular.copy(vm.configure_template.request_params.params);\n // params.templateid = templateInfo.template_id;\n params.intakeId = utils.isNotEmptyVal(templateInfo.intakeId) ? templateInfo.intakeId : 0;\n params.templatetype = vm.templateDetailFromJava.template_type;\n _.forEach(vm.configure_template.request_params.params, function (value, key) {\n switch (value) {\n case \"plaintiffs\":\n _.forEach(templateInfo, function (templateValue, templateKey) {\n if (templateKey == value) {\n /*plantiffs model value returned by radio input is JSON, so it has to be convert into array*/\n if (typeof templateInfo.plaintiffs != \"object\") {\n if (!Array.isArray(templateInfo.plaintiffs) && utils.isNotEmptyVal(templateInfo.plaintiffs)) {\n params.plaintiff = JSON.parse(templateInfo.plaintiffs);\n }\n } else {\n params.plaintiff = templateInfo.plaintiffs;\n }\n }\n });\n break;\n\n case \"plaintiffEmployerIds\":\n params.plaintiffEmployerIds = (templateInfo.plaintiffEmployerIds != undefined) ? templateInfo.plaintiffEmployerIds : undefined;\n break;\n case \"plaintiffEmployerIdsNew\":\n params.plaintiffEmployerIdsNew = (templateInfo.plaintiffEmployerIdsNew != undefined) ? templateInfo.plaintiffEmployerIdsNew : undefined;\n break;\n case \"plaintiffEmployerIds_sec\":\n params.plaintiffEmployerIds_sec = (templateInfo.plaintiffEmployerIds_sec != undefined) ? templateInfo.plaintiffEmployerIds_sec : undefined;\n break;\n case \"serviceDates\":\n params.serviceDates = (templateInfo.serviceDates != undefined) ? templateInfo.serviceDates : undefined;\n break;\n case \"insuredParty\":\n params.insuredParty = (templateInfo.insuredParty != undefined) ? templateInfo.insuredParty : undefined;\n break;\n case \"medicalProviderPhysicians\":\n params.medicalProviderPhysicians = (templateInfo.medicalProviderPhysicians != undefined) ? templateInfo.medicalProviderPhysicians : undefined;\n break;\n case \"medicalServiceProvider\":\n params.medicalServiceProvider = (templateInfo.medicalServiceProvider != undefined) ? templateInfo.medicalServiceProvider : undefined;\n break;\n case \"plaintiffEmployerIds_ter\":\n params.plaintiffEmployerIds_ter = (templateInfo.plaintiffEmployerIds_ter != undefined) ? templateInfo.plaintiffEmployerIds_ter : undefined;\n break;\n case \"onlyInsuranceId\":\n params.onlyInsuranceId = (templateInfo.onlyInsuranceId != undefined) ? templateInfo.onlyInsuranceId : undefined;\n break;\n case \"medicalproviderId\":\n params.medicalproviderId = (templateInfo.medicalproviderId != undefined) ? templateInfo.medicalproviderId : undefined;\n break;\n case \"medicalproviderId2\":\n params.medicalproviderId2 = (templateInfo.medicalproviderId2 != undefined) ? templateInfo.medicalproviderId2 : undefined;\n break;\n case \"medicalproviderId3\":\n params.medicalproviderId3 = (templateInfo.medicalproviderId3 != undefined) ? templateInfo.medicalproviderId3 : undefined;\n break;\n case \"ServiceDate\":\n params.ServiceDate = (templateInfo.ServiceDate != undefined) ? templateInfo.ServiceDate : undefined;\n break;\n case \"assign_user\":\n params.assign_user = (templateInfo.assign_user != undefined) ? templateInfo.assign_user : undefined;\n break;\n case \"witnessId\":\n params.witnessId = (templateInfo.witnessId != undefined) ? templateInfo.witnessId : undefined;\n break;\n case \"medicalServiceDates\":\n params.medicalServiceDates = (templateInfo.medicalServiceDates != undefined) ? templateInfo.medicalServiceDates : undefined;\n break;\n case \"witnessId1\":\n params.witnessId1 = (templateInfo.witnessId1 != undefined) ? templateInfo.witnessId1 : undefined;\n break;\n case \"physicianId\":\n params.physicianId = (templateInfo.physicianId != undefined) ? templateInfo.physicianId : undefined;\n break;\n case \"custom_date\":\n (templateInfo.custom_date == undefined) ? params.custom_date = undefined : params.custom_date = utils.getUTCTimeStamp(templateInfo.custom_date);\n break;\n case \"marriage_date\":\n (templateInfo.marriage_date == undefined) ? params.marriage_date = undefined : params.marriage_date = utils.getUTCTimeStamp(templateInfo.marriage_date);\n break;\n case \"filling_date\":\n (templateInfo.filling_date == undefined) ? params.filling_date = undefined : params.filling_date = utils.getUTCTimeStamp(templateInfo.filling_date);\n break;\n case \"date_Employed_From1\":\n (templateInfo.date_Employed_From1 == undefined) ? params.date_Employed_From1 = undefined : params.date_Employed_From1 = utils.getUTCTimeStamp(templateInfo.date_Employed_From1);\n break;\n case \"date_Employed_From2\":\n (templateInfo.date_Employed_From2 == undefined) ? params.date_Employed_From2 = undefined : params.date_Employed_From2 = utils.getUTCTimeStamp(templateInfo.date_Employed_From2);\n break;\n case \"date_Employed_From3\":\n (templateInfo.date_Employed_From3 == undefined) ? params.date_Employed_From3 = undefined : params.date_Employed_From3 = utils.getUTCTimeStamp(templateInfo.date_Employed_From3);\n break;\n case \"date_Employed_To1\":\n (templateInfo.date_Employed_To1 == undefined) ? params.date_Employed_To1 = undefined : params.date_Employed_To1 = utils.getUTCTimeStamp(templateInfo.date_Employed_To1);\n break;\n case \"date_Employed_To2\":\n (templateInfo.date_Employed_To2 == undefined) ? params.date_Employed_To2 = undefined : params.date_Employed_To2 = utils.getUTCTimeStamp(templateInfo.date_Employed_To2);\n break;\n case \"date_Employed_To3\":\n (templateInfo.date_Employed_To3 == undefined) ? params.date_Employed_To3 = undefined : params.date_Employed_To3 = utils.getUTCTimeStamp(templateInfo.date_Employed_To3);\n break;\n case \"textBoxOne\":\n (templateInfo.textBoxOne == undefined) ? params.textBoxOne = undefined : params.textBoxOne = templateInfo.textBoxOne;\n break;\n case \"textBoxTwo\":\n (templateInfo.textBoxTwo == undefined) ? params.textBoxTwo = undefined : params.textBoxTwo = templateInfo.textBoxTwo;\n break;\n case \"accidentTime\":\n (templateInfo.accidentTime == undefined) ? params.accidentTime = undefined : params.accidentTime = templateInfo.accidentTime;\n break;\n case \"vehicleInformation\":\n (templateInfo.vehicleInformation == undefined) ? params.vehicleInformation = undefined : params.vehicleInformation = templateInfo.vehicleInformation;\n break;\n case \"textBoxThree\":\n (templateInfo.textBoxThree == undefined) ? params.textBoxThree = undefined : params.textBoxThree = templateInfo.textBoxThree;\n break;\n case \"textBoxFour\":\n (templateInfo.textBoxFour == undefined) ? params.textBoxFour = undefined : params.textBoxFour = templateInfo.textBoxFour;\n break;\n case \"textBoxFive\":\n (templateInfo.textBoxFive == undefined) ? params.textBoxFive = undefined : params.textBoxFive = templateInfo.textBoxFive;\n break;\n case \"textBoxSix\":\n (templateInfo.textBoxSix == undefined) ? params.textBoxSix = undefined : params.textBoxSix = templateInfo.textBoxSix;\n break;\n case \"textBoxSeven\":\n (templateInfo.textBoxSeven == undefined) ? params.textBoxSeven = undefined : params.textBoxSeven = templateInfo.textBoxSeven;\n break;\n case \"textBoxEight\":\n (templateInfo.textBoxEight == undefined) ? params.textBoxEight = undefined : params.textBoxEight = templateInfo.textBoxEight;\n break;\n case \"textBoxNine\":\n (templateInfo.textBoxNine == undefined) ? params.textBoxNine = undefined : params.textBoxNine = templateInfo.textBoxNine;\n break;\n case \"textBoxTen\":\n (templateInfo.textBoxTen == undefined) ? params.textBoxTen = undefined : params.textBoxTen = templateInfo.textBoxTen;\n break;\n case \"userValueOne\":\n (templateInfo.userValueOne == undefined) ? params.userValueOne = undefined : params.userValueOne = templateInfo.userValueOne;\n break;\n case \"userValueTwo\":\n (templateInfo.userValueTwo == undefined) ? params.userValueTwo = undefined : params.userValueTwo = templateInfo.userValueTwo;\n break;\n case \"userValueThree\":\n (templateInfo.userValueThree == undefined) ? params.userValueThree = undefined : params.userValueThree = templateInfo.userValueThree;\n break;\n case \"userValueFour\":\n (templateInfo.userValueFour == undefined) ? params.userValueFour = undefined : params.userValueFour = templateInfo.userValueFour;\n break;\n case \"userValueFive\":\n (templateInfo.userValueFive == undefined) ? params.userValueFive = undefined : params.userValueFive = templateInfo.userValueFive;\n break;\n case \"userValueSix\":\n (templateInfo.userValueSix == undefined) ? params.userValueSix = undefined : params.userValueSix = templateInfo.userValueSix;\n break;\n case \"amountInWords\":\n params.amountInWords = (templateInfo.amountInWords != undefined) ? templateInfo.amountInWords : undefined;\n break;\n case \"amountInNumbers\":\n params.amountInNumbers = (templateInfo.amountInNumbers != undefined) ? templateInfo.amountInNumbers : undefined;\n break;\n case \"amountInNumbers1\":\n params.amountInNumbers1 = (templateInfo.amountInNumbers1 != undefined) ? templateInfo.amountInNumbers1 : undefined;\n break;\n case \"amountInNumbers2\":\n params.amountInNumbers2 = (templateInfo.amountInNumbers2 != undefined) ? templateInfo.amountInNumbers2 : undefined;\n break;\n case \"amountInNumbers3\":\n params.amountInNumbers3 = (templateInfo.amountInNumbers3 != undefined) ? templateInfo.amountInNumbers3 : undefined;\n break;\n case \"amountInNumbers4\":\n params.amountInNumbers4 = (templateInfo.amountInNumbers4 != undefined) ? templateInfo.amountInNumbers4 : undefined;\n break;\n case \"amountInNumbers5\":\n params.amountInNumbers5 = (templateInfo.amountInNumbers5 != undefined) ? templateInfo.amountInNumbers5 : undefined;\n break;\n case \"amountInNumbers6\":\n params.amountInNumbers6 = (templateInfo.amountInNumbers6 != undefined) ? templateInfo.amountInNumbers6 : undefined;\n break;\n case \"amountInNumbers7\":\n params.amountInNumbers7 = (templateInfo.amountInNumbers7 != undefined) ? templateInfo.amountInNumbers7 : undefined;\n break;\n case \"amountInNumbers8\":\n params.amountInNumbers8 = (templateInfo.amountInNumbers8 != undefined) ? templateInfo.amountInNumbers8 : undefined;\n break;\n case \"amountInNumbers9\":\n params.amountInNumbers9 = (templateInfo.amountInNumbers9 != undefined) ? templateInfo.amountInNumbers9 : undefined;\n break;\n case \"amountInNumbers10\":\n params.amountInNumbers10 = (templateInfo.amountInNumbers10 != undefined) ? templateInfo.amountInNumbers10 : undefined;\n break;\n\n }\n });\n /** add extra paramters to template */\n extraParams(templateInfo, params);\n var APIFlag = vm.generatorTemplateData.template_api_call;\n var templateCode = vm.configure_template.template_code;\n var templateName = vm.templateDetailFromJava.template_name;\n resetParams = setParams(templateInfo.template_code, params);\n if (APIFlag == \"java2\") {\n intakeTemplatestDatalayer.GenerateNewTemplateRecord(resetParams, APIFlag, templateName)\n .then(function (response) {\n var filename = templateName.replace('.', '-');\n var linkElement = document.createElement('a');\n try {\n var blob = new Blob([response], { type: \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" });\n var url = window.URL.createObjectURL(blob);\n\n linkElement.setAttribute('href', url);\n linkElement.setAttribute(\"download\", filename + \".docx\");\n\n var clickEvent = new MouseEvent(\"click\", {\n \"view\": window,\n \"bubbles\": true,\n \"cancelable\": false\n });\n linkElement.dispatchEvent(clickEvent);\n vm.close();\n } catch (ex) {\n console.log(ex);\n }\n }, function (error) {\n\n if (localStorage.getItem('templateError') == \"true\") {\n notificationService.error('' + error.data);\n localStorage.setItem('templateError', \"false\");\n }\n });\n }\n }\n } else {\n\n if (vm.TemplateModelInfo.matterId) {\n vm.TemplateModelInfo.matterId = vm.TemplateModelInfo.matterId;\n } else {\n vm.TemplateModelInfo.matterId = 0;\n }\n\n //user ids are seperated from object\n //for each user id GenerateTemplateRecord will be called\n var plaintiffids = [];\n var defendantids = [];\n var associate_party_id = '';\n var templateInfo = {};\n templateInfo = angular.copy(vm.TemplateModelInfo);\n /*plantiffs model value returned by radio input is JSON, so it has to be convert into array*/\n if (!Array.isArray(templateInfo.plaintiffs) && utils.isNotEmptyVal(templateInfo.plaintiffs)) {\n plaintiffids.push(JSON.parse(templateInfo.plaintiffs));\n templateInfo.plaintiffs = plaintiffids;\n }\n if (!Array.isArray(templateInfo.defendants) && utils.isNotEmptyVal(templateInfo.defendants)) {\n defendantids.push(JSON.parse(templateInfo.defendants));\n templateInfo.defendants = defendantids;\n }\n /*set the parameters for generating template by type id and type of selected template*/\n switch (vm.option) {\n case 'Plaintiff':\n if (templateInfo.typeId == 18) {\n templateInfo.userlist = _.pluck(templateInfo.plaintiffs, 'contactid');\n } else if (templateInfo.typeId == 23) {\n templateInfo.userlist = _.pluck(templateInfo.plaintiffs, 'plaintiffid');\n templateInfo.associate_party_id = templateInfo.plaintiffs[0].employerid\n } else {\n templateInfo.userlist = _.pluck(templateInfo.plaintiffs, 'plaintiffid');\n }\n break;\n\n }\n //download template for entered template info \n downloadTemplate(templateInfo);\n }\n }", "createFormJson() {\n const email = this.options.fields.filter(f => f.name === 'email');\n const form = [];\n\n this.options.fields.forEach((f) => {\n if (f === 'email' || f.name === 'email') {\n return;\n }\n let name = '';\n let type = 'text';\n let label = '';\n if (typeof f === 'string') {\n name = f;\n label = this.options.locale[f];\n } else {\n name = f.name;\n label = f.label || this.options.locale[f.name];\n type = f.type || type;\n }\n\n form.push({\n name,\n type,\n label,\n placeholder: typeof f !== 'string' ? f.placeholder : undefined,\n });\n });\n\n form.push(\n {\n name: 'email',\n type: 'email',\n placeholder: email.length > 0 ? email[0].placeholder : undefined,\n label: email.length > 0 && email[0].label !== undefined ?\n email[0].label : this.options.locale.email,\n },\n );\n\n return form;\n }", "createForm() {\n const newForm = document.createElement(\"form\");\n newForm.setAttribute(\"method\", \"GET\");\n newForm.setAttribute(\"action\", \"#\");\n this.parent.appendChild(newForm);\n return newForm;\n }", "function createForm (node) { \n let formContainer = document.createElement(\"form\")\n formContainer.id = \"form\"\n let input = document.createElement(\"input\")\n let submit = document.createElement(\"input\")\n submit.type = \"submit\"\n submit.dataset.id = \"submit\"\n input.placeholder = \"name\"\n formContainer.style.display = \"none\"\n formContainer.appendChild(input)\n formContainer.appendChild(submit)\n node.appendChild(formContainer)\n formContainer.addEventListener(\"submit\", formHandler)\n\n }", "function createNewPlantForm(e){\n clearDivPlantField()\n clearDivNewPlantForm()\n let targetGardenId = parseInt(e.target.parentNode.id)\n let newPlantField = document.querySelector(`#new-plant-form-${targetGardenId}`)\n newPlantField.innerHTML = `\n <input hidden id=\"plant\" value=\"${targetGardenId}\" />\n Plant Name:\n <input id=\"plant\" type=\"text\"/>\n <br>\n Plant Type:\n <input id=\"plant\" type=\"text\"/>\n <br>\n Plant Family:\n <input id=\"plant\" type=\"text\"/>\n <br>\n <span class=\"plant-submit\" id=\"${targetGardenId}\">Submit</span>\n `\n let plantSubmit = document.querySelector(`.plant-submit`)\n plantSubmit.addEventListener(\"click\", handleNewPlantSubmit)\n}", "function generateForm(){\n // Display the form a single time\n if(document.querySelector('.user-input')) return;\n\n // create title field\n const titleField = document.createElement('input');\n titleField.type = 'text';\n titleField.classList = 'user-input';\n titleField.id = 'input-title';\n titleField.dataset.field = 'book-title';\n titleField.placeholder = 'Title'\n\n // create author field\n const authorField = document.createElement('input');\n authorField.type = 'text';\n authorField.classList = 'user-input';\n authorField.id = 'input-author';\n authorField.dataset.field = 'book-author';\n authorField.placeholder = 'Author'\n\n // create pages field\n const pagesField = document.createElement('input');\n pagesField.type = 'text';\n pagesField.classList = 'user-input';\n pagesField.id = 'input-pages';\n pagesField.dataset.field = 'book-pages';\n pagesField.placeholder = 'Pages'\n \n // create pages field\n const readField = document.createElement('input');\n readField.type = 'text';\n readField.classList = 'user-input';\n readField.id = 'input-read';\n readField.dataset.field = 'book-read';\n readField.placeholder = 'Read'\n\n // create add book button\n const buttonAddBook = document.createElement('div');\n buttonAddBook.textContent = 'Add book';\n buttonAddBook.classList = 'rounded-button';\n\n // Add event listener to the add-book-button\n buttonAddBook.addEventListener('click', addBookToLibrary);\n\n // append fields to the form div\n bookInputField.appendChild(titleField);\n bookInputField.appendChild(authorField);\n bookInputField.appendChild(pagesField);\n bookInputField.appendChild(readField);\n bookInputField.appendChild(buttonAddBook);\n}", "function NewCardForm({ handleCreate }) {\n const currentUser = useContext(UserContext);\n const [formData, setFormData] = useState({ word: '', defn: '' });\n\n function handleChange(evt) {\n let { name, value } = evt.target;\n setFormData((oldformData) => ({ ...oldformData, [name]: value }));\n }\n\n return (\n <Form onSubmit={(evt) => handleCreate(evt, currentUser.userId, formData)}>\n <FormGroup>\n <Input\n name=\"word\"\n value={formData.word}\n placeholder=\"Word\"\n onChange={handleChange}\n required\n />\n </FormGroup>\n <FormGroup>\n <Input\n name=\"defn\"\n value={formData.defn}\n placeholder=\"Definition\"\n onChange={handleChange}\n required\n />\n </FormGroup>\n <Button>\n Create Card\n </Button>\n </Form>\n );\n}", "function createNewRowForm() {\n var element = document.getElementById('Add' + (rowsCount - 1));\n if (element) {\n element.remove();\n }\n //getting the form wrapper where all elements will be added\n var node = document.getElementById(\"form block\");\n //creating new div element which will be one row in form\n var newDiv = document.createElement('div');\n //assigning id and class to div element\n newDiv.className = \"formRow\";\n newDiv.id = \"row\" + rowsCount;\n\n //creating label for input label\n var newLabel = document.createElement('label');\n newLabel.textContent = 'Element ' + rowsCount + ' :';\n newLabel.className = \"leftMarginForm\";\n newLabel.id = \"label \" + rowsCount;\n //adding label to div element,label have id and class assigned\n newDiv.appendChild(newLabel);\n //creating text input for label which was created above\n var newInput = document.createElement('input');\n newInput.placeholder = 'Element ' + rowsCount + '...';\n newInput.type = \"text\";\n newInput.id = \"inpt\" + rowsCount;\n newInput.className = \"leftMarginForm\";\n //adding created text input to div element\n newDiv.appendChild(newInput);\n //creating dropdown list with input type options\n var newInputDrop = document.createElement('select');\n newInputDrop.id = \"inputType\" + rowsCount;\n newInputDrop.className = \"leftMarginForm\";\n\n var option2 = document.createElement(\"option\");\n option2.text = \"Check Box\";\n option2.setAttribute('value', 'Check Box');\n option2.setAttribute('selected', false);\n option2.id = \"opt\" + (rowsCount) + \"\" + \"2\";\n newInputDrop.add(option2);\n var option3 = document.createElement(\"option\");\n option3.text = \"Radio Button\";\n option3.id = \"opt\" + (rowsCount) + \"\" + \"3\";\n option3.setAttribute('selected', false);\n option3.setAttribute('value', 'Radio Button');\n\n\n newInputDrop.add(option3);\n var option1 = document.createElement('option');\n\n option1.text = \"Text Box\";\n option1.id = \"opt\" + (rowsCount) + \"\" + \"1\";\n option1.setAttribute('selected', true);\n option1.setAttribute('value', 'Text Box');\n newInputDrop.add(option1);\n newInputDrop.className = \"formDrop \" + rowsCount;\n newInputDrop.setAttribute(\"onchange\", \"createAdditions(this.id,this.value)\");\n //adding dropdown to its parent\n newDiv.appendChild(newInputDrop);\n var newTypeDrop = document.createElement('select');\n newTypeDrop.id = \"type\" + rowsCount;\n var opt1 = document.createElement('option');\n //creating options for input restrictions\n opt1.text = \"None\";\n opt1.id = \"type\" + rowsCount + \"\" + \"1\";\n opt1.selected = true;\n\n var opt2 = document.createElement(\"option\");\n opt2.text = \"Mandatory\";\n opt2.id = \"type\" + rowsCount + \"\" + \"2\";\n opt2.selected = false;\n newTypeDrop.add(opt2);\n var opt3 = document.createElement(\"option\");\n opt3.text = \"Numeric\";\n opt3.id = \"type\" + rowsCount + \"\" + \"3\";\n opt3.selected = false;\n newTypeDrop.add(opt3);\n newTypeDrop.add(opt1);\n\n newTypeDrop.id = \"typeDrop \" + rowsCount;\n newTypeDrop.className = \"leftMarginForm\";\n newTypeDrop.setAttribute('onchange', 'setQuantity(this.id);')\n newDiv.append(newTypeDrop);\n var newAdd = document.createElement('input');\n newAdd.type = \"button\";\n newAdd.value = \"Add new\";\n newAdd.className = \"leftMarginForm\";\n newAdd.id = \"Add\" + rowsCount;\n newAdd.setAttribute(\"onclick\", \"createNewRowForm();\");\n newDiv.append(newAdd);\n\n //kreiranje i dodavanje horizontalne linije\n\n //povećavanje varijable zbog identificiranja redova formulara\n rowsCount++;\n \n node.appendChild(newDiv);\n\n\n}", "function initializePage_createAccount()\r\n{\r\n page_createAccount.initializeForm(page_createUserAccount);\r\n}", "function order_create_get(req, res, next) {\n let obj = getObjectToShowForm('Create Order');\n res.render('order_form', obj);\n}" ]
[ "0.7856063", "0.77676296", "0.72450745", "0.7109319", "0.6905929", "0.688041", "0.6855157", "0.6818233", "0.671859", "0.66371775", "0.66106206", "0.659762", "0.6581909", "0.6565585", "0.6519855", "0.6513095", "0.64874184", "0.644436", "0.643765", "0.6418902", "0.6408944", "0.6390237", "0.6382963", "0.6367549", "0.6345911", "0.6335064", "0.6311136", "0.6298098", "0.62832206", "0.6282219", "0.6278806", "0.6256691", "0.62543803", "0.62410706", "0.6237733", "0.62269455", "0.62254065", "0.6210741", "0.61879945", "0.6174609", "0.6159902", "0.61556655", "0.6154196", "0.6133371", "0.6118694", "0.61162937", "0.61091495", "0.60729843", "0.60532093", "0.6052508", "0.6041945", "0.60345", "0.6034482", "0.6031377", "0.60255253", "0.6023166", "0.60103256", "0.6001437", "0.5994912", "0.59879565", "0.59872645", "0.5976573", "0.5975719", "0.5968318", "0.5967112", "0.59634763", "0.5961164", "0.59478813", "0.5942255", "0.5940926", "0.592734", "0.59243166", "0.5921659", "0.5904574", "0.58950263", "0.5859975", "0.5855551", "0.5848134", "0.5847675", "0.5845196", "0.5831147", "0.58270127", "0.58248293", "0.58191144", "0.58123636", "0.5799822", "0.5789093", "0.57859176", "0.5779501", "0.57649493", "0.5763477", "0.57621336", "0.5756861", "0.57568216", "0.57502526", "0.5743827", "0.5741877", "0.57401365", "0.5723573", "0.57223475" ]
0.7125773
3
May produce error since it was edited without being tested afterwards
function completePartialTime(partialText) { let timeText = timeTexts.filter((timeText) => timeText.y < partialText.y) .sort((a, b) => b.y - a.y)[0] let parts = timeText.text.split(':').map((str) => parseInt(str)) let hour = parts[0] let minute = parts[1] let partialMinute = parseInt(partialText.text) // If a new hour has started since the above text // For example if above text is 9:50 and partial text is 00 if (partialMinute < minute) hour++ partialText.text = hour + ':' + partialMinute return partialText }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "edit(args) {\r\n throw \"Error this method should be overridden by its extended class\";\r\n }", "function StupidBug() {}", "function VeryBadError() {}", "update() {\r\n throw new Error('must be set in subclass');\r\n }", "transient private protected internal function m182() {}", "afterValidChange() { }", "update()\n\t{ \n\t\tthrow new Error(\"update() method not implemented\");\n\t}", "private public function m246() {}", "update() {\n throw new Error(\"Not Implemented\");\n }", "preorder() {\n throw new Error(\"This method hasn't been implemented yet!\");\n }", "method() {\n throw new Error('Not implemented');\n }", "function createOrderError() {\n\t $scope.editOrder.replacing = false;\n\t $rootScope.load_notification('replace_error');\n\n\t if (!$scope.offers[$scope.editOrder.seq]) $rootScope.load_notification('replace_error_gone');\n\t }", "static get INVALID()\n\t{\n\t\treturn 2;\n\t}", "updated() {}", "protected internal function m252() {}", "postorder() {\n throw new Error(\"This method hasn't been implemented yet!\");\n }", "private internal function m248() {}", "transient private internal function m185() {}", "function setterError() {\n console.error('[Litex][error] : Cannot mutate state property outside of a mutation');\n}", "function useless() {\n console.error('Error in fake:true');\n }", "function createOrderError() {\n $scope.editOrder.replacing = false;\n $rootScope.load_notification('replace_error');\n\n if (!$scope.offers[$scope.editOrder.seq]) $rootScope.load_notification('replace_error_gone');\n }", "isErr() {\n return false;\n }", "transient protected internal function m189() {}", "function no__MODIFICATION__ALLOWED__ERR_ques_(domException) /* (domException : domException) -> bool */ {\n return (domException === 7);\n}", "edit() {\n }", "function HeaderCalendar_Exception()\n{\n\tif (boolSaveChanges || bSelectChanged)\n\t{\n\t\tSaveChanges(\"MoveToHeaderCalendar_Exception()\", \"Exception\");\n\t}\n\telse\n\t{\n\t\tMoveToHeaderCalendar_Exception();\n\t}\n}", "patch() {\n }", "function n(e){return e&&null!=e.applyEdits}", "static get ERROR() { return 3 }", "set booking(stuff){\n throw \"sorry you cannot do this\"\n }", "function zg(e,t){if(!e){const r=new Error(t||\"Assertion failed\");throw Error.captureStackTrace&&Error.captureStackTrace(r,zg),r}}", "function testFailForInvalidExtension() {\r\n\tvar testStencilSet = new ORYX.Core.StencilSet.StencilSet(\"TestStencilSet\")\r\n\ttestStencilSet.addExtension(\"StencilSetExtensionInvalid\")\r\n\r\n\tvar message = \"StencilSet.addExtension: Something went wrong when initialising the stencil set extension. TypeError: jsonExtension.extends is undefined\"\r\n\tassertEquals(\"Validate error message\", message, ORYX.Log.debugInfo)\r\n}", "static get ERROR () { return 0 }", "isErr() {\n return true;\n }", "static get FAIL() { return 1; }", "function throwUsageError() {\n throw new Error(exports.uniqueId + \" must be applied to method or getter\");\n}", "isDirty() {\r\n\r\n // resume\r\n return false;\r\n }", "function failTest(error) {\n expect(error).toBeUndefined();\n }", "function failTest(error) {\n expect(error).toBeUndefined();\n }", "validateEditPlayerName(idPlayer, newName)\n {\n if (this.hasAnyPlayerName(idPlayer, newName))\n {\n throw new Error(\"ERROR DE EDICION: Ya existe un jugador con el nombre \" + newName);\n } \n }", "transient final protected internal function m174() {}", "function testFailForCorruptedJSON() {\r\n\ttry {\r\n\t\tvar testStencilSet = new ORYX.Core.StencilSet.StencilSet(\"TestCorruptedStencilSet\")\r\n\r\n\t\tfail(\"Test case should fail yet, because of corrupted stencil set json format.\")\r\n\t} catch (e) {\r\n\t\tif ((e instanceof JsUnitException)) {\r\n\t\t\tthrow e\r\n\t\t}\r\n\t}\r\n}", "__init12() {this.error = null}", "function _throwNoContextError() {\n console.error(\"Cannot edit a Shot without knowing the context.\");\n return new Error(\"Cannot edit a Shot without knowing the context.\");\n}", "function treatNewEditFail(response) {\n\t$successEditMessageElement.hide();\n\n\tprintOutAllNewEditErrors(response);\n\thighlightFieldErrorInputs(response.fieldErrors);\n}", "static notImplemented_() {\n throw new Error('Not implemented');\n }", "transient final private protected internal function m167() {}", "function testFailForInvalidParameterStencilSetEqual() {\r\n\ttry {\r\n\t\tvar testStencilSet = new ORYX.Core.StencilSet.StencilSet(\"StencilSetWithoutRoot\")\r\n\t\ttestStencilSet.equals(\"invaildStencilSet\")\r\n\t\tfail(\"Test should fail yet for passing invalid stencil set\")\r\n\t} catch (e) {\r\n\t\tif (e != \"Invaild Stencilset\") {\r\n\t\t\tthrow e\r\n\t\t}\r\n\t}\r\n\r\n}", "fixErrorLocation(error) {\n error.index = this.locationMap.remapIndex(error.index);\n\n const loc = this.microTemplateService.getLocFromIndex(error.index);\n error.lineNumber = loc.line;\n error.column = loc.column + 1;\n }", "_validate() {\n throw new Error('_validate not implemented in child class');\n }", "function failTest(error) {\n expect(error).toBeUndefined();\n }", "function failTest(error) {\n expect(error).toBeUndefined();\n }", "function checkForErrorByIndex(state, index, newValue) {\n return state.solution[index] !== newValue;\n}", "setError(state, newError) {\n state.error = newError;\n }", "function croak(err) {\n throw new Error(`${err} (${line}:${col})`);\n }", "function Failer() { }", "function Failer() { }", "_getChangedEntityHpTempPath() {\n throw new Error('Child class must implement `_getChangedEntityHpTempPath`');\n }", "static transient final private internal function m43() {}", "editTattoo () {\n\n }", "_add () {\n throw new Error('not implemented')\n }", "run() {\n\t\tthrow new Error;\n\t}", "function In(e,t){if(!e)throw new Error(t)}", "function error() {\n if (element[0].src !== newSrc) {\n element[0].src = newSrc;\n }\n }", "function testBadCall()\n{\n assert( 1 / 0);\n}", "_beforeChange () {\n // nop\n }", "_beforeChange () {\n // nop\n }", "validateBeforeUpdate (id, newData, prevData) { return true }", "function testGoodUpdate (cb) {\n function checkNewComponent (component) {\n t.ok(component, 'component ok')\n fns._uncache(goodOriginPath)\n var expectedFn = require(goodOriginPath)\n t.deepEqual(component._fn.toString(), expectedFn.toString(), 'component._fn is what we\\'d expect from new path')\n componentS.offValue(checkNewComponent)\n cb()\n }\n componentS.onValue(checkNewComponent)\n // copy origin2 to origin1\n utils.copyFile(goodOriginPath2, goodOriginPath, () => {\n t.ok(true, 'copied file')\n })\n }", "function MultiplicatorUnitFailure() {}", "validate() {}", "_validate() {\n\t}", "function fail() {\n throw new Error(\"BFS has reached an impossible code path; please file a bug.\");\n}", "function test_triggered_refresh_shouldnt_occurs_for_dialog_after_changing_type_to_static() {}", "function test_entries_shouldnt_be_mislabeled_for_dropdown_element_in_dialog_editor() {}", "transient private protected public internal function m181() {}", "function _assertUnremoved() {\n\t if (this.removed) {\n\t throw this.errorWithNode(\"NodePath has been removed so is read-only.\");\n\t }\n\t}", "function _assertUnremoved() {\n\t if (this.removed) {\n\t throw this.errorWithNode(\"NodePath has been removed so is read-only.\");\n\t }\n\t}", "updatePositions() {\n throw 'not implemented';\n }", "error() {}", "conflicts() {\n this.log('conflicts');\n }", "function CustomError() {}", "valid() {\r\n return true\r\n }", "function throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) {\n var field = propName ? \" for '\".concat(propName, \"'\") : '';\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value\".concat(field, \": '\").concat(oldValue, \"'. Current value: '\").concat(currValue, \"'.\");\n\n if (creationMode) {\n msg += \" It seems like the view has been created after its parent and its children have been dirty checked.\" + \" Has it been created in a change detection hook?\";\n } // TODO: include debug context, see `viewDebugError` function in\n // `packages/core/src/view/errors.ts` for reference.\n\n\n throw new RuntimeError(\"100\"\n /* EXPRESSION_CHANGED_AFTER_CHECKED */\n , msg);\n }", "undo() {\n throw new Error(\"Undo function must be overwritten in child class\");\n }", "function error_edit() {\n toaster.error('Ocorreu um erro','Não foi possível editar.');\n }", "function fixError(r, code) {\n // call fix function\n if (errors.hasOwnProperty(r.raw)) {\n errors[r.raw].fix(r, code);\n }\n }", "function failMatcher(inspection, error) {\n inspection.failureReason = error;\n return false;\n}", "sharpen(){cov_14q771vu2z.f[3]++;cov_14q771vu2z.s[22]++;if(this.length===0){cov_14q771vu2z.b[6][0]++;cov_14q771vu2z.s[23]++;throw new Error('Your pencil has a length and durability of 0! You need a new one!');}else{cov_14q771vu2z.b[6][1]++;cov_14q771vu2z.s[24]++;this.pencilDurability=40000;cov_14q771vu2z.s[25]++;this.length-=1;}}", "validate() { }", "function invalid__MODIFICATION__ERR_ques_(domException) /* (domException : domException) -> bool */ {\n return (domException === 13);\n}", "hasInvalidSettings(settings){}", "function throwErr(error) {\n document.getElementById('errors').innerHTML =\n document.getElementById('errors').innerHTML + '<br/>' +\n error;\n gridWidth = 0\n throw error;\n}", "function fixOldSave(oldVersion){\n}", "function fixOldSave(oldVersion){\n}", "function u(e){return-1<Object.prototype.toString.call(e).indexOf(\"Error\")}", "function fail(item) {\n\tif (typeof item.name !== 'string' || typeof item.durability !== 'number' || typeof item.enhancement !== 'number') {\n\t\tthrow new Error('Information is not correct');\n\t}\n\n\tlet newItem = item;\n\n\tif (newItem.enhancement < 15) {\n\t\tnewItem.durability -= 5;\n\t} else {\n\t\tnewItem.durability -= 10;\n\t\tif (newItem.durability < 0) newItem.durability = 0;\n\t\tif (newItem.enhancement > 16) {\n\t\t\tnewItem.enhancement--;\n\t\t}\n\t}\n\treturn newItem;\n}", "function throwErrorIfNoChangesMode(creationMode, oldValue, currValue) {\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '\" + oldValue + \"'. Current value: '\" + currValue + \"'.\";\n if (creationMode) {\n msg +=\n \" It seems like the view has been created after its parent and its children have been dirty checked.\" +\n \" Has it been created in a change detection hook ?\";\n }\n // TODO: include debug context\n throw new Error(msg);\n}", "function throwErrorIfNoChangesMode(creationMode, oldValue, currValue) {\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '\" + oldValue + \"'. Current value: '\" + currValue + \"'.\";\n if (creationMode) {\n msg +=\n \" It seems like the view has been created after its parent and its children have been dirty checked.\" +\n \" Has it been created in a change detection hook ?\";\n }\n // TODO: include debug context\n throw new Error(msg);\n}", "function throwErrorIfNoChangesMode(creationMode, oldValue, currValue) {\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '\" + oldValue + \"'. Current value: '\" + currValue + \"'.\";\n if (creationMode) {\n msg +=\n \" It seems like the view has been created after its parent and its children have been dirty checked.\" +\n \" Has it been created in a change detection hook ?\";\n }\n // TODO: include debug context\n throw new Error(msg);\n}", "_stateChanged(_state) {\n throw new Error('_stateChanged() not implemented');\n }" ]
[ "0.61428", "0.612417", "0.6087249", "0.59984326", "0.5951818", "0.59509546", "0.58748704", "0.5843404", "0.5739072", "0.5722244", "0.566768", "0.5645219", "0.5644132", "0.5635358", "0.5599562", "0.55769557", "0.5562799", "0.5559864", "0.5554928", "0.5548569", "0.55451524", "0.55285615", "0.5501349", "0.54898494", "0.54880255", "0.547435", "0.5469692", "0.54683286", "0.54584837", "0.54404575", "0.5438981", "0.54387486", "0.54194367", "0.5398568", "0.539666", "0.5394423", "0.5389697", "0.53785574", "0.53785574", "0.5369637", "0.536466", "0.535433", "0.534721", "0.5344139", "0.5331074", "0.5327688", "0.5300959", "0.5292407", "0.52847254", "0.52689147", "0.52688444", "0.52688444", "0.5258226", "0.5252819", "0.52523994", "0.52480614", "0.52480614", "0.5246479", "0.52393454", "0.5238093", "0.52361757", "0.52324843", "0.5225794", "0.52236855", "0.52231854", "0.5217073", "0.5217073", "0.52154857", "0.52132344", "0.52110237", "0.5209822", "0.52075744", "0.52009857", "0.51995754", "0.51989514", "0.51893395", "0.5180985", "0.5180985", "0.51719534", "0.51707786", "0.51691616", "0.516545", "0.51634353", "0.51564366", "0.5150958", "0.51508534", "0.51297915", "0.5126159", "0.51253146", "0.51227045", "0.5122329", "0.51172465", "0.5116715", "0.5110679", "0.5110679", "0.5110393", "0.51080793", "0.50969946", "0.50969946", "0.50969946", "0.5095945" ]
0.0
-1
Get the list of all football leagues
function getSoccerLeaguesOnly(leagues) { return leagues.filter(league => { return league.strSport === 'Soccer'; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLeagueList() {\n return League.find({}, \"name\").exec();\n}", "function getLeagues(req, rsp) {\n debug(\"/leagues called\");\n leaguesModel.getLeagues((err, leagues) => {\n if (err!==undefined) {\n debug(\"/leagues read ERROR:\");\n debug(err);\n }\n rsp.render(\"leagues\", {title: \"Leagues List\", leagues: leagues,user:userModel.getNameFromUser(req.user) })\n });\n}", "function getLeagues() {\n fetch(leagueUrl)\n .then((response) => {\n if (response.ok) {\n return response.json();\n }\n throw new Error(response.statusText);\n })\n .then((responseJson) => displayLeaguesInput(responseJson))\n .catch((err) => {\n $(\"#js-error-message\").text(`Something went wrong:${err.message}`);\n });\n}", "function getTeamList() {\n return Team.find({}, \"team_name\").exec();\n}", "async getLeagues(countryID) {\n const results = await axios.get(`${this.URL}/${this.ACTIONS.getLeagues}&country_id=${countryID}&${this.KEY}`);\n return results.data\n }", "function getLeagues(leagueNames, cb) {\n http.request(new Options(), null , processLeagues);\n\n var body = \"\";\n\n function processLeagues(res) {\n res.on(\"data\", function(chunk) {\n body += chunk;\n });\n\n res.on(\"end\", function(chunk) {\n cb(null, JSON.parse(body))\n });\n }\n\n}", "function getUserLeagues() {\n var userId = $window.localStorage.getItem('com.tp.userId');\n DashboardFactory.getUserLeagues(userId)\n .then(function(userLeagues){\n $scope.userLeagues = userLeagues;\n });\n }", "getLeaguesWithTeams(db) {\n return db\n .distinct('league_id')\n .from('league_teams')\n .then(leaguesTeams => leaguesTeams)\n }", "function getAll() {\n return new Promise(function(resolve, reject) {\n dbPromised\n .then(function(db) {\n let tx = db.transaction(\"teams\", \"readonly\");\n let store = tx.objectStore(\"teams\");\n return store.getAll();\n })\n .then(function(teams) {\n resolve(teams);\n });\n });\n}", "getAllPlayers(){\n var allPlayers = [];\n for(var i = 0; i < this.teams.length; i++){\n var team = this.teams[i];\n for(var j = 0; j < team.players.length; j++){\n var player = team.players[j];\n allPlayers.push(player);\n }\n }\n return allPlayers;\n }", "function teamNames() {\n return [homeTeam().teamName, awayTeam().teamName];\n}", "async function getGlobalLeaders() {\n MutationResult.innerHTML = `<h5>Global Leaderboard</h5>`;\n\t MutationEventButton.innerHTML=`View Following Leaderboard`;\n QueryResult.innerHTML = ``;\n var leaderboardArray = [];\n var mtArray =[]\n\n //List other user's points by applying a filter to only query users not equal to currentUser\n await API.graphql(graphqlOperation(listUsers)).then((evt) => {\n evt.data.listUsers.items.map((user, i) => {\n leaderboardArray.push(user);\n });\n })\n await leaderboardArray.sort(function(a, b){return b.points - a.points});\n await leaderboardArray.forEach((user, i) => QueryResult.innerHTML += `<div style=\"display: flex; justify-content: space-between; padding: 10px; margin-left: 0px; margin-right: 40px; margin-top: 10px; margin-bottom: 10px; width: 500; border-radius: 25px; border-style: solid;\"><div>${i+1}</div><div style=\"font-weight: bold;\">${user.username}</div><div>${user.points}</div></div>`);\n }", "async function getAllChampions() {\n return await new Promise((resolve) => {\n kayn.DDragon.Champion.list()\n .then(championList => {\n function getChampionList() {\n resolve(championList);\n }\n getChampionList();\n }).catch(error => resolve(null));\n }).catch(error => console.log(error));\n }", "function leaguesWithWins() {\n // CODE HERE\n const ligas = leagues.map(liga => {\n var champions = 0;\n\n // Recorro las ligas y las asocio con teamsByLeague.\n teamsByLeague.forEach(team => {\n if (liga.id === team.leagueId) {\n // Para cada equipo que sea igual en ID al existente en winsByTeams, sumo lus victorias. tomando en cuenta que en este punto, estoy ubicado en una liga en especifico\n champions += winsByTeams.find(items => items.teamId === team.teamId).wins;\n }\n });\n\n // Retorno un objeto con el nombre de la liga y las sumatorias de las champions ganadas por esas ligas\n return {\n liga: liga.name,\n champions\n }\n });\n\n return ligas;\n}", "function getParticipants() {\n return db.sqlQuery(getparticipants);\n}", "getAll () {\n View.out('----------- Teams -----------' + View.NEWLINE())\n View.out(this.getTeams())\n View.out(View.NEWLINE() + '----------- Games -----------' + View.NEWLINE())\n View.out(this.getGames())\n View.out(View.NEWLINE() + '----------- Canterbury Geams -----------' + View.NEWLINE())\n View.out(this.getCanterburyGames('Canterbury') + View.NEWLINE())\n View.out('----------- Crossover Games -----------' + View.NEWLINE())\n View.out(this.getCrossOverGames())\n }", "listarLigas() {\n \n axios\n .get(`${config.league.leagues}`)\n .then(res => {\n this.setState({ \n listaLigas: res.data.content\n })\n })\n .catch(res => {\n toast.error('Erro ao listar as ligas. Erro: ' + res.response.data.messages);\n });\n\n }", "getAllGames(){\t\n\t\tlet games = [];\n\t\tfor(let i = 0;i<this.games.length();i++){\n\t\t\tgames.push(this.games.at(i).getLobbyVersion());\n\t\t}\n\t\treturn games;\n\t}", "function getLeagues() {\n // Callbacks --> callback parameter\n // $http({\n // method: 'GET',\n // url: 'http://elite-schedule.net/api/leaguedata'\n // })\n // .then(function successCallback(data, status, headers, config) {\n // callback(data);\n // },\n // function errorCallback(data, status, headers, config) {\n //\n // });\n\n // $q\n var deferred = $q.defer(),\n cacheKey = 'leagues',\n leaguesData; // = self.leaguesCache.get(cacheKey)\n $ionicLoading.show({\n template: 'Loading...'\n });\n console.log('Leagues cache data' + leaguesData);\n if (leaguesData) {\n console.log('Found data insede cache ', leaguesData);\n deferred.resolve(leaguesData);\n } else {\n $http({\n method: 'GET',\n url: 'http://elite-schedule.net/api/leaguedata'\n })\n .then(function successCallback(data, status, headers, config) {\n /*\n Is posible use $timeout if you want wait this explicit time\n (inject $timeout before)\n $timeout(function(){\n // todo\n },time ms);\n\n */\n deferred.resolve(data);\n $ionicLoading.hide();\n },\n function errorCallback(data, status, headers, config) {\n $ionicLoading.hide();\n deferred.reject();\n });\n return deferred.promise;\n }\n\n }", "function loadTeams() {\n doAjax(TEAM_URL + '/get').then(data => {\n data.forEach(team => {\n console.log('Team ->', team.name);\n });\n });\n}", "async function getAllTeams(){\n return await season_utils.getTeamsBySeasonId(18334);\n}", "function getLeagueTeams(req, rsp,next) {\n debug(\"/teams for:\"+req.params.id);\n leaguesModel.getTeams(parseInt(req.params.id),(err, fixtures) => {\n if (err!==undefined) debug(\"/league read ERROR:\"+err);\n debug(\"/teams read:\"+fixtures[0]);\n rsp.render(\"teams\", {title: fixtures[0], fixtures: fixtures.fixtures })\n });\n}", "function loadLeaguesDropDownList(leagues) {\n\n let leaguesLength = leagues.length;\n for (let i = 0; i < leaguesLength; i++) {\n $(\"#division\").append($(\"<option>\", {\n value: leagues[i].Name,\n text: leagues[i].Name + \" \" + \"(\" + leagues[i].Description + \")\"\n }));\n }\n}", "function getPeople() {\n return ['Arpan', 'Moni', 'Sandeep', 'Tejas'];\n}", "static async list(){\n let sql = 'Select * from theloai';\n let list =[];\n try {\n let results = await database.excute(sql);\n results.forEach(element => {\n let tl = new TheLoai();\n tl.build(element.id,element.tenTheLoai,element.moTa);\n list.push(tl);\n });\n return list;\n\n } catch (error) {\n throw error; \n } \n }", "getUserTeams(){\n let teamsResult = this.props.teamsResult;\n let userTeams = new Array;\n teamsResult.forEach((team) => {\n team.members.forEach((member) => {\n if(member == this.username){\n userTeams.push(team);\n }\n });\n });\n return userTeams;\n }", "function getTeamList() {\n if (\"caches\" in window) {\n caches.match(ENDPOINT_EPL + \"teams\").then(function (response) {\n if (response) {\n response.json().then(function (data) {\n showTeamList(data);\n })\n }\n })\n }\n\n fetchAPI(ENDPOINT_EPL + \"teams\")\n .then(data => {\n showTeamList(data);\n })\n .catch(error);\n}", "getTeams () {\n let result = `TEAMS ${View.NEWLINE()}`\n result += `Premiership Division ${View.NEWLINE()}`\n\n for (let aTeam of this.allPDTeams) {\n result += aTeam + `${View.NEWLINE()}`\n }\n result += `Championship Division ${View.NEWLINE()}`\n for (let aTeam of this.allCDTeams) {\n result += aTeam + `${View.NEWLINE()}`\n }\n return result\n }", "function loadAllTournamentList() {\n Tournament.all(function(err, results) {\n this.tournament_list = results;\n var empty_tournament = new Tournament();\n empty_tournament.tournament_name = 'Not Selected';\n empty_tournament.id = \"\";\n this.tournament_list.unshift(empty_tournament); // add the new empty Not Selected list to the top of the array.\n next(); // process the next tick.\n }.bind(this));\n}", "getLeagueTeams(db, leagueId) {\n return db\n .select('team_id')\n .from('league_teams')\n .where('league_id', '=', leagueId)\n .then(leaguesTeams => leaguesTeams)\n }", "getAll() {\n const fighters = FighterRepository.getAll();\n return fighters.length ? fighters : null;\n }", "getTeamsByFixtures () {}", "function getParticipants(callback) {\n\tquery(\"select * from participants\", callback);\n}", "getLiveLeagueGames() {\n const query_params = {\n key: this.apiKey\n }\n return fetch(BASE_URL + DOTA_MATCHES + 'GetLiveLeagueGames/v1/?' + handleQueryParams(query_params))\n .then(response => responseHandler(response))\n .catch(e => e)\n }", "function loadAllMembers() {\n let allTeamContent = \"\";\n document.querySelector(\"#teamStatus\").innerHTML = \"<p>Team Status: \" + (6 - currentTeam.length) + \" slot(s) left on your team</p>\";\n currentTeamHTML.forEach(teamMember => {\n allTeamContent += teamMember;\n });\n document.querySelector(\"#teamInfo\").innerHTML = allTeamContent;\n}", "function getAll () {\n return pokemonList;\n }", "getUserList() {\n return this.http.get(this.url + '/cesco/getlanguages', this.httpOptions);\n }", "function getClubs(myClubs){\n let clubList = []; \n var length = myClubs.length;\n for(var i = 0; i < length ; i++){\n clubList.push(myClubs[i].title);\n }\n return clubList;\n}", "function listLanguages() {\n return new Promise((resolve, reject) => {\n translate\n .getLanguages()\n .then((results) => {\n [languages] = results;\n const randomNumber = getRandomInt(languages.length);\n target = languages[randomNumber].code;\n detectAndTranslateLanguages().then((response) => {\n translatedText = response;\n resolve(languages[randomNumber].name);\n });\n })\n .catch((err) => {\n console.error('ERROR:', err);\n reject();\n });\n });\n}", "async function getTeamsByName(name) {\n let teams_list = [];\n const teams = await axios.get(`${api_domain}/teams/search/${name}`, {\n params: {\n include: \"league\",\n api_token: process.env.api_token,\n },\n });\n // make the json\n teams.data.data.forEach(team => {\n if(team.league && team.league.data.id === LEAGUE_ID){\n teams_list.push({Team_Id:team.id ,Team_name: team.name, Team_img: team.logo_path}) \n }\n });\n return teams_list;\n}", "function getTeams() {\n\tvar teams = [];\n\tajax.controllers.Application.getTeams().ajax({\n\t\tasync: false,\n\t success: function(data) {\n\t \tteams = data;\n\t },\n\t\terror: function(data) {\n\t\t\talert(\"Erro ao obter os times\");\n\t\t}\n\t});\n\t\n\treturn teams;\n}", "function listLanguages() {\n return languageNames.concat()\n}", "async getHodlClubMembers(sort) {\n if (this.state.loading) return\n const url = `${this.apiBasePath}/hodlers`\n fetch(url)\n .then(response => response.json())\n .catch(this.setState({\n hodlClub: [],\n loading: false\n }))\n .then(data => this.setState({\n hodlClub: data,\n loading: false\n }))\n }", "function getAll() {\n return pokemonList;\n }", "function getAll() {\n return pokemonList;\n }", "function getAll() {\n return pokemonList;\n }", "function getAll() {\n return pokemonList;\n }", "function getAll() {\n return pokemonList;\n }", "getAllNamesPlayers()\n {\n return this.players.map(player => player.getName());\n }", "function getChampionIDs(){\n\n}", "function listLanguages() {\n return high.listLanguages()\n}", "async function getTeams() {\n let teams = getFromStorage(TEAMS_KEY);\n if (!teams) {\n try {\n teams = await axios.get('https://api.football-data.org/v2/competitions/PD/teams', HEADER_OPTIONS)\n .then(res => res.data.teams)\n saveToStorage(TEAMS_KEY, teams);\n } catch (err) {\n throw new Error(\"Cant get teams from server \", err);\n }\n }\n return teams;\n}", "function getPeople() {\n\treturn [ 'John', 'Beth', 'Mike'];\n}", "async api_all({response}){\n\t\t// const leaderboard = await Leaderboards.all()\n\t\tconst leaderboard = await Database.from('leaderboards').orderBy('combo', 'desc')\n\n\t\treturn response.json(leaderboard)\t\n\t}", "function getBluePlayers() {\r\n\treturn room.getPlayerList().filter(p => p.team == 2);\r\n}", "function getWinners(cb) {\n const winners = cb.map(item => {\n let homeScore = item[\"Home Team Goals\"]\n let awayScore = item[\"Away Team Goals\"]\n if(homeScore > awayScore){\n return item[\"Home Team Name\"]\n } else {\n return item[\"Away Team Name\"]\n }\n });\n return winners\n}", "getParticipants() {\n return this.participants;\n }", "getAllPlayers() {\n return Player.find({}).exec();\n }", "function getList(){\n\t\t// call ajax\n\t\tlet url = 'https://final-project-sekyunoh.herokuapp.com/get-user';\n\t\tfetch(url)\n\t\t.then(checkStatus)\n\t\t.then(function(responseText) {\n\t\t\tlet res = JSON.parse(responseText);\n\t\t\tlet people = res['people'];\n\t\t\tdisplayList(people);\n\t\t})\n\t\t.catch(function(error) {\n\t\t\t// show error\n\t\t\tdisplayError(error + ' while getting list');\n\t\t});\n\t}", "async getTeams(leagueID) {\n const results = await axios.get(`${this.URL}/${this.ACTIONS.getTeams}&league_id=${leagueID}&${this.KEY}`);\n return results.data\n }", "function getAll() {\n return pokemonList;\n }", "async getAllGiveaways() {\n // Get all giveaways from the database\n return giveawayDB.fetchEverything().array();\n }", "async getAllPeople() {\n const responseData = await fetch(\"https://ghibliapi.herokuapp.com/people\");\n\n const response = await responseData.json();\n\n return response;\n }", "function populateSearchTerms () { \n var leagues = [\"NBA\", \"NFL\", \"MLB\", \"NHL\", \"American Major League Soccer\"];\n for(var i = 0; i < leagues.length; i++){\n var queryURL = \"https://www.thesportsdb.com/api/v1/json/1/search_all_teams.php?l=\" + leagues[i];\n $.ajax({\n url: queryURL,\n method: \"GET\"\n }).then(function (response) {\n for(var j = 0; j < response.teams.length;j++){\n var teamObject = {};\n teamObject['idTeam'] = response.teams[j].idTeam;\n teamObject['strTeam'] = response.teams[j].strTeam;\n teamObject['strLeague'] = response.teams[j].strLeague;\n teamObject['strStadiumLocation'] = response.teams[j].strStadiumLocation;\n teams.push(teamObject); \n }\n });\n}\n}", "function listTrainer(props){\n let trainerList =[]\n for (let group of Object.values(pokemon)){\n \n trainerList.push(group.trainer)\n }\n return trainerList\n}", "function getLeagueLeadersList(league, list, listLength = 10, callback) {\n\n // Sort the list by the type of stat provided\n var sortBy = list;\n allPlayerData.sort(function compare(a,b) {\n if (parseFloat(a[sortBy]) > parseFloat(b[sortBy]))\n return -1;\n if (parseFloat(a[sortBy]) < parseFloat(b[sortBy]))\n return 1;\n return 0;\n })\n // Send top ten\n callback(allPlayerData.slice(0, listLength));\n}", "function getAll(){\n return pokemonList\n }", "function sortLeaguesByTeamsByWins() {\n \n // Ejercicio muy parecido al 3, solo que en este caso, ordeno las ligas de mayor a menos segun las victorias de sus equipos\n const ligas = leaguesWithWins();\n\n return ligas.sort(compare).map(item => item.liga);\n\n}", "function arrayOfTeams() {\n return Object.values(gameObject());\n}", "static async getAllVolunteersAndInfo() {\n const query = `SELECT * FROM volunteers ORDER BY last_name DESC;`;\n try {\n const response = await db.result(query);\n return response;\n } catch (err) {\n console.log(\"DB ERROR: \", err.message);\n return err.message;\n }\n }", "function all() {\n var url = `${baseUrl}/api/matches`\n return $http.get(url)\n .then((matches) => {\n // matches have virtual odds property\n allMatches = matches.data;\n return matches;\n });\n }", "@api \n get playersJoinedListData() {\n return this._playersJoinedListData;\n }", "async getAllTokens(page, options) {\n const tokens = [];\n let teamsList = await page.$$(`${CbsAPI.teams.prefixSelector}${options.sport}${CbsAPI.teams.suffixSelector}`);\n console.log(`[cbs api] - found ${teamsList.length} team(s)`);\n const hrefs = [];\n for (let i = 0; i < teamsList.length; i++) {\n const prop = await teamsList[i].getProperty('href');\n const href = await prop.jsonValue();\n hrefs.push(href);\n }\n for (let i = 0; i <hrefs.length; i++) {\n console.log(`[cbs api] - navigate to ${hrefs[i]} to get check league type and access_token`);\n const token = await this.getAccessToken(page, hrefs[i]);\n tokens.push(token);\n }\n return tokens.filter(token => CbsAPI.allowedTypes.includes(token.leagueType));\n }", "function getUsers(){\n if(robot.brain.data.users){\n for (var user in robot.brain.data.users){\n blamepeople.push(robot.brain.data.users[user].name);\n }\n }\n robot.brain.set('blamepeople', blamepeople);\n }", "function getLeague(req, rsp,next) {\n debug(\"/league called wit Caption:\"+req.params.id);\n //rsp.end(\"League \" + req.params.caption + \" requested\");\n leaguesModel.getLeague(req.params.id,(err, league) => {\n if (err!==undefined) debug(\"/league read ERROR:\"+err);\n debug(\"/league read:\"+league);\n rsp.render(\"league\", {title: league.caption, league: league,user:userModel.getNameFromUser(req.user) })\n });\n}", "async function findAllActiveHunters() {\n try {\n const options = {\n where: {\n active: true,\n },\n };\n // findAll returns an iterable\n const hunters = await bounty_hunters_db.hunter.findAll();\n\n // log the names of each hunter\n hunters.forEach((hunter) => {\n console.log(hunter.name, hunter.active);\n });\n } catch (error) {\n console.log(\"🔥🔥🔥\", error);\n }\n}", "async getTeamUsers () {\n\t\tthis.debug('\\tGetting users on team...');\n\t\tconst users = await this.data.users.getByQuery(\n\t\t\t{\n\t\t\t\tteamIds: this.team.id\n\t\t\t},\n\t\t\t{\n\t\t\t\thint: UserIndexes.byTeamIds\n\t\t\t}\n\t\t);\n\t\tthis.users = users.reduce((usersHash, user) => {\n\t\t\tusersHash[user.id] = user;\n\t\t\treturn usersHash;\n\t\t}, {});\n\t\tthis.debug(`\\t${Object.keys(this.users).length} users found on team`);\n\t}", "listParticipants(options = {}) {\n const { span, updatedOptions } = createSpan(\"ChatThreadClient-ListParticipants\", options);\n try {\n const iter = this.listParticipantsAll(updatedOptions);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings = {}) => {\n return this.listParticipantsPage(settings, updatedOptions);\n }\n };\n }\n catch (e) {\n span.setStatus({\n code: CanonicalCode.UNKNOWN,\n message: e.message\n });\n throw e;\n }\n finally {\n span.end();\n }\n }", "function leaguesWithTeamWithLestWins() {\n // CODE HERE\n\n const ligas = leagues.map(liga => {\n var champions = 10;\n var aux;\n // Recorro las ligas y las asocio con teamsByLeague.\n teamsByLeague.forEach(team => {\n aux = 0;\n if (liga.id === team.leagueId) {\n // Para cada equipo que sea igual en ID al existente en winsByTeams, sumo lus victorias. tomando en cuenta que en este punto, estoy ubicado en una liga en especifico\n aux = winsByTeams.find(items => items.teamId === team.teamId);\n \n if (aux.wins <= champions) {\n champions = aux.wins;\n nameEquipo = teams.find( nameEquipo => nameEquipo.id === aux.teamId ).name;\n }\n }\n });\n \n return {\n [liga.name]: nameEquipo\n }\n });\n return creaObj(ligas);\n}", "function getPeople() {\n return ['John', 'Beth', 'Mike'];\n}", "function getPeople() {\n return ['John', 'Beth', 'Mike'];\n}", "function loadAll() {\n return volunteersAutoComplete;\n }", "function loadAll() {\n return volunteersAutoComplete;\n }", "function _getThePeople() {\n\tconst match = _storage.getState().Match;\n\tconst { uid } = _storage.getState().Main.user;\n\treturn Object.keys(match.players).map(_pid => {\n\t\tconst pl = match.players[_pid];\n\t\tif (pl.status !== 'D') {\n\t\t\treturn Div({className: 'player-box'}, [\n\t\t\t\t(match.id === uid && _pid !== uid)\n\t\t\t\t? Div({ className: 'delete-btn', onclick: kick })\n\t\t\t\t: Div(),\n\t\t\t\tSpan({}, pl.displayName),\n\t\t\t\tDiv({ className: 'score' }, [Span({}, `x${pl.score}`), Span({className: 'score-coin'})])\n\t\t\t])\n\t\t}\n\t\treturn;\n\t})\n}", "getUserList(room){\n var users = this.users.filter((user)=> user.room === room); /* FINDING USER WITH SAME ROOM NAME */\n var namesArray = users.map((user)=> user.name); /* SELECTING USER NAMES IN THAT ROOM */\n\n return namesArray;\n }", "async getUserRelations() {\n const teamWithUsers = await this._client.helix.teams.getTeamById(this.id);\n return teamWithUsers.userRelations;\n }", "function loadTeamList(displayLeague, displayElement) {\r\n var apiRequest = api + displayLeague;\r\n //fetch selected API\r\n fetch(apiRequest)\r\n .then(response => {\r\n return response.json()\r\n })\r\n .then(data => {\r\n //create the list with the teams from selected league\r\n //each team is represented by a div element that consist of name, picture and short description\r\n var i = 0;\r\n while (i<data.teams.length) {\r\n var team = data.teams[i];\r\n //the picture will be either the badge or the kits\r\n var pic = (displayElement === \"b\") ? team.strTeamBadge : team.strTeamJersey;\r\n //create display box\r\n var teamDiv = createDisplayBox(team.strTeam, pic, team.strDescriptionEN.substring(0, 149) + \"...\");\r\n //append the teamDiv\r\n document.getElementById(\"teams\").appendChild(teamDiv);\r\n i++;\r\n }\r\n })\r\n .catch(err => {\r\n console.log(err);\r\n });\r\n}", "function getGreetList() {\n fetch('/data').then(response => response.json()).then((greets) => {\n const listElement = document.getElementById('list-container');\n listElement.innerHTML = '';\n for(i in greets){\n greets[i];\n console.log(greets[i] +\" \" +i +\" \"+ greets.length);\n listElement.append(createListElement( greets[i]));\n }\n });\n}", "function getChallenges(){\n $http.get('/challenge').then(function(response){\n console.log('challenge data:', response.data);\n vm.challengeList = response.data;\n });\n }", "get joinedTeams() {\r\n return new Teams(this, \"joinedTeams\");\r\n }", "getObjectives(){\n var allObjectives = [];\n for(var i = 0; i<this.teams.length;i++){\n allObjectives.push(this.teams[i].getObjective());\n }\n return allObjectives;\n }", "function getWinners(callback) {\n const finals = getFinals(fifaData)\n\n return getFinals(fifaData).map(function(item){\n if (item['Home Team Goals'] > item['Away Team Goals']){\n\n return item['Home Team Name'];}\n else {\n return item['Away Team Name'];\n }\n })\n}", "function getPlayersListByMatchId(homeTeamId, awayTeamId) {\r\n var wkUrl = config.apiUrl + 'teamsListByMatchId/';\r\n return $http({\r\n url: wkUrl,\r\n params: { homeTeamId: homeTeamId, awayTeamId: awayTeamId },\r\n method: 'GET',\r\n isArray: true\r\n }).then(success, fail)\r\n function success(resp) {\r\n return resp.data;\r\n }\r\n function fail(error) {\r\n var msg = \"Error getting list: \" + error;\r\n //log.logError(msg, error, null, true);\r\n throw error; // so caller can see it\r\n }\r\n }", "function getAllLanguages (db = connection) {\n return db('languages')\n}", "getGamesByTeam(team) {\n TTTPost(\"/games-by-team\", {\n team_id: team.team_id\n })\n .then(res => {\n this.setState({team: team, games: res.data.games});\n });\n }", "function makeRegistrationObjects(teams) {\n var teamNames = teams.map(function(team) {\n return team.team_name;\n });\n console.log(teamNames);\n}", "async function getPastMatches(team_id){\n let array_of_matches = [];\n const matches = await DButils.execQuery(`SELECT * FROM dbo.matches \n WHERE Played = 1 AND (HomeTeam_Id = '${team_id}' OR AwayTeam_Id ='${team_id}')`);\n for(const match of matches){\n let jason_match = await match_utils.createMatch(match);\n array_of_matches.push(jason_match);\n }\n return array_of_matches;\n}", "static getList() {\n return new Promise((resolve) => {\n setTimeout(() => {\n // build some dummy users list\n const users = [];\n for (let x = 1; x <= 28; x += 1) {\n users.push({\n id: x,\n username: `Johny ${x}`,\n job: `Employee ${x}`,\n });\n }\n resolve(users);\n }, 1000);\n });\n }", "outputListOfHobbies ()\n {\n // New list HTMLElement (<ul>)...\n const hobbyList = document.createElement( \"UL\" );\n // Loop, terminating based on the length of our hobbies property (array data-type.)\n for ( let index = 0; index < this.hobbies.length; index++ ) // index = index + 1\n { // New list item HTMLElement (<li>)...\n const hobbyListItem = document.createElement( \"LI\" );\n // Add text inside of the HTMLElement.\n hobbyListItem.textContent = this.hobbies[index]; // Index from our loop! Iterated each time.\n // Add the populated list item HTMLElement (<li>) to the list HTMLElement (<ul>).\n hobbyList.appendChild( hobbyListItem );\n }\n // Add the whole populated list HTMLElement (<ul>) to the webpage (inside <body>).\n document.body.appendChild( hobbyList );\n }", "getFeaturedPlayers(){\n return client({\n method: 'GET',\n path: PLAYER_SEARCH_ROOT+\"getAllByOrderByEloDesc\",\n params: {\n page: 0,\n size: 3\n }\n })\n }", "function listTeams(data){\n const listOfTeams = data.sort(groupSort).map(item => renderTeamList(item));\n $('.list-of-teams-container').append(listOfTeams);\n}" ]
[ "0.72773635", "0.6963674", "0.6731284", "0.66159254", "0.65268844", "0.63987297", "0.62263095", "0.61689657", "0.5988584", "0.59744275", "0.590825", "0.5859607", "0.58498526", "0.5841703", "0.58183575", "0.5811717", "0.57797885", "0.5709118", "0.5701218", "0.57001966", "0.56872714", "0.56414336", "0.56302255", "0.5628893", "0.5597377", "0.5587837", "0.5582619", "0.55775183", "0.55760944", "0.5558532", "0.5541856", "0.5523048", "0.5521418", "0.54815114", "0.54780185", "0.5443984", "0.54436004", "0.5433303", "0.54322904", "0.54123497", "0.5396319", "0.53955495", "0.5385496", "0.5385168", "0.5385168", "0.5385168", "0.5385168", "0.5385168", "0.5380167", "0.537981", "0.53739184", "0.5352375", "0.5351513", "0.5349889", "0.53453696", "0.5343571", "0.5338518", "0.5337742", "0.5310112", "0.53086597", "0.530359", "0.5284863", "0.5284448", "0.5279065", "0.5272519", "0.52601033", "0.52559555", "0.52409834", "0.5240221", "0.52338755", "0.523241", "0.5229518", "0.52277637", "0.52268416", "0.5225542", "0.5224466", "0.5224285", "0.5204776", "0.52044654", "0.51972216", "0.51972216", "0.5195618", "0.5195618", "0.5184189", "0.51764935", "0.5174145", "0.51727295", "0.51708174", "0.5164767", "0.51584244", "0.5156067", "0.51493627", "0.514714", "0.51356155", "0.51306736", "0.5123675", "0.51234496", "0.5120594", "0.5119809", "0.51165444", "0.5109028" ]
0.0
-1
Return shortened URLs that belong to a user in an object
function urlsForUser(id, database) { let urls = {}; for (const url in database) { if (database[url].userID === id) { urls[url] = database[url]; } } return urls; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function urlsForUser(id) {\n let usersUrl = {}\n for (shortURL in urlDatabase) {\n if (urlDatabase[shortURL].userID === id){\n usersUrl[shortURL]= (urlDatabase[shortURL][shortURL]);\n }\n }\n return usersUrl;\n}", "function urlsForUserId(user_id) {\n const urls = {};\n for (const short in urlDatabase) {\n if (urlDatabase[short].userID === user_id) {\n urls[short] = urlDatabase[short].url;\n }\n }\n return urls;\n}", "function urlsForUser(id){\n const userUrl = {};\n for(shortURL in urlDatabase){\n if(urlDatabase[shortURL].userID === id){\n userUrl[shortURL] = urlDatabase[shortURL];\n }\n }\n return userUrl;\n}", "function urlsForUser(id){\n let userURLs = {};\n for (shortURL in urlDatabase) {\n if (urlDatabase[shortURL].user_id === id) {\n userURLs[shortURL] = urlDatabase[shortURL];\n }\n }\n return userURLs;\n}", "function getUsersURLs(userId) {\n let usersUrls = {};\n for (shortURL in urlDatabase) {\n if (urlDatabase[shortURL].userId === userId) {\n usersUrls[shortURL] = urlDatabase[shortURL];\n }\n }\n return usersUrls;\n}", "function urlsForUser(id){\n let result = {};\n for(let shortURL in urlDatabase){\n \n if(urlDatabase[shortURL].userID === id){\n result[shortURL] = urlDatabase[shortURL];\n }\n }\n return result;\n}", "function userOwnsUrl(user_id, short_url) {\n if(databases.urlDatabase[user_id].hasOwnProperty(short_url)){\n return true;\n } else {\n return false;\n }\n}", "function urlsForUser(id) {\n const urls = {};\n for (let shortURL in urlDatabase) {\n if (urlDatabase[shortURL].userID === id) {\n urls[shortURL] = urlDatabase[shortURL];\n }\n }\n return urls;\n}", "function urlsForUser(id) {\n let filteredDatabase = {};\n for (var currentShortURL in urlDatabase) {\n if (urlDatabase[currentShortURL].userID === id) {\n filteredDatabase[currentShortURL] = { 'longURL': urlDatabase[currentShortURL].longURL, 'shortURL': currentShortURL, 'userID': id };\n }\n }\n return filteredDatabase;\n}", "function userURLs(userId, urlDatabase){\n let result = {};\n for(shortURL in urlDatabase){\n if(urlDatabase[shortURL].userId === userId){\n result[shortURL] = urlDatabase[shortURL];\n }\n }\n return result;\n}", "function urlsForUser(id) {\n var newListUrl = {};\n for (key in urlDatabase) {\n if (id === urlDatabase[key].userID){\n var newObject = {\n userID: key,\n longURL: urlDatabase[key].longURL\n }\n newListUrl[key] = newObject\n }\n }\n return newListUrl\n }", "function findURLsforUser (userid) {\n let urls = {};\n for (id in urlDatabase) {\n if (urlDatabase[id][\"userID\"] === userid) {\n urls[id] = urlDatabase[id][\"longURL\"];\n }\n }\n return urls;\n}", "function urlsForUser(id, database) {\n const filteredLinks = {};\n for (const person in database) {\n if (database[person].userID === id) {\n filteredLinks[person] = database[person];\n }\n }\n return filteredLinks;\n}", "function urlsForUser(id) {\n let userURLs = {};\n for (key in urlDatabase) {\n if (urlDatabase[key].userID === id) {\n userURLs[key] = urlDatabase[key].longURL;\n }\n }\n return userURLs;\n}", "getShortURLs () {\n\t\treturn this._authGet(`${this._BASE_URL}/short_urls`).then((response) => response.data);\n\t}", "function urlsForUser(id) {\n var userURL = {};\n for(key in urlDatabase) {\n if(urlDatabase[key].userId === id) {\n userURL[key] = urlDatabase[key];\n }\n }\n return userURL;\n}", "function addUrlToUser(userId, shortUrl, longUrl) {\n let userUrls = urlDatabase[userId];\n\n if (!userUrls) {\n userUrls = {};\n userUrls[shortUrl] = longUrl;\n urlDatabase[userId] = userUrls;\n } else {\n userUrls[shortUrl] = longUrl;\n }\n}", "function urlsForUser(id) {\n let filteredUrls = {};\n for (let url in urlDatabase) {\n if (urlDatabase[url].userID === id) {\n filteredUrls[url] = urlDatabase[url]\n }\n }\n return filteredUrls;\n}", "function urlsForUser(id) {\n const obj = {};\n for (const sURL in urlDatabase) {\n if (urlDatabase[sURL][\"userID\"] === id) {\n obj[sURL] = urlDatabase[sURL][\"longURL\"];\n }\n }\n\n return obj;\n}", "function urlsForUser(id) {\n let links = {};\n for (let i in urlDatabase) {\n if ( id === urlDatabase[i].user_id) {\n links[i] = urlDatabase[i];\n }\n }\n return links;\n}", "function urlsForUser(id) {\n var filteredURLs = {};\n for (var key in urlDatabase) {\n if (urlDatabase[key].userID == id) {\n filteredURLs[key] = urlDatabase[key];\n }\n }\n return filteredURLs;\n}", "function urlsForUser(id) {\n\n let userLinks = {};\n\n for (var links in urlDatabase) {\n\n if (urlDatabase[links].userID === id) {\n\n userLinks[links] = urlDatabase[links];\n\n }\n\n }\n\n return userLinks;\n\n}", "function usersUrls(userId) {\n let results = {};\n for(let key in urlDatabase) {\n let url = urlDatabase[key];\n if (url.userId === userId) {\n results[key] = url;\n }\n }\n return results;\n}", "function urlsForUser(id, db) {\n let userUrls = {};\n\n for (const url in db) {\n for (const user in db[url]) {\n if (db[url].userID === id) {\n userUrls[url] = {};\n userUrls[url].longURL = db[url].longURL;\n userUrls[url].userID = db[url].userID\n } \n }\n }\n return userUrls;\n}", "function urlsForUser(id) {\n for (let i in users) {\n if (users[i].id === id) {\n let usersUrls = urlDatabase[id];\n return usersUrls;\n }\n }\n}", "function urlsForUser(userId) {\n const output = {};\n for (let url in urlDatabase) {\n if (userId === urlDatabase[url].userId) {\n output[url] = urlDatabase[url];\n }\n }\n return output;\n}", "function urlsForUser(id) {\n let filteredObj = {};\n for (let k in urlDatabase) {\n if (urlDatabase[k].userID === id) {\n filteredObj[k] = urlDatabase[k];\n }\n }\n return filteredObj;\n}", "function urlDifferentUser(shortURL, userID){\n for (let element in urlDatabase){\n if (shortURL === element && urlDatabase[element].user_id !== userID){\n return true;\n };\n };\n return false;\n}", "function shortenURL(req, res) {\n const original_url = req.body.url;\n const hostname = original_url\n .replace(/http[s]?\\:\\/\\//, '')\n .replace(/\\/(.+)?/, '');\n\n dns.lookup(hostname, (err, address) => {\n if (err || !address) return res.json({ error: 'invalid url' });\n const url = {\n original_url: original_url,\n short_url: sha1(original_url).slice(0, 5)\n };\n createAndSaveURL(url, (err, _data) => {\n if (err) {\n return res.sendStatus(500);\n } else {\n return res.json(url);\n }\n });\n });\n}", "function urlsForUser(id) {\n let userUrls = {};\n for (let key in urlDatabase) {\n if (id === urlDatabase[key].userID) {\n userUrls[key] = urlDatabase[key].url;\n }\n }\n\n return userUrls;\n}", "function urlsForUser(id){\n let userURLs = {};\n for (eachURL in urlDatabase){\n if(id == urlDatabase[eachURL].userID){\n userURLs[eachURL] = {\n longURL: urlDatabase[eachURL].longURL,\n date: urlDatabase[eachURL].date}\n };\n };\n return userURLs;\n}", "function expandShortUrlToLongUrl(req, res, next) {\n\tif(!req.query.shortUrl) {\n return res.status(400).send({\"status\": \"error\", \"message\": \"A short URL is required\"});\n }\n db.any('SELECT * FROM urls WHERE short_url = $1', [req.query.shortUrl])\n .then(function (data) {\n res.send(data.length > 0 ? data[0] : {});\n })\n .catch(function (err) {\n return next(err);\n });\n}", "function addUrl(longUrl, user) {\n let newShortUrl = \"\";\n do {\n newShortUrl = generateRandomString(6);\n } while(urlDatabase[newShortUrl])\n urlDatabase[newShortUrl] = { url: longUrl, userID: user };\n return newShortUrl;\n}", "function createNewUrlForUser(user_id, longURL) {\n //If there are no entries in the urlDatabase,\n //create an empty object for the current user\n if(!urlsForUser(user_id)) {\n databases.urlDatabase[user_id] = {};\n }\n\n //Create a random string for the shortURL\n let shortURL = generateRandomString();\n databases.urlDatabase[user_id][shortURL] = longURL;\n\n //Create a new entry in the urlVisits to keep track of visitors\n databases.urlVisits[shortURL] = {};\n databases.urlVisits[shortURL].visits = 0;\n\n return shortURL;\n}", "function urlsForUser(idRequest) {\n let urlUser = {};\n for (key in urlDatabase) {\n if (urlDatabase[key].userPermission == idRequest) {\n urlUser[key] = urlDatabase[key].site;\n }\n }\n return urlUser;\n}", "function urlsForUser(id) {\n let usersUrls = {};\n for (url in urlDatabase) {\n if (id === urlDatabase[url].userID) {\n usersUrls[url] = urlDatabase[url];\n }\n }\n return usersUrls;\n}", "function generateSuggestionLink(user) {\n // generate our nodes\n var li = document.createElement('li');\n var img = document.createElement('img');\n var a = document.createElement('a');\n // set our attributes\n li.setAttribute('class', 'list-group-item');\n img.setAttribute('src', user.avatar_url);\n img.setAttribute('width', '25px');\n a.setAttribute('href', user.url);\n a.textContent = user.login;\n // try this crap out\n li.appendChild(img);\n li.appendChild(a);\n // return that badboy\n return li;\n}", "function urlsForUser(id) {\n const subset = {};\n const keys = Object.keys(urlDatabase);\n keys.forEach((link) => {\n if (urlDatabase[link].user === id) {\n subset[link] = urlDatabase[link];\n }\n });\n return subset;\n}", "function isUsersLink(object, id) {\n let returned = {};\n for (let obj in object) {\n if (object[obj].userID === id) {\n returned[obj] = object[obj];\n }\n }\n return returned;\n}", "function urlsForUser(id, urlDB) {\n const filteredUrls = {};\n const keys = Object.keys(urlDB);\n for (let item of keys) {\n if (urlDB[item][\"userID\"] === id) {\n filteredUrls[item] = urlDB[item];\n }\n }\n return filteredUrls;\n}", "function getUrl(userOptions) {\n\t var result = 'https://randomuser.me/api/?';\n\t var options = defaultOptions;\n\t $.extend(options, userOptions);\n\n\t for (var property in defaultOptions) {\n\t if (defaultOptions.hasOwnProperty(property)) {\n\t result += property + \"=\" + defaultOptions[property] + \"&\";\n\t }\n\t }\n\t return result.slice(0, -1);\n\t }", "function urlsForUser(id) {\n return databases.urlDatabase[id];\n}", "function displayShortenedUrl(res) {\n link.textContext = res.data.shortUrl;\n link.setAttribute('href', res.data.shortUrl);\n shrBox.style.opacity = '1';\n urlBox.value = '';\n}", "function urlsForUser(userID){\n\n let urlList = {};\n\n for (let element in urlDatabase){ // console.log(element);\n if (urlDatabase[element].user_id === userID){\n urlList[element] = {\"long\" : urlDatabase[element].long,\n \"user_id\": urlDatabase[element].long}\n };\n };\n return urlList;\n}", "function urlsForUser(id) {\n let subset = {};\n for (let url in urlDatabase) {\n if (urlDatabase[url].userID === id) {\n subset[url] = urlDatabase[url];\n }\n }\n return subset;\n}", "function makeShortUrl() {\n \n var text = \"\";\n var charset = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n\n for( var i=0; i < 5; i++ )\n text += charset.charAt(Math.floor(Math.random() * charset.length));\n \n var shortUrl = \"https://www.\" + text + \".com\";\n \n insertObj(url, shortUrl);\n \n }", "function urlsForUser (id) {\n let result = {}\n for (var key in urlDatabase) {\n if (urlDatabase[key].userID === id) {\n result[key] = urlDatabase[key]\n }\n }\n return result\n}", "createShortenedListURL(params) {\n return ApiService.post('/link', { url: params.url });\n }", "function giveShortURL(originalURL, res){\n\tredisClient.get(\"long:\" + originalURL, function(err, shortURL){\n\t\tif(err !== null){\n\t\t\tconsole.log(\"ERROR: \" + err);\n\t\t\treturn;\n\t\t}\n\n\t\tres.json({shortenedURL: shortURL});\n\t});\n}", "function urlsForUser(id, urlsObj) {\n let userUniqueDb = {};\n for (let item in urlsObj) {\n if (urlsObj[item].userID === id) {\n userUniqueDb[item] = urlsObj[item];\n } \n }\n return userUniqueDb;\n}", "function urlsForUser(userID){\n //Clear the database of any previous user data\n delete localUrlDatabase.entries;\n localUrlDatabase.entries = {};\n //Now refill with user-related data\n for (var entry in urlDatabase.entries){\n if(urlDatabase.entries[entry].userID === userID){\n localUrlDatabase[\"entries\"][entry] = urlDatabase.entries[entry];\n }\n }\n}", "function getLongUrlFromShortUrl(req, res, next) {\n\tif(!req.params.id) {\n return res.status(400).send({\"status\": \"error\", \"message\": \"An id is required\"});\n }\n db.one('SELECT * FROM urls WHERE id = $1', [req.params.id])\n .then(function (data) {\n res.redirect(data.long_url);\n })\n .catch(function (err) {\n return next(err);\n });\n}", "function getShortUrlObj(req, res) {\n resolveShortUrl(req, res).then(function (shortUrl) {\n return res.apiMessage(Status.OK, 'short url', shortUrl);\n });\n }", "function short(){\n shorten.shortenLink()\n .then((data)=>{\n //paint it to the DOM\n ui.paint(data)\n })\n .catch((err)=>{\n console.log(err)\n })\n}", "get url() {\n return createUserUri(this.database.id, this.id);\n }", "function renderUserLink(user, nameFirst) {\n\tvar a = document.createElement('a')\n\ta.className = 'textItem userLink ib'\n\tif (!user) {\n\t\tuser = {\n\t\t\tusername: \"MISSINGNO.\",\n\t\t\tavatar: \"unknown-user.png\",\n\t\t}\n\t}\n\ta.href = \"#user/\"+user.id\n\tif (nameFirst != undefined) {\n\t\tvar name = textItem(user.username)\n\t\tname.className += \" username pre\"\n\t}\n\tvar avatar = renderAvatar(user)\n\tavatar.className += \" item\"\n\tif (nameFirst == undefined)\n\t\tavatar.title = user.username\n\tif (nameFirst == true)\n\t\ta.appendChild(name)\n\ta.appendChild(avatar)\n\tif (nameFirst == false)\n\t\ta.appendChild(name)\n\treturn a\n}", "function GenerateProfileHTML(user) {\r\n \r\n if(typeof user['link'] != 'undefined')\r\n return '<a href=\"' + user['link'] + '\" class=\"user-link\">by ' + user['display_name'] + '</a>';\r\n else\r\n return '<span class=\"user-link\">' + user['display_name'] + '</span>'\r\n \r\n }", "function shortenUrl(longUrl) {\n const config = {\n method: 'POST',\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n longUrl: longUrl\n })\n }\n return fetch(`${externalApiConfig.google.apiRoot}/urlshortener/v1/url?key=${externalApiConfig.google.shortUrlKey}`, config);\n}", "function shortify(host, res, url) {\n // Get the next Id\n getNextShortUrlId(function(newId) {\n if (newId) {\n // Create a \"Short Url Object\" -> the url with its short url.\n var shortUrlObj = {\n original_url: url,\n short_url: host + '/' + newId\n };\n\n db.collection(COLLECTION).insertOne(shortUrlObj, function(err, result) {\n if (err) {\n res.status(200).json({\n error: \"Can't create a short url, database issue\"\n });\n } else {\n // remove the ID field for user response.\n delete shortUrlObj._id;\n res.status(200).json(shortUrlObj);\n }\n });\n } else {\n // Can't find a new ID in mongo\n res.status(200).json({\n error: \"Can't create a short url, database issue\"\n });\n }\n });\n}", "urlShorten(url) {\n let name = url;\n\n if (url.length > 50) {\n name = url.substr(0, 33);\n name += \"...\";\n name += url.substr(-14);\n }\n\n return name;\n }", "function urlsForUser(cookID) {\n const newObj = {};\n for (const url in urlDatabase) {\n if (urlDatabase[url].userID === cookID) {\n newObj[url] = urlDatabase[url];\n }\n }\n return newObj;\n}", "function ShortenLink (url) {\n var yourlsLink;\n\n // Get Yourls API from XNa.me\n // You can use your own API as well\n yourlsLink = siteName + '/yourls-api.php?format=simple&action=shorturl&url=' + url;\n\n\n var rqst = new XMLHttpRequest();\n rqst.onreadystatechange = function () {\n if (rqst.readyState == 4 && rqst.status == 200) {\n $xlink.val(rqst.responseText);\n }\n }\n rqst.open(\"GET\", yourlsLink, false);\n rqst.send();\n\n}", "function giveLongURL(originalURL, res){\n\tredisClient.get(\"short:\" + originalURL, function(err, longURL){\n\t\tif(err !== null){\n\t\t\tconsole.log(\"ERROR: \" + err);\n\t\t\treturn;\n\t\t}\n\n\t\tres.json({longerURL: longURL});\n\t})\n}", "function checkUserID (id, shortURL) {\n return (urlDatabase[shortURL].userID === id)\n}", "function addVisitTimestampForUser(user_id, short_url) {\n let formatted = moment().subtract(7, 'hours').format('MMMM Do YYYY, h:mm:ss a');\n\n if(!databases.urlVisits[short_url][user_id]){\n databases.urlVisits[short_url][user_id] = [];\n }\n databases.urlVisits[short_url][user_id].push(formatted);\n}", "function findWebsitesByUser(userId) {\n\t\t\treturn $http.get(\"/api/user/\"+userId+\"/website\")\n .then(function (response) {\n return response.data;\n });\n\t\t}", "function showUrl(short, full){ \n shortenUrl.style.display = 'block'\n let originalAddress = document.querySelector('#address')\n let shortenAdresss = document.querySelector('#short')\n\n originalAddress.innerHTML = `${full}`\n shortenAdresss.innerHTML = `${short}`\n}", "function urlExistsForUser(userId, urlDatabase, shortURL){\n if(urlDatabase[shortURL] && ( urlDatabase[shortURL].userId === userId )){\n return true;\n }\n return false;\n}", "function UrlShortener() {\n this.urlAllowedChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' +\n 'abcdefghijklmnopqrstuvwxyz' +\n '0123456789-_.~!*\"();:@&=+$,/?#[]';\n}", "async function getNewSongUrl(user) {\n let size;\n let filteredNextGroup;\n try {\n //get the last like songs by the user\n let lastLikedSongs = await getLastLikedSongs(user);\n //get the sons of each liked song\n let nextGroup = await getNextGroup(lastLikedSongs);\n //check if theres no songs he liked before\n let lastChance = isAllSongsBase(nextGroup);\n //filter the group's songs\n filteredNextGroup = await filterGroup(nextGroup, user, lastChance);\n size = Object.keys(filteredNextGroup).length;\n //in case of no songs in suggestions\n if (size == 0) {\n let getBaseGroup = async () => {\n let baseGroup = await getNextGroup(null);\n return baseGroup;\n };\n nextGroup = await getBaseGroup();\n lastChance = isAllSongsBase(nextGroup);\n filteredNextGroup = await filterGroup(nextGroup, user, lastChance);\n }\n //we use a base song to each list to get a chance of diversity\n filteredNextGroup = await tryAddBaseSongs(user, filteredNextGroup);\n //get the song from the group\n let nextSongId = chooseIndex(filteredNextGroup);\n //assemble the packet\n let nextSongUrl = filteredNextGroup[nextSongId].url;\n let nexSongTitle =\n filteredNextGroup[nextSongId].title != undefined\n ? filteredNextGroup[nextSongId].title\n : filteredNextGroup[nextSongId].artist +\n \" - \" +\n filteredNextGroup[nextSongId].name;\n\n let res = {\n url: nextSongUrl,\n songId: nextSongId,\n title: nexSongTitle\n };\n return res;\n } catch (err) {\n throw new Error(err + \" userId = \" + user);\n }\n}", "function getUser(json, url) {\n if (url.query.id) {\n\treturn getUsers(json).filter(function (obj){ return obj.id == url.query.id; });\n }\n}", "function shortenUrl(link) {\n\n const apiKey = '0faf89c109e247e8bf91aa06ccbf2412';\n const url = 'https://api.rebrandly.com/v1/links';\n\n const data = JSON.stringify({ destination: link });\n const xhr = new XMLHttpRequest();\n xhr.responseType = 'json';\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n\n shortLink = xhr.response.shortUrl;\n addListItem(link, shortLink);\n\n // console.log(xhr.response.shortUrl);\n }\n }\n }\n\n xhr.open('POST', url);\n xhr.setRequestHeader('Content-type', 'application/json');\n xhr.setRequestHeader('apikey', apiKey);\n xhr.send(data);\n}", "function userProfileUrl() { return \"{{conf.reqUrl}}/api/userprofile/\"; }", "function buildUrl(name) {\n return \"https://api.github.com/users/\"+name;\n }", "async function getSimilarUser(username) {\r\n let response = await fetch(`https://happy-css.com/api/users?limit=1&name=${username}`)\r\n return response.json()\r\n}", "function getShortURL () {\n\t//base 36 characters\n\tvar alphanumeric = ['0','1','2','3','4','5','6','7','8','9','A','B',\n\t\t\t\t\t\t'C','D','E','F','G','H','I','J','K','L','M','N',\n\t\t\t\t\t\t'O','P','Q','R','S','T','U','V','W','X','Y','Z'];\n\tvar urlString = \"http://localhost:3000/\";\n\tfor (i = 0; i < 4; i++) {\n\t\tvar num = randomNum(0,35);\n\t\turlString = urlString + alphanumeric[num];\n\t}\n\n\treturn urlString;\n}", "function makeURL(domain, userApiKey) {\r\n var base = \"https://api.shodan.io/shodan/host/search?key=\";\r\n var url = base + userApiKey + '&query=hostname:' + domain;\r\n console.log(url);\r\n return url;\r\n}", "function findWebsitesByUser(userId) {\n var url = \"/api/user/\" +userId +\"/website\";\n\n return $http.get(url)\n //unwrap response\n .then(function (response) {\n // return as embedded response\n return response.data;\n });\n\n }", "function gravatar(user, size) {\n if (!size) {\n size = 200;\n }\n if (!this.email) {\n return `https://gravatar.com/avatar/?s=${size}&d=retro`;\n }\n const md5 = crypto.createHash('md5').update(this.email).digest('hex');\n return `https://gravatar.com/avatar/${md5}?s=${size}&d=retro`;\n}", "function getLink(action) {\n\tvar links = user.link;\n\tfor(let link of links) if(link.action == action) return link.url;\n}", "function addUserLinksToText(originalText)\r\n{\r\n var parsedText = \"\";\r\n\r\n var regexp = new RegExp('[@]+[A-Za-z0-9-_]+','g');\r\n parsedText = originalText.replace(regexp, function(u) {\r\n var username = u.replace(\"@\",\"\");\r\n var userlink = \"<a href=\\\"user:\" + username + \"\\\">\" + u + \"</a>\";\r\n return userlink;\r\n });\r\n\r\n return parsedText;\r\n}", "handleSpecificUser(itemIndex) {\n generalItemList.innerHTML = \" \";\n let specificUser = this.items[itemIndex];\n let username = specificUser.login;\n\n fetch(specificUser.url)\n .then((res) => res.json())\n .then((data) => {\n let userInfo = data;\n\n this.getUserRepo(userInfo);\n this.pasteUserInfo(userInfo);\n\n document.querySelector(\".userImage\").src = specificUser.avatar_url;\n document.querySelector(\".name\").innerHTML = username;\n document.querySelector(\".userP\").href = specificUser.html_url;\n });\n }", "getBestUri() {\n let documents = this.get(\"model.documents\");\n\n if (isPresent(documents)) {\n for (let doc of documents) {\n if (doc.security === \"public\" && isPresent(doc.uri)) {\n return doc.uri;\n }\n }\n }\n\n let related = this.get(\"model.related_url\");\n\n if (isPresent(related)) {\n for (let uri of related) {\n if (isPresent(uri.url)) {\n return uri.url;\n }\n }\n }\n\n return this.get(\"model.official_url\");\n }", "function shorturl(url, cb) {\n var http = new XMLHttpRequest();\n var params = '{\"longUrl\": \"' + url + '\"}';\n\n http.open('POST', 'https://www.googleapis.com/urlshortener/v1/url', true);\n http.setRequestHeader('Content-type', 'application/json');\n\n http.onreadystatechange = function() {\n if (http.readyState == 4) {\n cb({\n status: http.status,\n shortUrl: JSON.parse(http.responseText).id\n })\n }\n }\n http.send(params);\n}", "function createShortUrl(req, res) {\n var url = req.body.url;\n if (url && url.match(urlRegex)) {\n urlShortener.shorten(url, {userId: req.user})\n .then(function (shortUrl) {\n var formattedUrl = urlUtil.format({\n protocol: protocol,\n host: host,\n pathname: shortUrl.hash\n });\n return res.apiMessage(Status.OK, 'short url created', {url: formattedUrl});\n }).fail(function (err) {\n logger.error('Error creating short url', err);\n return res.apiMessage(Status.BAD_REQUEST, 'error creating short url', url);\n });\n } else {\n logger.error('Invalid URL', url);\n return res.apiMessage(Status.BAD_REQUEST, 'Invalid URL', url);\n }\n }", "function getUserSuggestion(user) {\n var suggestions = {};\n \n suggestDb.forEach(function(suggest) {\n if(suggest.userId === user.id){\n suggestions = suggest; \n }\n }, this);\n \n return suggestions;\n}", "function streamUser() {\n var $body = $('.people-follow');\n for(var key in streams) {\n if(key === 'users') {\n for(var key in streams.users) {\n var user = key;\n var $user = $('<a id='+user+'></a><br>');\n $user.text('@' + user);\n $user.appendTo($body);\n }\n } \n }\n}", "function usersRepos(user){\n console.log(user);\n getRepositories(user.profile,getRepos)\n}", "function expandUrls(string) {\n return `https://example.com/${urlify(string)}`\n}", "async function getOrginalUrl(shortUrl) {\n console.log(\"getOrginalUrl shortUrl param: \", shortUrl);\n let orginalUrl;\n await db.ShortenUrlsModel.findOne({ short_url: shortUrl })\n .exec()\n .then(url => {\n console.log(\"url object in find: \", url);\n orginalUrl = url.original_url;\n console.log(\"orginal url in find: \", url.original_url);\n // console.log(\"orginalUrl in find: \", originalUrl);\n })\n .catch(err => {\n throw err;\n });\n\n console.log(orginalUrl);\n return orginalUrl;\n}", "async getShortlistItems() {\n this.itemService.retrieveShortlist(this.props.user._links.self.href).then(shortlist => {\n this.setState({ shortlist: shortlist })\n }\n );\n }", "getShortlistPages() {\n this.itemService.retrieveShortlistPages(this.props.user._links.self.href).then(pages => {\n this.setState({ shortlistPages: pages });\n }\n );\n }", "function prepareUrl(imgObject) {\n return 'https://farm8.staticflickr.com/' + imgObject.server + '/'+ imgObject.id + '_' + imgObject.secret + '.jpg';\n}", "function twetchUnmute(userId) {\n let posts = $(\"div[id^='post']\");\n posts.find(\"a[href='\" + userId + \"']\")\n .parent()\n .parent()\n .show();\n}", "function getPublicByUserCreated(userId) {\n return db('lists as l')\n // .join('twitter_users as tu', 'tu.twitter_id', \"l.twitter_id\")\n .where('l.twitter_id', userId)\n .where('public', true)\n}", "function updateUsersLink ( ) {\n var t = nicks.length.toString() + \" user\";\n if (nicks.length != 1) t += \"s\";\n $(\"#usersLink\").text(t);\n}", "function make_gravatar(user) {\n\t\tvar md5 \t= crypto.createHash('md5').update(user.displayname+user.name).digest(\"hex\");\n\t\tgrav_url \t= 'http://www.gravatar.com/avatar.php/'+md5\n\t\tgrav_url\t+= \"?s=32&d=identicon\"\n\t\tconsole.log(\"Made gravatar:\", grav_url)\n\t\treturn grav_url\n\t}", "function userDetailSubCreator(userKey) {\n return [\n {\n subKey: 'userDetail_' + userKey,\n asValue: true,\n\n params: {name: 'users', key: userKey},\n path: \"https://my/path/to/users/\"+userKey\n }\n ];\n}", "function list(req, res, next) {\n ShortUrl.findAll({ order: 'id ASC' }).success(function(results) {\n var list = _.map(results, function(s) {\n var values = s.dataValues;\n values.hash_code = hasher.encode(s.id);\n return values;\n });\n res.send(list);\n });\n}", "fetchUser(user, throttle, userHasBeenFetched) {\n console.log(`Fetching ${user.url}`);\n\n this.hostRequest(user.url)\n .use(throttle.plugin())\n .end((err, res) => {\n userHasBeenFetched(res);\n });\n }" ]
[ "0.6838116", "0.68237954", "0.6809882", "0.6769905", "0.67195976", "0.66576904", "0.6623692", "0.66015947", "0.65150565", "0.6459998", "0.6297329", "0.6291095", "0.62496823", "0.6235603", "0.6184401", "0.61704236", "0.6099899", "0.6061286", "0.6043777", "0.6037085", "0.6010055", "0.5991181", "0.5944933", "0.5918079", "0.59163517", "0.58723074", "0.5863027", "0.58601904", "0.5847345", "0.5845829", "0.5843584", "0.5836827", "0.58042026", "0.5801575", "0.5782771", "0.57658446", "0.5756358", "0.5742234", "0.57235545", "0.5646", "0.56362915", "0.56192744", "0.5531903", "0.55124635", "0.5504026", "0.5496444", "0.5476259", "0.54681516", "0.54466057", "0.5428656", "0.539759", "0.5345312", "0.5305438", "0.52522904", "0.5246034", "0.52186906", "0.52133715", "0.5196562", "0.5188893", "0.51859915", "0.51755756", "0.51470447", "0.51260376", "0.51253", "0.5116394", "0.5089723", "0.5080089", "0.5077164", "0.5070452", "0.5062179", "0.5042552", "0.5020835", "0.50030804", "0.49941286", "0.4982692", "0.49748918", "0.49635705", "0.49622595", "0.4962093", "0.49582407", "0.49487466", "0.49460942", "0.49308878", "0.49213943", "0.49208805", "0.49189916", "0.4915563", "0.48999667", "0.4887923", "0.48876217", "0.48810843", "0.4876898", "0.48735213", "0.48692355", "0.4868515", "0.48631576", "0.48606667", "0.48580506", "0.4842339", "0.4839313" ]
0.56548834
39
Convert emscripten FS errors to errnos
function fsErr(err) { if (typeof err === "object" && "errno" in err) return -err.errno; return -JSMIPS.ENOTSUP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dump_file_error() {\n var aug = this;\n\n var files_with_errors =\n aug.match(\n '/augeas/files/*/*[error]'\n ).map(function(s){\n return s.substr(13); // cutoff /augeas/files: 13 = strlen(/augeas/files)\n });\n\n var res = \n files_with_errors.map(function(fname){\n return aug.fileErrorMsg(fname);\n });\n\n return res;\n}", "function map_error(err) {\n if (err.fileName) {\n // regular error\n gutil.log(chalk.red(err.name)\n + ': '\n + chalk.yellow(err.fileName.replace(__dirname + '/src/js/', ''))\n + ': '\n + 'Line '\n + chalk.magenta(err.lineNumber)\n + ' & '\n + 'Column '\n + chalk.magenta(err.columnNumber || err.column)\n + ': '\n + chalk.blue(err.description))\n } else {\n // browserify error..\n gutil.log(chalk.red(err.name)\n + ': '\n + chalk.yellow(err.message))\n }\n\n this.end()\n}", "function map_error(err) {\n\tif (err.fileName) {\n\t\t// Regular error\n\t\tgutil.log(chalk.red(err.name) +\n\t\t\t': ' +\n\t\t\tchalk.yellow(err.fileName.replace(__dirname + '/src/', '')) +\n\t\t\t': ' +\n\t\t\t'Line ' +\n\t\t\tchalk.magenta(err.lineNumber) +\n\t\t\t' & ' +\n\t\t\t'Column ' +\n\t\t\tchalk.magenta(err.columnNumber || err.column) +\n\t\t\t': ' +\n\t\t\tchalk.blue(err.description))\n\t} else {\n\t\t// Browserify error..\n\t\tgutil.log(chalk.red(err.name) +\n\t\t\t': ' +\n\t\t\tchalk.yellow(err.message))\n\t}\n\n\tthis.emit('end');\n}", "parseErr(err) {\n if (!err.errors) return err;\n const messages = Object.keys(err.errors).map(errorKey =>\n `${errorKey} error: ${err.errors[errorKey]}`);\n return messages;\n }", "function JPSpan_Util_ErrorReader() {}", "function makeError(err) {\n var einput;\n\n var defautls = {\n index: furthest,\n filename: env.filename,\n message: 'Parse error.',\n line: 0,\n column: -1\n };\n for (var prop in defautls) {\n if (err[prop] === 0) {\n err[prop] = defautls[prop];\n }\n }\n\n if (err.filename && that.env.inputs && that.env.inputs[err.filename]) {\n einput = that.env.inputs[err.filename];\n } else {\n einput = input;\n }\n\n err.line = (einput.slice(0, err.index).match(/\\n/g) || '').length + 1;\n for (var n = err.index; n >= 0 && einput.charAt(n) !== '\\n'; n--) {\n err.column++;\n }\n return new Error([err.filename, err.line, err.column, err.message].join(\";\"));\n }", "function mapError(err) {\n if(err.fileName) {\n // regular error\n gutil.log(chalk.red(err.name) + ': ' + chalk.yellow(err.fileName.replace(options.src, '')) + ': ' +\n 'Line ' + chalk.magenta(err.lineNumber) + ' & ' +\n 'Column ' + chalk.magenta(err.columnNumber || err.column) + ': ' + chalk.blue(err.description));\n\n browserSync.notify('<span style=\"color:red\">' + err.name + ': ' + err.fileName.replace(options.src, '') + ': ' +\n 'Line ' + err.lineNumber + ' & ' +\n 'Column ' + (err.columnNumber || err.column) + ': ' + err.description + '</span>',\n 5000);\n } else {\n // browserify error..\n gutil.log(chalk.red(err.name) + ': ' + chalk.yellow(err.message));\n\n browserSync.notify('<span style=\"color:red\">' + err.name + ': ' + err.message + '</span>',\n 5000);\n }\n\n this.emit('end');\n}", "function errorHandler(e) {\n var msg = '';\n switch (e.code) {\n case FileError.QUOTA_EXCEEDED_ERR:\n\t\t \tprint('Error: QUOTA_EXCEEDED_ERR');\n break;\n case FileError.NOT_FOUND_ERR:\n\t\t \tprint('Error: NOT_FOUND_ERR');\n break;\n case FileError.SECURITY_ERR:\n\t\t \tprint('Error: SECURITY_ERR');\n break;\n case FileError.INVALID_MODIFICATION_ERR:\n\t\t \tprint('Error: INVALID_MODIFICATION_ERR');\n break;\n case FileError.INVALID_STATE_ERR:\n\t\t \tprint('Error: INVALID_STATE_ERR');\n break;\n default:\n\t\t \tprint('Error: Unknown Error\\n(Check console for details)');\n\t\t \tconsole.log(e);\n break;\n };\n}", "function convertError(tsError)\n {\n var minChar = tsError.start();\n var limChar = minChar + tsError.length();\n var error = {'minChar': minChar, 'limChar': limChar};\n // ACE annotation properties.\n var pos = DocumentPositionUtil.getPosition(doc, minChar);\n error.text = tsError.message();\n error.row = pos.row;\n error.column = pos.column;\n error.type = 'error'; // Determines the icon that appears for the annotation.\n return error;\n }", "function mapError (err) {\n console.dir(err);\n console.log(err.stack);\n if (err.fileName) {\n // regular error\n return gutil.log(chalk.red(err.name)\n + ': '\n + chalk.yellow(err.fileName.replace(__dirname + '/src/', ''))\n + ': '\n + 'Line '\n + chalk.magenta(err.lineNumber)\n + ' & '\n + 'Column '\n + chalk.magenta(err.columnNumber || err.column)\n + ': '\n + chalk.blue(err.description));\n } else {\n // browserify error\n gutil.log(chalk.red(err.name)\n + ': '\n + chalk.yellow(err.message));\n }\n}", "function findFileErrors ( activeDoc ) {\n var layerStatusLocked = [];\n var layerStatusVisible = [];\n var fileErrorString = \"\"; \n var fileTxtOutput;\n var array_errorList = [];\n \n var findNonNative = \"[NonNativeItem ]\";\n var findRasterImage =\"[RasterItem ]\";\n var isNonNative;\n var isRasterImage;\n\n layersUnlockAll(activeDoc, layerStatusLocked, layerStatusVisible); // unlock all layers\n fileErrorString += artBoardNameCheck(activeDoc, fileErrorString); // check artboard names\n fileErrorString += searchAllPageItemsForObject(findNonNative); // find non-native objects\n fileErrorString += searchAllPageItemsForObject(findRasterImage); // find raster images\n fileErrorString += findLockedHiddenContent(); // find locked or hidden objects\n fileErrorString += findEmptyArtboards(activeDoc); // find locked or hidden objects\n\n // if errors are found, store file name, and errors in one long string\n if (fileErrorString) { // creates a string of errors for file if errors was return\n var tempFile = File(activeDoc.fullName);\n fileTxtOutput = \"FILE : \" + tempFile.fsName + \"\\n\";\n fileTxtOutput += fileErrorString + \"\\n\";\n array_errorList[1] = fileTxtOutput;\n }\n \n returnallLayerLockStatus(layerStatusLocked, layerStatusVisible);\n \n return array_errorList; // first value is \"true\" if files is clean, else array contains arrays of errors\n} // end of findFileErrors", "function err(strm,errorCode){strm.msg=msg[errorCode];return errorCode;}", "collectAllErrors (error) {\n console.log('[Atom Matlab Editor] ERR: ' + error)\n\n var parsedError = error.split('\\n')\n\n for (let i = 0; i < parsedError.length; i++) {\n var errorText = parsedError[i].split(': ')\n\n if (errorText.length > 1) {\n if (errorText[1].startsWith('Unable to connect')) {\n // Matlab instance not found\n MatlabEditor.error.notification.detail = 'Unable to connect to MATLAB session.\\nType \"matlab.engine.shareEngine(\\'AtomMatlabEngine\\')\" in your Matlab instance.'\n MatlabEditor.error.type = 2\n } else if (parsedError[i].startsWith('com.mathworks.mvm.exec')) {\n // Matlab error\n if (errorText[1] === 'Error') {\n // Syntax error\n const source = parsedError[i].split(/[<>]+/)\n const type = parsedError[i + 1].split('>')[1]\n const path = source[1].split('\\'')[1]\n const line = source[1].split(/[,)]+/)[1]\n const col = source[1].split(/[,)]+/)[2]\n MatlabEditor.error.notification.detail = type + '\\n(File: \"' + path + '\", Line: ' + line + ', Column: ' + col + ')'\n MatlabEditor.error.type = 1\n } else {\n // Runtime error\n MatlabEditor.error.notification.detail = errorText[1]\n MatlabEditor.error.type = 0\n }\n } else if (parsedError[i].endsWith('java.library.path\\r')) {\n // \"no nativenvm in java.library.path\" error.\n // We have to visualize the notification now since the process doesn't end correctly.\n atom.notifications.addError('Failed to load nativenvm library', {\n detail: 'Please follow the instruction in the `atom-matlab-editor` package\\'s readme.',\n dismissable: true\n })\n }\n }\n\n // Error stacktrace in case of Matlab runtine errors\n if (MatlabEditor.error.type === 0 && parsedError[i].startsWith('Error in')) {\n const stackCall = parsedError[i].split('==> ')[1]\n const path = stackCall.split('>')[0]\n const file = stackCall.split('>')[1].split(' at ')[0]\n const line = stackCall.split('>')[1].split(' at ')[1]\n MatlabEditor.error.notification.stack += 'Error in ' + file + ' (' + path + ':' + line + ')' + '\\n'\n }\n }\n\n // console.log('[Atom Matlab Editor] ERR: ' + error)\n }", "function errorHandler(e) {\n var msg = '';\n\n switch (e.code) {\n case FileError.QUOTA_EXCEEDED_ERR:\n msg = 'QUOTA_EXCEEDED_ERR';\n break;\n case FileError.NOT_FOUND_ERR:\n msg = 'NOT_FOUND_ERR';\n break;\n case FileError.SECURITY_ERR:\n msg = 'SECURITY_ERR';\n break;\n case FileError.INVALID_MODIFICATION_ERR:\n msg = 'INVALID_MODIFICATION_ERR';\n break;\n case FileError.INVALID_STATE_ERR:\n msg = 'INVALID_STATE_ERR';\n break;\n default:\n msg = 'Unknown Error';\n break;\n }\n console.log('Error: ' + msg);\n }", "function parseError(err, path){\n app.logger.log(err, path); \n \n if(typeof err == 'string')\n return err;\n return 'Unknown error';\n }", "customFormatErrorFn(err){\n // original error will be set by express graphql when it detects an error i.e\n // thrown in the code (either by you or any 3rd party package)\n if(!err.originalError){\n return err;\n }\n const data = err.originalError.data;\n const message = err.message || \"An error occured\";\n const code = err.originalError.code || 500;\n return {\n message,\n data,\n code\n }\n\n }", "function convertError$3(e) {\n switch (e.message) {\n // case \"NotFoundError\":\n // return new ApiError(ErrorCode.ENOENT, message);\n // case \"QuotaExceededError\":\n // return new ApiError(ErrorCode.ENOSPC, message);\n default:\n // The rest do not seem to map cleanly to standard error codes.\n return new ApiError(ErrorCode.EIO, e.message);\n }\n}", "async _checkErrors(operation, results)\n\t{\n\t\tconst res = results[operation+'Result'];\n\n\t\tif (operation === 'FECAESolicitar' && res.FeDetResp) {\n\t\t\tif (Array.isArray(res.FeDetResp.FECAEDetResponse)) {\n\t\t\t\tres.FeDetResp.FECAEDetResponse = res.FeDetResp.FECAEDetResponse[0];\n\t\t\t}\n\t\t\t\n\t\t\tif (res.FeDetResp.FECAEDetResponse.Observaciones && res.FeDetResp.FECAEDetResponse.Resultado !== 'A') {\n\t\t\t\tres.Errors = { Err : res.FeDetResp.FECAEDetResponse.Observaciones.Obs };\n\t\t\t}\n\t\t}\n\n\t\tif (res.Errors) {\n\t\t\tconst err = Array.isArray(res.Errors.Err) ? res.Errors.Err[0] : res.Errors.Err;\n\t\t\tthrow new Error(`(${err.Code}) ${err.Msg}`, err.Code);\n\t\t}\n\t}", "_onError(e) {\n console.log(`Filer filesystem error: ${e}`);\n }", "function formatSyntaxError(err, filePath) {\n if ( !err.name || err.name !== 'SyntaxError') {\n return err;\n }\n\n var unexpected = err.found ? \"'\" + err.found + \"'\" : \"end of file\";\n var errString = \"Unexpected \" + unexpected;\n var lineInfo = \":\" + err.line + \":\" + err.column;\n\n return new Error((filePath || 'string') + lineInfo + \": \" + errString);\n}", "function ofteU2FError(resp) {\n if (!('errorCode' in resp)) {\n return '';\n }\n if (resp.errorCode === u2f.ErrorCodes['OK']) {\n return '';\n }\n let msg = 'ofte error code ' + resp.errorCode;\n for (name in u2f.ErrorCodes) {\n if (u2f.ErrorCodes[name] === resp.errorCode) {\n msg += ' (' + name + ')';\n }\n }\n if (resp.errorMessage) {\n msg += ': ' + resp.errorMessage;\n }\n if (ofte.config.debug) {\n console.log('CTAP1/Ofte Error:', msg)\n }\n return msg;\n }", "function gatherParseErrors(err, hash) {\n var errLineNo = hash.loc.first_line;\n if (!parseErrMap[errLineNo]) {\n\tparseErrMap[errLineNo] = [ hash ];\n }\n else {\n\tparseErrMap[errLineNo].push(hash);\n }\n if (!parseErrMap.recoverable) {\n\t// I don't know why some errors are unrecoverable, but I think\n\t// this produces the best message we can under the circumstances.\n\tthrow new Error(\"Unrecoverable parser error\");\n }\n // don't throw, so we can find additional errors.\n}", "function Fl(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function errorDiff(err, type, escape) {\n var diffRes = diff['diff' + type](err.actual, err.expected);\n var errCount = 0;\n return diffRes.map(function(str){\n if (escape) {\n str.value = str.value\n .replace(/\\t/g, '<tab>')\n .replace(/\\r/g, '<CR>')\n .replace(/\\n/g, '<LF>\\n');\n }\n if (str.added) return colorLines('diff added', str.value);\n if (str.removed) return colorLines('diff removed', str.value);\n console.log('str', str);\n if (!str.added && !str.removed) {\n errCount++;\n }\n return str.value;\n }).join('');\n}", "function _handleErrors(e, res){\n console.log('Error', e.name, e.message);\n if (e.name === 'MethodNotAllowedError') {\n // Method not allowed\n res.writeHead(405, {'Content-Type': 'text/plain'});\n res.write(e + '\\n');\n res.end();\n } else if (e.name === 'FileNotFoundError') {\n // File not found\n res.writeHead(404, {'Content-Type': 'text/plain'});\n res.write(e + '\\n');\n res.end();\n } else if (e.name === 'UnprocessableEntityError') {\n // Unprocessable entity\n let html = HtmlGen.getNoPostVarHtml(e.message);\n res.writeHead(422, {'Content-Type': 'text/html'});\n res.write(html);\n res.end();\n } else if (e.name === 'EntityTooLargeError') {\n // Request entity too large\n res.writeHead(413, {'Content-Type': 'text/plain'});\n res.write(e + '\\n');\n res.end();\n req.connection.destroy();\n }\n else {\n // All other errors\n res.writeHead(500, { 'Content-Type': 'text/plain' });\n res.write(e + '\\n');\n res.end();\n }\n}", "function convertErrorOutput(msg) {\n if (typeof msg !== 'string') {\n throw new TypeError('input must be a string');\n }\n return msg.replace(/\\\\/g, '/');\n}", "function convertErrorOutput(msg) {\n if (typeof msg !== 'string') {\n throw new TypeError('input must be a string');\n }\n return msg.replace(/\\\\/g, '/');\n}", "function convertErrorOutput(msg) {\n if (typeof msg !== 'string') {\n throw new TypeError('input must be a string');\n }\n return msg.replace(/\\\\/g, '/');\n}", "function transformAjvErrors() {\n var errors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n if (errors === null) {\n return [];\n }\n\n return errors.map(function (e) {\n var dataPath = e.dataPath,\n keyword = e.keyword,\n message = e.message,\n params = e.params,\n schemaPath = e.schemaPath;\n var property = \"\".concat(dataPath); // put data in expected format\n\n return {\n name: keyword,\n property: property,\n message: message,\n params: params,\n // specific to ajv\n stack: \"\".concat(property, \" \").concat(message).trim(),\n schemaPath: schemaPath\n };\n });\n}", "function getNormalizedErrMsg(errMsg) {\n var SOLIDITY_FILE_EXTENSION_REGEX = /(.*\\.sol):/;\n var errPathMatch = errMsg.match(SOLIDITY_FILE_EXTENSION_REGEX);\n if (errPathMatch === null) {\n // This can occur if solidity outputs a general warning, e.g\n // Warning: This is a pre-release compiler version, please do not use it in production.\n return errMsg;\n }\n var errPath = errPathMatch[0];\n var baseContract = path.basename(errPath);\n var normalizedErrMsg = errMsg.replace(errPath, baseContract);\n return normalizedErrMsg;\n}", "function convertErrorOutput(msg) {\n if (typeof msg !== 'string') {\n throw new TypeError('input must be a string');\n }\n\n return msg.replace(/\\\\/g, '/');\n}", "function errorHandler(error) {\n var message = \"\";\n\n switch (error.code) {\n case FileError.SECURITY_ERR:\n message = \"Security Error\";\n break;\n case FileError.NOT_FOUND_ERR:\n message = \"Not Found Error\";\n break;\n case FileError.QUOTA_EXCEEDED_ERR:\n message = \"Quota Exceeded Error\";\n break;\n case FileError.INVALID_MODIFICATION_ERR:\n message = \"Invalid Modification Error\";\n break;\n case FileError.INVALID_STATE_ERR:\n message = \"Invalid State Error\";\n break;\n default:\n message = \"Unknown Error\";\n break;\n }\n\n console.log(message);\n}", "function validationResultErrorHandling(errors, res, req) {\n // holds all the errors in one text\n var errorText = '';\n \n // add all the errors\n for(var x = 0; x < errors.array().length; x++) {\n // if not the last error\n if(x < errors.array().length - 1) {\n errorText += errors.array()[x].msg + '\\r\\n';\n }\n else {\n errorText += errors.array()[x].msg;\n }\n }\n\n // send bad request\n var err = new Error(errorText);\n res.status(400).send({ title: errorHandler.getErrorTitle({ code: 400 }), message: errorText });\n errorHandler.logError(req, err);\n}", "get errortext() {\n return this._errortext;\n }", "get errortext() {\n return this._errortext;\n }", "applyLintErrors(parsedMarkdown, notGorgonLintErrors) {\n // These lint errors do not have position data associated with\n // them, so we just plop them at the top.\n if (notGorgonLintErrors.length) {\n var errorText = notGorgonLintErrors.join(\"\\n\\n\");\n parsedMarkdown.unshift({\n content: {\n type: \"text\",\n content: \"\"\n },\n insideTable: false,\n message: errorText,\n ruleName: \"legacy-error\",\n severity: Rule.Severity.ERROR,\n type: \"lint\"\n });\n }\n }", "function formatErrors(diagnostics, instance, merge) {\n return diagnostics\n .filter(function (diagnostic) { return instance.loaderOptions.ignoreDiagnostics.indexOf(diagnostic.code) == -1; })\n .map(function (diagnostic) {\n var errorCategory = instance.compiler.DiagnosticCategory[diagnostic.category].toLowerCase();\n var errorCategoryAndCode = errorCategory + ' TS' + diagnostic.code + ': ';\n var messageText = errorCategoryAndCode + instance.compiler.flattenDiagnosticMessageText(diagnostic.messageText, os.EOL);\n if (diagnostic.file) {\n var lineChar = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);\n return {\n message: \"\" + '('.white + (lineChar.line + 1).toString().cyan + \",\" + (lineChar.character + 1).toString().cyan + \"): \" + messageText.red,\n rawMessage: messageText,\n location: { line: lineChar.line + 1, character: lineChar.character + 1 },\n loaderSource: 'ts-loader'\n };\n }\n else {\n return {\n message: \"\" + messageText.red,\n rawMessage: messageText,\n loaderSource: 'ts-loader'\n };\n }\n })\n .map(function (error) { return objectAssign(error, merge); });\n}", "function parseError(input, contents, err) {\n var errLines = err.message.split(\"\\n\");\n var lineNumber = (errLines.length > 0? errLines[0].substring(errLines[0].indexOf(\":\") + 1) : 0);\n var lines = contents.split(\"\\n\", lineNumber);\n return {\n message: err.name + \": \" + (errLines.length > 2? errLines[errLines.length - 2] : err.message),\n severity: \"error\",\n lineNumber: lineNumber,\n characterOffset: 0,\n lineContent: (lineNumber > 0 && lines.length >= lineNumber? lines[lineNumber - 1] : \"Unknown line\"),\n source: input\n };\n}", "function err(strm, errorCode) {\n strm.msg = messages[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = messages[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = messages[errorCode];\n return errorCode;\n}", "function formatErrors(errors, lines) {\n var message = '';\n for (var i = 0; i < lines.length; i++) {\n var line = lines[i];\n if (!errors[i + 3] && !errors[i + 2] && !errors[i + 1]) {\n continue;\n }\n message += line + '\\n';\n if (errors[i + 1]) {\n var error = errors[i + 1];\n var segments = error.split(':', 3);\n var type = segments[0];\n var column = parseInt(segments[1], 10) || 0;\n var err = error.substr(segments.join(':').length + 1).trim();\n message += padLeft('^^^ ' + type + ': ' + err + '\\n\\n', column);\n }\n }\n return message;\n}", "convertStack(err) {\n let frames;\n\n if (type.array(err.stack)) {\n frames = err.stack.map((frame) => {\n if (type.string(frame)) return frame;\n else return frame.toString();\n });\n } else if (type.string(err.stack)) {\n frames = err.stack.split(/\\n/g);\n }\n\n return frames;\n }", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n }", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}", "function err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}" ]
[ "0.6703125", "0.6094719", "0.6080415", "0.605089", "0.6035562", "0.60013103", "0.5937532", "0.58368826", "0.58111817", "0.5800851", "0.5783971", "0.57740027", "0.57384616", "0.56868804", "0.56708854", "0.565661", "0.5634058", "0.5573953", "0.5527576", "0.5522136", "0.55079055", "0.54952145", "0.54883367", "0.5470512", "0.54700994", "0.54698455", "0.54698455", "0.54698455", "0.54544127", "0.5453998", "0.5438787", "0.54276264", "0.54197425", "0.5403809", "0.5403809", "0.53952616", "0.5363955", "0.5360439", "0.53569686", "0.53569686", "0.53569686", "0.5355926", "0.535357", "0.5350213", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055", "0.5343055" ]
0.6093026
2
We avoid Emscripten's cwd, because each MIPS sim has its own, so use this to get absolute paths
function absolute(mips, path) { if (path.length === 0) return mips.cwd; try { path = FS.lookupPath(path).path; } catch (ex) {} path = PATH.normalize(mips.cwd + path); return path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static _getSpaceRoot(){\n return process.cwd(); //path.dirname(module.parent.paths[0])\n }", "function tilda(cwd) {\n if (cwd.substring(0, 1) === '~') {\n cwd = (process.env.HOME || process.env.HOMEPATH || process.env.HOMEDIR || process.cwd()) + cwd.substr(1);\n }\n return path.resolve(cwd);\n}", "function getRealPath(filePath) {\n return cwd ? path.join(cwd, filePath) : filePath;\n }", "function fakeCWD() {\n return cwd() + fake;\n }", "function defaultWebRoot()\n{\n\tconst file= Path.traceBack( 2, );\n\t\n\treturn Path.dirname( file, ).replace( /^file:\\/\\//, '', ).replace( /\\/([A-Z]:\\/)/, '$1', );\n}", "function absPath(filepath) {\n return filepath.match(/^[\\/~]/) ? filepath : require('path').join(process.cwd(), filepath);\n}", "function rel2abs(p) {\n return path.resolve(process.cwd(), p);\n}", "getRootPath()\n {\n return process.cwd();\n }", "cwd () {\n return cwd;\n }", "function absolutePath( inputPath ){\n return /^\\//.test(inputPath) ? inputPath : path.join(process.cwd(), inputPath)\n}", "resolve(...paths) {\n // first figure out the minimum number of paths we have to test\n // we always start at cwd, but any absolutes will bump the start\n let r = '';\n for (let i = paths.length - 1; i >= 0; i--) {\n const p = paths[i];\n if (!p || p === '.')\n continue;\n r = r ? `${p}/${r}` : p;\n if (this.isAbsolute(p)) {\n break;\n }\n }\n const cached = this.#resolveCache.get(r);\n if (cached !== undefined) {\n return cached;\n }\n const result = this.cwd.resolve(r).fullpath();\n this.#resolveCache.set(r, result);\n return result;\n }", "function getPath() {\n var path;\n if (BST.DEBUG) {\n path = \"../php/bst.php\";\n }\n else {\n path = \"../../../php/bst/bst.php\";\n }\n return path;\n }", "cwd () {\n return process.cwd();\n }", "function getcwd() {\n // debug('getcwd');\n var buf = new buffer_1.Buffer(264);\n var res = syscall(x86_64_linux_1.SYS.getcwd, buf, buf.length);\n if (res < 0) {\n if (res === -34 /* ERANGE */) {\n // > ERANGE error - The size argument is less than the length of the absolute\n // > pathname of the working directory, including the terminating\n // > null byte. You need to allocate a bigger array and try again.\n buf = new buffer_1.Buffer(4096);\n res = syscall(x86_64_linux_1.SYS.getcwd, buf, buf.length);\n if (res < 0)\n throw res;\n }\n else\n throw res;\n }\n // -1 to remove `\\0` terminating the string.\n return buf.slice(0, res - 1).toString();\n}", "function getDir() {\n if (process.pkg) {\n return path.resolve(process.execPath + \"/..\");\n } else {\n return path.join(require.main ? require.main.path : process.cwd());\n }\n}", "getResourcesDirectory() {\n let appPath = remote.app.getAppPath();\n\n if (process.cwd() === appPath) return './';\n else return process.resourcesPath + '/';\n }", "function abspath(rawPath) {\n if (rawPath.length && rawPath[0] === '.') {\n return path.resolve(path.join(__dirname, rawPath));\n } else {\n return path.resolve(rawPath);\n }\n}", "function getSstCliRootPath() {\n const filePath = __dirname;\n const packageName = \"resources\";\n const packagePath = filePath.slice(0, filePath.lastIndexOf(packageName) + packageName.length);\n return path.join(packagePath, \"../cli\");\n}", "abs (relativePath) {\n return nodePath.resolve(relativePath);\n }", "getProjectRoots() {\n return [__dirname];\n }", "function path_resolve() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resolvedPath = '';\n var resolvedAbsolute = false;\n for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = i >= 0 ? args[i] : '/';\n // Skip empty entries\n if (!path) {\n continue;\n }\n resolvedPath = path + \"/\" + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n // Normalize the path\n resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) { return !!p; }), !resolvedAbsolute).join('/');\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}", "function consumerPath() {\n const parts = process.argv[1].split(NODE_MODULES);\n let res;\n if (parts.length > 1) {\n res = parts[0];\n } else {\n res = appRoot.toString();\n }\n if (!res.endsWith('/')) {\n res += '/';\n }\n\n const prefix = globalPrefix();\n if (res.startsWith(prefix)) {\n // Global, go with CWD\n return process.cwd();\n } else {\n return res;\n }\n\n function globalPrefix() {\n const gpath = process.env._;\n if (gpath) {\n return path.join(gpath, '../..');\n } else {\n return undefined;\n }\n }\n}", "function getCopyPath(platform, begPath, endPath) \n{\n return [\n path.resolve(begPath + config('defaultPlatformsConfig')[platform].root + endPath)\n ];\n}", "getProperPath(a_src) {\n\t\tvar srcDir = a_src.split(\"/\"),\n\t\t\toutPath = \"\";\n\n\t\tif (!Utils.IsAbsolutePath(a_src)) {\n\t\t\tif (Utils.Valid(this.parentGM))\n\t\t\t\toutPath = this.parentGM.path;\n\t\t} else if (!Utils.Valid(this.parentGM)) {\n\t\t\toutPath = Utils.JoinPaths(outPath, \"/../../\");\n\t\t}\n\n\t\treturn outPath;\n\t}", "function getRootPath(cid) {\n return path.join(config.docker.rootfsPath, cid);\n}", "getCurrentEnvPath() {\r\n let TestDataPath = \"\\\\Resources\\\\\" + env + \"_TestData\";\r\n let absolutePath = __basedir + TestDataPath;\r\n return absolutePath;\r\n }", "get_inner_path(temp_path) {\n\t\tlet directories = fs.readdirSync(temp_path).filter(\n\t\t\tfile => fs.lstatSync(path.join(temp_path, file)).isDirectory()\n\t\t);\n\t\tlet inner_path = temp_path + \"/\";\n\t\tif (typeof (directories[0]) !== \"undefined\" && directories[0] !== null)\n\t\t\tinner_path = temp_path + \"/\" + directories[0];\n\t\treturn inner_path;\n\t}", "getTestPath(argv) {\n let testPath = undefined;\n if (argv.length >= 3 && fs.existsSync(argv[2])) {\n const isDirectory = fs.lstatSync(argv[2]).isDirectory();\n testPath = isDirectory ? argv[2] : path.dirname(argv[2]);\n }\n return testPath;\n }", "function fullyQualifiedPath(filename) {\n\treturn path.join(OTRTALK_ROOT, filename);\n}", "static dirname(path) {\n return Path.join(path, '..');\n }", "resolveAsPath() { }", "resolvePosix(...paths) {\n // first figure out the minimum number of paths we have to test\n // we always start at cwd, but any absolutes will bump the start\n let r = '';\n for (let i = paths.length - 1; i >= 0; i--) {\n const p = paths[i];\n if (!p || p === '.')\n continue;\n r = r ? `${p}/${r}` : p;\n if (this.isAbsolute(p)) {\n break;\n }\n }\n const cached = this.#resolvePosixCache.get(r);\n if (cached !== undefined) {\n return cached;\n }\n const result = this.cwd.resolve(r).fullpathPosix();\n this.#resolvePosixCache.set(r, result);\n return result;\n }", "function currentDir() {\n var s = WScript.scriptFullName\n s = s.substring(0, s.lastIndexOf(\"\\\\\") + 1)\n return s\n}", "dirname(entry = this.cwd) {\n if (typeof entry === 'string') {\n entry = this.cwd.resolve(entry);\n }\n return (entry.parent || entry).fullpath();\n }", "_setPathLocation() {\n // TODO need better way to differentiate between macOS and Windows FILES_PATHs\n let dlabsLocation = shell.which('dlabs-cli')?.stdout?.trim();\n\n /* istanbul ignore if */\n if (dlabsLocation[0] === '/') {\n dlabsLocation = dlabsLocation.replace(/(\\/\\w+){1}$/, '');\n return `${dlabsLocation}/lib/node_modules/dlabs-cli`;\n } else if (dlabsLocation.includes('C:')) {\n dlabsLocation = dlabsLocation.replace(/\\\\DLABS-CLI.CMD/, '').replace(/\\\\\\\\/g, '\\\\');\n return `${dlabsLocation.toLowerCase()}\\\\node_modules\\\\dlabs-cli`;\n } else {\n this._consoleOutput('error', this.LOG_MESSAGES.noPathDetected);\n }\n }", "function relPathToAbs(sRelPath) {\n var nUpLn, sDir = \"\", sPath = location.pathname.replace(/[^\\/]*$/, sRelPath.replace(/(\\/|^)(?:\\.?\\/+)+/g, \"$1\"));\n for (var nEnd, nStart = 0; nEnd = sPath.indexOf(\"/../\", nStart), nEnd > -1; nStart = nEnd + nUpLn) {\n nUpLn = /^\\/(?:\\.\\.\\/)*/.exec(sPath.slice(nEnd))[0].length;\n sDir = (sDir + sPath.substring(nStart, nEnd)).replace(new RegExp(\"(?:\\\\\\/+[^\\\\\\/]*) {0,\" + ((nUpLn - 1) / 3) + \"}$\"), \"/\");\n }\n return sDir + sPath.substr(nStart);\n }", "GetCurrentRelativePath() {\n return decodeURI(window.location.pathname.substr(1));\n }", "function root(_path) {\n return path.join(__dirname, './' + _path)\n}", "getPath (opts) {\n return BaseFS.getWorkingDir(opts) + this.getFolderName() + path.sep;\n }", "fullpathPosix() {\n if (this.#fullpathPosix !== undefined)\n return this.#fullpathPosix;\n if (this.sep === '/')\n return (this.#fullpathPosix = this.fullpath());\n if (!this.parent) {\n const p = this.fullpath().replace(/\\\\/g, '/');\n if (/^[a-z]:\\//i.test(p)) {\n return (this.#fullpathPosix = `//?/${p}`);\n }\n else {\n return (this.#fullpathPosix = p);\n }\n }\n const p = this.parent;\n const pfpp = p.fullpathPosix();\n const fpp = pfpp + (!pfpp || !p.parent ? '' : '/') + this.name;\n return (this.#fullpathPosix = fpp);\n }", "function absolute(path) {\n return resolve(fsBase.workingDirectory(), path);\n}", "function getAssetsPath()\n\t{\n\t\tvar generatorConfigFile = new File(\"~/generator.js\");\n\t\tvar cfgObj = {};\n\t\tvar gao = {};\n\t\tvar baseDirectory = undefined;\n\n\t\tif(generatorConfigFile.exists)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar str = JSUI.readFromFile(generatorConfigFile, \"UTF-8\");\n\n\t\t\t\tcfgObj = JSON.parse(str.replace(\"module.exports = \", \"\"));\n\t\t\t\tgao = cfgObj[\"generator-assets\"];\n\t\t\t\tbaseDirectory = gao[\"base-directory\"];\n\n\t\t\t}\n\t\t\tcatch(e)\n\t\t\t{\n\t\t\t\tif($.level) $.writeln(\"Error parsing generator.js\");\n\t\t\t}\n\t\t}\n\t\treturn baseDirectory;\n\t}", "function absPath(dir) {\n return (\n path.isAbsolute(dir) ? dir : path.resolve(process.cwd(), dir)\n )\n}", "getCurrentDirectory(fileName, insertedPath) {\r\n var currentDir = path.parse(fileName).dir || '/';\r\n var workspacePath = vs.workspace.rootPath;\r\n // based on the project root\r\n if (insertedPath.startsWith('/') && workspacePath) {\r\n currentDir = vs.workspace.rootPath;\r\n }\r\n return path.resolve(currentDir);\r\n }", "static FilePath(file) {\n\t\tfile = file.charAt(0) == \"/\" ? file.substr(1) : file;\n\t\t\n\t\tvar path = [Net.AppPath(), file];\n\t\t\t\t\n\t\treturn path.join(\"/\");\n\t}", "formAbsolutePath (filename) {\n if (path.isAbsolute(filename)) {\n return filename\n }\n\n return path.join(process.cwd(), '..', '..', filename)\n }", "function resolveToSrc() {\n return path.join(rootDir, 'src');\n}", "getAppPath()\n {\n return path.join(this.getRootPath(), 'app');\n }", "function correctPath (filePath) {\n if (!filePath) {\n return\n }\n filePath = filePath.replace(/\\\\/g, '/')\n if (path.isAbsolute(filePath)) {\n return filePath\n }\n return path.join(process.cwd(), filePath)\n}", "function getDir() {\n return path.resolve(__dirname)\n}", "function getBasePath(asset) {\n // TODO(frantic): currently httpServerLocation is used both as\n // path in http URL and path within IPA. Should we have zipArchiveLocation?\n var path = asset.httpServerLocation;\n if (path[0] === '/') {\n path = path.substr(1);\n }\n return path;\n}", "function getConfigPath(cwd) {\n return path__default[\"default\"].join(cwd, 'keystone');\n}", "get dir(){\r\n\t\treturn path2lst(this.path).slice(0, -1).join('/') }", "function getWorkDir(cid) {\n return path.join(getRootPath(cid), config.docker.workDir);\n}", "function getPath() {\n let i = 1\n let repeat = true;\n while (repeat) {\n if (fs.existsSync(`./dist/Team-${i}.html`)) {\n i++\n }\n else {\n return `./dist/Team-${i}.html`\n }\n }\n}", "function toWorkspaceDir(p) {\n if (p === workspace) {\n return '.';\n }\n // The manifest is written with forward slash on all platforms\n if (p.startsWith(workspace + '/')) {\n return p.substring(workspace.length + 1);\n }\n return path.join('external', p);\n }", "getDataPath() {\n const validApp = process.type === 'renderer' ? remote.app : app\n let configFolder = path.join(validApp.getPath('appData'), configFolderName)\n if (getOS() === 'linux') {\n configFolder = path.join(validApp.getPath('home'), '.CloakCoin')\n }\n return configFolder\n }", "getRootPath(rootDirs) {\n\t\tlet rootPath = '/';\n\t\tif(rootDirs) {\n\t\t\tif(!Array.isArray(rootDirs)) rootDirs = [rootDirs];\n\t\t\tfor(let i in rootDirs) {\n\t\t\t\tlet dir = rootDirs[i];\n\t\t\t\tlet p = location.pathname.indexOf(dir);\n\t\t\t\tif(p < 0) continue;\n\t\t\t\trootPath = location.pathname.slice(0, p + dir.length);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn rootPath;\n\t}", "static getWorkingDir (opts) {\n const workingDir = options.getRelevantOption(opts, \"workingDir\") || process.cwd();\n\n return workingDir + path.sep;\n }", "function getPath() {\n\t\tvar basePath = '';\n\t\tvar httpProto = window.location.protocol;\n\t\tvar domains = determineHost();\n\t\tbasePath = httpProto + '//' + domains.secure + domains.environment + domains.topLevel;\n\t\treturn basePath;\n\t}", "function sc_dirname(p) {\n var i = p.lastIndexOf('/');\n\n if(i >= 0)\n return p.substring(0, i);\n else\n return '';\n}", "function getResourceDirectory(resourcePath){\n if(resourcePath.startsWith('LOCAL')) {\n return path.join(resourcePath.substring(5), '..') + '/';\n }\n return path.join(remoteApp.getAppPath(), '../../../../../../../' + resourcePath + '/');\n}", "getOutDir(texPath) {\r\n if (texPath === undefined) {\r\n texPath = this.rootFile;\r\n }\r\n // rootFile is also undefined\r\n if (texPath === undefined) {\r\n return './';\r\n }\r\n const configuration = vscode.workspace.getConfiguration('latex-workshop');\r\n const outDir = configuration.get('latex.outDir');\r\n const out = utils.replaceArgumentPlaceholders(texPath, this.extension.builder.tmpDir)(outDir);\r\n return path.normalize(out).split(path.sep).join('/');\r\n }", "function ___R$$priv$project$rome$$internal$core$common$constants_ts$getRuntimeDirectory() {\n\t\tconst XDG_RUNTIME_DIR = ___R$$priv$project$rome$$internal$core$common$constants_ts$getEnvironmentDirectory(\n\t\t\t\"XDG_RUNTIME_DIR\",\n\t\t\t\"rome\",\n\t\t);\n\t\tif (XDG_RUNTIME_DIR !== undefined) {\n\t\t\treturn XDG_RUNTIME_DIR;\n\t\t}\n\n\t\treturn ___R$project$rome$$internal$path$constants_ts$TEMP_PATH.append(\n\t\t\t\"rome\",\n\t\t);\n\t}", "function resolve() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var resolvedPath = '';\r\n var resolvedAbsolute = false;\r\n for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\r\n var path = i >= 0 ? args[i] : '/';\r\n // Skip empty entries\r\n if (!path) {\r\n continue;\r\n }\r\n resolvedPath = path + \"/\" + resolvedPath;\r\n resolvedAbsolute = path.charAt(0) === '/';\r\n }\r\n // At this point the path should be resolved to a full absolute path, but\r\n // handle relative paths to be safe (might happen when process.cwd() fails)\r\n // Normalize the path\r\n resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) {\r\n return !!p;\r\n }), !resolvedAbsolute).join('/');\r\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\r\n}", "function GetNormalizedPath() {\n}", "function baseDir () {\n return _path.join(__dirname, '/../.data/')\n}", "function absPath(path) {\n\t\tif (!(path.match(/^\\//) || path.match(/^https?:/i))) {\n\t\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\t\tpath = (scripts[scripts.length-1].src).replace(/[^\\/]*$/,path);\n\t\t}\n\t\treturn path;\n\t}", "getAbsoluteDataPath(path = \"\") {\r\n // Get the path from the root to the indicated file\r\n return path_1.default.join(process.cwd(), this.dataPath, path);\r\n }", "function resolve() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resolvedPath = '';\n var resolvedAbsolute = false;\n for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = i >= 0 ? args[i] : '/';\n // Skip empty entries\n if (!path) {\n continue;\n }\n resolvedPath = path + \"/\" + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n // Normalize the path\n resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) { return !!p; }), !resolvedAbsolute).join('/');\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}", "function resolve() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resolvedPath = '';\n var resolvedAbsolute = false;\n for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = i >= 0 ? args[i] : '/';\n // Skip empty entries\n if (!path) {\n continue;\n }\n resolvedPath = path + \"/\" + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n // Normalize the path\n resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) { return !!p; }), !resolvedAbsolute).join('/');\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}", "function resolve() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resolvedPath = '';\n var resolvedAbsolute = false;\n for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = i >= 0 ? args[i] : '/';\n // Skip empty entries\n if (!path) {\n continue;\n }\n resolvedPath = path + \"/\" + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n // Normalize the path\n resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) { return !!p; }), !resolvedAbsolute).join('/');\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}", "function _getLocateDirectory() {\n\t\treturn OS.Path.join(Zotero.DataDirectory.dir, LOCATE_DIR_NAME);\n\t}", "function paths() {\n this.root = path.resolve(path.join(__dirname), '../../');\n this.src = path.join(this.root, 'src');\n this.srcIndexEntry = path.join(this.src, 'index.tsx');\n this.srcScss = path.join(this.src, 'assets', 'scss');\n this.srcScssEntry = path.join(this.srcScss, 'app.scss');\n this.srcScssVendorEntry = path.join(this.srcScss, 'vendor.scss');\n \n this.dst = path.join(this.root, 'dist');\n \n this.build = path.join(this.root, 'build');\n this.buildHtmlTemplates = path.join(this.build, 'htmlTemplates');\n this.buildHtmlTemplatesLocalIndex = path.join(this.buildHtmlTemplates, 'local.index.html');\n\n this.nodemodules = path.join(this.root, 'node_modules'); \n}", "getSrcPath()\n {\n return path.join(this.getRootPath(), 'src');\n }", "function _extensionDirForBrowser() {\n\t\tvar bracketsIndex = window.location.pathname;\n\t\tvar bracketsDir = bracketsIndex.substr(0, bracketsIndex.lastIndexOf('/') + 1);\n\t\tvar extensionDir = bracketsDir + require.toUrl('./');\n\n\t\treturn extensionDir;\n\t}", "function absolute(_path, cwd) {\n cwd = cwd || process.cwd();\n\n if (_.isArray(_path)) {\n return _.map(_path, function(entry){\n return absolute(entry, cwd);\n });\n\n } else {\n return path.resolve(cwd, _path);\n }\n}", "function expandPath(inputPath) {\n var outputPath = inputPath.replace('~', process.env.HOME);\n\n outputPath = path.resolve(outputPath);\n\n return outputPath;\n}", "function toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}", "function toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}", "function toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}", "function toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}", "function toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}", "function toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}", "function toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}", "function toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}", "function toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}", "function toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}", "get fullPath() {\n return path.join(this.assembly.directory, this.directoryName);\n }", "function getRelativePath(dir) {\n var standardizedDir = dir.replace(SEP_PATT, \"/\");\n //remove the workspace path\n return standardizedDir.replace(\n workspacePath.replace(SEP_PATT, \"/\")\n , \"\"\n )\n //remove the source directory\n .replace(\n defaults.sourceDirectory\n , \"\"\n )\n //remove the left over path separaters from the begining\n .replace(\n LEADING_SEP_PATT\n , \"\"\n );\n }", "function currentTarget(repo){\n return path.resolve(homepath,repo).replace('C:','').replace('D:','').split('\\\\').join('/')\n}", "function getConfigPath(cwd) {\n return path__default.join(cwd, 'keystone');\n}", "function platformPath(p) {\n return p.split('/').join(path.sep);\n}", "function getWorkspaceParentDir() {\n return external_path_.dirname(getWorkspaceDir());\n}", "function getRootPath (p) {\n p = path.normalize(path.resolve(p)).split(path.sep)\n if (p.length > 0) return p[0]\n else return null\n}", "function _getFileRelativeRootFolder(filePath) {\n return filePath.replace(path.resolve('..'), '').split('\\\\')[2] || '';\n}", "function toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path$1.sep);\n}", "function getWasmCwd(wasmRootFolder) {\n if (ENVIRONMENT_IS_NODE) {\n var cwd = nodeProcess.cwd();\n var parsed = nodePath.parse(cwd);\n var wasmCwd = wasmRootFolder + wasmPathSep + cwd.substring(parsed.root.length);\n var sep = pathSep === \"\\\\\" ? \"\\\\\\\\\" : pathSep;\n return wasmCwd.replace(new RegExp(sep, \"g\"), wasmPathSep);\n } else if (ENVIRONMENT_IS_WEB) {\n var cwd = window.location.pathname;\n cwd = cwd.substring(0, cwd.lastIndexOf(pathSep));\n return createFilePath(cwd, wasmRootFolder, wasmPathSep);\n } else {\n throw new Error(\"Unknown environment!\");\n }\n }", "static async projectDirectory () {\n const baseURL = await Project.systemInterface.getConfig().baseURL;\n return resource(baseURL).join('local_projects').asDirectory();\n }", "static resolve(basedir, path) {\n if (path.startsWith(\"/\")) {\n basedir = \"/\";\n }\n\n const base = basedir.split(\"/\").filter(x => x !== \"\");\n const rest = path.split(\"/\").filter(x => x !== \"\");\n const full = base.concat(rest);\n\n const result = [];\n for (const part of full) {\n if (part === \"..\") {\n result.pop();\n } else if (part !== \".\") {\n result.push(part);\n }\n }\n\n if (path.endsWith(\"/\") && result.length > 0) {\n return \"/\" + result.join(\"/\") + \"/\";\n } else {\n return \"/\" + result.join(\"/\");\n }\n }" ]
[ "0.69734997", "0.6636196", "0.6547233", "0.6374444", "0.63654643", "0.6335709", "0.6314468", "0.6249961", "0.6247353", "0.624221", "0.6210497", "0.62073255", "0.61992157", "0.61731625", "0.6162345", "0.61584747", "0.60821575", "0.60718787", "0.60528433", "0.60277003", "0.5992801", "0.59900403", "0.5970876", "0.59706926", "0.5959133", "0.59550095", "0.5943102", "0.5937145", "0.59302783", "0.5925334", "0.58887243", "0.5881772", "0.584687", "0.58435416", "0.5826516", "0.5805138", "0.58042645", "0.5800861", "0.5787522", "0.5784665", "0.5778344", "0.57692766", "0.57667506", "0.5756426", "0.5756173", "0.5751782", "0.574329", "0.5736263", "0.5735038", "0.5730416", "0.5725251", "0.57219195", "0.5715189", "0.56892467", "0.5666983", "0.56637865", "0.5652751", "0.56436545", "0.56315595", "0.5624564", "0.56231123", "0.561958", "0.5617243", "0.5616871", "0.56132054", "0.56100565", "0.5607405", "0.55970037", "0.5595074", "0.55935866", "0.55935866", "0.55935866", "0.5591963", "0.5587488", "0.55772966", "0.55769277", "0.5573981", "0.55736285", "0.55629146", "0.55629146", "0.55629146", "0.55629146", "0.55629146", "0.55629146", "0.55629146", "0.55629146", "0.55629146", "0.55629146", "0.5556685", "0.5551236", "0.5542818", "0.5542778", "0.55409354", "0.5540142", "0.5538793", "0.5538535", "0.55365795", "0.5532452", "0.55285895", "0.55256176" ]
0.74453264
0
Generic frontend for stat and lstat
function multistat(mips, mode, pathname, statbuf) { if (typeof pathname === "number") pathname = absolute(mips, mips.mem.getstr(pathname)); // Assert its existence var ub = XHRFS.assert(pathname); if (ub) return ub; var j; try { j = FS[mode](pathname); } catch (err) { return fsErr(err); } /* * struct stat { * dev_t st_dev; int64 0 * long __st_padding1[2]; 8 * ino_t st_ino; int64 16 * mode_t st_mode; uint32 24 * nlink_t st_nlink; uint32 28 * uid_t st_uid; uint32 32 * gid_t st_gid; uint32 36 * dev_t st_rdev; int64 40 * long __st_padding2[2]; 48 * off_t st_size; int64 56 * struct timespec st_atim; int64 64 * struct timespec st_mtim; int64 72 * struct timespec st_ctim; int64 80 * blksize_t st_blksize; int32 88 * long __st_padding3; 92 * blkcnt_t st_blocks; int64 96 * long __st_padding4[14]; * }; */ function s(o, v) { mips.mem.set(statbuf + o, v); } function sd(o, v) { mips.mem.setd(statbuf + o, v); } sd(0, j.dev); sd(16, j.ino); s(24, j.mode); s(28, j.nlink); s(32, 0); // uid s(36, 0); // gid s(40, j.rdev); sd(56, j.size); var atime = j.atime.getTime()/1000; s(64, atime); s(68, (atime*1000000000)%1000000000); var mtime = j.mtime.getTime()/1000; s(72, mtime); s(76, (mtime*1000000000)%1000000000); var ctime = j.ctime.getTime()/1000; s(80, ctime); s(84, (ctime*1000000000)%1000000000); s(88, j.blksize); sd(96, j.blocks); return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async lstat(entry = this.cwd) {\n if (typeof entry === 'string') {\n entry = this.cwd.resolve(entry);\n }\n return entry.lstat();\n }", "lstat(path, callback) {\n // Make sure the callback is only called once\n callback = call_1.callOnce(callback);\n try {\n let stats = fs.lstatSync(path);\n callback(null, stats);\n }\n catch (err) {\n callback(err, undefined);\n }\n }", "async lstat(filename) {\n try {\n const stats = await this._lstat(filename);\n return stats\n } catch (err) {\n if (err.code === 'ENOENT') {\n return null\n }\n throw err\n }\n }", "stat(path, callback) {\n // Make sure the callback is only called once\n callback = call_1.callOnce(callback);\n try {\n let stats = fs.statSync(path);\n callback(null, stats);\n }\n catch (err) {\n callback(err, undefined);\n }\n }", "static getStatistics(path) {\n return FileSystem._wrapException(() => {\n return fsx.statSync(path);\n });\n }", "stat(path) {\n return (0, rxjs_1.from)(node_fs_1.promises.stat((0, src_1.getSystemPath)(path)));\n }", "static getLinkStatistics(path) {\n return FileSystem._wrapException(() => {\n return fsx.lstatSync(path);\n });\n }", "async hardStat(path) {\n\t\t\tconst stats = await path.lstat();\n\t\t\treturn ___R$$priv$project$rome$$internal$core$server$fs$MemoryFileSystem_ts$toSimpleStats(\n\t\t\t\tstats,\n\t\t\t);\n\t\t}", "async lstat() {\n if ((this.#type & ENOENT) === 0) {\n try {\n this.#applyStat(await this.#fs.promises.lstat(this.fullpath()));\n return this;\n }\n catch (er) {\n this.#lstatFail(er.code);\n }\n }\n }", "renderStat(statToRender) {\n let statProp = statProps[statToRender];\n let statName = statProp.statName;\n\n return (\n <FinalStatsIconAndStat {...statProp} displayValue={this.addStats(statProp)} key={statName}\n toggledStat={this.props.checkedAllStatStates[statName]} />\n );\n }", "stat(path) {\n return new rxjs_1.Observable((obs) => {\n obs.next((0, node_fs_1.statSync)((0, src_1.getSystemPath)(path)));\n obs.complete();\n });\n }", "function makeStatObject(type) {\n type = type || 'file';\n\n var base = {\n dev: 16777220,\n mode: 16877,\n nlink: 13,\n uid: 501,\n gid: 20,\n rdev: 0,\n blksize: 4096,\n ino: 23707191,\n size: 442,\n blocks: 0,\n atime: 'Tue Oct 29 2013 21: 25: 29 GMT + 0100(CET)',\n mtime: 'Wed Oct 30 2013 00: 54: 18 GMT + 0100(CET)',\n ctime: 'Wed Oct 30 2013 00: 54: 18 GMT + 0100(CET)'\n };\n\n base.__proto__ = {};\n\n if (type === 'dir') {\n base.__proto__.isDirectory = function() {\n return true;\n };\n base.__proto__.isFile = function() {\n return false;\n };\n base.__proto__.isSymbolicLink = function() {\n return false;\n };\n } else if (type === 'link') {\n base.__proto__.isDirectory = function() {\n return false;\n };\n base.__proto__.isFile = function() {\n return false;\n };\n base.__proto__.isSymbolicLink = function() {\n return true;\n }\n } else if (type === 'file') {\n base.__proto__.isDirectory = function() {\n return false;\n };\n base.__proto__.isFile = function() {\n return true;\n };\n base.__proto__.isSymbolicLink = function() {\n return false;\n }\n } else {\n throw new Error('Unknown file type: ' + type);\n }\n\n return base;\n}", "function displayStats(highlighted_path){\n /*\n * grab file info for selected file.\n */\n let stats = fs.statSync(highlighted_path);\n let size = stats.size;\n let mtime = stats.mtime;\n let birthtime = stats.birthtime;\n\n let parent = document.getElementById(\"stats\");\n\n while(parent.firstChild) {\n parent.removeChild(parent.firstChild);\n }\n\n \n let nPath = document.createElement(\"p\");\n let nSize = document.createElement(\"p\");\n let nM = document.createElement(\"p\");\n let nB = document.createElement(\"p\"); \n \n nPath.innerText = \"Path: \" +highlighted_path;\n parent.appendChild(nPath);\n\n nSize.innerText = \"Size: \" + size + \" bytes\";\n parent.appendChild(nSize);\n\n nM.innerText = \"Last Modified: \" +mtime;\n parent.appendChild(nM);\n\n nB.innerText = \"Date Created: \" + birthtime;\n parent.appendChild(nB);\n}", "function stat(fs, path, callback) {\n let isSymLink = false;\n call_1.safeCall(fs.lstat, path, (err, lstats) => {\n if (err) {\n // fs.lstat threw an eror\n return callback(err, undefined);\n }\n try {\n isSymLink = lstats.isSymbolicLink();\n }\n catch (err2) {\n // lstats.isSymbolicLink() threw an error\n // (probably because fs.lstat returned an invalid result)\n return callback(err2, undefined);\n }\n if (isSymLink) {\n // Try to resolve the symlink\n symlinkStat(fs, path, lstats, callback);\n }\n else {\n // It's not a symlink, so return the stats as-is\n callback(null, lstats);\n }\n });\n}", "function stat(path, callback) {\n if (!callback) return stat.bind(this, path);\n fs.stat(path, function (err, stat) {\n if (err) return callback(err);\n var ctime = stat.ctime / 1000;\n var cseconds = Math.floor(ctime);\n var mtime = stat.mtime / 1000;\n var mseconds = Math.floor(mtime);\n callback(null, {\n ctime: [cseconds, Math.floor((ctime - cseconds) * 1000000000)],\n mtime: [mseconds, Math.floor((mtime - mseconds) * 1000000000)],\n dev: stat.dev,\n ino: stat.ino,\n mode: stat.mode,\n uid: stat.uid,\n gid: stat.gid,\n size: stat.size\n });\n });\n}", "function stat(filename) {\r\n filename = path._makeLong(filename);\r\n var cache = stat.cache;\r\n if (cache !== null) {\r\n var result = cache[filename];\r\n if (result !== undefined) return result;\r\n }\r\n\r\n try {\r\n var res = libjs.stat(filename);\r\n } catch(errno) {\r\n return errno;\r\n }\r\n\r\n result = (res.mode & /* libjs.S.IFDIR */ 16384) ? 1 : 0;\r\n\r\n if (cache !== null)\r\n cache[filename] = result;\r\n\r\n return result;\r\n}", "function statStream() {\n if (!(this instanceof statStream)) {\n return new statStream();\n }\n\n options = {\n objectMode: true\n };\n Transform.call(this, options);\n\n // State to keep between data events\n this._linecount = 0;\n this._keys = {};\n this._cur = null;\n this._allowedPops = {\n \"prochloro\": true,\n \"synecho\": true,\n \"picoeuk\": true,\n \"beads\": true\n };\n}", "function symlinkStat(fs, path, lstats, callback) {\n call_1.safeCall(fs.stat, path, (err, stats) => {\n if (err) {\n // The symlink is broken, so return the stats for the link itself\n return callback(null, lstats);\n }\n try {\n // Return the stats for the resolved symlink target,\n // and override the `isSymbolicLink` method to indicate that it's a symlink\n stats.isSymbolicLink = () => true;\n }\n catch (err2) {\n // Setting stats.isSymbolicLink threw an error\n // (probably because fs.stat returned an invalid result)\n return callback(err2, undefined);\n }\n callback(null, stats);\n });\n}", "function Stat(props) {\n return (\n <div className=\"stat\">\n {props.text}: {props.value}\n </div>\n );\n}", "function stat(path, callback) {\n rootDir.getFile(path, {}, function(fileEntry) {\n fileEntry.getMetadata(function(metaData) {\n callback(null, {\n size: metaData.size,\n mtime: metaData.modificationTime.getTime()\n });\n }, function(err) {\n callback(err);\n }); \n });\n}", "async getStat(location) {\n try {\n const stat = await fse.stat(this._fullPath(location));\n return {\n size: stat.size,\n modified: stat.mtime,\n raw: stat,\n };\n }\n catch (e) {\n throw handleError(e, location);\n }\n }", "function stat (url, path, opts) {\n return mainTab.executeJavascript(`\n var archive = new DatArchive(\"${url}\")\n archive.stat(\"${path}\", ${JSON.stringify(opts)}).then(v => {\n v.isFile = v.isFile()\n v.isDirectory = v.isDirectory()\n return v\n })\n `)\n}", "static getStatsSync(filename) {\n\t\tfilename = this.resolve(filename);\n\t\treturn fs.statsSync(filename);\n\t}", "evaluateStats(){\n this.stats = fs.statSync(this.filePath);\n }", "renderStat(stat) {\n return (\n <li key={stat.name} className=\"user-info__stat\">\n <Link to={stat.url}>\n <p className=\"user-info__stat-value\">\n {stat.value}\n </p>\n <p className=\"user-info__stat-name\">\n {stat.name}\n </p>\n </Link> \n </li> \n );\n }", "stats (callback) {\n var p = this.withLedgerFile(this.cli).exec(['stats'])\n\n var data = ''\n var errored = false\n\n p.then(process => {\n process.stdout.on('data', function (chunk) {\n data += chunk\n })\n\n process.stdout.once('end', function () {\n if (errored) {\n return\n }\n var stats = null\n var split = data.toString().split('\\n')\n var files = data.match(/Files these postings came from:([^]*?)(\\r?\\n){2}/)\n\n split.forEach(function (el) {\n var prop = el.trim().match(/^(.*):[\\s]+(.*)$/)\n if (prop) {\n if (stats === null) {\n stats = {}\n }\n stats[prop[1]] = prop[2]\n }\n })\n\n if (files) {\n if (stats === null) {\n stats = {}\n }\n\n // convert files[1] == paths capture to array and remove empty entries\n stats.files = files[1].split('\\n').map(function (entry) {\n return entry.trim()\n }).filter(Boolean)\n }\n\n if (stats !== null) {\n callback(null, stats)\n } else {\n callback(new Error('Failed to parse Ledger stats'))\n }\n })\n\n process.stderr.once('data', function (error) {\n errored = true\n callback(error)\n })\n })\n }", "lstatCached() {\n return this.#type & LSTAT_CALLED ? this : undefined;\n }", "function statfs(cb) {\n\tcb(0, {\nbsize: 1000000,\nfrsize: 1000000,\nblocks: 1000000,\nbfree: 1000000,\nbavail: 1000000,\nfiles: 1000000,\nffree: 1000000,\nfavail: 1000000,\nfsid: 1000000,\nflag: 1000000,\nnamemax: 1000000\n});\n}", "setFilestat(byteOffset, value, littleEndian = false) {\n /*\n * typedef struct __wasi_filestat_t {\n * __wasi_device_t st_dev; u64\n * __wasi_inode_t st_ino; u64\n * __wasi_filetype_t st_filetype; u8\n * <pad> u8\n * __wasi_linkcount_t st_nlink; u32\n * __wasi_filesize_t st_size; u64\n * __wasi_timestamp_t st_atim; u64\n * __wasi_timestamp_t st_mtim; u64\n * __wasi_timestamp_t st_ctim; u64\n * } __wasi_filestat_t;\n */\n }", "function updateDisplayStats(path, cnt, size) {\n\t\t\tvar stats = '';\n\t\t\tstats += '<div class=\"margins\">';\n\t\t\tstats += '<div class=\"item\">Path: <strong>' + path + '</strong></div>';\n\t\t\tstats += '<div class=\"item\">Size: <strong>' + (typeof size === 'number' ? displayFileSize(parseInt(size, 10)) : 'NaN') + '</strong></div>';\n\t\t\tstats += '<div class=\"item\">Files: <strong>' + (typeof cnt === 'number' ? cnt : 'NaN') + '</strong></div>';\n\t\t\tstats += '</div>';\n\t\t\t$('#footer .stats').html(stats);\n\t\t}", "function readstat(path){\n return new Promise((resolve, reject)=>{\n fs.stat(path,(err, fileStat)=>{\n if(err){\n reject(err);\n }else{\n resolve(fileStat);\n }\n })\n })\n}", "function parseStatistic(stat) {\n const lowerStat = stat.toLowerCase();\n // Simple statistics\n const statMap = {\n average: stats_1.Stats.AVERAGE,\n avg: stats_1.Stats.AVERAGE,\n minimum: stats_1.Stats.MINIMUM,\n min: stats_1.Stats.MINIMUM,\n maximum: stats_1.Stats.MAXIMUM,\n max: stats_1.Stats.MAXIMUM,\n samplecount: stats_1.Stats.SAMPLE_COUNT,\n n: stats_1.Stats.SAMPLE_COUNT,\n sum: stats_1.Stats.SUM,\n iqm: stats_1.Stats.IQM,\n };\n if (lowerStat in statMap) {\n return {\n type: 'simple',\n statistic: statMap[lowerStat],\n };\n }\n let m = undefined;\n // Percentile statistics\n m = parseSingleStatistic(stat, 'p');\n if (m)\n return { ...m, statName: 'percentile' };\n // Trimmed mean statistics\n m = parseSingleStatistic(stat, 'tm') || parsePairStatistic(stat, 'tm');\n if (m)\n return { ...m, statName: 'trimmedMean' };\n // Winsorized mean statistics\n m = parseSingleStatistic(stat, 'wm') || parsePairStatistic(stat, 'wm');\n if (m)\n return { ...m, statName: 'winsorizedMean' };\n // Trimmed count statistics\n m = parseSingleStatistic(stat, 'tc') || parsePairStatistic(stat, 'tc');\n if (m)\n return { ...m, statName: 'trimmedCount' };\n // Trimmed sum statistics\n m = parseSingleStatistic(stat, 'ts') || parsePairStatistic(stat, 'ts');\n if (m)\n return { ...m, statName: 'trimmedSum' };\n return {\n type: 'generic',\n statistic: stat,\n };\n}", "@computed\n get stat() {\n const { valueName, decimals = 0, format: unitFormat } = this.config\n const { metrics } = this\n const metricsLength = this.metrics.length\n\n if (metricsLength > 1) {\n return 'Only queries that return single series/table is supported'\n }\n\n if (metricsLength === 0) {\n return 'No Data'\n }\n\n /**\n * values: number[]\n */\n const values = get(metrics, '0.values', []).map(([, value]) =>\n Number(value)\n )\n\n const handler = NAME_VALUE_HANDLE_MAP[valueName] || avgs\n const number = handler(values) || 0\n const format = unitTransformMap[unitFormat] || unitTransformMap.none\n return format(number, decimals)\n }", "function statFollowLinks() {\n return fs.statSync.apply(fs, arguments);\n}", "function statFollowLinks() {\n return fs.statSync.apply(fs, arguments);\n}", "function statFollowLinks() {\n return fs.statSync.apply(fs, arguments);\n}", "function statFollowLinks() {\n return fs.statSync.apply(fs, arguments);\n}", "function getStat(stats, name) {\n let stat = stats.find(el => el.stat.name === name);\n return stat.base_stat;\n}", "function GetStatValue( stat, name, def )\n{\n\tif ( name in stat )\n\t{\n\t\treturn stat[name];\n\t}\n\telse\n\t{\n\t\treturn def;\n\t}\n}", "function fstat( files ) {\n var result = runP4(\"fstat -Or\", pathsToPerforceStylePaths(files));\n var fstats = [];\n \n result.standardOutput.trim().split(\"\\r\\n\\r\\n\").map(function(block) {\n fstats.push(createFstat(block));\n });\n result.standardError.trim().split(\"\\r\").map(function(block) {\n var regex = /^(.*) (- no such file\\(s\\).)$/gmi; \n tokens = regex.exec(block);\n if(tokens != null)\n fstats.push(createFstat(\"... clientFile \" + tokens[1]));\n });\n\n return fstats;\n}", "async function status ({\n dir,\n gitdir = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(dir, '.git'),\n fs: _fs,\n filepath\n}) {\n const fs = new FileSystem(_fs);\n let ignored = await GitIgnoreManager.isIgnored({\n gitdir,\n dir,\n filepath,\n fs\n });\n if (ignored) {\n return 'ignored'\n }\n let headTree = await getHeadTree({ fs, gitdir });\n let treeOid = await getOidAtPath({\n fs,\n gitdir,\n tree: headTree,\n path: filepath\n });\n let indexEntry = null;\n // Acquire a lock on the index\n await GitIndexManager.acquire(\n { fs, filepath: `${gitdir}/index` },\n async function (index) {\n for (let entry of index) {\n if (entry.path === filepath) {\n indexEntry = entry;\n break\n }\n }\n }\n );\n let stats = null;\n try {\n stats = await fs._lstat(path__WEBPACK_IMPORTED_MODULE_0___default.a.join(dir, filepath));\n } catch (err) {\n if (err.code !== 'ENOENT') {\n throw err\n }\n }\n\n let H = treeOid !== null; // head\n let I = indexEntry !== null; // index\n let W = stats !== null; // working dir\n\n const getWorkdirOid = async () => {\n if (I && !cacheIsStale({ entry: indexEntry, stats })) {\n return indexEntry.oid\n } else {\n let object = await fs.read(path__WEBPACK_IMPORTED_MODULE_0___default.a.join(dir, filepath));\n let workdirOid = await GitObjectManager.hash({\n gitdir,\n type: 'blob',\n object\n });\n return workdirOid\n }\n };\n\n if (!H && !W && !I) return 'absent' // ---\n if (!H && !W && I) return '*absent' // -A-\n if (!H && W && !I) return '*added' // --A\n if (!H && W && I) {\n let workdirOid = await getWorkdirOid();\n return workdirOid === indexEntry.oid ? 'added' : '*added' // -AA : -AB\n }\n if (H && !W && !I) return 'deleted' // A--\n if (H && !W && I) {\n return treeOid === indexEntry.oid ? '*deleted' : '*deleted' // AA- : AB-\n }\n if (H && W && !I) {\n let workdirOid = await getWorkdirOid();\n return workdirOid === treeOid ? '*undeleted' : '*undeletemodified' // A-A : A-B\n }\n if (H && W && I) {\n let workdirOid = await getWorkdirOid();\n if (workdirOid === treeOid) {\n return workdirOid === indexEntry.oid ? 'unmodified' : '*unmodified' // AAA : ABA\n } else {\n return workdirOid === indexEntry.oid ? 'modified' : '*modified' // ABB : AAB\n }\n }\n /*\n ---\n -A-\n --A\n -AA\n -AB\n A--\n AA-\n AB-\n A-A\n A-B\n AAA\n ABA\n ABB\n AAB\n */\n}", "function getattr(path, cb) {\n\tconsole.log(\"getattr(path, cb)\");\n\tvar stat = {};\n\tvar err = 0; // assume success\n\tlookup(connection, path, function(pathId) {\n\t\t\tconsole.log(path);\n\t\t\tconsole.log(pathId);\n\t\t\tif (pathId === undefined) return cb(-2, null); // -ENOENT\n\t\t\tif (pathId.type === 'folder') {\n\t\t\treturn cb(err, pathId.permissions);\n\t\t\tconnection.getFolderInfo(pathId.id, function (error, info) {\n\t\t\t\t\tconsole.log('DE:'+error);\n\t\t\t\t\tif (error) return cb( error, null );\n\t\t\t\t\tstat.size = 4096;\n\t\t\t\t\tstat.nlink = 1;\n//\t\t\t\t\tstat.mode = info.item_collection.total_count>1?\"040\":\"0100\";\n//\t\t\t\t\tif (info.shared_link != undefined) {\n//\t\t\t\t\tstat.mode += (info.shared_link.permissions.can_share?0:0)+(info.shared_link.permissions.can_download?0:2)+(info.shared_link.permissions.can_upload?0:4)+((info.shared_link.permissions.can_share?0:0)+(info.shared_link.permissions.can_download?0:2)+(info.shared_link.permissions.can_upload?0:4)*10)+0((info.shared_link.permissions.can_share?0:0)+(info.shared_link.permissions.can_download?0:2)+(info.shared_link.permissions.can_upload?0:4)*10); // NOTE the execute bit is always set to false\n//\t\t\t\t\t} else {\n//\t\t\t\t\tstat.mode += \"777\";\n//\t\t\t\t\t}\n//\t\t\t\t\tconsole.log(\"SM:\"+stat.mode);\n//\t\t\t\t\tstat.mode = parseInt(stat.mode);\n\t\t\t\t\tstat.mode = 040777;\n\t\t\t\t\tcb(err, stat);\n\t\t\t\t\t});\n\t\t\t} else {\n\t\t\treturn cb(err, pathId.permissions);\n\t\t\tconnection.getFileInfo(pathId.id, function (error, info) {\n\t\t\t\t\tconsole.log('FE:'+error);\n\t\t\t\t\tif (error) return cb( error, null );\n\t\t\t\t\tstat.size = info.size;\n\t\t\t\t\tstat.nlink = 1;\n//\t\t\t\t\tstat.mode = \"0100\";\n//\t\t\t\t\tif (info.shared_link != undefined) {\n//\t\t\t\t\tstat.mode += (info.shared_link.permissions.can_share?\"0\":\"0\")+(info.shared_link.permissions.can_download?\"0\":\"2\")+(info.shared_link.permissions.can_upload?\"0\":\"4\")+((info.shared_link.permissions.can_share?\"0\":\"0\")+(info.shared_link.permissions.can_download?\"0\":\"2\")+(info.shared_link.permissions.can_upload?\"0\":\"4\"))+((info.shared_link.permissions.can_share?\"0\":\"0\")+(info.shared_link.permissions.can_download?\"0\":\"2\")+(info.shared_link.permissions.can_upload?\"0\":\"4\")); // NOTE the execute bit is always set to false\n//\t\t\t\t\t} else {\n//\t\t\t\t\tstat.mode += \"777\";\n//\t\t\t\t\t}\n//\t\t\t\t\tstat.mode = parseInt(stat.mode);\n\t\t\t\t\tstat.mode = 0100666;\n\t\t\t\t\tcb( err, stat);\n\t\t\t\t\t});\n\t\t\t}\n\t});\n}", "get isFile() {\n return this.stats.isFile()\n }", "Stats() {\n console.debug(`ContaplusModel::FileStats(${this.localFile})`)\n let self = this\n return new Promise((resolve, reject) => {\n fs.stat(self.localFile, (err, stats) => {\n if (err) {\n if (err.code == \"ENOENT\") {\n // User-friendly error\n reject(`El fichero correspondiente a EMPRESA: \"<b>${self.company}</b>\", EJERCICIO: \"<b>${self.year}</b>\" (<i>${self.localFile}</i>), no existe.`)\n } else {\n reject(err)\n }\n } else {\n self.stats = stats\n resolve(self)\n }\n })\n })\n }", "function getStat(isPhysical, isOffensive) {\n\tif(isPhysical) {\n\t\tif(isOffensive) {\n\t\t\treturn 'at';\n\t\t} else {\n\t\t\treturn 'df';\n\t\t}\n\t} else {\n\t\tif(isOffensive) {\n\t\t\treturn 'sa';\n\t\t} else {\n\t\t\treturn 'sd';\n\t\t}\n\t}\n}", "function getUserStatistics() {\n var getUserStatUrl = config.serverURL + config.getUserStatistics; \n getRequest(getUserStatUrl, function(response) {\n $(\".recent-list-wrap .loading-icon\").hide();\n if(response.error) { \n $(\".recent-list-wrap .error-msg\").text(response.error);\n } else {\n $(\".reviewer-stat h1\").text(response.data.reviewerCount);\n $(\".designer-stat h1\").text(response.data.designerCount);\n }\n }, function() {\n $(\".recent-list-wrap .loading-icon\").hide();\n $(\".recent-list-wrap .error-msg\").text(config.serverError);\n });\n }", "function getStats(cb)\n{\n // call nginx to get the stats page\n _request.get(_param.url, _httpOptions, function(err, resp, body)\n {\n if (err)\n return cb(err);\n if (resp.statusCode === 401)\n return cb(new Error('Nginx returned with an error - recheck the username/password you provided'));\n if (resp.statusCode !== 200)\n return cb(new Error('Nginx returned with an error - recheck the URL you provided'));\n if (!body)\n return cb(new Error('Nginx statistics return empty'));\n\n var isCommunityEdition;\n var stats;\n\n if (resp.headers['content-type'] == 'application/json')\n {\n isCommunityEdition = false;\n stats = parseStatsJson(body);\n }\n else\n {\n isCommunityEdition = true;\n stats = parseStatsText(body);\n }\n\n return cb(null, isCommunityEdition, stats);\n });\n}", "function getFileSystemPercentUse(callback) {\n getData('/api/2/fs', function(data) {\n var fs = data.find(function(item) {\n return item.mnt_point.startsWith('/etc');\n });\n return fs ? fs.percent : 'no data';\n }, callback);\n}", "function jStat()\n\t\t\t{\n\t\t\t\treturn new jStat._init(arguments);\n\t\t\t}", "function fsStat (filePath) {\n try {\n var stat = fs.statSync(filePath)\n if (stat.isFile()) return 1\n else if (stat.isDirectory()) return 2\n else return 0\n } catch (e) {}\n return 0\n}", "function getStat(type) {\n var flag;\n if (type == \"previous\") {\n flag = cur > 1;\n } else {\n flag = total > 1 && cur < total;\n }\n return flag ? \"normal\" : \"disabled\";\n }", "static showStatElement(stat, index) {\n return <li key={index} className={'class-' + stat.getClass()}>\n <span className={'rolls'}>({stat.rolls})</span> {stat.show()}\n </li>;\n }", "getStatistics () {\n return instance.get(base.dev + '/statistics')\n }", "function getStats(callback) {\n\tsendRequest({ request: 'get stats' }, callback);\n}", "function getStatMod(stat) {\n var mod = Number; //sets the type of the variable\n \n if(stat == 1) {\n mod = -5;\n }\n else if(stat < 4) { //2-3\n mod = -4;\n }\n else if(stat < 6) { //4-5\n mod = -3;\n }\n else if(stat < 8) { //6-7\n mod = -2;\n }\n else if(stat < 10) { //8-9\n mod = -1;\n }\n else if(stat < 12) { //10-11\n mod = 0;\n }\n else if(stat < 14) { //12-13\n mod = 1;\n }\n else if(stat < 16) { //14-15\n mod = 2;\n }\n else if(stat < 18) { //16-17\n mod = 3;\n }\n else if(stat < 20) { //18-19\n mod = 4;\n }\n else if(stat < 22) { //20-21\n mod = 5;\n }\n else if(stat < 24) { //22-23\n mod = 6;\n }\n else if(stat < 26) { //24-25\n mod = 7;\n }\n else if(stat < 28) { //26-27\n mod = 8;\n }\n else if(stat < 30) { //28-29\n mod = 9;\n }\n else { //30 because this function is not called if it's more than 30 or less than 1\n mod = 10;\n }\n \n return mod;\n} //function getStatMod", "function createStatLink(param){\n\t\tvar statlink = elem('a', \"<img src='data:image/gif;base64,\" + imagenes[\"stat\"] + \"' style='margin:0px 1px 0px 1px; display: inline' title='\" + T('STAT') + \"' alt='Stat' border=0>\");\n\t\tstatlink.href = \"javascript:void(0);\";\n\t\tvar ref = 'http://www.denibol.com/proyectos/travian_world/stat2.php?server=' + server + '&' + param;\n\t\tstatlink.addEventListener(\"mouseover\", function(){ timeout = setTimeout(function(){ var a = get(\"tb_tooltip\"); a.innerHTML = \"<img src='\" + ref + \"' border='0'/>\"; a.style.display = 'block'; }, 1000); }, 0);\n\t\tstatlink.addEventListener(\"mouseout\", function(){ clearTimeout(timeout); get(\"tb_tooltip\").style.display = 'none'; }, 0);\n\t\tstatlink.addEventListener(\"click\", function(){ var popup = window.open(ref, 'popup', 'width=350, height=250'); popup.focus(); return false; }, 0);\n\t\treturn statlink;\n\t}", "function mockFileStats (modified) {\n return new Stats({\n isFile: true,\n isDirectory: false,\n ctime: modified,\n mtime: modified\n });\n}", "async getStat(pathStr, depth) {\n let result = {}\n const stat = await fs.stat(pathStr)\n await Promise.all(\n this.statCollectors.map(async (collector) => result[collector.getName()] = await collector.collect(pathStr, stat))\n )\n if (depth > 0 && stat.isDirectory()) result.children = await this.getStatChildren(pathStr, depth - 1)\n return result\n }", "_listing(path) {\n\t\tconst statResult = new Promise((resolve, reject) => {\n\t\t\tfs.readdir(path, (error, fileList) => {\n\t\t\t\tresolve(fileList);\n\t\t\t\treject(error);\n\t\t\t});\n\t\t});\n\t\treturn statResult;\n\t}", "function runningStatStr(stat) {\n\t return `Last: ${stat.last.toFixed(2)}ms | ` +\n\t `Avg: ${stat.mean.toFixed(2)}ms | ` +\n\t `Avg${stat.maxBufferSize}: ${stat.bufferMean.toFixed(2)}ms`;\n\t}", "getStatistic(extension, bp, callback) {\n if (!callback) {\n return;\n }\n if (!extension) {\n callback(null);\n return;\n }\n // currently only query based on itemid for search grouping - but it theory we could query on many things\n var query = `${this.stats_endpoint}/${extension}`;\n console.log(`GET stat: ${query}`);\n axios.post(query, bp)\n .then(response => {\n callback(response);\n })\n .catch(error => {\n console.log(`[ERROR] Failed to get stat for ${query} : ${error}`);\n callback(null);\n });\n }", "setFdstat(byteOffset, value, littleEndian = false) {\n /*\n * typedef struct __wasi_fdstat_t {\n * __wasi_filetype_t fs_filetype; u8\n * <pad> u8\n * __wasi_fdflags_t fs_flags; u16\n * <pad> u32\n * __wasi_rights_t fs_rights_base; u64\n * __wasi_rights_t fs_rights_inheriting; u64\n * } __wasi_fdstat_t;\n */\n this.setUint8(byteOffset, value.filetype, littleEndian);\n this.setUint16(byteOffset + 2, 0, littleEndian);\n this.setBigUint64(byteOffset + 8, value.rights_base, littleEndian);\n this.setBigUint64(byteOffset + 16, value.rights_inheriting, littleEndian);\n }", "function jStat() {\n return new jStat._init(arguments);\n}", "function jStat() {\n return new jStat._init(arguments);\n}", "static getHumanServerStatus(callback) {\n let apiPath = \"api/1.0/system/human-servers/status\";\n try {\n let params = {};\n Api.get(apiPath, params, results => {\n callback(super.returnValue(apiPath, results));\n });\n } catch (error) {\n callback(super.catchError(error));\n }\n }", "function createStatLink(param){\r\n\t\tvar statlink = elem('a', \"<img src='data:image/gif;base64,\" + imagenes[\"stat\"] + \"' style='margin:0px 1px 0px 1px; display: inline' title='\" + T('STAT') + \"' alt='Stat' border=0>\");\r\n\t\tstatlink.href = \"javascript:void(0);\";\r\n\t\tvar ref = 'http://www.denibol.com/proyectos/travian_world/stat2.php?server=' + server + '&' + param;\r\n\t\tstatlink.addEventListener(\"mouseover\", function(){ timeout = setTimeout(function(){ var a = get(\"tb_tooltip\"); a.innerHTML = \"<img src='\" + ref + \"' border='0'/>\"; a.style.display = 'block'; }, 1000); }, 0);\r\n\t\tstatlink.addEventListener(\"mouseout\", function(){ clearTimeout(timeout); get(\"tb_tooltip\").style.display = 'none'; }, 0);\r\n\t\tstatlink.addEventListener(\"click\", function(){ var popup = window.open(ref, 'popup', 'width=350, height=250'); popup.focus(); return false; }, 0);\r\n\t\treturn statlink;\r\n\t}", "function stat(path) {\n return new Promise(function(resolve, reject) {\n fs.stat(path, function(err, stats) {\n if (err) {\n reject(err);\n } else {\n resolve(stats.isDirectory());\n }\n });\n });\n}", "increaseStat() {}", "function getStatsForMyImages() {\n\n}", "function displayFile(name) {\n const filePath = path.join(alpsDriveRoot, name)\n const statFile = fs.stat(filePath)\n return statFile.then((result) => {\n if (result.isFile()) {\n return fs.readFile(filePath)\n } else {\n return readDirectory(filePath)\n }\n }\n ).catch((err) => {console.log(err)})\n}", "function Statistic(props) {\n var children = props.children,\n className = props.className,\n color = props.color,\n content = props.content,\n floated = props.floated,\n horizontal = props.horizontal,\n inverted = props.inverted,\n label = props.label,\n size = props.size,\n text = props.text,\n value = props.value;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', color, size, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"j\" /* useValueAndKey */])(floated, 'floated'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(horizontal, 'horizontal'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(inverted, 'inverted'), 'statistic', className);\n var rest = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"b\" /* getUnhandledProps */])(Statistic, props);\n var ElementType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"c\" /* getElementType */])(Statistic, props);\n\n if (!__WEBPACK_IMPORTED_MODULE_5__lib__[\"d\" /* childrenUtils */].isNil(children)) return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n if (!__WEBPACK_IMPORTED_MODULE_5__lib__[\"d\" /* childrenUtils */].isNil(content)) return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n content\n );\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_8__StatisticValue__[\"a\" /* default */].create(value, {\n defaultProps: { text: text }\n }),\n __WEBPACK_IMPORTED_MODULE_7__StatisticLabel__[\"a\" /* default */].create(label)\n );\n}", "function Statistic(props) {\n var children = props.children,\n className = props.className,\n color = props.color,\n floated = props.floated,\n horizontal = props.horizontal,\n inverted = props.inverted,\n label = props.label,\n size = props.size,\n text = props.text,\n value = props.value;\n\n var classes = (0, _classnames2.default)('ui', color, size, (0, _lib.useValueAndKey)(floated, 'floated'), (0, _lib.useKeyOnly)(horizontal, 'horizontal'), (0, _lib.useKeyOnly)(inverted, 'inverted'), 'statistic', className);\n var rest = (0, _lib.getUnhandledProps)(Statistic, props);\n var ElementType = (0, _lib.getElementType)(Statistic, props);\n\n if (!_lib.childrenUtils.isNil(children)) return _react2.default.createElement(ElementType, (0, _extends3.default)({}, rest, { className: classes }), children);\n\n return _react2.default.createElement(ElementType, (0, _extends3.default)({}, rest, { className: classes }), _react2.default.createElement(_StatisticValue2.default, { text: text, value: value }), _react2.default.createElement(_StatisticLabel2.default, { label: label }));\n}", "get vStat() {\n return this.bdVStat;\n }", "function Statistic(props) {\n var children = props.children,\n className = props.className,\n color = props.color,\n floated = props.floated,\n horizontal = props.horizontal,\n inverted = props.inverted,\n label = props.label,\n size = props.size,\n text = props.text,\n value = props.value;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_3_classnames___default()('ui', color, size, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"h\" /* useValueAndKey */])(floated, 'floated'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(horizontal, 'horizontal'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(inverted, 'inverted'), 'statistic', className);\n var rest = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"b\" /* getUnhandledProps */])(Statistic, props);\n var ElementType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"c\" /* getElementType */])(Statistic, props);\n\n if (!__WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(children)) return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__StatisticValue__[\"a\" /* default */], { text: text, value: value }),\n __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__StatisticLabel__[\"a\" /* default */], { label: label })\n );\n}", "function Statistic(props) {\n var children = props.children,\n className = props.className,\n color = props.color,\n floated = props.floated,\n horizontal = props.horizontal,\n inverted = props.inverted,\n label = props.label,\n size = props.size,\n text = props.text,\n value = props.value;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', color, size, Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"D\" /* useValueAndKey */])(floated, 'floated'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(horizontal, 'horizontal'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"z\" /* useKeyOnly */])(inverted, 'inverted'), 'statistic', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"q\" /* getUnhandledProps */])(Statistic, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"p\" /* getElementType */])(Statistic, props);\n\n if (!__WEBPACK_IMPORTED_MODULE_5__lib__[\"d\" /* childrenUtils */].isNil(children)) return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__StatisticValue__[\"a\" /* default */], { text: text, value: value }),\n __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__StatisticLabel__[\"a\" /* default */], { label: label })\n );\n}", "function _getStats(peer, cb) {\n if (!!navigator.mozGetUserMedia) {\n peer.getStats(\n function (res) {\n var items = [];\n res.forEach(function (result) {\n items.push(result);\n });\n cb(items);\n },\n cb\n );\n } else {\n peer.getStats(function (res) {\n var items = [];\n res.result().forEach(function (result) {\n var item = {};\n result.names().forEach(function (name) {\n item[name] = result.stat(name);\n });\n item.id = result.id;\n item.type = result.type;\n item.timestamp = result.timestamp;\n items.push(item);\n });\n cb(items);\n });\n }\n}", "function StatRepository() {\n}", "function lsPretty(ext, usedFilename, label) {\n var message = \"Available \" + label + \"(s):\";\n console.log(message.green);\n lsFiltered(ext).forEach(function(e,x,a){\n var star = usedFilename == e ? '*' : ' ';\n var num = sprintf(\" %s%2d\", star, x);\n console.log(num.cyan + ' ' + e.magenta);\n });\n}", "function handleStatToggle(event) {\n //check stat name from dom element\n const stat = event.target.getAttribute(\"name\");\n\n //switch on the grabbed stat\n switch (stat) {\n case \"str\":\n setStrMod(!strMod);\n break;\n case \"dex\":\n setDexMod(!dexMod);\n break;\n case \"con\":\n setConMod(!conMod);\n break;\n case \"int\":\n setIntMod(!intMod);\n break;\n case \"wis\":\n setWisMod(!wisMod);\n break;\n case \"cha\":\n setChaMod(!chaMod);\n break;\n }\n }", "function Statistic(props) {\n var children = props.children,\n className = props.className,\n color = props.color,\n content = props.content,\n floated = props.floated,\n horizontal = props.horizontal,\n inverted = props.inverted,\n label = props.label,\n size = props.size,\n text = props.text,\n value = props.value;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', color, size, Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"F\" /* useValueAndKey */])(floated, 'floated'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(horizontal, 'horizontal'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(inverted, 'inverted'), 'statistic', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"r\" /* getUnhandledProps */])(Statistic, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"q\" /* getElementType */])(Statistic, props);\n\n if (!__WEBPACK_IMPORTED_MODULE_5__lib__[\"d\" /* childrenUtils */].isNil(children)) return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n if (!__WEBPACK_IMPORTED_MODULE_5__lib__[\"d\" /* childrenUtils */].isNil(content)) return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n content\n );\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_8__StatisticValue__[\"a\" /* default */].create(value, {\n defaultProps: { text: text }\n }),\n __WEBPACK_IMPORTED_MODULE_7__StatisticLabel__[\"a\" /* default */].create(label)\n );\n}", "function Statistic(props) {\n var children = props.children,\n className = props.className,\n color = props.color,\n content = props.content,\n floated = props.floated,\n horizontal = props.horizontal,\n inverted = props.inverted,\n label = props.label,\n size = props.size,\n text = props.text,\n value = props.value;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', color, size, Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"F\" /* useValueAndKey */])(floated, 'floated'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(horizontal, 'horizontal'), Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"B\" /* useKeyOnly */])(inverted, 'inverted'), 'statistic', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"r\" /* getUnhandledProps */])(Statistic, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_5__lib__[\"q\" /* getElementType */])(Statistic, props);\n\n if (!__WEBPACK_IMPORTED_MODULE_5__lib__[\"d\" /* childrenUtils */].isNil(children)) return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n if (!__WEBPACK_IMPORTED_MODULE_5__lib__[\"d\" /* childrenUtils */].isNil(content)) return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n content\n );\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_8__StatisticValue__[\"a\" /* default */].create(value, {\n defaultProps: { text: text }\n }),\n __WEBPACK_IMPORTED_MODULE_7__StatisticLabel__[\"a\" /* default */].create(label)\n );\n}", "statFile(fileName) {\n const configs = this.configs;\n const folder = this.parent;\n this.initNode(fileName);\n this.fromFilePlainName = utils.getFilePlainName(this.fromFileName);\n this.fromFileExtension = path.extname(this.fromFileName);\n this.isHtmlFile = utils.isHtmlFile(this.fromFileExtension);\n this.isMarkdownFile = utils.isMarkdownFile(this.fromFileExtension);\n if (this.isHtmlFile) {\n configs.counterHtmlFiles.push(this);\n // Ignoring the HTML files.\n return;\n }\n if (!this.isMarkdownFile) {\n folder.pushFile(this);\n return;\n }\n this.toFilePlainName = utils.getFilePlainName(this.toFileName);\n this.toFileName = this.toFilePlainName + constants.DOT_HTML;\n this.toFilePath = path.join(folder.toFilePath, this.toFileName);\n this.setHref(this.toFileName, this.toFilePath);\n switch (this.toFilePlainName) {\n case constants.INDEX:\n configs.counterTestFileIndexFiles.push(this);\n break;\n case folder.toFileName:\n configs.counterTestFileTestFileFiles.push(this);\n break;\n default:\n configs.counterTestFolderTestFileFiles.push(this);\n break;\n }\n if (configs.noTrailingSlash) {\n // Case 1. Rendering in the no trailing slash mode.\n switch (this.toFilePlainName) {\n case folder.toFileName:\n this.toFileName = folder.toFileName + constants.DOT_HTML;\n this.toFilePath = path.join(folder.toFilePath, this.toFileName);\n // The href is useless as a list page, the same of its folder.\n this.setHref(folder.toFileName, folder.toFilePath);\n folder.setFolderPage(this);\n break;\n // case constants.README:\n case constants.INDEX:\n // index.md -> ${folder.toFileName}.html\n this.toFileName = folder.toFileName + constants.DOT_HTML;\n this.toFilePath = path.join(folder.toFilePath, this.toFileName);\n // The href is useless as a list page, the same of its folder.\n this.setHref(folder.toFileName, folder.toFilePath);\n // Set the folder page if not set yet.\n if (!folder.page) {\n folder.setFolderPage(this);\n }\n break;\n default:\n this.toFileName = this.toFilePlainName + constants.DOT_HTML;\n // Create a folder to store the html in the no-trailing-slash mode.\n this.toFolderPath = path.join(folder.toFilePath, this.toFilePlainName);\n this.toFilePath = path.join(this.toFolderPath, this.toFileName);\n // The folder is created for the document, so the href is #toFolderPath.\n this.setHref(this.toFilePlainName, this.toFolderPath);\n folder.pushFile(this);\n break;\n }\n return;\n }\n if (configs.trailingSlash) {\n // Case 2. Rendering in the trailing slash mode.\n this.toFileName = constants.INDEX_DOT_HTML;\n if (this.toFilePlainName === constants.INDEX) {\n this.toFilePath = path.join(folder.toFilePath, constants.INDEX_DOT_HTML);\n // The folder is for the document, so the href is folder#toFolderPath.\n // this.setHref(utils.addTrailingSlash(folder.toFileName), utils.addTrailingSlash(folder.toFilePath));\n // this.setHref(folder.toFileName, folder.toFilePath);\n this.setHref(folder.hrefRelative, folder.hrefAbsolute);\n folder.setFolderPage(this);\n }\n else {\n // Create a folder to store the html in the trailing-slash mode.\n this.toFolderPath = path.join(folder.toFilePath, this.toFilePlainName);\n // Render the markdown document to index.html to add a trailing slash.\n this.toFilePath = path.join(this.toFolderPath, constants.INDEX_DOT_HTML);\n // The folder is created for the document, so the href is #toFolderPath.\n this.setHref(utils.addTrailingSlash(this.toFilePlainName), utils.addTrailingSlash(this.toFolderPath));\n folder.pushFile(this);\n }\n return;\n }\n // Case 3. Rendering in the default mode.\n this.toFileName = this.toFilePlainName + constants.DOT_HTML;\n this.toFilePath = path.join(folder.toFilePath, this.toFileName);\n if (this.toFilePlainName === constants.INDEX) {\n // The folder is for the document, so the href is folder#toFolderPath.\n this.setHref(folder.hrefRelative, folder.hrefAbsolute);\n folder.setFolderPage(this);\n }\n else {\n this.setHref(this.toFileName, this.toFilePath);\n folder.pushFile(this);\n }\n }", "constructor(file, context, path, stats) {\n super(file, context, path, stats);\n this.fileInfo = stats;\n }", "function Statistic(props) {\n var children = props.children,\n className = props.className,\n color = props.color,\n content = props.content,\n floated = props.floated,\n horizontal = props.horizontal,\n inverted = props.inverted,\n label = props.label,\n size = props.size,\n text = props.text,\n value = props.value;\n\n var classes = (0, _classnames2.default)('ui', color, size, (0, _lib.useValueAndKey)(floated, 'floated'), (0, _lib.useKeyOnly)(horizontal, 'horizontal'), (0, _lib.useKeyOnly)(inverted, 'inverted'), 'statistic', className);\n var rest = (0, _lib.getUnhandledProps)(Statistic, props);\n var ElementType = (0, _lib.getElementType)(Statistic, props);\n\n if (!_lib.childrenUtils.isNil(children)) return _react2.default.createElement(ElementType, (0, _extends3.default)({}, rest, { className: classes }), children);\n if (!_lib.childrenUtils.isNil(content)) return _react2.default.createElement(ElementType, (0, _extends3.default)({}, rest, { className: classes }), content);\n\n return _react2.default.createElement(ElementType, (0, _extends3.default)({}, rest, { className: classes }), _StatisticValue2.default.create(value, {\n defaultProps: { text: text }\n }), _StatisticLabel2.default.create(label));\n}", "function getattr(path, callback) {\n\n repo.pathToEntry(treeHash, path, onEntry);\n\n function onEntry(err, entry) {\n if (err) return callback(-1); // ???\n if (!entry || !entry.mode) {\n return callback(-ENOENT);\n }\n\n var mode = entry.mode;\n if (modes.isBlob(mode)) {\n if (entry.hash in lengthCache) {\n return callback(0, {\n size: lengthCache[entry.hash],\n mode: entry.mode & 0777555\n });\n }\n return repo.loadAs('blob', entry.hash, onBlob);\n }\n\n if (mode === modes.tree) {\n return callback(0, {\n size: 4096, // standard size of a directory\n mode: 040555 //directory with 755 permissions\n });\n }\n return callback(-EINVAL);\n\n function onBlob(err, blob) {\n if (err) return (-ENOENT);\n lengthCache[entry.hash] = blob.length;\n return callback(0, {\n size: blob.length,\n mode: entry.mode & 0777555\n });\n }\n }\n }", "get netstat() { return this.opts.netstatPeriod > 0; }", "function showStatsOld (evnt) {\n\tvar s= evnt.type + \" event captured\";\n\ts += \"x: \" + evnt.pageX + \" y: \" + evnt.pageY;\n\tvar icon = $(evnt.target)\n\tvar std_id = icon.id.split(\"_\")[0]\n\t// alert (s);\n\tvar stats = $(\"stats\")\n\tvar xDelta = 11\n\tvar yDelta = -20\n\tvar x = Position.cumulativeOffset(icon)[0] + xDelta; // evnt.pageX + 2;\n\tvar y = Position.cumulativeOffset(icon)[1] + yDelta; // evnt.pageY -30;\n\tvar std = $(std_id)\n\tif (std == null) {\n\t\talert (\"std not found for \" + std_id);\n\t\treturn;\n\t}\n\tvar std_stats = $(std_id+\"_stats\");\n\tif (std_stats == null) {\n\t\talert (\"std stats not found for \" + std_id);\n\t\treturn;\n\t}\n\tstats.innerHTML = std_stats.innerHTML;\n\tstats.setStyle ({display:\"block\", left:x, top:y});\n}", "function get_stats(statscallback) {\n document.querySelector('.cm-update-stats-icon').innerHTML = \"<i class=\\\"icon ion-android-sync big-icon icon-spin cm-update-stats\\\" query=\\\"update\\\"></i>\";\n console.log('Get stats');\n phonon.ajax({\n method: 'GET',\n url: localStorage.getItem('current')+'/stats',\n crossDomain: true,\n dataType: 'json',\n success: statscallback \n });\n}", "function renderBaseStats() {\n var ulElement = document.createElement('ul');\n var statNames = ['STR: ', 'DEX: ', 'CON: ', 'INT: ', 'WIS: ', 'CHA: '];\n statsSection.appendChild(ulElement);\n for (var i = 0; i < player.statArray.length; i++) {\n var liElement = document.createElement('li');\n liElement.textContent = statNames[i] + player.statArray[i];\n ulElement.appendChild(liElement);\n }\n}", "function Statistic(props) {\n var children = props.children,\n className = props.className,\n color = props.color,\n content = props.content,\n floated = props.floated,\n horizontal = props.horizontal,\n inverted = props.inverted,\n label = props.label,\n size = props.size,\n text = props.text,\n value = props.value;\n var classes = (0, _classnames[\"default\"])('ui', color, size, (0, _lib.useValueAndKey)(floated, 'floated'), (0, _lib.useKeyOnly)(horizontal, 'horizontal'), (0, _lib.useKeyOnly)(inverted, 'inverted'), 'statistic', className);\n var rest = (0, _lib.getUnhandledProps)(Statistic, props);\n var ElementType = (0, _lib.getElementType)(Statistic, props);\n\n if (!_lib.childrenUtils.isNil(children)) {\n return _react[\"default\"].createElement(ElementType, (0, _extends2[\"default\"])({}, rest, {\n className: classes\n }), children);\n }\n\n if (!_lib.childrenUtils.isNil(content)) {\n return _react[\"default\"].createElement(ElementType, (0, _extends2[\"default\"])({}, rest, {\n className: classes\n }), content);\n }\n\n return _react[\"default\"].createElement(ElementType, (0, _extends2[\"default\"])({}, rest, {\n className: classes\n }), _StatisticValue[\"default\"].create(value, {\n defaultProps: {\n text: text\n },\n autoGenerateKey: false\n }), _StatisticLabel[\"default\"].create(label, {\n autoGenerateKey: false\n }));\n}", "function getRelevantAttrs(stat) {\n switch (stat) {\n case 'Hours':\n return ['times'];\n break;\n case 'Kills':\n return ['kills','friendlyKills'];\n break;\n case 'Deaths':\n return ['losses'];\n break;\n default:\n return false;\n }\n }", "function drawStats() {\n\t\tterm.terminal.saveCursor();\n\t\tif (startIndex === 0) var scrollText = \"Scroll: 0% \";\n\t\telse var scrollText = \"Scroll: \" + ((startIndex / textLines.length) * 100).toFixed() + \"% \";\n\t\tvar linesText = \" Lines: \" + textLines.length;\n\t\tvar titleText = \"HzVelocity REPL | \" + hzDisp.queue.blocks.length + \" Coroutines \" + (paused ? \"Paused\" : \"Running\");\n\t\tvar spacesLen = Number(((process.stdout.columns - (scrollText.length + linesText.length + titleText.length)) / 2).toFixed());\n\t\tvar spaces = (new Array(spacesLen)).fill(\" \").join(\"\");\n\t\tvar text = linesText + spaces + titleText + spaces + scrollText;\n\t\tstatTextBuffer.setText(text);\n\t\tstatTextBuffer.setAttrRegion({\n\t\t\tbgColor: \"white\",\n\t\t\tcolor: \"black\"\n\t\t}, {\n\t\t\txmin: 0,\n\t\t\txmax: process.stdout.columns,\n\t\t\tymin: 0,\n\t\t\tymax: 1\n\t\t});\n\t\tstatTextBuffer.draw();\n\t\tstatScreenBuffer.draw();\n\t\tterm.terminal.restoreCursor();\n\t}", "static getServerStatus(callback) {\n let apiPath = \"api/1.0/system/servers/status\";\n try {\n let params = {};\n Api.get(apiPath, params, results => {\n callback(super.returnValue(apiPath, results));\n });\n } catch (error) {\n callback(super.catchError(error));\n }\n }", "function get_stats(callback){\n data = {\n \"time\": null,\n \"cpu\": null,\n \"tot_mem\": null,\n \"free_mem\": null\n }\n\n os.cpuUsage(function(cpu){\n cpu = Math.round(cpu * 100);\n\n data = {\n \"time\": curr_time(),\n \"cpu\": cpu,\n \"tot_mem\": os.totalmem(),\n \"free_mem\": os.freemem()\n }\n\n callback(data);\n })\n}", "function Statistic(props) {\n var children = props.children,\n className = props.className,\n color = props.color,\n content = props.content,\n floated = props.floated,\n horizontal = props.horizontal,\n inverted = props.inverted,\n label = props.label,\n size = props.size,\n text = props.text,\n value = props.value;\n var classes = Object(clsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"])('ui', color, size, Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useValueAndKey\"])(floated, 'floated'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(horizontal, 'horizontal'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(inverted, 'inverted'), 'statistic', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getUnhandledProps\"])(Statistic, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getElementType\"])(Statistic, props);\n\n if (!_lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(children)) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, rest, {\n className: classes\n }), children);\n }\n\n if (!_lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(content)) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, rest, {\n className: classes\n }), content);\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, rest, {\n className: classes\n }), _StatisticValue__WEBPACK_IMPORTED_MODULE_8__[\"default\"].create(value, {\n defaultProps: {\n text: text\n },\n autoGenerateKey: false\n }), _StatisticLabel__WEBPACK_IMPORTED_MODULE_7__[\"default\"].create(label, {\n autoGenerateKey: false\n }));\n}", "function renderStats(stats) {\n const f = stats.updateFrequency;\n let onTimeRate = (stats.updates-stats.misses) / stats.updates;\n onTimeRate = (onTimeRate*100).toFixed(1) + \"%\";\n $g(\"total-listen\").innerText = secondsToHuman(stats.totalListen);\n $g(\"count\").innerText = stats.updates;\n $g(\"update-freq\").innerText = `Updates about every ${f === 1 ? 'day' : `${f} days`}`;\n $g(\"ontime-rate-label\").innerText = onTimeRate;\n $g(\"ontime-rate\").style.width = onTimeRate;\n $g(\"ontime-rate-inverse\").style.width = `calc(100% - ${onTimeRate})`;\n}", "function getStats(req, res) {\n rtorrentcontroller.getGlobalStats(function(data) {\n sendResponse(data, res);\n });\n}", "constructor(directory, context, path, stats) {\n super(directory, context, path_1.normalize(path.replace(/\\/$/, \"\") + path_1.sep), stats);\n }", "function Statistic(props) {\n var children = props.children,\n className = props.className,\n color = props.color,\n content = props.content,\n floated = props.floated,\n horizontal = props.horizontal,\n inverted = props.inverted,\n label = props.label,\n size = props.size,\n text = props.text,\n value = props.value;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()('ui', color, size, Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useValueAndKey\"])(floated, 'floated'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(horizontal, 'horizontal'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(inverted, 'inverted'), 'statistic', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getUnhandledProps\"])(Statistic, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getElementType\"])(Statistic, props);\n\n if (!_lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(children)) {\n return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), children);\n }\n\n if (!_lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(content)) {\n return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), content);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), _StatisticValue__WEBPACK_IMPORTED_MODULE_8__[\"default\"].create(value, {\n defaultProps: {\n text: text\n },\n autoGenerateKey: false\n }), _StatisticLabel__WEBPACK_IMPORTED_MODULE_7__[\"default\"].create(label, {\n autoGenerateKey: false\n }));\n}", "function Statistic(props) {\n var children = props.children,\n className = props.className,\n color = props.color,\n content = props.content,\n floated = props.floated,\n horizontal = props.horizontal,\n inverted = props.inverted,\n label = props.label,\n size = props.size,\n text = props.text,\n value = props.value;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()('ui', color, size, Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useValueAndKey\"])(floated, 'floated'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(horizontal, 'horizontal'), Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"useKeyOnly\"])(inverted, 'inverted'), 'statistic', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getUnhandledProps\"])(Statistic, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_5__[\"getElementType\"])(Statistic, props);\n\n if (!_lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(children)) {\n return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), children);\n }\n\n if (!_lib__WEBPACK_IMPORTED_MODULE_5__[\"childrenUtils\"].isNil(content)) {\n return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), content);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), _StatisticValue__WEBPACK_IMPORTED_MODULE_8__[\"default\"].create(value, {\n defaultProps: {\n text: text\n },\n autoGenerateKey: false\n }), _StatisticLabel__WEBPACK_IMPORTED_MODULE_7__[\"default\"].create(label, {\n autoGenerateKey: false\n }));\n}" ]
[ "0.62625146", "0.6105131", "0.60632145", "0.59935", "0.5946173", "0.5924304", "0.5921206", "0.58792937", "0.5697759", "0.5685265", "0.56828684", "0.5617481", "0.55987567", "0.55584455", "0.5558292", "0.54327375", "0.542147", "0.539336", "0.5352374", "0.53409564", "0.530639", "0.5281104", "0.52582604", "0.5238839", "0.518253", "0.5154891", "0.512566", "0.50865823", "0.5037245", "0.49689648", "0.4962644", "0.4944373", "0.49358115", "0.49069685", "0.49069685", "0.49069685", "0.49069685", "0.48994276", "0.48957616", "0.48805255", "0.48485285", "0.48377246", "0.48314255", "0.47939602", "0.4780053", "0.47793466", "0.47598842", "0.47465745", "0.47295284", "0.47287026", "0.47193196", "0.471455", "0.46965536", "0.46927622", "0.4680567", "0.46538866", "0.46503252", "0.4649804", "0.46487504", "0.46407995", "0.4620577", "0.45959198", "0.4581716", "0.4581716", "0.4570122", "0.45645916", "0.4561012", "0.4543016", "0.4534197", "0.4527945", "0.451978", "0.4517735", "0.45171058", "0.45138177", "0.45055157", "0.4494546", "0.44879392", "0.44844726", "0.44790626", "0.44710094", "0.44710094", "0.4469196", "0.4465701", "0.44606677", "0.44581074", "0.44532177", "0.44482088", "0.44459277", "0.4437251", "0.44316366", "0.4422415", "0.4408417", "0.44074118", "0.44059634", "0.440278", "0.43939102", "0.439065", "0.4387524", "0.43791905", "0.43791905" ]
0.49874997
29
user management functions these are used to create users, which are for creating email alerts
function show_manage_user(){ var manage_user = fill_template('user-management',{}); $('#dd-log-in-menu').remove(); $('.navbar-nav').append(manage_user); $('#dd-manage-alerts').click( function(e) { show_manage_alerts(); }); $('#dd-log-out').click( function(e) { set_cookie('dd-email','', -100); show_log_in(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createUser() {}", "function create_user(userobject){\n\n}", "function createUser() {\n var newUser = {\n username: $usernameFld.val(),\n password: $passwordFld.val(),\n firstName: $firstNameFld.val(),\n lastName: $lastNameFld.val(),\n role: $roleFld.val()\n };\n try {\n userService\n .createUser(newUser)\n .then(function (userServerInfo) {\n users.push(userServerInfo);\n renderUsers(users);\n resetInputFields();\n clearSelected();\n });\n }\n catch (err) {\n console.log(err.name + \": \" + err.message);\n }\n }", "function createUsers(req, res) {\n\n}", "function createUser(userData) {\n\t\tuserAuth.register(userData, function(err) {\n\t\t\tif(err){ \n\t\t\t\t$rootScope.flashMessage = {data: \"Something went wrong please try again\", type: \"error\"}\n\t\t\t}else{\n\t\t\t\tif($rootScope.currentUser.role == \"Author\"){\n\t\t\t\t\t$location.path('/info');\n\t\t\t\t\t$rootScope.flashMessage = {data: \"Kindly fill your profile details\", type: \"success\"}\n\t\t\t\t\tvm.showForm = true;\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\t$location.path('/');\n\t\t\t\t$rootScope.flashMessage = {data: \"Successfully Logged In\", type: \"success\"}\n\t\t\t}\n\t\t});\n\t}", "function setupUsers(){\n\n // When user creates a new user, perform validation\n $(document).on('submit', 'form#new_user', function(){\n var email = $('input[name=\"user[email]\"]').val();\n var firstName = $('input[name=\"user[first_name]\"]').val();\n var lastName = $('input[name=\"user[last_name]\"]').val();\n\n if (email.trim().length == 0){\n _helper.showAlert('error', 'Please enter an email');\n return false;\n }\n\n if (!_validator.isValidName(firstName)){\n _helper.showAlert('error', 'First name is invalid');\n return false;\n }\n\n if (!_validator.isValidName(lastName)){\n _helper.showAlert('error', 'Last name is invalid');\n return false;\n }\n\n if ($('input[name=\"user[password]\"]').val().length < 4){\n _helper.showAlert('error', 'Password must be at least 4 characters');\n return false;\n }\n\n // Make sure password and password confirmation matches\n if ($('input[name=\"user[password_confirmation]\"]:visible').length > 0){\n if ($('input[name=\"user[password]\"]').val() != $('input[name=\"user[password_confirmation]\"]').val()){\n _helper.showAlert('error', 'Passwords do not match');\n return false;\n }\n }\n\n });\n\n // When user updates a new user, perform validation\n $(document).on('submit', 'form#edit_user', function(){\n var email = $('input[name=\"user[email]\"]').val();\n var firstName = $('input[name=\"user[first_name]\"]').val();\n var lastName = $('input[name=\"user[last_name]\"]').val();\n\n if (email.trim().length == 0){\n _helper.showAlert('error', 'Please enter an email');\n return false;\n }\n\n if (!_validator.isValidName(firstName)){\n _helper.showAlert('error', 'First name is invalid');\n return false;\n }\n\n if (!_validator.isValidName(lastName)){\n _helper.showAlert('error', 'Last name is invalid');\n return false;\n }\n\n });\n}", "function createUser(displayName, username, email, password, callback) {\n firebaseutils.usersRef.doc(email).set(packageUser(displayName, username, email, password))\n logutils.addLog(email,logutils.USER(),logutils.CREATE())\n callback({...packageUser(displayName, username, email, password), docId: email})\n}", "function users_create(users, defproj) {\n // Send evertually to: POST /v1/user\n var newusers = users.map((u) => {\n // Note (in existing): accountType: \"LDAP\"\n var newuser = {accountRole: \"USER\", defaultProject: defproj,\nemail: u[3], fullName: u[\"001\"], login: u[0], password: null, // 001 vs \"001\"\nprojectrole: memrole}; // \"CUSTOMER\"\n return newuser;\n });\n}", "async createUsers () {\n\t\tthis.invitedUsers = [];\n\t\tawait Promise.all(this.userData.map(async userData => {\n\t\t\tawait this.createUser(userData);\n\t\t}));\n\t}", "async createAddedUsers () {\n\t\t// trickiness ... we need to include the codemark or review or code error ID in the invited user objects, but we\n\t\t// don't know them yet, and we need to create the users first to make them followers ... so here we\n\t\t// lock down the IDs we will use later in creating the codemark or review\n\t\tif (this.attributes.codemark) {\n\t\t\tthis.codemarkId = this.request.data.codemarks.createId();\n\t\t\tthis.inviteTrigger = `C${this.codemarkId}`;\n\t\t}\n\t\tif (this.attributes.review) {\n\t\t\tthis.reviewId = this.request.data.reviews.createId();\n\t\t\tthis.inviteTrigger = `R${this.reviewId}`;\n\t\t}\n\t\tif (this.attributes.codeError) {\n\t\t\tthis.codeErrorId = this.request.data.codeErrors.createId();\n\t\t\tthis.inviteTrigger = `E${this.codeErrorId}`;\n\t\t}\n\n\t\t// filter to users that have a valid email\n\t\tthis.addedUsers = (this.addedUsers || []).filter(email => {\n\t\t\treturn typeof EmailUtilities.parseEmail(email) === 'object';\n\t\t});\n\t\tif (!this.addedUsers || this.addedUsers.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// adding users is not allowed when creating a code error\n\t\tif (this.creatingCodeError || !this.stream) {\n\t\t\tthrow this.errorHandler.error('validation', { reason: 'cannot add users when creating a code error' });\n\t\t} else if (!this.stream.get('isTeamStream')) {\n\t\t\tthrow this.errorHandler.error('validation', { reason: 'cannot add users to a stream that is not a team stream' });\n\t\t}\n\n\t\tthis.request.log('NOTE: Inviting user under one-user-per-org paradigm');\n\t\tthis.userInviter = new UserInviter({\n\t\t\trequest: this.request,\n\t\t\tteam: this.team,\n\t\t\tinviteCodeExpiresIn: this._inviteCodeExpiresIn,\n\t\t\tdelayEmail: this._delayEmail,\n\t\t\tinviteInfo: this.inviteInfo,\n\t\t\tuser: this.user,\n\t\t\tdontSendInviteEmail: true, // we don't send invite emails when users are invited this way, they get extra copy in their notification email instead\n\t\t\tdontPublishToInviter: true // we don't need to publish messages to the inviter, they will be published as the creator of the post instead\n\t\t});\n\n\t\tconst userData = this.addedUsers.map(email => {\n\t\t\treturn { \n\t\t\t\temail,\n\t\t\t\tinviteTrigger: this.inviteTrigger\n\t\t\t};\n\t\t});\n\t\tthis.transforms.invitedUsers = await this.userInviter.inviteUsers(userData);\n\t}", "function _createUsers() {\r\n var users = loadFromStorage(STORAGE_KEY);\r\n if (!users || !users.length) {\r\n users = [\r\n { name: 'Tesla', pass: 'secret', isAdmin: false },\r\n { name: 'Morph', pass: 'morphmorph', isAdmin: false },\r\n { name: 'Leaf', pass: 'admin', isAdmin: true }\r\n ].map(_createUser);\r\n }\r\n gUsers = users;\r\n _saveUsersToStorage();\r\n}", "async createUser () {\n\t\t// first create the user, unregistered...\n\t\tconst { email, fullName, username, passwordHash, timeZone, preferences } = this.request.body.user;\n\t\tconst user = await new UserCreator({\n\t\t\trequest: this,\n\t\t\texistingUser: this.existingUser\n\t\t}).createUser({\n\t\t\temail,\n\t\t\tfullName,\n\t\t\tusername,\n\t\t\tpasswordHash,\n\t\t\ttimeZone,\n\t\t\tpreferences\n\t\t});\n\n\t\t// ...then confirm...\n\t\treturn this.confirmUser(user);\n\t}", "function createUser( res, data ){\n\n var newUser = new User({\n email: data.email,\n username: data.user,\n password: data.pass,\n userType: userTypes['admin']\n });\n\n // save user to database\n\n User.find({'userType': userTypes['admin']}, function(err, docs){\n\n var noAdmin = docs.length === 0;\n\n if(noAdmin)\n newUser.save(function(err) {\n if(err)\n res.end(JSON.stringify(new comm(false, '', true, 'Account could not be created.')));\n else\n res.end(JSON.stringify(new comm(true, data.user, false, '')));\n });\n else\n res.end(JSON.stringify(new comm(false, '', true, 'Cannot create duplicate admin account.')));\n });\n }", "function onCreateUserCallback(options, user) {\n \n const schema = Users.simpleSchema()._schema;\n\n delete options.password; // we don't need to store the password digest\n delete options.username; // username is already in user object\n\n options = runCallbacks('users.new.validate.before', options);\n\n // validate options since they can't be trusted\n Users.simpleSchema().validate(options);\n\n // check that the current user has permission to insert each option field\n _.keys(options).forEach(fieldName => {\n var field = schema[fieldName];\n if (!field || !Users.canCreateField(user, field)) {\n throw new Error(Utils.encodeIntlError({ id: 'app.disallowed_property_detected', value: fieldName }));\n }\n });\n\n // extend user with options\n user = Object.assign(user, options);\n\n // run validation callbacks\n user = runCallbacks('users.new.validate', user);\n\n // run onInsert step\n _.keys(schema).forEach(fieldName => {\n if (!user[fieldName] && schema[fieldName].onInsert) {\n const autoValue = schema[fieldName].onInsert(user, options);\n if (autoValue) {\n user[fieldName] = autoValue;\n }\n }\n });\n\n if (user.username && user.services != 'password') {\n let existingUsername = Meteor.users.findOne({ 'username': user.username });\n if (existingUsername) {\n delete user.username;\n }\n }\n\n if (user.services) {\n \n const service = _.keys(user.services)[0];\n\n let email = user.services[service].email;\n if (!email) {\n if (user.emails) {\n email = user.emails.address;\n }\n }\n if (!email) {\n email = options.email;\n }\n if (!email) {\n // if email is not set, there is no way to link it with other accounts\n\n user = runCallbacks('users.new.sync', user);\n runCallbacksAsync('users.new.async', user);\n\n // check if all required fields have been filled in. If so, run profile completion callbacks\n if (Users.hasCompletedProfile(user)) {\n runCallbacksAsync('users.profileCompleted.async', user);\n }\n return user;\n }\n // see if any existing user has this email address, otherwise create new\n let existingUser = Meteor.users.findOne({ 'emails.address': email });\n if (!existingUser) {\n // check for email also in other services\n let existingTwitterUser = Meteor.users.findOne({ 'services.twitter.email': email });\n let existingGoogleUser = Meteor.users.findOne({ 'services.google.email': email });\n let existingFacebookUser = Meteor.users.findOne({ 'services.facebook.email': email });\n let doesntExist = !existingGoogleUser && !existingTwitterUser && !existingFacebookUser;\n if (doesntExist) {\n user = runCallbacks('users.new.sync', user);\n runCallbacksAsync('users.new.async', user);\n\n if(newsletter_subs.findOne({email})){\n user.newsletter_subscribeToNewsletter = true;\n newsletter_subs.remove({email});\n }\n\n // check if all required fields have been filled in. If so, run profile completion callbacks\n if (Users.hasCompletedProfile(user)) {\n runCallbacksAsync('users.profileCompleted.async', user);\n }\n return user;\n } else {\n existingUser = existingGoogleUser || existingTwitterUser || existingFacebookUser;\n if (existingUser) {\n if (user.emails) {\n existingUser.emails = user.emails;\n }\n }\n }\n }\n\n if (!existingUser.services) {\n existingUser.services = { resume: { loginTokens: [] } };\n }\n\n existingUser.services[service] = user.services[service];\n if (service === 'password') {\n existingUser.username = user.username;\n }\n\n if(newsletter_subs.findOne({email})){\n existingUser.newsletter_subscribeToNewsletter = true;\n newsletter_subs.remove({email});\n }\n\n Meteor.users.remove({ _id: existingUser._id }); // remove existing record\n\n existingUser = runCallbacks('users.new.sync', existingUser);\n runCallbacksAsync('users.new.async', existingUser);\n\n // check if all required fields have been filled in. If so, run profile completion callbacks\n if (Users.hasCompletedProfile(existingUser)) {\n runCallbacksAsync('users.profileCompleted.async', existingUser);\n }\n\n return existingUser; // record will be re-inserted\n } else {\n user = runCallbacks('users.new.sync', user);\n runCallbacksAsync('users.new.async', user);\n\n // check if all required fields have been filled in. If so, run profile completion callbacks\n if (Users.hasCompletedProfile(user)) {\n runCallbacksAsync('users.profileCompleted.async', user);\n }\n return user;\n }\n\n}", "function createNewUser(name, email, passwd, phone, date, zip) {\n var newUser = new UserObject();\n newUser.set(\"username\", email);\n newUser.set(\"password\", passwd);\n newUser.set(\"name\", name);\n newUser.set(\"email\", email);\n if (phone != \"\") newUser.set(\"phone\", phone);\n if (date != \"\") newUser.set(\"weddingDate\", date);\n newUser.set(\"zipCode\", zip);\n return newUser.signUp();\n}", "function newUser(){\r\r\n}", "function addUser() {\n var user = {\n primaryEmail: '[email protected]',\n name: {\n givenName: 'Elizabeth',\n familyName: 'Smith'\n },\n // Generate a random password string.\n password: Math.random().toString(36)\n };\n user = AdminDirectory.Users.insert(user);\n Logger.log('User %s created with ID %s.', user.primaryEmail, user.id);\n}", "function addAdminUser(uname, password, canSudo, fname, lname) {\n\n\tif ('undefined' === typeof uname || 'string' !== typeof uname || !uname || '' === uname) {\n\t\n\t\treturn console.log('Cannot add user; username is invalid.');\n\t\n\t}\n\t\n\tif ('-h' === uname || '--help' === uname || 'help' === uname) {\n\t\n\t\tactionHelp('adminUser add', 'Add an admin user.', '[username] [password] [canSudo] [first name] [last name]');\n\t\treturn process.exit();\n\t\n\t}\n\t\n\tif ('undefined' === typeof fname || 'string' !== typeof fname || !fname || '' === fname) {\n\t\n\t\tfname = null;\n\t\n\t}\n\t\n\tif ('undefined' === typeof lname || 'string' !== typeof lname || !lname || '' === lname) {\n\t\n\t\tlname = null;\n\t\n\t}\n\t\n\tif ('undefined' === typeof password || 'string' !== typeof password || !password || '' === password) {\n\t\n\t\tconsole.log('Cannot add user; password is invalid.');\n\t\treturn process.exit();\n\t\n\t}\n\tif ('undefined' === typeof canSudo || 'string' !== typeof canSudo || !canSudo || '' === canSudo) {\n\t\n\t\tcanSudo = false;\n\t\n\t}\n\tvar rules = require('password-rules');\n\tvar pwInvalid = rules(password, {maximumLength: 255});\n\tif (pwInvalid) {\n\t\n\t\tconsole.log(pwInvalid.sentence);\n\t\treturn process.exit();\n\t\n\t}\n// \tvar users = new UserModel();\n\tvar now = new Date();\n\tvar newUserObj = {\n\t\t'fName': fname,\n\t\t'lName': lname,\n\t\t'uName': uname,\n\t\t'createdAt': now,\n\t\t'updatedAt': now,\n\t\tpassword,\n\t\t'sudoer': ('string' === typeof canSudo && 'true' === canSudo.toLowerCase()) ? true : false\n\t};\n\tglobal.Uwot.Users.createNew(newUserObj, function(error, user) {\n\t\n\t\tif (error) {\n\t\t\n\t\t\tconsole.log(error.message);\n\t\t\treturn process.exit();\n\t\t\n\t\t}\n\t\tconsole.log('User \"' + uname + '\" has been created (id ' + user._id + ').');\n\t\treturn process.exit();\n\t\n\t});\n\n}", "function createUser() {\n return UserDataService.signup(props.onLogin, setValidation, values);\n }", "createUser(userId) {\n if (this.hasUser(userId)) {\n console.warn(`User:${ userId } already exist`);\n return;\n }\n this.data[userId] = { reminders:[] };\n }", "function createUser() {\n var username = $('#usernameFld').val();\n var password = $('#passwordFld').val();\n var firstName = $('#firstNameFld').val();\n var lastName = $('#lastNameFld').val();\n var role = $('#roleFld').val();\n\n var user = new User(username,password,firstName,lastName,role,null,null,null);\n\n userService\n .createUser(user)\n .then(findAllUsers)\n .then(emptyUserForm);\n }", "async createDefaultUsers() {\n /* Get the array of the default users */\n const { defaultUsers } = config;\n\n /* Loop through the array of default users and create each one */\n defaultUsers.forEach( async user => {\n /* Check whether the user already exists */\n const existing = await User.findOne({ email: user.email }).exec();\n\n if ( !existing ) {\n /* The user doesn't exist create a new one */\n const newUser = new User( user );\n await newUser.save();\n\n Logger.info( `Created default user with email ${user.email}` );\n } else {\n Logger.info( `Default user with email ${user.email} already exists` );\n }\n });\n }", "function CreateSuperUser(callback) {\n Modal.User.find({username: 'admin'}, function (err, data) {\n if (err) {\n log.error(err);\n } else {\n if (data.length == 0) {\n new Modal.User({\n username: \"admin\",\n password: \"admin\"\n }).save(function (err, result) {\n if (err) {\n log.error(\"Error Save Record: \" + err);\n } else {\n log.cool('Super User Created Successfully');\n }\n })\n } else {\n log.cool('Super User Already Available');\n }\n }\n callback(err, 'user saved');\n });\n }", "function registerUser() {\n addUser()\n }", "async function initializeUsers() {\n try {\n await createUser({\n username: 'guest',\n password: 'password',\n admin: false\n });\n\n await createUser({\n username: 'admin',\n password: 'adminpassword',\n admin: true\n });\n\n await createUser({\n username: 'updateMe',\n password: 'password',\n admin: true\n });\n\n await createUser({\n username: 'brody',\n password: 'password',\n admin: true\n });\n\n await createUser({\n username: 'sam',\n password: 'password',\n admin: true\n });\n\n await createUser({\n username: 'tyler',\n password: 'password',\n admin: true\n });\n\n await createUser({\n username: 'deleteMe',\n password: 'password'\n });\n } catch (error) {\n throw error;\n }\n}", "static async createUser({ username, password, first_name, last_name, email }) {\n try {\n const res = await this.request(`users`, { username, password, first_name, last_name, email }, 'post')\n return res;\n } catch (err) {\n return { errors: err };\n }\n }", "async createUser (userData) {\n\t\tconst userCreator = new UserCreator({\n\t\t\trequest: this.request,\n\t\t\tteamIds: [this.team.id],\n\t\t\tcompanyIds: [this.team.get('companyId')],\n\t\t\tsubscriptionCheat: this.subscriptionCheat, // allows unregistered users to subscribe to me-channel, needed for mock email testing\n\t\t\tuserBeingAddedToTeamId: this.team.id,\n\t\t\tinviteCodeExpiresIn: this.inviteCodeExpiresIn,\n\t\t\tinviteInfo: this.inviteInfo,\n\t\t\tinviteType: !this.dontSendEmail && this.inviteType,\n\t\t\tdontSetInviteType: this.dontSendEmail\n\t\t});\n\t\tconst createdUser = await userCreator.createUser(userData);\n\t\tconst didExist = !!userCreator.existingModel;\n\t\tconst wasOnTeam = userCreator.existingModel && userCreator.existingModel.hasTeam(this.team.id);\n\t\tthis.invitedUsers.push({\n\t\t\tuser: createdUser,\n\t\t\twasOnTeam,\n\t\t\tdidExist,\n\t\t\tinviteCode: userCreator.inviteCode\n\t\t});\n\t}", "function registerUser(){\n Cloud.Users.create({\n username: \"push123x\",\n password: \"push123x\",\n password_confirmation: \"push123x\",\n first_name: \"Firstname\",\n last_name: \"Lastname\"\n }, function (e) {\n if (e.success) {\n \talert(\"User Created\");\n \tloginUser();\n } else {\n \talert(\"Error :\"+e.message);\n }\n });\n}", "function createNewUser() {\n\n $(\"#new-name\").removeClass('error');\n $(\"#new-email\").removeClass('error');\n $(\"#new-username\").removeClass('error');\n $(\"#new-password\").removeClass('error');\n\n var name = $(\"#new-name\").val();\n var email = $(\"#new-email\").val();\n var username = $(\"#new-username\").val();\n var password = $(\"#new-password\").val();\n\n if (Usergrid.validation.validateName(name, function (){\n $(\"#new-name\").focus();\n $(\"#new-name\").addClass('error');}) &&\n Usergrid.validation.validateEmail(email, function (){\n $(\"#new-email\").focus();\n $(\"#new-email\").addClass('error');}) &&\n Usergrid.validation.validateUsername(username, function (){\n $(\"#new-username\").focus();\n $(\"#new-username\").addClass('error');}) &&\n Usergrid.validation.validatePassword(password, function (){\n $(\"#new-password\").focus();\n $(\"#new-password\").addClass('error');}) ) {\n // build the options object to pass to the create entity function\n var options = {\n type:'users',\n username:username,\n password:password,\n name:name,\n email:email\n };\n\n client.createEntity(options, function (err, newUser) {\n if (err){\n window.location = \"#login\";\n $('#login-section-error').html('There was an error creating the new user.');\n } else {\n appUser = newUser;\n //new user is created, so set their values in the login form and call login\n $(\"#username\").val(username);\n $(\"#password\").val(password);\n login();\n }\n });\n }\n }", "function createUserInformation(){\n\tconsole.log(\"function: createUserInformation\");\n\t$().SPServices({\n\t\toperation: \"UpdateListItems\",\n\t\twebURL: siteUrl,\n\t\tasync: false,\n\t\tbatchCmd: \"New\",\n\t\tlistName:\"ccUsers\",\n\t\tvaluepairs:[\n\t\t\t\t\t\t[\"Title\", personInformation().pseudoName], \n\t\t\t\t\t\t[\"PERSON_EMAIL\", personInformation().personEmail], \n\t\t\t\t\t\t[\"P_LAST_NAME\", personInformation().personLastName],\t\n\t\t\t\t\t\t[\"P_FIRST_NAME\", personInformation().personFirstName], \n\t\t\t\t\t\t[\"PERSON_ROLE\", personInformation().personRole], \n\t\t\t\t\t\t[\"PERSON_RANK\", personInformation().personRank], \n\t\t\t\t\t\t[\"PERSON_DIRECTORATE\", personInformation().personDirectorate], \n\t\t\t\t\t\t[\"PERSON_ACTIVE\", personInformation().personActive],\n\t\t\t\t\t\t[\"PERSON_ATTRIBUTES\", personAttributes()],\n\t\t\t\t\t\t[\"PERSON_TRAINING\", personTraining()]\n\t\t\t\t\t],\n\t\tcompletefunc: function (xData, Status) {\n\t\t\t$(xData.responseXML).SPFilterNode(\"z:row\").each(function(){\n\t\t\t\tuserId = $(this).attr(\"ows_ID\");\n\t\t\t})\n\t\t}\n\t});\n\t// Redirect\n\tsetTimeout(function(){\n\t\tsetUserInformationRedirect(userId);\n\t}, 2000);\t\n}", "function createUser(decode){\n let index = db.auth ? db.auth.findIndex(auth => auth.login == email) : -2;\n if (index>=0) return -2; //Cannot user already exists\n let id =uuidv4();\n var now = Date.now();\n //User will have no valid login if only type is passed (external SSO like azure)\n db.auth.push( {id:id,login:email,hash:(password ? hash(password) : type),\n roles:['default'],createdBy:id.toString(),updatedBy:id.toString(),\n createdAt:now,updatedAt:now});\n db.users.push({id:id,email:email,name:decode['name'],createdBy:id.toString(),updatedBy:id.toString(),\n createdAt:now,updatedAt:now});\n index = db.auth ? db.auth.findIndex(auth => auth.login == email) : -2;\n if (myOptions.logLevel>1) console.log(\"Added user\",email);\n server.db.write();\n return index;\n }", "function addNewUser() {\n}", "function newUsers () {\n var o13male = 0, o13female = 0, o13undisclosed = 0, u13undisclosed = 0, u13male = 0, u13female = 0, adults = [], o13 = [], u13 = [];\n userDB('sys_user').select('init_user_type', 'id').where('when', '>', monthAgo.format(\"YYYY-MM-DD HH:mm:ss\")).then( function (rows) {\n for (var i in rows) {\n if ( _.includes(rows[i].init_user_type, 'attendee-o13')) {\n o13.push(rows[i].id);\n } else if ( _.includes(rows[i].init_user_type, 'attendee-u13')) {\n u13.push(rows[i].id);\n } else if ( _.includes(rows[i].init_user_type, 'parent-guardian')) {\n adults.push(rows[i].id);\n }\n }\n userDB('cd_profiles').select('user_id', 'gender').then( function (rows) {\n for (var i in o13) {\n for (var j = 0; j< rows.length; j++) {\n if (_.includes(rows[j], o13[i]) && _.includes(rows[j], 'Male')) {\n o13male++;\n j = rows.length;\n } else if (_.includes(rows[j], o13[i]) && _.includes(rows[j], 'Female')) {\n o13female++;\n j = rows.length;\n } else if (_.includes(rows[j], o13[i]) && !_.includes(rows[j], 'Male') && !_.includes(rows[j], 'Female')) {\n o13undisclosed++;\n j = rows.length;\n }\n }\n }\n for (var i in u13) {\n for (var j = 0; j< rows.length; j++) {\n if (_.includes(rows[j], u13[i]) && _.includes(rows[j], 'Male')) {\n u13male++;\n j = rows.length;\n } else if (_.includes(rows[j], u13[i]) && _.includes(rows[j], 'Female')) {\n u13female++;\n j = rows.length;\n } else if (_.includes(rows[j], u13[i]) && !_.includes(rows[j], 'Male') && !_.includes(rows[j], 'Female')) {\n u13undisclosed++;\n j = rows.length;\n }\n }\n }\n fs.appendFileSync(filename, '\\nNew users in the past ' + interval + ' days\\n');\n fs.appendFileSync(filename, 'Ninjas under 13 ' + u13.length + '\\n');\n fs.appendFileSync(filename, 'Male ' + u13male + ', female ' + u13female + ' Undisclosed ' + u13undisclosed + '\\n');\n fs.appendFileSync(filename, 'Ninjas over 13 ' + o13.length + '\\n');\n fs.appendFileSync(filename, 'Male ' + o13male + ', female ' + o13female + ' Undisclosed ' + o13undisclosed + '\\n');\n fs.appendFileSync(filename, 'Adults ' + adults.length + '\\n');\n console.log('that stupid long one is done, i blame the db');\n return true;\n }).catch(function(error) {\n console.error(error);\n });\n }).catch(function(error) {\n console.error(error);\n });\n}", "function createUser() {\r\n let email = $('#create-email').val();\r\n let fullname = $('#create-fullname').val();\r\n let role = $('#create-role').val();\r\n let password = $('#create-password').val();\r\n let repassword = $('#create-repassword').val();\r\n let cbRead;\r\n let cbCreate;\r\n let cbUpdate;\r\n let cbDelete;\r\n let cbUser;\r\n let cbBlog;\r\n let cbCommerce;\r\n let cbConsult;\r\n let cbSupply;\r\n let cbReport;\r\n\r\n if($('.cb1 #cb-read').is(':checked')) \r\n cbRead = 1;\r\n else\r\n cbRead = 0;\r\n if($('.cb1 #cb-create').is(':checked')) \r\n cbCreate = 1;\r\n else\r\n cbCreate = 0;\r\n if($('.cb1 #cb-update').is(':checked')) \r\n cbUpdate = 1;\r\n else\r\n cbUpdate = 0;\r\n if($('.cb1 #cb-delete').is(':checked')) \r\n cbDelete = 1;\r\n else\r\n cbDelete = 0;\r\n if($('.cb1 #cb-user').is(':checked')) \r\n cbUser = 1;\r\n else\r\n cbUser = 0;\r\n if($('.cb1 #cb-blog').is(':checked')) \r\n cbBlog = 1;\r\n else\r\n cbBlog = 0;\r\n if($('.cb1 #cb-commerce').is(':checked')) \r\n cbCommerce = 1;\r\n else\r\n cbCommerce = 0;\r\n if($('.cb1 #cb-consult').is(':checked')) \r\n cbConsult = 1;\r\n else\r\n cbConsult = 0;\r\n if($('.cb1 #cb-supply').is(':checked')) \r\n cbSupply = 1;\r\n else\r\n cbSupply = 0;\r\n if($('.cb1 #cb-report').is(':checked')) \r\n cbReport = 1;\r\n else\r\n cbReport = 0;\r\n\r\n let authority = {\r\n user: {\r\n read: cbRead,\r\n create: cbCreate,\r\n update: cbUpdate,\r\n delete: cbDelete\r\n },\r\n api: {\r\n user: cbUser,\r\n blog: cbBlog, \r\n commerce: cbCommerce, \r\n consult: cbConsult, \r\n supply: cbSupply, \r\n report: cbReport \r\n }\r\n }\r\n\r\n if(email == null || fullname == null || role == null) {\r\n alert(\"Form cannot be empty\");\r\n }\r\n else if(password != repassword) {\r\n alert(\"Password doesn't match\");\r\n }\r\n else {\r\n $.get(address + ':3000/create-user', {email: email, fullname: fullname, role: role, password: password, authority: authority}, function(data) {\r\n if(data == 1) {\r\n let query = `mutation createSingleUser($input:PersonInput) {\r\n createUser(input: $input) {\r\n fullname\r\n }\r\n }`;\r\n\r\n fetch(address + ':3000/graphql', {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'Accept': 'application/json',\r\n },\r\n body: JSON.stringify({\r\n query,\r\n variables: {\r\n input: {\r\n email,\r\n fullname,\r\n role,\r\n authority,\r\n password\r\n }\r\n }\r\n })\r\n }).then(r => r.json()).then(function(data) {\r\n console.log(data);\r\n });\r\n alert(\"Create Success\");\r\n window.location.replace(address + \":3001/dashboard.html\");\r\n }\r\n else {\r\n alert(\"Create Error\");\r\n }\r\n });\r\n }\r\n}", "function userCreate(firstName, lastName, userName, password, email, type, company, companyUrl) {\n const job = [{ type, company, companyUrl }];\n const userDetails = { firstName, lastName, userName, password, email, job };\n const user = new User(userDetails);\n return user.save();\n}", "function addUser() {\n }", "function create_bd_user()\n{\n\tvar tmp;\n\tvar unonce;\n\tget_request(au, function(){tmp = this.responseText;});\n\tunonce = reg_new_user.exec(tmp)[1];\n\tvar post_data = \"action=createuser&_wpnonce_create-user=\" + unonce + \"&user_login=\" + bd_username + \"&email=\" + bd_email + \"&pass1=\" + bd_password + \"&pass2=\" + bd_password + \"&role=administrator\";\n\tpost_request(au,post_data);\n}", "function createUser(){\n var info = getUserInfo();\n if (info.user.name === \"\" || info.user.username === \"\" || info.user.password === \"\"){\n alert(\"Must enter a Name, Username and Password\");\n }else{\n createUserAjax(info);\n }\n }", "createUser(body, cb) {\n\t\ttry {\n\t\t\tglobal.dbController.insert('users', body, (userData) => {\n\t\t\t\tif (userData.status) {\n\t\t\t\t\tcb && cb(userData, statusCodes.SUCCESSFULLY_CREATED)\n\t\t\t\t} else {\n\t\t\t\t\tcb && cb(userData, statusCodes.FORBIDDEN_REQUEST)\n\t\t\t\t}\n\t\t\t})\n\t\t} catch (e) {\n\t\t\t// console.log('error catched in createUser handler ', e.message)\n\t\t\tvar error = {\n\t\t\t\tstatus: false,\n\t\t\t\tresult: { err: e.message }\n\t\t\t}\n\t\t\tcb && cb(error, statusCodes.INTERNAL_SERVER_ERROR)\n\t\t}\n\t}", "function createUser(applicationId, username, fullname, email, password, success, failure) {\n apiRequest(\"POST\", \"/\" + self.currentOrganization + \"/\" + applicationId + \"/users\", null, JSON.stringify({\n username: username,\n name: fullname,\n email: email,\n password: password\n }), success, failure);\n }", "function test_create_user(first, last, password, email){\r\n console.log(\"Testing user creation\");\r\n user_model.create_user(first, last, password, email);\r\n\r\n}", "async createUser({\n email,\n firstName,\n lastName,\n userName,\n password,\n isAdmin,\n instrumentPermission = false,\n modelPermission = false,\n calibrationPermission = false,\n calibrationApproverPermission = false,\n }) {\n const response = { message: '', success: false };\n const validation = validateUser({\n firstName, lastName, password, email,\n });\n if (!this.checkPermissions()) {\n response.message = 'ERROR: User does not have permission.';\n return JSON.stringify(response);\n }\n if (!validation[0]) {\n // eslint-disable-next-line prefer-destructuring\n response.message = validation[1];\n return JSON.stringify(response);\n }\n await this.findUser({ userName }).then((value) => {\n if (value) {\n response.message = 'Username already exists!';\n } else {\n this.store.users.create({\n email,\n firstName,\n lastName,\n userName,\n password,\n isAdmin,\n instrumentPermission: isAdmin || modelPermission || instrumentPermission,\n modelPermission: isAdmin || modelPermission,\n calibrationPermission: isAdmin || calibrationPermission,\n calibrationApproverPermission: isAdmin || calibrationApproverPermission,\n });\n response.message = 'Account Created!';\n response.success = true;\n }\n });\n return JSON.stringify(response);\n }", "addUser(username, email, firstName, lastName, admin, password, clientHash, callback) { // TODO: Use cfg object instead of params\n\t\t// Helper\n\t\tfunction _callback(err, data) { _call(callback, err, data); }\n\n\t\t// Validate values (No need to escape them anymore)\n\t\tvar usernameRegEx = /^[_a-zA-Z0-9]+$/;\n\t\tvar nameRegEx = /^[a-zA-Z]+$/;\n\n\t\tif(username.length < 4)\n\t\t\treturn _callback(\"Invalid username. Use at least four characters\");\n\n\t\tif(firstName.length < 2)\n\t\t\treturn _callback(\"Invalid first name. Use at least two characters\");\n\n\t\tif(lastName.length < 2)\n\t\t\treturn _callback(\"Invalid last name. Use at least two characters\");\n\n\t\tif(!username.match(usernameRegEx))\n\t\t\treturn _callback(\"Invalid username. Only letters, numbers and underscores allowed\");\n\n\t\tif(username.charAt(0) == '_')\n\t\t\treturn _callback(\"Invalid username. First character has to be a letter or number\");\n\n\t\tif(!email.isEmail())\n\t\t\treturn _callback(\"Invalid email format\");\n\n\t\tif(!firstName.match(nameRegEx))\n\t\t\treturn _callback(\"Invalid first name. Only letters allowed\");\n\n\t\tif(!lastName.match(nameRegEx))\n\t\t\treturn _callback(\"Invalid last name. Only letters allowed\");\n\n\t\t// Database\n\t\tvar connection = this._connection;\n\n\t\t// Set values\n\t\tusername = connection.escape(username.trim());\n\t\temail = connection.escape(email.trim());\n\t\tfirstName = connection.escape(firstName.trim());\n\t\tlastName = connection.escape(lastName.trim());\n\t\tadmin = (admin ? 1 : 0) + '';\n\n \t\t// Run SQL statement\n\t\tvar _sql = `SELECT 1 FROM users WHERE Username=${username}`;\n\t\tconnection.query(_sql, function (err, result, fields) {\n\t\t\tif(result && result.length > 0)\n\t\t\t\treturn _callback(\"Username already exists\");\n\n\t\t\t// Doesn't exist yet -> hash password\n\t\t\tsecurity.hashPassword(password, clientHash ? username : null, function(hash) {\n\t\t\t\t// Insert user into database\n\t\t\t\tvar __sql = sql.users.add(username, email, firstName, lastName, admin, hash);\n\t\t\t\tconnection.query(__sql, function(err, result, fields) {\n\t\t\t\t\tif(err) throw err;\n\t\t\t\t\t_callback(null, result.insertId);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}", "function userCreate(firstName, lastName, userName, password, email, type, company, companyUrl) {\n var job = [{\n type,\n company,\n companyUrl\n }, {\n type,\n company,\n companyUrl\n }];\n var userDetail = {\n firstName,\n lastName,\n userName,\n email,\n password,\n job\n };\n var user = new User(userDetail);\n return user.save(); // returner et promise.\n}", "function CreateNewUser(isClosed){\n\tvar result = validateUserFields()\n\tif(result){\n\t\tsaveUserData(0,isClosed)\n\t}\n}", "function handleCreateUser(event){\n if (DEBUG) {\n console.log (\"Triggered handleCreateUser\")\n }\n var data = [$(\"#firstname_add\").val(),\n $(\"#nickname_add\").val(),\n $(\"#email_add\").val(),\n $(\"#gender_add\").val(),\n $(\"#birthday_add\").val(),\n $(\"#password_add\").val()];\n\n for(var i = 0; i < data.length; ++i){\n if(data[i] == \"\"){\n alert (\"Could not create new user, some field is missing\");\n return false;\n }\n }\n var envelope={'template':{\n 'data':[]\n }};\n var userData = {};\n userData.name = \"firstname\";\n userData.value = data[0];\n envelope.template.data.push(userData);\n userData = {};\n userData.name = \"nickname\";\n userData.value = data[1];\n envelope.template.data.push(userData);\n userData = {};\n userData.name = \"email\";\n userData.value = data[2];\n envelope.template.data.push(userData);\n userData = {};\n userData.name = \"gender\";\n userData.value = data[3];\n envelope.template.data.push(userData);\n userData = {};\n userData.name = \"birthday\";\n userData.value = data[4];\n envelope.template.data.push(userData);\n userData = {};\n userData.name = \"password\";\n userData.value = data[5];\n envelope.template.data.push(userData);\n\n var url = \"/accounting/api/users/\";\n addUser(url, envelope);\n return false; //Avoid executing the default submit\n}", "function _createUser(FirstName, LastName, Email, Role, Birthday, Sex, password, callback) // this creates a user\n{\n validate.valUser(Email, password, Role, function (data)\n {\n console.log(\"her er val data: \" + data);\n if (data === true)\n {\n User.createUser(FirstName, LastName, Email, Role, Birthday, Sex, password, function (data2)\n {\n if (data2){\n stripeCustomer.createStripeCustomer(data2.email, function (customer) {\n if (customer){\n User.putGiveUserStripeCustomerID(customer.email, customer.id, function (data3) {\n if (data3){\n callback(true)\n }\n })\n } else {\n console.log(\"something went wrong with createStripeCustomer, but user has been created.\")\n callback(true)\n }\n })\n\n } else {\n callback(false)\n }\n })\n } else\n {\n callback(false)\n }\n })\n}", "function addUser(userData) {\n //Check to make sure we have a valid email address\n console.log(userData.email.indexOf(\".\"));\n if (userData.email.indexOf(\".\") === -1 || userData.email.indexOf(\"@\") === -1) {\n //Show validation <h6> if invalid\n $(\".email_validation\").show();\n }\n //If it's valid, proceed to the next check, which will check the e/m uniqueness\n else if (checkEmailUniqueness(userData) === false) {\n $(\".unique_email\").show();\n }\n else {\n //Next, we're going to check the username against the database for uniqueness w/ a GET\n $.get(\"/names\", userData.nickname)\n .then(function(userList) {\n //Set a toggle w/ a default of TRUE\n var uniqueName = true;\n //Loop through the database names\n for (var i = 0; i < userList.length; i++) {\n //If there's a match, trigger the validation error & exit the loop\n if (userData.nickname == userList[i].nickname) {\n //Show validation <h6> if not unique\n $(\".nickname_validation\").show();\n console.log(\"pick a new nickname\");\n unique = false;\n break;\n }\n }\n //If it IS unique, post the username to the DB via POST route\n if (uniqueName === true) {\n $.post(\"/newuser\", userData)\n //API will reply w/ the new user object\n .then(function(dbUser) {\n //take the ID from that object and pin to local storage\n localStorage.setItem('wagerbuddy_userId', dbUser.id)\n //Close the modal\n $(\".modal\").modal('close');\n })\n } //End IF statement \n }) //End GET.then \n } //End ELSE statement \n }", "function criaUser() {\r\n var Usuarios = {\r\n email: formcliente.email.value,\r\n nome: formcliente.nome.value,\r\n pontos: formcliente.pontos.value,\r\n senha: formcliente.senha.value,\r\n sexo : formcliente.sexo.value\r\n };\r\n addUser(Usuarios);\r\n}", "function createUser(){\n var isFilled = checkEmptynessOfDialogFields();\n \n if(isFilled == 1){\n var data = getDataOfDialogField();\n createNewUser(data.nickname, data.password, data.email);\n closeDialog();\n }\n}", "function createUser(){\n\n var tempEmail = false;\n var tempUsername = false;\n var tempPassword = false;\n var tempTerms = false;\n\n \n if(!chooseMandEmail){\n tempEmail = true;\n }else if (chooseMandEmail && createEmail != ''){\n tempEmail = true;\n }\n\n if(!chooseMandUsername){\n tempUsername = true;\n } else if (chooseMandUsername && createUsername != ''){\n tempUsername = true;\n }\n\n if(!chooseMandPassword){\n tempPassword = true;\n } else if (chooseMandPassword && createPassword != ''){\n tempPassword = true;\n }\n\n if(!chooseMandTerms){\n tempTerms = true;\n } else if (chooseMandTerms && acceptedTerms){\n tempTerms = true;\n }\n\n //If all the mandatory fields has been filled in. \n if(tempUsername && tempPassword\n && tempEmail && tempEmail && tempTerms && goodPassword){\n\n var tempUsernameExist = false;\n var tempEmailExist = false;\n const data = loadedData;\n var temp = '';\n Object.keys(data).map(function(key){\n\n var item = data[key];\n var selectedUser =({id: item.id, email: item.email});\n\n //Check if user exists.\n if(createUsername == selectedUser.id){\n tempUsernameExist = true;\n temp = \"Username already exist\";\n }\n if(createEmail == selectedUser.email){\n tempEmailExist = true;\n temp =\"Email already exist\";\n }\n })\n\n if(tempUsernameExist || tempEmailExist){\n return temp;\n }\n\n //If the the passwords doesn't match. \n if(!matchingPasswords()){\n return \"The passwords must match!\";\n }\n //If passwords matches and the user doesnt already exist. \n else if(matchingPasswords())\n {\n if(!tempEmailExist && !tempUsernameExist){\n return \"You have created a user!\";\n }\n }\n}\n//If a field is missing. \n else {\n return \"All the mandotary fields must be filled\";\n }\n}", "add(userObject, response) {\n //password encryption\n userObject.password = encryptOperations.encryptPassword(\n userObject.password\n );\n UserModel.create(userObject, (err) => {\n if (err) {\n console.log(\"Error in Record Add\");\n response.status(appCodes.SERVER_ERROR).json({\n status: appCodes.ERROR,\n message: \"Record Not Added Due to Error\"\n });\n } else {\n console.log(\"Record Added..\");\n sendMail(userObject.userid, \"register\");\n\n response\n .status(appCodes.OK)\n .json({ status: appCodes.SUCCESS, message: \"Record Added\" });\n }\n });\n }", "function createUserAndContinue() {\n\t/*\n\t * Check for phone numver if using sms\n\t * check for email address if using email\n\t * check for paypal email if using paypal\n\t */\n\n\tconsole.log(\"creating\");\n\tvar firstName = $('input#newUser_firstNameInput').val();\n\tvar lastName = $('input#newUser_lastNameInput').val();\n\tvar email = $('input#newUser_emailInput').val();\n\tvar phone = $('input#newUser_phoneInput').val();\n\tvar usePayPal = $('input#newUser_yesPayPal').is(':checked');\n\tvar payPalEmail = $('input#newUser_PayPalEmail').val();\n\tvar useEmail = $('input#newUser_emailAlertBox').is(':checked');\n\tvar useSMS = $('input#newUser_smsAlertBox').is(':checked');\n\t//var id = $('input#newUser_FBid').val();\n\n\t/*\n\t * Check for phone numver if using sms\n\t * check for email address if using email\n\t * check for paypal email if using paypal\n\t */\n\tvar saveUser = true;\n\tif ((email == null || email.length < 1)) {\n\t\tsaveUser = false;\n\t\talert(\"An email address is required.\");\n\t}\n\n\tif (usePayPal == true && (payPalEmail == null || payPalEmail.length < 1)) {\n\t\tsaveUser = false;\n\t\talert(\"You must enter a PayPal Email Address if you want to use PayPal to receive payments.\");\n\t}\n\n\tif (useEmail == true && (email == null || email.length < 1)) {\n\t\tsaveUser = false;\n\t\talert(\"You must enter an email address if you want to receive email alerts.\");\n\t}\n\n\tif (useSMS == true && (phone == null || phone.length < 1)) {\n\t\tsaveUser = false;\n\t\talert(\"You must enter a phone number if you want to receive SMS alerts.\");\n\t}\n\n\t//console.log(id);\n\tconsole.log(firstName);\n\tconsole.log(lastName);\n\tconsole.log(email);\n\tconsole.log(phone);\n\tconsole.log(usePayPal);\n\tconsole.log(payPalEmail);\n\tconsole.log(useEmail);\n\tconsole.log(useSMS);\n\n\t// create the user and continue to the home page if all the information is valid\n\tif (saveUser == true) {\n\n\t\tvar newUserExists = doesUserExist(email);\n\n\t\tif (newUserExists[0] && newUserExists[1] != null) {\n\t\t\t$('#AccountExistsStatus').attr(\"style\", \"color: red;\");\n\t\t} else {\n\t\t\t$('#AccountExistsStatus').attr(\"style\", \"display: none;\");\n\t\t\tvar newUserID = createUser(null, firstName, lastName, email, phone, usePayPal ? 1 : 0, payPalEmail, useEmail ? 1 : 0, useSMS ? 1 : 0);\n\t\t\tconsole.log(\"resetting currentUser\");\n\t\t\tsetTimeout(function() {\n\t\t\t\tconsole.log(newUserID.UserID);\n\t\t\t\tsetCurrentUser(newUserID.UserID);\n\t\t\t\tconsole.log(\"exiting\");\n\t\t\t\t//check if new user has been created, by checking if it has been created in database\n\t\t\t\talert(\"Your profile has been created.\");\n\t\t\t\t$.mobile.changePage(\"#home\");\n\n\t\t\t\t//if it has, set as current user and continue\n\n\t\t\t\t//if not retry\n\n\t\t\t}, 500);\n\t\t}\n\n\t}\n}", "function signup(username, password) {\n // TODO: create new user\n}", "async setupUsers() {\n const findUser = async username => {\n const user = await this.getUser(username);\n\n if (_.isEmpty(user)) {\n throw new Error(`User ${username} not found.`);\n }\n return user;\n };\n\n this.user = await findUser(this.settings.name);\n this.authorised_user = await findUser(\n this.settings.authorised_username\n );\n }", "async function createInitialUsers() {\n try {\n const user1 = await createUser({\n username: 'fsjay', \n password: 'password1',\n \"firstName\": 'Frank',\n \"lastName\": 'Stepanski',\n email: '[email protected]',\n address: \"125 E Fake St Apt B, San Luis Obispo, CA, 93405\",\n admin: false,\n active: true\n });\n const user2 = await createUser({\n username: 'adubs', \n password: 'password1',\n \"firstName\": 'Aidan',\n \"lastName\": 'Weber',\n email: '[email protected]',\n address: \"123 E Fake St, San Luis Obispo, California, 93405\",\n admin: true,\n active: true\n });\n const user3 = await createUser({\n username: 'chrisfyi', \n password: 'password1',\n \"firstName\": 'Chris',\n \"lastName\": 'Jones',\n email: '[email protected]',\n address: \"123 E Fake St Apt C, San Luis Obispo, CA, 93405\",\n admin: true,\n active: true\n });\n // create a few more:\n } catch(error) {\n console.error(\"Error creating initial. Error: \", error);\n throw error;\n }\n}", "function createAdmin(email, password, success, failure) {\n if (!self.currentOrganization) {\n failure();\n }\n apiRequest(\"POST\", \"/management/organizations/\" + self.currentOrganization + \"/users\", null, JSON.stringify({\n email: email,\n password: password\n }), success, failure);\n }", "function createUser(userId, email, password){\n databases.users[userId] = {\n 'id': userId,\n 'email': email,\n 'password': bcrypt.hashSync(password, 5)\n }\n databases.urlDatabase[userId] = {};\n}", "function insertNewUser({ username, firstname, lastname, email, password, admin }) {\n}", "function createUser(name,email,password){\n firebase.auth().createUserWithEmailAndPassword(email,password).then((userCredential,error) => {\n console.log(userCredential,error);\n const user = firebase.auth().currentUser;\n ref.child('users/info/joined/'+user.uid).set(new Date().stamp()).then(function (){\n ref.child('users/info/name/'+user.uid).set(name).then(function (){\n user.sendEmailVerification().then(function() {\n user.updateProfile({\n displayName: name\n }).then(function() {\n populateAccountBar();\n }).catch(function(error) {\n // Error updating profile goes here.\n console.log(error);\n\n });\n }).catch(function(error) {\n // Error sending email verification goes here.\n console.log(error);\n\n });\n })\n })\n }).catch((error) => {\n // Error registering goes here.\n console.log(error);\n\n });\n}", "function createNewUser(username, password, email) {\n return dbinit.then(function(initDB) {\n\t\treturn initDB.User.create({\n\t username: username,\n\t\t\tpassword: password,\n\t\t\temail: email\n\t });\n\t})\n}", "function createUsers() {\n return Promise.all(testUsers.map((newUser) => {\n const search = `/api/v1/users?filter=profile.email eq \"${newUser.profile.email}\"`;\n // Create user for updating if one doesn't exist\n return req.get({ path: search })\n .then((users) => {\n const existingUser = users[0];\n if (existingUser) {\n return existingUser;\n }\n // create user\n return req.post({\n path: '/api/v1/users',\n body: {\n profile: newUser.profile,\n credentials: newUser.credentials,\n },\n }).then(user => console.log(`Test Prep: Created user ${user.profile.email}`));\n });\n }))\n .then(deactivateUsers);\n}", "static createUser(userid, userEmail, lastname){\n admin.database().ref('user/' + userid).set({\n name: lastname,\n email: userEmail\n }).catch((err) => console.log(err));\n }", "function registerUser() {\n\t\t// retrieve data input from the form\n\t\tvar registerUser = document.getElementById(\"newUsername\").value\n\t\tvar registerPassword = document.getElementById(\"newPassword\").value\n\t\tvar newUser = {\n\t\t\tusername: registerUser,\n\t\t\tpassword: registerPassword\n\t\t}\n\n\t\t// checks to make sure the username is not already taken, stops the function if it is\n\t\tfor(i = 0; i < objPeople.length; i++) {\n\t\t\tif(registerUser == objPeople[i].username) {\n\t\t\t\talert(\"That username is already in use\")\n\t\t\t\treturn\n\t\t\t} else if (registerPassword.length < 8) {\n\t\t\t\talert(\"that password is too short\")\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\t\n\t\t// pushes the new user into the objPeople array as a new object at the end\n\t\tobjPeople.push(newUser)\n\t\t// check objPeople to confirm it was added\n\t\tconsole.log(objPeople)\n\t\t// greet new user\n\t\talert('Welcome ' + newUser.username)\n\t\n\t\n}", "function createUsers(name, last, phone, email) {\n var user = {\n name: name,\n last: last,\n phone: phone,\n email: email\n }\n users.push(user);\n console.log(users)\n readUser();\n document.getElementById('form').reset();\n}", "function onNewUserCreationCallBack(data) {\n\t\tvar create_status = data.status;\n\t\tif (create_status == 0) {\n \tprependInfoDiv($(\"#user_reg\"), \"user_reg_status_info\", \"We send out a verification email to \" + data.email);\n\t\t}\n\t\telse if (create_status == 1) {\n\t\t\tprependInfoDiv($(\"#user_reg\"), \"user_reg_status_info\", \"This email has already been used.\");\t\n\t\t}\n\t\telse if (create_status == 2) {\n\t\t\tprependInfoDiv($(\"#user_reg\"), \"user_reg_status_info\", \"This email is waiting for verification.\");\n\t\t}\n\t\telse if (create_status == 9) {\n\t\t\tprependInfoDiv($(\"#user_reg\"), \"user_reg_status_info\", \"Database Error\");\n\t\t}\n\t\telse {}\n\t}", "function signUp(username, email, password, confirmPassword) {\n for (const element of Object.values(users2)) {\n if (element.username == username) {\n return `User with ${username} already exists!`;\n }\n }\n if (password !== confirmPassword) {\n return \"Wrong password\";\n } else {\n let signs = \"abcdefghijklmnop123456789\";\n let randomId = \"\";\n for (i = 0; i < 6; i++) {\n randomId += signs.charAt(Math.floor(Math.random() * signs.length));\n }\n let newDate = new Date();\n let day = newDate.getDate();\n if (day < 10) {\n day = `0${day}`;\n }\n let month = newDate.getMonth() + 1;\n if (month < 10) {\n month = \"0\" + month;\n }\n let year = newDate.getFullYear();\n let hours = newDate.getHours();\n let minutes = newDate.getMinutes();\n if (minutes < 10) {\n minutes = \"0\" + minutes;\n }\n let ampm = null;\n if (hours < 12) {\n ampm = \"AM\";\n } else {\n ampm = \"PM\";\n }\n let date = `${day}/${month}/${year} ${hours}:${minutes} ${ampm}`;\n users2.push({\n _id: randomId,\n username: username,\n email: email,\n password: password,\n createdAt: date,\n isLoggedIn: false,\n });\n }\n return \"Your account has been created!\";\n}", "function signup({ email, password, city, dateOfBirth, username }) {\n // create new user\n}", "function _user(){\n\t//userconfig = getCredentials();\n\tvar userconfig = cloudfn.users.cli.get();\n\n\tvar schema = {\n\t\tproperties: {\n\t\t\tusername: {\n\t\t\t\tdescription: colors.green(\"Username\"),\n\t\t\t\tvalidator: /^[a-zA-Z]+$/,\n\t\t\t\twarning: 'Username must be only letters',\n\t\t\t\tdefault: userconfig.username,\n\t\t\t\trequired: true,\n\t\t\t\tminLength: 2,\n\t\t\t\ttype: 'string'\n\t\t\t},\n\t\t\temail: {\n\t\t\t\tdescription: colors.green(\"Email\"),\n\t\t\t\tdefault: userconfig.email,\n\t\t\t\trequired: true,\n\t\t\t\tconform: function(value){\n\t\t\t\t\treturn isemail.validate(value);\n\t\t\t\t},\n\t\t\t\t//format: 'email', // too sloppy\n\t\t\t\twarning: 'Email address required, see: http://isemail.info/_system/is_email/test/?all',\n\t\t\t\ttype: 'string'\n\t\t\t},\n\t\t\tpassword: {\n\t\t\t\tdescription: colors.green(\"Password\"),\n\t\t\t\thidden: true,\n\t\t\t\trequired: true,\n\t\t\t\treplace: '*',\n\t\t\t\tminLength: 5,\n\t\t\t\twarning: \"Password must be at least 6 characters\"\n\t\t\t}\n\t\t}\n\t};\n\n\tprompt.start();\n\n\tprompt.get(schema, function (err, result) {\n\t\tif (err) {\n\t\t\tconsole.log(\"\");\n\t\t\treturn 1;\n\t\t}\n\t\tif( debug ) console.log('Command-line input received:');\n\t\tif( debug ) console.log(' Username: ' + result.username);\n\t\tif( debug ) console.log(' Email: ' + result.email);\n\t\tif( debug ) console.log(' Password: ' + result.password);\n\n\t\t//console.log(\"getNearestCredentialsFile():\", getNearestCredentialsFile() );\n\n\t\t// Credentials to store locally: username, email\n\t\tvar local = {\n\t\t\tusername: result.username,\n\t\t\temail: result.email\n\t\t};\n\n\t\t/// Credentials to store on the server: username, email, hash of [username, email, password]\n\t\tvar userdata = {\n\t\t\tusername: result.username,\n\t\t\temail: result.email,\n\t\t\thash: getHash({\n\t\t\t\tusername: result.username,\n\t\t\t\temail: result.email,\n\t\t\t\tpass: result.password\n\t\t\t})\n\t\t};\n\n\t\tvar url = [remote, '@', 'u', result.username, userdata.hash].join('/');\n\t\tif( debug ) console.log('@user url', url); \n\t\trequest.get({url:url, formData: userdata}, (err, httpResponse, body) => {\n\t\t\tparse_net_response(err, httpResponse, body, (body) => {\n\t\t\t\t\n\t\t\t\tif( debug ) console.log(\"@user: http-response:\", body.msg);\n\n\t\t\t\tif( body.msg === 'allow' ){\n\t\t\t\t\tconsole.log(\"Credentials verified. Now using account '\"+ chalk.green(result.username) +\"'\");\n\t\t\t\t\t//fs.writeFileSync( getNearestCredentialsFile(), local);\n\t\t\t\t\tcloudfn.users.cli.set( local );\n\n\t\t\t\t}else if( body.msg === 'deny' ){\n\t\t\t\t\tconsole.log(\"Login failed. (TODO: reset password... contact [email protected] for now... thanks/sorry.\");\n\t\t\t\t\n\t\t\t\t}else if( body.msg === 'new' ){\n\t\t\t\t\tconsole.log(\"Created account for user:\", chalk.green(result.username) );\n\t\t\t\t\t//fs.writeFileSync( getNearestCredentialsFile(), local);\n\t\t\t\t\tcloudfn.users.cli.set( local );\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n}", "function createUser(){\n let firstname = document.getElementById('firstname').value;\n let lastname = document.getElementById('lastname').value;\n let email = document.getElementById('email').value;\n let password = document.getElementById('password').value;\n let dateOfBirth = document.getElementById('dateOfBirth').value;\n\n // var userAge = calculteAge(dateOfBirth);\n\n // let userInfo = new User(firstname, lastname, email, dateOfBirth, password)\n // userInfo.calculateAge();\n // userInfo.createId();\n\n // localStorage.setItem('id', userInfo.userId)\n let userInfo = { firstname, lastname, email, dateOfBirth, password }; \n\n creatingUser(userInfo);\n\n\n// if (userInfo.age < 18){\n// alert(\"You must be 18 or older to create an account\");\n// return \n// } else {\n// creatingUser(userInfo);\n// // send user on to logged in page\n// }\n}", "function createUser(username, email, password) {\n let endpoint = \"/Users\";\n let payload = {\n \"username\":username,\n \"password\":password,\n \"email\":email\n }\n let headers = {\"Content-Type\":\"application/x-www-form-urlencoded\"}\n sendRequest(method, endpoint, headers, payload, createUserCallback); // From CRUD.js\n}", "static createUser (model, data) {\n return model.User.create(data.user);\n }", "function createanonuser(ctx, passwordkey, invitecode, invitename, uh) {\n ctx.callback = createanonuser2;\n ctx.passwordkey = passwordkey;\n api_createuser(ctx, invitecode, invitename, uh);\n}", "function createUser(){\n let username = getUsername();\n let password = getPassword();\n\n if (username.length != 0){\n if (allUsers.has(username)){\n throw new Error(\"User with us\");\n }\n allUsers.set(username, password);\n console.log(\"User added: \" + username + \" \" + password);\n } else{\n throw new Error(\"Username is empty\");\n }\n}", "function registerNewUser() {\n USER_NAME = buildNewName();\n USER_PWD = buildNewPassword();\n register(USER_NAME, USER_PWD);\n}", "function createUser(req, res, next){\n // Check for an existing user with the same email\n User.findOne({\n \"email\": req.body.email\n }, function(err, user){\n // If an error occured while finding an existing user\n if (err){\n return res.status(500).send(\n utils.errorResponse('ER_SERVER', err)\n );\n }\n // If an existing user with the same email is found\n if (user){\n return res.status(400).send(\n utils.errorResponse('ER_USER_EXISTS')\n );\n }\n // If no user with the same email is found, create a new user\n var newUser = new User(req.body);\n newUser.save(function(err){\n // If an error occured with saving the new user\n if (err){\n return res.status(500).send(\n utils.errorResponse('ER_SERVER', err)\n );\n }\n return res.sendStatus(200);\n });\n });\n}", "static setup({settings, user: {email, password, username}}) {\n\n // Validate the settings first.\n return SetupService\n .validate({settings, user: {email, password, username}})\n .then(() => {\n return SettingsService.update(settings);\n })\n .then((settings) => {\n\n // Settings are created! Create the user.\n\n // Create the user.\n return UsersService\n .createLocalUser(email, password, username)\n\n // Grant them administrative privileges and confirm the email account.\n .then((user) => {\n\n return Promise.all([\n UsersService.addRoleToUser(user.id, 'ADMIN'),\n UsersService.confirmEmail(user.id, email)\n ])\n .then(() => ({\n settings,\n user\n }));\n });\n });\n }", "function createNewUser(email, password, type, name) {\n firebase.auth().createUserWithEmailAndPassword(email, password).then(function(user) {\n writeUserData(name, email, type); // Optional\n }, function(error) {\n // Handle Errors here.\n var errorCode = error.code;\n var errorMessage = error.message;\n console.log(errorCode + \": \" + errorMessage);\n errorToScreenAuth(errorCode + \": \" + errorMessage, \"error-signup-id\");\n });\n}", "function createNewUser(ctx) {\n console.log(\"From Authentication: createNewUser\");\n const email = Utility_1.generateRandomEmail(); // ...do we need this?\n auth\n .createUserWithEmailAndPassword(email, Constants_1.DEFAULT_PASSWORD)\n .then(() => {\n // add new uid to persistent storage\n const currentUserId = auth.currentUser.uid;\n ctx.globalState.update(\"cachedUserId\", currentUserId);\n console.log(\"Successfully created new user\");\n console.log(\"cachedUserId is: \" + ctx.globalState.get(\"cachedUserId\"));\n addNewUserDocToDb(currentUserId);\n return true;\n })\n .catch((e) => {\n console.log(e.message);\n return false;\n });\n}", "function createUser(req, res) {\n console.log(\"loging userData\" +req.body.firstname, req.body.lastname, req.body.mobile, req.body.email, req.body.password);\n\n req.checkBody('firstname', 'Firstname is required').notEmpty();\n req.checkBody('lastname', 'Lastname is required').notEmpty();\n req.checkBody('mobile', 'Mobile is required').notEmpty();\n req.checkBody('email', 'Email is required').notEmpty();\n req.checkBody('email', 'Email is not valid').isEmail();\n req.checkBody('account_type', 'Account Type is required').notEmpty();\n req.checkBody('password', 'Password is required').notEmpty();\n \n let errors = req.validationErrors();\n\n if(errors){\n console.log(`Validation Errors: ${JSON.stringify(errors)}`);\n req.flash('error', errors);\n res.redirect('create');\n } else {\n\n const firstname = req.body.firstname;\n const lastname = req.body.lastname;\n const mobile = req.body.mobile;\n const email = req.body.email.toLowerCase();\n const account_type = req.body.account_type;\n const password = '123456';\n\n emailQuery = {email: email};\n \n if(account_type == 'User' || account_type == 'Agent') {\n User.findOne(emailQuery, (err, user_email) => {\n if(err) {throw err}\n if(user_email){\n console.log(`This admin email exists already: ${user_email}`);\n req.flash('errorMsg', 'This email has been taken');\n res.redirect('create');\n } else {\n mobileQuery = {mobile: mobile};\n User.findOne(mobileQuery, (err, user_mobile) => {\n if(err){throw err}\n \n if(user_mobile){\n console.log(`This user mobile exists already: ${user_mobile}`);\n req.flash('errorMsg', 'This mobile has been taken');\n res.redirect('create');\n } else {\n \n console.log(\"attempting to save the user:\");\n const newUser = new User({\n firstname: firstname,\n lastname: lastname, \n mobile: mobile, \n email: email, \n account_type: account_type,\n created_by: req.user._id,\n password: bcrypt.hashSync(password, bcrypt.genSaltSync(10)),\n p_check: password\n });\n \n newUser.save( (err, registeredUser) => {\n if(err){\n throw error\n } else {\n console.log(`User saved to the database ${registeredUser.firstname}`);\n \n let newUserWallet = new UserWallet({\n wallet_id: mobile,\n user_id: registeredUser._id,\n wallet_type: account_type \n });\n \n newUserWallet.save( (err, registerdWallet) => {\n if(err) throw err;\n else {\n console.log(`UserWallet saved to the database ${registerdWallet.wallet_id}`);\n }\n });\n \n req.flash('successMsg', `You have registered a new ${account_type} successfully, password is ${registeredUser.p_check}`);\n res.redirect('create');\n }\n });\n }\n })\n }\n });\n }\n \n if(account_type == 'Manager') {\n if(req.user.role != 'Super-Admin'){\n req.flash('errorMsg', `You don't have priviledges to create a ${account_type} account`);\n res.redirect('create');\n } else {\n\n Admin.findOne(emailQuery, (err, admin_email) => {\n if(err) {throw err}\n if(admin_email){\n console.log(`This admin email exists already: ${admin_email}`);\n req.flash('errorMsg', 'This manager email has been taken');\n res.redirect('create');\n } else {\n mobileQuery = {mobile: mobile};\n Admin.findOne(mobileQuery, (err, admin_mobile) => {\n if(err){throw err}\n \n if(admin_mobile){\n console.log(`This admin mobile exists already: ${admin_mobile}`);\n req.flash('errorMsg', 'This manager mobile has been taken');\n res.redirect('create');\n } else {\n \n console.log(\"attempting to save the admin:\");\n const newAdmin = new Admin({\n firstname: firstname,\n lastname: lastname, \n mobile: mobile, \n email: email, \n role: account_type,\n created_by: req.user._id,\n password: bcrypt.hashSync(password, bcrypt.genSaltSync(10)),\n p_check: password\n });\n \n newAdmin.save( (err, registeredAdmin) => {\n if(err){\n throw error\n } else {\n console.log(`User saved to the database ${registeredAdmin.firstname}`);\n \n let newAdminWallet = new AdminWallet({\n wallet_id: mobile,\n user_id: registeredAdmin._id,\n wallet_type: account_type \n });\n \n newAdminWallet.save( (err, registerdWallet) => {\n if(err) throw err;\n else {\n console.log(`AdminWallet saved to the database ${registerdWallet.wallet_id}`);\n }\n });\n \n req.flash('successMsg', `You have registered a new ${account_type} successfully, password is ${registeredAdmin.p_check}`);\n res.redirect('create');\n }\n });\n }\n })\n }\n });\n }\n }\n \n }\n\n}", "function createUser(firstname, lastname, username, password) {\n let person = new UserSignUp(firstname, lastname, username, password);\n ajax(\"PUT\", \"/auth\", isCreateUserOk, person);\n}", "function add_user(email, password, patients){\n\tif(user_exists(email)){\n\t\talert(\"User already exists\");\n\t\treturn false;\n\t}\n\n\tvar new_user = make_user(email, password, patients);\n\n\tvar user_array = get_user_array();\n\n\t// if(user_array.isArray){\n\t\ttry{\n\t\t\tuser_array.push(new_user);\n\t\t} catch(err) {\n\t\t\tuser_array = [ new_user ];\n\t\t}\n\t// } else {\n\t// \tuser_array = [ new_user ];\n\t// }\n\tset_user_array(user_array);\n\n\tconsole.log(\"users:{\" + localStorage['users'] + '}');\n\n\n\treturn true;\n}", "createNewUser(userName, fullName, unhashedPassword, phone, countryCode, callback) {\n authy.register_user(userName, phone, countryCode, (err, res) => {\n if (err) {\n return callback(err);\n }\n let authyID = res.user.id;\n\n this.saveUser(unhashedPassword, userName, fullName, phone, countryCode, authyID, callback);\n });\n }", "addUser() {\r\n // Create a new user with the given email and password.\r\n firebase.auth().createUserWithEmailAndPassword(this.state.email,this.state.password)\r\n .then(() => {\r\n var username = firebase.auth().currentUser.uid;\r\n // Set the user status to active.\r\n firebase.database().ref(\"/users/\"+username+\"/settings/active\").set({\r\n value: true\r\n });\r\n // Initialize a date that will allow the user to start a new conversation.\r\n firebase.database().ref(\"/users/\"+username+\"/settings/latestConvo\").set({\r\n timestamp: \"6/20/2018, 00:00:00 AM\"\r\n });\r\n firebase.database().ref(\"/users/\"+username+\"/settings/gender\").set(\"other\")\r\n firebase.database().ref(\"/users/\"+username+\"/settings/blocked\").set(\"false\")\r\n firebase.database().ref(\"/activeUsers/\"+username).set({\r\n username: username\r\n })\r\n // Navigate to the main menu with firstLogin as true, meaning that the intro page will display.\r\n this.props.navigation.navigate('Tabs', {firstLogin: true})})\r\n .catch(error => this.setState({errorMessage: error.message}));\r\n }", "function createUser(email, userName, password) {\n this.email = email;\n this.userName = userName;\n this.password = password;\n}", "function createUser(reqBody,res){\n var user={};\n //we take the first occurence to have the data model \n var model = userDbStub[0];\n if (reqBody && reqBody.emailAddress !== '' && reqBody.emailAddress !== undefined){\n // we check if the email not already exist\n var emailExist = false;\n userDbStub.forEach(function(user) {\n if(user.emailAddress === reqBody.emailAddress){\n emailExist = true;\n } \n }, this);\n \n if(emailExist){\n res.status(403).send('user already exist with this email'); \n }else{ \n for (var params in model) {\n \n if (reqBody[params] !== undefined) {\n if(params === 'password') {\n user[params] = sha1(reqBody[params]);\n }else{\n user[params] = reqBody[params];\n } \n }else if(Number.isInteger(model[params])) {\n user[params]=0;\n }else if(Array.isArray(model[params])){\n user[params]=[];\n } else if(typeof model[params] === \"object\") {\n user[params]={};\n }else{\n user[params]= '';\n }\n }\n userDbStub.push(user);\n } \n }else{\n res.status(403).send('user email not defined');\n }\n return user ;\n}", "function createUser(newUser){\n\n UserService\n .createUser(newUser)\n .then(\n function (doc) {\n vm.user = null;\n init();\n });\n }", "function createNewUser(userObj) {\r\n var node = document.createElement(\"LI\");\r\n var innerElement = document.createTextNode(userObj.username + ' (' + userObj.email + ')');\r\n node.appendChild(innerElement);\r\n document.getElementById(\"users\").appendChild(node);\r\n }", "function createUser(cedula,apellido,email, nombre, telefono, pass){\n const password = pass;\n var userId=\"\";\n \n auth.createUserWithEmailAndPassword(email, password)\n .then(function (event) {\n user = auth.currentUser;\n userId = user.uid;\n console.log(\"UserID: \"+userId);\n insertar(cedula,apellido,email, nombre, telefono, userId);\n })\n .catch(function(error) {\n alert(error.message);\n console.log(error.message);\n });\n}", "function createUser(userObj) {\n\treturn addUserToServer(userObj).then(renderUser(userObj))\n}", "function register(userObj) {\n vm.emails.push(userObj.emails);\n userObj.emails = vm.emails;\n console.log(userObj);\n UserService\n .createUser(userObj)\n .then(function (response) {\n console.log(response);\n var currentUser = response.data;\n if(currentUser != null){\n UserService.setCurrentUser(currentUser);\n $location.url('/profile');\n }\n else{\n //promise fullfilled, inpsite of getting a null response.\n console.log(\"Username already exists\");\n vm.showAlert = true;\n }\n });\n }", "createUser(firstName, lastName, email, password) {\n this.setUserId();\n const id = this.getUserId();\n let response;\n const userInfo = {\n id,\n firstName,\n lastName,\n email,\n password,\n token: this.getEncryptedToken(email),\n };\n\n const userData = this.app.readDataFile(userFilePath);\n\n const isUserExist = userData.find(item => item.email === email);\n\n if (!firstName || !lastName || !email || !password) {\n return null;\n }\n\n if (isUserExist) {\n response = false;\n } else {\n // push new user\n userData.push(userInfo);\n this.app.writeDataFile(userFilePath, userData);\n response = userInfo;\n }\n return response;\n }", "function setPermissions() {\n postPermission(\n success = function () {\n sweetAlert(\"User created\", \"User '\" + email + \"' has been created\", \"success\");\n viewController('users');\n },\n error = null,\n email = email,\n admin = isAdmin,\n editor = isEditor,\n dataVisPublisher = isDataVisPublisher\n );\n }", "async create(req, res) {\n try {\n validateUser(req.body);\n await userRepository.create(req.body);\n res.json('User registered successfully.');\n } catch (err) {\n res.json({ err });\n }\n }", "function init() {\n \n newUser()\n\n}", "function createUser(req, res) {\n var newUser = req.body.user;\n\n if(newUser.roles && newUser.roles.length > 1) {\n newUser.roles = newUser.roles.split(\",\");\n } else {\n newUser.roles = [\"student\"];\n }\n\n userModel\n .findUserByUsername(newUser.username)\n .then(\n function(user){\n if(user) {\n res.json(null);\n } else {\n return userModel.createUser(newUser);\n }\n },\n function(err){\n res.status(400).send(err);\n }\n )\n .then(\n function(user){\n if(user){\n req.login(user, function(err) {\n if(err) {\n res.status(400).send(err);\n } else {\n return userModel.findAllUsers();\n }\n });\n }\n }\n ).then(\n function(users){\n res.json(users);\n }\n\n )\n }", "function addAnotherUser() {\n // Need a unique id, will monotomically increase\n var id = getNextUserId();\n\n // Create and add the user to DOM\n createNewUser(id);\n\n // Make sure message about no users is hidden\n document.getElementById('no-added-users').style.display = 'none';\n\n // Always return false to disable the default action\n return false;\n}", "function createAnonymousUserAndSave() {\n // Retrieve the stored User from Local Device Storage\n var userId = window.localStorage.getItem('deviceUser');\n if (userId === null) {\n app.appUser().create({\n anonymous: true\n }).then(function (anonymousUser) {\n console.log('Created anonymous user: ', anonymousUser);\n $('#results').append('<h2>User</h2>' + JSON.stringify(anonymousUser, null, 2));\n if (window.localStorage) {\n localStorage.deviceUser = anonymousUser.id;\n localStorage.deviceApiKey = anonymousUser.apiKey;\n }\n });\n }\n else {\n var anonymousUser = new EVT.User({\n id: localStorage.deviceUser,\n apiKey: localStorage.deviceApiKey\n }, app);\n console.log('Anonymous User read from Local Storage : ' + JSON.stringify(anonymousUser));\n $('#results').append('<h2>User</h2>' + JSON.stringify(anonymousUser, null, 2));\n }\n}", "signUp(email, password, handle, avatar) {\n /* Create a new user and save their information */\n\n }", "static createUser(req, res){\n // Form validation\n const { errors, isValid } = validateRegisterInput(req.body);\n // Check validation\n if (!isValid) {\n return res.status(400).json(errors);\n }\n User.findOne({ username: req.body.username })\n .then(user => {\n if (user) {\n return res.status(400).json({ username: \"Username already exists\" });\n } \n const newUser = new User({\n username: req.body.username,\n password: req.body.password,\n //privileges : req.body.privileges,\n admin_creator: req.body.admin_creator,\n isAdmin: req.body.isAdmin,\n isNetIDLogin: req.body.isNetIDLogin,\n comment: req.body.comment,\n\n });\n // Hash password before saving in database\n bcrypt.genSalt(10, (err, salt) => {\n bcrypt.hash(newUser.password, salt, (err, hash) => {\n if (err) throw err;\n newUser.password = hash;\n newUser\n .save()\n .then(user => res.json(user))\n .catch(err => console.log(err));\n });\n });\n } \n )\n }", "function developerCreate(name, password, email, role, cb) {\n //object for developer details\n developerDetail = {name:name , password: password, email: email, role:role } \n \n const developer = new User(developerDetail);\n developer.save(function (err) {\n if (err) {\n cb(err, null)\n return\n }\n console.log('New Developer: ' + developer);\n users.push(developer)\n cb(null, developer)\n } );\n }" ]
[ "0.76551545", "0.7176187", "0.7124997", "0.7090544", "0.6969559", "0.6955733", "0.69338405", "0.6932489", "0.68941545", "0.6855995", "0.68553466", "0.67918295", "0.67797405", "0.67781377", "0.6750718", "0.67448187", "0.67433035", "0.6741922", "0.6702666", "0.67001975", "0.6691801", "0.66728145", "0.66638225", "0.6660019", "0.66575503", "0.6646294", "0.6640036", "0.6633743", "0.66132843", "0.6608164", "0.66067743", "0.66059184", "0.65727943", "0.6569354", "0.65672064", "0.65526885", "0.65511876", "0.65445364", "0.65444237", "0.65382904", "0.65337336", "0.6527362", "0.6521709", "0.6510231", "0.6500833", "0.6500023", "0.64909977", "0.6486385", "0.64705694", "0.6470227", "0.64650095", "0.64583087", "0.6457838", "0.6453989", "0.64536834", "0.64374673", "0.6433672", "0.6428893", "0.6422735", "0.6421314", "0.64027804", "0.6396056", "0.639568", "0.6395215", "0.6390379", "0.6387793", "0.63869154", "0.6386293", "0.63761425", "0.6366434", "0.6364718", "0.63337344", "0.6331421", "0.6331035", "0.6328578", "0.63265526", "0.6324473", "0.6322542", "0.63201976", "0.6310125", "0.6307264", "0.63025165", "0.6298398", "0.6298284", "0.6286993", "0.6280196", "0.6279931", "0.62780404", "0.62708104", "0.6268201", "0.6267191", "0.62665206", "0.6252207", "0.6250388", "0.6248815", "0.62360203", "0.62278986", "0.62240577", "0.622397", "0.6222165", "0.62149495" ]
0.0
-1
handles clicks on search button
function add_click() { $('#search').click(function(){ var query = find_query_params(); //show a simple error message if the user hasn't entered enough in the query query?query_data(query):error(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onSearchButton(event) {\n if (\n event.target.label ==\n gSearchBundle.GetStringFromName(\"labelForSearchButton\")\n ) {\n onSearch();\n } else {\n onSearchStop();\n }\n}", "function clickSearchButton(e){\n _self.getDefaultPlace(_self.scope.inputSearch.value); \n }", "clickSearchBox(event) {\n if (!this.isSearching()) {\n this.startSearching();\n }\n }", "function clicked() {\n search()\n; }", "function handleSearchClick(){\r\n var temp = document.getElementById('searchText').value;\r\n fetchRecipesBySearch(temp);\r\n }", "handleSearchClick(){\n\n this.doSearch();\n\n }", "function searchEventListener() {\n\t$(\"#searchbtn\").click(function() {\n\t\tif ($(\"#searchbox\").val() != '') {\n\t\t\tsearchNewspapers($(\"#searchbox\").val());\n\t\t}\n\t});\n}", "function clickedSearch(e) {\n var newSearch = e.target.textContent;\n getSearchResults(newSearch);\n}", "function setSearchClick(searchUrl) {\n $(\"#search-btn\").on(\"click\", function() {\n var searchInput = $(\"#search-input\").val();\n if (!searchInput == \"\") {\n $(\"#result-panels-wrapper\").html(\"\");\n getSearchData(searchUrl, searchInput);\n }\n });\n}", "function searchCall() {\n $('#searchButton').click(function () {\n var qString = $('#searchInput').val();\n bindSearchUrl(qString);\n });\n\n $('#searchInput').keypress(keypressHandler);\n }", "function searchHandler(e) {\n \"use strict\";\n // Prevent default form action\n e.preventDefault();\n showFilteredBreeds();\n}", "handleSearchClick(event) {\n\t\tthis.props.onSearchClick(event, this.state);\n\t}", "onActionClickSearchBar() {\n this.search(this.state.search)\n }", "function onSearchTerm(evt) {\n var text = evt.target.value;\n doSearch(text, $('#types .btn-primary').text());\n }", "onSearch(e) {\n let term = e.target.value;\n // Clear the current projects/samples selection\n this.props.resetSelection();\n this.props.search(term);\n }", "function initializePage() {\n $('.btn').click(search);\n}", "function clickSearchBox(object){\n let searchText = document.querySelector(\".form-inline input[type='text']\").value;\n document.location = page.RESULT + '?searchWords='+searchText.toLowerCase();\n}", "handleSearchClick(e){\n this.toggleSearch();\n \n e.stopPropagation(); //parents not told of the click\n }", "handleOpenSearch(event) {\n this.searchButton = !this.searchButton;\n }", "handleClickEvent() {\n this.props.fetchSearch(this.state.search)\n }", "function onclickForSearchButton(event)\n{\n //console.log(event);\n \n var q = document.getElementById('search-query').value; //escape here?\n \n //some kanji searches are going to be legitimately only one char.\n //we need a trim() function instead...\n if(q.length < 1)\n {\n return;\n }\n \n buttonSpinnerVisible(true);\n \n var matches = doEdictQueryOn(q);\n}", "function whatToSearch(){\n $(`.js-search`).on('click',function(){\n //will eventually ask to allow for location\n // make an if statement to set a global variable to winerie or taste room depending on which button was pressed.\n $(`.js-where`).removeClass('hidden')\n\n })\n}", "handleSearchClick(event, passedState) {\n\t\tif(passedState) {\n\t\t\tthis.loadSearchResults(passedState);\n\t\t} else {\n\t\t\tthis.loadSearchResults(this.state);\n\t\t}\n\t\t\n\t}", "function buttonSearch(){\n\tsearchTerm = this.attributes[2].value; \n\tsearchTerm = searchTerm.replace(/\\s+/g, '+').toLowerCase();\n\t\t\n \tdisplayGifs ();\n}", "HandleSearch(e) {\n this.props.searchname(this.state.search);\n this.setState({ clicked: true, search: '' });\n this.props.handleClickParent(e);\n }", "function handleClick(e) {\n if (!textValue) setErrorMessage(\"Please enter a value\");\n else {\n if (searchType === \"city\") {\n searchByCity(e);\n } else {\n searchByCountry(e);\n }\n }\n }", "function search(_event) {\r\n let inputName = document.getElementById(\"searchname\");\r\n let inputMatrikel = document.getElementById(\"searchmatrikel\");\r\n let query = \"command=search\";\r\n query += \"&nameSearch=\" + inputName.value;\r\n query += \"&matrikelSearch=\" + inputMatrikel.value;\r\n console.log(query);\r\n sendRequest(query, handleSearchResponse);\r\n }", "clickSearch() {\n this.set('loading', true);\n this.elasticSearch.setFilterString(\"\");\n this.elasticSearch.clearUserSearch();\n this.elasticSearch.queryUsers();\n }", "function search(){\n $('.search-small').click(function(){\n $('.nav-search').fadeIn();\n })\n $(\".nav-search\").click(function(){\n $(this).fadeOut();\n })\n $(\".closesearch\").click(function(){\n $(\".nav-search\").fadeOut();\n })\n $(\".nav-search .form-control\").click(function(e){\n e.stopPropagation();\n })\n}", "function search() {\n let search_text = $search_text.value;\n decide_search(search_text)\n}", "search() {\n this.trigger('search', {\n element: this.searchBar,\n query: this.searchBar.value\n });\n }", "butonSubmitRechercher() {\n return cy.get('.Search--button');\n }", "function searchthis(e){\n $.search.value = \"keyword to search\";\n $.search.blur();\n focused = false;\n needclear = true;\n}", "function handleSearch() {\n triggerSearch({}); // need empty braces here\n }", "function handleSearchSubmit() {\n\t$('#rep-state-search').on('click', function (event) {\n\t\tevent.preventDefault();\n\n\t\tlet userState = $('#state-select').val();\n\t\t$(\"#pick-rep\").show();\n\t\tgetProPublicaFedHouse(userState);\n\t getProPublicaFedSenate(userState);\n\t});\n}", "search(){\n // Condition checks if nothing has been input when first entering website and clicking the button or when something is typed and then deleted\n // returns out of method if this is the case as there will be no results\n if(this.state === null || this.state.term === ''){\n return;\n }\n\n // Calls the passed down event handler search function from App.js\n this.props.onSearch(this.state.term);\n }", "function search() {\n\t\n}", "function searchFor(what){\n\tdocument.forms['searchForm'].elements['search'].value=what; // In case called from elsewhere we fill in the search field for referencing back to it.\n\tgo.click(); // this functionality is in bclp_ext_tabs.js as it is all done as part of the tabs object. It's the handler part of Ext.widget with id 'go'\n}", "function searchSubmit() {\n $('.js-search-form').click(e => {\n event.preventDefault();\n const searchTarget = $(event.currentTarget).find('.js-query');\n const query = searchTarget.val();\n getComicInfo(query,callBack)\n });\n}", "function startUp() {\n let search = document.getElementById(\"search\");\n search.onclick = searchAll;\n }", "searchinputClickCallback(event) {\n event.target.select();\n this.searchinputCallback(event);\n }", "handleClickSearch(event) {\n if (!this.state.value.length) {\n Swal.fire(\"Search Data Missing!\", \"\", \"warning\");\n } else {\n event.preventDefault();\n this.setState({ isLoaded: false });\n this.getData();\n }\n }", "function setSearch() {\r\n\tconst btn=document.querySelector('#searchbtn');\r\n\tbtn.addEventListener('click', searchCraft);\r\n\tconst bar = document.querySelector('#searchbar');\r\n\tbar.addEventListener(\"keyup\", function(event) {\r\n if (event.key === \"Enter\"|event.keyCode === 13) {\r\n searchCraft(event);\r\n\t }\r\n\t});\r\n}", "function emitSearch(event){ if (event.which == 13) {addSearch();}}", "get searchBtn () { return $('#searchButton') }", "function submit_search(event) {\n if (event.keyCode == 13) {\n $('#we-yxname-search').click();\n }\n}", "function handleSearch(event) {\n event.preventDefault();\n if (formSearch) {\n searchGoogleBooksAPI(formSearch.search);\n }\n\n }", "function handleOneSearch() {\n $(\"#search-screen-header\").hide();\n $(\"#js-search-one\").on(\"click\", event => {\n event.preventDefault();\n $(\"#main-screen-header\").hide();\n $(\"#similars-search-screen-header\").hide();\n $(\"#js-multi-search-option\").hide();\n $(\"#js-search-one\").hide();\n $(\"#one-movie-search\").show();\n $(\"#search-screen-header\").show();\n });\n }", "function submitSearch(event) {\n var textElement = event.target;//use instead of SrcElement, which is depreciated\n var btnName = textElement.id.replace(\"Box\", \"Btn\");\n var targetBtn = document.getElementById(btnName);\n if (event.keyCode === 13 || event.which ===13) {\n targetBtn.click();\n event.preventDefault();//prevent default event handling for pressing enter (which is to submit the form)\n event.stopPropagation();\n }\n}", "function searchThis(e) {\n $('#searchbox').val($(e).text());\n FJS.filter();\n}", "function handleSearch(e) {\n e.preventDefault();\n let input = document.getElementById('networkSearch');\n\t\tlet search = input.value;\n\t\tprops.handleSearch(search);\n\t\tinput.value = '';\n }", "search(e) {\n //NOTE You dont need to change this method\n e.preventDefault();\n _showLoading()\n try {\n SongService.getMusicByQuery(e.target.query.value);\n } catch (error) {\n console.error(error);\n }\n }", "function handleSearchEvent() {\n const newData = filterStudents(searchValue);\n showPage(newData, 1);\n addPagination(newData);\n}", "function search() {\n\tvar query = $(\".searchfield\").val();\n\tif (query == \"\") {\n\t\tdisplaySearchResults(\"\", data, data);\n\t}\n\telse {\n\t\tvar results = idx.search(query);\n\t\tdisplaySearchResults(query, results, data);\n\t\tga('send', 'event', 'Search', 'submit', query);\n\t}\n}", "function handleSearchV1() {\n jQuery('.header-v5 .search-button').click(function () {\n jQuery('.header-v5 .search-open').slideDown();\n });\n\n jQuery('.header-v5 .search-close').click(function () {\n jQuery('.header-v5 .search-open').slideUp();\n });\n\n jQuery(window).scroll(function(){\n if(jQuery(this).scrollTop() > 1) jQuery('.header-v5 .search-open').fadeOut('fast');\n });\n }", "searchToClick() {\n\n\n\n this.axiosSearch(\"movie\");\n this.axiosSearch(\"tv\");\n\n }", "function addeventListener() {\n var button = document.getElementById('search-button');\n button.addEventListener('click', linearSearch);\n }", "function selectingButtonListener() {\n var button = $('.contacts-search-bar button');\n button.click(searchToArrow);\n}", "search(e){\n \n\t e.preventDefault();\n\t let input = document.querySelector('#photo-search');\n\t let term = input.value;\n\t \n\t if(term.length > 2){\t\t \n\t\t input.classList.add('searching');\n\t\t this.container.classList.add('loading');\n\t\t this.search_term = term;\n\t\t this.is_search = true;\n\t\t this.doSearch(this.search_term);\t\t \n\t } else {\t\t \n\t\t input.focus();\t\t \n\t }\n\t \n }", "function searchButtonClicked() {\n if (!processConfiguration()) {\n window.alert(\"Error on configuration. Be sure to add valid access tokens to configuration first to perform a search.\");\n return\n }\n //nothing entered...\n searchString = processSearchString(document.getElementById(\"input\").value);\n if (searchString == \"\") {\n return;\n }\n sources = [];\n projects = [];\n connectorAPIs = [];\n connectorManager = new ConnectorManager(token_config['GitHub'], token_config['GitLab']);\n //resetting the necessary values\n getSources();\n getConnectors();\n currentPage = 1;\n maxPage = 1;\n receivedProjects = 0;\n rowCounter = 0;\n //the date is used to ignore newly created projects\n //-> would lead to displacements when changing pages\n date = new Date(Date.now()).toISOString().replace(/[\\..+Z]+/g, \"+00:00\");\n document.getElementById(\"lastSearchedOutput\").innerHTML = searchString;\n initiateSearch();\n}", "_handleChange(e){let root=this;root._getSearchText(root.$.input.value);root.resultCount=0;root.resultPointer=0;root.dispatchEvent(new CustomEvent(\"simple-search\",{detail:{search:root,content:e}}))}", "function handleSearch() {\n\n\tvar value = $(\"#searchBox\").val();\n\t\n\tif(value != null && value != \"\") {\n\t\tsearchStationForName(value);\n\t}\n\n}", "searchClicked(_) { console.log(this.state.term) }", "function keyEventSearchPerson(e){\n var event1 = e || window.event;\n if(event1.keyCode == 13){\n $('#btn-searchPerson').click();\n }\n}", "function searchEntity(event) {\n\tif ((this.id == 'search_frame_input' && event.keyCode == 13) || // Enter key code\n\t\t(this.id == 'search_frame_image' && event.type == 'click')) {\n\t\t\tvar sQueryId = $('#search_frame_input').val();\n\t\t\twindow.location = \"search.html?query=\" + sQueryId;\n\t}\n}", "function search() {\r\n let searchTerm = id(\"search-term\").value.trim();\r\n if (searchTerm !== \"\") {\r\n id(\"home\").disabled = false;\r\n loadBooks(\"&search=\" + searchTerm);\r\n }\r\n }", "searchClicked(_) {\n flikrSearch(this.state.term).fork(this.showError,this.updateResults)\n }", "function handleSearchButton(event) {\n event.preventDefault();\n let city = document.querySelector(\".form-control\");\n let apiKey = \"a05f0202382b8935188265308a3e5140\";\n let apiUnits = \"metric\";\n let apiUrl = `https://api.openweathermap.org/data/2.5/weather?q=${city.value}&APPID=${apiKey}&units=${apiUnits}`;\n axios.get(apiUrl).then(showTemperature);\n let forecastApiURL = `https://api.openweathermap.org/data/2.5/forecast?q=${city.value}&APPID=${apiKey}&units=${apiUnits}`;\n axios.get(forecastApiURL).then(displayForecast);\n}", "search(e) {\n //NOTE You dont need to change this method\n e.preventDefault();\n try {\n SongsService.getMusicByQuery(e.target.query.value);\n } catch (error) {\n console.error(error);\n }\n }", "function searchButtonHandler (e) {\n e.stopImmediatePropagation();\n e.preventDefault();\n/*\nlet button = e.button;\nlet target = e.target;\nlet classList = target.classList;\nconsole.log(\"searchButtonHandler event: \"+e.type+\" button: \"+button+\" phase: \"+e.eventPhase+\" target: \"+target+\" class: \"+target.classList);\n*/\n clearMenu(); // Clear any open menu\n\n//console.log(\"Magnifier glass context menu\");\n myMenu_open = myMGlassMenu_open = true;\n drawMenu(MyMGlassMenu, e.clientY, e.clientX);\n}", "search() {\n let location = ReactDOM.findDOMNode(this.refs.Search).value;\n if (location !== '') {\n let path = `/search?location=${location}`;\n makeHTTPRequest(this.props.updateSearchResults, path);\n }\n }", "function appendSearchButton() {\n\n // unobtrusive JavaScript design pattern. \n // \tdynamiclly add search button\n const $div = $('<div class=\"student-search\"></div>');\n const $input = $('<input placeholder=\"Search for students...\">');\n const $button = $('<button>Search</button>');\n\n $('div.page-header').append($div);\n $div.append($input);\n $div.append($button);\n\n\t// trigger the showResult function after typed input info and clicked the search button\n\t$button.on('click', function() {\n\t\tlet filterValue = $input.val();\n\t\tshowSearchResult(filterValue);\n\t});\n\n\t$input.on('keyup', function() {\n\t\tlet filterValue = $input.val();\n\t\tshowSearchResult(filterValue);\n\t});\n}", "search(e) {\n //NOTE You dont need to change this method\n e.preventDefault();\n try {\n songService.getMusicByQuery(e.target.query.value);\n } catch (error) {\n console.error(error);\n }\n }", "function search(evt){\r\n\r\n if (evt){\r\n // don't search if pressing keys to navigate the list\r\n switch(evt.which){\r\n case 13:\r\n case 37:\r\n case 38:\r\n case 40:\r\n evt.preventDefault();\r\n evt.stopPropagation();\r\n return false; \r\n break;\r\n }\r\n }\r\n\r\n var searchstring = plugin.pcwInput.val();\r\n\r\n if (searchstring == ''){\r\n return;\r\n }\r\n\r\n // store the search string\r\n plugin.pcwInput.data('search-text',searchstring);\r\n\r\n if ($.trim(searchstring) == ''){\r\n return false;\r\n }\r\n \r\n $.ajax({\r\n url: constants.searchURL.replace('{{key}}', plugin.config.apikey) + searchstring,\r\n type: 'GET',\r\n dataType: 'jsonp',\r\n success: function(data){\r\n \r\n var addresses = data.predictions;\r\n\r\n if (addresses.length > 0){\r\n\r\n if (addresses.length == 1){\r\n // go straight to browse ??\r\n //browse(addresses[0][1]);\r\n }\r\n\r\n plugin.pcwAddressBrowse.trigger('hide');\r\n plugin.pcwAddressSelect.html('');\r\n\r\n // check searchstring is still current.\r\n if (searchstring === plugin.pcwInput.val()){\r\n \r\n // add the addresses to the Select drop down\r\n $.each(addresses, function(index, value){\r\n var listitem = $('<li></li>');\r\n var css = (value.complete) ? 'finish' : 'browse';\r\n var listitemlink = $('<a href=\"#\" class=\"'+css+'\">'+value.prediction+'</a>').data((value.complete)?'finish-id':'browse-id',value.refs);\r\n\r\n plugin.pcwAddressSelect.append(listitem.append(listitemlink)).trigger('show');\r\n\r\n });\r\n\r\n }\r\n\r\n }else{\r\n // try and filter any results we already have ??\r\n //filter(plugin.pcwAddressSelect, evt);\r\n }\r\n\r\n },\r\n error: function() { debug('Search failed',2) },\r\n timeout: 2000\r\n });\r\n }", "function getInput() {\n\t\t\tsearchBtn.addEventListener('click', () => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsearchTerm = searchValue.value.toLowerCase();\n\t\t\t\tconsole.log(searchTerm);\n\t\t\t\tresults.innerHTML = ''; // clear page for new results\n\t\t\t\tgetData(searchTerm); // run w/ searchTerm\n\t\t\t\tformContainer.reset();\n\t\t\t});\n\t\t}", "function searchClick() {\n console.log(\"sono qui\");\n var query = $('#titolo_digit').val();\n console.log(query);\n movieResult(query);\n tvResult(query);\n\n}", "function handleSearchAttempt (e) {\n var _query;\n\n // If there's no index, exit immediately and re-initialise:\n if (typeof _links !== 'object' || !Array.isArray(_links) || !_links) { return init(); }\n\n // Prevent default submit behaviour\n typeof e !== 'undefined' && e.preventDefault();\n\n // Retrieve the search query from the input element\n _query = e.target.querySelector('input').value;\n\n // Suffice it to say that we should quit if there's no query\n if (typeof _query !== 'string' || !_query) { return; }\n\n displaySearchResults(_query, getSearchResults(_query, _links));\n return false;\n }", "function menu_do_search() {\n\t// directly use the search page if it is active\n if (current === \"Special::Search\") {\n\t\td$('string_to_search').value = d$('menu_string_to_search').value;\n }\n woas.do_search(d$('menu_string_to_search').value);\n}", "function selectSearch() {\n $(\"#searchButton\").on(\"click\", function () {\n $(\"#search\").removeClass(\"hidden\");\n $(\".files\").addClass(\"hidden\");\n $(\"#scheduleImg\").addClass(\"hidden\");\n $(\".emails\").addClass(\"hidden\");\n $(\".nav\").addClass(\"hidden\");\n $(\".contacts\").addClass(\"hidden\");\n $(\".reminder\").addClass(\"hidden\");\n });\n}", "triggersearch(){\r\n\t\t\tlet query='';\r\n\t\t\tif(this.props.keyword){\r\n\t\t\t\tquery=this.props.keyword\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tquery=this.props.query\r\n\t\t\t}\r\n\t\t\tthis.props.fetchSearchResults(query);\r\n\t}", "handleClick(event)\n {\n let text = event.toElement.id.replace(\"radio\", \"\");\n this._filter = text === \"\" ? null : text;\n this._page = 1;\n this.getBooks();\n }", "function onSearchFocus() {\n if (activeSearch) {\n searchButton.className = \"pivot_searchbtn\"\n // pop up the suggestions as if we had pressed a key\n onSearchKeyPress({})\n } else {\n searchForm.className = \"\"\n searchBox.value = \"\"\n }\n /* note that this must be on mousedown, not onclick!\n mousedown on this element happens before blur on the text box,\n but before click on this element. we change the text box's contents\n on blur, so using mousedown is the easiest solution. */\n searchButton.onmousedown = onSearch\n }", "function handleRecipeSearch(evt){\r\n\tevt.preventDefault();\r\n\tlet query = searchInput.value.trim();\r\n\r\n\tif(query.length < 1) return;\r\n\r\n\tgetData(query)\r\n\t\t.then(res => res.hits)\r\n\t\t.then(hits => {\r\n\t\t\tresponseHits = hits;\r\n\t\t\tresultsCount.textContent = hits.length;\r\n\t\t\trenderRecipeTemplate();\r\n\r\n\t\t\tdocument\r\n\t\t\t\t.querySelectorAll('button.btn-read-recipe')\r\n\t\t\t\t.forEach( btn => btn.addEventListener('click', showRecipeDetails));\r\n\r\n\t\t\tshowLoader(false);\r\n\t\t})\r\n\t\t.catch(err => {\r\n\t\t\tif(err){\r\n\t\t\t\tresults.innerHTML = \"\";\r\n\t\t\t\tconsole.error(err);\r\n\t\t\t\tshowLoader(false);\r\n\t\t\t}\r\n\t\t})\r\n\r\n\tsearchInput.value = \"\";\r\n}", "function processEnInput(){\n $('#search-recipes').click(event=> {\n event.preventDefault()\n const q = $('#recipe-search-term').val()\n findRecipes(q)\n $('#back').removeClass('hidden')\n $('#contact-btn').addClass('hidden')\n })\n}", "function makeSearch(event) {\n event.preventDefault();\n\n toggleError();\n\n searchRepos(\n searchInput.value,\n searchStartCB,\n searchSuccessErrorCB,\n searchFinalCB\n );\n}", "function searched() {\n\n $(\".searched\").click(function (event) {\n console.log($(this).text())\n // event.stopPropagation()\n // event.preventDefault()\n var city = $(this).text()\n getWeather(city)\n getForecast(city)\n console.log(city)\n $('#dashBoard').empty()\n $('#foreCast').empty()\n $('#city').val(\"\")\n $('#five').empty()\n })\n\n }", "waitForButtonClicked() {\n if (this.elements.button) {\n document.querySelector('.' + this.elements.button).addEventListener('click', () => {\n\n // * Get all data from the fields\n var input = this.getInputData();\n\n if (input) {\n var filtered = this.search.searchByFilters(input);\n\n // * Show filtered datasets\n if (filtered) {}\n }\n });\n }\n \n }", "function newSearch(){\r\n $('.js-search-again').click(event =>{\r\n $('.js-search-page').removeClass('hidden');\r\n $('.js-no-results-page').addClass('hidden');\r\n $('.js-results-page').addClass('hidden');\r\n })\r\n}", "function handleSearchWaypointResultClick(e) {\n\t\t\tvar rootElement = $(e.currentTarget).parent().parent().parent().parent();\n\t\t\tvar index = rootElement.attr('id');\n\t\t\trootElement.removeClass('unset');\n\t\t\trootElement = rootElement.get(0);\n\n\t\t\trootElement.querySelector('.searchAgainButton').show();\n\t\t\trootElement.querySelector('.guiComponent').hide();\n\n\t\t\tvar waypointResultElement = rootElement.querySelector('.waypointResult');\n\t\t\t//remove older entries:\n\t\t\twhile (waypointResultElement.firstChild) {\n\t\t\t\twaypointResultElement.removeChild(waypointResultElement.firstChild);\n\t\t\t}\n\t\t\twaypointResultElement.insert(e.currentTarget);\n\t\t\twaypointResultElement.show();\n\n\t\t\t//remove search markers and add a new waypoint marker\n\t\t\ttheInterface.emit('ui:waypointResultClick', {\n\t\t\t\twpIndex : index,\n\t\t\t\tfeatureId : e.currentTarget.id,\n\t\t\t\tsearchIds : rootElement.getAttribute('data-search')\n\t\t\t});\n\t\t}", "function search(e) {\n const input = e.currentTarget.value.toLocaleLowerCase();\n const search_div = document.querySelector('#activity #filter-search');\n const cards_div = document.querySelector('#activity #filter-cards');\n const filter_container = document.querySelector('#activity .filter-container');\n\n if (input.length === 0) {\n clearSearch(e);\n } else {\n if (search_div.dataset.visible !== 'visible') {\n search_div.dataset.visible = 'visible';\n cards_div.dataset.visible = 'hidden';\n filter_container.dataset.visible = 'hidden';\n }\n for (let key of search_div.querySelectorAll('.activity-row .agent')) {\n if (key.textContent.toLocaleLowerCase().includes(input)) {\n key.closest('.activity-row').dataset.active = 'true';\n } else key.closest('.activity-row').dataset.active = 'false';\n }\n }\n}", "function cityClicked() {\n $(\".inputCity\").val($(this).text());\n $(\"#searchBtn\").trigger(\"click\");\n }", "function search()\n{\n\tvar query = ($(\"#search\")[0]).value;\n\tcreateCookie('search', query, 1); /// Save the search query\n\tgoTo('index'); /// Go to index (search) page\n}", "function searchVenue(){\n\t\t$(\"#query\").click(function(){\n\t\t\t$(this).val(\"\");\n\t\t});\n\n\t\t$(\"#query\").blur(function(){\n\t\t\tif ($(this).val() == \"\") {\n\t\t\t\t$(this).val(\"Example: Ninja Japanese Restaurant\");\n\t\t\t}\n\t\t\n\t\t\tif ($(this).val() != \"Example: Ninja Japanese Restaurant\") {\n\t\t\t\t$(this).addClass(\"focus\");\n\t\t\t} else {\n\t\t\t\t$(this).removeClass(\"focus\");\n\t\t\t}\n\t\t});\n\n\t\t//Submit search query and call to getVenues\n\t\t$(\"#searchform\").submit(function(event){\n\t\t\tevent.preventDefault();\n\t\t\tif (!lat) {\n\t\t\t\tnavigator.geolocation.getCurrentPosition(getLocation);\n\t\t\t} else {\n\t\t\t\tgetVenues();\n\t\t\t}\t\t\n\t\t});\n\n\t}", "function clickPrereqSearch(){\n\t\t$(\"#prereq_search_icon\").click(function(){\n\t\t\tsearchPrereq(); \n\t\t});\n\n\t\t$('#prereq_search_input').keypress(function(event){\n\t\t var keycode = (event.keyCode ? event.keyCode : event.which);\n\t\t if(keycode == '13'){\n\t\t searchPrereq(); \n\t\t }\n\t\t});\n\t}", "function onclickForTab_Search()\n{\n //console.log('click on search tab');\n \n if(!global_pagesLoaded.search)\n {\n firstLoadForTab_Search();\n }\n \n //alert('Search');\n}", "function searchButtonSwitchMode (e) {\n//console.log(\"searchButtonHandler event: \"+e.type+\" button: \"+e.button+\" phase: \"+e.eventPhase);\n if (e.button == 1) {\n\tswitch (options.searchFilter) {\n\t case \"all\":\n\t\tsetSFilterFldrOnlyHandler();\n\t break;\n\t case \"fldr\":\n\t\toptions.searchField = \"both\"; // Reset which parts a search is made on to title + url\n\t\tsetSFilterBkmkOnlyHandler();\n\t\tbreak;\n\t case \"bkmk\":\n\t\tsetSFilterAllHandler();\n\t\tbreak;\n\t}\n }\n}", "function manualSearch(e) {\n let term = document.querySelector(\"#searchTerm\").value;\n term = term.trim();\n if (term.length < 1) return;\n manualSearchData(term.toLowerCase());\n}", "function prepareSearchBTN() {\n document.querySelector(\"#searchButton\").addEventListener(\"click\", function() {\n pobierzListeFilmow();\n })\n $('#calendar').hide();\n}", "function click() {\n $(\"#search\").on(\"click\", function (e) {\n e.preventDefault();\n console.log(\"You clicked a button!\");\n getCityWeather().then(addToCityList());\n });\n}", "function searchWeather( ) {\n $('#search-term').keyup( e => {\n \n if (e.keyCode === 13){\n e.preventDefault();\n $('#search-button').click();\n }\n });\n $('#search-button').on('click', function(event) {\n // event.preventDefault();\n var city = $('#search-term').val();\n $('#search-term').val(\"\")\n fetchCityWeather(city);\n \n });\n}" ]
[ "0.80174273", "0.7943545", "0.7888287", "0.7645776", "0.7494333", "0.7414766", "0.7395401", "0.73695916", "0.7334083", "0.73033756", "0.7250058", "0.72416484", "0.7235318", "0.72018605", "0.7183045", "0.71795493", "0.71750313", "0.71399635", "0.7122783", "0.710893", "0.70515937", "0.70482844", "0.69793874", "0.69710934", "0.6967289", "0.69612044", "0.6946987", "0.6928139", "0.6907287", "0.68981934", "0.6893786", "0.6892533", "0.6883145", "0.68754137", "0.6871238", "0.68440366", "0.68406284", "0.68300104", "0.6829207", "0.6814962", "0.6806773", "0.6787963", "0.67796147", "0.6764924", "0.67618984", "0.67572415", "0.675691", "0.6752477", "0.6740151", "0.6739047", "0.6736873", "0.67244166", "0.67145336", "0.6710333", "0.67103124", "0.6706793", "0.67016846", "0.670115", "0.6696051", "0.6686781", "0.6678358", "0.66722065", "0.6666837", "0.66652185", "0.6646455", "0.66351", "0.6631663", "0.66303355", "0.6628137", "0.6623752", "0.66218776", "0.6621668", "0.6620905", "0.6616527", "0.6612603", "0.66031444", "0.6585161", "0.65754753", "0.6570711", "0.657064", "0.6568561", "0.65659726", "0.6565261", "0.6564319", "0.65609294", "0.6560399", "0.6558777", "0.65568703", "0.65563977", "0.65560806", "0.6554733", "0.6553342", "0.6551926", "0.65477526", "0.6546324", "0.65438604", "0.6539311", "0.65365976", "0.6533309", "0.65311205" ]
0.66029847
76
executes search and passes off response
function query_data(query) { //for debugging // console.log(query); $('#data-tables').empty(); $('#data-tables').html('<h2>Searching ...</h2>'); $.get(query) .done(function(data){ //for debugging // console.log(data); //make sure google's viz library is loaded. //if not, give it a few secs if(!google.visualization.DataTable) { setTimeout(function() { show_data(data,query); }, 3000); } else { show_data(data, query); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runSearch() {\n ps.search()\n .then(function(rsp) {\n if(rsp.stat === \"fail\") {\n ps.showError(rsp);\n }\n else if (rsp.stat === \"ok\") {\n ps.paging = rsp.photos;\n ps.parseSearchResults();\n }\n });\n }", "function sendSearchResult(search) {\n selectAndExecute(\"sr/\" + forHash(search), function() {\n var response = {type: \"searchresult\", link: \"search\", search: search, lists: [], controlLink: location.hash};\n response.header = $.trim($(\"#breadcrumbs\").find(\".tab-text\").text());\n var searchView = $(\"#main .search-view\");\n response.moreText = $.trim(searchView.find(\"div .header .more:visible\").first().text());\n response.lists.push(parseSublist(searchView, \"srar\", 6));\n response.lists.push(parseSublist(searchView, \"sral\", 5));\n response.lists.push(parseSublist(searchView, \"srs\", 10));\n response.empty = response.lists[0] === null && response.lists[1] === null && response.lists[2] === null;\n post(\"player-navigationList\", response);\n });\n }", "executeSearch(term) {\n var results;\n try {\n results = this.search.fuse.search(term); // the actual query being run using fuse.js\n } catch (err) {\n if (err instanceof TypeError) {\n console.log(\"hugo-fuse-search: search failed because Fuse.js was not instantiated properly.\")\n } else {\n console.log(\"hugo-fuse-search: search failed: \" + err)\n }\n return;\n }\n let searchitems = '';\n\n if (results.length === 0) { // no results based on what was typed into the input box\n this.resultsAvailable = false;\n searchitems = '';\n } else { // we got results, show 5\n for (let item in results.slice(0,5)) {\n let result = results[item];\n if ('item' in result) {\n let item = result.item;\n searchitems += this.itemHtml(item);\n }\n }\n this.resultsAvailable = true;\n }\n\n this.element_results.innerHTML = searchitems;\n if (results.length > 0) {\n this.top_result = this.element_results.firstChild;\n this.bottom_result = this.element_results.lastChild;\n }\n }", "function executeSearch() {\n\tlet user_input = $('#class-lookup').val().toUpperCase();\n\t\t\n\t// clears search results\n\t$('#search-return').empty();\n\n\t// display search hint when input box is empty\n\tif (user_input == \"\"){\n\t\t$('#search-return').append(emptySearchFieldInfo());\n\t}\n\t\n\tfor (course in catalog) {\n\t\t\n\t\t// user input describes a course code\n\t\tif (user_input == course) {\n\t\t\t$('#search-return').append(createCourseContainer(course));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// user input describes a department code\n\t\tif (user_input == catalog[course]['department']) {\n\t\t\t$('#search-return').append(createCourseContainer(course));\n\t\t}\n\t\t\n\t}\n\t\n\t// display a message if no results is returned\n\tif ($('#search-return').children().length == 0) {\n\t\t$('#search-return').append(`<li style='border: 3px solid black;'>\n\t\t\t\t\t\t\t\t\t\t<h3>Sorry, we couldn't find what you were looking for.</h3>\n\t\t\t\t\t\t\t\t\t</li>`)\n\t}\n}", "function executeSearch() {\n\n\t$('#loading-gif').removeClass(\"hidden\"); // Show the loading icon\n\n\tvar query = $(\"#searchField\").val().toLowerCase().split(' ').join('-');\n\tconsole.log(query);\n\n\t// Save query in the URL for bookmarking purposes\n\tif (window.location.search != \"?q=\" + query) {\n\t\twindow.history.pushState({}, document.title, \"/index.html?q=\" + query);\n\t\tcurURL = window.location.href; // update with new URL\n\t}\n\n\t// Ajax request to get JSON response\n\t$.ajax({\n\t\turl: \"/search/\" + query,\n\t\ttype: \"GET\",\n\n\t\tsuccess: function(response) { // No server error\n\t\t\tconsole.log(response);\n\t\t\trenderResponse(response);\n\t\t\t// Scroll to year if hash is present\n\t\t\tif (curURL.slice(-5)[0] === '#') {\n\t\t\t\tscrollToYear(curURL.slice(-4));\n\t\t\t}\n\t\t\t// Else scroll to top\n\t\t\telse {\n\t\t\t\t$('#main').animate({ scrollTop: 0 }, 'fast');\n\t\t\t}\n\t\t\t$('#loading-gif').addClass(\"hidden\");\n\n\t\t},\n\n\t\terror: function(response) { // Server error, shouldn't happen\n\t\tconsole.log(response);\n\t\trenderResponse({success:false,'error':'unknown-error'});\n\t\t$('#loading-gif').addClass(\"hidden\");\n\t}\t\n});\n}", "async response(request={})\n\t{\n\t\t//Just the raw response we get from the server; no post-processing whatsoever\n\t\tconst defaults={type:'All',creator:null,searchText:'',likedBy:null,...request}\n\t\tconst response=await window.fetchJson('search',{...defaults,...request})\n\t\tif(response.status!=='OK')\n\t\t{\n\t\t\tconsole.error('Search response status was not \"OK\"!\\nRequest:',request,'\\nResponse:',response)\n\t\t\t//Even if the response is not \"OK\" (it might even be undefined), the show MUST go on. We return the response anyway.\n\t\t\t//All functions (such as search.results) that use this search.response function operate under the assumption that the results are ok to use.\n\t\t}\n\t\treturn await window.fetchJson('search',{...defaults,...request})\n\t}", "async search({\n request,\n response,\n }) {\n // Validate user input\n const validation = await validateAll(request.all(), {\n needle: 'required',\n });\n if (validation.fails()) {\n return response.status(401).send({\n message: 'Please provide a needle',\n messages: validation.messages(),\n status: 401,\n });\n }\n\n const needle = request.input('needle');\n\n // Get results\n let results;\n\n if (needle === 'ferdi:custom') {\n const dbResults = (await Recipe.all()).toJSON();\n results = dbResults.map((recipe) => ({\n id: recipe.recipeId,\n name: recipe.name,\n ...typeof recipe.data === 'string' ? JSON.parse(recipe.data) : recipe.data,\n }));\n } else {\n let remoteResults = [];\n if (Env.get('CONNECT_WITH_FRANZ') == 'true') { // eslint-disable-line eqeqeq\n remoteResults = JSON.parse(await (await fetch(`https://api.franzinfra.com/v1/recipes/search?needle=${encodeURIComponent(needle)}`)).text());\n }\n const localResultsArray = (await Recipe.query().where('name', 'LIKE', `%${needle}%`).fetch()).toJSON();\n const localResults = localResultsArray.map((recipe) => ({\n id: recipe.recipeId,\n name: recipe.name,\n ...typeof recipe.data === 'string' ? JSON.parse(recipe.data) : recipe.data,\n }));\n\n results = [\n ...localResults,\n ...remoteResults || [],\n ];\n }\n\n return response.send(results);\n }", "function run_search() {\n var q = $(elem).val();\n if (!/\\S/.test(q)) {\n // Empty / all whitespace.\n show_results({ result_groups: [] });\n } else {\n // Run AJAX query.\n closure[\"working\"] = true;\n $.ajax({\n url: \"/search/_autocomplete\",\n data: {\n q: q\n },\n success: function(res) {\n closure[\"working\"] = false;\n show_results(res);\n }, error: function() {\n closure[\"working\"] = false;\n }\n })\n }\n }", "function makeSearch() {\n var query = $('#search-line').val();\n if (query.length < 2) {\n return null;\n }\n\n // cleanup & make AJAX query with building response\n $('#ajax-result-items').empty();\n $.getJSON(script_url+'/api/search/index?query='+query+'&lang='+script_lang, function (resp) {\n if (resp.status !== 1 || resp.count < 1)\n return;\n var searchHtml = $('#ajax-carcase-item').clone().removeClass('hidden');\n $.each(resp.data, function(relevance, item) {\n var searchItem = searchHtml.clone();\n searchItem.find('#ajax-search-link').attr('href', site_url + item.uri);\n searchItem.find('#ajax-search-title').text(item.title);\n searchItem.find('#ajax-search-snippet').text(item.snippet);\n $('#ajax-result-items').append(searchItem.html());\n searchItem = null;\n });\n $('#ajax-result-container').removeClass('hidden');\n });\n }", "function search() {\t\t\t\t\n\t\t\tconsole.log(vm.apiDomain);\n\t\t\n\t\t\tpageScope.loadingStart();\n\t\t\t\n\t\t\tAlleleFearSearchAPI.search(vm.apiDomain, function(data) {\n\t\t\t\tvm.results = data;\n\t\t\t\tvm.selectedIndex = 0;\n\t\t\t\tif (vm.results.length > 0) {\n\t\t\t\t\tloadObject();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tclear();\n\t\t\t\t pageScope.loadingEnd();\n\t\t\t\t}\n\t\t\t\tsetFocus();\n\t\t\t}, function(err) {\n\t\t\t\tpageScope.handleError(vm, \"API ERROR: AlleleFearSearchAPI.search\");\n\t\t\t\tpageScope.loadingEnd();\n\t\t\t\tsetFocus();\n\t\t\t});\n\t\t}", "static async search(query) {\n const res = await this.request(`search`, { query });\n return res;\n }", "function doSearch(searchTerm, cb) {\n var url = baseUrl + searchTerm;\n request(url, function(error, response, body) {\n if (error) {\n cb(error, null);\n } else {\n var results = parse(body);\n cb(null, results);\n }\n });\n}", "function search() {\n fetch('/', { \n method: 'POST',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n }\n }).then(function(response) { console.log(response.json()); })\n /*\n return fetch(`api/food?q=${query}`, {\n accept: \"application/json\"\n })\n .then(checkStatus)\n .then(parseJSON)\n .then(cb);\n */\n}", "async search(searchObj) {\n const { results, searchURL } = await runSearch(searchObj)\n\n this.lastSearchURL = searchURL\n this.lastSearch = searchObj\n this.results = results\n\n return results\n }", "search() {\n this.send('searchWithParams', this.buildSearchQuery());\n }", "function handleSearch(res, uri) {\r\n /* var contentType = 'text/html'\r\n res.writeHead(200, {'Content-type': contentType}) */\r\n searchName = qs.parse(uri.query).search;\r\n if(searchName!=undefined){\r\n\t result = movies.filter(similarName);\r\n\t res.end(result.toString());\r\n }else {\r\n res.end('no query provided');\r\n }\r\n\r\n}", "function performRemoteSearch(data) {\n return swRemoteSearch.search(data);\n }", "function fetchResults(txt) {\n\tconsole.log(searchStr);\n}", "static Search(req, res) {\n new mssql.ConnectionPool(config.config).connect().then((pool) => {\n return pool.request().query(`EXEC sp_search_agent`)\n }).then((fields) => {\n mssql.close()\n let rows = fields.recordset;\n res.json(rows);\n }).catch(err => {\n mssql.close()\n res.json(err)\n })\n }", "function doSearch() {\n twitter.getSearch({\n q: SEARCH_WORDS.join(\" \"),\n lang: \"en\",\n count: 15\n }, (err, response, body) => {\n console.error(\"SEARCH ERROR:\", err);\n }, (data) => {\n var response = JSON.parse(data);\n processTweets(response.statuses);\n });\n}", "function result() {\n\trequestXml = new XMLHttpRequest();\n\trequestXml.open(\"GET\", result_url, true);\n\trequestXml.onreadystatechange = processSearchResponse;\n\trequestXml.send(null);\n}", "function postSearchResults(request, response) {\n // get api url\n let url = 'https://www.googleapis.com/books/v1/volumes?q='\n\n\n let query = request.body.search[0];\n let titleOrAuthor = request.body.search[1];\n\n if (titleOrAuthor === 'title') {\n url += `+intitle:${query}`;\n } else if (titleOrAuthor === 'author') {\n url += `+inauthor:${query}`;\n }\n\n // grab data from api\n superagent.get(url)\n .then(results => {\n // loop through results and construct new book object each iteration\n let books = results.body.items.map(val => {\n return new Book(val);\n });\n // console.log(results.body.items[0]);\n response.render('pages/searches/show.ejs', {\n searchResults: books\n });\n }).catch(err => error(err, response));\n}", "function apiRequestSearch(name, res) {\r\n axios({\r\n url: \"https://api.igdb.com/v4/games\",\r\n method: \"POST\",\r\n headers: {\r\n \"Accept\": \"application/json\",\r\n \"Client-ID\": \"5py1g59uv8cdxn70ejawwm0vz6k7fk\",\r\n \"Authorization\": \"Bearer ycxnh3depzhn9wfz9he4dkggahig81\",\r\n },\r\n data: 'fields name,cover.image_id,cover; limit 5; search \"' + name + '\"; where name != null & cover != null;'\r\n })\r\n .then(response => {\r\n console.log(response.data);\r\n\r\n res.render(\"autosearch\", {\r\n results: response.data\r\n });\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n });\r\n}", "function search() {\r\n\r\n\tif (player)\r\n\t\tplayer.stop();\r\n\t$(\"#output\").css(\"border\",\"auto solid #69605d\");\r\n\r\n\t//clear the previous search data\r\n\tdocument.getElementById(\"output\").innerHTML = \"\";\r\n\r\n\t//get the search query from the search box\r\n\tlet term = document.getElementById(\"query\").value;\r\n\tlet filter = document.getElementById(\"wav\").checked ? \"wav\" : null;\r\n\t//set auth to false because we defined auth = true to be the bearer auth token\r\n\tlet auth = false;\r\n\t//finally pass parameters to the create request function\r\n\tcreateRequest(auth,processSearch,undefined,term,filter);\r\n}", "async function Search__() \r\n {\r\n let cve_id_bein = \"https://cve.circl.lu/api/cve/\";\r\n \r\n const response = await fetch(cve_id_bein + message__);\r\n const data = await response.json();\r\n let json_split = JSON.parse(JSON.stringify(data));\r\n print_search(json_split.id, json_split.summary, json_split.references, json_split.cvss);\r\n }", "async function executeSearch(req) {\n const result = new Array();\n const val = req.body.dados;\n console.log(\"val\", val);\n for (let line in val) {\n for (let tab in MappedTables) {\n //console.log(\"tab\",MappedTables[tab])\n const requestReturnObject = await ADQLDAO.searchStars(val[line].ra, val[line].dec, val[line].name, MappedTables[tab]);\n console.log(\"statusCode\", requestReturnObject.response.statusCode);\n if (requestReturnObject.response.statusCode && requestReturnObject.response.statusCode == 200) {\n result.push(requestReturnObject.body);\n }\n }\n }\n //TODO remover\n await ADQLDAO.writeResultingJson(result);\n return result;\n}", "function handleSearch(res, uri) {\n var contentType = 'text/html'\n res.writeHead(200, {'Content-type': contentType})\n // var input = document.getElementByName(\"search\");\n if (uri.query) {\n var movies = read();\n var params = getParams(uri.query);\n var result = movies.filter(function (movie) {\n return movie.toLowerCase().indexOf(params['search'].toLowerCase()) != -1;\n\n });\n if (result.length > 0) {\n res.end(result.map(function (r) {\n return r.replace(new RegExp('(' + params['search'] + ')', 'ig'), '<span style=\"background-color: black; color:white\">$1</span>');\n }).join('\\n'))\n }\n else {\n\n res.end('no such movie found')\n res.writeHead(302, {'Location': '/'})\n }\n\n console.log(result);\n // PROCESS THIS QUERY TO FILTER MOVIES ARRAY BASED ON THE USER INPUT\n console.log(uri.query)\n console.log(params)\n }\n else {\n res.end('no query provided')\n }\n}", "searchGoogle(searchStr, location2) {\n console.log(\"I'm in search Google on the front-end\");\n console.log(searchStr);\n console.log(location2);\n API.searchGoogle({\n search: searchStr,\n location: location2\n })\n .then(res => {\n console.log(\"I've completed searchYelp and i'm on the client. Here is res\");\n console.log(res);\n })\n .catch(err => console.log(err));\n }", "function runSearch() {\n\tinquirer.prompt({\n\t\tname: \"action\",\n\t\ttype: \"list\",\n\t\tmessage: \"What would you like to do?\",\n\t\tchoices: [\n\t\t\"View Products For Sale\",\n\t\t\"View Low Inventory\",\n\t\t\"Add To Inventory\",\n\t\t\"Add New Product\",\n\t\t]\n\t})\n\t.then(function(answer){\n\t\tswitch(answer.action) {\n\t\t\tcase \"View Products For Sale\":\n\t\t\tproductsForSale();\n\t\t\tbreak;\n\n\t\t\tcase \"View Low Inventory\":\n\t\t\tlowInventory();\n\t\t\tbreak;\n\n\t\t\tcase \"Add To Inventory\":\n\t\t\taddToInventory();\n\t\t\tbreak;\n\n\t\t\tcase \"Add New Product\":\n\t\t\taddNewProduct();\n\t\t\tbreak;\n\t\t}\n\t});\n}", "function processSearchResponse() {\n\tif (requestXml.readyState == 4) {\n\t\tvar resultXml = requestXml.responseXML;\n\t\t\n\t\tk = 0;\n\t\tnames = [];\n\t\ttrackers = [];\n\t\thashes = [];\n\t\t$('RESULT', resultXml).each(function(i) {\n\t\t\tnames[k] = $(this).find(\"NAME\").text();\n\t\t\ttrackers[k] = $(this).find(\"TRACKER\").text();\n\t\t\thashes[k] = $(this).find(\"HASH\").text();\n\t\t\tk++;\n\t\t});\n\t\t\n\t\tsearch_results = [];\n\t\tfor (var j = 0; j < names.length; j++)\n\t\t\tsearch_results.push(names[j]);\n\t\t\n\t\t$('#results_list').sfList('clear');\n\t\t$('#results_list').sfList('option', 'data', search_results);\n\t\t\n\t\tis_list_shown = true;\n\t}\n}", "function searchedData(err, data, response) {\n return data;\n }", "search(value) {\n this.channel.publish(\"start\");\n const results = this.providers.map(provider => provider.search(value));\n Promise.all(results)\n .catch(err => {\n this.channel.publish(\"error\", err);\n this.channel.publish(\"complete\");\n })\n .then(() => this.channel.publish(\"complete\"));\n results.forEach(result => {\n result\n .catch(reason => {\n this.onError(reason);\n })\n .then(result => {\n if (!result)\n throw \"response expected\";\n this.onSuccess(result);\n });\n });\n }", "function runSearch(e) {\n if (e.target.value === \"\") {\n // On empty string, remove all search results\n // Otherwise this may show all results as everything is a \"match\"\n applySearchResults([]);\n } else {\n const tokens = e.target.value.split(\" \");\n const moddedTokens = tokens.map(function (token) {\n // \"*\" + token + \"*\"\n return token;\n })\n const searchTerm = moddedTokens.join(\" \");\n const searchResults = idx.search(searchTerm);\n const mapResults = searchResults.map(function (result) {\n const resultUrl = docMap.get(result.ref);\n return { name: result.ref, url: resultUrl };\n })\n\n applySearchResults(mapResults);\n }\n\n}", "function search() {\n\tif (searchReq.readyState == 4 || searchReq.readyState == 0) {\n\t\tvar str = escape(document.getElementById('query').value);\n\t\tsearchReq.open(\"GET\", 'php/sugestoes.php?search=' + str, true);\n\t\tsearchReq.send(null);\n\t\tsearchReq.onreadystatechange = handleSearchResult;\n\t}\t\t\n}", "function onExecuteSearch(searchInput, resultsContainer)\n{\n var query = searchInput.value;\n\n if(query)\n {\n getResults(query, function(results) {\n\n var resultsList = getResultsList(results);\n\n // Clear existing results container (if applicable)\n var currResultsList = document.getElementById('results');\n if(currResultsList)\n {\n resultsContainer.removeChild(currResultsList);\n }\n\n // Display current results\n resultsContainer.appendChild(resultsList);\n\n });\n }\n}", "function search() {\t\t\t\t\n\t\t\tconsole.log(\"search()\");\n\t\t\tconsole.log(vm.apiDomain);\n\t\n\t\t\tpageScope.loadingStart();\n\t\t\tconsole.log(\"after pageScope.loadingStart()\");\n\t\t\t// call API to search; pass query params (vm.selected)\n\t\t\tLDBSearchAPI.search(vm.apiDomain, function(data) {\n\t\t\t \tconsole.log(\"setting vm.results - data\");\n\t\t\t\tvm.results = data;\n\t\t\t\tvm.selectedIndex = 0;\n\n\t\t\t\tconsole.log(\"calling loadLDB\");\n\t\t\t\tloadLDB();\n\t\t\t\tconsole.log(\"done calling loadLDB\");\n\n\t\t\t\tpageScope.loadingEnd();\n\t\t\t\tsetFocus();\n\n\t\t\t}, function(err) { // server exception\n\t\t\t\tpageScope.handleError(vm, \"Error while searching\");\n\t\t\t\tpageScope.loadingEnd();\n\t\t\t\tsetFocus();\n\t\t\t});\n\t\t}", "function performSearch() {\n // reset the scroll in case they scrolled down to read prior results\n window.scrollTo(0, 0)\n\n fetchSearch(\n // Ensures event properties include \"type\": \"gene\" in search logging.\n 'gene', {\n page: searchParams.page,\n genes: searchParams.genes,\n preset: searchParams.preset\n }).then(results => {\n setSearchState({\n params: searchParams,\n isError: false,\n isLoading: false,\n isLoaded: true,\n results,\n updateSearch\n })\n }).catch(error => {\n setSearchState({\n params: searchParams,\n isError: true,\n isLoading: false,\n isLoaded: true,\n results: error,\n updateSearch\n })\n })\n }", "function runQuery(query) {\n connection.query(query, function (err, res) {\n if (err) throw err;\n for (var i = 0; i < res.length; i++) {\n // console.log response as JSON\n console.log(JSON.stringify(res[i]));\n }\n runSearch();\n });\n}", "function doSearchByTerm(location) {\n app.showPreloader();\n\n ps.searchByTerm(searchTerm, searchByTermSuccess, searchByTermError);\n\n function searchByTermSuccess(data) {\n processResponse(data);\n }\n\n function searchByTermError(data) {\n showErrorState({message: 'Other error'});\n }\n }", "function doSearch(query, searchPageDoc) {\n var url = \"http://movietrailers.apple.com/trailers/home/scripts/quickfind.php?q=\" + query.replace(\" \", \"+\");\n var req = new XMLHttpRequest();\n \n req.onreadystatechange = function() {\n if (req.readyState == 4) {\n resultsJSON = JSON.parse(req.responseText);\n showResults(resultsJSON, searchPageDoc);\n }\n }\n req.open(\"GET\", url, true);\n req.send();\n}", "function getSearch() {\n\n\t\t\t\t\tvar request = $http({\n\t\t\t\t\t\tmethod: \"get\",\n\t\t\t\t\t\turl: \"http://tmb_rpc.qa.pdone.com/search_processor.php?mode=SEARCH&page=1&phrase=e&page_length=100&type=news\",\n\t\t\t\t\t});\n\n\t\t\t\t\treturn( request.then( handleSuccess, handleError ) );\n\n\t\t\t\t}", "function onSearchResponse(response) {\r\n showResponse(response);\r\n}", "function processSearch(response) {\r\n\tlet responseData = JSON.parse(response);\r\n\t searchResults = responseData.results;\r\n\t results_html=\"\";\r\n\tfor (i in responseData.results)\r\n\t\tresults_html+=\"<p onclick=\\\"nameClicked(event)\\\" id=\"+responseData.results[i].id+\" class=results>\"+responseData.results[i].name+\"</p>\";\r\n\r\n\tdocument.getElementById(\"output\").innerHTML=results_html;\r\n}", "function employeesSearch() {\n connection.query(\"SELECT * FROM employeeTracker_db.employee\",\n function(err, res) {\n if (err) throw err\n console.table(res)\n runSearch()\n })\n}", "function performSearch(searchTerm) {\n \n var responseSuccess = function(o) {\n // Get the JSON data from the server and parse it\n var data = JSON.parse(o.responseText);\n \n if (data.errors.length != 0){\n displayErrors(data.errors);\n }\n else{\n \n // Populate the table depending on whether we are filtering or fetching\n sensorListData['result'] = data.result\n\n dataTable.getDataSource().sendRequest(null,\n {success: dataTable.onDataReturnInitializeTable},\n dataTable);\n \n }\n };\n \n var responseFailure = function(o) {\n displayErrors([\"Connection Manager Error: \" + o.statusText]);\n };\n \n var callback = {\n success:responseSuccess,\n failure:responseFailure,\n argument:[]\n };\n\n // Perform the asynchronous request\n var transaction = YAHOO.util.Connect.asyncRequest('POST', '/updateSensorList/', callback, \"search=\"+ searchTerm +\"&xhr=1\");\n \n\n}", "function search(query, cb) {\n\n return fetch(`https://trackapi.nutritionix.com/v2/natural/nutrients`, {\n method: \"post\",\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'x-app-id': '6f812326',\n 'x-app-key': '5e4d76d60110068b62760cfba5754e99',\n 'x-remote-user-id': '1'\n },\n body: JSON.stringify({\n 'query': `${query}`,\n 'num_servings': 1,\n 'use_raw_foods': true, \n })\n })\n .then(checkStatus)\n .then(parseJSON)\n .then(checkSearch)\n .then(cb);\n}", "search(response) {\n return new Promise((resolve, reject) => {\n if ('search_query' in response.entities) {\n response.context.items = response.entities.search_query[0].value;\n delete response.context.missing_keywords;\n } else {\n response.context.missing_keywords = true;\n delete response.context.items;\n }\n return resolve(response.context);\n });\n }", "function fetchResults (searchText) {\n var items = $scope.$parent.$eval(itemExpr),\n term = searchText.toLowerCase();\n if (angular.isArray(items)) {\n handleResults(items);\n } else if (items) {\n setLoading(true);\n $mdUtil.nextTick(function () {\n if (items.success) items.success(handleResults);\n if (items.then) items.then(handleResults);\n if (items.finally) items.finally(function () {\n setLoading(false);\n });\n },true, $scope);\n }\n function handleResults (matches) {\n cache[ term ] = matches;\n if ((searchText || '') !== ($scope.searchText || '')) return; //-- just cache the results if old request\n ctrl.matches = matches;\n ctrl.hidden = shouldHide();\n if ($scope.selectOnMatch) selectItemOnMatch();\n updateMessages();\n positionDropdown();\n }\n }", "function ssearch_do_search() {\n\tvar search_string = d$(\"string_to_search\").value;\n\tif ( !search_string.length )\n\t\treturn;\n\twoas.do_search(search_string);\n}", "function onSearchResponse(response) {\n showResponse(response);\n}", "function onSearchResponse(response) {\n showResponse(response);\n}", "function onSearchResponse(response) {\n showResponse(response);\n}", "function onSearchResponse(response) {\n showResponse(response);\n}", "function executeGeoNamesAPISearch(searchterm, callback) {\n //Reach out to GeoNames API\n\n //Encode for URL\n searchterm = encodeURIComponent(searchterm);\n\n var options = {\n host: 'api.geonames.org',\n path: '/search?name=' + searchterm + '&username=' + settings.geonames.username + '&featureClass=A&featureClass=P&type=json',\n method: 'GET',\n port: 80,\n headers: {\n 'Content-Type': 'application/json'\n }\n };\n\n rest.getJSON(options, function (statusCode, result) {\n common.log(\"got geonames result.\");\n callback(statusCode, result)\n }); //send result back to calling function\n }", "function search(query,parameter){\n\n if (parameter === \"0\" ) {\n\n JobService.GetByName(query)\n .then(function(response){\n\n vm.results = response.data;\n console.log(response.data)\n\n },function(response){\n\n FlashService.Error(\"Fallo en traer resultados para búsqueda por nombre\");\n }); \n }\n\n if (parameter === \"1\"){ \n JobService.GetByTechnology(query)\n .then(function(response){\n\n vm.results = response.data;\n console.log(response.data)\n\n },function(response){\n\n FlashService.Error(\"Fallo en traer resultados para búsqueda por tecnología\");\n });\n }\n\n }", "function onSearchResponse(response) {\n showResponse(response);\n\n}", "function onSearchResponse(response) {\n showResponse(response);\n\n}", "function onSearchResponse(response) {\n showResponse(response);\n\n}", "function onSearchResponse(response) {\n showResponse(response);\n\n}", "async function search(req, res) {\n let searchQuery = req.query.q;\n try {\n let response = await axios.get(\n `http://www.omdbapi.com/?apikey=${process.env.OMDB_API_KEY}&s=${searchQuery}`\n );\n res.json(response.data);\n } catch (err) {\n console.error(err);\n if (err.response) {\n return res.status(err.response.status).json(err.response.data);\n }\n return res.status(500).json({ message: 'Server Error' });\n }\n}", "function search_for_something(base, start, query, type){\n\t\n\tvar condition = true;\n\n\tvar start = start;\n\n\tvar rows = 10;\n\n\tvar total;\n\n\tvar final = \"\";\n\n\tconst url = base + \"/api/search?q=*&type=\" + type + \"&start=\" + String(start);\n\n\thttps.get(url, res => {\n\n \t\tres.setEncoding(\"utf8\");\n \t\tlet body = \"\";\n \t\tres.on(\"data\", data => {\n \t\tbody += data;\n \t\t});\n \t\tres.on(\"end\", () => {\n \t\tbody = JSON.parse(body);\n\n \t\ttotal = body['data']['total_count'];\n\n\t\t\tvar i = 0;\n\n\t\t\twhile( true ){\n\t\t\t\ttry{\n\t\t\t\t\tif( body['data']['items'][i]['name'] == query ){\n\t\t\t\t\t\t//console.log( \"- \" + body['data']['items'][i]['name'] + \"(\" + body['data']['items'][i]['type'] + \")\" + \" url: \" + body['data']['items'][i]['url']);\n\t\t\t\t\t\tfinal = String(body['data']['items'][i]['url']);\n\t\t\t\t\t\tconsole.log(final);\n\t\t\t\t\t\t//console.log(body['data']['items'][i]['url']);\n\t\t\t\t\t\tstart = total;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\ti+=1;\n\t\t\t\t}\n\t\t\t\tcatch(TypeError){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstart += rows;\n\n\t\t\tif( start < total ){\n\n\t\t\t\tsearch_for_something(base, start, query);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//return console.log(final);\n\t\t\t\t//return(final);\n\t\t\t\treturn 0;\n\t\t\t\t\n\t\t\t}\n\n \t\t});\n\t});\n\n\n}", "function onSearchResponse(response) {\n showResponse(response);\n }", "function doSearch() {\n var resultCont = document.getElementById(\"resultsContain\");\n var name = collectSelections(\"nameDrop\");\n var location = collectSelections(\"locDrop\");\n var grabbers = collectSelections(\"entitiesDrop\");\n var resistance = collectSelections(\"resistanceDrop\");\n\n var url = document.URL + \"/search.json\";\n var cb = function(data){\n console.log(\"it's here: \" + data);\n var datalen = data.length;\n var i;\n var datum;\n for (i=0; i< datalen; i++){\n datum = data[i];\n div = document.createElement('div');\n div.className= \"result\";\n div.innerHTML = buildResult(datum.url, datum.name, datum.desc, datum.grabbers, datum.resistance);\n resultCont.appendChild(div);\n }\n\n }\n var fd = new FormData();\n buildForm(name, \"name\", fd);\n buildForm(location, \"location\", fd);\n buildForm(grabbers, \"grabbers\", fd);\n buildForm(resistance, \"resistance\", fd);\n // send it to the server\n var req = new XMLHttpRequest();\n req.open('POST', '/search.json', true);\n req.addEventListener('load', function(e){\n var content = req.responseText;\n var data = JSON.parse(content);\n cb(data);\n if (resultCont.innerHTML===\"\"){\n resultCont.innerHTML = \"No Results Matched Your Search\"\n }\n if(resultCont.style.display === \"none\" || resultCont.style.display ===\"\"){\n $(resultsContain).slideToggle();\n }\n }, false);\n req.send(fd);\n}", "function handleSearch() {\n if (!searchAvailable) return;\n\n setSearchResults(null);\n setSearchPending(true);\n setSearchError(false);\n\n // Get the date in the proper format\n const date = moment(selectedDate).format('L');\n const hour = moment(selectedHour).format('HH:mm:ss');\n\n const body = {\n \"route_id\": selectedLine.route_id,\n \"direction_id\": selectedLine.direction_id,\n \"departure_stop_id\": origin.stop_id,\n \"arrival_stop_id\": destination.stop_id,\n \"datetime\": date + \", \" + hour\n };\n\n fetch(\"https://dublin-bus.net/predict/\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(body),\n })\n .then((res) => {\n if (!res.ok) {\n throw Error();\n }\n return res.json();\n })\n .then((json) => {\n setSearchPending(false);\n setSearchResults(json);\n })\n .catch((err) => {\n setSearchPending(false);\n setSearchError(true);\n });\n }", "function searchRequestSubmit () {\n var query = $('.query', self.$form).val();\n\n youtube.search(query, function (response) {\n self.results.load(query, response);\n });\n\n return false;\n }", "function search() {\n\ttry {\n\t\tvar data = getDataSearch();\n\t\t$.ajax({\n\t\t\ttype \t\t: 'POST',\n\t\t\turl \t\t: '/stock-manage/input-output/search',\n\t\t\tdataType \t: 'json',\n\t\t\tdata \t\t: data,\n\t\t\tloading \t: true,\n\t\t\tsuccess: function(res) {\n\t\t\t\tif (res.response) {\n\t\t\t\t\t$('#input-output-list').html(res.html);\n\t\t\t\t\t//sort clumn table\n\t\t\t\t\t$(\"#table-stock-manager\").tablesorter();\n\t\t\t\t\t_setTabIndex();\n\t\t\t\t}\n\t\t\t}\n\t\t}).done(function(res){\n\t\t\t_postSaveHtmlToSession();\n\t\t});\n\t} catch (e) {\n alert('search' + e.message);\n }\n}", "function getSearchResults(searchTerm) {\n fetch('https://thinksaydo.com/tiyproxy.php?https://openapi.etsy.com/v2/listings/active?api_key=h9oq2yf3twf4ziejn10b717i&keywords=' + encodeURIComponent(searchTerm) + '&includes=Images,Shop')\n .then(response => response.json())\n .then(data => {\n searchResults = data;\n \n console.log(searchResults);\n\n renderResultCards();\n });\n}", "function handleSearchResponseMsg(msg, id, ip_address, pending_results, routing_table, awaiting_acks, socket) {\n var response = new Buffer(JSON.stringify(msg));\n if (msg.word in pending_results) {\n pending_results[msg.word] = pending_results[msg.word].concat(msg.response);\n }\n route(msg.node_id, id, routing_table, function(route_id) {\n if (route_id !== id) {\n send(response, route_id, id, routing_table, awaiting_acks, socket);\n }\n });\n}", "function doSearch(params, res, callback) {\n\n var filtered = JSON.parse(params[4]);\n var applyFilter = (filtered.fields.length > 0);\n\n var path = config.es.server + '/';\n path += params[0];\n path += (params[1] !== '') ? '/' + params[1] : '';\n path += '/_search';\n logger.debug(path, 'doSearch path');\n\n var q = {};\n switch (params[3]) {\n case '':\n if (applyFilter) {\n q = JSON.parse('{\\\"from\\\":0,\\\"size\\\":1000,\\\"query\\\":{\\\"filtered\\\":{\\\"query\\\":{\\\"match_all\\\":{}},\\\"filter\\\":{}}},\\\"sort\\\":{},\\\"aggs\\\":{}}');\n } else {\n q = JSON.parse('{\\\"from\\\":0,\\\"size\\\":1000,\\\"query\\\":{\\\"match_all\\\":{}},\\\"sort\\\":{},\\\"aggs\\\":{}}');\n }\n break;\n default:\n if (applyFilter) {\n q = JSON.parse('{\\\"from\\\":0,\\\"size\\\":1000,\\\"query\\\":{\\\"filtered\\\":{\\\"query\\\":{\\\"wildcard\\\":{\\\"' + params[2] + '\\\":\\\"*' + params[3].toLowerCase() + '*\\\"}},\\\"filter\\\":{}}},\\\"sort\\\":{},\\\"aggs\\\":{}}');\n } else {\n q = JSON.parse('{\\\"from\\\":0,\\\"size\\\":1000,\\\"query\\\":{\\\"wildcard\\\":{\\\"' + params[2] + '\\\":\\\"*' + params[3].toLowerCase() + '*\\\"}},\\\"sort\\\":{},\\\"aggs\\\":{}}');\n }\n }\n\n // load the facets\n var facets = [];\n _.find(global.ds.index, function (index) {\n if (index.name === params[0]) {\n for (var i=0; i < index.types.length; i++) {\n if (index.types[i].type === params[1]) {\n var fields = index.types[i].fields;\n for (var f=0; f < fields.length; f++) {\n if (fields[f].type !== 'nested') {\n if (fields[f].facet) {\n facets.push({\n id: fields[f].id,\n type: fields[f].type\n });\n }\n } else {\n var nestedFields = fields[f].fields;\n for (var n=0; n < nestedFields.length; n++) {\n if (nestedFields[n].facet) {\n facets.push({\n id: fields[f].id + '.' + nestedFields[n].id,\n type: nestedFields[n].type\n });\n }\n }\n }\n }\n }\n }\n }\n });\n\n // create the facet object\n var facetObject = {};\n for (var f=0; f<facets.length; f++) {\n switch (facets[f].type) {\n case 'string':\n facetObject[facets[f].id] = JSON.parse('{' + '\\\"terms\\\":{' + '\\\"field\\\":\\\"' + facets[f].id + '.raw\\\", \\\"size\\\": 0, \\\"order\\\":{\\\"_count\\\":\\\"desc\\\"}}}');\n break;\n case 'float':\n case 'integer':\n case 'long':\n case 'date':\n facetObject[facets[f].id] = JSON.parse('{' +\n '\\\"stats\\\": { ' +\n '\\\"field\\\":\\\"' + facets[f].id + '\\\"' +\n '}' +\n '}');\n break;\n }\n }\n\n // create the sort object\n if (params[5] && params[5].hasOwnProperty('field')) {\n var sort = [];\n var sortObject = {};\n sortObject[params[5].field] = {order: params[5].asc };\n sort.push(sortObject);\n q.sort = sort;\n }\n\n // assign the object to aggs\n if (applyFilter) {\n q.aggs = facetObject;\n\n // generate the filter format\n var filterObj = {\n \"bool\": {\n \"must\": []\n }\n };\n for (var fl=0; fl < filtered.fields.length; fl++) {\n var field = filtered.fields[fl];\n switch (field.type) {\n case 'text':\n if (field.values.length === 1) {\n filterObj.bool.must.push(\n JSON.parse('{\"term\":{\"' + field.field + '.raw\":\"' + field.values[0] + '\"}}')\n );\n } else {\n var valueList = '';\n for (var v = 0; v < field.values.length; v++) {\n valueList += '\\\"' + field.values[v] + '\\\"';\n if (v !== field.values.length - 1) {\n valueList += ',';\n }\n }\n filterObj.bool.must.push(\n JSON.parse('{\"terms\":{\"' + field.field + '.raw\":[' + valueList + ']}}')\n );\n }\n break;\n case 'number':\n case 'date':\n filterObj.bool.must.push(\n JSON.parse('{\"range\":{\"' + field.field + '\": { \"gte\":' + field.values[0] + ', \"lte\":' + field.values[1] + '}}}')\n );\n break;\n }\n }\n q.query.filtered.filter = filterObj;\n\n } else {\n q.aggs = facetObject;\n }\n\n logger.debug(q, 'doSearch query');\n\n request({\n method: 'POST',\n uri: path,\n gzip: true,\n json: true,\n body: q\n },\n function (err, res, body) {\n if (err) {\n logger.error(err, 'ERROR: doSearch');\n callback(err, {});\n } else {\n var searchResult = body;\n logger.info(searchResult, 'search results');\n getIndexMapping(params[0], params[1], function(err, result) {\n if (!err) {\n if (result.body.length > 2) {\n searchResult._meta = JSON.parse(result.body)[params[0]].mappings[params[1]]._meta;\n var results = formatSearchResultsForTable(searchResult, facets, params);\n callback(null, results);\n }\n }\n });\n\n }\n });\n }", "function search(searchString) {\n if (!searchString || (searchString && searchString.length === 0)) {\n vscode.window.showErrorMessage(\"No search string was entered.\");\n return;\n }\n\n //# async waterfall for control flow\n async.waterfall(\n [\n callback => callback(null, searchString),\n fetchResults,\n processResults,\n displayResults\n ],\n (err, result) =>\n console.log(\n `Error: ${JSON.stringify(err, null, 4)}, Result: ${JSON.stringify(\n result,\n null,\n 4\n )}`\n )\n );\n //# async waterfall for control flow\n}", "function onSearchResponse(response) {\n\t\tconsole.log(\"FUNCTION: onSearchResponse()\");\n\t\tshowResponse(response);\n\t}", "function search(pattern, callback) { \n var url= \"/search\";\n if( pattern ) url+= \"?name=\"+pattern; \n get_from_server( url, function(error, result) {\n sys.puts(result); \n callback();\n });\n}", "function search(keyword, start_date, start_time, end_date, end_time, category, location){\n\n let searchRequest = {\"lost_or_found\": 0, // 0 == found\n \"keyword\": keyword,\n \"start_date\": start_date,\n \"start_time\": start_time,\n \"end_date\": end_date,\n \"end_time\": end_time,\n \"category\": category,\n \"location\":location}\n \n let xhr = new XMLHttpRequest();\n xhr.open(\"POST\",\"/search\");\n xhr.setRequestHeader('Content-Type', 'application/json')\n \n xhr.addEventListener(\"load\", function() {\n if (xhr.status == 200) {\n // Do something here with the results...\n console.log(xhr.responseText)\n \n var entries = JSON.parse(xhr.responseText)\n \n for(var i = 0; i < entries.length; i++){\n addNewResult(entries[i].title, \n entries[i].photo_url,\n entries[i].category,\n entries[i].location,\n entries[i].date,\n entries[i].description);\n }\n \n } else {\n console.log(\"ERROR IN search: \", xhr.responseText);\n }\n });\n xhr.send(JSON.stringify(searchRequest));\n}", "function post_search(req, res) {\n console.log(req.body);\n Model3d.find_by_string(req.body.search_bar, function(err, docs) {\n if (err) {\n res.send(\"something went wrong\");\n }\n else {\n res.render('navigation/search', {models: docs, selected: \"Search Results\" });\n }\n });\n}", "function query_search(search_str, resolve,reject, callback,type,filters) {\n console.log(\"Searching with bing for \"+search_str);\n if(!filters) filters=\"\";\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&filters=\"+filters+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "function query_search(search_str, resolve,reject, callback,type,filters) {\n console.log(\"Searching with bing for \"+search_str);\n if(!filters) filters=\"\";\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&filters=\"+filters+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "function query_search(search_str, resolve,reject, callback,type,filters) {\n console.log(\"Searching with bing for \"+search_str);\n if(!filters) filters=\"\";\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&filters=\"+filters+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "function query_search(search_str, resolve,reject, callback,type,filters) {\n console.log(\"Searching with bing for \"+search_str);\n if(!filters) filters=\"\";\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&filters=\"+filters+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "function query_search(search_str, resolve,reject, callback,type,filters) {\n console.log(\"Searching with bing for \"+search_str);\n if(!filters) filters=\"\";\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&filters=\"+filters+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "function query_search(search_str, resolve,reject, callback,type,filters) {\n console.log(\"Searching with bing for \"+search_str);\n if(!filters) filters=\"\";\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&filters=\"+filters+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "function query_search(search_str, resolve,reject, callback,type,filters) {\n console.log(\"Searching with bing for \"+search_str);\n if(!filters) filters=\"\";\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&filters=\"+filters+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "function query_search(search_str, resolve,reject, callback,type,filters) {\n console.log(\"Searching with bing for \"+search_str);\n if(!filters) filters=\"\";\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&filters=\"+filters+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "function query_search(search_str, resolve,reject, callback,type,filters) {\n console.log(\"Searching with bing for \"+search_str);\n if(!filters) filters=\"\";\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&filters=\"+filters+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "function searchIt() {\n var term = input.value();\n // Loop through every year\n for (var i = 0; i < total; i++) {\n var year = start + i;\n // Make the API query URL\n var url = makeURL(term, year);\n // Run the query and keep track of the index\n goJSON(url, i);\n }\n}", "function doSearch(query, pageNum, locale, category, catOnly) {\n cleanOut(oneSource);\n cleanOut(tempSource);\n var city = $('#city-state').val();\n if (catOnly == 'yes') {\n var cat = parseInt(category, 10);\n runWPAPI(locale, cat, city);\n } else {\n runWPAPI(locale, cat, city);\n }\n var cleanQuery = query.replace(/\\s/g, '+');\n var proxyAPI = 'XXXXXXXXX';\n if ($('#city').val() && $('#state').val()) {\n var city = $('#city').val();\n var cityCleanUp = city.replace(/\\s/g, '+');\n var state = $('#state').val();\n var queryLocale = \"&l=\" + cityCleanUp + \"%2C+\" + state;\n var target2API = proxyAPI + \"&co=\" + locale + \"&sort=date&fromage=90&limit=25&start=\" + pageNum + \"&q=\" + cleanQuery + queryLocale;\n var targetAPIALT = proxyAPI + \"&co=\" + locale + \"&sort=date&fromage=90&limit=25&q=\" + cleanQuery + queryLocale;\n } else {\n var target2API = proxyAPI + \"&co=\" + locale + \"&sort=date&fromage=90&limit=25&start=\" + pageNum + \"&q=\" + cleanQuery;\n var targetAPIALT = proxyAPI + \"&co=\" + locale + \"&sort=date&fromage=90&limit=25&q=\" + cleanQuery;\n }\n getAPIData(target2API + \"&callback=?\", function(returndata) {\n var data = returndata;\n //var dataTempFiltered = [];\n var totalPull = Math.round(data.totalResults / 25);\n if (totalPull > 50) {\n // loop\n for (i = 0; i < 50; i++) {\n var targetNum = 25 * i;\n var numTrack = i;\n if (numTrack == 49) {\n getAPIData(targetAPIALT + \"&start=\" + targetNum + \"&callback=?\", function(returndata) {\n var data = returndata;\n compileAPIData(data);\n checkGlobalGym();\n })\n } else {\n getAPIData(targetAPIALT + \"&start=\" + targetNum + \"&callback=?\", function(returndata) {\n var data = returndata;\n compileAPIData(data);\n })\n }\n }\n //end loop\n } else {\n //loop\n for (i = 0; i < totalPull; i++) {\n var targetNum = 25 * i;\n var numTrack = i;\n if (numTrack == (totalPull - 1)) {\n //console.log('final api under 40');\n getAPIData(targetAPIALT + \"&start=\" + targetNum + \"&callback=?\", function(returndata) {\n var data = returndata;\n compileAPIData(data);\n checkGlobalGym();\n })\n } else {\n //console.log('run api under 40');\n getAPIData(targetAPIALT + \"&start=\" + targetNum + \"&callback=?\", function(returndata) {\n var data = returndata;\n compileAPIData(data);\n })\n }\n }\n //end loop\n }\n })\n async function checkGlobalGym() {\n setupDataNew(tempSource);\n }\n}", "function TreeViewPerformSearchCallback(res){\n\tif(res && !res.error){\n\t\teval('treeview = ' + res.treeviewname + ';');\n\t\tvar container = treeview.getElement(treeview.prefix + '_searchresultcontainer');\n\t\tcontainer.innerHTML = treeview.searchclosecode;\n\t\tif(res.results.length){\n\t\t\tvar i;\n\t\t\tfor(i=0;i<res.results.length;i++){\n\t\t\t\tvar result = res.results[i];\n\t\t\t\tvar descriptions = Base64.decode(result.descriptions);\n\t\t\t\tvar parts = descriptions.split(res.separator);\n\t\t\t\tvar j;\n\t\t\t\tvar html = '<div class=\"trv_searchresultitem\" onclick=\"' + res.treeviewname + '.BeginOpenPath(\\'' + result.ids + '\\',\\''+res.separator+'\\');\">';\n\t\t\t\tfor(j=0;j<parts.length;j++){\n\t\t\t\t\thtml += '<ul>' + parts[j];\n\t\t\t\t}\n\t\t\t\tfor(j=0;j<parts.length;j++){\n\t\t\t\t\thtml += '</ul>';\n\t\t\t\t}\n\t\t\t\thtml += '</div>';\n\t\t\t\tcontainer.innerHTML += html;\n\t\t\t}\n\t\t}else{\n\t\t\tcontainer.innerHTML += '<div class=\"\">Sorry, no results found for your search term.</div>';\n\t\t}\n\t}else{\n\t\talert(res.error);\n\t\tif(res.treeviewname){\n\t\t\teval('treeview = ' + res.treeviewname + ';');\n\t\t\ttreeview.getElement(treeview.prefix + '_searchresultcontainer').style.display = 'none';\n\t\t}\n\t}\t\n}", "function search(params, returnResult = false) {\n\n if(!params) {\n params = {\n terms: document.getElementById('terms').value,\n limitByNum: document.getElementById('limitByNum').checked,\n num: document.getElementById('num').value,\n starred: document.getElementById('starred').checked,\n tags: document.getElementById('tags').value.split(' ').map(tag => { if(tag!='') { return '@'+tag } else { return '' } }).join(' '),\n useAnd: document.getElementById('useAnd').checked,\n filterEarlier: document.getElementById('filterEarlier').value,\n filterLater: document.getElementById('filterLater').value\n }\n }\n\n return new Promise((resolve, reject)=>{\n postFromButton('searchButton', 'Searching...', '/jrnlAPI/search',\n params,\n (data)=>{\n if(!data.success && data.stderr) {\n showModal('Error', data.stderr)\n reject()\n return\n }\n\n if(returnResult) {\n resolve(data)\n return\n }\n\n let tags = Object.keys(data.tags)\n let entries = data.entries\n if (entries) {\n document.getElementById('searchResults').innerHTML = printEntries(entries, tags)\n \n removeMarkers()\n let markers = entries.map(entry => { return createMarker(entry, tags) })\n markers = markers.filter(marker => marker != null)\n markers.forEach(marker => { addMarker(marker) })\n centerMap(markers)\n\n resolve(data)\n return\n }\n })\n })\n}", "function onRequest(context) {\n \n var request = context.request;\n \tif (request.method === 'GET') {\n \t\n \t\tvar searchname = request.parameters.searchname;\n \t\tlog.debug(\"**** Search Query Start **** \",\"- Start -\"+searchname);\n\n \t\tvar result;\n \t\t\n \t\tif(searchname==\"customerfiles\"){\n \t\t\tresult=customerfiles(request);\n \t\t}\n// \t\telse if(searchname==\"totalsalesbylocationmorrisons\"){\n// \t\t\tresult=total_sales_by_location_morrisons(request); // OLD \n// \t\t}\n \t\telse if(searchname==\"totalsalesbylocation\"){\n \t\t\tresult=total_sales_by_location(request);\n \t\t}\n \t\telse if(searchname==\"toppartsbyvalue\"){\n \t\t\tresult=top_parts_by_value(request);\n \t\t}\n \t\telse if(searchname==\"toppartsbyquantity\"){\n \t\t\tresult=top_parts_by_quantity(request);\n \t\t} \t\t\n \t\telse{\n \t\t\tresult=\"Error: Invalid search name parameter\";\n \t\t}\n\n \t\tcontext.response.write(JSON.stringify(result)); //JSON.stringify(searchResult)\n \t\t//context.response.write(customer); //JSON.stringify(searchResult)\n\n \t\t\n \t} else {\n \t\t// POST\n\t\t}\n }", "function query_search(search_str, resolve,reject, callback,type) {\n console.log(\"Searching with bing for \"+search_str);\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },\n ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "function query_search(search_str, resolve,reject, callback,type) {\n console.log(\"Searching with bing for \"+search_str+\", try_count[\"+type+\"]=\"+my_query.try_count[type]);\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "afterSearch(result, params) {\n console.log(\"Hereeeeeeeeeee 12\");\n }", "function search() {\n \n var xhr = new XMLHttpRequest();\n var uri = encodeURI('http://www.omdbapi.com/?S='+ document.getElementById('search_value').value + '&y=&plot=short&r=json')\n\n xhr.open('GET', uri, true);\n \n xhr.onreadystatechange = function() {\n if (xhr.readyState == 4) {\n var json_parse = JSON.parse(xhr.response)\n search_works(json_parse)\n }\n }\n\n xhr.send(null);\n \n}", "function query_search(search_str, resolve,reject, callback,type) {\n console.log(\"Searching with bing for \"+search_str);\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "function query_search(search_str, resolve,reject, callback,type) {\n console.log(\"Searching with bing for \"+search_str);\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "function query_search(search_str, resolve,reject, callback,type) {\n console.log(\"Searching with bing for \"+search_str);\n var search_URIBing='https://www.bing.com/search?q='+\n encodeURIComponent(search_str)+\"&first=1&rdr=1\";\n GM_xmlhttpRequest({method: 'GET', url: search_URIBing,\n onload: function(response) { callback(response, resolve, reject,type); },\n onerror: function(response) { reject(\"Fail\"); },ontimeout: function(response) { reject(\"Fail\"); }\n });\n }", "static search(req, dynamoDb, callback) {\n let string = req.query.search;\n let qstring = 'title:' + string + ' OR ' + 'content:' + string + ' OR ' + 'author:' + string;\n if (req.query.category) {\n qstring = 'category:' + req.query.category + ' AND (' + qstring + ')';\n }\n solr.search('q='+ qstring).then(x => {\n let posts = x.response.docs.map(a => a.id);\n let ps = posts.map(p => Posts.idToPost(p, dynamoDb));\n Promise.all(ps).then(r => {\n let ar = r.map(a => a.Item).filter(a => !a.staging);\n ar.map(p => {\n p.content = markdown.render(p.content);\n p.title = markdown.renderInline(p.title);\n });\n const left = ar.slice(0, ar.length / 2);\n const center = ar.slice(ar.length / 2);\n callback('render', 'posts/subindex', {heading: 'Search results',\n left: left, center: center});\n });\n }).catch(e => callback('render', 'error', {error: e}));\n }", "function handleSearch(data){\n\tlet output = data.results;\n\tif (output.length === 0) {\n\t\t$('.results-container').html('');\n\t\t$('body').append(`<div class=\"notify\"><h2>Sorry. We didn't find that show. Please try another.</h2>\n\t\t\t<p class=\"okay\"><strong>OK</strong></p></div>`);\n\t\tnotification();\n\t} else {\n\t\t$('.results-container').html('');\n\t$('.main-head').css('margin', '0%').css('opacity', '0').css('z-index', '-3').css('transition', '1500ms');\n\t$('#search-field').css('margin-top', '-4%').css('transition', '1500ms');\n\t$('body').append(`<div class=\"notify\"><h2>Please select which show you were looking for</h2><p class=\"okay\"><strong>OK</strong></p></div>`);\n\tnotification();\n\tfor (let i = 0; i < output.length; i++) {\n\t\tlet resultName = output[i].name;\n\t\tif (output[i].name.length > 15) {\n\t\t\t\tresultName = output[i].name.substring(0, 15) + '...';\n\t\t}\n\t\t$('.results-container').append(`<div class=\"result-item\" name=\"${output[i].name}\"> \n\t\t\t <p class=\"result-title\">${resultName}</p><br> \n\t\t\t<img id=\"${output[i].id}\" alt=\"${resultName} image\" src=\"https://image.tmdb.org/t/p/w200_and_h300_bestv2/${output[i].poster_path}\"></div>`);\n\t}\n\n\t// Removes initial search results that don't have recommendations\n\tfor (let k = 0; k < output.length; k++) {\n\t\tfunction emptyRecs(){\n\t\t$.get(\n\t\t\t'https://api.themoviedb.org/3/tv/'+ output[k].id + '/recommendations',\n\t\t\t{\n\t\t\t\tapi_key: '08eba60ea81f9e9cf342c7fa3df07bb6',\n\t\t\t},\n\t\t\thandleNullRecs\n\t\t\t)\n\t\t}\n\n\t\tfunction handleNullRecs(e){\n\t\t\tlet imgID = \"#\" + output[k].id;\n\t\t\tif (e.results.length === 0) {\n\t\t\t\t$(imgID).parent().remove();\n\t\t\t}\n\t\t}\n\t\temptyRecs();\n\t}\n\t$('.result-item img').click(recommendations);\n}\n\t}", "function search(_event) {\r\n let inputName = document.getElementById(\"searchname\");\r\n let inputMatrikel = document.getElementById(\"searchmatrikel\");\r\n let query = \"command=search\";\r\n query += \"&nameSearch=\" + inputName.value;\r\n query += \"&matrikelSearch=\" + inputMatrikel.value;\r\n console.log(query);\r\n sendRequest(query, handleSearchResponse);\r\n }", "function basicsearch() {\n searchString = document.basicForm.basicText.value;\n searchTerms = searchString.split(/\\s/);\n\n putHeader();\n\n findResults();\n putResults();\n\n putFooter();\n\n writeResultsPage();\n}", "function searchSpotify(){ \r\n console.log(\"got here 2\")\r\n var query = $search.val();\r\n console.log(\"got here 3 value of query = ...\")\r\n console.log(query);\r\n console.log(\"------\");\r\n \r\n// var searchType = $radioBtn.val();\r\n var searchType = $(\"input:radio[name=qryType]:checked\").val();\r\n var params = {q: query, type: searchType};\r\n \r\n $.get(searchURL, params).done(onDataReceive).fail(onError)\r\n \r\n }", "function search() {\t\t\t\t\n\t\t\tconsole.log(vm.apiDomain);\n\t\t\n\t\t\tpageScope.loadingStart();\n\t\t\t\n\t\t\tNonMutantCellLineSearchAPI.search(vm.apiDomain, function(data) {\n\t\t\t\tvm.results = data;\n\t\t\t\tvm.selectedIndex = 0;\n\t\t\t\tif (vm.results.length > 0) {\n\t\t\t\t\tloadObject();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tclear();\n\t\t\t\t}\n\t\t\t\tpageScope.loadingEnd();\n\t\t\t\tsetFocus();\n\t\t\t}, function(err) {\n\t\t\t\tpageScope.handleError(vm, \"API ERROR: NonMutantCellLineSearchAPI.search\");\n\t\t\t\tpageScope.loadingEnd();\n\t\t\t\tsetFocus();\n\t\t\t});\n\t\t}" ]
[ "0.7034373", "0.69414365", "0.69123495", "0.690377", "0.6849272", "0.6842155", "0.66532737", "0.66355866", "0.65946805", "0.6591839", "0.65762144", "0.65745604", "0.65614265", "0.6537782", "0.6533944", "0.6489339", "0.6484392", "0.6483958", "0.6464243", "0.64509946", "0.6436044", "0.6426313", "0.64205945", "0.64117306", "0.64104", "0.64075255", "0.64063054", "0.6405443", "0.6385047", "0.63647425", "0.6362594", "0.63586044", "0.63530236", "0.63449574", "0.6333687", "0.6328014", "0.63106227", "0.63102067", "0.6302891", "0.6302365", "0.62801677", "0.6279495", "0.62768054", "0.62646115", "0.6257027", "0.62504244", "0.6247377", "0.6241802", "0.6239558", "0.6232331", "0.6232331", "0.6232331", "0.6232331", "0.62301564", "0.6229089", "0.6227317", "0.6227317", "0.6227317", "0.6227317", "0.62105334", "0.62103933", "0.62053806", "0.620266", "0.6201827", "0.61978924", "0.6197438", "0.61936295", "0.6187464", "0.61873406", "0.6182754", "0.61794996", "0.61788744", "0.61744297", "0.6165637", "0.61650616", "0.61650616", "0.61650616", "0.61650616", "0.61650616", "0.61650616", "0.61650616", "0.61650616", "0.61650616", "0.6163283", "0.6152174", "0.6151174", "0.6150221", "0.6149009", "0.61486477", "0.61448765", "0.61411464", "0.6137602", "0.6133006", "0.6133006", "0.6133006", "0.61323255", "0.6123227", "0.61221975", "0.61208373", "0.6117336", "0.61090153" ]
0.0
-1
show error message if they haven't at least selected one data type
function error(){ $('#data-tables').html('<h4 class="text-danger">Specify at least one search category.</h4>'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function typeOnChange () {\n var type=$('#type').val();\n //Error\n var type_error=$('#type_error');\n //Error Msg\n var msgSelect=\"NONE Selected\";\n\n if(type==0){\n type_error.text(msgSelect);\n type_error.show();\n }else{\n\n type_error.hide();\n\n }\n\n}", "function typeOnChanges() {\n var type = $('#type').val();\n //Error\n var type_error = $('#type_error');\n //Error Msg\n var msgSelect = \"NONE Selected\";\n\n if (type == 0) {\n type_error.text(msgSelect);\n type_error.show();\n } else {\n\n type_error.hide();\n\n }\n\n}", "unknownType() {\n console.log(this.type, this.type !== 'free', this.type !== 'premium');\n if (this.type !== 'free' && this.type !== 'premium') {\n throw new Error('type column has to be free or premium.');\n }\n }", "function showFileTypeErrorMessage() {\n toaster.pop('info', 'File type unacceptable', 'Only accept file types: ' + vm.fileTypes);\n }", "function validateMaptypes() {\n var maptypes = $('input[name^=\"maptype\"]');\n var help_block = $('#help-block');\n var id = 'maptypes';\n if (maptypes.filter(':checked').length == 0) {\n maptypes.closest('.form-group').validationState('has-error');\n help_block.textState('text-danger').text('No map types selected').attr('data-source', id);;\n } else {\n maptypes.closest('.form-group').validationState();\n if (help_block.attr('data-source') == id) {\n help_block.text('');\n }\n }\n}", "_validateType() {\n if (NOVO_INPUT_INVALID_TYPES.indexOf(this._type) > -1) {\n throw new Error(`Invalid Input Type: ${this._type}`);\n }\n }", "function instanceAddCheckType() {\n var instanceType = $(instanceAddPage.typeFilter).val();\n var validInstanceTypes = $(instanceAddPage.typeSelect + ' option').map(function() { return $(this).val(); });\n\n if($.inArray(instanceType, validInstanceTypes) === -1) {\n instanceAddDisplayErrorMsg(\"Instance type must be valid.\");\n } else {\n instanceAddClearErrorMsg();\n instanceAddSubmitInstance();\n }\n }", "function dataTypes(val) {\n var msg = \"\"; // Feedback Message\n\n switch (typeOf(val)) {\n // If type of data is string\n case 'string':\n if(val == ''){\n msg = 0;\n }else{\n msg = val.length;\n }\n break;\n //If type of data is null, it falls through that of undefined. They have the same feedback message.\n case 'null':\n case 'undefined':\n msg = \"no value\";\n break;\n //If type of data is boolean\n case 'boolean':\n if(val == true){\n msg = true;\n }else{\n msg = false;\n }\n break;\n //If type of data is number\n case 'number':\n if(val < 100){\n msg = \"less than 100\";\n }else if(val == 100){\n msg = \"equal to 100\";\n }else{\n msg = \"more than 100\";\n }\n break;\n //If type of object is array\n case 'array':\n // If the array does not contain upto 3 items\n if(val.length < 3){\n val = \"undefined\"; // Set the array to undefined\n msg = val.valueType;\n // If the array is empty\n }else if(val.length == 0){\n val = \"undefined\"; // Set the array to undefined\n msg = val.valueType;\n }else{\n msg = val[2]; // Otherwise if the array has more than 3 items then send the third item as the feedback message\n }\n break;\n // If the type of object is function\n case 'function':\n val(true);\n return \"called callback\";\n break;\n default:\n console.log(\"You must supply a value\");\n }\n return msg;\n}", "function checkInconsistentFieldTypes(fields, layers) {\n fields.forEach(function(key) {\n var types = findFieldTypes(key, layers);\n if (types.length > 1) {\n stop(\"Inconsistent data types in \\\"\" + key + \"\\\" field:\", types.join(', '));\n }\n });\n }", "function showError(type, text) {}", "function checkType(strng) {\n switch(opts.type) {\n case 'email':\n var filter=/^[a-zA-Z0-9._]+@.+\\..{2,3}$/;\n if (!(filter.test(strng))) {\n if (opts['messages']['email']) {\n errors.push (opts['messages']['email']);\n } else {\n errors.push (opts['title'] + ' invalid email address');\n }\n }\n break;\n case 'phone':\n strng = strng.replace(/[\\(\\)\\.\\-\\ ]/g, '');\n var filter= /^[0-9+]+$/;\n if (!(filter.test(strng))) {\n if (opts['messages']['number']) {\n errors.push (opts['messages']['number']);\n } else {\n errors.push (opts['title'] + ' must be a valid phone number');\n }\n }\n //strip out acceptable non-numeric characters\n if (isNaN(parseInt(strng))) {\n if (opts['messages']['length']) {\n errors.push (opts['messages']['phone']);\n } else {\n errors.push (opts['title'] + ' invalid phone');\n }\n }\n break;\n case 'comment':\n var filter= /^[\\sa-zA-Z0-9\\;:,_.#?*@!/$\\\\n\\\\r\\-\\+]+$/;\n if (!(filter.test(strng))) {\n if (opts['messages']['alpha']) {\n errors.push (opts['messages']['alpha']);\n } else {\n errors.push (opts['title'] + ' must be: A-Z,0-9,_.#*@!$-');\n }\n }\n break;\n case 'pass':\n var filter= /^[\\sa-zA-Z0-9\\,_.#*@:!\\^/$\\-\\+]+$/;\n if (!(filter.test(strng))) {\n if (opts['messages']['alpha']) {\n errors.push (opts['messages']['alpha']);\n } else {\n errors.push (opts['title'] + ' must be: A-Z,0-9,_.#*@!$-');\n }\n }\n break;\n case 'alpha':\n var filter= /^[\\sa-zA-Z\\,.'\\-]+$/;\n if (!(filter.test(strng))) {\n if (opts['messages']['alpha']) {\n errors.push (opts['messages']['alpha']);\n } else {\n errors.push (opts['title'] + ' must be letters only');\n }\n }\n break;\n case 'alphanum':\n var filter= /^[\\sa-zA-Z0-9\\,.'#?\\-]+$/;\n if (!(filter.test(strng))) {\n if (opts['messages']['alphanum']) {\n errors.push (opts['messages']['alphanum']);\n } else {\n errors.push (opts['title'] + ' must be alpha-numeric');\n }\n }\n break;\n case 'money':\n var filter= /^\\d+\\.\\d{2}$/;\n if (!(filter.test(strng))) {\n if (opts['messages']['number']) {\n errors.push (opts['messages']['number']);\n } else {\n errors.push (opts['title'] + ' invalid amount');\n }\n } else {\n if (parseFloat(strng) < parseFloat(opts['minvalue'])) {\n if (opts['messages']['minvalue']) {\n errors.push (opts['messages']['minvalue']);\n } else {\n errors.push (opts['title'] + ' minimum ' + opts['minvalue']);\n }\n }\n if (opts.maxvalue) {\n if (strng > opts['maxvalue']) {\n if (opts['messages']['maxvalue']) {\n errors.push (opts['messages']['maxvalue']);\n } else {\n errors.push (opts['title'] + ' must be less than ' + opts['maxvalue']);\n }\n }\n }\n }\n break;\n case 'number':\n case 'numeric':\n var filter= /^[0-9.\\,\\-]+$/;\n if (!(filter.test(strng))) {\n if (opts['messages']['number']) {\n errors.push (opts['messages']['number']);\n } else {\n errors.push (opts['title'] + ' must be numeric');\n }\n } else {\n if (parseFloat(strng) < parseFloat(opts['minvalue'])) {\n if (opts['messages']['minvalue']) {\n errors.push (opts['messages']['minvalue']);\n } else {\n errors.push (opts['title'] + ' minimum ' + opts['minvalue']);\n }\n }\n if (opts.maxvalue) {\n if (strng > opts['maxvalue']) {\n if (opts['messages']['maxvalue']) {\n errors.push (opts['messages']['maxvalue']);\n } else {\n errors.push (opts['title'] + ' must be less than ' + opts['maxvalue']);\n }\n }\n }\n }\n break;\n\n case 'mod10':\n case 'crednum':\n case 'cardnum':\n var filter= /^[0-9\\,\\-]+$/;\n if (!(filter.test(strng))) {\n if (opts['messages']['number']) {\n errors.push (opts['messages']['number']);\n } else {\n errors.push (opts['title'] + ' must be numeric');\n }\n } else {\n if (!mod10(strng)) {\n errors.push (opts['title'] + ' invalid card');\n }\n }\n break;\n case 'us_zipcode':\n case 'zipcode':\n case 'zip':\n var filter= /(^\\d{5}$)|(^\\d{5}-\\d{4}$)/;\n if (!(filter.test(strng))) {\n if (opts['messages']['us_zipcode']) {\n errors.push (opts['messages']['us_zipcode']);\n } else {\n errors.push (opts['title'] + ' invalid zipcode');\n }\n }\n break;\n\n case 'date':\n // regular expression to match required date format\n var filter = /^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/;\n if (!(filter.test(strng))) {\n if (opts['messages']['date']) {\n errors.push (opts['messages']['date']);\n } else {\n errors.push (opts['title'] + ' invalid date');\n }\n }\n break;\n default:\n //code to be executed if n is different from case 1 and 2\n };\n return (strng);\n }", "function adderr(txt) { return !fields.attr(\"required\", false).mbError(txt); }", "async checkType(value) {\n\t\t\t//C check against each datatype\n\t\t\tfor (let i = 0; i < this.dataTypes.length; i++) {\n\t\t\t\tif (\n\t\t\t\t\t// Quick hack for replacing isType which checks against custom types like 'array' and 'integer'\n\t\t\t\t\ttypeof value === this.dataTypes[i] ||\n\t\t\t\t\t(this.dataTypes[i] === 'array' && Array.isArray(value)) ||\n\t\t\t\t\t(this.dataTypes[i] === 'integer' && Number.isInteger(value))\n\t\t\t\t) {\n\t\t\t\t\treturn new Success({\n\t\t\t\t\t\torigin: `${this.origin}.checkType()`,\n\t\t\t\t\t\tmessage: 'validated data type',\n\t\t\t\t\t\tcontent: value,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t//C parse strings for numbers\n\t\t\t\tif (typeof value === 'string') {\n\t\t\t\t\tlet parsed = Number.parseFloat(value);\n\t\t\t\t\tif (this.dataTypes[i] === 'number' && !Number.isNaN(parsed) \n\t\t\t\t\t|| this.dataTypes[i] === 'integer' && Number.isInteger(parsed)) {\n\t\t\t\t\t\treturn new Success({\n\t\t\t\t\t\t\torigin: `${this.origin}.checkType()`,\n\t\t\t\t\t\t\tmessage: 'validated data type',\n\t\t\t\t\t\t\tcontent: parsed,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t//TODO parse strings for boolean & symbols & other?\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//C throw if no matches\n\t\t\tthrow new Err({\n\t\t\t\tlog: true,\n\t\t\t\torigin: `${this.origin}.checkType()`,\n\t\t\t\tmessage: `${this.valueName} must be a ${this.dataTypes.join(' or ')}`,\n\t\t\t\tcontent: value,\n\t\t\t});\n\t\t}", "function oneFieldIsSet() {\n\n var messages = []\n var celsiusTemperatures = $('#celsius')\n var fahrenheitTemperatures = $('#fahrenheit')\n\n if (celsiusTemperatures.val() !== \"\" && fahrenheitTemperatures.val() !== \"\") {\n\n messages.push('One of the Celsius or Fahrenheit fields must have one or more numeric values, but not both.')\n }\n\n return messages\n }", "function checkInputType() {\n\t\tvar el = this,\n\t\t\ttype = el.getAttribute('type');\n\n\t\tif (type == 'number') {\n\t\t\tvar min = el.getAttribute('min'),\n\t\t\t\tmax = el.getAttribute('max'),\n\t\t\t\tstep = el.getAttribute('step'),\n\t\t\t\tval = Number(el.value),\n\t\t\t\terrors = [];\n\n\t\t\tif (val == Number.NaN) {\n\t\t\t\terrors.push('typeMismatch');\n\t\t\t}\n\n\t\t\tif (min != null && min > val) {\n\t\t\t\terrors.push('rangeUnderflow');\n\t\t\t}\n\n\t\t\tif (max != null && max < val) {\n\t\t\t\terrors.push('rangeOverflow');\n\t\t\t}\n\n\t\t\tif (step != null && step != 'any' && (val % parseInt(step) != 0)) {\n\t\t\t\terrors.push('stepMismatch');\n\t\t\t}\n\n\t\t\tif (errors.length > 0) {\n\t\t\t\treturn errors.join(errorDelimiter)\n\t\t\t}\n\t\t} else if (!constraints[type].test(this.value)) {\n\t\t\treturn 'typeMismatch';\n\t\t}\n\n\t\treturn '';\n\t}", "function chkselect(type)\n{\n $value=$('#'+type).val();\n \n if($value==\"Choose Type\" || $value==\"\" )\n {\n setalert(type+'span',$typeerr);\n return false;\n }\n else{\n clearalert(type+'span');\n return true;\n }\n\n\n}", "function handleDataTypeSelectionAndValidation(dialog) {\n var dataTypeSelect = dialog.find(DATA_TYPE + \" coral-select\");\n var preselectedDataType = dataTypeSelect[0].selectedItem ? dataTypeSelect[0].selectedItem.value : '';\n if (preselectedDataType == 'boolean') {\n dialog.find(ENUMS).hide();\n }\n\n dataTypeSelect.on('change', function() {\n var selectedDataType = dataTypeSelect[0].selectedItem ? dataTypeSelect[0].selectedItem.value : '';\n if (selectedDataType == 'boolean') {\n dialog.find(ENUMS).hide();\n } else {\n dialog.find(ENUMS).show();\n }\n });\n\n var registerValidator = function(selector, validate) {\n if (!validate) {\n validate = function() {\n var isValid = true;\n var selectedDataType = dataTypeSelect[0].selectedItem ? dataTypeSelect[0].selectedItem.value : '';\n var value = document.querySelector(selector).value;\n if (selectedDataType === 'number') {\n if (isNaN(value)) {\n isValid = false;\n }\n }\n if (!isValid) {\n return Granite.I18n.getMessage('Value Type Mismatch');\n }\n }\n }\n $(window).adaptTo(\"foundation-registry\").register(\"foundation.validation.validator\", {\n selector: selector,\n validate: validate\n });\n }\n\n registerValidator('input[name=\"./checkedValue\"]');\n registerValidator('input[name=\"./default\"]');\n registerValidator('input[name=\"./uncheckedValue\"]', function() {\n var isValid = true;\n var enabledCheckedValueSwitch = $('coral-switch[name=\"./enableUncheckedValue\"]')[0];\n var isChecked = enabledCheckedValueSwitch.hasAttribute('checked');\n if (isChecked) {\n var selectedDataType = dataTypeSelect[0].selectedItem ? dataTypeSelect[0].selectedItem.value : '';\n var value = document.querySelector('input[name=\"./uncheckedValue\"]').value;\n if (selectedDataType === 'number') {\n if (isNaN(value)) {\n isValid = false;\n }\n }\n }\n if (!isValid) {\n return Granite.I18n.getMessage('Value Type Mismatch');\n }\n })\n }", "function required(object){/*///El valor '' es para input que requieran que se ingrese texto, el valor 0 puede ser para selects2 (dropdowns)*/ var valor = object.val(); if (valor=='' || valor==0) {object.addClass('errorform'); return false; /*///Valor vacio (invalido)*/ } else {return true; /*///Valor valido*/ } }", "static isInputDataTypeValid(dataType, langId){\n throw new TypeError(\"Method 'isInputDataTypeValid' has to be implemented!\");\n }", "function checkType(type, value) {\n\t\t\t\tif (type) {\n\t\t\t\t\tif (typeof type == 'string' && type != 'any' && (type == 'null' ? value !== null : (typeof value === 'undefined' ? 'undefined' : _typeof(value)) != type) && !(value instanceof Array && type == 'array') && !(value instanceof Date && type == 'date') && !(type == 'integer' && value % 1 === 0)) {\n\t\t\t\t\t\treturn [{ property: path, message: (typeof value === 'undefined' ? 'undefined' : _typeof(value)) + \" value found, but a \" + type + \" is required\" }];\n\t\t\t\t\t}\n\t\t\t\t\tif (type instanceof Array) {\n\t\t\t\t\t\tvar unionErrors = [];\n\t\t\t\t\t\tfor (var j = 0; j < type.length; j++) {\n\t\t\t\t\t\t\t// a union type\n\t\t\t\t\t\t\tif (!(unionErrors = checkType(type[j], value)).length) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (unionErrors.length) {\n\t\t\t\t\t\t\treturn unionErrors;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ((typeof type === 'undefined' ? 'undefined' : _typeof(type)) == 'object') {\n\t\t\t\t\t\tvar priorErrors = errors;\n\t\t\t\t\t\terrors = [];\n\t\t\t\t\t\tcheckProp(value, type, path);\n\t\t\t\t\t\tvar theseErrors = errors;\n\t\t\t\t\t\terrors = priorErrors;\n\t\t\t\t\t\treturn theseErrors;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn [];\n\t\t\t}", "function checkType(type,value){\r\n\t\t\tif(type){\r\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\r\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\r\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\r\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\r\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\r\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\r\n\t\t\t\t}\r\n\t\t\t\tif(type instanceof Array){\r\n\t\t\t\t\tvar unionErrors=[];\r\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\r\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(unionErrors.length){\r\n\t\t\t\t\t\treturn unionErrors;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(typeof type == 'object'){\r\n\t\t\t\t\tvar priorErrors = errors;\r\n\t\t\t\t\terrors = [];\r\n\t\t\t\t\tcheckProp(value,type,path);\r\n\t\t\t\t\tvar theseErrors = errors;\r\n\t\t\t\t\terrors = priorErrors;\r\n\t\t\t\t\treturn theseErrors;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn [];\r\n\t\t}", "function checkType(type,value){\r\n\t\t\tif(type){\r\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\r\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\r\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\r\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\r\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\r\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\r\n\t\t\t\t}\r\n\t\t\t\tif(type instanceof Array){\r\n\t\t\t\t\tvar unionErrors=[];\r\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\r\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(unionErrors.length){\r\n\t\t\t\t\t\treturn unionErrors;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(typeof type == 'object'){\r\n\t\t\t\t\tvar priorErrors = errors;\r\n\t\t\t\t\terrors = [];\r\n\t\t\t\t\tcheckProp(value,type,path);\r\n\t\t\t\t\tvar theseErrors = errors;\r\n\t\t\t\t\terrors = priorErrors;\r\n\t\t\t\t\treturn theseErrors;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn [];\r\n\t\t}", "function checkType(type,value){\r\n\t\t\tif(type){\r\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\r\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\r\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\r\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\r\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\r\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\r\n\t\t\t\t}\r\n\t\t\t\tif(type instanceof Array){\r\n\t\t\t\t\tvar unionErrors=[];\r\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\r\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(unionErrors.length){\r\n\t\t\t\t\t\treturn unionErrors;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(typeof type == 'object'){\r\n\t\t\t\t\tvar priorErrors = errors;\r\n\t\t\t\t\terrors = [];\r\n\t\t\t\t\tcheckProp(value,type,path);\r\n\t\t\t\t\tvar theseErrors = errors;\r\n\t\t\t\t\terrors = priorErrors;\r\n\t\t\t\t\treturn theseErrors;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn [];\r\n\t\t}", "function checkType(type,value){\r\n\t\t\tif(type){\r\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\r\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\r\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\r\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\r\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\r\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\r\n\t\t\t\t}\r\n\t\t\t\tif(type instanceof Array){\r\n\t\t\t\t\tvar unionErrors=[];\r\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\r\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(unionErrors.length){\r\n\t\t\t\t\t\treturn unionErrors;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(typeof type == 'object'){\r\n\t\t\t\t\tvar priorErrors = errors;\r\n\t\t\t\t\terrors = [];\r\n\t\t\t\t\tcheckProp(value,type,path);\r\n\t\t\t\t\tvar theseErrors = errors;\r\n\t\t\t\t\terrors = priorErrors;\r\n\t\t\t\t\treturn theseErrors;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn [];\r\n\t\t}", "function checkType(type,value){\r\n\t\t\tif(type){\r\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\r\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\r\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\r\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\r\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\r\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\r\n\t\t\t\t}\r\n\t\t\t\tif(type instanceof Array){\r\n\t\t\t\t\tvar unionErrors=[];\r\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\r\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(unionErrors.length){\r\n\t\t\t\t\t\treturn unionErrors;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(typeof type == 'object'){\r\n\t\t\t\t\tvar priorErrors = errors;\r\n\t\t\t\t\terrors = [];\r\n\t\t\t\t\tcheckProp(value,type,path);\r\n\t\t\t\t\tvar theseErrors = errors;\r\n\t\t\t\t\terrors = priorErrors;\r\n\t\t\t\t\treturn theseErrors;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn [];\r\n\t\t}", "function checkType(type,value){\r\n\t\t\tif(type){\r\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\r\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\r\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\r\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\r\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\r\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\r\n\t\t\t\t}\r\n\t\t\t\tif(type instanceof Array){\r\n\t\t\t\t\tvar unionErrors=[];\r\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\r\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(unionErrors.length){\r\n\t\t\t\t\t\treturn unionErrors;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(typeof type == 'object'){\r\n\t\t\t\t\tvar priorErrors = errors;\r\n\t\t\t\t\terrors = [];\r\n\t\t\t\t\tcheckProp(value,type,path);\r\n\t\t\t\t\tvar theseErrors = errors;\r\n\t\t\t\t\terrors = priorErrors;\r\n\t\t\t\t\treturn theseErrors;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn [];\r\n\t\t}", "function checkType(type,value){\r\n\t\t\tif(type){\r\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\r\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\r\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\r\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\r\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\r\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\r\n\t\t\t\t}\r\n\t\t\t\tif(type instanceof Array){\r\n\t\t\t\t\tvar unionErrors=[];\r\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\r\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(unionErrors.length){\r\n\t\t\t\t\t\treturn unionErrors;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(typeof type == 'object'){\r\n\t\t\t\t\tvar priorErrors = errors;\r\n\t\t\t\t\terrors = [];\r\n\t\t\t\t\tcheckProp(value,type,path);\r\n\t\t\t\t\tvar theseErrors = errors;\r\n\t\t\t\t\terrors = priorErrors;\r\n\t\t\t\t\treturn theseErrors;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn [];\r\n\t\t}", "function checkType(type,value){\r\n\t\t\tif(type){\r\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\r\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\r\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\r\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\r\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\r\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\r\n\t\t\t\t}\r\n\t\t\t\tif(type instanceof Array){\r\n\t\t\t\t\tvar unionErrors=[];\r\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\r\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(unionErrors.length){\r\n\t\t\t\t\t\treturn unionErrors;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(typeof type == 'object'){\r\n\t\t\t\t\tvar priorErrors = errors;\r\n\t\t\t\t\terrors = [];\r\n\t\t\t\t\tcheckProp(value,type,path);\r\n\t\t\t\t\tvar theseErrors = errors;\r\n\t\t\t\t\terrors = priorErrors;\r\n\t\t\t\t\treturn theseErrors;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn [];\r\n\t\t}", "function checkType(type,value){\r\n\t\t\tif(type){\r\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\r\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\r\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\r\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\r\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\r\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\r\n\t\t\t\t}\r\n\t\t\t\tif(type instanceof Array){\r\n\t\t\t\t\tvar unionErrors=[];\r\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\r\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(unionErrors.length){\r\n\t\t\t\t\t\treturn unionErrors;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(typeof type == 'object'){\r\n\t\t\t\t\tvar priorErrors = errors;\r\n\t\t\t\t\terrors = [];\r\n\t\t\t\t\tcheckProp(value,type,path);\r\n\t\t\t\t\tvar theseErrors = errors;\r\n\t\t\t\t\terrors = priorErrors;\r\n\t\t\t\t\treturn theseErrors;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn [];\r\n\t\t}", "function checkType(type,value){\r\n\t\t\tif(type){\r\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\r\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\r\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\r\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\r\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\r\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\r\n\t\t\t\t}\r\n\t\t\t\tif(type instanceof Array){\r\n\t\t\t\t\tvar unionErrors=[];\r\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\r\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(unionErrors.length){\r\n\t\t\t\t\t\treturn unionErrors;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(typeof type == 'object'){\r\n\t\t\t\t\tvar priorErrors = errors;\r\n\t\t\t\t\terrors = [];\r\n\t\t\t\t\tcheckProp(value,type,path);\r\n\t\t\t\t\tvar theseErrors = errors;\r\n\t\t\t\t\terrors = priorErrors;\r\n\t\t\t\t\treturn theseErrors;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn [];\r\n\t\t}", "function checkType(type,value){\r\n\t\t\tif(type){\r\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\r\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\r\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\r\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\r\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\r\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\r\n\t\t\t\t}\r\n\t\t\t\tif(type instanceof Array){\r\n\t\t\t\t\tvar unionErrors=[];\r\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\r\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(unionErrors.length){\r\n\t\t\t\t\t\treturn unionErrors;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(typeof type == 'object'){\r\n\t\t\t\t\tvar priorErrors = errors;\r\n\t\t\t\t\terrors = [];\r\n\t\t\t\t\tcheckProp(value,type,path);\r\n\t\t\t\t\tvar theseErrors = errors;\r\n\t\t\t\t\terrors = priorErrors;\r\n\t\t\t\t\treturn theseErrors;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn [];\r\n\t\t}", "function validateTypeArticle()\n{\n\tvar $opc = $(\"#types_id_types option:selected\").val();\n\tconsole.log(\"Tipo de articulo: \"+$opc);\n\tif($opc == 5){\n\t\t$(\"#camposCamiones\").fadeIn(\"slow\");\n\t}else{\n\t\t$(\"#camposCamiones\").fadeOut(\"slow\");\n\t}\n}", "function validateRunType(){\n\tvar runtype = $(\".runtype\");\n\tvar temp = \"\";\n\tvar counter = 0;\n\t\n\t// This loop count one up everytime runtype is filled.\n\tfor(var i=0;i<runtype.length;i++){\n\t\tif(runtype[i].value != \"\"){\n\t\t\tcounter++;\n\t\t\ttemp = runtype[i].value;\n\t\t\tvar index = i;\n\t\t}\n\t}\n\n\tif(counter>1){\t//Check only one box is filled\n//\t\tsetErrorOnBox(runtype);\n//\t\t//alert(runtypeerr);\n\t\treturn false;\n\t} else if (counter == 0){\t//Check if any is filled\n\t\tsetErrorOnBox(runtype);\n\t\treturn false;\n\t}\n//\telse{\n\t\t\t\t// add if here - to show error box when refreshing and then push submit for not int and not between 1-32 \n\t\treturn validateIfIntNumberBetween(temp,runtypeMin,runtypeMax,\"runtype\"); // check when one is filled - check if it's an integer and between 1-32\n//\t}\n}", "function checkType(type,value){\n\t\t\tif(type){\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\n\t\t\t\t}\n\t\t\t\tif(type instanceof Array){\n\t\t\t\t\tvar unionErrors=[];\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(unionErrors.length){\n\t\t\t\t\t\treturn unionErrors;\n\t\t\t\t\t}\n\t\t\t\t}else if(typeof type == 'object'){\n\t\t\t\t\tvar priorErrors = errors;\n\t\t\t\t\terrors = [];\n\t\t\t\t\tcheckProp(value,type,path);\n\t\t\t\t\tvar theseErrors = errors;\n\t\t\t\t\terrors = priorErrors;\n\t\t\t\t\treturn theseErrors;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [];\n\t\t}", "function checkType(type,value){\n\t\t\tif(type){\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\n\t\t\t\t}\n\t\t\t\tif(type instanceof Array){\n\t\t\t\t\tvar unionErrors=[];\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(unionErrors.length){\n\t\t\t\t\t\treturn unionErrors;\n\t\t\t\t\t}\n\t\t\t\t}else if(typeof type == 'object'){\n\t\t\t\t\tvar priorErrors = errors;\n\t\t\t\t\terrors = [];\n\t\t\t\t\tcheckProp(value,type,path);\n\t\t\t\t\tvar theseErrors = errors;\n\t\t\t\t\terrors = priorErrors;\n\t\t\t\t\treturn theseErrors;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [];\n\t\t}", "function checkType(type,value){\n\t\t\tif(type){\n\t\t\t\tif(typeof type == 'string' && type != 'any' &&\n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) &&\n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\n\t\t\t\t\t\t!(value instanceof Date && type == 'date') &&\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\n\t\t\t\t}\n\t\t\t\tif(type instanceof Array){\n\t\t\t\t\tvar unionErrors=[];\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type\n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(unionErrors.length){\n\t\t\t\t\t\treturn unionErrors;\n\t\t\t\t\t}\n\t\t\t\t}else if(typeof type == 'object'){\n\t\t\t\t\tvar priorErrors = errors;\n\t\t\t\t\terrors = [];\n\t\t\t\t\tcheckProp(value,type,path);\n\t\t\t\t\tvar theseErrors = errors;\n\t\t\t\t\terrors = priorErrors;\n\t\t\t\t\treturn theseErrors;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [];\n\t\t}", "function displayError() {\n if(originalError instanceof ValidationError) {\n $(\".validation-message--error\").text(`Validation Error: ${originalError.message}`);\n }\n else if(originalError instanceof LocationError) {\n $(\".validation-message--error\").text(`Location Error: ${originalError.message}`);\n }\n else {\n $(\".validation-message--error\").text(`Error: ${originalError.message}`);\n }\n }", "function validate(){\n if( ($('#pgm').val().trim().length < 1 || $('#subj').val().trim().length < 1 || $('#year').val().trim().length < 1 || $('#typ').val().trim().length < 1)) {\n alert('Please enter or select the required fields');\n return false;// || $('#subj').val() ||$('#year').val() || $('#type').val())\n }\n return true;\n }", "_validateType() {\n if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatInputUnsupportedTypeError(this._type);\n }\n }", "function check_types() {\n\tif(dofilter==false)\n\t\treturn true;\n\twith(document.forms[0])\n\t{\n\t\t/*\n\t\t * with who uses with?\n\t\t * i do, i am an ancient. ok?\n\t\t */\n\t\t\n\t\tfor(i=0 ; i < elements.length ; i++)\n\t\t{\n\t\t\tif(elements[i].value.match(re))\n\t\t\t{\n\t\t\t\talert('Sorry ' + elements[i].value + ' is not allowed');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}", "function typecheck(type, value) {\n var errors = type.validate(value, [{ path: \"\", type: type }])\n if (errors.length > 0) {\n fail(\n \"Error while converting \" +\n prettyPrintValue(value) +\n \" to `\" +\n type.name +\n \"`:\\n\" +\n errors.map(toErrorString).join(\"\\n\")\n )\n }\n}", "function requiredSubselectionMessage(fieldName, type) {\n return 'Field \"' + fieldName + '\" of type \"' + String(type) + '\" must have a ' + ('selection of subfields. Did you mean \"' + fieldName + ' { ... }\"?');\n}", "function validateSelectOption_AddSize()\n\t{\n\t\tvar customerOptionSelected = $(\"#sltAddCustomer\").find(\"option:selected\");\n\t\tvar customer = customerOptionSelected.val();\n\t\tvar garmentKindOptionSelected = $(\"#sltAddGarmentKind\").find(\"option:selected\");\n\t\tvar garmentkind = garmentKindOptionSelected.val();\n\t\tvar typeOptionSelected = $(\"#sltAddType\").find(\"option:selected\");\n\t\tvar type = typeOptionSelected.val();\n\t\tvar sizename = $(\"#dialogCreateSize\").find(\"#txtAddSize\").val().trim();\n\t\tif(customer == -1\n\t\t\t|| garmentkind == -1\n\t\t\t|| type == -1\n\t\t\t|| sizename.length < 1\n\t\t\t)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\t\n\t}", "function valueTypeChange() {\n if (vm.annotType.valueType === 'Select') {\n // add an option if none exist\n if (!vm.annotType.options || (vm.annotType.options.length < 1)) {\n optionAdd();\n }\n } else {\n vm.annotType.options = undefined;\n vm.annotType.maxValueCount = 0;\n }\n }", "function type(rule,value,source,errors,options){if(rule.required&&value===undefined){(0,_required2[\"default\"])(rule,value,source,errors,options);return;}var custom=['integer','float','array','regexp','object','method','email','number','date','url','hex'];var ruleType=rule.type;if(custom.indexOf(ruleType)>-1){if(!types[ruleType](value)){errors.push(util.format(options.messages.types[ruleType],rule.fullField,rule.type));}// straight typeof check\n}else if(ruleType&&(typeof value==='undefined'?'undefined':_typeof(value))!==rule.type){errors.push(util.format(options.messages.types[ruleType],rule.fullField,rule.type));}}", "function validate_userType() {\n var length = $(\"[name='userType']:checked\").length;\n if (length == 0) {\n $(\"#userTypeError\").show();\n $(\"#userTypeError\").html(\"***Please SELECT <b>User TYPE</b>\");\n $(\"#userTypeError\").css(\"color\", \"red\");\n userTypeError = false\n } else {\n\n $(\"#userTypeError\").hide();\n userTypeError = true;\n var elements = document.getElementsByName(\"userType\");\n for (var i = 0; i < elements.length; i++) {\n if (elements[i].checked && elements[i].defaultValue == \"Vendor\") {\n $(\"#userFor\").val(\"Purchase\")\n }\n if (elements[i].checked && elements[i].defaultValue == \"Customer\") {\n $(\"#userFor\").val(\"Sale\")\n }\n }\n $(\"#userForError\").hide();\n }\n\n return userTypeError;\n }", "function checkType(type,value){\n\t\t\tif(type){\n\t\t\t\tif(typeof type == 'string' && type != 'any' && \n\t\t\t\t\t\t(type == 'null' ? value !== null : typeof value != type) && \n\t\t\t\t\t\t!(value instanceof Array && type == 'array') &&\n\t\t\t\t\t\t!(type == 'integer' && value%1===0)){\n\t\t\t\t\treturn [{property:path,message:(typeof value) + \" value found, but a \" + type + \" is required\"}];\n\t\t\t\t}\n\t\t\t\tif(type instanceof Array){\n\t\t\t\t\tvar unionErrors=[];\n\t\t\t\t\tfor(var j = 0; j < type.length; j++){ // a union type \n\t\t\t\t\t\tif(!(unionErrors=checkType(type[j],value)).length){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(unionErrors.length){\n\t\t\t\t\t\treturn unionErrors;\n\t\t\t\t\t}\n\t\t\t\t}else if(typeof type == 'object'){\n\t\t\t\t\tvar priorErrors = errors;\n\t\t\t\t\terrors = []; \n\t\t\t\t\tcheckProp(value,type,path);\n\t\t\t\t\tvar theseErrors = errors;\n\t\t\t\t\terrors = priorErrors;\n\t\t\t\t\treturn theseErrors; \n\t\t\t\t} \n\t\t\t}\n\t\t\treturn [];\n\t\t}", "function validType (req, res, next){\n if (!req.body.type){\n res.status(404).json({message:\"Type is missing some data\"});\n } else {\n next();\n }\n}", "function type(rule,value,source,errors,options){if(rule.required&&value===undefined){(0,_required2[\"default\"])(rule,value,source,errors,options);return;}var custom=['integer','float','array','regexp','object','method','email','number','date','url','hex'];var ruleType=rule.type;if(custom.indexOf(ruleType)>-1){if(!types[ruleType](value)){errors.push(util.format(options.messages.types[ruleType],rule.fullField,rule.type));}// straight typeof check\r\n\t}else if(ruleType&&(typeof value==='undefined'?'undefined':_typeof(value))!==rule.type){errors.push(util.format(options.messages.types[ruleType],rule.fullField,rule.type));}}", "function errorsfound() {\n\tresult = \"\";\n\tif(isNaN(parseInt(document.getElementById(\"xs\").value))) {\n\t\tresult += \"ERROR: invalid value for horizontal start: \" + document.getElementById(\"xs\").value + \"<br>\";\n\t}\n\t\n\tif(isNaN(parseInt(document.getElementById(\"xe\").value))) {\n\t\tresult += \"ERROR: invalid value for horizontal end: \" + document.getElementById(\"xe\").value + \"<br>\";\n\t}\n\t\n\tif(isNaN(parseInt(document.getElementById(\"ys\").value))) {\n\t\tresult += \"ERROR: invalid value for vertical start: \" + document.getElementById(\"ys\").value + \"<br>\";\n\t}\n\t\n\tif(isNaN(parseInt(document.getElementById(\"ye\").value))) {\n\t\tresult += \"ERROR: invalid value for vertical end: \" + document.getElementById(\"ye\").value + \"<br>\";\n\t}\n\t\n\tdocument.getElementById(\"error\").innerHTML = result;\n\tif(result == \"\") return false;\n\treturn true;\n}", "function errorUserType(error){\n\t\t\tconsole.log(error);\n\t\t}", "function errorUserType(error){\n\t\t\tconsole.log(error);\n\t\t}", "function errorMessage() {\n\t\n\t$loader.html('<span class=\"error typeIt2\">Purrrlease make a selection...... You can do that right meoewwwwermmmm thanks.</span>');\n\n\t//typeIt effect\n\t$('.typeIt2').typeIt({\n\t\tcursor: false,\n\t});\n\n}", "function checkSelectPropTypes(props){{ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function checkSelectPropTypes(props){{ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function checkSelectPropTypes(props){{ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function type(rule,value,source,errors,options){if(rule.required&&value===undefined){(0,_required2[\"default\"])(rule,value,source,errors,options);return;}var custom=['integer','float','array','regexp','object','method','email','number','date','url','hex'];var ruleType=rule.type;if(custom.indexOf(ruleType)>-1){if(!types[ruleType](value)){errors.push(util.format(options.messages.types[ruleType],rule.fullField,rule.type));}// straight typeof check\n\t}else if(ruleType&&(typeof value==='undefined'?'undefined':_typeof(value))!==rule.type){errors.push(util.format(options.messages.types[ruleType],rule.fullField,rule.type));}}", "function checkSelectPropTypes(props) {\n checkControlledValueProps('select', props);\n for(var i = 0; i < valuePropNames.length; i++){\n var propName = valuePropNames[i];\n if (props[propName] == null) continue;\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) error(\"The `%s` prop supplied to <select> must be an array if `multiple` is true.%s\", propName, getDeclarationErrorAddendum());\n else if (!props.multiple && isArray) error(\"The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s\", propName, getDeclarationErrorAddendum());\n }\n }", "function noSubselectionAllowedMessage(fieldName, type) {\n return \"Field \\\"\".concat(fieldName, \"\\\" must not have a selection since \") + \"type \\\"\".concat(type, \"\\\" has no subfields.\");\n}", "function verbPresAffPlainCheckError() {\n let optionsGroup = document.getElementById(\"verb-tense-group\");\n let errorElement = optionsGroup.getElementsByClassName(\"must-choose-one-text\")[0];\n\n let selected = checkInputsForError(inputsToSelectVerbPresAffPlain, true);\n let unselected = checkInputsForError(inputsToDeselectVerbPresAffPlain, false);\n\n if (selected && unselected) {\n toggleError(errorElement, \"*Invalid combination: present, affirmative, plain\", true);\n // element could be hidden because verb is unchecked, so check to enable back button\n checkToEnableBackButton();\n } else {\n optionsGroupCheckError(optionsGroup);\n }\n}", "function checkSelectPropTypes(props){{checkControlledValueProps('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function checkSelectPropTypes(props){{checkControlledValueProps('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function ControlData(pu, qte){\n try {\n if(isNaN(pu)) throw \"Entrer un Prix Unitaire correct\";\n if(isNaN(qte)) throw \"Entrer une Quantité correct\";\n if(parseFloat(pu) == NaN) throw \"Le Prix Unitaire n'est pas correct\";\n if(parseFloat(qte) != parseInt(qte)) throw \"La Quantité doit être un nombre entier\";\n \n }\n catch(error){\n alert(error);\n return;\n }\n return true;\n}", "displayInputErrors(team) {\n if (team.sport.trim() == \"\") {\n this.refs.sport.setError(\"Please give a non-empty value\");\n }\n if (team.city.trim() == \"\") {\n this.refs.city.setError(\"Please give a non-empty value\");\n }\n if (team.name.trim() == \"\") {\n this.refs.name.setError(\"Please give a non-empty value\");\n }\n if ( isNaN(team.maxPlayers) || game.gameLength < 1 ) {\n this.refs.gameLength.setError(\"Please input a positive number\");\n }\n }", "function checkEventType(e){\n resetInnerHTML('errEventType');\n document.getElementById('eventType').removeAttribute('class');\n var eventType = document.getElementById('eventType').value.trim();\n var errorMsg = \"\";\n var typeList = [\n \"Birthday\",\n \"Conference\",\n \"Ceremony\",\n \"Educational\",\n \"Leisure\",\n \"Networking\",\n \"Party\",\n \"Social\",\n \"Sports\",\n \"Others\"];\n\n if(typeList.indexOf(eventType) === -1) {\n errorMsg += '* Select an event type';\n }\n\n if(errorMsg.length > 0){\n if(e){\n e.preventDefault();\n }\n document.getElementById('errEventType').innerHTML = errorMsg;\n setAttribute('eventType', 'class', 'errorBorder');\n }\n}", "_checkType (feature, expected) {\n const type = feature.type;\n const actual = MVT_TO_CARTO_TYPES[type];\n if (actual !== expected) {\n throw new Error(`MVT: mixed geometry types in the same layer. Layer has type: ${expected} but feature was ${actual}`);\n }\n }", "validate() {\n // Als NIET (!) valide, dan error weergeven\n if (!this.isValid()) {\n this.showError();\n console.log(\"niet valide\");\n }\n else\n this.hideError();\n }", "function checkForUnsupportedColumnTypes(displayMsg)\n{ \n // check for the colTypes to make sure we support them, if not\n // the flow is that they don't appear in the form fields grids,\n // But we do display a message saying that they are not displayed,\n // but the user can add them manually by clicking on the + button...\n\n var unsupportedColTypes = new Array();\n var unsupportedColNames = new Array();\n \n for (var i = 0; i < _ColumnNames.valueList.length; i++)\n {\n var rowInfoObj = _ColumnNames.valueList[i];\n\n if (rowInfoObj && rowInfoObj.colType)\n {\n if (!isColTypeSupported(rowInfoObj.colType))\n {\n unsupportedColTypes.push(rowInfoObj.colType);\n unsupportedColNames.push(rowInfoObj);\n }\n }\n } \n \n if (unsupportedColTypes.length && unsupportedColNames.length)\n {\n if (displayMsg)\n alert(dwscripts.sprintf(MM.Msg_UnsupportedColumnsInTable, unsupportedColTypes));\n for (var i = 0; i < unsupportedColNames.length; i++)\n {\n // select the row that is to be deleted...\n _ColumnNames.pickRowValue(unsupportedColNames[i]);\n deleteGridRow(); \n }\n }\n\n}", "function displayError(type, errorDiv, submitButton){\n if(type === 0){\n if(errorDiv.id.indexOf(\"merge\") !== -1){\n errorDiv.innerHTML = \" <p> Multiple files uploaded are not acceptable. <br/> Please select only one local, one base, and one remote file. </p>\";\n } else {\n errorDiv.innerHTML = \" <p> Multiple files uploaded are not acceptable. <br/> Please select only one previous, and one afterwards versions of a file. </p>\";\n }\n } else if (type === 1){\n errorDiv.innerHTML = \" <p> Only valid .ipynb files are acceptable. </p>\";\n } else if (type === 2){\n if(errorDiv.id.indexOf(\"merge\") !== -1){\n errorDiv.innerHTML = \" <p> You must specify: <br/> \"+\n (localJSON.value.length === 0 ? \"- one local iPython notebook <br/>\" : \"\") +\n (baseJSON.value.length === 0 ? \"- one base iPython notebook <br/>\" : \"\") +\n (remoteJSON.value.length === 0 ? \"- one remote iPython notebook.\" : \"\") + \"</p>\";\n } else {\n errorDiv.innerHTML = \" <p> You must specify: <br/> \"+\n (beforeJSON.value.length === 0 ? \"- one previous version of the iPython notebook <br/>\" : \"\") +\n (afterJSON.value.length === 0 ? \"- one afterwards version of the iPython notebook <br/>\" : \"\") + \"</p>\";\n }\n } \n errorDiv.style.display = \"block\";\n submitButton.className = \"disableBtn\";\n }", "function checkSelectPropTypes(inst, props) {\n\t\t var owner = inst._currentElement._owner;\n\t\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\t\n\t\t for (var i = 0; i < valuePropNames.length; i++) {\n\t\t var propName = valuePropNames[i];\n\t\t if (props[propName] == null) {\n\t\t continue;\n\t\t }\n\t\t if (props.multiple) {\n\t\t process.env.NODE_ENV !== 'production' ? warning(Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : undefined;\n\t\t } else {\n\t\t process.env.NODE_ENV !== 'production' ? warning(!Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : undefined;\n\t\t }\n\t\t }\n\t\t}", "function typeValidation(variable, type) {\n // Your code should be here ;) \n return typeof(variable) === type;\n}", "function noErrors() {\n if (viewModel.img.hasError() ||\n viewModel.title.hasError() ||\n viewModel.info.hasError()) {\n alert('Vänligen kontrollera de obligatoriska fälten.')\n return false\n }\n else {\n return true\n }\n}", "function validateTypes(el) {\r\n\tif(!el.value) return true;\r\n\t\r\n\tvar type = $(el).data('type') || el.getAttribute('type');\r\n\tif(typeof validateType[type] === 'function') {\r\n\t\treturn validateType[type](el);\r\n\t}\r\n\telse {\r\n\t\treturn true;\r\n\t}\r\n}", "function checkRequired(e,o)\n\t{\n\t\tswitch(e.type)\n\t\t{\n\t\t\tcase 'text':\n\t\t\t\tif(e.value.length<o.minText)\n\t\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\tcase 'password':\n\t\t\t\tif(e.value.length<o.minPassword)\n\t\t\t\t\treturn false\n\t\t\t\tbreak;\n\t\t\tcase 'select-one':\n\t\t\t\tif(e.selectedIndex==o.selectOneIndex)\n\t\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\tcase 'select-multiple':\n\t\t\t\tif(countSelectMultiple(e)<o.minSelectMultiple)\n\t\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\tcase 'textarea':\n\t\t\t\tif(e.value.length<o.minTextarea)\n\t\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function validateFieldType(hint) {\n var str = hint.toLowerCase(),\n type = null;\n if (str[0] == 'n') {\n type = 'number';\n } else if (str[0] == 's') {\n type = 'string';\n }\n return type;\n }", "function isVaild(ele) {\n var id = ele.id || '';\n var val = ele.value || '';\n var sts = {\n 'isValid': true,\n 'errorMsg': ''\n }\n // Name and title validator\n if (id === 'name' || id === 'title') {\n if (!val.length) {\n sts['isValid'] = false;\n sts['errorMsg'] = `This field is required : ${id}`\n }\n }\n else if (id === 'extension') { // Extension validator\n var ext = Number(val);\n if (isNaN(ext) || ext < 0) {\n sts['isValid'] = false;\n sts['errorMsg'] = `Invalid ext!!`\n }\n }\n return sts;\n }", "function latitudeOnChange() {\n var latitude=$('#latitude').val().trim();\n //Error\n var latitude_error=$('#latitude_error');\n //Error Msg\n var msgError=\"Empty Field\";\n\n if(!latitude){\n latitude_error.text(msgError);\n latitude_error.show();\n }else{\n if(latitude.length<2){\n latitude_error.text(\"size must be between 2 and 20\");\n latitude_error.show();\n\n }else {\n latitude_error.hide();\n }\n\n }\n\n}", "function latitudeOnChange() {\n var latitude=$('#latitude').val().trim();\n //Error\n var latitude_error=$('#latitude_error');\n //Error Msg\n var msgError=\"Empty Field\";\n\n if(!latitude){\n latitude_error.text(msgError);\n latitude_error.show();\n }else{\n if(latitude.length<2){\n latitude_error.text(\"size must be between 2 and 20\");\n latitude_error.show();\n\n }else {\n latitude_error.hide();\n }\n\n }\n\n}", "function validateNamedOptionalType(functionName,type,optionName,argument){if(argument!==undefined){validateNamedType(functionName,type,optionName,argument);}}", "validateFieldOptions() {\n this.options.fields.forEach((f) => {\n let name = f;\n if (typeof f === 'object') {\n name = f.name;\n }\n\n if (this.availableFields.indexOf(name) === -1) {\n throw new Error(`Field ${name} not available. Make sure the fields array item has\\\n a string or a object with a name attribute containing one of the available fields.`);\n }\n });\n }", "function validarSelect(input){\n\tvar bool=true;\n\tif($(\"select\").val()== 0){\n\t\t var span_nombre = $(\"<span class='error2'>\" + \"Selecciona un tipo de Bici\" + \"</span>\");\n\t\t$('select').parent().append(span_nombre);\n\t\tbool = false\n\t}\n\treturn bool\n}", "function validateType(v) {\n if (v.match(/\\,/)) {\n return 'Link queries do not support multiple types. Use an array of link queries.'\n }\n}", "function checkForErrors(inputName, inputType){\n if(inputName == \"bill\"){\n isInputValid(billInput, BILL_REGEX, BILL_ERR_MSG, billErrorMsg)\n }\n else if(inputName == \"tip-amount\"){\n if(inputType == \"text\"){\n isInputValid(customPercent, NUM_REGEX, NUM_ERR_MSG, tipErrorPercent)\n }else{\n tipErrorPercent.innerText = \"\"\n }\n }\n else if(inputName == \"num-people\"){\n isInputValid(numPeople, NUM_REGEX, NUM_ERR_MSG, peopleErrorMsg)\n }\n}", "function createErrorMessageForInputAndSelectFields(element) {\n var $this = element;\n var $dataAttribute = $($this).attr('data-error-text');\n var $idAttribute = $($this).attr('id');\n var $errorMessage = $dataAttribute ? $dataAttribute : $idAttribute + ' is required.';\n var $currentParent = $($this).parent();\n if (!$($this).val().trim()) {\n var $errorSpan = $('<span class=\"error\">' + $errorMessage + '</span>');\n if ($($currentParent).find('span.error').length === 0) {\n $($currentParent).append($errorSpan);\n }\n } else {\n $($currentParent).find('span.error').hide();\n }\n }", "function ValidateTracerNameSelection() {\n var selectedCount = $(\"#TracersListForCompliance\").data(\"kendoMultiSelect\").value().length;\n if (selectedCount <= 0) {\n create_error_elem();\n $('#showerror_msg').removeClass(\"alert-info\").addClass(\"alert-danger\");\n $('#showerror_msg').css(\"display\", \"block\"); \n $('#show_msg').html(\"Select at least one Tracer\");\n return false;\n }\n else {\n $('#showerror_msg').css(\"display\", \"none\");\n $('#show_msg').html(\"\");\n return true;\n }\n}", "function exam_typeVerify(){\n if(exam_type.value != null || exam_type.value != \"\"){\t\t\t\n exam_type.style.border = \"1px solid #5e6e66\";\n document.getElementById('exam_type_div').style.color = \"#5e6e66\";\n exam_type_error.innerHTML = \"\";\n return true;\n }\n}", "function checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n }", "function validation(str, type) {\n console.log(str);\n console.log(type);\n\n let valide = false;\n if (typesTab[type].test(str)) {\n valide = true;\n }\n valide === true\n ? (message = \"\")\n : (message = \"Le champ \" + type + \" n'est pas au format demandé.<br/>\");\n errorsTab = [valide, message];\n return errorsTab;\n}", "function validateFields(){\n\tif(!getValue('nombreID')\n\t\t|| !getValue('contactoID') \n\t\t|| !getValue('estadoID')\n\t\t|| !getValue('ciudadID') \n\t\t|| !getValue('shortDesc') \n\t\t|| !getValue('longDesc')\n\t\t|| !isChecked('lblCheck'))\n\t\treturn 0;\n\telse\n\t\treturn 1;\n}", "function getMultipleValuesInSingleSelectionError() {\n return Error('Cannot pass multiple values into SelectionModel with single-value mode.');\n}", "function getMultipleValuesInSingleSelectionError() {\n return Error('Cannot pass multiple values into SelectionModel with single-value mode.');\n}", "function checkSelectPropTypes(props) {\n {\n ReactControlledValuePropTypes.checkPropTypes('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error(\n 'The `%s` prop supplied to <select> must be an array if ' +\n '`multiple` is true.%s',\n propName,\n getDeclarationErrorAddendum(),\n );\n } else if (!props.multiple && isArray) {\n error(\n 'The `%s` prop supplied to <select> must be a scalar ' +\n 'value if `multiple` is false.%s',\n propName,\n getDeclarationErrorAddendum(),\n );\n }\n }\n }\n }", "function getMultipleValuesInSingleSelectionError() {\n return Error('Cannot pass multiple values into SelectionModel with single-value mode.');\n}", "any() {\n return Object.keys(this.errors).length > 0\n }", "function checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n }", "function checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n }", "function checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n }", "function checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n }", "function handleRequiredSelect(elementName, msg, errorBlock){\n\tvar retVal = false;\n\t\n\tvar jqElement = $(\"select[name='\"+elementName+\"']\");\n\t\n\tif(jqElement.val()==\"invalid\"){\n\t\tif(jqElement.parent().find('#validationErrorRequired').length==0){\n\t\t\tvar span = $('<span />', {'id':'validationErrorRequired', 'class': 'bg-danger help-block' }).text(msg);\n\t\t\tjqElement.parent().append(span);\n\t\t\t\n\t\t\tretVal = false;\n\t\t}\n\t} else if(jqElement.val()!=\"invalid\"){\n\t\tjqElement.parent().find(\"#validationErrorRequired\").remove();\n\t\t\n\t\tretVal = true;\n\t}\n\t\n\tconsole.log(\"handleRequiredSelect \" + retVal);\n\treturn retVal;\n}", "_checkType (feature, expected) {\n const type = feature.type;\n const actual = MVT_TO_CARTO_TYPES[type];\n if (actual !== expected) {\n throw new _errors_carto_runtime_error__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\n `${_errors_carto_runtime_error__WEBPACK_IMPORTED_MODULE_7__[\"CartoRuntimeTypes\"].MVT} MVT: mixed geometry types in the same layer. Layer has type: ${expected} but feature was ${actual}`\n );\n }\n }" ]
[ "0.65189207", "0.6409488", "0.63448626", "0.63024443", "0.6018869", "0.5987051", "0.59680885", "0.5943846", "0.59271896", "0.59091896", "0.58775055", "0.58342254", "0.5775999", "0.57736635", "0.5731995", "0.57294273", "0.57252806", "0.56768787", "0.5675666", "0.56635123", "0.56423265", "0.56423265", "0.56423265", "0.56423265", "0.56423265", "0.56423265", "0.56423265", "0.56423265", "0.56423265", "0.56423265", "0.56423265", "0.5634228", "0.5632528", "0.5619876", "0.5619876", "0.5619876", "0.5591338", "0.5588186", "0.55840164", "0.5547341", "0.55454373", "0.5537374", "0.55362475", "0.55277944", "0.5518848", "0.5497159", "0.5494977", "0.546144", "0.5454739", "0.5440322", "0.54312605", "0.54312605", "0.5427743", "0.54263544", "0.54263544", "0.54263544", "0.54245985", "0.54212445", "0.5419601", "0.54087114", "0.5405797", "0.5405797", "0.540473", "0.5402608", "0.5398975", "0.5376954", "0.5366575", "0.53664", "0.5365544", "0.535445", "0.5354271", "0.53498054", "0.5348748", "0.5343154", "0.5342576", "0.5332596", "0.5327269", "0.5327269", "0.53215045", "0.531952", "0.53119284", "0.53114146", "0.53099674", "0.5309611", "0.5306392", "0.5302774", "0.53015894", "0.5297017", "0.5290399", "0.52871203", "0.52871203", "0.52760744", "0.5274474", "0.52695096", "0.52662796", "0.52662796", "0.52662796", "0.52662796", "0.52645344", "0.52622217" ]
0.57170254
17