conflict_resolution
stringlengths
27
16k
<<<<<<< const SpanAggregator = require('./spans/aggregator') const TransactionTraceAggregator = require('./transaction/trace/aggregator') ======= const SpanEventAggregator = require('./spans/span-event-aggregator') const TraceAggregator = require('./transaction/trace/aggregator') >>>>>>> const TransactionTraceAggregator = require('./transaction/trace/aggregator') const SpanEventAggregator = require('./spans/span-event-aggregator') <<<<<<< agent.traces.reconfigure(agent.config) const enableTraces = agent.config.transaction_tracer.enabled && agent.config.collect_traces ======= agent.spanEventAggregator.reconfigure(agent.config) >>>>>>> agent.traces.reconfigure(agent.config) const enableTraces = agent.config.transaction_tracer.enabled && agent.config.collect_traces agent.spanEventAggregator.reconfigure(agent.config) <<<<<<< this.traces.stop() ======= this.spanEventAggregator.stop() >>>>>>> this.traces.stop() this.spanEventAggregator.stop() <<<<<<< this.traces.send() ======= this.spanEventAggregator.send() >>>>>>> this.traces.send() this.spanEventAggregator.send()
<<<<<<< const stream = this._connectSpans(this._endpoint, this._licenseKey, this._runId) this._setState(connectionStates.connected, stream) // any future stream connect/disconnect after initial connection // should have a 15 second backoff this._setStreamBackoffAfterInitialStreamSetup() ======= this._incrementTries() this.stream = this._connectSpans(this._endpoint, this._licenseKey, this._runId) this._setState(connectionStates.connected, this.stream) >>>>>>> this.stream = this._connectSpans(this._endpoint, this._licenseKey, this._runId) this._setState(connectionStates.connected, this.stream) // any future stream connect/disconnect after initial connection // should have a 15 second backoff this._setStreamBackoffAfterInitialStreamSetup() <<<<<<< _setStreamBackoffAfterInitialStreamSetup() { this._streamBackoffSeconds = this._backoffOpts.seconds ======= /** * End the current stream and set state to disconnected. * * No more data can be sent until connected again. */ disconnect() { if (this._state === connectionStates.disconnected) { return } this._disconnectWithoutReconnect() } /** * Resets tries to 0, as though this was the first attempt */ _resetTries() { this._tries = 0 } /** * Increments tries */ _incrementTries() { this._tries++ >>>>>>> _setStreamBackoffAfterInitialStreamSetup() { this._streamBackoffSeconds = this._backoffOpts.seconds } /** * End the current stream and set state to disconnected. * * No more data can be sent until connected again. */ disconnect() { if (this._state === connectionStates.disconnected) { return } this._disconnectWithoutReconnect()
<<<<<<< this.transactionEventAggregator = new TransactionEventAggregator( { periodMs: config.event_harvest_config.report_period_ms, limit: config.event_harvest_config.harvest_limits.analytic_event_data }, this.collector, this.metrics ) ======= this.customEventAggregator = new CustomEventAggregator( { periodMs: config.event_harvest_config.report_period_ms, limit: config.event_harvest_config.harvest_limits.custom_event_data }, this.collector, this.metrics ) >>>>>>> this.transactionEventAggregator = new TransactionEventAggregator( { periodMs: config.event_harvest_config.report_period_ms, limit: config.event_harvest_config.harvest_limits.analytic_event_data }, this.collector, this.metrics ) this.customEventAggregator = new CustomEventAggregator( { periodMs: config.event_harvest_config.report_period_ms, limit: config.event_harvest_config.harvest_limits.custom_event_data }, this.collector, this.metrics ) <<<<<<< agent.transactionEventAggregator.reconfigure(agent.config) ======= agent.customEventAggregator.reconfigure(agent.config) >>>>>>> agent.transactionEventAggregator.reconfigure(agent.config) agent.customEventAggregator.reconfigure(agent.config) <<<<<<< if (agent.config.transaction_events.enabled) { agent.transactionEventAggregator.start() } ======= if (agent.config.custom_insights_events.enabled) { agent.customEventAggregator.start() } >>>>>>> if (agent.config.transaction_events.enabled) { agent.transactionEventAggregator.start() } if (agent.config.custom_insights_events.enabled) { agent.customEventAggregator.start() } <<<<<<< if (agent.config.transaction_events.enabled) { agent.transactionEventAggregator.start() } ======= if (agent.config.custom_insights_events.enabled) { agent.customEventAggregator.start() } >>>>>>> if (agent.config.transaction_events.enabled) { agent.transactionEventAggregator.start() } if (agent.config.custom_insights_events.enabled) { agent.customEventAggregator.start() } <<<<<<< this.transactionEventAggregator.stop() ======= this.customEventAggregator.stop() >>>>>>> this.transactionEventAggregator.stop() this.customEventAggregator.stop() <<<<<<< this.transactionEventAggregator.clear() ======= // TODO: Same pattern as _resetErrors for clearing. Not responsibility of // agent to new up collection. if (!this.events) { this.events = new PriorityQueue() } this.events.setLimit(this.config.transaction_events.max_samples_per_minute) >>>>>>> this.transactionEventAggregator.clear() <<<<<<< this.transactionEventAggregator.send() ======= this.customEventAggregator.send() >>>>>>> this.transactionEventAggregator.send() this.customEventAggregator.send()
<<<<<<< const TransactionTraceAggregator = require('./transaction/trace/aggregator') ======= const TraceAggregator = require('./transaction/trace/aggregator') const TransactionEventAggregator = require('./transaction/transaction-event-aggregator') >>>>>>> const TransactionTraceAggregator = require('./transaction/trace/aggregator') const TransactionEventAggregator = require('./transaction/transaction-event-aggregator') <<<<<<< agent.traces.reconfigure(agent.config) const enableTraces = agent.config.transaction_tracer.enabled && agent.config.collect_traces ======= agent.transactionEventAggregator.reconfigure(agent.config) >>>>>>> agent.traces.reconfigure(agent.config) const enableTraces = agent.config.transaction_tracer.enabled && agent.config.collect_traces agent.transactionEventAggregator.reconfigure(agent.config) <<<<<<< this.traces.stop() ======= this.transactionEventAggregator.stop() >>>>>>> this.traces.stop() this.transactionEventAggregator.stop() <<<<<<< this.traces.send() ======= this.transactionEventAggregator.send() >>>>>>> this.traces.send() this.transactionEventAggregator.send()
<<<<<<< ======= it('should be able to create a flat JSONifiable version', function() { var pub = configuration.publicSettings() // The object returned from Config.publicSettings // should not have any values of type object for (var key in pub) { if (pub[key] !== null) { expect(typeof pub[key]).not.equal('object') } } }) it('should not return serialized attributeFilter object from publicSettings', () => { var pub = configuration.publicSettings() var result = Object.keys(pub).some((key) => { return key.includes('attributeFilter') }) expect (result).to.be.false }) it('should not return serialized mergeServerConfig props from publicSettings', function() { var pub = configuration.publicSettings() var result = Object.keys(pub).some((key) => { return key.includes('mergeServerConfig') }) expect(result).to.be.false } ) >>>>>>>
<<<<<<< ======= t.plan(13) >>>>>>> t.plan(13) <<<<<<< }) } ) ======= var pool = mysql.createPool(config) helper.runInTransaction(agent, function transactionInScope(txn) { pool.query('SELECT 1 + 1 AS solution', function(err) { var seg = txn.trace.root.children[0].children[1] // In the case where you don't have a server running on // localhost the data will still be correctly associated // with the query. _t.ok(seg, 'there is a segment') _t.equal( seg.parameters.host, agent.config.getHostnameSafe(), 'set host' ) _t.equal( seg.parameters.port_path_or_id, socketPath, 'set path' ) _t.equal( seg.parameters.database_name, DBNAME, 'set database name' ) txn.end(pool.end.bind(pool, _t.end)) }) }) } ) }) >>>>>>> var pool = mysql.createPool(config) helper.runInTransaction(agent, function transactionInScope(txn) { pool.query('SELECT 1 + 1 AS solution', function(err) { var seg = txn.trace.root.children[0].children[1] // In the case where you don't have a server running on // localhost the data will still be correctly associated // with the query. _t.ok(seg, 'there is a segment') _t.equal( seg.parameters.host, agent.config.getHostnameSafe(), 'set host' ) _t.equal( seg.parameters.port_path_or_id, socketPath, 'set path' ) _t.equal( seg.parameters.database_name, DBNAME, 'set database name' ) txn.end(pool.end.bind(pool, _t.end)) }) }) } ) }) <<<<<<< ======= _t.ifError(err, 'no error ocurred') _t.ok(transxn, 'transaction should exit') _t.ok(segment, 'segment should exit') _t.ok(segment.timer.start > 0, 'starts at a postitive time') _t.ok(segment.timer.start <= Date.now(), 'starts in past') _t.equal(segment.name, 'MySQL pool.query', 'is named') >>>>>>>
<<<<<<< shimmer.wrapMethod(net.Server.prototype, 'net.Server.prototype', 'listen', function (listen) { ======= shimmer.wrapMethod(net && net.Server && net.Server.prototype, 'net.Server.prototype', 'listen', function (original) { >>>>>>> shimmer.wrapMethod(net && net.Server && net.Server.prototype, 'net.Server.prototype', 'listen', function (listen) {
<<<<<<< } else if (endpointName === 'span_event_data') { aggregatorCheckOnEnd(agent.spanEventAggregator) ======= } else if (endpointName === 'custom_event_data') { aggregatorCheckOnEnd(agent.customEventAggregator) >>>>>>> } else if (endpointName === 'span_event_data') { aggregatorCheckOnEnd(agent.spanEventAggregator) } else if (endpointName === 'custom_event_data') { aggregatorCheckOnEnd(agent.customEventAggregator)
<<<<<<< var start = segment.timer.startedRelativeTo(segment.transaction.trace.root.timer) var duration = segment.getDurationInMillis() ======= segment.addAttribute( 'nr_exclusive_duration_millis', segment.getExclusiveDurationInMillis() ) const start = segment.timer.startedRelativeTo(segment.transaction.trace.root.timer) const duration = segment.getDurationInMillis() >>>>>>> const start = segment.timer.startedRelativeTo(segment.transaction.trace.root.timer) const duration = segment.getDurationInMillis()
<<<<<<< return original.apply(this, arguments) } }) ======= }) wrap( process, 'process', 'emit', function wrapEmit(original) { return function wrappedEmit(ev, error, promise) { // Check for unhandledRejections here so we don't change the // behavior of the event if (ev === 'unhandledRejection' && error && !process.domain) { if (listenerCount(process, 'unhandledRejection') === 0) { // If there are no unhandledRejection handlers report the error var transaction = promise.__NR_segment && promise.__NR_segment.transaction agent.errors.add(transaction, error) } } return original.apply(this, arguments) } } ) } else { wrap( process, 'process', 'emit', function wrapEmit(original) { return function wrappedEmit(ev, error, promise) { if (ev === 'uncaughtException' && error && !process.domain) { agent.errors.add(null, error) agent.tracer.segment = null } // Check for unhandledRejections here so we don't change the // behavior of the event if (ev === 'unhandledRejection' && error && !process.domain) { // If there are no unhandledRejection handlers report the error if (listenerCount(process, 'unhandledRejection') === 0) { var transaction = promise.__NR_segment && promise.__NR_segment.transaction agent.errors.add(transaction, error) } } return original.apply(this, arguments) } } ) } >>>>>>> return original.apply(this, arguments) } }) wrap( process, 'process', 'emit', function wrapEmit(original) { return function wrappedEmit(ev, error, promise) { // Check for unhandledRejections here so we don't change the // behavior of the event if (ev === 'unhandledRejection' && error && !process.domain) { if (listenerCount(process, 'unhandledRejection') === 0) { // If there are no unhandledRejection handlers report the error var transaction = promise.__NR_segment && promise.__NR_segment.transaction agent.errors.add(transaction, error) } } return original.apply(this, arguments) } } )
<<<<<<< var path = require('path') , chai = require('chai') , expect = chai.expect , should = chai.should() , helper = require(path.join(__dirname, 'lib', 'agent_helper')) ; function readstub(dirname, callback) { process.nextTick(function () { // readdir is async callback(null, []); }); } ======= var path = require('path') , chai = require('chai') , expect = chai.expect , helper = require(path.join(__dirname, 'lib', 'agent_helper')) ; >>>>>>> var path = require('path') , chai = require('chai') , expect = chai.expect , should = chai.should() , helper = require(path.join(__dirname, 'lib', 'agent_helper')) ; function readstub(dirname, callback) { process.nextTick(function () { // readdir is async callback(null, []); }); } <<<<<<< var fs , readdir , agent ; beforeEach(function () { fs = require('fs'); readdir = fs.readdir; fs.readdir = readstub; agent = helper.instrumentMockedAgent(); }); afterEach(function () { helper.unloadAgent(agent); fs.readdir = readdir; }); ======= describe("shouldn't cause bootstrapping to fail", function () { var agent , initialize ; before(function () { agent = helper.loadMockedAgent(); initialize = require(path.join(__dirname, '..', 'lib', 'instrumentation', 'core', 'fs')); }); it("when passed no module", function () { expect(function () { initialize(agent); }).not.throws(); }); it("when passed an empty module", function () { expect(function () { initialize(agent, {}); }).not.throws(); }); }); >>>>>>> var fs , readdir , agent ; beforeEach(function () { fs = require('fs'); readdir = fs.readdir; fs.readdir = readstub; agent = helper.instrumentMockedAgent(); }); afterEach(function () { helper.unloadAgent(agent); fs.readdir = readdir; }); describe("shouldn't cause bootstrapping to fail", function () { var agent , initialize ; before(function () { agent = helper.loadMockedAgent(); initialize = require(path.join(__dirname, '..', 'lib', 'instrumentation', 'core', 'fs')); }); it("when passed no module", function () { expect(function () { initialize(agent); }).not.throws(); }); it("when passed an empty module", function () { expect(function () { initialize(agent, {}); }).not.throws(); }); });
<<<<<<< const result = await client.player.addToQueue(message.guild.id, args[0]); if(!result) { message.member.voice.channel.leave() return message.channel.send(`This song provider is not supported...`) }; ======= const result = await client.player.addToQueue(message.guild.id, args.join(" ")).catch(() => {}); if(!result) return message.channel.send(`This song provider is not supported...`); >>>>>>> const result = await client.player.addToQueue(message.guild.id, args.join(" ")).catch(() => {}); if(!result) { message.member.voice.channel.leave() return message.channel.send(`This song provider is not supported...`) };
<<<<<<< ======= nagged = parseInt(localStorage.nagged, 10); if (g.season === g.startingSeason + 3 && g.lid > 3 && nagged === 0) { localStorage.nagged = "1"; return dao.messages.add({ ot: tx, value: { read: false, from: "The Commissioner", year: g.season, text: '<p>Hi. Sorry to bother you, but I noticed that you\'ve been playing this game a bit. Hopefully that means you like it. Either way, we would really appreciate some feedback so we can make this game better. <a href="mailto:[email protected]">Send an email</a> ([email protected]) or <a href="http://www.reddit.com/r/BasketballGM/">join the discussion on Reddit</a>.</p>' } }); } if ((nagged === 1 && Math.random() < 0.25) || (nagged >= 2 && Math.random < 0.025)) { localStorage.nagged = "2"; return dao.messages.add({ ot: tx, value: { read: false, from: "The Commissioner", year: g.season, text: '<p>Hi. Sorry to bother you again, but if you like the game, please share it with your friends! Also:</p><p><a href="https://twitter.com/basketball_gm">Follow Basketball GM on Twitter</a></p><p><a href="https://www.facebook.com/basketball.general.manager">Like Basketball GM on Facebook</a></p><p><a href="http://www.reddit.com/r/BasketballGM/">Discuss Basketball GM on Reddit</a></p><p>The more people that play Basketball GM, the more motivation I have to continue improving it. So it is in your best interest to help me promote the game! If you have any other ideas, please <a href="mailto:[email protected]">email me</a>.</p>' } }); } // Skipping 3, obsolete if ((nagged >= 2 && nagged <= 3 && Math.random() < 0.5) || (nagged >= 4 && Math.random < 0.05)) { if (g.enableLogging) { _gaq.push(["_trackEvent", "Ad Display", "Sports Mogul"]); } localStorage.nagged = "4"; return dao.messages.add({ ot: tx, value: { read: false, from: "The Commissioner", year: g.season, text: '<p>Did you know that Basketball GM was inspired by an incredible game called <a href="http://sportsmogul.com/games/baseball2k16.html">Baseball Mogul</a>? Without Baseball Mogul, Basketball GM probably wouldn\'t even exist. So if you\'re a baseball fan, do yourself a favor and check it out. The UI is similar to Basketball GM, so you\'ll be able to pick it up quickly and start winning championships in no time!</p><p>The creators of Baseball Mogul also made a great football sim called <a href="http://sportsmogul.com/games/football16.html">Football Mogul</a> that you should try too.</p>' } }); } }).then(function () { >>>>>>>
<<<<<<< 'GS': { desc: 'Games Started', sortSequence: ['desc', 'asc'], sortType: 'number', }, 'GmSc': { desc: 'Game Score', sortSequence: ['desc', 'asc'], sortType: 'number', }, ======= 'HOF': {}, >>>>>>> 'GS': { desc: 'Games Started', sortSequence: ['desc', 'asc'], sortType: 'number', }, 'GmSc': { desc: 'Game Score', sortSequence: ['desc', 'asc'], sortType: 'number', }, 'HOF': {}, <<<<<<< 'Last Playoffs': { sortType: 'number', }, 'Last Season': { desc: 'Last Season with Team', sortSequence: ['desc', 'asc'], sortType: 'number', }, 'Last Title': { sortType: 'number', }, ======= 'Last': { sortSequence: ['desc', 'asc'], sortType: 'number', }, >>>>>>> 'Last Playoffs': { sortType: 'number', }, 'Last Season': { desc: 'Last Season with Team', sortSequence: ['desc', 'asc'], sortType: 'number', }, 'Last Title': { sortType: 'number', }, 'Last': { sortSequence: ['desc', 'asc'], sortType: 'number', },
<<<<<<< this.id = id['$id'] || id['$oid'] || id; ======= this.id = id; } }, thunkId: function(id) { if (typeof id === 'object' && id['$genghisType'] == 'ObjectId') { return id['$value']; } else { return id; >>>>>>> this.id = id; } }, thunkId: function(id) { if (typeof id === 'object' && id['$genghisType'] == 'ObjectId') { return id['$value']; } else { return id; <<<<<<< if (resp['_id']) { this.id = resp['_id']['$id'] || resp['_id']['$oid'] || resp['_id']; ======= var id = this.thunkId(resp['_id']); if (id) { this.id = id; >>>>>>> var id = this.thunkId(resp['_id']); if (id) { this.id = id; <<<<<<< return JSON.stringify(this.toJSON(), null, 4); }, readOnly: function() { return Genghis.features.readOnly || false; ======= // TODO: update formatJSON to do a string concat version // so we don't have to build a bunch of elements just to // tear 'em down. return $('<div>' + this.prettyPrint() + '</div>').text(); >>>>>>> // TODO: update formatJSON to do a string concat version // so we don't have to build a bunch of elements just to // tear 'em down. return $('<div>' + this.prettyPrint() + '</div>').text(); }, readOnly: function() { return Genghis.features.readOnly || false;
<<<<<<< area_streamgraph: "Stream", stream_year: "Year", stream_doc_num: "Number of documents", stream_docs: "Documents", stream_total: "Total", ======= empty_area_warning: "No matches found. Please reset your filter options above.", >>>>>>> area_streamgraph: "Stream", stream_year: "Year", stream_doc_num: "Number of documents", stream_docs: "Documents", stream_total: "Total", empty_area_warning: "No matches found. Please reset your filter options above.", <<<<<<< area_streamgraph: "Schlagwort", stream_year: "Jahr", stream_doc_num: "Anzahl Dokumente", stream_docs: "Dokumente", stream_total: "Gesamt", ======= empty_area_warning: "Keine Dokumente gefunden. Setzen Sie bitte Ihre Filtereinstellungen zurück.", >>>>>>> area_streamgraph: "Schlagwort", stream_year: "Jahr", stream_doc_num: "Anzahl Dokumente", stream_docs: "Dokumente", stream_total: "Gesamt", empty_area_warning: "Keine Dokumente gefunden. Setzen Sie bitte Ihre Filtereinstellungen zurück.", <<<<<<< area_streamgraph: "Stream", stream_year: "Year", stream_doc_num: "Number of documents", stream_docs: "Documents", stream_total: "Total", ======= empty_area_warning: "No matches found. Please reset your filter options above.", >>>>>>> area_streamgraph: "Stream", stream_year: "Year", stream_doc_num: "Number of documents", stream_docs: "Documents", stream_total: "Total", empty_area_warning: "No matches found. Please reset your filter options above.", <<<<<<< area_streamgraph: "Stream", stream_year: "Year", stream_doc_num: "Number of documents", stream_docs: "Documents", stream_total: "Total", ======= empty_area_warning: "No matches found. Please reset your filter options above.", >>>>>>> area_streamgraph: "Stream", stream_year: "Year", stream_doc_num: "Number of documents", stream_docs: "Documents", stream_total: "Total", empty_area_warning: "No matches found. Please reset your filter options above.", <<<<<<< area_streamgraph: "Stream", stream_year: "Year", stream_doc_num: "Number of documents", stream_docs: "Documents", stream_total: "Total", ======= empty_area_warning: "No matches found. Please reset your filter options above.", >>>>>>> area_streamgraph: "Stream", stream_year: "Year", stream_doc_num: "Number of documents", stream_docs: "Documents", stream_total: "Total", empty_area_warning: "No matches found. Please reset your filter options above.", <<<<<<< area_streamgraph: "Schlagwort", stream_year: "Jahr", stream_doc_num: "Anzahl Dokumente", stream_docs: "Dokumente", stream_total: "Gesamt", ======= empty_area_warning: "Keine Dokumente gefunden. Setzen Sie bitte Ihre Filtereinstellungen zurück.", >>>>>>> area_streamgraph: "Schlagwort", stream_year: "Jahr", stream_doc_num: "Anzahl Dokumente", stream_docs: "Dokumente", stream_total: "Gesamt", empty_area_warning: "Keine Dokumente gefunden. Setzen Sie bitte Ihre Filtereinstellungen zurück.", <<<<<<< area_streamgraph: "Schlagwort", stream_year: "Jahr", stream_doc_num: "Anzahl Dokumente", stream_docs: "Dokumente", stream_total: "Gesamt", ======= empty_area_warning: "Keine Dokumente gefunden. Setzen Sie bitte Ihre Filtereinstellungen zurück.", >>>>>>> area_streamgraph: "Schlagwort", stream_year: "Jahr", stream_doc_num: "Anzahl Dokumente", stream_docs: "Dokumente", stream_total: "Gesamt", empty_area_warning: "Keine Dokumente gefunden. Setzen Sie bitte Ihre Filtereinstellungen zurück.", <<<<<<< area_streamgraph: "Stream", stream_year: "Year", stream_doc_num: "Number of documents", stream_docs: "Documents", stream_total: "Total", ======= empty_area_warning: "No matches found. Please reset your filter options above.", >>>>>>> area_streamgraph: "Stream", stream_year: "Year", stream_doc_num: "Number of documents", stream_docs: "Documents", stream_total: "Total", empty_area_warning: "No matches found. Please reset your filter options above.", <<<<<<< area_streamgraph: "Stream", stream_year: "Year", stream_doc_num: "Number of documents", stream_docs: "Documents", stream_total: "Total", ======= empty_area_warning: "No matches found. Please reset your filter options above.", >>>>>>> area_streamgraph: "Stream", stream_year: "Year", stream_doc_num: "Number of documents", stream_docs: "Documents", stream_total: "Total", empty_area_warning: "No matches found. Please reset your filter options above.",
<<<<<<< highlightTerms: function(full_string, term_array) { let result_string = full_string; for (let term of term_array) { let re = new RegExp("\\b(" + term + ")\\b" ,"gi"); result_string = result_string.replace(re, "<span class=\"query_term_highlight\">$1</span>"); } return result_string; }, //Get all terms in a query minus operators getQueryTerms: function (context) { if(!context.hasOwnProperty("query")) { return; } let full_query = context.query; //let query_wt_exclusions = full_query.replace(/(^|\s)-[^\s]*/g, " "); //query_wt_exclusions = query_wt_exclusions.replace(/(^|\s)-\"(.*?)\"/g, " "); //query_wt_exclusions = query_wt_exclusions.replace(/(^|\s)-\((.*?)\)/g, " "); //XRegExp.matchRecursive(str, '\\(', '\\)', 'g'); //Get all phrases and remove inverted commas from results let match_query = /\"(.*?)\"/g; let term_array = full_query.match(match_query); if(term_array !== null) term_array.map(function(x){return x.replace(/\"/g, '');}); else term_array = []; //Remove phrases, and, or, +, -, (, ) from query string let query_wt_phrases = full_query.replace(match_query, " "); let query_wt_rest = query_wt_phrases.replace(/\band\b|\bor\b|\(|\)/g, "").replace(/(^|\s)-|\+/g, " "); term_array = term_array.concat(query_wt_rest.trim().replace(/\s+/g, " ").split(" ")); return term_array; }, ======= convertToSafeID: function (id) { let id_string = id.toString(); return id_string.replace(/[^a-zA-Z0-9]/g, function(s) { var c = s.charCodeAt(0); if (c === 32) return '-'; return '__' + ('000' + c.toString(16)).slice(-4); }); }, >>>>>>> convertToSafeID: function (id) { let id_string = id.toString(); return id_string.replace(/[^a-zA-Z0-9]/g, function(s) { var c = s.charCodeAt(0); if (c === 32) return '-'; return '__' + ('000' + c.toString(16)).slice(-4); }); }, highlightTerms: function(full_string, term_array) { let result_string = full_string; for (let term of term_array) { let re = new RegExp("\\b(" + term + ")\\b" ,"gi"); result_string = result_string.replace(re, "<span class=\"query_term_highlight\">$1</span>"); } return result_string; }, //Get all terms in a query minus operators getQueryTerms: function (context) { if(!context.hasOwnProperty("query")) { return; } let full_query = context.query; //let query_wt_exclusions = full_query.replace(/(^|\s)-[^\s]*/g, " "); //query_wt_exclusions = query_wt_exclusions.replace(/(^|\s)-\"(.*?)\"/g, " "); //query_wt_exclusions = query_wt_exclusions.replace(/(^|\s)-\((.*?)\)/g, " "); //XRegExp.matchRecursive(str, '\\(', '\\)', 'g'); //Get all phrases and remove inverted commas from results let match_query = /\"(.*?)\"/g; let term_array = full_query.match(match_query); if(term_array !== null) term_array.map(function(x){return x.replace(/\"/g, '');}); else term_array = []; //Remove phrases, and, or, +, -, (, ) from query string let query_wt_phrases = full_query.replace(match_query, " "); let query_wt_rest = query_wt_phrases.replace(/\band\b|\bor\b|\(|\)/g, "").replace(/(^|\s)-|\+/g, " "); term_array = term_array.concat(query_wt_rest.trim().replace(/\s+/g, " ").split(" ")); return term_array; },
<<<<<<< const OAInfoTemplate = require("templates/info_modal_content/oa_info_modal.handlebars") const CRISInfoTemplate = require("templates/info_modal_content/cris_info_modal.handlebars") ======= const ViperInfoTemplate = require("templates/modals/viper_info_modal.handlebars") >>>>>>> const ViperInfoTemplate = require("templates/modals/viper_info_modal.handlebars") const CRISInfoTemplate = require("templates/info_modal_content/cris_info_modal.handlebars")
<<<<<<< const listEntryTemplateCris = require("templates/list/cris/list_entry_cris.handlebars"); const listSubEntryTemplateCris = require("templates/list/cris/list_subentry_cris.handlebars"); const listSubEntryStatisticsTemplateCris = require("templates/list/cris/list_subentry_statistics_cris.handlebars"); const listSubEntryStatisticDistributionTemplateCris = require("templates/list/cris/list_subentry_statistic_distribution_cris.handlebars"); const viperOutlinkTemplate = require("templates/list/viper_outlink.handlebars"); const viperMetricTemplate = require('templates/list/viper_metrics.handlebars'); ======= const doiOutlinkTemplate = require("templates/list/doi_outlink.handlebars"); const listMetricTemplate = require('templates/list/list_metrics.handlebars'); >>>>>>> const listEntryTemplateCris = require("templates/list/cris/list_entry_cris.handlebars"); const listSubEntryTemplateCris = require("templates/list/cris/list_subentry_cris.handlebars"); const listSubEntryStatisticsTemplateCris = require("templates/list/cris/list_subentry_statistics_cris.handlebars"); const listSubEntryStatisticDistributionTemplateCris = require("templates/list/cris/list_subentry_statistic_distribution_cris.handlebars"); const doiOutlinkTemplate = require("templates/list/doi_outlink.handlebars"); const listMetricTemplate = require('templates/list/list_metrics.handlebars');
<<<<<<< height, disableClicks, ======= >>>>>>> disableClicks, <<<<<<< height: state.list.height, disableClicks: state.list.disableClicks, ======= >>>>>>> disableClicks: state.list.disableClicks,
<<<<<<< height, disableClicks, ======= >>>>>>> disableClicks, <<<<<<< height: state.list.height, disableClicks: state.list.disableClicks, ======= >>>>>>> disableClicks: state.list.disableClicks,
<<<<<<< if(config.highlight_query_terms) { for (let field of config.highlight_query_fields) { d[field] = _this.highlightTerms(d[field], _this.query_terms); } } ======= d.comments_for_filtering = _this.createCommentStringForFiltering(d.comments); >>>>>>> d.comments_for_filtering = _this.createCommentStringForFiltering(d.comments); if(config.highlight_query_terms) { for (let field of config.highlight_query_fields) { d[field] = _this.highlightTerms(d[field], _this.query_terms); } }
<<<<<<< const editTemplate = require("templates/misc/viper_edit_modal.handlebars"); const embedTemplate = require("templates/misc/viper_embed_modal.handlebars"); ======= const scaleToolbarTemplate = require("templates/misc/scale_toolbar.handlebars"); >>>>>>> const editTemplate = require("templates/misc/viper_edit_modal.handlebars"); const embedTemplate = require("templates/misc/viper_embed_modal.handlebars"); const scaleToolbarTemplate = require("templates/misc/scale_toolbar.handlebars"); <<<<<<< this.viz.append(editTemplate()); this.viz.append(embedTemplate()); ======= if (config.scale_types.length > 0) { this.viz.append(scaleToolbarTemplate()); } >>>>>>> this.viz.append(editTemplate()); this.viz.append(embedTemplate()); if (config.scale_types.length > 0) { this.viz.append(scaleToolbarTemplate()); }
<<<<<<< filter_options: ["all", "open_access", "publication", "dataset"], ======= sort_menu_dropdown: false, >>>>>>> filter_options: ["all", "open_access", "publication", "dataset"], sort_menu_dropdown: false, <<<<<<< filter_by_label: 'show: ', all: "any", open_access: "Open Access", publication: "papers", dataset: "datasets", items: "items", ======= sort_by_label: 'sort by:', scale_by_label: 'Scale map by:', >>>>>>> filter_by_label: 'show: ', all: "any", open_access: "Open Access", publication: "papers", dataset: "datasets", items: "items", sort_by_label: 'sort by:', scale_by_label: 'Scale map by:',
<<<<<<< failWith(` Value of variable "k" violates contract. Expected: { captureTime: number } Got: { x: number; } `, 'bug-107-type-alias', 123); ======= okWithOptions('pragma-opt-in', { only: ['test'] }, 1); failWithOptions('pragma-opt-in', { only: ['production'] }, 1); okWithOptions('pragma-opt-in', { only: ['production'] }, 'a'); failWithOptions('pragma-opt-in', { only: ['test', 'production'] }, 1); okWithOptions('pragma-opt-in', { only: ['test', 'production'] }, 'a'); ok('pragma-opt-in', 'a'); >>>>>>> failWith(` Value of variable "k" violates contract. Expected: { captureTime: number } Got: { x: number; } `, 'bug-107-type-alias', 123); okWithOptions('pragma-opt-in', { only: ['test'] }, 1); failWithOptions('pragma-opt-in', { only: ['production'] }, 1); okWithOptions('pragma-opt-in', { only: ['production'] }, 'a'); failWithOptions('pragma-opt-in', { only: ['test', 'production'] }, 1); okWithOptions('pragma-opt-in', { only: ['test', 'production'] }, 'a'); ok('pragma-opt-in', 'a');
<<<<<<< module.exports = function () { ======= function createArrayStream(arr) { let i = 0; const l = arr.length; return new stream.Readable({ objectMode: true, read() { this.push(i < l ? arr[i++] : null); } }); } describe('RdfStore', () => { >>>>>>> function createArrayStream(arr) { let i = 0; const l = arr.length; return new stream.Readable({ objectMode: true, read() { this.push(i < l ? arr[i++] : null); } }); } module.exports = function () {
<<<<<<< // get(matchTerms, opts, cb) { // if (_.isFunction(opts)) { // cb = opts; // opts = {}; // } // if (_.isNil(matchTerms)) matchTerms = {}; // if (_.isNil(opts)) opts = {}; // assert(_.isObject(matchTerms), 'The "matchTerms" argument is not an object.'); // assert(_.isObject(opts), 'The "opts" argument is not an object.'); // const quads = []; // this.createReadStream(matchTerms, opts) // .on('data', (quad) => { quads.push(quad); }) // .on('end', () => { cb(null, quads); }) // .on('error', (err) => { cb(err); }); // } put(quads, opts, cb) { const store = this; if (_.isFunction(opts)) { cb = opts; opts = {}; } if (_.isNil(opts)) opts = {}; assert(_.isObject(quads), 'The "quads" argument is not an object or an array.'); if (!Array.isArray(quads)) quads = [quads]; return QuadStore.prototype.put.call(this, quads.map(quad => store._importQuad(quad)), opts, cb); } del(quads, opts, cb) { const store = this; if (_.isFunction(opts)) { cb = opts; opts = {}; } if (_.isNil(opts)) opts = {}; assert(_.isObject(quads), 'The "quads" argument is not an object or an array.'); if (!Array.isArray(quads)) quads = [quads]; return QuadStore.prototype.del.call(this, quads.map(quad => store._importQuad(quad)), opts, cb); } ======= >>>>>>> <<<<<<< return QuadStore.prototype._delput.call(this, oldQuads.map(quad => store._importQuad(quad)), newQuads.map(quad => store._importQuad(quad)), opts, cb); ======= QuadStore.prototype._delput.call(this, oldQuads.map(quad => store._importQuad(quad)), newQuads.map(quad => store._importQuad(quad)), opts, cb); >>>>>>> return QuadStore.prototype._delput.call(this, oldQuads.map(quad => store._importQuad(quad)), newQuads.map(quad => store._importQuad(quad)), opts, cb);
<<<<<<< has_help:false, ======= bamInfo:data.bamInfo, has_help: true, >>>>>>> has_help:false, bamInfo:data.bamInfo,
<<<<<<< var node, nodeName, obj, old, s, xpath, emptyStr; ======= var cdata, node, nodeName, obj, old, s, xpath; >>>>>>> var cdata, emptyStr, node, nodeName, obj, old, s, xpath; <<<<<<< if (obj[charkey].match(/^\s*$/)) { emptyStr = obj[charkey]; ======= if (obj[charkey].match(/^\s*$/) && !cdata) { >>>>>>> if (obj[charkey].match(/^\s*$/) && !cdata) { emptyStr = obj[charkey];
<<<<<<< $(function () { var queryParams = getQueryParams(); var layout = queryParams.layout || ''; var config = null; switch (layout.toLowerCase()) { case 'responsive': config = createResponsiveConfig(); break; default: config = createStandardConfig(); break; } window.myLayout = new GoldenLayout( config ); myLayout.registerComponent( 'hey', function( container, state ) { if( state.bg ) { container .getElement() .text( 'hey'); } }); myLayout.init(); function getQueryParams() { var params = {}; window.location.search.replace(/^\?/, '').split('&').forEach(function(pair) { var parts = pair.split('='); if (parts.length > 1) { params[decodeURIComponent(parts[0]).toLowerCase()] = decodeURIComponent(parts[1]); } }); return params; } function createStandardConfig() { return { content: [ ======= $(function () { var queryParams = getQueryParams(); var layout = queryParams.layout || ''; var config = null; switch (layout.toLowerCase()) { case 'tab-dropdown': config = createTabDropdownConfig(); break; default: config = createStandardConfig(); break; } window.myLayout = new GoldenLayout(config); myLayout.registerComponent('hey', function (container, state) { if (state.bg) { container .getElement() .text('hey'); } }); myLayout.init(); function getQueryParams() { var params = {}; window.location.search.replace(/^\?/, '').split('&').forEach(function (pair) { var parts = pair.split('='); if (parts.length > 1) { params[decodeURIComponent(parts[0]).toLowerCase()] = decodeURIComponent(parts[1]); } }); return params; } function createStandardConfig() { return { content: [ >>>>>>> $(function () { var queryParams = getQueryParams(); var layout = queryParams.layout || ''; var config = null; switch (layout.toLowerCase()) { case 'responsive': config = createResponsiveConfig(); break; case 'tab-dropdown': config = createTabDropdownConfig(); break; default: config = createStandardConfig(); break; } window.myLayout = new GoldenLayout( config ); myLayout.registerComponent( 'hey', function( container, state ) { if( state.bg ) { container .getElement() .text( 'hey'); } }); myLayout.init(); function getQueryParams() { var params = {}; window.location.search.replace(/^\?/, '').split('&').forEach(function (pair) { var parts = pair.split('='); if (parts.length > 1) { params[decodeURIComponent(parts[0]).toLowerCase()] = decodeURIComponent(parts[1]); } }); return params; } function createStandardConfig() { return { content: [
<<<<<<< //Files files(file_id) { return files(_callService, account_id, file_id) }, ======= //messages messages(message_id) { return messages(_callService, account_id, message_id); }, //messages sync() { return sync(_callService, account_id); }, //messages webhooks(webhook_id) { return webhooks(_callService, account_id, webhook_id); }, >>>>>>> //Files files(file_id) { return files(_callService, account_id, file_id) }, //messages messages(message_id) { return messages(_callService, account_id, message_id); }, //messages sync() { return sync(_callService, account_id); }, //messages webhooks(webhook_id) { return webhooks(_callService, account_id, webhook_id); },
<<<<<<< models.User.findById(userId) .then(function(user) { return user.validateCanUnLikePost(that.id) }) .then(function() { return database.sremAsync(mkKey(['post', that.id, 'likes']), userId) }) ======= database.zremAsync(mkKey(['post', that.id, 'likes']), userId) >>>>>>> database.zremAsync(mkKey(['post', that.id, 'likes']), userId) models.User.findById(userId) .then(function(user) { return user.validateCanUnLikePost(that.id) }) .then(function() { return database.zremAsync(mkKey(['post', that.id, 'likes']), userId) })
<<<<<<< var textRun = new docx.TextRun("שלום עולם").rightToLeft(); var paragraph = new docx.Paragraph().bidirectional(); paragraph.addRun(textRun); ======= >>>>>>>
<<<<<<< suite.hasTests = suite.tests.length > 0; suite.hasSuites = suite.suites.length > 0; ======= suite.skipped = skippedTests; suite.isEmpty = suite.tests.length === 0; suite.hasSkipped = suite.skipped.length > 0; >>>>>>> suite.skipped = skippedTests; suite.hasTests = suite.tests.length > 0; suite.hasSuites = suite.suites.length > 0; <<<<<<< suite.hasPasses = passingTests.length > 0; suite.hasFailures = failingTests.length > 0; suite.hasPending = pendingTests.length > 0; ======= suite.totalSkipped = skippedTests.length; >>>>>>> suite.totalSkipped = skippedTests.length; suite.hasPasses = passingTests.length > 0; suite.hasFailures = failingTests.length > 0; suite.hasPending = pendingTests.length > 0; suite.hasSkipped = suite.skipped.length > 0; <<<<<<< 'hasPasses', 'hasFailures', 'hasPending', ======= 'totalSkipped', >>>>>>> 'totalSkipped', 'hasPasses', 'hasFailures', 'hasPending', 'hasSkipped', <<<<<<< 'hasTests', 'hasSuites', ======= 'isEmpty', 'hasSkipped', >>>>>>>
<<<<<<< group = select.find("optgroup[label='" + element.text + "']"); if (!group.size()) { group = $("<optgroup />"); } group.attr('label', element.text).appendTo(select); return $.each(element.items, function(value, text) { ======= group = $("<optgroup />").attr('label', element.text).appendTo(select); return $.each(element.items, function(i, element) { var text, value; if (typeof element === "string") { value = i; text = element; } else { value = element.value; text = element.text; } >>>>>>> group = select.find("optgroup[label='" + element.text + "']"); if (!group.size()) { group = $("<optgroup />"); } group.attr('label', element.text).appendTo(select); return $.each(element.items, function(i, element) { var text, value; if (typeof element === "string") { value = i; text = element; } else { value = element.value; text = element.text; }
<<<<<<< function refreshToolbar() { const saveButton = $('#save-log'); $.get(baseUrl + '/recording/status/' + conversationId).then((res) => { if (res.status === 'on') { recording = true; $('#recording-toggle').prop("checked", true); saveButton.removeClass('hidden'); } else { recording = false; $('#recording-toggle').prop("checked", false); } }); $.get(baseUrl + '/recording/log/' + conversationId).then((res) => { if (res) saveButton.removeClass('hidden'); }); } function updateConnectionFeedback() { ======= function updateFeedback(thinking) { >>>>>>> function updateConnectionFeedback() {
<<<<<<< clean() { ======= componentDidMount() { if (this.props.autoFocus) { this.focus(0); } } clean = () => { >>>>>>> componentDidMount() { if (this.props.autoFocus) { this.focus(0); } } clean() {
<<<<<<< generateSelfAssignment: function() { ======= generateJavaScriptFunction: function(buffer, scope) { var self = this; buffer.write("("); self.generateJavaScript(buffer, scope); return buffer.write(")"); }, generateSelfAssignment: function(buffer) { >>>>>>> generateJavaScriptFunction: function(buffer, scope) { var self = this; buffer.write("("); self.generateJavaScript(buffer, scope); return buffer.write(")"); }, generateSelfAssignment: function() {
<<<<<<< .map(function (stack) { var millisOld = Date.now() - ((daysOld || 0) * ONE_DAY); if (regex.test(stack.StackName) && moment(stack.CreationTime).valueOf() < millisOld) { log('Cleaning up ' + stack.StackName + ' Created ' + stack.CreationTime); return self.delete(stack.StackName) .catch(function (err) { log('DELETE ERR: ', err); }); ======= .each(function (stack) { if (regex.test(stack.StackName) && stack.CreationTime < (Date.now() - ((minutesOld || 0) * ONE_MINUTE))) { stacks.push(stack); >>>>>>> .each(function (stack) { var millisOld = Date.now() - ((daysOld || 0) * ONE_DAY); if (regex.test(stack.StackName) && stack.CreationTime < millisOld) { stacks.push(stack);
<<<<<<< import BaseRenderer from "./BaseRenderer"; ======= import Subtitles from '../Subtitles'; import BaseRenderer from './BaseRenderer'; >>>>>>> import BaseRenderer from './BaseRenderer'; <<<<<<< if(newProps.subtitle!==this.props.subtitle) { for (let item of this.vidRef.textTracks) { if (item.id === newProps.subtitle){ item.mode = item.mode === "showing"?"hidden":"showing"; } else { item.mode = "hidden"; } } } if(newProps.paused!==this.props.paused) { if(newProps.paused) { ======= if (newProps.paused !== this.props.paused) { if (newProps.paused) { >>>>>>> if (newProps.subtitle !== this.props.subtitle) { if (this.activeTrack) { this.activeTrack.mode = 'hidden'; } const tracks = this.vidRef.textTracks; this.activeTrack = Object.keys(tracks).find(i => tracks[i].id === newProps.subtitle); if (this.activeTrack) { this.activeTrack = tracks[this.activeTrack]; this.activeTrack.mode = 'showing'; this.setOffset(newProps.seek); } } if (this.props.seek !== newProps.seek && this.activeTrack) { this.setOffset(newProps.seek); } if (newProps.paused !== this.props.paused) { if (newProps.paused) { <<<<<<< autoPlay> {this.props.subtitles.map(sub => <track kind={"subtitles"} src={"/api/mediacontent/subtitle/" + this.state.mediaItem.id + "/" + sub.value} id={sub.value} key={sub.value} mode="hidden"/>)} </video> ======= autoPlay /> <Subtitles vidRef={this.vidRef} item={this.state.mediaItem} file={this.state.subtitle} progress={this.state.progress} /> >>>>>>> autoPlay > {this.props.subtitles.map(sub => ( !sub.value ? '' : <track ref={this.onTrackRef} kind="subtitles" src={`/api/mediacontent/subtitle/${this.state.mediaItem.id}/${sub.value}`} id={sub.value} key={sub.value} mode="hidden" />))} </video>
<<<<<<< // prevent redraw untill media items have been loaded this.state.filters = filters; ======= >>>>>>> // prevent redraw untill media items have been loaded
<<<<<<< var EditorManager = brackets.getModule("editor/EditorManager"), AppInit = brackets.getModule("utils/AppInit"), ExtensionUtils = brackets.getModule("utils/ExtensionUtils"); // Lets make sure we have proper string polyfills needed by interactive linters require("lintIndicator"); ======= require("errorIndicator"); >>>>>>> // Lets make sure we have proper string polyfills needed by interactive linters require("lintIndicator");
<<<<<<< return pikabu; }); })(Mobify.$); ======= })(jQuery); >>>>>>> })(Mobify.$);
<<<<<<< const logMiddleware = require('../middleware/log-middleware') ======= const JiraClient = require('../models/jira-client') >>>>>>> const logMiddleware = require('../middleware/log-middleware') const JiraClient = require('../models/jira-client')
<<<<<<< return createValidator(vueTypes, name, { type }, getter, !!validate) ======= // If we are inheriting from a custom type, let's ignore the type property const extType = isPlainObject(type) && type.type ? null : type return createValidator(vueTypes, name, getter, { type: extType, validate: validate ? () => {} : undefined, }) >>>>>>> // If we are inheriting from a custom type, let's ignore the type property const extType = isPlainObject(type) && type.type ? null : type return createValidator(vueTypes, name, { type: extType }, getter, !!validate)
<<<<<<< if(json.video_duration) hash.videoDuration = json.video_duration; if(json.filter_type) hash.filterType = json.filter_type; if(json.has_audio) hash.hasAudio = json.has_audio; ======= hash.webLink = "https://www.instagram.com/p/" + json.code + "/" >>>>>>> hash.webLink = "https://www.instagram.com/p/" + json.code + "/" if(json.video_duration) hash.videoDuration = json.video_duration; if(json.filter_type) hash.filterType = json.filter_type; if(json.has_audio) hash.hasAudio = json.has_audio;
<<<<<<< export {default as FocusTrap} from './FocusTrap'; ======= export {default as withHotKeys} from './withHotKeys'; export {default as FocusTrap} from './FocusTrap'; export {default as HotKeyMapMixin} from './HotKeyMapMixin'; >>>>>>> export {default as withHotKeys} from './withHotKeys'; export {default as FocusTrap} from './FocusTrap';
<<<<<<< async componentDidMount(){ FCM.createNotificationChannel({ id: 'default', name: 'Default', description: 'used for example', priority: 'high' }) ======= async componentDidMount() { >>>>>>> async componentDidMount() { FCM.createNotificationChannel({ id: 'default', name: 'Default', description: 'used for example', priority: 'high' }) <<<<<<< channel: 'default', id: new Date().valueOf().toString(), // (optional for instant notification) title: "Test Notification with action", // as FCM payload body: "Force touch to reply", // as FCM payload (required) sound: "bell.mp3", // "default" or filename priority: "high", // as FCM payload click_action: "com.myapp.MyCategory", // as FCM payload - this is used as category identifier on iOS. badge: 10, // as FCM payload IOS only, set 0 to clear badges number: 10, // Android only ticker: "My Notification Ticker", // Android only auto_cancel: true, // Android only (default true) large_icon: "https://image.freepik.com/free-icon/small-boy-cartoon_318-38077.jpg", // Android only icon: "ic_launcher", // as FCM payload, you can relace this with custom icon you put in mipmap big_text: "Show when notification is expanded", // Android only sub_text: "This is a subText", // Android only color: "red", // Android only vibrate: 300, // Android only default: 300, no vibration if you pass 0 wake_screen: true, // Android only, wake up screen when notification arrives group: "group", // Android only picture: "https://google.png", // Android only bigPicture style ongoing: true, // Android only my_custom_data:'my_custom_field_value', // extra data you want to throw lights: true, // Android only, LED blinking (default false) show_in_foreground: true // notification when app is in foreground (local & remote) ======= id: new Date().valueOf().toString(), // (optional for instant notification) title: "Test Notification with action", // as FCM payload body: "Force touch to reply", // as FCM payload (required) sound: "bell.mp3", // "default" or filename priority: "high", // as FCM payload click_action: "com.myapp.MyCategory", // as FCM payload - this is used as category identifier on iOS. badge: 10, // as FCM payload IOS only, set 0 to clear badges number: 10, // Android only ticker: "My Notification Ticker", // Android only auto_cancel: true, // Android only (default true) large_icon: "https://image.freepik.com/free-icon/small-boy-cartoon_318-38077.jpg", // Android only icon: "ic_launcher", // as FCM payload, you can relace this with custom icon you put in mipmap big_text: "Show when notification is expanded", // Android only sub_text: "This is a subText", // Android only color: "red", // Android only vibrate: 300, // Android only default: 300, no vibration if you pass 0 wake_screen: true, // Android only, wake up screen when notification arrives group: "group", // Android only picture: "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png", // Android only bigPicture style ongoing: true, // Android only my_custom_data: "my_custom_field_value", // extra data you want to throw lights: true, // Android only, LED blinking (default false) show_in_foreground: true // notification when app is in foreground (local & remote) >>>>>>> channel: 'default', id: new Date().valueOf().toString(), // (optional for instant notification) title: "Test Notification with action", // as FCM payload body: "Force touch to reply", // as FCM payload (required) sound: "bell.mp3", // "default" or filename priority: "high", // as FCM payload click_action: "com.myapp.MyCategory", // as FCM payload - this is used as category identifier on iOS. badge: 10, // as FCM payload IOS only, set 0 to clear badges number: 10, // Android only ticker: "My Notification Ticker", // Android only auto_cancel: true, // Android only (default true) large_icon: "https://image.freepik.com/free-icon/small-boy-cartoon_318-38077.jpg", // Android only icon: "ic_launcher", // as FCM payload, you can relace this with custom icon you put in mipmap big_text: "Show when notification is expanded", // Android only sub_text: "This is a subText", // Android only color: "red", // Android only vibrate: 300, // Android only default: 300, no vibration if you pass 0 wake_screen: true, // Android only, wake up screen when notification arrives group: "group", // Android only picture: "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png", // Android only bigPicture style ongoing: true, // Android only my_custom_data: "my_custom_field_value", // extra data you want to throw lights: true, // Android only, LED blinking (default false) show_in_foreground: true // notification when app is in foreground (local & remote)
<<<<<<< // Since we make rendr files AMD friendly on app setup stage // we need to pretend that this code is pure commonjs // means no AMD-style require calls var requireAMD = require; var AppView, Backbone, BaseRouter, BaseView, ClientRouter, extractParamNamesRe, firstRender, plusRe, _; ======= var AppView, Backbone, BaseRouter, BaseView, ClientRouter, extractParamNamesRe, firstRender, plusRe, _, defaultRootPath; // Since we make rendr files AMD friendly on app setup stage // we need to pretend that this code is pure commonjs // means no AMD-style require calls var requireAMD = require; >>>>>>> // Since we make rendr files AMD friendly on app setup stage // we need to pretend that this code is pure commonjs // means no AMD-style require calls var requireAMD = require; var AppView, Backbone, BaseRouter, BaseView, ClientRouter, extractParamNamesRe, firstRender, plusRe, _, defaultRootPath; <<<<<<< ClientRouter.prototype.getView = function(key, callback) { var View = BaseView.getView(key, function(View) { // TODO: Make it function (err, View) if (!_.isFunction(View)) { throw new Error("View '" + key + "' not found."); } callback(View); }); ======= ClientRouter.prototype.getView = function(key, callback) { var View = BaseView.getView(key, this.options.entryPath, function(View) { // TODO: Make it function (err, View) if (!_.isFunction(View)) { throw new Error("View '" + key + "' not found."); } callback(View); }); >>>>>>> ClientRouter.prototype.getView = function(key, callback) { var View = BaseView.getView(key, this.options.entryPath, function(View) { // TODO: Make it function (err, View) if (!_.isFunction(View)) { throw new Error("View '" + key + "' not found."); } callback(View); });
<<<<<<< var _ = require('underscore') , Router = require('./router') , ViewEngine = require('./viewEngine') , middleware = require('./middleware'); ======= var Router = require('./router') , RestAdapter = require('./data_adapter/rest_adapter') , ViewEngine = require('./viewEngine'); >>>>>>> var _ = require('underscore') , Router = require('./router') , RestAdapter = require('./data_adapter/rest_adapter') , ViewEngine = require('./viewEngine') , middleware = require('./middleware'); <<<<<<< Server.prototype.defaultOptions = { dataAdapter: null, viewEngine: null, router: null, errorHandler: null, dumpExceptions: false, notFoundHandler: null, stashError: null, apiPath: '/api', paths: {} }; Server.prototype.initialize = function(expressApp) { // verify dataAdapter if (!this.options.dataAdapter) { throw new Error("Missing dataAdapter"); } ======= /* * Options keys: * - dataAdapter * - errorHandler * - viewEngine * - stashError * - paths * - entryPath */ exports.init = function(options, callback) { exports.dataAdapter = options.dataAdapter || new RestAdapter(options.dataAdapterConfig); >>>>>>> Server.prototype.defaultOptions = { dataAdapter: null, viewEngine: null, router: null, errorHandler: null, dumpExceptions: false, notFoundHandler: null, stashError: null, apiPath: '/api', paths: {} }; Server.prototype.initialize = function(expressApp) {
<<<<<<< ======= }, bower: { install: { options: { targetDir: './public/lib', layout: 'byComponent', install: true, verbose: true, cleanBowerDir: true } } }, env: { test: { NODE_ENV: 'test' } >>>>>>> }, env: { test: { NODE_ENV: 'test' } <<<<<<< ======= grunt.loadNpmTasks('grunt-bower-task'); grunt.loadNpmTasks('grunt-env'); >>>>>>> grunt.loadNpmTasks('grunt-env'); <<<<<<< grunt.registerTask('test', ['mochaTest']); ======= grunt.registerTask('test', ['env:test', 'mochaTest']); //Bower task. grunt.registerTask('install', ['bower']); >>>>>>> grunt.registerTask('test', ['env:test', 'mochaTest']);
<<<<<<< // console.log(this._script.moseySpeed , this.x , this.y); ======= this.setPosition(cc.p(this.x,this.y)) ; >>>>>>> this.setPosition(cc.p(this.x,this.y)) ; // console.log(this._script.moseySpeed , this.x , this.y);
<<<<<<< port: 443, db: { uri: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost/mean', options: { user: '', pass: '' } }, ======= port: 8443, db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost/mean', >>>>>>> port: 8443, db: { uri: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost/mean', options: { user: '', pass: '' } },
<<<<<<< if (_history.routes.length > 0) _history.forwardRoutes.push(_history.routes.pop()); console.log(_history.forwardRoutes); ======= >>>>>>> if (_history.routes.length > 0) _history.forwardRoutes.push(_history.routes.pop()); console.log(_history.forwardRoutes); <<<<<<< vm.$emit('history.goback') ======= >>>>>>> vm.$emit('history.goback') <<<<<<< for (var i = _history.routes.length - 2; i >= 0; i--) { if (vm.$route.fullPath == _history.routes[i]) { repeatCount++; _history.routes.pop(); } else break; } if (repeatCount > 0) { console.log("重复数:" + repeatCount) history.go(-1 * repeatCount); _history.beforeState = history.state.key; for (var idx = _history.forwardRoutes.length - 1; idx >= 0; idx--) { history.pushState({ key: genKey() }, '', _history.base + _history.forwardRoutes[idx]) } history.go(-1 * _history.forwardRoutes.length) repeatCount = 0; } ======= if (_history.routes.length > 0) _history.forwardRoutes.push(_history.routes.pop()); vm.$emit('history.goback') >>>>>>> for (var i = _history.routes.length - 2; i >= 0; i--) { if (vm.$route.fullPath == _history.routes[i]) { repeatCount++; _history.routes.pop(); } else break; } if (repeatCount > 0) { console.log("重复数:" + repeatCount) history.go(-1 * repeatCount); _history.beforeState = history.state.key; for (var idx = _history.forwardRoutes.length - 1; idx >= 0; idx--) { history.pushState({ key: genKey() }, '', _history.base + _history.forwardRoutes[idx]) } history.go(-1 * _history.forwardRoutes.length) repeatCount = 0; } <<<<<<< if (!_isRoot && repeatCount == 0) { if (_history.beforeState && e.state && Number(_history.beforeState.key) > Number(e.state.key)) { if (process.env.NODE_ENV == 'development') console.log('[router-storage]:additional go back'); goBack(); } else if (Number(_history.beforeState.key) != Number(e.state.key)) { if (process.env.NODE_ENV == 'development') console.log('[router-storage]:additional go forward'); goForward(); ======= if (!_isRoot) { if (_history.beforeState && e.state) { if (Number(_history.beforeState.key) > Number(e.state.key)) { if (process.env.NODE_ENV == 'development') console.log('[router-storage]:additional go back'); goBack(); } else if (Number(_history.beforeState.key) != Number(e.state.key)) { if (process.env.NODE_ENV == 'development') console.log('[router-storage]:additional go forward'); goForward(); } >>>>>>> if (!_isRoot && repeatCount == 0) { if (_history.beforeState && e.state && Number(_history.beforeState.key) > Number(e.state.key)) { if (process.env.NODE_ENV == 'development') console.log('[router-storage]:additional go back'); goBack(); } else if (Number(_history.beforeState.key) != Number(e.state.key)) { if (process.env.NODE_ENV == 'development') console.log('[router-storage]:additional go forward'); goForward();
<<<<<<< window.addEventListener('contextmenu', event => { ======= // Workaround for https://github.com/electron-userland/electron-webpack/issues/52 if (process.env.NODE_ENV !== "development") { window.staticResourcesPath = require("path") .join(remote.app.getAppPath(), "../static") .replace(/\\/g, "\\\\"); } else { window.staticResourcesPath = ""; } window.addEventListener("contextmenu", event => { >>>>>>> window.addEventListener('contextmenu', event => { <<<<<<< document.addEventListener('click', event => { let { target } = event; ======= (function(history) { var replaceState = history.replaceState; history.replaceState = function(_, __, path) { amplitude .getInstance() .logEvent("NAVIGATION", { destination: path ? path.slice(1) : path }); return replaceState.apply(history, arguments); }; })(window.history); document.addEventListener("click", event => { var target = event.target; >>>>>>> (function(history, ...args) { const { replaceState } = history; const newHistory = history; newHistory.replaceState = function(_, __, path) { amplitude.getInstance().logEvent('NAVIGATION', { destination: path ? path.slice(1) : path }); return replaceState.apply(history, args); }; })(window.history); document.addEventListener('click', event => { let { target } = event; <<<<<<< const hrefParts = window.location.href.split('#'); const element = target.title || (target.text && target.text.trim()); ======= let hrefParts = window.location.href.split("#"); let element = target.title || (target.textContent && target.textContent.trim()); >>>>>>> const hrefParts = window.location.href.split('#'); const element = target.title || (target.textContent && target.textContent.trim()); <<<<<<< amplitude.getInstance().logEvent('UNMARKED_CLICK', { location: hrefParts.length > 1 ? hrefParts[hrefParts.length - 1] : '/', ======= amplitude.getInstance().logEvent("UNMARKED_CLICK", { location: hrefParts.length > 1 ? hrefParts[hrefParts.length - 1] : "/", source: target.outerHTML, >>>>>>> amplitude.getInstance().logEvent('UNMARKED_CLICK', { location: hrefParts.length > 1 ? hrefParts[hrefParts.length - 1] : '/', source: target.outerHTML,
<<<<<<< import * as ACTIONS from 'constants/action_types'; import { selectHistoryStack, selectHistoryIndex } from 'redux/selectors/navigation'; import { toQueryString } from 'util/query_params'; import amplitude from 'amplitude-js'; ======= import * as types from "constants/action_types"; import { computePageFromPath, selectPageTitle, selectCurrentPage, selectCurrentParams, selectHistoryStack, selectHistoryIndex, } from "redux/selectors/navigation"; import { doSearch } from "redux/actions/search"; import { toQueryString } from "util/query_params"; >>>>>>> import * as ACTIONS from 'constants/action_types'; import { selectHistoryStack, selectHistoryIndex } from 'redux/selectors/navigation'; import { toQueryString } from 'util/query_params'; <<<<<<< amplitude.getInstance().logEvent('NAVIGATION', { destination: url }); ======= >>>>>>>
<<<<<<< import Path from 'path'; import Url from 'url'; import Jayson from 'jayson'; import Semver from 'semver'; import Https from 'https'; import Keytar from 'keytar'; import ChildProcess from 'child_process'; import Assert from 'assert'; import { app, BrowserWindow, globalShortcut, ipcMain, Menu, Tray } from 'electron'; import mainMenu from './menu/mainMenu'; ======= const { app, BrowserWindow, ipcMain, Menu, Tray, globalShortcut, } = require("electron"); const path = require("path"); const url = require("url"); const jayson = require("jayson"); const semver = require("semver"); const https = require("https"); const keytar = require("keytar"); // tree-kill has better cross-platform handling of // killing a process. child-process.kill was unreliable const kill = require("tree-kill"); const child_process = require("child_process"); const assert = require("assert"); >>>>>>> import Path from 'path'; import Url from 'url'; import Jayson from 'jayson'; import Semver from 'semver'; import Https from 'https'; import Keytar from 'keytar'; import ChildProcess from 'child_process'; import Assert from 'assert'; import { app, BrowserWindow, globalShortcut, ipcMain, Menu, Tray } from 'electron'; import mainMenu from './menu/mainMenu'; <<<<<<< export { contextMenu as Default } from './menu/contextMenu'; ======= const setMenu = require("./menu/main-menu.js"); export const contextMenu = require("./menu/context-menu"); >>>>>>> export { contextMenu as Default } from './menu/contextMenu'; <<<<<<< const isDevelopment = process.env.NODE_ENV === 'development'; ======= const isDevelopment = process.env.NODE_ENV === "development"; if (isDevelopment) { try { const { default: installExtension, REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS, } = require("electron-devtools-installer"); app.on("ready", () => { [REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS].forEach(extension => { installExtension(extension) .then(name => console.log(`Added Extension: ${name}`)) .catch(err => console.log("An error occurred: ", err)); }); }); } catch (err) { console.error(err); } } >>>>>>> const isDevelopment = process.env.NODE_ENV === 'development'; <<<<<<< const LATEST_RELEASE_API_URL = 'https://api.github.com/repos/lbryio/lbry-app/releases/latest'; const DAEMON_PATH = process.env.LBRY_DAEMON || Path.join(__static, 'daemon/lbrynet-daemon'); ======= const LATEST_RELEASE_API_URL = "https://api.github.com/repos/lbryio/lbry-app/releases/latest"; const DAEMON_PATH = process.env.LBRY_DAEMON || path.join(__static, "daemon/lbrynet-daemon"); >>>>>>> const LATEST_RELEASE_API_URL = 'https://api.github.com/repos/lbryio/lbry-app/releases/latest'; const DAEMON_PATH = process.env.LBRY_DAEMON || Path.join(__static, 'daemon/lbrynet-daemon'); <<<<<<< const client = Jayson.client.http({ host: 'localhost', ======= let client = jayson.client.http({ host: "localhost", >>>>>>> const client = Jayson.client.http({ host: 'localhost', <<<<<<< path: '/', timeout: 1000, ======= path: "/", timeout: 1000, >>>>>>> path: '/', timeout: 1000, <<<<<<< if (process.platform === 'win32') { return uri.replace(/\/$/, '').replace('/#', '#'); ======= if (process.platform === "win32") { return uri.replace(/\/$/, "").replace("/#", "#"); } else { return uri; >>>>>>> if (process.platform === 'win32') { return uri.replace(/\/$/, '').replace('/#', '#'); <<<<<<< console.log('How did update tray get called without a tray?'); ======= const pgrepOut = child_process.spawnSync("pgrep", ["-x", name], { encoding: "utf8", }).stdout; return pgrepOut.match(/\d+/g); >>>>>>> console.log('How did update tray get called without a tray?'); <<<<<<< let windowConfiguration = { backgroundColor: '#155B4A', minWidth: 800, minHeight: 600, autoHideMenuBar: true, }; windowConfiguration = isDevelopment ? { ...windowConfiguration, webPreferences: { webSecurity: false, }, } : windowConfiguration; ======= win = isDevelopment ? new BrowserWindow({ backgroundColor: "#155B4A", minWidth: 800, minHeight: 600, webPreferences: { webSecurity: false }, }) : new BrowserWindow({ backgroundColor: "#155B4A", minWidth: 800, minHeight: 600, }); >>>>>>> let windowConfiguration = { backgroundColor: '#155B4A', minWidth: 800, minHeight: 600, autoHideMenuBar: true, }; windowConfiguration = isDevelopment ? { ...windowConfiguration, webPreferences: { webSecurity: false, }, } : windowConfiguration; <<<<<<< window.webContents.session.setUserAgent(`LBRY/${localVersion}`); window.maximize(); ======= win.maximize(); >>>>>>> window.webContents.session.setUserAgent(`LBRY/${localVersion}`); window.maximize(); <<<<<<< window.loadURL(rendererUrl); if (openUri) { // We stored and received a URI that an external app requested before we had a window object window.webContents.on('did-finish-load', () => { window.webContents.send('open-uri-requested', openUri); ======= win.loadURL(rendererUrl); if (openUri) { // We stored and received a URI that an external app requested before we had a window object win.webContents.on("did-finish-load", () => { win.webContents.send("open-uri-requested", openUri, true); >>>>>>> window.loadURL(rendererUrl); if (openUri) { // We stored and received a URI that an external app requested before we had a window object window.webContents.on('did-finish-load', () => { window.webContents.send('open-uri-requested', openUri, true); <<<<<<< window.on('close', event => { ======= win.on("close", function(event) { >>>>>>> window.on('close', event => { <<<<<<< window.on('closed', () => { window = null; }); ======= win.on("closed", () => { win = null; }); >>>>>>> window.on('closed', () => { window = null; }); <<<<<<< tray.setToolTip('LBRY App'); tray.setTitle('LBRY'); tray.on('double-click', () => { rendererWindow.show(); }); ======= tray.setToolTip("LBRY App"); tray.setTitle("LBRY"); tray.on("double-click", () => { win.show(); }); } // This needs to be done as for linux the context menu doesn't update automatically(docs) function updateTray() { let contextMenu = Menu.buildFromTemplate(getMenuTemplate()); if (tray) { tray.setContextMenu(contextMenu); } else { console.log("How did update tray get called without a tray?"); } } function getMenuTemplate() { return [ getToggleItem(), { label: "Quit", click: () => safeQuit(), }, ]; function getToggleItem() { if (win.isVisible() && win.isFocused()) { return { label: "Hide LBRY App", click: () => win.hide(), }; } else { return { label: "Show LBRY App", click: () => win.show(), }; } } >>>>>>> tray.setToolTip('LBRY App'); tray.setTitle('LBRY'); tray.on('double-click', () => { rendererWindow.show(); }); <<<<<<< if (rendererWindow.isMinimized()) { rendererWindow.restore(); } else if (!rendererWindow.isVisible()) { rendererWindow.show(); ======= if (win.isMinimized()) { win.restore(); } else if (!win.isVisible()) { win.show(); >>>>>>> if (rendererWindow.isMinimized()) { rendererWindow.restore(); } else if (!rendererWindow.isVisible()) { rendererWindow.show(); <<<<<<< rendererWindow.focus(); rendererWindow.webContents.send('open-uri-requested', processRequestedUri(uri)); ======= win.focus(); win.webContents.send("open-uri-requested", processRequestedUri(uri)); >>>>>>> rendererWindow.focus(); rendererWindow.webContents.send('open-uri-requested', processRequestedUri(uri)); <<<<<<< if (rendererWindow) { console.log('Did not request daemon stop, so quitting in 5 seconds.'); rendererWindow.loadURL(`file://${__static}/warning.html`); ======= if (win) { console.log("Did not request daemon stop, so quitting in 5 seconds."); win.loadURL(`file://${__static}/warning.html`); >>>>>>> if (rendererWindow) { console.log('Did not request daemon stop, so quitting in 5 seconds.'); rendererWindow.loadURL(`file://${__static}/warning.html`); <<<<<<< console.log('Checking for lbrynet daemon'); client.request('status', [], err => { if (err) { console.log('lbrynet daemon needs to be launched'); launchDaemon(); } else { console.log('lbrynet daemon is already running'); ======= console.log("Checking for lbrynet daemon"); client.request("status", [], function(err, res) { if (err) { console.log("lbrynet daemon needs to be launched"); launchDaemon(); } else { console.log("lbrynet daemon is already running"); >>>>>>> console.log('Checking for lbrynet daemon'); client.request('status', [], err => { if (err) { console.log('lbrynet daemon needs to be launched'); launchDaemon(); } else { console.log('lbrynet daemon is already running'); <<<<<<< doShutdown(); ======= console.log( `Found ${ daemonPids.length } running daemon instances. Attempting to force kill...` ); for (const pid of daemonPids) { let daemonKillAttemptsComplete = 0; kill(pid, "SIGKILL", err => { daemonKillAttemptsComplete++; if (err) { console.log( `Failed to force kill daemon task with pid ${pid}. Error message: ${ err.message }` ); } else { console.log(`Force killed daemon task with pid ${pid}.`); } if (daemonKillAttemptsComplete >= daemonPids.length - 1) { quitNow(); } }); } >>>>>>> doShutdown(); <<<<<<< if (process.platform === 'linux') { checkLinuxTraySupport(err => { ======= if (process.platform === "linux") { checkLinuxTraySupport(err => { >>>>>>> if (process.platform === 'linux') { checkLinuxTraySupport(err => { <<<<<<< if (rendererWindow === null) { createWindow(); ======= if (win === null) { createWindow(); >>>>>>> if (rendererWindow === null) { createWindow(); <<<<<<< ipcMain.on('upgrade', (event, installerPath) => { app.on('quit', () => { console.log('Launching upgrade installer at', installerPath); ======= // When a quit is attempted, this is called. It attempts to shutdown the daemon, // then calls quitNow() to quit for real. function shutdownDaemonAndQuit(evenIfNotStartedByApp = false) { function doShutdown() { console.log("Shutting down daemon"); daemonStopRequested = true; client.request("daemon_stop", [], (err, res) => { if (err) { console.log( `received error when stopping lbrynet-daemon. Error message: ${ err.message }\n` ); console.log("You will need to manually kill the daemon."); } else { console.log("Successfully stopped daemon via RPC call."); quitNow(); } }); } if (daemonSubprocess) { doShutdown(); } else if (!evenIfNotStartedByApp) { console.log("Not killing lbrynet-daemon because app did not start it"); quitNow(); } else { doShutdown(); } // Is it safe to start the installer before the daemon finishes running? // If not, we should wait until the daemon is closed before we start the install. } // Taken from webtorrent-desktop function checkLinuxTraySupport(cb) { // Check that we're on Ubuntu (or another debian system) and that we have // libappindicator1. child_process.exec("dpkg --get-selections libappindicator1", function( err, stdout ) { if (err) return cb(err); // Unfortunately there's no cleaner way, as far as I can tell, to check // whether a debian package is installed: if (stdout.endsWith("\tinstall\n")) { cb(null); } else { cb(new Error("debian package not installed")); } }); } ipcMain.on("upgrade", (event, installerPath) => { app.on("quit", () => { console.log("Launching upgrade installer at", installerPath); >>>>>>> ipcMain.on('upgrade', (event, installerPath) => { app.on('quit', () => { console.log('Launching upgrade installer at', installerPath);
<<<<<<< selectCurrentModal, } from 'redux/selectors/app'; import { doFetchDaemonSettings } from 'redux/actions/settings'; import { doBalanceSubscribe, doFetchTransactions } from 'redux/actions/wallet'; import { doAuthenticate } from 'redux/actions/user'; import { doFetchFileInfosAndPublishedClaims } from 'redux/actions/file_info'; import * as MODALS from 'constants/modal_types'; import { doFetchRewardedContent } from 'redux/actions/content'; import { ipcRenderer, remote } from 'electron'; import Path from 'path'; const { download } = remote.require('electron-dl'); const Fs = remote.require('fs'); const { lbrySettings: config } = require('package.json'); ======= } from "redux/selectors/app"; import { doFetchDaemonSettings } from "redux/actions/settings"; import { doBalanceSubscribe } from "redux/actions/wallet"; import { doAuthenticate } from "redux/actions/user"; import { doFetchFileInfosAndPublishedClaims } from "redux/actions/file_info"; import * as modals from "constants/modal_types"; import { doFetchRewardedContent } from "redux/actions/content"; import { selectCurrentModal } from "redux/selectors/app"; >>>>>>> selectCurrentModal, } from 'redux/selectors/app'; import { doFetchDaemonSettings } from 'redux/actions/settings'; import { doBalanceSubscribe } from 'redux/actions/wallet'; import { doAuthenticate } from 'redux/actions/user'; import { doFetchFileInfosAndPublishedClaims } from 'redux/actions/file_info'; import * as MODALS from 'constants/modal_types'; import { doFetchRewardedContent } from 'redux/actions/content'; import { ipcRenderer, remote } from 'electron'; import Path from 'path'; const { download } = remote.require('electron-dl'); const Fs = remote.require('fs'); const { lbrySettings: config } = require('package.json');
<<<<<<< lbry.call = function( method, params, callback, errorCallback, connectFailedCallback ) { return jsonrpc.call( lbry.daemonConnectionString, method, params, callback, errorCallback, connectFailedCallback ); }; ======= >>>>>>> <<<<<<< if (lbry._connectPromise === null) { lbry._connectPromise = new Promise((resolve, reject) => { let tryNum = 0; function checkDaemonStartedFailed() { if (tryNum <= 100) { // Move # of tries into constant or config option setTimeout(() => { tryNum++; checkDaemonStarted(); }, tryNum < 50 ? 400 : 1000); } else { reject(new Error("Unable to connect to LBRY")); } } // Check every half second to see if the daemon is accepting connections function checkDaemonStarted() { lbry.call( "status", {}, resolve, checkDaemonStartedFailed, checkDaemonStartedFailed ); } checkDaemonStarted(); }); } return lbry._connectPromise; }; lbry.checkAddressIsMine = function(address, callback) { lbry.call("wallet_is_address_mine", { address: address }, callback); }; lbry.sendToAddress = function(amount, address, callback, errorCallback) { lbry.call( "send_amount_to_address", { amount: amount, address: address }, callback, errorCallback ); ======= if (lbry._connectPromise === null) { lbry._connectPromise = new Promise((resolve, reject) => { let tryNum = 0; function checkDaemonStartedFailed() { if (tryNum <= 200) { // Move # of tries into constant or config option setTimeout(() => { tryNum++; checkDaemonStarted(); }, tryNum < 50 ? 400 : 1000); } else { reject(new Error("Unable to connect to LBRY")); } } // Check every half second to see if the daemon is accepting connections function checkDaemonStarted() { lbry.status().then(resolve).catch(checkDaemonStartedFailed); } checkDaemonStarted(); }); } return lbry._connectPromise; >>>>>>> if (lbry._connectPromise === null) { lbry._connectPromise = new Promise((resolve, reject) => { let tryNum = 0; function checkDaemonStartedFailed() { if (tryNum <= 200) { // Move # of tries into constant or config option setTimeout(() => { tryNum++; checkDaemonStarted(); }, tryNum < 50 ? 400 : 1000); } else { reject(new Error("Unable to connect to LBRY")); } } // Check every half second to see if the daemon is accepting connections function checkDaemonStarted() { lbry.status().then(resolve).catch(checkDaemonStartedFailed); } checkDaemonStarted(); }); } return lbry._connectPromise; <<<<<<< return localStorage.setItem("setting_" + setting, JSON.stringify(value)); }; lbry.getSessionInfo = function(callback) { lbry.call("status", { session_status: true }, callback); }; lbry.reportBug = function(message, callback) { lbry.call( "report_bug", { message: message, }, callback ); ======= return localStorage.setItem("setting_" + setting, JSON.stringify(value)); >>>>>>> return localStorage.setItem("setting_" + setting, JSON.stringify(value)); <<<<<<< if (contentType) { return /^[^/]+/.exec(contentType)[0]; } else if (fileName) { var dotIndex = fileName.lastIndexOf("."); if (dotIndex == -1) { return "unknown"; } var ext = fileName.substr(dotIndex + 1); if (/^mp4|mov|m4v|flv|f4v$/i.test(ext)) { return "video"; } else if (/^mp3|m4a|aac|wav|flac|ogg$/i.test(ext)) { return "audio"; } else if (/^html|htm|pdf|odf|doc|docx|md|markdown|txt$/i.test(ext)) { return "document"; } else { return "unknown"; } } else { return "unknown"; } }; lbry.stop = function(callback) { lbry.call("stop", {}, callback); ======= if (contentType) { return /^[^/]+/.exec(contentType)[0]; } else if (fileName) { var dotIndex = fileName.lastIndexOf("."); if (dotIndex == -1) { return "unknown"; } var ext = fileName.substr(dotIndex + 1); if (/^mp4|mov|m4v|flv|f4v$/i.test(ext)) { return "video"; } else if (/^mp3|m4a|aac|wav|flac|ogg$/i.test(ext)) { return "audio"; } else if (/^html|htm|pdf|odf|doc|docx|md|markdown|txt$/i.test(ext)) { return "document"; } else { return "unknown"; } } else { return "unknown"; } >>>>>>> if (contentType) { return /^[^/]+/.exec(contentType)[0]; } else if (fileName) { var dotIndex = fileName.lastIndexOf("."); if (dotIndex == -1) { return "unknown"; } var ext = fileName.substr(dotIndex + 1); if (/^mp4|mov|m4v|flv|f4v$/i.test(ext)) { return "video"; } else if (/^mp3|m4a|aac|wav|flac|ogg$/i.test(ext)) { return "audio"; } else if (/^html|htm|pdf|odf|doc|docx|md|markdown|txt$/i.test(ext)) { return "document"; } else { return "unknown"; } } else { return "unknown"; } <<<<<<< if (outpoint) { const pendingPublish = getPendingPublish({ outpoint }); if (pendingPublish) { resolve([pendingPublishToDummyFileInfo(pendingPublish)]); return; } } lbry.call( "file_list", params, fileInfos => { removePendingPublishIfNeeded({ name, channel_name, outpoint }); const dummyFileInfos = lbry .getPendingPublishes() .map(pendingPublishToDummyFileInfo); resolve([...fileInfos, ...dummyFileInfos]); }, reject, reject ); }); ======= if (outpoint) { const pendingPublish = getPendingPublish({ outpoint }); if (pendingPublish) { resolve([pendingPublishToDummyFileInfo(pendingPublish)]); return; } } apiCall( "file_list", params, fileInfos => { removePendingPublishIfNeeded({ name, channel_name, outpoint }); const dummyFileInfos = lbry .getPendingPublishes() .map(pendingPublishToDummyFileInfo); resolve([...fileInfos, ...dummyFileInfos]); }, reject ); }); >>>>>>> if (outpoint) { const pendingPublish = getPendingPublish({ outpoint }); if (pendingPublish) { resolve([pendingPublishToDummyFileInfo(pendingPublish)]); return; } } apiCall( "file_list", params, fileInfos => { removePendingPublishIfNeeded({ name, channel_name, outpoint }); const dummyFileInfos = lbry .getPendingPublishes() .map(pendingPublishToDummyFileInfo); resolve([...fileInfos, ...dummyFileInfos]); }, reject ); }); <<<<<<< return new Promise((resolve, reject) => { if (!params.uri) { throw __("Resolve has hacked cache on top of it that requires a URI"); } lbry._resolveXhrs[params.uri] = lbry.call( "resolve", params, function(data) { resolve(data); }, reject ); }); ======= return new Promise((resolve, reject) => { if (!params.uri) { throw __("Resolve has hacked cache on top of it that requires a URI"); } if (params.uri && lbry._claimCache[params.uri] !== undefined) { resolve(lbry._claimCache[params.uri]); } else { lbry._resolveXhrs[params.uri] = apiCall( "resolve", params, data => { if (data !== undefined) { lbry._claimCache[params.uri] = data; } setSession(claimCacheKey, lbry._claimCache); resolve(data && data[params.uri] ? data[params.uri] : {}); }, reject ); } }); >>>>>>> return new Promise((resolve, reject) => { if (!params.uri) { throw __("Resolve has hacked cache on top of it that requires a URI"); } lbry._resolveXhrs[params.uri] = apiCall( "resolve", params, function(data) { resolve(data && data[params.uri] ? data[params.uri] : {}); }, reject ); }); <<<<<<< get: function(target, name) { if (name in target) { return target[name]; } return function(params = {}) { return new Promise((resolve, reject) => { jsonrpc.call( lbry.daemonConnectionString, name, params, resolve, reject, reject ); }); }; }, ======= get: function(target, name) { if (name in target) { return target[name]; } return function(params = {}) { return new Promise((resolve, reject) => { apiCall(name, params, resolve, reject); }); }; }, >>>>>>> get: function(target, name) { if (name in target) { return target[name]; } return function(params = {}) { return new Promise((resolve, reject) => { apiCall(name, params, resolve, reject); }); }; },
<<<<<<< db: { uri: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/mean', options: { user: '', pass: '' } }, log: { // Can specify one of 'combined', 'common', 'dev', 'short', 'tiny' format: 'combined', // Stream defaults to process.stdout // Uncomment to enable logging to a log on the file system options: { stream: 'access.log' } }, assets: { lib: { css: [ 'public/lib/bootstrap/dist/css/bootstrap.min.css', 'public/lib/bootstrap/dist/css/bootstrap-theme.min.css', ], js: [ 'public/lib/angular/angular.min.js', 'public/lib/angular-resource/angular-resource.min.js', 'public/lib/angular-animate/angular-animate.min.js', 'public/lib/angular-ui-router/release/angular-ui-router.min.js', 'public/lib/angular-ui-utils/ui-utils.min.js', 'public/lib/angular-bootstrap/ui-bootstrap-tpls.min.js' ] }, css: 'public/dist/application.min.css', js: 'public/dist/application.min.js' }, facebook: { clientID: process.env.FACEBOOK_ID || 'APP_ID', clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET', callbackURL: '/auth/facebook/callback' }, twitter: { clientID: process.env.TWITTER_KEY || 'CONSUMER_KEY', clientSecret: process.env.TWITTER_SECRET || 'CONSUMER_SECRET', callbackURL: '/auth/twitter/callback' }, google: { clientID: process.env.GOOGLE_ID || 'APP_ID', clientSecret: process.env.GOOGLE_SECRET || 'APP_SECRET', callbackURL: '/auth/google/callback' }, linkedin: { clientID: process.env.LINKEDIN_ID || 'APP_ID', clientSecret: process.env.LINKEDIN_SECRET || 'APP_SECRET', callbackURL: '/auth/linkedin/callback' }, github: { clientID: process.env.GITHUB_ID || 'APP_ID', clientSecret: process.env.GITHUB_SECRET || 'APP_SECRET', callbackURL: '/auth/github/callback' }, mailer: { from: process.env.MAILER_FROM || 'MAILER_FROM', options: { service: process.env.MAILER_SERVICE_PROVIDER || 'MAILER_SERVICE_PROVIDER', auth: { user: process.env.MAILER_EMAIL_ID || 'MAILER_EMAIL_ID', pass: process.env.MAILER_PASSWORD || 'MAILER_PASSWORD' } } } ======= secure: true, port: process.env.PORT || 8443, db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/mean', facebook: { clientID: process.env.FACEBOOK_ID || 'APP_ID', clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET', callbackURL: '/api/auth/facebook/callback' }, twitter: { clientID: process.env.TWITTER_KEY || 'CONSUMER_KEY', clientSecret: process.env.TWITTER_SECRET || 'CONSUMER_SECRET', callbackURL: '/api/auth/twitter/callback' }, google: { clientID: process.env.GOOGLE_ID || 'APP_ID', clientSecret: process.env.GOOGLE_SECRET || 'APP_SECRET', callbackURL: '/api/auth/google/callback' }, linkedin: { clientID: process.env.LINKEDIN_ID || 'APP_ID', clientSecret: process.env.LINKEDIN_SECRET || 'APP_SECRET', callbackURL: '/api/auth/linkedin/callback' }, github: { clientID: process.env.GITHUB_ID || 'APP_ID', clientSecret: process.env.GITHUB_SECRET || 'APP_SECRET', callbackURL: '/api/auth/github/callback' }, mailer: { from: process.env.MAILER_FROM || 'MAILER_FROM', options: { service: process.env.MAILER_SERVICE_PROVIDER || 'MAILER_SERVICE_PROVIDER', auth: { user: process.env.MAILER_EMAIL_ID || 'MAILER_EMAIL_ID', pass: process.env.MAILER_PASSWORD || 'MAILER_PASSWORD' } } } >>>>>>> secure: true, port: process.env.PORT || 8443, db: { uri: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/mean', options: { user: '', pass: '' } }, log: { // Can specify one of 'combined', 'common', 'dev', 'short', 'tiny' format: 'combined', // Stream defaults to process.stdout // Uncomment to enable logging to a log on the file system options: { stream: 'access.log' } }, assets: { lib: { css: [ 'public/lib/bootstrap/dist/css/bootstrap.min.css', 'public/lib/bootstrap/dist/css/bootstrap-theme.min.css', ], js: [ 'public/lib/angular/angular.min.js', 'public/lib/angular-resource/angular-resource.min.js', 'public/lib/angular-animate/angular-animate.min.js', 'public/lib/angular-ui-router/release/angular-ui-router.min.js', 'public/lib/angular-ui-utils/ui-utils.min.js', 'public/lib/angular-bootstrap/ui-bootstrap-tpls.min.js' ] }, css: 'public/dist/application.min.css', js: 'public/dist/application.min.js' }, facebook: { clientID: process.env.FACEBOOK_ID || 'APP_ID', clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET', callbackURL: '/api/auth/facebook/callback' }, twitter: { clientID: process.env.TWITTER_KEY || 'CONSUMER_KEY', clientSecret: process.env.TWITTER_SECRET || 'CONSUMER_SECRET', callbackURL: '/api/auth/twitter/callback' }, google: { clientID: process.env.GOOGLE_ID || 'APP_ID', clientSecret: process.env.GOOGLE_SECRET || 'APP_SECRET', callbackURL: '/api/auth/google/callback' }, linkedin: { clientID: process.env.LINKEDIN_ID || 'APP_ID', clientSecret: process.env.LINKEDIN_SECRET || 'APP_SECRET', callbackURL: '/api/auth/linkedin/callback' }, github: { clientID: process.env.GITHUB_ID || 'APP_ID', clientSecret: process.env.GITHUB_SECRET || 'APP_SECRET', callbackURL: '/api/auth/github/callback' }, mailer: { from: process.env.MAILER_FROM || 'MAILER_FROM', options: { service: process.env.MAILER_SERVICE_PROVIDER || 'MAILER_SERVICE_PROVIDER', auth: { user: process.env.MAILER_EMAIL_ID || 'MAILER_EMAIL_ID', pass: process.env.MAILER_PASSWORD || 'MAILER_PASSWORD' } } }
<<<<<<< export const AUTHENTICATION_FAILURE = "auth_failure"; export const TRANSACTION_FAILED = "transaction_failed"; export const INSUFFICIENT_BALANCE = "insufficient_balance"; ======= export const AUTHENTICATION_FAILURE = "auth_failure"; export const CREDIT_INTRO = "credit_intro"; >>>>>>> export const AUTHENTICATION_FAILURE = "auth_failure"; export const TRANSACTION_FAILED = "transaction_failed"; export const INSUFFICIENT_BALANCE = "insufficient_balance"; export const CREDIT_INTRO = "credit_intro";
<<<<<<< import doLogWarningConsoleMessage from './logWarningConsoleMessage'; ======= import { initContextMenu } from './util/contextMenu'; >>>>>>> import doLogWarningConsoleMessage from './logWarningConsoleMessage'; import { initContextMenu } from './util/contextMenu';
<<<<<<< ======= else if (cmd === "!help") { let notice = new MatrixAction("notice", `This is an IRC admin room for sending commands directly to IRC. Commands ` + `can be sent in this format, but these will not produce a reply:\n`+ `\t!cmd [irc.server] COMMAND [arg0 [arg1 [...]]]\n\n` + `Or if feedback is desired, the following commands can be used:\n` + `\t!join irc.example.com #channel [key]\n` + `\t!nick irc.example.com DesiredNick\n` + `\t!whois nick\n` ); yield this.ircBridge.sendMatrixAction(adminRoom, botUser, notice, req); return; } else if (cmd === "!quit") { clientList.filter( (bridgedClient) => bridgedClient.server.domain === ircServer.domain ).forEach((bridgedClient) => { bridgedClient.kill(); }); } >>>>>>> else if (cmd === "!quit") { clientList.filter( (bridgedClient) => bridgedClient.server.domain === ircServer.domain ).forEach((bridgedClient) => { bridgedClient.kill(); }); }
<<<<<<< db: { uri: 'mongodb://localhost/mean-test', options: { user: '', pass: '' } }, port: 3001, ======= db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/mean-test', port: process.env.PORT || 3001, >>>>>>> db: { uri: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/mean-test', options: { user: '', pass: '' } }, port: process.env.PORT || 3001,
<<<<<<< var DISCONNECT_PRESENCE_TIMEOUT_MS = 15 * 60 * 1000; // 15mins ======= var Queue = require("../util/Queue.js"); >>>>>>> var Queue = require("../util/Queue.js"); <<<<<<< this._rejoinPromises = { // '$nick $server.domain': Promise that resolves if the user joins a channel having quit // previously }; this._rejoinResolvers = { // '$nick $server.domain': function to call when a user joins }; // Heuristic to measure the probability of a net-split having just happened // This is to smooth incoming PART spam from IRC clients that suffer from a // net-split (or other issues that lead to mass PART-ings) this._recentQuits = { // $server => {integer} : the number of recent parts with kind = quit }; this._quitsPerSecond = { // $server => {integer} : the number of quits in the last interval 1s }; this._is_split_occuring = { // $server => {bool} }; setInterval(() => { Object.keys(this._recentQuits).forEach( (server) => { this._quitsPerSecond[server] = this._recentQuits[server]; this._recentQuits[server] = 0; let threshold = 5; // Possible net-split if (this._quitsPerSecond[server] > threshold) { this._is_split_occuring = true; } } ); }, 1000); ======= // Use per-channel queues to keep the setting of topics in rooms atomic in // order to prevent races involving several topics being received from IRC // in quick succession. If `(server, channel, topic)` are the same, an // existing promise will be used, otherwise a new item is added to the queue. this.topicQueues = { //$channel : Queue } >>>>>>> this._rejoinPromises = { // '$nick $server.domain': Promise that resolves if the user joins a channel having quit // previously }; this._rejoinResolvers = { // '$nick $server.domain': function to call when a user joins }; // Heuristic to measure the probability of a net-split having just happened // This is to smooth incoming PART spam from IRC clients that suffer from a // net-split (or other issues that lead to mass PART-ings) this._recentQuits = { // $server => {integer} : the number of recent parts with kind = quit }; this._quitsPerSecond = { // $server => {integer} : the number of quits in the last interval 1s }; this._is_split_occuring = { // $server => {bool} }; setInterval(() => { Object.keys(this._recentQuits).forEach( (server) => { this._quitsPerSecond[server] = this._recentQuits[server]; this._recentQuits[server] = 0; let threshold = 5; // Possible net-split if (this._quitsPerSecond[server] > threshold) { this._is_split_occuring = true; } } ); }, 1000); // Use per-channel queues to keep the setting of topics in rooms atomic in // order to prevent races involving several topics being received from IRC // in quick succession. If `(server, channel, topic)` are the same, an // existing promise will be used, otherwise a new item is added to the queue. this.topicQueues = { //$channel : Queue }
<<<<<<< this._eventCache = new Map(); //eventId => {body, sender} config = config || {} this._eventCacheMaxSize = config.eventCacheSize === undefined ? DEFAULT_EVENT_CACHE_SIZE : config.eventCacheSize; ======= this.metrics = { //domain => {"metricname" => value} }; >>>>>>> this._eventCache = new Map(); //eventId => {body, sender} config = config || {} this._eventCacheMaxSize = config.eventCacheSize === undefined ? DEFAULT_EVENT_CACHE_SIZE : config.eventCacheSize; this.metrics = { //domain => {"metricname" => value} }; <<<<<<< MatrixHandler.prototype._textForReplyEvent = Promise.coroutine(function*(event, ircRoom) { const REPLY_REGEX = /> <(@.*:.*)>(.*)\n\n(.*)/; const REPLY_NAME_MAX_LENGTH = 12; const eventId = event.content["m.relates_to"]["m.in_reply_to"].event_id; const match = REPLY_REGEX.exec(event.content.body); if (match.length !== 4) { return; } let rplName; let rplSource; const rplText = match[3]; if (!this._eventCache.has(eventId)) { // Fallback to fetching from the homeserver. try { const eventContent = yield this.ircBridge.getAppServiceBridge().getIntent().getEvent(event.room_id, eventId); rplName = eventContent.sender; if (typeof(eventContent.content.body) !== "string") { throw Error("'body' was not a string."); } const isReply = event.content["m.relates_to"] && event.content["m.relates_to"]["m.in_reply_to"]; if (isReply) { let match = REPLY_REGEX.exec(eventContent.content.body); rplSource = match.length === 4 ? match[3] : event.content.body; } else { rplSource = eventContent.content.body; } rplSource = rplSource.substr(0, REPLY_SOURCE_MAX_LENGTH); this._eventCache.set(eventId, {sender: rplName, body: rplSource}); } catch (err) { // If we couldn't find the event, then frankly we can't trust it and we won't treat it as a reply. return { formatted: rplText, reply: rplText, }; } } else { rplName = this._eventCache.get(eventId).sender; rplSource = this._eventCache.get(eventId).body; } // Get the first non-blank line from the source. const lines = rplSource.split('\n').filter((line) => !/^\s*$/.test(line)) if (lines.length > 0) { // Cut to a maximum length. rplSource = lines[0].substr(0, REPLY_SOURCE_MAX_LENGTH); // Ellipsis if needed. if (rplSource.length > REPLY_SOURCE_MAX_LENGTH) { rplSource = rplSource + "..."; } // Wrap in formatting rplSource = ` "${lines[0]}"`; } else { // Don't show a source because we couldn't format one. rplSource = ""; } // Fetch the sender's IRC nick. const sourceClient = this.ircBridge.getIrcUserFromCache(ircRoom.server, rplName); if (sourceClient) { rplName = sourceClient.nick; } else { // Somehow we failed, so fallback to userid. rplName = rplName.substr(1, Math.min(REPLY_NAME_MAX_LENGTH, rplName.indexOf(":") - 1) ); } return { formatted: `<${rplName}${rplSource}> ${rplText}`, reply: rplText, }; }); ======= MatrixHandler.prototype._incrementMetric = function(serverDomain, metricName) { let metricSet = this.metrics[serverDomain]; if (!metricSet) { metricSet = this.metrics[serverDomain] = {}; } if (metricSet[metricName] === undefined) { metricSet[metricName] = 1; } else { metricSet[metricName]++; } this.metrics[serverDomain] = metricSet; } >>>>>>> MatrixHandler.prototype._textForReplyEvent = Promise.coroutine(function*(event, ircRoom) { const REPLY_REGEX = /> <(@.*:.*)>(.*)\n\n(.*)/; const REPLY_NAME_MAX_LENGTH = 12; const eventId = event.content["m.relates_to"]["m.in_reply_to"].event_id; const match = REPLY_REGEX.exec(event.content.body); if (match.length !== 4) { return; } let rplName; let rplSource; const rplText = match[3]; if (!this._eventCache.has(eventId)) { // Fallback to fetching from the homeserver. try { const eventContent = yield this.ircBridge.getAppServiceBridge().getIntent().getEvent(event.room_id, eventId); rplName = eventContent.sender; if (typeof(eventContent.content.body) !== "string") { throw Error("'body' was not a string."); } const isReply = event.content["m.relates_to"] && event.content["m.relates_to"]["m.in_reply_to"]; if (isReply) { let match = REPLY_REGEX.exec(eventContent.content.body); rplSource = match.length === 4 ? match[3] : event.content.body; } else { rplSource = eventContent.content.body; } rplSource = rplSource.substr(0, REPLY_SOURCE_MAX_LENGTH); this._eventCache.set(eventId, {sender: rplName, body: rplSource}); } catch (err) { // If we couldn't find the event, then frankly we can't trust it and we won't treat it as a reply. return { formatted: rplText, reply: rplText, }; } } else { rplName = this._eventCache.get(eventId).sender; rplSource = this._eventCache.get(eventId).body; } // Get the first non-blank line from the source. const lines = rplSource.split('\n').filter((line) => !/^\s*$/.test(line)) if (lines.length > 0) { // Cut to a maximum length. rplSource = lines[0].substr(0, REPLY_SOURCE_MAX_LENGTH); // Ellipsis if needed. if (rplSource.length > REPLY_SOURCE_MAX_LENGTH) { rplSource = rplSource + "..."; } // Wrap in formatting rplSource = ` "${lines[0]}"`; } else { // Don't show a source because we couldn't format one. rplSource = ""; } // Fetch the sender's IRC nick. const sourceClient = this.ircBridge.getIrcUserFromCache(ircRoom.server, rplName); if (sourceClient) { rplName = sourceClient.nick; } else { // Somehow we failed, so fallback to userid. rplName = rplName.substr(1, Math.min(REPLY_NAME_MAX_LENGTH, rplName.indexOf(":") - 1) ); } return { formatted: `<${rplName}${rplSource}> ${rplText}`, reply: rplText, }; }); MatrixHandler.prototype._incrementMetric = function(serverDomain, metricName) { let metricSet = this.metrics[serverDomain]; if (!metricSet) { metricSet = this.metrics[serverDomain] = {}; } if (metricSet[metricName] === undefined) { metricSet[metricName] = 1; } else { metricSet[metricName]++; } this.metrics[serverDomain] = metricSet; }
<<<<<<< const timestampFn = function() { return new Date().toISOString().replace(/T/, ' ').replace(/\..+/, ''); }; const formatterFn = function(opts) { return opts.timestamp() + ' ' + opts.level.toUpperCase() + ':' + (opts.meta && opts.meta.loggerName ? opts.meta.loggerName : "") + ' ' + (opts.meta && opts.meta.reqId ? ("[" + opts.meta.reqId + "] ") : "") + (opts.meta && opts.meta.dir ? opts.meta.dir : "") + (undefined !== opts.message ? opts.message : ''); }; var makeTransports = function() { ======= const UNCAUGHT_EXCEPTION_ERRCODE = 101; const makeTransports = function() { var timestampFn = function() { return new Date().toISOString().replace(/T/, ' ').replace(/\..+/, ''); }; var formatterFn = function(opts) { return opts.timestamp() + ' ' + opts.level.toUpperCase() + ':' + (opts.meta && opts.meta.loggerName ? opts.meta.loggerName : "") + ' ' + (opts.meta && opts.meta.reqId ? ("[" + opts.meta.reqId + "] ") : "") + (opts.meta && opts.meta.dir ? opts.meta.dir : "") + (undefined !== opts.message ? opts.message : ''); }; >>>>>>> const UNCAUGHT_EXCEPTION_ERRCODE = 101; const timestampFn = function() { return new Date().toISOString().replace(/T/, ' ').replace(/\..+/, ''); }; const formatterFn = function(opts) { return opts.timestamp() + ' ' + opts.level.toUpperCase() + ':' + (opts.meta && opts.meta.loggerName ? opts.meta.loggerName : "") + ' ' + (opts.meta && opts.meta.reqId ? ("[" + opts.meta.reqId + "] ") : "") + (opts.meta && opts.meta.dir ? opts.meta.dir : "") + (undefined !== opts.message ? opts.message : ''); }; var makeTransports = function() {
<<<<<<< Logger.info(messageToSend) for (let player of sender.getServer().players.values()) { ======= Logger.silly(messageToSend) for (let player of sender.getServer().getOnlinePlayers()) { >>>>>>> Logger.info(messageToSend) for (let player of sender.getServer().getOnlinePlayers()) {
<<<<<<< if (_from === void 0) { _from = undefined; } if (_gasPrice === void 0) { _gasPrice = undefined; } if (_gasLimit === void 0) { _gasLimit = undefined; } ======= var myThis = this; >>>>>>> <<<<<<< if (_from === void 0) { _from = undefined; } if (_gasPrice === void 0) { _gasPrice = undefined; } if (_gasLimit === void 0) { _gasLimit = undefined; } ======= var myThis = this; >>>>>>> <<<<<<< this.declineAsync = function (_requestId, _numberOfConfirmation, _from, _gasPrice, _gasLimit) { var _this = this; if (_numberOfConfirmation === void 0) { _numberOfConfirmation = 0; } if (_from === void 0) { _from = undefined; } if (_gasPrice === void 0) { _gasPrice = undefined; } if (_gasLimit === void 0) { _gasLimit = undefined; } return new Promise(function (resolve, reject) { // TODO check from == payer ? // TODO check if this is possible ? (quid if other tx pending) if (!_this.web3Single.isHexStrictBytes32(_requestId)) return reject(Error('_requestId must be a 32 bytes hex string (eg.: "0x0000000000000000000000000000000000000000000000000000000000000000"')); var method = _this.instanceRequestEthereum.methods.decline(_requestId); _this.web3Single.broadcastMethod(method, function (transactionHash) { // we do nothing here! }, function (receipt) { // we do nothing here! }, function (confirmationNumber, receipt) { if (confirmationNumber == _numberOfConfirmation) { var event = _this.web3Single.decodeLog(_this.abiRequestCore, "Declined", receipt.events[0]); return resolve({ requestId: event.requestId, transactionHash: receipt.transactionHash }); } }, function (error) { return reject(error); }, undefined, _from, _gasPrice, _gasLimit); }); }; this.decline = function (_requestId, _callbackTransactionHash, _callbackTransactionReceipt, _callbackTransactionConfirmation, _callbackTransactionError, _from, _gasPrice, _gasLimit) { if (_from === void 0) { _from = undefined; } if (_gasPrice === void 0) { _gasPrice = undefined; } if (_gasLimit === void 0) { _gasLimit = undefined; } // TODO check from == payer ? // TODO check if this is possible ? (quid if other tx pending) if (!this.web3Single.isHexStrictBytes32(_requestId)) throw Error('_requestId must be a 32 bytes hex string (eg.: "0x0000000000000000000000000000000000000000000000000000000000000000"'); var method = this.instanceRequestEthereum.methods.decline(_requestId); this.web3Single.broadcastMethod(method, _callbackTransactionHash, _callbackTransactionReceipt, _callbackTransactionConfirmation, _callbackTransactionError, undefined, _from, _gasPrice, _gasLimit); }; ======= >>>>>>> <<<<<<< if (_from === void 0) { _from = undefined; } if (_gasPrice === void 0) { _gasPrice = undefined; } if (_gasLimit === void 0) { _gasLimit = undefined; } ======= var myThis = this; >>>>>>> <<<<<<< if (_from === void 0) { _from = undefined; } if (_gasPrice === void 0) { _gasPrice = undefined; } if (_gasLimit === void 0) { _gasLimit = undefined; } ======= var myThis = this; >>>>>>> <<<<<<< if (_from === void 0) { _from = undefined; } if (_gasPrice === void 0) { _gasPrice = undefined; } if (_gasLimit === void 0) { _gasLimit = undefined; } ======= var myThis = this; >>>>>>> <<<<<<< if (_from === void 0) { _from = undefined; } if (_gasPrice === void 0) { _gasPrice = undefined; } if (_gasLimit === void 0) { _gasLimit = undefined; } ======= var myThis = this; >>>>>>> <<<<<<< if (_from === void 0) { _from = undefined; } if (_gasPrice === void 0) { _gasPrice = undefined; } if (_gasLimit === void 0) { _gasLimit = undefined; } ======= var myThis = this; >>>>>>>
<<<<<<< html += '<input type="range" class="jspsych-slider" value="'+trial.slider_start+'" min="'+trial.min+'" max="'+trial.max+'" step="'+trial.step+'" id="jspsych-audio-slider-response-response"></input>'; html += '<div>' ======= html += '<input type="range" value="'+trial.slider_start+'" min="'+trial.min+'" max="'+trial.max+'" step="'+trial.step+'" style="width: 100%;" id="jspsych-audio-slider-response-response"'; if (!trial.response_allowed_while_playing) { html += ' disabled'; } html += '></input><div>' >>>>>>> html += '<input type="range" class="jspsych-slider" value="'+trial.slider_start+'" min="'+trial.min+'" max="'+trial.max+'" step="'+trial.step+'" id="jspsych-audio-slider-response-response"'; if (!trial.response_allowed_while_playing) { html += ' disabled'; } html += '></input><div>'
<<<<<<< // add and remove data based on the save_trial_parameters option if(typeof current_trial.save_trial_parameters == 'object'){ var keys = Object.keys(current_trial.save_trial_parameters); for(var i=0; i<keys.length; i++){ var key_val = current_trial.save_trial_parameters[keys[i]]; if(key_val === true){ if(typeof current_trial[keys[i]] == 'undefined'){ console.warn(`Invalid parameter specified in save_trial_parameters. Trial has no property called "${keys[i]}".`) } else if(typeof current_trial[keys[i]] == 'object'){ trial_data_values[keys[i]] = JSON.stringify(current_trial[keys[i]]); } else if(typeof current_trial[keys[i]] == 'function'){ trial_data_values[keys[i]] = current_trial[keys[i]].toString(); } else { trial_data_values[keys[i]] = current_trial[keys[i]]; } } if(key_val === false){ // we don't allow internal_node_id or trial_index to be deleted because it would break other things if(keys[i] !== 'internal_node_id' && keys[i] !== 'trial_index'){ delete trial_data_values[keys[i]]; } } } } ======= // handle extension callbacks if(Array.isArray(current_trial.extensions)){ for(var i=0; i<current_trial.extensions.length; i++){ var ext_data_values = jsPsych.extensions[current_trial.extensions[i].type].on_finish(current_trial.extensions[i].params); Object.assign(trial_data_values, ext_data_values); } } // about to execute lots of callbacks, so switch context. jsPsych.internal.call_immediate = true; >>>>>>> if(typeof current_trial.save_trial_parameters == 'object'){ var keys = Object.keys(current_trial.save_trial_parameters); for(var i=0; i<keys.length; i++){ var key_val = current_trial.save_trial_parameters[keys[i]]; if(key_val === true){ if(typeof current_trial[keys[i]] == 'undefined'){ console.warn(`Invalid parameter specified in save_trial_parameters. Trial has no property called "${keys[i]}".`) } else if(typeof current_trial[keys[i]] == 'function'){ trial_data_values[keys[i]] = current_trial[keys[i]].toString(); } else { trial_data_values[keys[i]] = current_trial[keys[i]]; } } if(key_val === false){ // we don't allow internal_node_id or trial_index to be deleted because it would break other things if(keys[i] !== 'internal_node_id' && keys[i] !== 'trial_index'){ delete trial_data_values[keys[i]]; } } } } // handle extension callbacks if(Array.isArray(current_trial.extensions)){ for(var i=0; i<current_trial.extensions.length; i++){ var ext_data_values = jsPsych.extensions[current_trial.extensions[i].type].on_finish(current_trial.extensions[i].params); Object.assign(trial_data_values, ext_data_values); } } // about to execute lots of callbacks, so switch context. jsPsych.internal.call_immediate = true;
<<<<<<< textAngularSetup.constant('taTranslations', { // moved to sub-elements //toggleHTML: "Toggle HTML", //insertImage: "Please enter a image URL to insert", //insertLink: "Please enter a URL to insert", //insertVideo: "Please enter a youtube URL to embed", html: { buttontext: 'Toggle HTML', tooltip: 'Toggle html / Rich Text' }, // tooltip for heading - might be worth splitting heading: { tooltip: 'Heading ' }, p: { tooltip: 'Paragraph' }, pre: { tooltip: 'Preformatted text' }, ul: { tooltip: 'Unordered List' }, ol: { tooltip: 'Ordered List' }, quote: { tooltip: 'Quote/unqoute selection or paragraph' }, undo: { tooltip: 'Undo' }, redo: { tooltip: 'Redo' }, bold: { tooltip: 'Bold' }, italic: { tooltip: 'Italic' }, underline: { tooltip: 'Underline' }, justifyLeft: { tooltip: 'Align text left' }, justifyRight: { tooltip: 'Align text right' }, justifyCenter: { tooltip: 'Center' }, indent: { tooltip: 'Increase indent' }, outdent: { tooltip: 'Decrease indent' }, clear: { tooltip: 'Clear formatting' }, insertImage: { dialogPrompt: 'Please enter an image URL to insert', tooltip: 'Insert image', hotkey: 'the - possibly language dependent hotkey ... for some future implementation' }, insertVideo: { tooltip: 'Insert video', dialogPrompt: 'Please enter a youtube URL to embed' }, insertLink: { tooltip: 'Insert / edit link', dialogPrompt: "Please enter a URL to insert" } }); ======= .constant('taTranslations', { toggleHTML: "Toggle HTML", insertImage: "Please enter a image URL to insert", insertLink: "Please enter a URL to insert", insertVideo: "Please enter a youtube URL to embed" }) >>>>>>> .constant('taTranslations', { // moved to sub-elements //toggleHTML: "Toggle HTML", //insertImage: "Please enter a image URL to insert", //insertLink: "Please enter a URL to insert", //insertVideo: "Please enter a youtube URL to embed", html: { buttontext: 'Toggle HTML', tooltip: 'Toggle html / Rich Text' }, // tooltip for heading - might be worth splitting heading: { tooltip: 'Heading ' }, p: { tooltip: 'Paragraph' }, pre: { tooltip: 'Preformatted text' }, ul: { tooltip: 'Unordered List' }, ol: { tooltip: 'Ordered List' }, quote: { tooltip: 'Quote/unqoute selection or paragraph' }, undo: { tooltip: 'Undo' }, redo: { tooltip: 'Redo' }, bold: { tooltip: 'Bold' }, italic: { tooltip: 'Italic' }, underline: { tooltip: 'Underline' }, justifyLeft: { tooltip: 'Align text left' }, justifyRight: { tooltip: 'Align text right' }, justifyCenter: { tooltip: 'Center' }, indent: { tooltip: 'Increase indent' }, outdent: { tooltip: 'Decrease indent' }, clear: { tooltip: 'Clear formatting' }, insertImage: { dialogPrompt: 'Please enter an image URL to insert', tooltip: 'Insert image', hotkey: 'the - possibly language dependent hotkey ... for some future implementation' }, insertVideo: { tooltip: 'Insert video', dialogPrompt: 'Please enter a youtube URL to embed' }, insertLink: { tooltip: 'Insert / edit link', dialogPrompt: "Please enter a URL to insert" } })
<<<<<<< ======= /* @license textAngular Author : Austin Anderson License : 2013 MIT Version 1.3.7 See README.md or https://github.com/fraywing/textAngular/wiki for requirements and use. */ // tests against the current jqLite/jquery implementation if this can be an element function validElementString(string){ try{ return angular.element(string).length !== 0; }catch(any){ return false; } } // setup the global contstant functions for setting up the toolbar // all tool definitions var taTools = {}; /* A tool definition is an object with the following key/value parameters: action: [function(deferred, restoreSelection)] a function that is executed on clicking on the button - this will allways be executed using ng-click and will overwrite any ng-click value in the display attribute. The function is passed a deferred object ($q.defer()), if this is wanted to be used `return false;` from the action and manually call `deferred.resolve();` elsewhere to notify the editor that the action has finished. restoreSelection is only defined if the rangy library is included and it can be called as `restoreSelection()` to restore the users selection in the WYSIWYG editor. display: [string]? Optional, an HTML element to be displayed as the button. The `scope` of the button is the tool definition object with some additional functions If set this will cause buttontext and iconclass to be ignored class: [string]? Optional, if set will override the taOptions.classes.toolbarButton class. buttontext: [string]? if this is defined it will replace the contents of the element contained in the `display` element iconclass: [string]? if this is defined an icon (<i>) will be appended to the `display` element with this string as it's class tooltiptext: [string]? Optional, a plain text description of the action, used for the title attribute of the action button in the toolbar by default. activestate: [function(commonElement)]? this function is called on every caret movement, if it returns true then the class taOptions.classes.toolbarButtonActive will be applied to the `display` element, else the class will be removed disabled: [function()]? if this function returns true then the tool will have the class taOptions.classes.disabled applied to it, else it will be removed Other functions available on the scope are: name: [string] the name of the tool, this is the first parameter passed into taRegisterTool isDisabled: [function()] returns true if the tool is disabled, false if it isn't displayActiveToolClass: [function(boolean)] returns true if the tool is 'active' in the currently focussed toolbar onElementSelect: [Object] This object contains the following key/value pairs and is used to trigger the ta-element-select event element: [String] an element name, will only trigger the onElementSelect action if the tagName of the element matches this string filter: [function(element)]? an optional filter that returns a boolean, if true it will trigger the onElementSelect. action: [function(event, element, editorScope)] the action that should be executed if the onElementSelect function runs */ // name and toolDefinition to add into the tools available to be added on the toolbar function registerTextAngularTool(name, toolDefinition){ if(!name || name === '' || taTools.hasOwnProperty(name)) throw('textAngular Error: A unique name is required for a Tool Definition'); if( (toolDefinition.display && (toolDefinition.display === '' || !validElementString(toolDefinition.display))) || (!toolDefinition.display && !toolDefinition.buttontext && !toolDefinition.iconclass) ) throw('textAngular Error: Tool Definition for "' + name + '" does not have a valid display/iconclass/buttontext value'); taTools[name] = toolDefinition; } >>>>>>> // tests against the current jqLite/jquery implementation if this can be an element function validElementString(string){ try{ return angular.element(string).length !== 0; }catch(any){ return false; } } // setup the global contstant functions for setting up the toolbar // all tool definitions var taTools = {}; /* A tool definition is an object with the following key/value parameters: action: [function(deferred, restoreSelection)] a function that is executed on clicking on the button - this will allways be executed using ng-click and will overwrite any ng-click value in the display attribute. The function is passed a deferred object ($q.defer()), if this is wanted to be used `return false;` from the action and manually call `deferred.resolve();` elsewhere to notify the editor that the action has finished. restoreSelection is only defined if the rangy library is included and it can be called as `restoreSelection()` to restore the users selection in the WYSIWYG editor. display: [string]? Optional, an HTML element to be displayed as the button. The `scope` of the button is the tool definition object with some additional functions If set this will cause buttontext and iconclass to be ignored class: [string]? Optional, if set will override the taOptions.classes.toolbarButton class. buttontext: [string]? if this is defined it will replace the contents of the element contained in the `display` element iconclass: [string]? if this is defined an icon (<i>) will be appended to the `display` element with this string as it's class tooltiptext: [string]? Optional, a plain text description of the action, used for the title attribute of the action button in the toolbar by default. activestate: [function(commonElement)]? this function is called on every caret movement, if it returns true then the class taOptions.classes.toolbarButtonActive will be applied to the `display` element, else the class will be removed disabled: [function()]? if this function returns true then the tool will have the class taOptions.classes.disabled applied to it, else it will be removed Other functions available on the scope are: name: [string] the name of the tool, this is the first parameter passed into taRegisterTool isDisabled: [function()] returns true if the tool is disabled, false if it isn't displayActiveToolClass: [function(boolean)] returns true if the tool is 'active' in the currently focussed toolbar onElementSelect: [Object] This object contains the following key/value pairs and is used to trigger the ta-element-select event element: [String] an element name, will only trigger the onElementSelect action if the tagName of the element matches this string filter: [function(element)]? an optional filter that returns a boolean, if true it will trigger the onElementSelect. action: [function(event, element, editorScope)] the action that should be executed if the onElementSelect function runs */ // name and toolDefinition to add into the tools available to be added on the toolbar function registerTextAngularTool(name, toolDefinition){ if(!name || name === '' || taTools.hasOwnProperty(name)) throw('textAngular Error: A unique name is required for a Tool Definition'); if( (toolDefinition.display && (toolDefinition.display === '' || !validElementString(toolDefinition.display))) || (!toolDefinition.display && !toolDefinition.buttontext && !toolDefinition.iconclass) ) throw('textAngular Error: Tool Definition for "' + name + '" does not have a valid display/iconclass/buttontext value'); taTools[name] = toolDefinition; }
<<<<<<< // This is the element selector string that is used to catch click events within a taBind, prevents the default and $emits a 'ta-element-select' event // these are individually used in an angular.element().find() call. What can go here depends on whether you have full jQuery loaded or just jQLite with angularjs. // div is only used as div.ta-insert-video caught in filter. textAngular.value('taSelectableElements', ['a','img','div']); ======= >>>>>>> // This is the element selector string that is used to catch click events within a taBind, prevents the default and $emits a 'ta-element-select' event // these are individually used in an angular.element().find() call. What can go here depends on whether you have full jQuery loaded or just jQLite with angularjs. // div is only used as div.ta-insert-video caught in filter. textAngular.value('taSelectableElements', ['a','img','div']); <<<<<<< textAngular.run(['taRegisterTool', '$window', function(taRegisterTool, $window){ ======= textAngular.config(['taRegisterTool', 'taTranslations', function(taRegisterTool, taTranslations){ >>>>>>> textAngular.run(['taRegisterTool', '$window', 'taTranslations', function(taRegisterTool, $window, taTranslations){ <<<<<<< imageLink = $window.prompt("Please enter an image URL to insert", 'http://'); if(imageLink && imageLink !== '' && imageLink !== 'http://'){ return this.$editor().wrapSelection('insertImage', imageLink, true); ======= imageLink = prompt(taTranslations.insertImage, 'http://'); if(imageLink !== '' && imageLink !== 'http://'){ return this.$editor().wrapSelection('insertImage', imageLink); >>>>>>> imageLink = $window.prompt(taTranslations.insertImage, 'http://'); if(imageLink && imageLink !== '' && imageLink !== 'http://'){ return this.$editor().wrapSelection('insertImage', imageLink, true); <<<<<<< urlLink = $window.prompt("Please enter a URL to insert", 'http://'); if(urlLink && urlLink !== '' && urlLink !== 'http://'){ return this.$editor().wrapSelection('createLink', urlLink, true); ======= urlLink = prompt(taTranslations.insertLink, 'http://'); if(urlLink !== '' && urlLink !== 'http://'){ return this.$editor().wrapSelection('createLink', urlLink); >>>>>>> urlLink = $window.prompt(taTranslations.insertLink, 'http://'); if(urlLink && urlLink !== '' && urlLink !== 'http://'){ return this.$editor().wrapSelection('createLink', urlLink, true); <<<<<<< scope.updateTaBindtaTextElement = scope['updateTaBindtaTextElement' + _serial]; scope.updateTaBindtaHtmlElement = scope['updateTaBindtaHtmlElement' + _serial]; ======= >>>>>>> scope.updateTaBindtaTextElement = scope['updateTaBindtaTextElement' + _serial]; scope.updateTaBindtaHtmlElement = scope['updateTaBindtaHtmlElement' + _serial]; <<<<<<< // changes from taBind back up to here ======= >>>>>>> // changes from taBind back up to here <<<<<<< // catch element select event and pass to toolbar tools scope.$on('ta-element-select', function(event, element){ _toolbars.triggerElementSelect(event, element); }); ======= >>>>>>> // catch element select event and pass to toolbar tools scope.$on('ta-element-select', function(event, element){ _toolbars.triggerElementSelect(event, element); }); <<<<<<< if(attrs.placeholder){ var ruleIndex; if(attrs.id) ruleIndex = addCSSRule('#' + attrs.id + '.placeholder-text:before', 'content: "' + attrs.placeholder + '"'); else throw('textAngular Error: An unique ID is required for placeholders to work'); scope.$on('$destroy', function(){ removeCSSRule(ruleIndex); ======= // if is not a contenteditable the default placeholder logic can work - ie the HTML value itself if (element.attr("placeholder")) { // we start off not focussed on this element element.addClass('placeholder-text'); element.on('focus', function(){ element.removeClass('placeholder-text'); ngModel.$render(); >>>>>>> if(attrs.placeholder){ var ruleIndex; if(attrs.id) ruleIndex = addCSSRule('#' + attrs.id + '.placeholder-text:before', 'content: "' + attrs.placeholder + '"'); else throw('textAngular Error: An unique ID is required for placeholders to work'); scope.$on('$destroy', function(){ removeCSSRule(ruleIndex); <<<<<<< var selectorClickHandler = function(event){ // emit the element-select event, pass the element scope.$emit('ta-element-select', this); event.preventDefault(); return false; }; //used for updating when inserting wrapped elements scope.$parent['reApplyOnSelectorHandlers' + (attrs.id || '')] = function(){ /* istanbul ignore else */ if(!_isReadonly) angular.forEach(taSelectableElements, function(selector){ // check we don't apply the handler twice element.find(selector) .off('click', selectorClickHandler) .on('click', selectorClickHandler); }); }; ======= >>>>>>> var selectorClickHandler = function(event){ // emit the element-select event, pass the element scope.$emit('ta-element-select', this); event.preventDefault(); return false; }; //used for updating when inserting wrapped elements scope.$parent['reApplyOnSelectorHandlers' + (attrs.id || '')] = function(){ /* istanbul ignore else */ if(!_isReadonly) angular.forEach(taSelectableElements, function(selector){ // check we don't apply the handler twice element.find(selector) .off('click', selectorClickHandler) .on('click', selectorClickHandler); }); }; <<<<<<< var setupToolElement = function(toolDefinition, toolScope){ ======= setupToolElement = function(toolDefinition, toolScope){ >>>>>>> var setupToolElement = function(toolDefinition, toolScope){
<<<<<<< ======= // Setup captions function _setupCaptions() { if (plyr.type !== 'video') { return; } // Inject the container if (!_getElement(config.selectors.captions)) { plyr.videoContainer.insertAdjacentHTML('afterbegin', '<div class="' + _getClassname(config.selectors.captions) + '"><span></span></div>'); } // Cache selector plyr.captionsContainer = _getElement(config.selectors.captions).querySelector('span'); // Determine if HTML5 textTracks is supported plyr.usingTextTracks = false; if (plyr.media.textTracks) { plyr.usingTextTracks = true; } // Get URL of caption file if exists var captionSrc = '', kind, children = plyr.media.childNodes; for (var i = 0; i < children.length; i++) { if (children[i].nodeName.toLowerCase() === 'track') { kind = children[i].kind; if (kind === 'captions' || kind === 'subtitles') { captionSrc = children[i].getAttribute('src'); } } } // Record if caption file exists or not plyr.captionExists = true; if (captionSrc === '') { plyr.captionExists = false; _log('No caption track found'); } else { _log('Caption track found; URI: ' + captionSrc); } // If no caption file exists, hide container for caption text if (!plyr.captionExists) { _toggleClass(plyr.container, config.classes.captions.enabled); } // If caption file exists, process captions else { // Turn off native caption rendering to avoid double captions // This doesn't seem to work in Safari 7+, so the <track> elements are removed from the dom below var tracks = plyr.media.textTracks; for (var x = 0; x < tracks.length; x++) { tracks[x].mode = 'hidden'; } // Enable UI _showCaptions(plyr); // Disable unsupported browsers than report false positive if ((plyr.browser.name === 'IE' && plyr.browser.version >= 10) || (plyr.browser.name === 'Firefox' && plyr.browser.version >= 31) || (plyr.browser.name === 'Chrome' && plyr.browser.version >= 43) || (plyr.browser.name === 'Safari' && plyr.browser.version >= 7)) { // Debugging _log('Detected unsupported browser for HTML5 captions - using fallback'); // Set to false so skips to 'manual' captioning plyr.usingTextTracks = false; } // Rendering caption tracks // Native support required - http://caniuse.com/webvtt if (plyr.usingTextTracks) { _log('TextTracks supported'); for (var y = 0; y < tracks.length; y++) { var track = tracks[y]; if (track.kind === 'captions' || track.kind === 'subtitles') { _on(track, 'cuechange', function() { // Clear container plyr.captionsContainer.innerHTML = ''; // Display a cue, if there is one if (this.activeCues[0] && this.activeCues[0].hasOwnProperty('text')) { plyr.captionsContainer.appendChild(this.activeCues[0].getCueAsHTML().trim()); // Force redraw // var redraw = plyr.captionsContainer.offsetHeight; } }); } } } // Caption tracks not natively supported else { _log('TextTracks not supported so rendering captions manually'); // Render captions from array at appropriate time plyr.currentCaption = ''; plyr.captions = []; if (captionSrc !== '') { // Create XMLHttpRequest Object var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState === 4) { if (xhr.status === 200) { var records = [], record, req = xhr.responseText; var pattern = '\n'; records = req.split(pattern + pattern); if(records.length === 1) { // The '\n' pattern didn't work // Try '\r\n' pattern = '\r\n'; records = req.split(pattern + pattern); } for (var r = 0; r < records.length; r++) { record = records[r]; plyr.captions[r] = []; plyr.captions[r] = record.split(pattern); } // Remove first element ('VTT') plyr.captions.shift(); _log('Successfully loaded the caption file via AJAX'); } else { _log('There was a problem loading the caption file via AJAX', true); } } }; xhr.open('get', captionSrc, true); xhr.send(); } } // If Safari 7+, removing track from DOM [see 'turn off native caption rendering' above] if (plyr.browser.name === 'Safari' && plyr.browser.version >= 7) { _log('Safari 7+ detected; removing track from DOM'); // Find all <track> elements tracks = plyr.media.getElementsByTagName('track'); // Loop through and remove one by one for (var t = 0; t < tracks.length; t++) { plyr.media.removeChild(tracks[t]); } } } } // Setup fullscreen function _setupFullscreen() { if (!plyr.supported.full) { return; } if ((plyr.type != 'audio' || config.fullscreen.allowAudio) && config.fullscreen.enabled) { // Check for native support var nativeSupport = fullscreen.supportsFullScreen; if (nativeSupport || (config.fullscreen.fallback && !_inFrame())) { _log((nativeSupport ? 'Native' : 'Fallback') + ' fullscreen enabled'); // Add styling hook _toggleClass(plyr.container, config.classes.fullscreen.enabled, true); } else { _log('Fullscreen not supported and fallback disabled'); } // Toggle state _toggleState(plyr.buttons.fullscreen, false); // Setup focus trap _focusTrap(); // Set control hide class hook if (config.fullscreen.hideControls) { _toggleClass(plyr.container, config.classes.fullscreen.hideControls, true); } } } >>>>>>>
<<<<<<< this.adsLoaderResolve = () => {}; this.adsLoaderPromise = new Promise(resolve => { this.adsLoaderResolve = resolve; ======= this.adsLoaderPromise = new Promise((resolve) => { this.on('ADS_LOADER_LOADED', () => resolve()); >>>>>>> this.adsLoaderPromise = new Promise(resolve => { this.on('ADS_LOADER_LOADED', () => resolve()); <<<<<<< this.adsManagerResolve = () => {}; this.adsManagerPromise = new Promise(resolve => { // Resolve our promise. this.adsManagerResolve = resolve; ======= this.adsManagerPromise = new Promise((resolve) => { this.on('ADS_MANAGER_LOADED', () => resolve()); >>>>>>> this.adsManagerPromise = new Promise(resolve => { this.on('ADS_MANAGER_LOADED', () => resolve()); <<<<<<< case google.ima.AdEvent.Type.AD_BREAK_READY: // This event indicates that a mid-roll ad is ready to start. // We pause the player and tell the adsManager to start playing the ad. this.player.debug.log( `[${(Date.now() - this.time) / 1000}s][IMA SDK] AD_BREAK_READY |`, 'Fired when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false.', ); // this.handleEventListeners('AD_BREAK_READY'); // this.playing = true; // this.adsManager.start(); break; case google.ima.AdEvent.Type.AD_METADATA: this.player.debug.log(`[${(Date.now() - this.time) / 1000}s][IMA SDK] AD_METADATA |`, 'Fired when an ads list is loaded.'); break; ======= >>>>>>> <<<<<<< this.player.debug.log( `[${(Date.now() - this.time) / 1000}s][IMA SDK] ALL_ADS_COMPLETED |`, 'Fired when the ads manager is done playing all the ads.', ); ======= // All ads for the current videos are done. We can now request new advertisements // in case the video is re-played. >>>>>>> // All ads for the current videos are done. We can now request new advertisements // in case the video is re-played. <<<<<<< this.player.debug.log( `[${(Date.now() - this.time) / 1000}s][IMA SDK] CONTENT_PAUSE_REQUESTED |`, 'Fired when content should be paused. This usually happens right before an ad is about to cover the content.', ); ======= // This event indicates the ad has started - the video player can adjust the UI, // for example display a pause button and remaining time. Fired when content should // be paused. This usually happens right before an ad is about to cover the content. >>>>>>> // This event indicates the ad has started - the video player can adjust the UI, // for example display a pause button and remaining time. Fired when content should // be paused. This usually happens right before an ad is about to cover the content. <<<<<<< this.player.debug.log( `[${(Date.now() - this.time) / 1000}s][IMA SDK] CONTENT_RESUME_REQUESTED |`, 'Fired when content should be resumed. This usually happens when an ad finishes or collapses.', ); ======= // This event indicates the ad has finished - the video player can perform // appropriate UI actions, such as removing the timer for remaining time detection. // Fired when content should be resumed. This usually happens when an ad finishes // or collapses. >>>>>>> // This event indicates the ad has finished - the video player can perform // appropriate UI actions, such as removing the timer for remaining time detection. // Fired when content should be resumed. This usually happens when an ad finishes // or collapses. <<<<<<< case google.ima.AdEvent.Type.STARTED: // This event indicates the ad has started - the video player // can adjust the UI, for example display a pause button and // remaining time. this.player.debug.log(`[${(Date.now() - this.time) / 1000}s][IMA SDK] STARTED |`, 'Fired when the ad starts playing.'); this.player.pause(); this.playing = true; this.handleEventListeners('STARTED'); break; case google.ima.AdEvent.Type.DURATION_CHANGE: this.player.debug.log(`[${(Date.now() - this.time) / 1000}s][IMA SDK] DURATION_CHANGE |`, "Fired when the ad's duration changes."); break; case google.ima.AdEvent.Type.FIRST_QUARTILE: this.player.debug.log(`[${(Date.now() - this.time) / 1000}s][IMA SDK] FIRST_QUARTILE |`, 'Fired when the ad playhead crosses first quartile.'); break; case google.ima.AdEvent.Type.IMPRESSION: this.player.debug.log(`[${(Date.now() - this.time) / 1000}s][IMA SDK] IMPRESSION |`, 'Fired when the impression URL has been pinged.'); break; case google.ima.AdEvent.Type.INTERACTION: this.player.debug.log( `[${(Date.now() - this.time) / 1000}s][IMA SDK] INTERACTION |`, 'Fired when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data.', ); break; case google.ima.AdEvent.Type.LINEAR_CHANGED: this.player.debug.log( `[${(Date.now() - this.time) / 1000}s][IMA SDK] LINEAR_CHANGED |`, 'Fired when the displayed ad changes from linear to nonlinear, or vice versa.', ); break; case google.ima.AdEvent.Type.MIDPOINT: this.player.debug.log(`[${(Date.now() - this.time) / 1000}s][IMA SDK] MIDPOINT |`, 'Fired when the ad playhead crosses midpoint.'); break; case google.ima.AdEvent.Type.PAUSED: this.player.debug.log(`[${(Date.now() - this.time) / 1000}s][IMA SDK] PAUSED |`, 'Fired when the ad is paused.'); break; case google.ima.AdEvent.Type.RESUMED: this.player.debug.log(`[${(Date.now() - this.time) / 1000}s][IMA SDK] RESUMED |`, 'Fired when the ad is resumed.'); break; case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED: this.player.debug.log( `[${(Date.now() - this.time) / 1000}s][IMA SDK] SKIPPABLE_STATE_CHANGED |`, 'Fired when the displayed ads skippable state is changed.', ); break; case google.ima.AdEvent.Type.SKIPPED: this.player.debug.log(`[${(Date.now() - this.time) / 1000}s][IMA SDK] SKIPPED |`, 'Fired when the ad is skipped by the user.'); break; case google.ima.AdEvent.Type.THIRD_QUARTILE: this.player.debug.log(`[${(Date.now() - this.time) / 1000}s][IMA SDK] THIRD_QUARTILE |`, 'Fired when the ad playhead crosses third quartile.'); break; case google.ima.AdEvent.Type.USER_CLOSE: this.player.debug.log(`[${(Date.now() - this.time) / 1000}s][IMA SDK] USER_CLOSE |`, 'Fired when the ad is closed by the user.'); break; case google.ima.AdEvent.Type.VOLUME_CHANGED: this.player.debug.log(`[${(Date.now() - this.time) / 1000}s][IMA SDK] VOLUME_CHANGED |`, 'Fired when the ad volume has changed.'); break; case google.ima.AdEvent.Type.VOLUME_MUTED: this.player.debug.log(`[${(Date.now() - this.time) / 1000}s][IMA SDK] VOLUME_MUTED |`, 'Fired when the ad volume has been muted.'); break; ======= >>>>>>>
<<<<<<< js: path.join(root, "docs/src/js/**/*"), sprite: path.join(root, "docs/src/sprite/*.svg") ======= js: path.join(root, "docs/src/js/**/*") >>>>>>> js: path.join(root, "docs/src/js/**/*") <<<<<<< .pipe(gulp.dest(paths[bundle].output)); }); ======= .pipe(gulp.dest(paths.plyr.output)); }); >>>>>>> .pipe(gulp.dest(paths.plyr.output)); }); <<<<<<< build.sprite("docs"); ======= // Build all JS gulp.task("js", function(){ run(tasks.js); }); >>>>>>> // Build all JS gulp.task("js", function(){ run(tasks.js); }); <<<<<<< gulp.watch(paths.docs.src.sprite, ["sprite-docs"]); ======= >>>>>>> <<<<<<< run(tasks.js, tasks.less, "sprite-plyr", "sprite-docs", "watch"); ======= run(tasks.js, tasks.less, "sprite", "watch"); >>>>>>> run(tasks.js, tasks.less, "sprite", "watch"); <<<<<<< run(tasks.js, tasks.less, "sprite-plyr", "sprite-docs", "cdn", "docs"); ======= run(tasks.js, tasks.less, "sprite", "cdn", "docs"); >>>>>>> run(tasks.js, tasks.less, "sprite", "cdn", "docs");
<<<<<<< // plyr.js v1.1.4 // https://github.com/selz/plyr ======= // plyr.js v1.1.5 // https://github.com/selz/plyr >>>>>>> // plyr.js v1.1.5 // https://github.com/selz/plyr <<<<<<< return document.fullscreenElement == element; ======= return document.fullscreenElement == element; case "moz": return document.mozFullScreenElement == element; >>>>>>> return document.fullscreenElement == element; case "moz": return document.mozFullScreenElement == element; <<<<<<< toggleFullscreen: _toggleFullscreen, isFullscreen: function() { return player.isFullscreen || false; }, support: function(mimeType) { return _supportMime(player, mimeType); } ======= toggleFullscreen: _toggleFullscreen, isFullscreen: function() { return player.isFullscreen || false; }, support: function(mimeType) { return _supportMime(player, mimeType); } } } // Check for support api.supported = function(type) { var browser = _browserSniff(), oldIE = (browser.name === "IE" && browser.version <= 9), iPhone = /iPhone|iPod/i.test(navigator.userAgent), audio = !!document.createElement("audio").canPlayType, video = !!document.createElement("video").canPlayType, basic, full; switch (type) { case "video": basic = video; full = (basic && (!oldIE && !iPhone)); break; case "audio": basic = audio; full = (basic && !oldIE); break; default: basic = (audio && video); full = (basic && !oldIE); break; >>>>>>> toggleFullscreen: _toggleFullscreen, isFullscreen: function() { return player.isFullscreen || false; }, support: function(mimeType) { return _supportMime(player, mimeType); } } } // Check for support api.supported = function(type) { var browser = _browserSniff(), oldIE = (browser.name === "IE" && browser.version <= 9), iPhone = /iPhone|iPod/i.test(navigator.userAgent), audio = !!document.createElement("audio").canPlayType, video = !!document.createElement("video").canPlayType, basic, full; switch (type) { case "video": basic = video; full = (basic && (!oldIE && !iPhone)); break; case "audio": basic = audio; full = (basic && !oldIE); break; default: basic = (audio && video); full = (basic && !oldIE); break; <<<<<<< // Setup plugins api.plugins = {}; ======= >>>>>>> // Setup plugins api.plugins = {};
<<<<<<< this.blocked = false; this.enabled = utils.is.url(player.config.ads.tag); ======= >>>>>>> this.blocked = false; this.enabled = utils.is.url(player.config.ads.tag);
<<<<<<< if (!this.isStatic() || this.isStatic() && this.isDirty()) { var pos = this.sceneGraph.pos; var rotateMat = this.sceneGraph.getRotateMat(); var scaleVec = this.boundingVolume.scaleVec; this.boundingVolume.set(pos,rotateMat,scaleVec); scaleVec=[1,1,1]; //ModelView stack will be used for trasform mat c3dl.pushMatrix(); c3dl.loadIdentity(); //ModelView stack will be used for rotation mat c3dl.matrixMode(c3dl.PROJECTION); c3dl.pushMatrix(); c3dl.loadIdentity(); c3dl.matrixMode(c3dl.MODELVIEW); var currNode = this.sceneGraph; while(currNode) { if(currNode.children && currNode.children.length) { var flag = true; if (!currNode.pushed) { c3dl.multiplyVectorByVector(scaleVec, currNode.scaleVec, scaleVec); c3dl.pushMatrix(); c3dl.multMatrix(currNode.getTransform()); c3dl.matrixMode(c3dl.PROJECTION); c3dl.pushMatrix(); c3dl.multMatrix(currNode.getRotateMat()); c3dl.matrixMode(c3dl.MODELVIEW); currNode.pushed = true; ======= scaleVec=[1,1,1]; //ModelView stack will be used for trasform mat c3dl.pushMatrix(); c3dl.loadIdentity(); //ModelView stack will be used for rotation mat c3dl.matrixMode(c3dl.PROJECTION); c3dl.pushMatrix(); c3dl.loadIdentity(); c3dl.matrixMode(c3dl.MODELVIEW); var currNode = this.sceneGraph; while(currNode) { if(currNode.children && currNode.children.length) { var flag = true; if (!currNode.pushed) { c3dl.multiplyVector(currNode.linVel, timeStep, c3dl.vec1); c3dl.addVectors(currNode.pos, c3dl.vec1, currNode.pos); currNode.pitch(currNode.angVel[0] * timeStep); currNode.yaw(currNode.angVel[1] * timeStep); currNode.roll(currNode.angVel[2] * timeStep); c3dl.multiplyVectorByVector(scaleVec, currNode.scaleVec, scaleVec); c3dl.pushMatrix(); c3dl.multMatrix(currNode.getTransform()); c3dl.matrixMode(c3dl.PROJECTION); c3dl.pushMatrix(); c3dl.multMatrix(currNode.getRotateMat()); c3dl.matrixMode(c3dl.MODELVIEW); currNode.pushed = true; } for (var i = 0, len = currNode.children.length; i < len; i++) { if(!currNode.children[i].updated) { currNode = currNode.children[i]; i = len; flag = false; >>>>>>> if (!this.isStatic() || this.isStatic() && this.isDirty()) { scaleVec=[1,1,1]; //ModelView stack will be used for trasform mat c3dl.pushMatrix(); c3dl.loadIdentity(); //ModelView stack will be used for rotation mat c3dl.matrixMode(c3dl.PROJECTION); c3dl.pushMatrix(); c3dl.loadIdentity(); c3dl.matrixMode(c3dl.MODELVIEW); var currNode = this.sceneGraph; while(currNode) { if(currNode.children && currNode.children.length) { var flag = true; if (!currNode.pushed) { c3dl.multiplyVectorByVector(scaleVec, currNode.scaleVec, scaleVec); c3dl.multiplyVector(currNode.linVel, timeStep, c3dl.vec1); c3dl.addVectors(currNode.pos, c3dl.vec1, currNode.pos); currNode.pitch(currNode.angVel[0] * timeStep); currNode.yaw(currNode.angVel[1] * timeStep); currNode.roll(currNode.angVel[2] * timeStep); c3dl.pushMatrix(); c3dl.multMatrix(currNode.getTransform()); c3dl.matrixMode(c3dl.PROJECTION); c3dl.pushMatrix(); c3dl.multMatrix(currNode.getRotateMat()); c3dl.matrixMode(c3dl.MODELVIEW); currNode.pushed = true; <<<<<<< if (flag) { c3dl.popMatrix(); ======= currNode.updated =true; currNode.pushed = null; currNode = currNode.parent; } } else{ if (currNode.primitiveSets) { for (var i = 0, len = currNode.primitiveSets.length; i < len; i++) { var bv = currNode.primitiveSets[i].getBoundingVolume(); var trans = c3dl.peekMatrix(); >>>>>>> if (flag) { c3dl.popMatrix();
<<<<<<< this.position = c3dl.makeVector(0, 0, 0); ======= this.position = [0, 0, 0]; this.center = [0, 0, 0]; >>>>>>> this.position = c3dl.makeVector(0, 0, 0); this.center = c3dl.makeVector(0, 0, 0); <<<<<<< this.position[0] = position[0]; this.position[1] = position[1]; this.position[2] = position[2]; ======= this.position = [position[0]+this.center[0], position[1]+this.center[1], position[2]+this.center[2]]; >>>>>>> this.position[0] = position[0]; this.position[1] = position[1]; this.position[2] = position[2];
<<<<<<< axios.put(`${ROOT_URL}/player/assign`, reqBody) .then(({data}) => { dispatch({ type: ADD_PLAYER_TO_TEAM, payload: { player: playerId, teamId }, ======= axios.put(`${ROOT_URL}/player/assign`, reqBody) .then(() => { dispatch({ type: ADD_PLAYER_TO_TEAM, payload: { player: playerId, teamId } >>>>>>> axios.put(`${ROOT_URL}/player/assign`, reqBody) .then(() => { dispatch({ type: ADD_PLAYER_TO_TEAM, payload: { player: playerId, teamId },
<<<<<<< ======= //************************************************************************************* //****************************** Theme Colors ***************************************** //************************************************************************************* const theme_teal_pink = { darkPrimaryColor: '#00796B', defaultPrimaryColor: '#009688', lightPrimaryColor: '#B2DFDB', textPrimaryColor: '#FFFFFF', accentColor: '#FF4081', primaryTextColor: '#212121', secondaryTextColor: '#757575', dividerColor: '#BDBDBD', }; const theme_purple_amber = { darkPrimaryColor: '#512DA8', defaultPrimaryColor: '#673AB7', lightPrimaryColor: '#D1C4E9', textPrimaryColor: '#FFFFFF', accentColor: '#FFC107', primaryTextColor: '#212121', secondaryTextColor: '#757575', dividerColor: '#BDBDBD', }; const theme_bluegrey_indigo = { darkPrimaryColor: '#455A64', defaultPrimaryColor: '#607D8B', lightPrimaryColor: '#CFD8DC', textPrimaryColor: '#FFFFFF', accentColor: '#536DFE', primaryTextColor: '#212121', secondaryTextColor: '#757575', dividerColor: '#BDBDBD', }; const PrimaryMain = '#0288D1'; const PrimaryLight = '#5eb8ff'; const PrimaryDark = '#005b9f'; const BLACK = '#000'; const WHITE = '#fff'; // bluegrey - orange //teal - pink //Color Tool - https://material.io/color/#!/?view.left=0&view.right=1&primary.color=0071aa >>>>>>>
<<<<<<< var emojilib = JSON.parse(localStorage.getItem('emojilib')) || require('emojilib').lib var emojikeys = JSON.parse(localStorage.getItem('emojikeys')) || require('emojilib').ordered ======= var emojilib = require('emojilib').lib var emojikeys = require('emojilib').ordered var modifiers = require('emojilib').fitzpatrick_scale_modifiers >>>>>>> var emojilib = JSON.parse(localStorage.getItem('emojilib')) || require('emojilib').lib var emojikeys = JSON.parse(localStorage.getItem('emojikeys')) || require('emojilib').ordered var modifiers = require('emojilib').fitzpatrick_scale_modifiers
<<<<<<< buttonClassName: React.PropTypes.string, confirm: React.PropTypes.bool, ======= buttonClassName: React.PropTypes.string, >>>>>>> buttonClassName: React.PropTypes.string, confirm: React.PropTypes.bool, <<<<<<< changePassword: function(oldPassword, newPassword) { const cli = MatrixClientPeg.get(); if (!this.props.confirm) { this._changePassword(cli, oldPassword, newPassword); return; } ======= componentWillMount: function() { this._sessionStore = sessionStore; this._sessionStoreToken = this._sessionStore.addListener( this._setStateFromSessionStore, ); this._setStateFromSessionStore(); }, componentWillUnmount: function() { if (this._sessionStoreToken) { this._sessionStoreToken.remove(); } }, _setStateFromSessionStore: function() { this.setState({ cachedPassword: this._sessionStore.getCachedPassword(), }); }, changePassword: function(old_password, new_password) { var cli = MatrixClientPeg.get(); >>>>>>> componentWillMount: function() { this._sessionStore = sessionStore; this._sessionStoreToken = this._sessionStore.addListener( this._setStateFromSessionStore, ); this._setStateFromSessionStore(); }, componentWillUnmount: function() { if (this._sessionStoreToken) { this._sessionStoreToken.remove(); } }, _setStateFromSessionStore: function() { this.setState({ cachedPassword: this._sessionStore.getCachedPassword(), }); }, changePassword: function(old_password, new_password) { const cli = MatrixClientPeg.get(); if (!this.props.confirm) { this._changePassword(cli, oldPassword, newPassword); return; } <<<<<<< const oldPassword = this.refs.old_input.value; const newPassword = this.refs.new_input.value; const confirmPassword = this.refs.confirm_input.value; const err = this.props.onCheckPassword( oldPassword, newPassword, confirmPassword, ======= var old_password = this.state.cachedPassword || this.refs.old_input.value; var new_password = this.refs.new_input.value; var confirm_password = this.refs.confirm_input.value; var err = this.props.onCheckPassword( old_password, new_password, confirm_password >>>>>>> const oldPassword = this.refs.old_input.value; const newPassword = this.refs.new_input.value; const confirmPassword = this.refs.confirm_input.value; const err = this.props.onCheckPassword( oldPassword, newPassword, confirmPassword,
<<<<<<< import FocusTrap from 'focus-trap-react'; ======= import PropTypes from 'prop-types'; >>>>>>> import FocusTrap from 'focus-trap-react'; import PropTypes from 'prop-types'; <<<<<<< ======= // callback to call when Enter is pressed onEnterPressed: PropTypes.func, // called when a key is pressed onKeyDown: PropTypes.func, >>>>>>> // called when a key is pressed onKeyDown: PropTypes.func, <<<<<<< children: React.PropTypes.node, // Id of content element // If provided, this is used to add a aria-describedby attribute contentId: React.PropTypes.string, ======= children: PropTypes.node, >>>>>>> children: PropTypes.node, // Id of content element // If provided, this is used to add a aria-describedby attribute contentId: React.PropTypes.string, <<<<<<< <div className='mx_Dialog_title' id='mx_BaseDialog_title'> ======= <div className={'mx_Dialog_title ' + this.props.titleClass}> >>>>>>> <div className={'mx_Dialog_title ' + this.props.titleClass} id='mx_BaseDialog_title'>
<<<<<<< // value will not contain '.' if maxAfterDot is 0, return early if (value && !value.includes('.')) { return value; } ======= if (!value) { this.setState({ separatorsCount: 0 }); } >>>>>>> // value will not contain '.' if maxAfterDot is 0, return early if (value && !value.includes('.')) { return value; } if (!value) { this.setState({ separatorsCount: 0 }); }
<<<<<<< import { getUnknownDevicesForRoom } from './cryptodevices'; ======= import SettingsStore from "./settings/SettingsStore"; >>>>>>> import { getUnknownDevicesForRoom } from './cryptodevices'; import SettingsStore from "./settings/SettingsStore";
<<<<<<< useIRCLayout: SettingsStore.getValue("feature_irc_ui"), ======= matrixClientIsReady: this.context && this.context.isInitialSyncComplete(), >>>>>>> useIRCLayout: SettingsStore.getValue("feature_irc_ui"), matrixClientIsReady: this.context && this.context.isInitialSyncComplete(),
<<<<<<< //@flow ======= /* Copyright 2016 Aviral Dasgupta Copyright 2017 Vector Creations Ltd 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. */ >>>>>>> //@flow /* Copyright 2016 Aviral Dasgupta Copyright 2017 Vector Creations Ltd 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. */ <<<<<<< import Q from 'q'; ======= import Fuse from 'fuse.js'; >>>>>>>
<<<<<<< <span className="mx_RoomSettings_powerLevelKey">To remove messages, you must be a </span> ======= <span className="mx_RoomSettings_powerLevelKey">{ _t('To redact other users\' messages') }, { _t('you must be a') } </span> >>>>>>> <span className="mx_RoomSettings_powerLevelKey">{ _t('To remove other users\' messages') }, { _t('you must be a') } </span>
<<<<<<< if (!room) return <div></div>; var allUsers = MatrixClientPeg.get().getUsers(); ======= /* var allUsers = MatrixClientPeg.get().getUsers(); >>>>>>> if (!room) return <div></div>; /* var allUsers = MatrixClientPeg.get().getUsers();
<<<<<<< nameNode = <input type="text" value={this.state.profileForm.name} onChange={this._onNameChange} placeholder={_t('Community Name')} tabIndex="1" />; shortDescNode = <input type="text" value={this.state.profileForm.short_description} onChange={this._onShortDescChange} placeholder={_t('Description')} tabIndex="2" />; ======= const EditableText = sdk.getComponent("elements.EditableText"); nameNode = <EditableText ref="nameEditor" className="mx_GroupView_editable" placeholderClassName="mx_GroupView_placeholder" placeholder={_t("Group Name")} blurToCancel={false} initialValue={this.state.profileForm.name} onValueChanged={this._onNameChange} tabIndex="1" dir="auto" />; shortDescNode = <EditableText ref="descriptionEditor" className="mx_GroupView_editable" placeholderClassName="mx_GroupView_placeholder" placeholder={_t("Description")} blurToCancel={false} initialValue={this.state.profileForm.short_description} onValueChanged={this._onShortDescChange} tabIndex="2" dir="auto" />; >>>>>>> const EditableText = sdk.getComponent("elements.EditableText"); nameNode = <EditableText ref="nameEditor" className="mx_GroupView_editable" placeholderClassName="mx_GroupView_placeholder" placeholder={_t('Community Name')} blurToCancel={false} initialValue={this.state.profileForm.name} onValueChanged={this._onNameChange} tabIndex="1" dir="auto" />; shortDescNode = <EditableText ref="descriptionEditor" className="mx_GroupView_editable" placeholderClassName="mx_GroupView_placeholder" placeholder={_t("Description")} blurToCancel={false} initialValue={this.state.profileForm.short_description} onValueChanged={this._onShortDescChange} tabIndex="2" dir="auto" />;
<<<<<<< collapsed={ self.props.collapsed } alwaysShowHeader={ true } startAsHidden={ true } showSpinner={ self.state.isLoadingLeftRooms } onHeaderClick= { self.onArchivedHeaderClick } /> ======= incomingCall={ self.state.incomingCall } collapsed={ self.props.collapsed } /> >>>>>>> collapsed={ self.props.collapsed } alwaysShowHeader={ true } startAsHidden={ true } showSpinner={ self.state.isLoadingLeftRooms } onHeaderClick= { self.onArchivedHeaderClick } incomingCall={ self.state.incomingCall } />
<<<<<<< matrixClient: PropTypes.object, ======= matrixClient: React.PropTypes.object, room: React.PropTypes.object, >>>>>>> matrixClient: PropTypes.object, room: PropTypes.object,
<<<<<<< import SettingsStore from "../../../settings/SettingsStore"; import WidgetEchoStore from "../../../stores/WidgetEchoStore"; ======= >>>>>>> import SettingsStore from "../../../settings/SettingsStore"; import WidgetEchoStore from "../../../stores/WidgetEchoStore"; <<<<<<< const widgets = WidgetEchoStore.getEchoedRoomWidgets( this.props.room.roomId, WidgetUtils.getRoomWidgets(this.props.room), ); return widgets.map((ev) => { return this._initAppConfig(ev.getStateKey(), ev.getContent(), ev.sender); ======= return WidgetUtils.getRoomWidgets(this.props.room).map((ev) => { return WidgetUtils.makeAppConfig(ev.getStateKey(), ev.getContent(), ev.sender, this.props.room.roomId); >>>>>>> const widgets = WidgetEchoStore.getEchoedRoomWidgets( this.props.room.roomId, WidgetUtils.getRoomWidgets(this.props.room), ); return widgets.map((ev) => { return WidgetUtils.makeAppConfig(ev.getStateKey(), ev.getContent(), ev.sender);
<<<<<<< import {isValid3pidInvite} from "../../../RoomInvite"; ======= import AutoHideScrollbar from "../../structures/AutoHideScrollbar"; >>>>>>> import AutoHideScrollbar from "../../structures/AutoHideScrollbar"; import {isValid3pidInvite} from "../../../RoomInvite";
<<<<<<< const Spinner = sdk.getComponent("elements.Spinner"); const modal = Modal.createDialog(Spinner, null, 'mx_Dialog_spinner'); try { await accessSecretStorage(); await this._waitForCompletion(); } finally { modal.close(); } ======= if (this.props.kind === "verify_this_session") { Modal.createTrackedDialog('Verify session', 'Verify session', SetupEncryptionDialog, {}, null, /* priority = */ false, /* static = */ true); } else { accessSecretStorage(); } >>>>>>> if (this.props.kind === "verify_this_session") { Modal.createTrackedDialog('Verify session', 'Verify session', SetupEncryptionDialog, {}, null, /* priority = */ false, /* static = */ true); } else { const Spinner = sdk.getComponent("elements.Spinner"); const modal = Modal.createDialog(Spinner, null, 'mx_Dialog_spinner'); try { await accessSecretStorage(); await this._waitForCompletion(); } finally { modal.close(); } }
<<<<<<< import { Select, Modal, Button } from '../source/components'; import { SelectSkin, ModalSkin, ButtonSkin } from '../source/skins/simple'; ======= import { Select } from '../source/components/Select'; import { SelectSkin } from '../source/skins/simple/SelectSkin'; >>>>>>> import { Select, Modal, Button } from '../source/components/Select'; import { SelectSkin, ModalSkin, ButtonSkin } from '../source/skins/simple/SelectSkin';
<<<<<<< // Here, we return undefined if the room is not in the map: // the room ID you gave is not a DM room for any user. ======= if (this.roomToUser == null) { // we lazily populate roomToUser so you can use // this class just to call getDMRoomsForUserId // which doesn't do very much, but is a fairly // convenient wrapper and there's no point // iterating through the map if getUserIdForRoomId() // is never called. this._populateRoomToUser(); } >>>>>>> if (this.roomToUser == null) { // we lazily populate roomToUser so you can use // this class just to call getDMRoomsForUserId // which doesn't do very much, but is a fairly // convenient wrapper and there's no point // iterating through the map if getUserIdForRoomId() // is never called. this._populateRoomToUser(); } // Here, we return undefined if the room is not in the map: // the room ID you gave is not a DM room for any user.